[alsa-devel] [PATCH 088/102] ASoC: tas5086: Use SOC_ENUM_SINGLE_CONST()

Takashi Iwai tiwai at suse.de
Tue Feb 18 12:51:34 CET 2014


... for improving readability and maintainability.

Signed-off-by: Takashi Iwai <tiwai at suse.de>
---
 sound/soc/codecs/tas5086.c | 24 ++++++++++++------------
 1 file changed, 12 insertions(+), 12 deletions(-)

diff --git a/sound/soc/codecs/tas5086.c b/sound/soc/codecs/tas5086.c
index a895a5e4bdf2..15600aef08ee 100644
--- a/sound/soc/codecs/tas5086.c
+++ b/sound/soc/codecs/tas5086.c
@@ -555,12 +555,12 @@ static const char *tas5086_dapm_sdin_texts[] =
 };
 
 static const struct soc_enum tas5086_dapm_input_mux_enum[] = {
-	SOC_ENUM_SINGLE(TAS5086_INPUT_MUX, 20, 8, tas5086_dapm_sdin_texts),
-	SOC_ENUM_SINGLE(TAS5086_INPUT_MUX, 16, 8, tas5086_dapm_sdin_texts),
-	SOC_ENUM_SINGLE(TAS5086_INPUT_MUX, 12, 8, tas5086_dapm_sdin_texts),
-	SOC_ENUM_SINGLE(TAS5086_INPUT_MUX, 8,  8, tas5086_dapm_sdin_texts),
-	SOC_ENUM_SINGLE(TAS5086_INPUT_MUX, 4,  8, tas5086_dapm_sdin_texts),
-	SOC_ENUM_SINGLE(TAS5086_INPUT_MUX, 0,  8, tas5086_dapm_sdin_texts),
+	SOC_ENUM_SINGLE_CONST(TAS5086_INPUT_MUX, 20, tas5086_dapm_sdin_texts),
+	SOC_ENUM_SINGLE_CONST(TAS5086_INPUT_MUX, 16, tas5086_dapm_sdin_texts),
+	SOC_ENUM_SINGLE_CONST(TAS5086_INPUT_MUX, 12, tas5086_dapm_sdin_texts),
+	SOC_ENUM_SINGLE_CONST(TAS5086_INPUT_MUX, 8,  tas5086_dapm_sdin_texts),
+	SOC_ENUM_SINGLE_CONST(TAS5086_INPUT_MUX, 4,  tas5086_dapm_sdin_texts),
+	SOC_ENUM_SINGLE_CONST(TAS5086_INPUT_MUX, 0,  tas5086_dapm_sdin_texts),
 };
 
 static const struct snd_kcontrol_new tas5086_dapm_input_mux_controls[] = {
@@ -578,12 +578,12 @@ static const char *tas5086_dapm_channel_texts[] =
 	  "Channel 4 Mux", "Channel 5 Mux", "Channel 6 Mux" };
 
 static const struct soc_enum tas5086_dapm_output_mux_enum[] = {
-	SOC_ENUM_SINGLE(TAS5086_PWM_OUTPUT_MUX, 20, 6, tas5086_dapm_channel_texts),
-	SOC_ENUM_SINGLE(TAS5086_PWM_OUTPUT_MUX, 16, 6, tas5086_dapm_channel_texts),
-	SOC_ENUM_SINGLE(TAS5086_PWM_OUTPUT_MUX, 12, 6, tas5086_dapm_channel_texts),
-	SOC_ENUM_SINGLE(TAS5086_PWM_OUTPUT_MUX, 8,  6, tas5086_dapm_channel_texts),
-	SOC_ENUM_SINGLE(TAS5086_PWM_OUTPUT_MUX, 4,  6, tas5086_dapm_channel_texts),
-	SOC_ENUM_SINGLE(TAS5086_PWM_OUTPUT_MUX, 0,  6, tas5086_dapm_channel_texts),
+	SOC_ENUM_SINGLE_CONST(TAS5086_PWM_OUTPUT_MUX, 20, tas5086_dapm_channel_texts),
+	SOC_ENUM_SINGLE_CONST(TAS5086_PWM_OUTPUT_MUX, 16, tas5086_dapm_channel_texts),
+	SOC_ENUM_SINGLE_CONST(TAS5086_PWM_OUTPUT_MUX, 12, tas5086_dapm_channel_texts),
+	SOC_ENUM_SINGLE_CONST(TAS5086_PWM_OUTPUT_MUX, 8,  tas5086_dapm_channel_texts),
+	SOC_ENUM_SINGLE_CONST(TAS5086_PWM_OUTPUT_MUX, 4,  tas5086_dapm_channel_texts),
+	SOC_ENUM_SINGLE_CONST(TAS5086_PWM_OUTPUT_MUX, 0,  tas5086_dapm_channel_texts),
 };
 
 static const struct snd_kcontrol_new tas5086_dapm_output_mux_controls[] = {
-- 
1.8.5.2



More information about the Alsa-devel mailing list