ALSA: hda - Make snd_hda_get_input_pin_attr() helper

Make the helper function to give the input-pin attribute for jack
connectivity and location.  This simplifies checks of input-pin jacks
a bit in some places.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
Takashi Iwai
2010-09-17 14:42:34 +02:00
والد 5637edb2e1
کامیت 99ae28bea9
6فایلهای تغییر یافته به همراه59 افزوده شده و 67 حذف شده

مشاهده پرونده

@@ -334,7 +334,7 @@ static int is_ext_mic(struct hda_codec *codec, unsigned int idx)
if (!(val & AC_PINCAP_PRES_DETECT))
return 0;
val = snd_hda_codec_get_pincfg(codec, pin);
return (get_defcfg_connect(val) == AC_JACK_PORT_COMPLEX);
return (snd_hda_get_input_pin_attr(val) != INPUT_PIN_ATTR_INT);
}
static hda_nid_t get_adc(struct hda_codec *codec, hda_nid_t pin,