summaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/hda_local.h
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2011-05-17 09:53:31 +0200
committerTakashi Iwai <tiwai@suse.de>2011-05-17 09:57:19 +0200
commit03697e2acce9b8818cdb5fc0ebd5e5199dea1c32 (patch)
tree2ec01404917d4a1d55041511a4b809ba4cbc96fb /sound/pci/hda/hda_local.h
parenta3a85d3983f7e18c46fba9f92c21d8a713de9791 (diff)
downloadop-kernel-dev-03697e2acce9b8818cdb5fc0ebd5e5199dea1c32.zip
op-kernel-dev-03697e2acce9b8818cdb5fc0ebd5e5199dea1c32.tar.gz
ALSA: hda - Add automute-mode enum to Conexant auto-parser
Implement the same functionality as Realtek's auto-mute mode control. Now Conexant auto-parser can also mutes line-out and provide the enum control for different automute behavior. 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.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/sound/pci/hda/hda_local.h b/sound/pci/hda/hda_local.h
index 1ed6ee5..01a7cf6 100644
--- a/sound/pci/hda/hda_local.h
+++ b/sound/pci/hda/hda_local.h
@@ -493,6 +493,11 @@ u32 snd_hda_query_pin_caps(struct hda_codec *codec, hda_nid_t nid);
u32 snd_hda_pin_sense(struct hda_codec *codec, hda_nid_t nid);
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);
+}
+
/* flags for hda_nid_item */
#define HDA_NID_ITEM_AMP (1<<0)
OpenPOWER on IntegriCloud