From 54d174031576a2855c49611d83d4946bde81b504 Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Mon, 21 Nov 2005 16:33:22 +0100 Subject: [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 --- sound/pci/hda/hda_local.h | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'sound/pci/hda/hda_local.h') 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 */ -- cgit v1.2.2