diff options
Diffstat (limited to 'sound/pci/hda/patch_conexant.c')
-rw-r--r-- | sound/pci/hda/patch_conexant.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/sound/pci/hda/patch_conexant.c b/sound/pci/hda/patch_conexant.c index e501a85b5612..09d573c59bef 100644 --- a/sound/pci/hda/patch_conexant.c +++ b/sound/pci/hda/patch_conexant.c | |||
@@ -3462,19 +3462,12 @@ static void cx_auto_unsol_event(struct hda_codec *codec, unsigned int res) | |||
3462 | } | 3462 | } |
3463 | } | 3463 | } |
3464 | 3464 | ||
3465 | static int is_int_mic_conn(unsigned int def_conf) | ||
3466 | { | ||
3467 | unsigned int loc = get_defcfg_location(def_conf); | ||
3468 | return get_defcfg_connect(def_conf) == AC_JACK_PORT_FIXED || | ||
3469 | (loc & 0x30) == AC_JACK_LOC_INTERNAL; | ||
3470 | } | ||
3471 | |||
3472 | /* return true if it's an internal-mic pin */ | 3465 | /* return true if it's an internal-mic pin */ |
3473 | static int is_int_mic(struct hda_codec *codec, hda_nid_t pin) | 3466 | static int is_int_mic(struct hda_codec *codec, hda_nid_t pin) |
3474 | { | 3467 | { |
3475 | unsigned int def_conf = snd_hda_codec_get_pincfg(codec, pin); | 3468 | unsigned int def_conf = snd_hda_codec_get_pincfg(codec, pin); |
3476 | return get_defcfg_device(def_conf) == AC_JACK_MIC_IN && | 3469 | return get_defcfg_device(def_conf) == AC_JACK_MIC_IN && |
3477 | is_int_mic_conn(def_conf); | 3470 | snd_hda_get_input_pin_attr(def_conf) == INPUT_PIN_ATTR_INT; |
3478 | } | 3471 | } |
3479 | 3472 | ||
3480 | /* return true if it's an external-mic pin */ | 3473 | /* return true if it's an external-mic pin */ |
@@ -3482,7 +3475,7 @@ static int is_ext_mic(struct hda_codec *codec, hda_nid_t pin) | |||
3482 | { | 3475 | { |
3483 | unsigned int def_conf = snd_hda_codec_get_pincfg(codec, pin); | 3476 | unsigned int def_conf = snd_hda_codec_get_pincfg(codec, pin); |
3484 | return get_defcfg_device(def_conf) == AC_JACK_MIC_IN && | 3477 | return get_defcfg_device(def_conf) == AC_JACK_MIC_IN && |
3485 | !is_int_mic_conn(def_conf); | 3478 | snd_hda_get_input_pin_attr(def_conf) != INPUT_PIN_ATTR_INT; |
3486 | } | 3479 | } |
3487 | 3480 | ||
3488 | /* check whether the pin config is suitable for auto-mic switching; | 3481 | /* check whether the pin config is suitable for auto-mic switching; |