aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/hda_local.h
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2011-05-17 11:28:16 +0200
committerTakashi Iwai <tiwai@suse.de>2011-05-17 12:33:27 +0200
commite35d9d6a153493055fc888add70786154f00edd4 (patch)
tree19a6339a5b782ecbac23a7983d84b6fe15a2624b /sound/pci/hda/hda_local.h
parent43c1b2e9209cc824177a5a13e34fb21dfab3455a (diff)
downloadkernel_samsung_aries-e35d9d6a153493055fc888add70786154f00edd4.zip
kernel_samsung_aries-e35d9d6a153493055fc888add70786154f00edd4.tar.gz
kernel_samsung_aries-e35d9d6a153493055fc888add70786154f00edd4.tar.bz2
ALSA: hda - Check unsol-cap in is_jack_detectalbe()
Also replace more open-codes with this function. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda/hda_local.h')
-rw-r--r--sound/pci/hda/hda_local.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/sound/pci/hda/hda_local.h b/sound/pci/hda/hda_local.h
index 01a7cf6..08ec073 100644
--- a/sound/pci/hda/hda_local.h
+++ b/sound/pci/hda/hda_local.h
@@ -495,7 +495,8 @@ int snd_hda_jack_detect(struct hda_codec *codec, hda_nid_t nid);
static inline bool is_jack_detectable(struct hda_codec *codec, hda_nid_t nid)
{
- return !!(snd_hda_query_pin_caps(codec, nid) & AC_PINCAP_PRES_DETECT);
+ return (snd_hda_query_pin_caps(codec, nid) & AC_PINCAP_PRES_DETECT) &&
+ (get_wcaps(codec, nid) & AC_WCAP_UNSOL_CAP);
}
/* flags for hda_nid_item */