Lines Matching +full:codec +full:- +full:1

1 /* SPDX-License-Identifier: GPL-2.0-or-later */
3 * Generic BIOS auto-parser helper functions for HD-audio
16 /* table entry for multi-io paths */
18 hda_nid_t pin; /* multi-io widget pin NID */
20 unsigned int ctl_in; /* cached input-pin control value */
25 * For output, stored in the order of DAC -> ... -> pin,
26 * for input, pin -> ... -> ADC.
29 * e.g. idx[1] is the index of the DAC (path[0]) selected by path[1] widget
30 * multi[] indicates whether it's a selector widget with multi-connectors
50 bool active:1; /* activated by driver */
51 bool pin_enabled:1; /* pins are enabled */
52 bool pin_fixed:1; /* path with fixed pin */
53 bool stream_enabled:1; /* stream is active */
56 /* mic/line-in auto switching entry */
62 int idx; /* imux index, -1 = invalid */
108 struct hda_multi_out multiout; /* playback set-up
113 hda_nid_t follower_dig_outs[3]; /* optional - for auto-parsing */
119 hda_nid_t dig_in_nid; /* digital-in NID; optional */
120 hda_nid_t mixer_nid; /* analog-mixer NID */
121 hda_nid_t mixer_merge_nid; /* aamix merge-point NID (optional) */
125 /* capture setup for dynamic dual-adc switch */
184 /* auto-mic stuff */
190 unsigned int hp_jack_present:1;
191 unsigned int line_jack_present:1;
192 unsigned int speaker_muted:1; /* current status of speaker mute */
193 unsigned int line_out_muted:1; /* current status of LO mute */
196 unsigned int auto_mic:1;
197 unsigned int automute_speaker:1; /* automute speaker outputs */
198 unsigned int automute_lo:1; /* automute LO outputs */
201 unsigned int detect_hp:1; /* Headphone detection enabled */
202 unsigned int detect_lo:1; /* Line-out detection enabled */
203 unsigned int automute_speaker_possible:1; /* there are speakers and either LO or HP */
204 unsigned int automute_lo_possible:1; /* there are line outs and HP */
206 /* additional parameters set by codec drivers */
207 unsigned int master_mute:1; /* master mute over all */
208 unsigned int keep_vref_in_automute:1; /* Don't clear VREF in automute */
209 unsigned int line_in_auto_switch:1; /* allow line-in auto switch */
210 unsigned int auto_mute_via_amp:1; /* auto-mute via amp instead of pinctl */
213 unsigned int suppress_auto_mute:1; /* suppress input jack auto mute */
214 unsigned int suppress_auto_mic:1; /* suppress input jack auto switch */
217 unsigned int need_dac_fix:1; /* need to limit DACs for multi channels */
218 unsigned int hp_mic:1; /* Allow HP as a mic-in */
219 unsigned int suppress_hp_mic_detect:1; /* Don't detect HP/mic */
220 unsigned int no_primary_hp:1; /* Don't prefer HP pins to speaker pins */
221 unsigned int no_multi_io:1; /* Don't try multi I/O config */
222 unsigned int multi_cap_vol:1; /* allow multiple capture xxx volumes */
223 unsigned int inv_dmic_split:1; /* inverted dmic w/a for conexant */
224 unsigned int own_eapd_ctl:1; /* set EAPD by own function */
225 unsigned int keep_eapd_on:1; /* don't turn off EAPD automatically */
226 unsigned int vmaster_mute_led:1; /* add SPK-LED flag to vmaster mute switch */
227 unsigned int mic_mute_led:1; /* add MIC-LED flag to capture mute switch */
228 unsigned int indep_hp:1; /* independent HP supported */
229 unsigned int prefer_hp_amp:1; /* enable HP amp for speaker if any */
231 unsigned int add_jack_modes:1; /* add i/o jack mode enum ctls */
232 unsigned int power_down_unused:1; /* power down unused widgets */
233 unsigned int dac_min_mute:1; /* minimal = mute for DACs */
234 unsigned int suppress_vmaster:1; /* don't create vmaster kctls */
237 unsigned int no_analog:1; /* digital I/O only */
238 unsigned int dyn_adc_switch:1; /* switch ADCs (for ALC275) */
239 unsigned int indep_hp_enabled:1; /* independent HP enabled */
240 unsigned int have_aamix_ctl:1;
241 unsigned int hp_mic_jack_modes:1;
242 unsigned int skip_verbs:1; /* don't apply verbs at snd_hda_gen_init() */
244 /* additional mute flags (only effective with auto_mute_via_amp=1) */
271 /* multi-io */
276 void (*init_hook)(struct hda_codec *codec);
277 void (*automute_hook)(struct hda_codec *codec);
278 void (*cap_sync_hook)(struct hda_codec *codec,
284 struct hda_codec *codec,
288 struct hda_codec *codec,
293 void (*hp_automute_hook)(struct hda_codec *codec,
295 void (*line_automute_hook)(struct hda_codec *codec,
297 void (*mic_autoswitch_hook)(struct hda_codec *codec,
308 HDA_HINT_STEREO_MIX_AUTO, /* Add only if auto-mic is disabled */
313 int snd_hda_gen_init(struct hda_codec *codec);
314 void snd_hda_gen_free(struct hda_codec *codec);
316 int snd_hda_get_path_idx(struct hda_codec *codec, struct nid_path *path);
317 struct nid_path *snd_hda_get_path_from_idx(struct hda_codec *codec, int idx);
319 snd_hda_add_new_path(struct hda_codec *codec, hda_nid_t from_nid,
321 void snd_hda_activate_path(struct hda_codec *codec, struct nid_path *path,
328 int snd_hda_gen_parse_auto_config(struct hda_codec *codec,
330 int snd_hda_gen_build_controls(struct hda_codec *codec);
331 int snd_hda_gen_build_pcms(struct hda_codec *codec);
334 void snd_hda_gen_hp_automute(struct hda_codec *codec,
336 void snd_hda_gen_line_automute(struct hda_codec *codec,
338 void snd_hda_gen_mic_autoswitch(struct hda_codec *codec,
340 void snd_hda_gen_update_outputs(struct hda_codec *codec);
342 int snd_hda_gen_check_power_status(struct hda_codec *codec, hda_nid_t nid);
343 unsigned int snd_hda_gen_path_power_filter(struct hda_codec *codec,
346 void snd_hda_gen_stream_pm(struct hda_codec *codec, hda_nid_t nid, bool on);
347 int snd_hda_gen_fix_pin_power(struct hda_codec *codec, hda_nid_t pin);
349 int snd_hda_gen_add_mute_led_cdev(struct hda_codec *codec,
352 int snd_hda_gen_add_micmute_led_cdev(struct hda_codec *codec,
355 bool snd_hda_gen_shutup_speakers(struct hda_codec *codec);