Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[ALSA] Enable stereo line input for TAS codec
Despite what the data sheet says in one place, to get stereo input
from input A (line in), we have to clear the 'input B monaural' bit in
the ACR.

Signed-off-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
  • Loading branch information
paulusmack authored and Jaroslav Kysela committed Nov 28, 2006
1 parent ac5d1a7 commit 80b8d5d
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions sound/aoa/codecs/snd-aoa-codec-tas.c
Expand Up @@ -514,9 +514,15 @@ static int tas_snd_capture_source_put(struct snd_kcontrol *kcontrol,
mutex_lock(&tas->mtx);
oldacr = tas->acr;

tas->acr &= ~TAS_ACR_INPUT_B;
/*
* Despite what the data sheet says in one place, the
* TAS_ACR_B_MONAUREAL bit forces mono output even when
* input A (line in) is selected.
*/
tas->acr &= ~(TAS_ACR_INPUT_B | TAS_ACR_B_MONAUREAL);
if (ucontrol->value.enumerated.item[0])
tas->acr |= TAS_ACR_INPUT_B;
tas->acr |= TAS_ACR_INPUT_B | TAS_ACR_B_MONAUREAL |
TAS_ACR_B_MON_SEL_RIGHT;
if (oldacr == tas->acr) {
mutex_unlock(&tas->mtx);
return 0;
Expand Down Expand Up @@ -686,8 +692,7 @@ static int tas_reset_init(struct tas *tas)
if (tas_write_reg(tas, TAS_REG_MCS, 1, &tmp))
goto outerr;

tas->acr |= TAS_ACR_ANALOG_PDOWN | TAS_ACR_B_MONAUREAL |
TAS_ACR_B_MON_SEL_RIGHT;
tas->acr |= TAS_ACR_ANALOG_PDOWN;
if (tas_write_reg(tas, TAS_REG_ACR, 1, &tas->acr))
goto outerr;

Expand Down

0 comments on commit 80b8d5d

Please sign in to comment.