ALSA: hda - Fix line-in on Mac Mini Core2 Duo

BIOS on Mac Mini Core2 Duo sets both INPUT and OUTPUT pinctl bits to
the line-in jack, and it confuses the driver as if it's a valid input.
This patch adds the check of OUTPUT bit so that the driver fixes the
invalid pin setup.

Tested-by: Tino Keitel <tino.keitel@gmx.de>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>

+6 -1
+6 -1
sound/pci/hda/patch_sigmatel.c
··· 4079 4079 pinctl = snd_hda_codec_read(codec, nid, 0, 4080 4080 AC_VERB_GET_PIN_WIDGET_CONTROL, 0); 4081 4081 /* if PINCTL already set then skip */ 4082 - if (!(pinctl & AC_PINCTL_IN_EN)) { 4082 + /* Also, if both INPUT and OUTPUT are set, 4083 + * it must be a BIOS bug; need to override, too 4084 + */ 4085 + if (!(pinctl & AC_PINCTL_IN_EN) || 4086 + (pinctl & AC_PINCTL_OUT_EN)) { 4087 + pinctl &= ~AC_PINCTL_OUT_EN; 4083 4088 pinctl |= AC_PINCTL_IN_EN; 4084 4089 stac92xx_auto_set_pinctl(codec, nid, 4085 4090 pinctl);