X-Git-Url: http://pilppa.org/gitweb/?a=blobdiff_plain;f=sound%2Fpci%2Foxygen%2Fhifier.c;h=1ab833f843eb70404a586a59da232eff20ce4467;hb=d3570a5a7b8d0604fa012129f92637dc1534f62c;hp=7442460583dde0c68f92f40c965afe8cbb461272;hpb=b312bf359e20cc39c00d480fd40a24c245d80bf7;p=linux-2.6-omap-h63xx.git diff --git a/sound/pci/oxygen/hifier.c b/sound/pci/oxygen/hifier.c index 7442460583d..1ab833f843e 100644 --- a/sound/pci/oxygen/hifier.c +++ b/sound/pci/oxygen/hifier.c @@ -17,6 +17,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include #include #include #include @@ -93,6 +94,11 @@ static void hifier_cleanup(struct oxygen *chip) { } +static void hifier_resume(struct oxygen *chip) +{ + hifier_registers_init(chip); +} + static void set_ak4396_params(struct oxygen *chip, struct snd_pcm_hw_params *params) { @@ -107,6 +113,9 @@ static void set_ak4396_params(struct oxygen *chip, else value |= AK4396_DFS_QUAD; data->ak4396_ctl2 = value; + + msleep(1); /* wait for the new MCLK to become stable */ + ak4396_write(chip, AK4396_CONTROL_1, AK4396_DIF_24_MSB); ak4396_write(chip, AK4396_CONTROL_2, value); ak4396_write(chip, AK4396_CONTROL_1, AK4396_DIF_24_MSB | AK4396_RSTN); @@ -146,16 +155,16 @@ static const struct oxygen_model model_hifier = { .init = hifier_init, .control_filter = hifier_control_filter, .cleanup = hifier_cleanup, - .resume = hifier_registers_init, + .resume = hifier_resume, .set_dac_params = set_ak4396_params, .set_adc_params = set_cs5340_params, .update_dac_volume = update_ak4396_volume, .update_dac_mute = update_ak4396_mute, .dac_tlv = ak4396_db_scale, .model_data_size = sizeof(struct hifier_data), - .pcm_dev_cfg = PLAYBACK_0_TO_I2S | - PLAYBACK_1_TO_SPDIF | - CAPTURE_0_FROM_I2S_1, + .device_config = PLAYBACK_0_TO_I2S | + PLAYBACK_1_TO_SPDIF | + CAPTURE_0_FROM_I2S_1, .dac_channels = 2, .dac_volume_min = 0, .dac_volume_max = 255, @@ -176,7 +185,7 @@ static int __devinit hifier_probe(struct pci_dev *pci, ++dev; return -ENOENT; } - err = oxygen_pci_probe(pci, index[dev], id[dev], &model_hifier); + err = oxygen_pci_probe(pci, index[dev], id[dev], &model_hifier, 0); if (err >= 0) ++dev; return err;