aboutsummaryrefslogtreecommitdiffstats
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.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 */