summaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/hda_local.h
diff options
context:
space:
mode:
authorDavid Henningsson <david.henningsson@canonical.com>2014-09-23 10:38:17 +0200
committerTakashi Iwai <tiwai@suse.de>2014-09-23 15:57:28 +0200
commit861a04ed15a48e9af7b591cd8ae3bc46aece1733 (patch)
tree8cab89d6faa04cff840fe155b18b480dd4dd753f /sound/pci/hda/hda_local.h
parenta5062dee82826f54529c89d0e58211897b1b4c68 (diff)
downloadlinux-stable-861a04ed15a48e9af7b591cd8ae3bc46aece1733.tar.gz
linux-stable-861a04ed15a48e9af7b591cd8ae3bc46aece1733.tar.bz2
linux-stable-861a04ed15a48e9af7b591cd8ae3bc46aece1733.zip
ALSA: hda - Move the function "check_amp_caps" to hda_codec.c
The next patch will use it, so make it visible across modules. Signed-off-by: David Henningsson <david.henningsson@canonical.com> 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.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/sound/pci/hda/hda_local.h b/sound/pci/hda/hda_local.h
index 8a018d4cbe98..7eb44e78e141 100644
--- a/sound/pci/hda/hda_local.h
+++ b/sound/pci/hda/hda_local.h
@@ -603,6 +603,14 @@ int snd_hda_override_amp_caps(struct hda_codec *codec, hda_nid_t nid, int dir,
u32 snd_hda_query_pin_caps(struct hda_codec *codec, hda_nid_t nid);
int snd_hda_override_pin_caps(struct hda_codec *codec, hda_nid_t nid,
unsigned int caps);
+bool snd_hda_check_amp_caps(struct hda_codec *codec, hda_nid_t nid,
+ int dir, unsigned int bits);
+
+#define nid_has_mute(codec, nid, dir) \
+ snd_hda_check_amp_caps(codec, nid, dir, (AC_AMPCAP_MUTE | AC_AMPCAP_MIN_MUTE))
+#define nid_has_volume(codec, nid, dir) \
+ snd_hda_check_amp_caps(codec, nid, dir, AC_AMPCAP_NUM_STEPS)
+
/* flags for hda_nid_item */
#define HDA_NID_ITEM_AMP (1<<0)