Skip to content

Commit 9ab0cb3

Browse files
committed
ALSA: Replace the word "slave" in vmaster API
Follow the recent inclusive terminology guidelines and replace the word "slave" in vmaster API. I chose the word "follower" at this time since it seems fitting for the purpose. Note that the word "master" is kept in API, since it refers rather to audio master volume control. Also, while we're at it, a typo in comments is corrected, too. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Takashi Iwai <[email protected]>
1 parent 6779ec1 commit 9ab0cb3

File tree

15 files changed

+269
-267
lines changed

15 files changed

+269
-267
lines changed

include/sound/control.h

Lines changed: 23 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -188,20 +188,21 @@ int snd_ctl_enum_info(struct snd_ctl_elem_info *info, unsigned int channels,
188188
*/
189189
struct snd_kcontrol *snd_ctl_make_virtual_master(char *name,
190190
const unsigned int *tlv);
191-
int _snd_ctl_add_slave(struct snd_kcontrol *master, struct snd_kcontrol *slave,
192-
unsigned int flags);
193-
/* optional flags for slave */
194-
#define SND_CTL_SLAVE_NEED_UPDATE (1 << 0)
191+
int _snd_ctl_add_follower(struct snd_kcontrol *master,
192+
struct snd_kcontrol *follower,
193+
unsigned int flags);
194+
/* optional flags for follower */
195+
#define SND_CTL_FOLLOWER_NEED_UPDATE (1 << 0)
195196

196197
/**
197-
* snd_ctl_add_slave - Add a virtual slave control
198+
* snd_ctl_add_follower - Add a virtual follower control
198199
* @master: vmaster element
199-
* @slave: slave element to add
200+
* @follower: follower element to add
200201
*
201-
* Add a virtual slave control to the given master element created via
202+
* Add a virtual follower control to the given master element created via
202203
* snd_ctl_create_virtual_master() beforehand.
203204
*
204-
* All slaves must be the same type (returning the same information
205+
* All followers must be the same type (returning the same information
205206
* via info callback). The function doesn't check it, so it's your
206207
* responsibility.
207208
*
@@ -213,18 +214,18 @@ int _snd_ctl_add_slave(struct snd_kcontrol *master, struct snd_kcontrol *slave,
213214
* Return: Zero if successful or a negative error code.
214215
*/
215216
static inline int
216-
snd_ctl_add_slave(struct snd_kcontrol *master, struct snd_kcontrol *slave)
217+
snd_ctl_add_follower(struct snd_kcontrol *master, struct snd_kcontrol *follower)
217218
{
218-
return _snd_ctl_add_slave(master, slave, 0);
219+
return _snd_ctl_add_follower(master, follower, 0);
219220
}
220221

221222
/**
222-
* snd_ctl_add_slave_uncached - Add a virtual slave control
223+
* snd_ctl_add_follower_uncached - Add a virtual follower control
223224
* @master: vmaster element
224-
* @slave: slave element to add
225+
* @follower: follower element to add
225226
*
226-
* Add a virtual slave control to the given master.
227-
* Unlike snd_ctl_add_slave(), the element added via this function
227+
* Add a virtual follower control to the given master.
228+
* Unlike snd_ctl_add_follower(), the element added via this function
228229
* is supposed to have volatile values, and get callback is called
229230
* at each time queried from the master.
230231
*
@@ -235,22 +236,22 @@ snd_ctl_add_slave(struct snd_kcontrol *master, struct snd_kcontrol *slave)
235236
* Return: Zero if successful or a negative error code.
236237
*/
237238
static inline int
238-
snd_ctl_add_slave_uncached(struct snd_kcontrol *master,
239-
struct snd_kcontrol *slave)
239+
snd_ctl_add_follower_uncached(struct snd_kcontrol *master,
240+
struct snd_kcontrol *follower)
240241
{
241-
return _snd_ctl_add_slave(master, slave, SND_CTL_SLAVE_NEED_UPDATE);
242+
return _snd_ctl_add_follower(master, follower, SND_CTL_FOLLOWER_NEED_UPDATE);
242243
}
243244

244245
int snd_ctl_add_vmaster_hook(struct snd_kcontrol *kctl,
245246
void (*hook)(void *private_data, int),
246247
void *private_data);
247248
void snd_ctl_sync_vmaster(struct snd_kcontrol *kctl, bool hook_only);
248249
#define snd_ctl_sync_vmaster_hook(kctl) snd_ctl_sync_vmaster(kctl, true)
249-
int snd_ctl_apply_vmaster_slaves(struct snd_kcontrol *kctl,
250-
int (*func)(struct snd_kcontrol *vslave,
251-
struct snd_kcontrol *slave,
252-
void *arg),
253-
void *arg);
250+
int snd_ctl_apply_vmaster_followers(struct snd_kcontrol *kctl,
251+
int (*func)(struct snd_kcontrol *vfollower,
252+
struct snd_kcontrol *follower,
253+
void *arg),
254+
void *arg);
254255

255256
/*
256257
* Helper functions for jack-detection controls

include/sound/hda_codec.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ struct hda_codec {
208208
struct mutex control_mutex;
209209
struct snd_array spdif_out;
210210
unsigned int spdif_in_enable; /* SPDIF input enable? */
211-
const hda_nid_t *slave_dig_outs; /* optional digital out slave widgets */
211+
const hda_nid_t *follower_dig_outs; /* optional digital out follower widgets */
212212
struct snd_array init_pins; /* initial (BIOS) pin configurations */
213213
struct snd_array driver_pins; /* pin configs set by codec parser */
214214
struct snd_array cvt_setups; /* audio convert setups */

0 commit comments

Comments
 (0)