mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-11-20 00:26:39 +08:00
[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>
This commit is contained in:
parent
f339eb0f30
commit
a76969228a
@ -322,17 +322,23 @@ static struct snd_pt2258 ptc_revo51_volume;
|
|||||||
static void ap192_set_rate_val(struct snd_akm4xxx *ak, unsigned int rate)
|
static void ap192_set_rate_val(struct snd_akm4xxx *ak, unsigned int rate)
|
||||||
{
|
{
|
||||||
struct snd_ice1712 *ice = ak->private_data[0];
|
struct snd_ice1712 *ice = ak->private_data[0];
|
||||||
|
int dfs;
|
||||||
|
|
||||||
revo_set_rate_val(ak, rate);
|
revo_set_rate_val(ak, rate);
|
||||||
|
|
||||||
#if 1 /* FIXME: do we need this procedure? */
|
/* reset CKS */
|
||||||
/* reset DFS pin of AK5385A for ADC, too */
|
snd_ice1712_gpio_write_bits(ice, 1 << 8, rate > 96000 ? 1 : 0);
|
||||||
/* DFS0 (pin 18) -- GPIO10 pin 77 */
|
/* reset DFS pins of AK5385A for ADC, too */
|
||||||
snd_ice1712_save_gpio_status(ice);
|
if (rate > 96000)
|
||||||
snd_ice1712_gpio_write_bits(ice, 1 << 10,
|
dfs = 2;
|
||||||
rate > 48000 ? (1 << 10) : 0);
|
else if (rate > 48000)
|
||||||
snd_ice1712_restore_gpio_status(ice);
|
dfs = 1;
|
||||||
#endif
|
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[] = {
|
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)
|
if (err < 0)
|
||||||
return err;
|
return err;
|
||||||
|
|
||||||
|
/* unmute all codecs */
|
||||||
|
snd_ice1712_gpio_write_bits(ice, VT1724_REVO_MUTE,
|
||||||
|
VT1724_REVO_MUTE);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user