hc
2024-02-20 102a0743326a03cd1a1202ceda21e175b7d3575c
kernel/sound/pci/hda/hda_local.h
....@@ -1,23 +1,10 @@
1
+/* SPDX-License-Identifier: GPL-2.0-or-later */
12 /*
23 * Universal Interface for Intel High Definition Audio Codec
34 *
45 * Local helper functions
56 *
67 * Copyright (c) 2004 Takashi Iwai <tiwai@suse.de>
7
- *
8
- * This program is free software; you can redistribute it and/or modify it
9
- * under the terms of the GNU General Public License as published by the Free
10
- * Software Foundation; either version 2 of the License, or (at your option)
11
- * any later version.
12
- *
13
- * This program is distributed in the hope that it will be useful, but WITHOUT
14
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
15
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
16
- * more details.
17
- *
18
- * You should have received a copy of the GNU General Public License along with
19
- * this program; if not, write to the Free Software Foundation, Inc., 59
20
- * Temple Place - Suite 330, Boston, MA 02111-1307, USA.
218 */
229
2310 #ifndef __SOUND_HDA_LOCAL_H
....@@ -113,7 +100,7 @@
113100 int snd_hda_mixer_amp_volume_put(struct snd_kcontrol *kcontrol,
114101 struct snd_ctl_elem_value *ucontrol);
115102 int snd_hda_mixer_amp_tlv(struct snd_kcontrol *kcontrol, int op_flag,
116
- unsigned int size, unsigned int __user *tlv);
103
+ unsigned int size, unsigned int __user *_tlv);
117104 int snd_hda_mixer_amp_switch_info(struct snd_kcontrol *kcontrol,
118105 struct snd_ctl_elem_info *uinfo);
119106 int snd_hda_mixer_amp_switch_get(struct snd_kcontrol *kcontrol,
....@@ -132,7 +119,7 @@
132119 int snd_hda_codec_amp_update(struct hda_codec *codec, hda_nid_t nid,
133120 int ch, int dir, int idx, int mask, int val);
134121 int snd_hda_codec_amp_stereo(struct hda_codec *codec, hda_nid_t nid,
135
- int dir, int idx, int mask, int val);
122
+ int direction, int idx, int mask, int val);
136123 int snd_hda_codec_amp_init(struct hda_codec *codec, hda_nid_t nid, int ch,
137124 int direction, int idx, int mask, int val);
138125 int snd_hda_codec_amp_init_stereo(struct hda_codec *codec, hda_nid_t nid,
....@@ -142,14 +129,16 @@
142129 struct snd_kcontrol *snd_hda_find_mixer_ctl(struct hda_codec *codec,
143130 const char *name);
144131 int __snd_hda_add_vmaster(struct hda_codec *codec, char *name,
145
- unsigned int *tlv, const char * const *slaves,
146
- const char *suffix, bool init_slave_vol,
132
+ unsigned int *tlv, const char * const *followers,
133
+ const char *suffix, bool init_follower_vol,
147134 struct snd_kcontrol **ctl_ret);
148
-#define snd_hda_add_vmaster(codec, name, tlv, slaves, suffix) \
149
- __snd_hda_add_vmaster(codec, name, tlv, slaves, suffix, true, NULL)
135
+#define snd_hda_add_vmaster(codec, name, tlv, followers, suffix) \
136
+ __snd_hda_add_vmaster(codec, name, tlv, followers, suffix, true, NULL)
150137 int snd_hda_codec_reset(struct hda_codec *codec);
151138 void snd_hda_codec_register(struct hda_codec *codec);
152139 void snd_hda_codec_cleanup_for_unbind(struct hda_codec *codec);
140
+
141
+#define snd_hda_regmap_sync(codec) snd_hdac_regmap_sync(&(codec)->core)
153142
154143 enum {
155144 HDA_VMUTE_OFF,
....@@ -209,7 +198,7 @@
209198 unsigned int *cur_val);
210199 int snd_hda_add_imux_item(struct hda_codec *codec,
211200 struct hda_input_mux *imux, const char *label,
212
- int index, int *type_index_ret);
201
+ int index, int *type_idx);
213202
214203 /*
215204 * Multi-channel / digital-out PCM helper
....@@ -227,7 +216,7 @@
227216 hda_nid_t hp_out_nid[HDA_MAX_OUTS]; /* DACs for multiple HPs */
228217 hda_nid_t extra_out_nid[HDA_MAX_OUTS]; /* other (e.g. speaker) DACs */
229218 hda_nid_t dig_out_nid; /* digital out audio widget */
230
- const hda_nid_t *slave_dig_outs;
219
+ const hda_nid_t *follower_dig_outs;
231220 int max_channels; /* currently supported analog channels */
232221 int dig_out_used; /* current usage of digital out (HDA_DIG_XXX) */
233222 int no_share_stream; /* don't share a stream with multiple pins */
....@@ -368,13 +357,15 @@
368357 void snd_hda_apply_pincfgs(struct hda_codec *codec,
369358 const struct hda_pintbl *cfg);
370359 void snd_hda_apply_fixup(struct hda_codec *codec, int action);
360
+void __snd_hda_apply_fixup(struct hda_codec *codec, int id, int action, int depth);
371361 void snd_hda_pick_fixup(struct hda_codec *codec,
372362 const struct hda_model_fixup *models,
373363 const struct snd_pci_quirk *quirk,
374364 const struct hda_fixup *fixlist);
375365 void snd_hda_pick_pin_fixup(struct hda_codec *codec,
376366 const struct snd_hda_pin_quirk *pin_quirk,
377
- const struct hda_fixup *fixlist);
367
+ const struct hda_fixup *fixlist,
368
+ bool match_all_pins);
378369
379370 /* helper macros to retrieve pin default-config values */
380371 #define get_defcfg_connect(cfg) \
....@@ -652,7 +643,7 @@
652643 */
653644 int snd_hda_enum_helper_info(struct snd_kcontrol *kcontrol,
654645 struct snd_ctl_elem_info *uinfo,
655
- int num_entries, const char * const *texts);
646
+ int num_items, const char * const *texts);
656647 #define snd_hda_enum_bool_helper_info(kcontrol, uinfo) \
657648 snd_hda_enum_helper_info(kcontrol, uinfo, 0, NULL)
658649