summaryrefslogtreecommitdiff
path: root/sound/pci/hda/hda_local.h
diff options
context:
space:
mode:
Diffstat (limited to 'sound/pci/hda/hda_local.h')
-rw-r--r--sound/pci/hda/hda_local.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/sound/pci/hda/hda_local.h b/sound/pci/hda/hda_local.h
index 502290424c67..ded32359b654 100644
--- a/sound/pci/hda/hda_local.h
+++ b/sound/pci/hda/hda_local.h
@@ -87,7 +87,7 @@ int snd_hda_create_spdif_in_ctls(struct hda_codec *codec, hda_nid_t nid);
/*
* input MUX helper
*/
-#define HDA_MAX_NUM_INPUTS 8
+#define HDA_MAX_NUM_INPUTS 16
struct hda_input_mux_item {
const char *label;
unsigned int index;
@@ -243,4 +243,16 @@ int snd_hda_parse_pin_def_config(struct hda_codec *codec, struct auto_pin_cfg *c
#define PIN_HP 0xc0
#define PIN_HP_AMP 0x80
+/*
+ * get widget capabilities
+ */
+static inline u32 get_wcaps(struct hda_codec *codec, hda_nid_t nid)
+{
+ if (nid < codec->start_nid ||
+ nid >= codec->start_nid + codec->num_nodes)
+ return snd_hda_param_read(codec, nid, AC_PAR_AUDIO_WIDGET_CAP);
+ return codec->wcaps[nid - codec->start_nid];
+}
+
+
#endif /* __SOUND_HDA_LOCAL_H */