Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Mark Brown <broonie@kernel.org>
Cc: alsa-devel@alsa-project.org, Liam Girdwood <lgirdwood@gmail.com>
Subject: [PATCH 089/102] ASoC: tlv320aic3x: Use SOC_ENUM_SINGLE_CONST()
Date: Tue, 18 Feb 2014 12:51:35 +0100	[thread overview]
Message-ID: <1392724308-13375-9-git-send-email-tiwai@suse.de> (raw)
In-Reply-To: <1392724308-13375-1-git-send-email-tiwai@suse.de>

... for improving readability and maintainability.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
 sound/soc/codecs/tlv320aic3x.c | 34 +++++++++++++++++-----------------
 1 file changed, 17 insertions(+), 17 deletions(-)

diff --git a/sound/soc/codecs/tlv320aic3x.c b/sound/soc/codecs/tlv320aic3x.c
index 470fbfb4b386..a874f53da37e 100644
--- a/sound/soc/codecs/tlv320aic3x.c
+++ b/sound/soc/codecs/tlv320aic3x.c
@@ -238,36 +238,36 @@ static const char *aic3x_adc_hpf[] =
 #define ADC_HPF_ENUM	10
 
 static const struct soc_enum aic3x_enum[] = {
-	SOC_ENUM_SINGLE(DAC_LINE_MUX, 6, 3, aic3x_left_dac_mux),
-	SOC_ENUM_SINGLE(DAC_LINE_MUX, 4, 3, aic3x_right_dac_mux),
-	SOC_ENUM_SINGLE(HPLCOM_CFG, 4, 3, aic3x_left_hpcom_mux),
-	SOC_ENUM_SINGLE(HPRCOM_CFG, 3, 5, aic3x_right_hpcom_mux),
-	SOC_ENUM_SINGLE(LINE1L_2_LADC_CTRL, 7, 2, aic3x_linein_mode_mux),
-	SOC_ENUM_SINGLE(LINE1L_2_RADC_CTRL, 7, 2, aic3x_linein_mode_mux),
-	SOC_ENUM_SINGLE(LINE1R_2_LADC_CTRL, 7, 2, aic3x_linein_mode_mux),
-	SOC_ENUM_SINGLE(LINE1R_2_RADC_CTRL, 7, 2, aic3x_linein_mode_mux),
-	SOC_ENUM_SINGLE(LINE2L_2_LADC_CTRL, 7, 2, aic3x_linein_mode_mux),
-	SOC_ENUM_SINGLE(LINE2R_2_RADC_CTRL, 7, 2, aic3x_linein_mode_mux),
-	SOC_ENUM_DOUBLE(AIC3X_CODEC_DFILT_CTRL, 6, 4, 4, aic3x_adc_hpf),
+	SOC_ENUM_SINGLE_CONST(DAC_LINE_MUX, 6, aic3x_left_dac_mux),
+	SOC_ENUM_SINGLE_CONST(DAC_LINE_MUX, 4, aic3x_right_dac_mux),
+	SOC_ENUM_SINGLE_CONST(HPLCOM_CFG, 4, aic3x_left_hpcom_mux),
+	SOC_ENUM_SINGLE_CONST(HPRCOM_CFG, 3, aic3x_right_hpcom_mux),
+	SOC_ENUM_SINGLE_CONST(LINE1L_2_LADC_CTRL, 7, aic3x_linein_mode_mux),
+	SOC_ENUM_SINGLE_CONST(LINE1L_2_RADC_CTRL, 7, aic3x_linein_mode_mux),
+	SOC_ENUM_SINGLE_CONST(LINE1R_2_LADC_CTRL, 7, aic3x_linein_mode_mux),
+	SOC_ENUM_SINGLE_CONST(LINE1R_2_RADC_CTRL, 7, aic3x_linein_mode_mux),
+	SOC_ENUM_SINGLE_CONST(LINE2L_2_LADC_CTRL, 7, aic3x_linein_mode_mux),
+	SOC_ENUM_SINGLE_CONST(LINE2R_2_RADC_CTRL, 7, aic3x_linein_mode_mux),
+	SOC_ENUM_DOUBLE_CONST(AIC3X_CODEC_DFILT_CTRL, 6, 4, aic3x_adc_hpf),
 };
 
 static const char *aic3x_agc_level[] =
 	{ "-5.5dB", "-8dB", "-10dB", "-12dB", "-14dB", "-17dB", "-20dB", "-24dB" };
 static const struct soc_enum aic3x_agc_level_enum[] = {
-	SOC_ENUM_SINGLE(LAGC_CTRL_A, 4, 8, aic3x_agc_level),
-	SOC_ENUM_SINGLE(RAGC_CTRL_A, 4, 8, aic3x_agc_level),
+	SOC_ENUM_SINGLE_CONST(LAGC_CTRL_A, 4, aic3x_agc_level),
+	SOC_ENUM_SINGLE_CONST(RAGC_CTRL_A, 4, aic3x_agc_level),
 };
 
 static const char *aic3x_agc_attack[] = { "8ms", "11ms", "16ms", "20ms" };
 static const struct soc_enum aic3x_agc_attack_enum[] = {
-	SOC_ENUM_SINGLE(LAGC_CTRL_A, 2, 4, aic3x_agc_attack),
-	SOC_ENUM_SINGLE(RAGC_CTRL_A, 2, 4, aic3x_agc_attack),
+	SOC_ENUM_SINGLE_CONST(LAGC_CTRL_A, 2, aic3x_agc_attack),
+	SOC_ENUM_SINGLE_CONST(RAGC_CTRL_A, 2, aic3x_agc_attack),
 };
 
 static const char *aic3x_agc_decay[] = { "100ms", "200ms", "400ms", "500ms" };
 static const struct soc_enum aic3x_agc_decay_enum[] = {
-	SOC_ENUM_SINGLE(LAGC_CTRL_A, 0, 4, aic3x_agc_decay),
-	SOC_ENUM_SINGLE(RAGC_CTRL_A, 0, 4, aic3x_agc_decay),
+	SOC_ENUM_SINGLE_CONST(LAGC_CTRL_A, 0, aic3x_agc_decay),
+	SOC_ENUM_SINGLE_CONST(RAGC_CTRL_A, 0, aic3x_agc_decay),
 };
 
 /*
-- 
1.8.5.2

  parent reply	other threads:[~2014-02-18 11:51 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-18 11:51 [PATCH 000/102 - chunk#5] Add SOC_ENUM_SINGLE_CONST() & co Takashi Iwai
2014-02-18 11:51 ` [PATCH 082/102] ASoC: Add SOC_ENUM_SINGLE_CONST() and SOC_ENUM_DOUBLE_CONST() macros Takashi Iwai
2014-02-20  2:33   ` Mark Brown
2014-02-20  7:08     ` Takashi Iwai
2014-02-20  7:50       ` Takashi Iwai
2014-02-20  9:09       ` Mark Brown
2014-02-20 14:56         ` Takashi Iwai
2014-02-20 23:34           ` Mark Brown
2014-02-18 11:51 ` [PATCH 083/102] ASoC: ak4535: Use SOC_ENUM_SINGLE_CONST() Takashi Iwai
2014-02-18 11:51 ` [PATCH 084/102] ASoC: arizona: " Takashi Iwai
2014-02-18 11:51 ` [PATCH 085/102] ASoC: isabelle: " Takashi Iwai
2014-02-18 11:51 ` [PATCH 086/102] ASoC: max9877: " Takashi Iwai
2014-02-18 11:51 ` [PATCH 087/102] ASoC: ssm2602: " Takashi Iwai
2014-02-18 11:51 ` [PATCH 088/102] ASoC: tas5086: " Takashi Iwai
2014-02-18 11:51 ` Takashi Iwai [this message]
2014-02-18 11:51 ` [PATCH 090/102] ASoC: twl6040: " Takashi Iwai
2014-02-18 11:51 ` [PATCH 091/102] ASoC: uad134x: " Takashi Iwai
2014-02-18 11:51 ` [PATCH 092/102] ASoC: uad1380: " Takashi Iwai
2014-02-18 11:51 ` [PATCH 093/102] ASoC: wm8350: " Takashi Iwai
2014-02-18 11:51 ` [PATCH 094/102] ASoC: wm8510: " Takashi Iwai
2014-02-18 11:51 ` [PATCH 095/102] ASoC: wm8750: " Takashi Iwai
2014-02-18 11:51 ` [PATCH 096/102] ASoC: wm8753: " Takashi Iwai
2014-02-18 11:51 ` [PATCH 097/102] ASoC: wm8960: " Takashi Iwai
2014-02-18 11:51 ` [PATCH 098/102] ASoC: wm8971: " Takashi Iwai
2014-02-18 11:51 ` [PATCH 099/102] ASoC: wm8974: " Takashi Iwai
2014-02-18 11:51 ` [PATCH 100/102] ASoC: wm9712: " Takashi Iwai
2014-02-18 11:51 ` [PATCH 101/102] ASoC: wm9713: " Takashi Iwai
2014-02-18 11:51 ` [PATCH 102/102] ASoC: wm_adsp: " Takashi Iwai
2014-02-19  1:43 ` [PATCH 000/102 - chunk#5] Add SOC_ENUM_SINGLE_CONST() & co Mark Brown
2014-02-19  6:48   ` Takashi Iwai
2014-02-19  8:00     ` Mark Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1392724308-13375-9-git-send-email-tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=lgirdwood@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox