diff options
author | Takashi Iwai <tiwai@suse.de> | 2008-02-04 06:36:32 -0500 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2008-04-24 06:00:07 -0400 |
commit | a76969228a5b341f9c968abbc6eb7655ac3734e4 (patch) | |
tree | 8b9f77d492ffdbcafba06e10beff9a67b0170496 /sound/pci/ice1712 | |
parent | f339eb0f30e6598c1d3f91b01a3e634364fab7a2 (diff) |
[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.c | 25 |
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; | |||
322 | static void ap192_set_rate_val(struct snd_akm4xxx *ak, unsigned int rate) | 322 | static void ap192_set_rate_val(struct snd_akm4xxx *ak, unsigned int rate) |
323 | { | 323 | { |
324 | struct snd_ice1712 *ice = ak->private_data[0]; | 324 | struct snd_ice1712 *ice = ak->private_data[0]; |
325 | int dfs; | ||
325 | 326 | ||
326 | revo_set_rate_val(ak, rate); | 327 | revo_set_rate_val(ak, rate); |
327 | 328 | ||
328 | #if 1 /* FIXME: do we need this procedure? */ | 329 | /* reset CKS */ |
329 | /* reset DFS pin of AK5385A for ADC, too */ | 330 | snd_ice1712_gpio_write_bits(ice, 1 << 8, rate > 96000 ? 1 : 0); |
330 | /* DFS0 (pin 18) -- GPIO10 pin 77 */ | 331 | /* reset DFS pins of AK5385A for ADC, too */ |
331 | snd_ice1712_save_gpio_status(ice); | 332 | if (rate > 96000) |
332 | snd_ice1712_gpio_write_bits(ice, 1 << 10, | 333 | dfs = 2; |
333 | rate > 48000 ? (1 << 10) : 0); | 334 | else if (rate > 48000) |
334 | snd_ice1712_restore_gpio_status(ice); | 335 | dfs = 1; |
335 | #endif | 336 | else |
337 | dfs = 0; | ||
338 | snd_ice1712_gpio_write_bits(ice, 3 << 9, dfs << 9); | ||
339 | /* reset ADC */ | ||
340 | snd_ice1712_gpio_write_bits(ice, 1 << 11, 0); | ||
341 | snd_ice1712_gpio_write_bits(ice, 1 << 11, 1); | ||
336 | } | 342 | } |
337 | 343 | ||
338 | static const struct snd_akm4xxx_dac_channel ap192_dac[] = { | 344 | static const struct snd_akm4xxx_dac_channel ap192_dac[] = { |
@@ -549,6 +555,9 @@ static int __devinit revo_init(struct snd_ice1712 *ice) | |||
549 | if (err < 0) | 555 | if (err < 0) |
550 | return err; | 556 | return err; |
551 | 557 | ||
558 | /* unmute all codecs */ | ||
559 | snd_ice1712_gpio_write_bits(ice, VT1724_REVO_MUTE, | ||
560 | VT1724_REVO_MUTE); | ||
552 | break; | 561 | break; |
553 | } | 562 | } |
554 | 563 | ||