projects
/
GitHub
/
LineageOS
/
G12
/
android_kernel_amlogic_linux-4.9.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7315613
)
ALSA: hda - Fix line-in on Mac Mini Core2 Duo
author
Takashi Iwai
<tiwai@suse.de>
Thu, 7 May 2009 14:22:53 +0000
(16:22 +0200)
committer
Takashi Iwai
<tiwai@suse.de>
Fri, 8 May 2009 05:55:10 +0000
(07:55 +0200)
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>
sound/pci/hda/patch_sigmatel.c
patch
|
blob
|
blame
|
history
diff --git
a/sound/pci/hda/patch_sigmatel.c
b/sound/pci/hda/patch_sigmatel.c
index 917bc5d3ac2c7f223bb86a56a1027e8a3708a9eb..03b3646018a1a5e7f1cb710780d1e29999a57ac7 100644
(file)
--- 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)
pinctl = snd_hda_codec_read(codec, nid, 0,
AC_VERB_GET_PIN_WIDGET_CONTROL, 0);
/* if PINCTL already set then skip */
- if (!(pinctl & AC_PINCTL_IN_EN)) {
+ /* Also, if both INPUT and OUTPUT are set,
+ * it must be a BIOS bug; need to override, too
+ */
+ if (!(pinctl & AC_PINCTL_IN_EN) ||
+ (pinctl & AC_PINCTL_OUT_EN)) {
+ pinctl &= ~AC_PINCTL_OUT_EN;
pinctl |= AC_PINCTL_IN_EN;
stac92xx_auto_set_pinctl(codec, nid,
pinctl);