aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/patch_realtek.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2011-05-17 10:00:16 +0200
committerTakashi Iwai <tiwai@suse.de>2011-05-17 10:00:16 +0200
commit06dec2282b1366136442950958b517db691533a1 (patch)
tree14f656f9d75a6d88746821a90950623a97a5ac2b /sound/pci/hda/patch_realtek.c
parent03697e2acce9b8818cdb5fc0ebd5e5199dea1c32 (diff)
downloadkernel_samsung_espresso10-06dec2282b1366136442950958b517db691533a1.zip
kernel_samsung_espresso10-06dec2282b1366136442950958b517db691533a1.tar.gz
kernel_samsung_espresso10-06dec2282b1366136442950958b517db691533a1.tar.bz2
ALSA: hda - Use is_jack_detectable() helper
Replaced the open-code with the new helper function. 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.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index 4dd0ccc..473ddc7 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -1560,8 +1560,7 @@ static void alc_init_auto_hp(struct hda_codec *codec)
for (i = 0; i < cfg->hp_outs; i++) {
hda_nid_t nid = cfg->hp_pins[i];
- if (!(snd_hda_query_pin_caps(codec, nid) &
- AC_PINCAP_PRES_DETECT))
+ if (!is_jack_detectable(codec, nid))
continue;
snd_printdd("realtek: Enable HP auto-muting on NID 0x%x\n",
nid);
@@ -1576,8 +1575,7 @@ static void alc_init_auto_hp(struct hda_codec *codec)
cfg->line_out_pins[0] != cfg->speaker_pins[0]) {
for (i = 0; i < cfg->line_outs; i++) {
hda_nid_t nid = cfg->line_out_pins[i];
- if (!(snd_hda_query_pin_caps(codec, nid) &
- AC_PINCAP_PRES_DETECT))
+ if (!is_jack_detectable(codec, nid))
continue;
snd_printdd("realtek: Enable Line-Out auto-muting "
"on NID 0x%x\n", nid);
@@ -19596,8 +19594,7 @@ static void alc680_rec_autoswitch(struct hda_codec *codec)
for (i = 0; i < cfg->num_inputs; i++) {
nid = cfg->inputs[i].pin;
- if (!(snd_hda_query_pin_caps(codec, nid) &
- AC_PINCAP_PRES_DETECT))
+ if (!is_jack_detectable(codec, nid))
continue;
if (snd_hda_jack_detect(codec, nid)) {
if (cfg->inputs[i].type < type_found) {