]> err.no Git - linux-2.6/blobdiff - sound/pci/ice1712/revo.c
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394...
[linux-2.6] / sound / pci / ice1712 / revo.c
index 1d3b1ebf9c9b6e2b76e771182eb2d2b51804c48e..4d2631434dc81bdb83720ea717c1d6a613fdc51d 100644 (file)
@@ -322,17 +322,23 @@ static struct snd_pt2258 ptc_revo51_volume;
 static void ap192_set_rate_val(struct snd_akm4xxx *ak, unsigned int rate)
 {
        struct snd_ice1712 *ice = ak->private_data[0];
+       int dfs;
 
        revo_set_rate_val(ak, rate);
 
-#if 1 /* FIXME: do we need this procedure? */
-       /* reset DFS pin of AK5385A for ADC, too */
-       /* DFS0 (pin 18) -- GPIO10 pin 77 */
-       snd_ice1712_save_gpio_status(ice);
-       snd_ice1712_gpio_write_bits(ice, 1 << 10,
-                                   rate > 48000 ? (1 << 10) : 0);
-       snd_ice1712_restore_gpio_status(ice);
-#endif
+       /* reset CKS */
+       snd_ice1712_gpio_write_bits(ice, 1 << 8, rate > 96000 ? 1 << 8 : 0);
+       /* reset DFS pins of AK5385A for ADC, too */
+       if (rate > 96000)
+               dfs = 2;
+       else if (rate > 48000)
+               dfs = 1;
+       else
+               dfs = 0;
+       snd_ice1712_gpio_write_bits(ice, 3 << 9, dfs << 9);
+       /* reset ADC */
+       snd_ice1712_gpio_write_bits(ice, 1 << 11, 0);
+       snd_ice1712_gpio_write_bits(ice, 1 << 11, 1 << 11);
 }
 
 static const struct snd_akm4xxx_dac_channel ap192_dac[] = {
@@ -482,6 +488,10 @@ static int __devinit ap192_ak4114_init(struct snd_ice1712 *ice)
                                 ap192_ak4114_write,
                                 ak4114_init_vals, ak4114_init_txcsb,
                                 ice, &ak);
+       /* AK4114 in Revo cannot detect external rate correctly.
+        * No reason to stop capture stream due to incorrect checks */
+       ak->check_flags = AK4114_CHECK_NO_RATE;
+
        return 0; /* error ignored; it's no fatal error */
 }
 
@@ -549,6 +559,9 @@ static int __devinit revo_init(struct snd_ice1712 *ice)
                if (err < 0)
                        return err;
                
+               /* unmute all codecs */
+               snd_ice1712_gpio_write_bits(ice, VT1724_REVO_MUTE,
+                                           VT1724_REVO_MUTE);
                break;
        }