From: Takashi Iwai Date: Tue, 19 Apr 2016 13:28:39 +0000 (+0200) Subject: ALSA: ens1371: Fix "Line In->Rear Out Switch" control X-Git-Tag: v4.7-rc1~116^2~4^2~40 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=d23f0517357ef48d2845846e899d125b3c1a492e;p=karo-tx-linux.git ALSA: ens1371: Fix "Line In->Rear Out Switch" control The "Line In->Rear Out Switch" control on ens1371 driver returns a bogus value, always true, as its check is totally broken. Fix it to check the proper GPIO bit mask. Reported-by: David Binderman Signed-off-by: Takashi Iwai --- diff --git a/sound/pci/ens1370.c b/sound/pci/ens1370.c index 0dc44ebb0032..626cd2167d29 100644 --- a/sound/pci/ens1370.c +++ b/sound/pci/ens1370.c @@ -1548,7 +1548,7 @@ static int snd_es1373_line_get(struct snd_kcontrol *kcontrol, int val = 0; spin_lock_irq(&ensoniq->reg_lock); - if ((ensoniq->ctrl & ES_1371_GPIO_OUTM) >= 4) + if (ensoniq->ctrl & ES_1371_GPIO_OUT(4)) val = 1; ucontrol->value.integer.value[0] = val; spin_unlock_irq(&ensoniq->reg_lock);