[alsa-devel] [PATCH] ASoC mc13783 codec: correct names

Lambrecht Jürgen J.Lambrecht at TELEVIC.com
Fri Nov 29 11:28:07 CET 2013


Correct names to reality and for consistency:
 - "Speaker Amp Switch"->"Speaker Amp"
 - "Earpiece Amp Switch"->"Speaker Amp Switch"
 - "Loudspeaker enable"->"Loudspeaker Amp Switch"
 - "..Capture.."->"..Playback" (Line in..., CODEC..., ...Mixin Switch)
 - move "PCM Capture Volume" to bottom with other Capture controls

Signed-off-by: Jürgen Lambrecht <J.Lambrecht at televic.com>
---
 sound/soc/codecs/mc13783.c |   25 +++++++++++++------------
 1 file changed, 13 insertions(+), 12 deletions(-)

diff --git a/sound/soc/codecs/mc13783.c b/sound/soc/codecs/mc13783.c
index 08fb022..878e3e5 100644
--- a/sound/soc/codecs/mc13783.c
+++ b/sound/soc/codecs/mc13783.c
@@ -534,7 +534,7 @@ static const struct snd_soc_dapm_widget mc13783_dapm_widgets[] = {
 
 	SND_SOC_DAPM_SWITCH("CDCOUT Switch", MC13783_AUDIO_RX0, 18, 0,
 			&cdcout_ctl),
-	SND_SOC_DAPM_SWITCH("Speaker Amp Switch", MC13783_AUDIO_RX0, 3, 0,
+	SND_SOC_DAPM_SWITCH("Speaker Amp", MC13783_AUDIO_RX0, 3, 0,
 			&samp_ctl),
 	SND_SOC_DAPM_SWITCH("Loudspeaker Amp", SND_SOC_NOPM, 0, 0, &lamp_ctl),
 	SND_SOC_DAPM_SWITCH("Headset Amp Left", MC13783_AUDIO_RX0, 10, 0,
@@ -590,7 +590,7 @@ static struct snd_soc_dapm_route mc13783_routes[] = {
 	{ "HSR", NULL, "Headset Amp Right"},
 	{ "RXOUTL", NULL, "Line out Amp Left"},
 	{ "RXOUTR", NULL, "Line out Amp Right"},
-	{ "SP", "Speaker Amp Switch", "Speaker Amp Source MUX"},
+	{ "SP", "Speaker Amp", "Speaker Amp Source MUX"},
 	{ "LSP", "Loudspeaker Amp", "Loudspeaker Amp Source MUX"},
 	{ "HSL", "Headset Amp Left", "Headset Amp Source MUX"},
 	{ "HSR", "Headset Amp Right", "Headset Amp Source MUX"},
@@ -609,26 +609,27 @@ static const struct soc_enum mc13783_enum_3d_mixer =
 			mc13783_3d_mixer);
 
 static struct snd_kcontrol_new mc13783_control_list[] = {
-	SOC_SINGLE("Loudspeaker enable", MC13783_AUDIO_RX0, 5, 1, 0),
 	SOC_SINGLE("PCM Playback Volume", MC13783_AUDIO_RX1, 6, 15, 0),
 	SOC_SINGLE("PCM Playback Switch", MC13783_AUDIO_RX1, 5, 1, 0),
-	SOC_DOUBLE("PCM Capture Volume", MC13783_AUDIO_TX, 19, 14, 31, 0),
 	SOC_ENUM("3D Control", mc13783_enum_3d_mixer),
 
 	SOC_SINGLE("CDCOUT Switch", MC13783_AUDIO_RX0, 18, 1, 0),
-	SOC_SINGLE("Earpiece Amp Switch", MC13783_AUDIO_RX0, 3, 1, 0),
+	SOC_SINGLE("Speaker Amp Switch", MC13783_AUDIO_RX0, 3, 1, 0),
+	SOC_SINGLE("Loudspeaker Amp Switch", MC13783_AUDIO_RX0, 5, 1, 0),
 	SOC_DOUBLE("Headset Amp Switch", MC13783_AUDIO_RX0, 10, 9, 1, 0),
 	SOC_DOUBLE("Line out Amp Switch", MC13783_AUDIO_RX0, 16, 15, 1, 0),
 
-	SOC_SINGLE("CODEC Capture Mixin Switch", MC13783_AUDIO_RX0, 21, 1, 0),
-	SOC_SINGLE("PCM Capture Mixin Switch", MC13783_AUDIO_RX0, 22, 1, 0),
-	SOC_SINGLE("Line in Capture Mixin Switch", MC13783_AUDIO_RX0, 23, 1, 0),
+	SOC_SINGLE("CODEC Playback Mixin Switch", MC13783_AUDIO_RX0, 21, 1, 0),
+	SOC_SINGLE("PCM Playback Mixin Switch", MC13783_AUDIO_RX0, 22, 1, 0),
+	SOC_SINGLE("Line in Playback Mixin Switch", MC13783_AUDIO_RX0, 23, 1, 0),
+
+	SOC_SINGLE("CODEC Playback Volume", MC13783_AUDIO_RX1, 1, 15, 0),
+	SOC_SINGLE("CODEC Playback Switch", MC13783_AUDIO_RX1, 0, 1, 0),
 
-	SOC_SINGLE("CODEC Capture Volume", MC13783_AUDIO_RX1, 1, 15, 0),
-	SOC_SINGLE("CODEC Capture Switch", MC13783_AUDIO_RX1, 0, 1, 0),
+	SOC_SINGLE("Line in Playback Volume", MC13783_AUDIO_RX1, 12, 15, 0),
+	SOC_SINGLE("Line in Playback Switch", MC13783_AUDIO_RX1, 10, 1, 0),
 
-	SOC_SINGLE("Line in Capture Volume", MC13783_AUDIO_RX1, 12, 15, 0),
-	SOC_SINGLE("Line in Capture Switch", MC13783_AUDIO_RX1, 10, 1, 0),
+	SOC_DOUBLE("PCM Capture Volume", MC13783_AUDIO_TX, 19, 14, 31, 0),
 
 	SOC_SINGLE("MC1 Capture Bias Switch", MC13783_AUDIO_TX, 0, 1, 0),
 	SOC_SINGLE("MC2 Capture Bias Switch", MC13783_AUDIO_TX, 1, 1, 0),
-- 
1.7.10.4


More information about the Alsa-devel mailing list