aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2009-05-07 10:22:53 -0400
committerTakashi Iwai <tiwai@suse.de>2009-05-08 01:55:10 -0400
commit5dd17cb992ef4c1ebb1a2d60cbef4b6967974673 (patch)
tree42c0aff6920783ccf76fb626f70c11b067dd7283
parent7315613f87f4aa0a52f60814f4ee3802e0bb1ec5 (diff)
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>
-rw-r--r--sound/pci/hda/patch_sigmatel.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c
index 917bc5d3ac2c..03b3646018a1 100644
--- a/sound/pci/hda/patch_sigmatel.c
+++ b/sound/pci/hda/patch_sigmatel.c
@@ -4079,7 +4079,12 @@ static int stac92xx_init(struct hda_codec *codec)
4079 pinctl = snd_hda_codec_read(codec, nid, 0, 4079 pinctl = snd_hda_codec_read(codec, nid, 0,
4080 AC_VERB_GET_PIN_WIDGET_CONTROL, 0); 4080 AC_VERB_GET_PIN_WIDGET_CONTROL, 0);
4081 /* if PINCTL already set then skip */ 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 pinctl |= AC_PINCTL_IN_EN; 4088 pinctl |= AC_PINCTL_IN_EN;
4084 stac92xx_auto_set_pinctl(codec, nid, 4089 stac92xx_auto_set_pinctl(codec, nid,
4085 pinctl); 4090 pinctl);