diff options
author | Takashi Iwai <tiwai@suse.de> | 2010-09-17 16:42:34 +0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2010-09-17 16:42:34 +0400 |
commit | 99ae28bea984df4c38234eb6d2f29a552def6c1b (patch) | |
tree | c3005c84d8fa092bfe5cb7642a0dd2f61dca977e /sound/pci/hda/patch_realtek.c | |
parent | 5637edb2e1c2d13b276748508ae17f319fb7f066 (diff) | |
download | linux-99ae28bea984df4c38234eb6d2f29a552def6c1b.tar.xz |
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>
Diffstat (limited to 'sound/pci/hda/patch_realtek.c')
-rw-r--r-- | sound/pci/hda/patch_realtek.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 5df88798895b..6045f281b225 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c @@ -1403,19 +1403,19 @@ static void alc_init_auto_mic(struct hda_codec *codec) hda_nid_t nid = cfg->inputs[i].pin; unsigned int defcfg; defcfg = snd_hda_codec_get_pincfg(codec, nid); - switch (get_defcfg_connect(defcfg)) { - case AC_JACK_PORT_FIXED: + switch (snd_hda_get_input_pin_attr(defcfg)) { + case INPUT_PIN_ATTR_INT: if (fixed) return; /* already occupied */ fixed = nid; break; - case AC_JACK_PORT_COMPLEX: + case INPUT_PIN_ATTR_UNUSED: + return; /* invalid entry */ + default: if (ext) return; /* already occupied */ ext = nid; break; - default: - return; /* invalid entry */ } } if (!ext || !fixed) |