Commit 80b8d5d6bc0000c6e499260883cfc95e645f49d1

Authored by Paul Mackerras
Committed by Jaroslav Kysela
1 parent ac5d1a7d25

[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>

Showing 1 changed file with 9 additions and 4 deletions Side-by-side Diff

sound/aoa/codecs/snd-aoa-codec-tas.c
... ... @@ -514,9 +514,15 @@
514 514 mutex_lock(&tas->mtx);
515 515 oldacr = tas->acr;
516 516  
517   - tas->acr &= ~TAS_ACR_INPUT_B;
  517 + /*
  518 + * Despite what the data sheet says in one place, the
  519 + * TAS_ACR_B_MONAUREAL bit forces mono output even when
  520 + * input A (line in) is selected.
  521 + */
  522 + tas->acr &= ~(TAS_ACR_INPUT_B | TAS_ACR_B_MONAUREAL);
518 523 if (ucontrol->value.enumerated.item[0])
519   - tas->acr |= TAS_ACR_INPUT_B;
  524 + tas->acr |= TAS_ACR_INPUT_B | TAS_ACR_B_MONAUREAL |
  525 + TAS_ACR_B_MON_SEL_RIGHT;
520 526 if (oldacr == tas->acr) {
521 527 mutex_unlock(&tas->mtx);
522 528 return 0;
... ... @@ -686,8 +692,7 @@
686 692 if (tas_write_reg(tas, TAS_REG_MCS, 1, &tmp))
687 693 goto outerr;
688 694  
689   - tas->acr |= TAS_ACR_ANALOG_PDOWN | TAS_ACR_B_MONAUREAL |
690   - TAS_ACR_B_MON_SEL_RIGHT;
  695 + tas->acr |= TAS_ACR_ANALOG_PDOWN;
691 696 if (tas_write_reg(tas, TAS_REG_ACR, 1, &tas->acr))
692 697 goto outerr;
693 698