summaryrefslogtreecommitdiffstats
path: root/sound/pci/ice1712
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2008-02-04 12:36:32 +0100
committerTakashi Iwai <tiwai@suse.de>2008-04-24 12:00:07 +0200
commita76969228a5b341f9c968abbc6eb7655ac3734e4 (patch)
tree8b9f77d492ffdbcafba06e10beff9a67b0170496 /sound/pci/ice1712
parentf339eb0f30e6598c1d3f91b01a3e634364fab7a2 (diff)
downloadlinux-a76969228a5b341f9c968abbc6eb7655ac3734e4.tar.bz2
[ALSA] ice1724 - Add ADC setup in set_rate callback for Audiophile192
Added the missing GPIO setup for the AK5385A ADC codec on Audiophile192. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/ice1712')
-rw-r--r--sound/pci/ice1712/revo.c25
1 files changed, 17 insertions, 8 deletions
diff --git a/sound/pci/ice1712/revo.c b/sound/pci/ice1712/revo.c
index 1d3b1ebf9c9b..7c930cc05f1d 100644
--- a/sound/pci/ice1712/revo.c
+++ b/sound/pci/ice1712/revo.c
@@ -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 : 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);
}
static const struct snd_akm4xxx_dac_channel ap192_dac[] = {
@@ -549,6 +555,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;
}