mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-14 06:35:12 +00:00
ALSA: hda - Use a helper function for renaming kctl names
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
parent
7beb3a6e93
commit
56798e6b3a
1 changed files with 4 additions and 7 deletions
|
@ -4724,7 +4724,6 @@ static void alc282_fixup_asus_tx300(struct hda_codec *codec,
|
||||||
{ 0x1b, 0x21114000 }, /* dock speaker pin */
|
{ 0x1b, 0x21114000 }, /* dock speaker pin */
|
||||||
{}
|
{}
|
||||||
};
|
};
|
||||||
struct snd_kcontrol *kctl;
|
|
||||||
|
|
||||||
switch (action) {
|
switch (action) {
|
||||||
case HDA_FIXUP_ACT_PRE_PROBE:
|
case HDA_FIXUP_ACT_PRE_PROBE:
|
||||||
|
@ -4739,12 +4738,10 @@ static void alc282_fixup_asus_tx300(struct hda_codec *codec,
|
||||||
/* this is a bit tricky; give more sane names for the main
|
/* this is a bit tricky; give more sane names for the main
|
||||||
* (tablet) speaker and the dock speaker, respectively
|
* (tablet) speaker and the dock speaker, respectively
|
||||||
*/
|
*/
|
||||||
kctl = snd_hda_find_mixer_ctl(codec, "Speaker Playback Switch");
|
rename_ctl(codec, "Speaker Playback Switch",
|
||||||
if (kctl)
|
"Dock Speaker Playback Switch");
|
||||||
strcpy(kctl->id.name, "Dock Speaker Playback Switch");
|
rename_ctl(codec, "Bass Speaker Playback Switch",
|
||||||
kctl = snd_hda_find_mixer_ctl(codec, "Bass Speaker Playback Switch");
|
"Speaker Playback Switch");
|
||||||
if (kctl)
|
|
||||||
strcpy(kctl->id.name, "Speaker Playback Switch");
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue