diff options
author | Wu Fengguang <fengguang.wu@intel.com> | 2009-11-18 07:38:02 +0300 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2009-11-18 09:40:57 +0300 |
commit | 864f92be7e8d4a0ba11d912e3f03d1a92a031dee (patch) | |
tree | 95de58c8f304024b99da8707df77264f644d14b4 /sound/pci/hda/hda_eld.c | |
parent | 23ccc2bd246a5bdb1ac03dc9040a0585c1890ef3 (diff) | |
download | linux-864f92be7e8d4a0ba11d912e3f03d1a92a031dee.tar.xz |
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.c | 7 |
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: return -EINVAL; } -static int hdmi_present_sense(struct hda_codec *codec, hda_nid_t nid) -{ - return snd_hda_codec_read(codec, nid, 0, AC_VERB_GET_PIN_SENSE, 0); -} - static int hdmi_eld_valid(struct hda_codec *codec, hda_nid_t nid) { int eldv; int present; - present = hdmi_present_sense(codec, nid); + present = snd_hda_pin_sense(codec, nid); eldv = (present & AC_PINSENSE_ELDV); present = (present & AC_PINSENSE_PRESENCE); |