]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - sound/pci/oxygen/hifier.c
Merge git://git.kernel.org/pub/scm/linux/kernel/git/hskinnemoen/avr32-2.6
[linux-2.6-omap-h63xx.git] / sound / pci / oxygen / hifier.c
index 7442460583dde0c68f92f40c965afe8cbb461272..1ab833f843eb70404a586a59da232eff20ce4467 100644 (file)
@@ -17,6 +17,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
  */
 
+#include <linux/delay.h>
 #include <linux/pci.h>
 #include <sound/control.h>
 #include <sound/core.h>
@@ -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;