aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/hda_eld.c
diff options
context:
space:
mode:
authorWu Fengguang <fengguang.wu@intel.com>2009-11-17 23:38:02 -0500
committerTakashi Iwai <tiwai@suse.de>2009-11-18 01:40:57 -0500
commit864f92be7e8d4a0ba11d912e3f03d1a92a031dee (patch)
tree95de58c8f304024b99da8707df77264f644d14b4 /sound/pci/hda/hda_eld.c
parent23ccc2bd246a5bdb1ac03dc9040a0585c1890ef3 (diff)
ALSA: hda - introduce snd_hda_jack_detect() and snd_hda_pin_sense()
This helps merge duplicate code. v2: add snd_hda_jack_detect() and comments recommended by Takashi. Signed-off-by: Wu Fengguang <fengguang.wu@intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda/hda_eld.c')
-rw-r--r--sound/pci/hda/hda_eld.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/sound/pci/hda/hda_eld.c b/sound/pci/hda/hda_eld.c
index de50cfcf644e..4228f2fe5956 100644
--- a/sound/pci/hda/hda_eld.c
+++ b/sound/pci/hda/hda_eld.c
@@ -309,17 +309,12 @@ out_fail:
309 return -EINVAL; 309 return -EINVAL;
310} 310}
311 311
312static int hdmi_present_sense(struct hda_codec *codec, hda_nid_t nid)
313{
314 return snd_hda_codec_read(codec, nid, 0, AC_VERB_GET_PIN_SENSE, 0);
315}
316
317static int hdmi_eld_valid(struct hda_codec *codec, hda_nid_t nid) 312static int hdmi_eld_valid(struct hda_codec *codec, hda_nid_t nid)
318{ 313{
319 int eldv; 314 int eldv;
320 int present; 315 int present;
321 316
322 present = hdmi_present_sense(codec, nid); 317 present = snd_hda_pin_sense(codec, nid);
323 eldv = (present & AC_PINSENSE_ELDV); 318 eldv = (present & AC_PINSENSE_ELDV);
324 present = (present & AC_PINSENSE_PRESENCE); 319 present = (present & AC_PINSENSE_PRESENCE);
325 320