aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/hda_local.h
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2005-06-13 08:16:38 -0400
committerJaroslav Kysela <perex@suse.cz>2005-06-22 06:28:59 -0400
commite9edcee061a80181f0d6e7cada07e1898c14718e (patch)
treeb8ce3f0430ef436cbfbe98736f1ef6bc86fd8c94 /sound/pci/hda/hda_local.h
parentb636a71d9b9525ee51ca872d461817a5bd5c39fd (diff)
[ALSA] hda-codec - More fix of ALC880 codec support
Documentation,HDA Codec driver,HDA generic driver,HDA Intel driver - Fix some invalid configurations, typos in the last patch - Make init_verbs chainable, so that different configs can share the same init_verbs - Reorder and clean up the source codes in patch_realtek.c - Add the pin default configuration parser, used commonly in cmedia and realtek patch codes. - Add 'auto' model to ALC880 for auto-configuration from BIOS Use this model as default, and 3-stack as fallback 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.h33
1 files changed, 32 insertions, 1 deletions
diff --git a/sound/pci/hda/hda_local.h b/sound/pci/hda/hda_local.h
index b8fbbc4901d9..810cfd2d9bba 100644
--- a/sound/pci/hda/hda_local.h
+++ b/sound/pci/hda/hda_local.h
@@ -130,7 +130,7 @@ struct hda_board_config {
130 unsigned short pci_subdevice; 130 unsigned short pci_subdevice;
131}; 131};
132 132
133int snd_hda_check_board_config(struct hda_codec *codec, struct hda_board_config *tbl); 133int snd_hda_check_board_config(struct hda_codec *codec, const struct hda_board_config *tbl);
134int snd_hda_add_new_ctls(struct hda_codec *codec, snd_kcontrol_new_t *knew); 134int snd_hda_add_new_ctls(struct hda_codec *codec, snd_kcontrol_new_t *knew);
135 135
136/* 136/*
@@ -158,4 +158,35 @@ struct hda_bus_unsolicited {
158 struct work_struct work; 158 struct work_struct work;
159}; 159};
160 160
161/*
162 * Helper for automatic ping configuration
163 */
164
165enum {
166 AUTO_PIN_MIC,
167 AUTO_PIN_FRONT_MIC,
168 AUTO_PIN_LINE,
169 AUTO_PIN_FRONT_LINE,
170 AUTO_PIN_CD,
171 AUTO_PIN_AUX,
172 AUTO_PIN_LAST
173};
174
175struct auto_pin_cfg {
176 int line_outs;
177 hda_nid_t line_out_pins[4]; /* sorted in the order of Front/Surr/CLFE/Side */
178 hda_nid_t hp_pin;
179 hda_nid_t input_pins[AUTO_PIN_LAST];
180 hda_nid_t dig_out_pin;
181 hda_nid_t dig_in_pin;
182};
183
184#define get_defcfg_connect(cfg) ((cfg & AC_DEFCFG_PORT_CONN) >> AC_DEFCFG_PORT_CONN_SHIFT)
185#define get_defcfg_association(cfg) ((cfg & AC_DEFCFG_DEF_ASSOC) >> AC_DEFCFG_ASSOC_SHIFT)
186#define get_defcfg_location(cfg) ((cfg & AC_DEFCFG_LOCATION) >> AC_DEFCFG_LOCATION_SHIFT)
187#define get_defcfg_sequence(cfg) (cfg & AC_DEFCFG_SEQUENCE)
188#define get_defcfg_device(cfg) ((cfg & AC_DEFCFG_DEVICE) >> AC_DEFCFG_DEVICE_SHIFT)
189
190int snd_hda_parse_pin_def_config(struct hda_codec *codec, struct auto_pin_cfg *cfg);
191
161#endif /* __SOUND_HDA_LOCAL_H */ 192#endif /* __SOUND_HDA_LOCAL_H */