summaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/hda_local.h
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2005-11-21 16:33:22 +0100
committerJaroslav Kysela <perex@suse.cz>2006-01-03 12:29:27 +0100
commit54d174031576a2855c49611d83d4946bde81b504 (patch)
tree6bdcefaccb78bddfa1a3ea7b429e1178b479999d /sound/pci/hda/hda_local.h
parent1b98ea4791892399d8c23c93e117567eeff38887 (diff)
downloadlinux-54d174031576a2855c49611d83d4946bde81b504.tar.gz
linux-54d174031576a2855c49611d83d4946bde81b504.tar.bz2
linux-54d174031576a2855c49611d83d4946bde81b504.zip
[ALSA] hda-codec - Fix connection list parsing
Modules: HDA Codec driver,HDA generic driver - Fix connection list parsing (with ranged flag). - Increase the max number of connections - Introduce widget capabilities cache - Power up/down widgets at init, suspend and resume 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.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 */