From 763c45e9de1baa637616fcaf7af77d06d54835d7 Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Tue, 17 May 2011 12:57:46 +0200 Subject: [PATCH] --- yaml --- r: 248489 b: refs/heads/master c: b55fcb508dfc9f00056beb33d4c466bc9032dd05 h: refs/heads/master i: 248487: 173d598ee3700b2d46ebdd4561dcfb47fd7bf38a v: v3 --- [refs] | 2 +- trunk/sound/pci/hda/patch_conexant.c | 12 +++++++----- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/[refs] b/[refs] index 9fb42be4ea21..a7291fb74458 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 1f83ac5ac9fb3e8b2e053de380f55ba412228577 +refs/heads/master: b55fcb508dfc9f00056beb33d4c466bc9032dd05 diff --git a/trunk/sound/pci/hda/patch_conexant.c b/trunk/sound/pci/hda/patch_conexant.c index 2a04fea01692..4f37477d3c71 100644 --- a/trunk/sound/pci/hda/patch_conexant.c +++ b/trunk/sound/pci/hda/patch_conexant.c @@ -3794,17 +3794,19 @@ static void cx_auto_check_auto_mic(struct hda_codec *codec) for (i = 0; i < spec->private_imux.num_items; i++) { hda_nid_t pin = spec->imux_info[i].pin; unsigned int def_conf = snd_hda_codec_get_pincfg(codec, pin); - int attr; - if (get_defcfg_device(def_conf) != AC_JACK_MIC_IN) - return; /* no-mic input */ + int type, attr; attr = snd_hda_get_input_pin_attr(def_conf); if (attr == INPUT_PIN_ATTR_UNUSED) - continue; + return; /* invalid entry */ if (attr > INPUT_PIN_ATTR_NORMAL) attr = INPUT_PIN_ATTR_NORMAL; if (attr != INPUT_PIN_ATTR_INT && !is_jack_detectable(codec, pin)) - continue; + return; /* non-detectable pin */ + type = get_defcfg_device(def_conf); + if (type != AC_JACK_MIC_IN && + (attr != INPUT_PIN_ATTR_DOCK || type != AC_JACK_LINE_IN)) + return; /* no valid input type */ if (pset[attr] >= 0) return; /* already occupied */ pset[attr] = i;