From 3e2fd1fa1602dd9e24ba2757bef4e76d32aee329 Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Tue, 29 May 2007 18:01:06 +0200 Subject: [PATCH] --- yaml --- r: 57192 b: refs/heads/master c: f9acba4347ac2145456aa8dedaab3d74761da42a h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/sound/pci/hda/patch_sigmatel.c | 15 +++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 6645339db77b..8f8495134fcc 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 7353e14d91b78dc6da0d93fb081346c5ef854876 +refs/heads/master: f9acba4347ac2145456aa8dedaab3d74761da42a diff --git a/trunk/sound/pci/hda/patch_sigmatel.c b/trunk/sound/pci/hda/patch_sigmatel.c index 1527cb61e5d6..33fc7cd00935 100644 --- a/trunk/sound/pci/hda/patch_sigmatel.c +++ b/trunk/sound/pci/hda/patch_sigmatel.c @@ -1764,6 +1764,21 @@ static void stac92xx_set_pinctl(struct hda_codec *codec, hda_nid_t nid, unsigned int pin_ctl = snd_hda_codec_read(codec, nid, 0, AC_VERB_GET_PIN_WIDGET_CONTROL, 0x00); + if (pin_ctl & AC_PINCTL_IN_EN) { + /* + * we need to check the current set-up direction of + * shared input pins since they can be switched via + * "xxx as Output" mixer switch + */ + struct sigmatel_spec *spec = codec->spec; + struct auto_pin_cfg *cfg = &spec->autocfg; + if ((nid == cfg->input_pins[AUTO_PIN_LINE] && + spec->line_switch) || + (nid == cfg->input_pins[AUTO_PIN_MIC] && + spec->mic_switch)) + return; + } + /* if setting pin direction bits, clear the current direction bits first */ if (flag & (AC_PINCTL_IN_EN | AC_PINCTL_OUT_EN))