Commit d23f0517 authored by Takashi Iwai's avatar Takashi Iwai

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: default avatarDavid Binderman <dcb314@hotmail.com>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent a19c921f
...@@ -1548,7 +1548,7 @@ static int snd_es1373_line_get(struct snd_kcontrol *kcontrol, ...@@ -1548,7 +1548,7 @@ static int snd_es1373_line_get(struct snd_kcontrol *kcontrol,
int val = 0; int val = 0;
spin_lock_irq(&ensoniq->reg_lock); spin_lock_irq(&ensoniq->reg_lock);
if ((ensoniq->ctrl & ES_1371_GPIO_OUTM) >= 4) if (ensoniq->ctrl & ES_1371_GPIO_OUT(4))
val = 1; val = 1;
ucontrol->value.integer.value[0] = val; ucontrol->value.integer.value[0] = val;
spin_unlock_irq(&ensoniq->reg_lock); spin_unlock_irq(&ensoniq->reg_lock);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment