aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/patch_conexant.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2011-05-17 06:57:46 -0400
committerTakashi Iwai <tiwai@suse.de>2011-05-17 06:57:46 -0400
commitb55fcb508dfc9f00056beb33d4c466bc9032dd05 (patch)
tree2dcc92c2f0533c9b999bb8699d02a540633f2367 /sound/pci/hda/patch_conexant.c
parent1f83ac5ac9fb3e8b2e053de380f55ba412228577 (diff)
ALSA: hda - Handle dock line-in as auto-detecable for Cxt auto-parser
Similar process like in patch_realtek.c and patch_sigmatel.c. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda/patch_conexant.c')
-rw-r--r--sound/pci/hda/patch_conexant.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/sound/pci/hda/patch_conexant.c b/sound/pci/hda/patch_conexant.c
index 2a04fea01692..4f37477d3c71 100644
--- a/sound/pci/hda/patch_conexant.c
+++ b/sound/pci/hda/patch_conexant.c
@@ -3794,17 +3794,19 @@ static void cx_auto_check_auto_mic(struct hda_codec *codec)
3794 for (i = 0; i < spec->private_imux.num_items; i++) { 3794 for (i = 0; i < spec->private_imux.num_items; i++) {
3795 hda_nid_t pin = spec->imux_info[i].pin; 3795 hda_nid_t pin = spec->imux_info[i].pin;
3796 unsigned int def_conf = snd_hda_codec_get_pincfg(codec, pin); 3796 unsigned int def_conf = snd_hda_codec_get_pincfg(codec, pin);
3797 int attr; 3797 int type, attr;
3798 if (get_defcfg_device(def_conf) != AC_JACK_MIC_IN)
3799 return; /* no-mic input */
3800 attr = snd_hda_get_input_pin_attr(def_conf); 3798 attr = snd_hda_get_input_pin_attr(def_conf);
3801 if (attr == INPUT_PIN_ATTR_UNUSED) 3799 if (attr == INPUT_PIN_ATTR_UNUSED)
3802 continue; 3800 return; /* invalid entry */
3803 if (attr > INPUT_PIN_ATTR_NORMAL) 3801 if (attr > INPUT_PIN_ATTR_NORMAL)
3804 attr = INPUT_PIN_ATTR_NORMAL; 3802 attr = INPUT_PIN_ATTR_NORMAL;
3805 if (attr != INPUT_PIN_ATTR_INT && 3803 if (attr != INPUT_PIN_ATTR_INT &&
3806 !is_jack_detectable(codec, pin)) 3804 !is_jack_detectable(codec, pin))
3807 continue; 3805 return; /* non-detectable pin */
3806 type = get_defcfg_device(def_conf);
3807 if (type != AC_JACK_MIC_IN &&
3808 (attr != INPUT_PIN_ATTR_DOCK || type != AC_JACK_LINE_IN))
3809 return; /* no valid input type */
3808 if (pset[attr] >= 0) 3810 if (pset[attr] >= 0)
3809 return; /* already occupied */ 3811 return; /* already occupied */
3810 pset[attr] = i; 3812 pset[attr] = i;