diff options
Diffstat (limited to 'sound/pci/hda')
-rw-r--r-- | sound/pci/hda/hda_codec.c | 96 | ||||
-rw-r--r-- | sound/pci/hda/hda_generic.c | 20 | ||||
-rw-r--r-- | sound/pci/hda/hda_generic.h | 2 | ||||
-rw-r--r-- | sound/pci/hda/hda_local.h | 10 | ||||
-rw-r--r-- | sound/pci/hda/patch_ca0132.c | 10 | ||||
-rw-r--r-- | sound/pci/hda/patch_sigmatel.c | 2 |
6 files changed, 70 insertions, 70 deletions
diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c index 7e3ae4534df9..40f3c175954d 100644 --- a/sound/pci/hda/hda_codec.c +++ b/sound/pci/hda/hda_codec.c @@ -785,7 +785,7 @@ void snd_hda_codec_cleanup_for_unbind(struct hda_codec *codec) snd_array_free(&codec->spdif_out); snd_array_free(&codec->verbs); codec->preset = NULL; - codec->slave_dig_outs = NULL; + codec->follower_dig_outs = NULL; codec->spdif_status_reset = 0; snd_array_free(&codec->mixers); snd_array_free(&codec->nids); @@ -1806,11 +1806,11 @@ int snd_hda_codec_reset(struct hda_codec *codec) return 0; } -typedef int (*map_slave_func_t)(struct hda_codec *, void *, struct snd_kcontrol *); +typedef int (*map_follower_func_t)(struct hda_codec *, void *, struct snd_kcontrol *); -/* apply the function to all matching slave ctls in the mixer list */ -static int map_slaves(struct hda_codec *codec, const char * const *slaves, - const char *suffix, map_slave_func_t func, void *data) +/* apply the function to all matching follower ctls in the mixer list */ +static int map_followers(struct hda_codec *codec, const char * const *followers, + const char *suffix, map_follower_func_t func, void *data) { struct hda_nid_item *items; const char * const *s; @@ -1821,7 +1821,7 @@ static int map_slaves(struct hda_codec *codec, const char * const *slaves, struct snd_kcontrol *sctl = items[i].kctl; if (!sctl || sctl->id.iface != SNDRV_CTL_ELEM_IFACE_MIXER) continue; - for (s = slaves; *s; s++) { + for (s = followers; *s; s++) { char tmpname[sizeof(sctl->id.name)]; const char *name = *s; if (suffix) { @@ -1840,8 +1840,8 @@ static int map_slaves(struct hda_codec *codec, const char * const *slaves, return 0; } -static int check_slave_present(struct hda_codec *codec, - void *data, struct snd_kcontrol *sctl) +static int check_follower_present(struct hda_codec *codec, + void *data, struct snd_kcontrol *sctl) { return 1; } @@ -1860,17 +1860,17 @@ static int put_kctl_with_value(struct snd_kcontrol *kctl, int val) return 0; } -struct slave_init_arg { +struct follower_init_arg { struct hda_codec *codec; int step; }; -/* initialize the slave volume with 0dB via snd_ctl_apply_vmaster_slaves() */ -static int init_slave_0dB(struct snd_kcontrol *slave, - struct snd_kcontrol *kctl, - void *_arg) +/* initialize the follower volume with 0dB via snd_ctl_apply_vmaster_followers() */ +static int init_follower_0dB(struct snd_kcontrol *follower, + struct snd_kcontrol *kctl, + void *_arg) { - struct slave_init_arg *arg = _arg; + struct follower_init_arg *arg = _arg; int _tlv[4]; const int *tlv = NULL; int step; @@ -1879,7 +1879,7 @@ static int init_slave_0dB(struct snd_kcontrol *slave, if (kctl->vd[0].access & SNDRV_CTL_ELEM_ACCESS_TLV_CALLBACK) { if (kctl->tlv.c != snd_hda_mixer_amp_tlv) { codec_err(arg->codec, - "Unexpected TLV callback for slave %s:%d\n", + "Unexpected TLV callback for follower %s:%d\n", kctl->id.name, kctl->id.index); return 0; /* ignore */ } @@ -1897,7 +1897,7 @@ static int init_slave_0dB(struct snd_kcontrol *slave, return 0; if (arg->step && arg->step != step) { codec_err(arg->codec, - "Mismatching dB step for vmaster slave (%d!=%d)\n", + "Mismatching dB step for vmaster follower (%d!=%d)\n", arg->step, step); return 0; } @@ -1905,49 +1905,49 @@ static int init_slave_0dB(struct snd_kcontrol *slave, arg->step = step; val = -tlv[SNDRV_CTL_TLVO_DB_SCALE_MIN] / step; if (val > 0) { - put_kctl_with_value(slave, val); + put_kctl_with_value(follower, val); return val; } return 0; } -/* unmute the slave via snd_ctl_apply_vmaster_slaves() */ -static int init_slave_unmute(struct snd_kcontrol *slave, - struct snd_kcontrol *kctl, - void *_arg) +/* unmute the follower via snd_ctl_apply_vmaster_followers() */ +static int init_follower_unmute(struct snd_kcontrol *follower, + struct snd_kcontrol *kctl, + void *_arg) { - return put_kctl_with_value(slave, 1); + return put_kctl_with_value(follower, 1); } -static int add_slave(struct hda_codec *codec, - void *data, struct snd_kcontrol *slave) +static int add_follower(struct hda_codec *codec, + void *data, struct snd_kcontrol *follower) { - return snd_ctl_add_slave(data, slave); + return snd_ctl_add_follower(data, follower); } /** - * __snd_hda_add_vmaster - create a virtual master control and add slaves + * __snd_hda_add_vmaster - create a virtual master control and add followers * @codec: HD-audio codec * @name: vmaster control name * @tlv: TLV data (optional) - * @slaves: slave control names (optional) - * @suffix: suffix string to each slave name (optional) - * @init_slave_vol: initialize slaves to unmute/0dB + * @followers: follower control names (optional) + * @suffix: suffix string to each follower name (optional) + * @init_follower_vol: initialize followers to unmute/0dB * @ctl_ret: store the vmaster kcontrol in return * * Create a virtual master control with the given name. The TLV data * must be either NULL or a valid data. * - * @slaves is a NULL-terminated array of strings, each of which is a - * slave control name. All controls with these names are assigned to + * @followers is a NULL-terminated array of strings, each of which is a + * follower control name. All controls with these names are assigned to * the new virtual master control. * * This function returns zero if successful or a negative error code. */ int __snd_hda_add_vmaster(struct hda_codec *codec, char *name, - unsigned int *tlv, const char * const *slaves, - const char *suffix, bool init_slave_vol, + unsigned int *tlv, const char * const *followers, + const char *suffix, bool init_follower_vol, struct snd_kcontrol **ctl_ret) { struct snd_kcontrol *kctl; @@ -1956,9 +1956,9 @@ int __snd_hda_add_vmaster(struct hda_codec *codec, char *name, if (ctl_ret) *ctl_ret = NULL; - err = map_slaves(codec, slaves, suffix, check_slave_present, NULL); + err = map_followers(codec, followers, suffix, check_follower_present, NULL); if (err != 1) { - codec_dbg(codec, "No slave found for %s\n", name); + codec_dbg(codec, "No follower found for %s\n", name); return 0; } kctl = snd_ctl_make_virtual_master(name, tlv); @@ -1968,20 +1968,20 @@ int __snd_hda_add_vmaster(struct hda_codec *codec, char *name, if (err < 0) return err; - err = map_slaves(codec, slaves, suffix, add_slave, kctl); + err = map_followers(codec, followers, suffix, add_follower, kctl); if (err < 0) return err; /* init with master mute & zero volume */ put_kctl_with_value(kctl, 0); - if (init_slave_vol) { - struct slave_init_arg arg = { + if (init_follower_vol) { + struct follower_init_arg arg = { .codec = codec, .step = 0, }; - snd_ctl_apply_vmaster_slaves(kctl, - tlv ? init_slave_0dB : init_slave_unmute, - &arg); + snd_ctl_apply_vmaster_followers(kctl, + tlv ? init_follower_0dB : init_follower_unmute, + &arg); } if (ctl_ret) @@ -2284,7 +2284,7 @@ static unsigned int convert_to_spdif_status(unsigned short val) return sbits; } -/* set digital convert verbs both for the given NID and its slaves */ +/* set digital convert verbs both for the given NID and its followers */ static void set_dig_out(struct hda_codec *codec, hda_nid_t nid, int mask, int val) { @@ -2292,7 +2292,7 @@ static void set_dig_out(struct hda_codec *codec, hda_nid_t nid, snd_hdac_regmap_update(&codec->core, nid, AC_VERB_SET_DIGI_CONVERT_1, mask, val); - d = codec->slave_dig_outs; + d = codec->follower_dig_outs; if (!d) return; for (; *d; d++) @@ -3580,9 +3580,9 @@ static void setup_dig_out_stream(struct hda_codec *codec, hda_nid_t nid, spdif->ctls & ~AC_DIG1_ENABLE & 0xff, -1); snd_hda_codec_setup_stream(codec, nid, stream_tag, 0, format); - if (codec->slave_dig_outs) { + if (codec->follower_dig_outs) { const hda_nid_t *d; - for (d = codec->slave_dig_outs; *d; d++) + for (d = codec->follower_dig_outs; *d; d++) snd_hda_codec_setup_stream(codec, *d, stream_tag, 0, format); } @@ -3595,9 +3595,9 @@ static void setup_dig_out_stream(struct hda_codec *codec, hda_nid_t nid, static void cleanup_dig_out_stream(struct hda_codec *codec, hda_nid_t nid) { snd_hda_codec_cleanup_stream(codec, nid); - if (codec->slave_dig_outs) { + if (codec->follower_dig_outs) { const hda_nid_t *d; - for (d = codec->slave_dig_outs; *d; d++) + for (d = codec->follower_dig_outs; *d; d++) snd_hda_codec_cleanup_stream(codec, *d); } } @@ -3679,7 +3679,7 @@ EXPORT_SYMBOL_GPL(snd_hda_multi_out_dig_close); * @hinfo: PCM information to assign * * Open analog outputs and set up the hw-constraints. - * If the digital outputs can be opened as slave, open the digital + * If the digital outputs can be opened as follower, open the digital * outputs, too. */ int snd_hda_multi_out_analog_open(struct hda_codec *codec, diff --git a/sound/pci/hda/hda_generic.c b/sound/pci/hda/hda_generic.c index 9074265d934a..d07947a73ac2 100644 --- a/sound/pci/hda/hda_generic.c +++ b/sound/pci/hda/hda_generic.c @@ -4112,7 +4112,7 @@ static void parse_digital(struct hda_codec *codec) int i, nums; hda_nid_t dig_nid, pin; - /* support multiple SPDIFs; the secondary is set up as a slave */ + /* support multiple SPDIFs; the secondary is set up as a follower */ nums = 0; for (i = 0; i < spec->autocfg.dig_outs; i++) { pin = spec->autocfg.dig_out_pins[i]; @@ -4131,10 +4131,10 @@ static void parse_digital(struct hda_codec *codec) spec->multiout.dig_out_nid = dig_nid; spec->dig_out_type = spec->autocfg.dig_out_type[0]; } else { - spec->multiout.slave_dig_outs = spec->slave_dig_outs; - if (nums >= ARRAY_SIZE(spec->slave_dig_outs) - 1) + spec->multiout.follower_dig_outs = spec->follower_dig_outs; + if (nums >= ARRAY_SIZE(spec->follower_dig_outs) - 1) break; - spec->slave_dig_outs[nums - 1] = dig_nid; + spec->follower_dig_outs[nums - 1] = dig_nid; } nums++; } @@ -4589,7 +4589,7 @@ static void call_update_outputs(struct hda_codec *codec) else snd_hda_gen_update_outputs(codec); - /* sync the whole vmaster slaves to reflect the new auto-mute status */ + /* sync the whole vmaster followers to reflect the new auto-mute status */ if (spec->auto_mute_via_amp && !codec->bus->shutdown) snd_ctl_sync_vmaster(spec->vmaster_mute.sw_kctl, false); } @@ -5233,8 +5233,8 @@ EXPORT_SYMBOL_GPL(snd_hda_gen_parse_auto_config); * Build control elements */ -/* slave controls for virtual master */ -static const char * const slave_pfxs[] = { +/* follower controls for virtual master */ +static const char * const follower_pfxs[] = { "Front", "Surround", "Center", "LFE", "Side", "Headphone", "Speaker", "Mono", "Line Out", "CLFE", "Bass Speaker", "PCM", @@ -5286,7 +5286,7 @@ int snd_hda_gen_build_controls(struct hda_codec *codec) if (!spec->no_analog && !spec->suppress_vmaster && !snd_hda_find_mixer_ctl(codec, "Master Playback Volume")) { err = snd_hda_add_vmaster(codec, "Master Playback Volume", - spec->vmaster_tlv, slave_pfxs, + spec->vmaster_tlv, follower_pfxs, "Playback Volume"); if (err < 0) return err; @@ -5294,7 +5294,7 @@ int snd_hda_gen_build_controls(struct hda_codec *codec) if (!spec->no_analog && !spec->suppress_vmaster && !snd_hda_find_mixer_ctl(codec, "Master Playback Switch")) { err = __snd_hda_add_vmaster(codec, "Master Playback Switch", - NULL, slave_pfxs, + NULL, follower_pfxs, "Playback Switch", true, &spec->vmaster_mute.sw_kctl); if (err < 0) @@ -5809,7 +5809,7 @@ int snd_hda_gen_build_pcms(struct hda_codec *codec) spec->stream_name_digital); if (!info) return -ENOMEM; - codec->slave_dig_outs = spec->multiout.slave_dig_outs; + codec->follower_dig_outs = spec->multiout.follower_dig_outs; spec->pcm_rec[1] = info; if (spec->dig_out_type) info->pcm_type = spec->dig_out_type; diff --git a/sound/pci/hda/hda_generic.h b/sound/pci/hda/hda_generic.h index bbd6d2b741f2..a43f0bb77dae 100644 --- a/sound/pci/hda/hda_generic.h +++ b/sound/pci/hda/hda_generic.h @@ -116,7 +116,7 @@ struct hda_gen_spec { * dig_out_nid and hp_nid are optional */ hda_nid_t alt_dac_nid; - hda_nid_t slave_dig_outs[3]; /* optional - for auto-parsing */ + hda_nid_t follower_dig_outs[3]; /* optional - for auto-parsing */ int dig_out_type; /* capture */ diff --git a/sound/pci/hda/hda_local.h b/sound/pci/hda/hda_local.h index 3dca65d79b02..8c28b1022f49 100644 --- a/sound/pci/hda/hda_local.h +++ b/sound/pci/hda/hda_local.h @@ -129,11 +129,11 @@ void snd_hda_set_vmaster_tlv(struct hda_codec *codec, hda_nid_t nid, int dir, struct snd_kcontrol *snd_hda_find_mixer_ctl(struct hda_codec *codec, const char *name); int __snd_hda_add_vmaster(struct hda_codec *codec, char *name, - unsigned int *tlv, const char * const *slaves, - const char *suffix, bool init_slave_vol, + unsigned int *tlv, const char * const *followers, + const char *suffix, bool init_follower_vol, struct snd_kcontrol **ctl_ret); -#define snd_hda_add_vmaster(codec, name, tlv, slaves, suffix) \ - __snd_hda_add_vmaster(codec, name, tlv, slaves, suffix, true, NULL) +#define snd_hda_add_vmaster(codec, name, tlv, followers, suffix) \ + __snd_hda_add_vmaster(codec, name, tlv, followers, suffix, true, NULL) int snd_hda_codec_reset(struct hda_codec *codec); void snd_hda_codec_register(struct hda_codec *codec); void snd_hda_codec_cleanup_for_unbind(struct hda_codec *codec); @@ -216,7 +216,7 @@ struct hda_multi_out { hda_nid_t hp_out_nid[HDA_MAX_OUTS]; /* DACs for multiple HPs */ hda_nid_t extra_out_nid[HDA_MAX_OUTS]; /* other (e.g. speaker) DACs */ hda_nid_t dig_out_nid; /* digital out audio widget */ - const hda_nid_t *slave_dig_outs; + const hda_nid_t *follower_dig_outs; int max_channels; /* currently supported analog channels */ int dig_out_used; /* current usage of digital out (HDA_DIG_XXX) */ int no_share_stream; /* don't share a stream with multiple pins */ diff --git a/sound/pci/hda/patch_ca0132.c b/sound/pci/hda/patch_ca0132.c index 34fe753a46fb..19c575fd28a1 100644 --- a/sound/pci/hda/patch_ca0132.c +++ b/sound/pci/hda/patch_ca0132.c @@ -6245,10 +6245,10 @@ static int zxr_add_headphone_gain_switch(struct hda_codec *codec) } /* - * Need to create slave controls for the alternate codecs that have surround + * Need to create follower controls for the alternate codecs that have surround * capabilities. */ -static const char * const ca0132_alt_slave_pfxs[] = { +static const char * const ca0132_alt_follower_pfxs[] = { "Front", "Surround", "Center", "LFE", NULL, }; @@ -6376,15 +6376,15 @@ static int ca0132_build_controls(struct hda_codec *codec) if (err < 0) return err; } - /* Setup vmaster with surround slaves for desktop ca0132 devices */ + /* Setup vmaster with surround followers for desktop ca0132 devices */ if (ca0132_use_alt_functions(spec)) { snd_hda_set_vmaster_tlv(codec, spec->dacs[0], HDA_OUTPUT, spec->tlv); snd_hda_add_vmaster(codec, "Master Playback Volume", - spec->tlv, ca0132_alt_slave_pfxs, + spec->tlv, ca0132_alt_follower_pfxs, "Playback Volume"); err = __snd_hda_add_vmaster(codec, "Master Playback Switch", - NULL, ca0132_alt_slave_pfxs, + NULL, ca0132_alt_follower_pfxs, "Playback Switch", true, &spec->vmaster_mute.sw_kctl); if (err < 0) diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c index d8ed69cb9df1..7f5ed5805d3b 100644 --- a/sound/pci/hda/patch_sigmatel.c +++ b/sound/pci/hda/patch_sigmatel.c @@ -3135,7 +3135,7 @@ static void fixup_hp_headphone(struct hda_codec *codec, hda_nid_t pin) unsigned int pin_cfg = snd_hda_codec_get_pincfg(codec, pin); /* It was changed in the BIOS to just satisfy MS DTM. - * Lets turn it back into slaved HP + * Lets turn it back into follower HP */ pin_cfg = (pin_cfg & (~AC_DEFCFG_DEVICE)) | (AC_JACK_HP_OUT << AC_DEFCFG_DEVICE_SHIFT); |