aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/patch_realtek.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2010-09-17 08:42:34 -0400
committerTakashi Iwai <tiwai@suse.de>2010-09-17 08:42:34 -0400
commit99ae28bea984df4c38234eb6d2f29a552def6c1b (patch)
treec3005c84d8fa092bfe5cb7642a0dd2f61dca977e /sound/pci/hda/patch_realtek.c
parent5637edb2e1c2d13b276748508ae17f319fb7f066 (diff)
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.c10
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)
1403 hda_nid_t nid = cfg->inputs[i].pin; 1403 hda_nid_t nid = cfg->inputs[i].pin;
1404 unsigned int defcfg; 1404 unsigned int defcfg;
1405 defcfg = snd_hda_codec_get_pincfg(codec, nid); 1405 defcfg = snd_hda_codec_get_pincfg(codec, nid);
1406 switch (get_defcfg_connect(defcfg)) { 1406 switch (snd_hda_get_input_pin_attr(defcfg)) {
1407 case AC_JACK_PORT_FIXED: 1407 case INPUT_PIN_ATTR_INT:
1408 if (fixed) 1408 if (fixed)
1409 return; /* already occupied */ 1409 return; /* already occupied */
1410 fixed = nid; 1410 fixed = nid;
1411 break; 1411 break;
1412 case AC_JACK_PORT_COMPLEX: 1412 case INPUT_PIN_ATTR_UNUSED:
1413 return; /* invalid entry */
1414 default:
1413 if (ext) 1415 if (ext)
1414 return; /* already occupied */ 1416 return; /* already occupied */
1415 ext = nid; 1417 ext = nid;
1416 break; 1418 break;
1417 default:
1418 return; /* invalid entry */
1419 } 1419 }
1420 } 1420 }
1421 if (!ext || !fixed) 1421 if (!ext || !fixed)