All of 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 044/102] ASoC: twl4030: Use SOC_ENUM_SINGLE_DECL()
Date: Tue, 18 Feb 2014 12:38:00 +0100	[thread overview]
Message-ID: <1392723517-12772-17-git-send-email-tiwai@suse.de> (raw)
In-Reply-To: <1392723517-12772-2-git-send-email-tiwai@suse.de>

Just replace with the helper macro.  No functional change at all.

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

diff --git a/sound/soc/codecs/twl4030.c b/sound/soc/codecs/twl4030.c
index 682e4ac88939..975e0f760ac1 100644
--- a/sound/soc/codecs/twl4030.c
+++ b/sound/soc/codecs/twl4030.c
@@ -415,10 +415,9 @@ static const struct snd_kcontrol_new twl4030_dapm_carkitr_controls[] = {
 static const char *twl4030_handsfreel_texts[] =
 		{"Voice", "AudioL1", "AudioL2", "AudioR2"};
 
-static const struct soc_enum twl4030_handsfreel_enum =
-	SOC_ENUM_SINGLE(TWL4030_REG_HFL_CTL, 0,
-			ARRAY_SIZE(twl4030_handsfreel_texts),
-			twl4030_handsfreel_texts);
+static SOC_ENUM_SINGLE_DECL(twl4030_handsfreel_enum,
+			    TWL4030_REG_HFL_CTL, 0,
+			    twl4030_handsfreel_texts);
 
 static const struct snd_kcontrol_new twl4030_dapm_handsfreel_control =
 SOC_DAPM_ENUM("Route", twl4030_handsfreel_enum);
@@ -431,10 +430,9 @@ static const struct snd_kcontrol_new twl4030_dapm_handsfreelmute_control =
 static const char *twl4030_handsfreer_texts[] =
 		{"Voice", "AudioR1", "AudioR2", "AudioL2"};
 
-static const struct soc_enum twl4030_handsfreer_enum =
-	SOC_ENUM_SINGLE(TWL4030_REG_HFR_CTL, 0,
-			ARRAY_SIZE(twl4030_handsfreer_texts),
-			twl4030_handsfreer_texts);
+static SOC_ENUM_SINGLE_DECL(twl4030_handsfreer_enum,
+			    TWL4030_REG_HFR_CTL, 0,
+			    twl4030_handsfreer_texts);
 
 static const struct snd_kcontrol_new twl4030_dapm_handsfreer_control =
 SOC_DAPM_ENUM("Route", twl4030_handsfreer_enum);
@@ -448,10 +446,9 @@ static const struct snd_kcontrol_new twl4030_dapm_handsfreermute_control =
 static const char *twl4030_vibra_texts[] =
 		{"AudioL1", "AudioR1", "AudioL2", "AudioR2"};
 
-static const struct soc_enum twl4030_vibra_enum =
-	SOC_ENUM_SINGLE(TWL4030_REG_VIBRA_CTL, 2,
-			ARRAY_SIZE(twl4030_vibra_texts),
-			twl4030_vibra_texts);
+static SOC_ENUM_SINGLE_DECL(twl4030_vibra_enum,
+			    TWL4030_REG_VIBRA_CTL, 2,
+			    twl4030_vibra_texts);
 
 static const struct snd_kcontrol_new twl4030_dapm_vibra_control =
 SOC_DAPM_ENUM("Route", twl4030_vibra_enum);
@@ -460,10 +457,9 @@ SOC_DAPM_ENUM("Route", twl4030_vibra_enum);
 static const char *twl4030_vibrapath_texts[] =
 		{"Local vibrator", "Audio"};
 
-static const struct soc_enum twl4030_vibrapath_enum =
-	SOC_ENUM_SINGLE(TWL4030_REG_VIBRA_CTL, 4,
-			ARRAY_SIZE(twl4030_vibrapath_texts),
-			twl4030_vibrapath_texts);
+static SOC_ENUM_SINGLE_DECL(twl4030_vibrapath_enum,
+			    TWL4030_REG_VIBRA_CTL, 4,
+			    twl4030_vibrapath_texts);
 
 static const struct snd_kcontrol_new twl4030_dapm_vibrapath_control =
 SOC_DAPM_ENUM("Route", twl4030_vibrapath_enum);
@@ -490,10 +486,9 @@ static const struct snd_kcontrol_new twl4030_dapm_analogrmic_controls[] = {
 static const char *twl4030_micpathtx1_texts[] =
 		{"Analog", "Digimic0"};
 
-static const struct soc_enum twl4030_micpathtx1_enum =
-	SOC_ENUM_SINGLE(TWL4030_REG_ADCMICSEL, 0,
-			ARRAY_SIZE(twl4030_micpathtx1_texts),
-			twl4030_micpathtx1_texts);
+static SOC_ENUM_SINGLE_DECL(twl4030_micpathtx1_enum,
+			    TWL4030_REG_ADCMICSEL, 0,
+			    twl4030_micpathtx1_texts);
 
 static const struct snd_kcontrol_new twl4030_dapm_micpathtx1_control =
 SOC_DAPM_ENUM("Route", twl4030_micpathtx1_enum);
@@ -502,10 +497,9 @@ SOC_DAPM_ENUM("Route", twl4030_micpathtx1_enum);
 static const char *twl4030_micpathtx2_texts[] =
 		{"Analog", "Digimic1"};
 
-static const struct soc_enum twl4030_micpathtx2_enum =
-	SOC_ENUM_SINGLE(TWL4030_REG_ADCMICSEL, 2,
-			ARRAY_SIZE(twl4030_micpathtx2_texts),
-			twl4030_micpathtx2_texts);
+static SOC_ENUM_SINGLE_DECL(twl4030_micpathtx2_enum,
+			    TWL4030_REG_ADCMICSEL, 2,
+			    twl4030_micpathtx2_texts);
 
 static const struct snd_kcontrol_new twl4030_dapm_micpathtx2_control =
 SOC_DAPM_ENUM("Route", twl4030_micpathtx2_enum);
@@ -955,10 +949,9 @@ static const char *twl4030_op_modes_texts[] = {
 	"Option 2 (voice/audio)", "Option 1 (audio)"
 };
 
-static const struct soc_enum twl4030_op_modes_enum =
-	SOC_ENUM_SINGLE(TWL4030_REG_CODEC_MODE, 0,
-			ARRAY_SIZE(twl4030_op_modes_texts),
-			twl4030_op_modes_texts);
+static SOC_ENUM_SINGLE_DECL(twl4030_op_modes_enum,
+			    TWL4030_REG_CODEC_MODE, 0,
+			    twl4030_op_modes_texts);
 
 static int snd_soc_put_twl4030_opmode_enum_double(struct snd_kcontrol *kcontrol,
 	struct snd_ctl_elem_value *ucontrol)
@@ -1029,10 +1022,9 @@ static const char *twl4030_avadc_clk_priority_texts[] = {
 	"Voice high priority", "HiFi high priority"
 };
 
-static const struct soc_enum twl4030_avadc_clk_priority_enum =
-	SOC_ENUM_SINGLE(TWL4030_REG_AVADC_CTL, 2,
-			ARRAY_SIZE(twl4030_avadc_clk_priority_texts),
-			twl4030_avadc_clk_priority_texts);
+static SOC_ENUM_SINGLE_DECL(twl4030_avadc_clk_priority_enum,
+			    TWL4030_REG_AVADC_CTL, 2,
+			    twl4030_avadc_clk_priority_texts);
 
 static const char *twl4030_rampdelay_texts[] = {
 	"27/20/14 ms", "55/40/27 ms", "109/81/55 ms", "218/161/109 ms",
@@ -1040,40 +1032,36 @@ static const char *twl4030_rampdelay_texts[] = {
 	"3495/2581/1748 ms"
 };
 
-static const struct soc_enum twl4030_rampdelay_enum =
-	SOC_ENUM_SINGLE(TWL4030_REG_HS_POPN_SET, 2,
-			ARRAY_SIZE(twl4030_rampdelay_texts),
-			twl4030_rampdelay_texts);
+static SOC_ENUM_SINGLE_DECL(twl4030_rampdelay_enum,
+			    TWL4030_REG_HS_POPN_SET, 2,
+			    twl4030_rampdelay_texts);
 
 /* Vibra H-bridge direction mode */
 static const char *twl4030_vibradirmode_texts[] = {
 	"Vibra H-bridge direction", "Audio data MSB",
 };
 
-static const struct soc_enum twl4030_vibradirmode_enum =
-	SOC_ENUM_SINGLE(TWL4030_REG_VIBRA_CTL, 5,
-			ARRAY_SIZE(twl4030_vibradirmode_texts),
-			twl4030_vibradirmode_texts);
+static SOC_ENUM_SINGLE_DECL(twl4030_vibradirmode_enum,
+			    TWL4030_REG_VIBRA_CTL, 5,
+			    twl4030_vibradirmode_texts);
 
 /* Vibra H-bridge direction */
 static const char *twl4030_vibradir_texts[] = {
 	"Positive polarity", "Negative polarity",
 };
 
-static const struct soc_enum twl4030_vibradir_enum =
-	SOC_ENUM_SINGLE(TWL4030_REG_VIBRA_CTL, 1,
-			ARRAY_SIZE(twl4030_vibradir_texts),
-			twl4030_vibradir_texts);
+static SOC_ENUM_SINGLE_DECL(twl4030_vibradir_enum,
+			    TWL4030_REG_VIBRA_CTL, 1,
+			    twl4030_vibradir_texts);
 
 /* Digimic Left and right swapping */
 static const char *twl4030_digimicswap_texts[] = {
 	"Not swapped", "Swapped",
 };
 
-static const struct soc_enum twl4030_digimicswap_enum =
-	SOC_ENUM_SINGLE(TWL4030_REG_MISC_SET_1, 0,
-			ARRAY_SIZE(twl4030_digimicswap_texts),
-			twl4030_digimicswap_texts);
+static SOC_ENUM_SINGLE_DECL(twl4030_digimicswap_enum,
+			    TWL4030_REG_MISC_SET_1, 0,
+			    twl4030_digimicswap_texts);
 
 static const struct snd_kcontrol_new twl4030_snd_controls[] = {
 	/* Codec operation mode control */
-- 
1.8.5.2

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

Thread overview: 110+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-18 11:37 [PATCH 029/102] ASoC: adau1373: Use SOC_ENUM_SINGLE_DECL() Takashi Iwai
2014-02-18 11:37 ` [PATCH 030/102] ASoC: alc5623: " Takashi Iwai
2014-02-20  2:14   ` Mark Brown
2014-02-18 11:37 ` [PATCH 031/102] ASoC: cs42l52: " Takashi Iwai
2014-02-20  2:15   ` Mark Brown
2014-02-18 11:37 ` [PATCH 032/102] ASoC: da7210: " Takashi Iwai
2014-02-20  2:15   ` Mark Brown
2014-02-18 11:37 ` [PATCH 033/102] ASoC: da7213: " Takashi Iwai
2014-02-20  2:16   ` Mark Brown
2014-02-18 11:37 ` [PATCH 034/102] ASoC: da9055: " Takashi Iwai
2014-02-20  2:20   ` Mark Brown
2014-02-18 11:37 ` [PATCH 035/102] ASoC: lm4857: Use SOC_ENUM_SINGLE_EXT_DECL() Takashi Iwai
2014-02-20  2:23   ` Mark Brown
2014-02-18 11:37 ` [PATCH 036/102] ASoC: da9055: Use SOC_*_ENUM_SINGLE_DECL() Takashi Iwai
2014-02-20  2:25   ` Mark Brown
2014-02-18 11:37 ` [PATCH 037/102] ASoC: max98090: Use SOC_ENUM_SINGLE_DECL() Takashi Iwai
2014-02-20  2:27   ` Mark Brown
2014-02-18 11:37 ` [PATCH 038/102] ASoC: max98095: " Takashi Iwai
2014-02-20  2:27   ` Mark Brown
2014-02-18 11:37 ` [PATCH 039/102] ASoC: mc13783: " Takashi Iwai
2014-02-23  2:20   ` Mark Brown
2014-02-18 11:37 ` [PATCH 040/102] ASoC: stl5000: " Takashi Iwai
2014-02-23  2:21   ` Mark Brown
2014-02-18 11:37 ` [PATCH 041/102] ASoC: sn95031: " Takashi Iwai
2014-02-23  2:22   ` Mark Brown
2014-02-18 11:37 ` [PATCH 042/102] ASoC: stac9766: Use SOC_ENUM_{SINGLE|DOUBLE}_DECL() Takashi Iwai
2014-02-23  2:27   ` Mark Brown
2014-02-18 11:37 ` [PATCH 043/102] ASoC: tlv320aic26: Use SOC_ENUM_SINGLE_DECL() Takashi Iwai
2014-02-23  2:28   ` Mark Brown
2014-02-18 11:38 ` Takashi Iwai [this message]
2014-02-23  2:29   ` [PATCH 044/102] ASoC: twl4030: " Mark Brown
2014-02-18 11:38 ` [PATCH 045/102] ASoC: twl6040: " Takashi Iwai
2014-02-23  2:30   ` Mark Brown
2014-02-18 11:38 ` [PATCH 046/102] ASoC: uda1380: " Takashi Iwai
2014-02-23  2:31   ` Mark Brown
2014-02-18 11:38 ` [PATCH 047/102] ASoC: wl1273: Use SOC_ENUM_SINGLE_EXT_DECL() Takashi Iwai
2014-02-23  2:32   ` Mark Brown
2014-02-18 11:38 ` [PATCH 048/102] ASoC: wm2200: Use SOC_ENUM_SINGLE_DECL() Takashi Iwai
2014-02-23  2:33   ` Mark Brown
2014-02-18 11:38 ` [PATCH 049/102] ASoC: wm8523: " Takashi Iwai
2014-02-23  2:33   ` Mark Brown
2014-02-18 11:38 ` [PATCH 050/102] ASoC: wm8731: " Takashi Iwai
2014-02-23  2:34   ` Mark Brown
2014-02-18 11:38 ` [PATCH 051/102] ASoC: wm8737: " Takashi Iwai
2014-02-23  2:36   ` Mark Brown
2014-02-18 11:38 ` [PATCH 052/102] ASoC: wm8903: " Takashi Iwai
2014-02-23  2:36   ` Mark Brown
2014-02-18 11:38 ` [PATCH 053/102] ASoC: wm8904: " Takashi Iwai
2014-02-23  2:37   ` Mark Brown
2014-02-18 11:38 ` [PATCH 054/102] ASoC: wm8940: " Takashi Iwai
2014-02-23  2:37   ` Mark Brown
2014-02-18 11:38 ` [PATCH 055/102] ASoC: wm8961: " Takashi Iwai
2014-02-23  2:38   ` Mark Brown
2014-02-18 11:38 ` [PATCH 056/102] ASoC: wm8962: " Takashi Iwai
2014-02-23  2:40   ` Mark Brown
2014-02-18 11:38 ` [PATCH 057/102] ASoC: wm8974: " Takashi Iwai
2014-02-23  2:42   ` Mark Brown
2014-02-23  2:42   ` Mark Brown
2014-02-18 11:38 ` [PATCH 058/102] ASoC: wm8993: " Takashi Iwai
2014-02-23  2:42   ` Mark Brown
2014-02-18 11:38 ` [PATCH 059/102] ASoC: wm8995: " Takashi Iwai
2014-02-23  2:44   ` Mark Brown
2014-02-18 11:38 ` [PATCH 060/102] ASoC: wm8996: " Takashi Iwai
2014-02-23  2:44   ` Mark Brown
2014-02-18 11:38 ` [PATCH 061/102] ASoC: wm_hubs: " Takashi Iwai
2014-02-23  2:44   ` Mark Brown
2014-02-18 11:38 ` [PATCH 062/102] ASoC: omap: Use SOC_ENUM_SINGLE_EXT_DECL() Takashi Iwai
2014-02-23  2:47   ` Mark Brown
2014-02-18 11:38 ` [PATCH 063/102] ASoC: 88pm860x: Use SOC_ENUM_SINGLE_DECL() Takashi Iwai
2014-02-23  2:46   ` Mark Brown
2014-02-18 11:38 ` [PATCH 064/102] ASoC: ak4641: " Takashi Iwai
2014-02-23  2:48   ` Mark Brown
2014-02-18 11:38 ` [PATCH 065/102] ASoC: ak4671: " Takashi Iwai
2014-02-23  2:49   ` Mark Brown
2014-02-18 11:38 ` [PATCH 066/102] ASoC: alc5632: " Takashi Iwai
2014-02-23  2:56   ` Mark Brown
2014-02-18 11:38 ` [PATCH 067/102] ASoC: wm2200: Use SOC_ENUM_SINGLE_*_DECL() Takashi Iwai
2014-02-23  2:57   ` Mark Brown
2014-02-18 11:38 ` [PATCH 068/102] ASoC: da732x: Use SOC_ENUM_SINGLE_DECL() Takashi Iwai
2014-02-23  2:57   ` Mark Brown
2014-02-18 11:38 ` [PATCH 069/102] ASoC: ml26124: " Takashi Iwai
2014-02-23  2:57   ` Mark Brown
2014-02-18 11:38 ` [PATCH 070/102] ASoC: tlv320aic23: " Takashi Iwai
2014-02-23  2:57   ` Mark Brown
2014-02-18 11:38 ` [PATCH 071/102] ASoC: wm5100: " Takashi Iwai
2014-02-23  3:03   ` Mark Brown
2014-02-18 11:38 ` [PATCH 072/102] ASoC: wm8955: " Takashi Iwai
2014-02-23  3:04   ` Mark Brown
2014-02-18 11:38 ` [PATCH 073/102] ASoC: wm8988: " Takashi Iwai
2014-02-23  3:04   ` Mark Brown
2014-02-18 11:38 ` [PATCH 074/102] ASoC: wm9081: " Takashi Iwai
2014-02-23  3:04   ` Mark Brown
2014-02-18 11:38 ` [PATCH 075/102] ASoC: wm9705: " Takashi Iwai
2014-02-23  3:05   ` Mark Brown
2014-02-18 11:38 ` [PATCH 076/102] ASoC: ad1836: " Takashi Iwai
2014-02-23  3:05   ` Mark Brown
2014-02-18 11:38 ` [PATCH 077/102] ASoC: cs42l73: " Takashi Iwai
2014-02-23  3:05   ` Mark Brown
2014-02-18 11:38 ` [PATCH 078/102] ASoC: lm49453: " Takashi Iwai
2014-02-23  3:05   ` Mark Brown
2014-02-18 11:38 ` [PATCH 079/102] ASoC: tlv320dac33: Use SOC_ENUM_SINGLE_*_DECL() Takashi Iwai
2014-02-23  3:06   ` Mark Brown
2014-02-18 11:38 ` [PATCH 080/102] ASoC: wm5102: Use ARRAY_SIZE() for SOC_VALUE_ENUM_SINGLE() Takashi Iwai
2014-02-23  3:06   ` Mark Brown
2014-02-18 11:38 ` [PATCH 081/102] ASoC: wm8997: " Takashi Iwai
2014-02-23  3:06   ` Mark Brown
2014-02-18 13:03 ` [PATCH 000/102 chunk#4] Clean up with SOC_ENUM_SINGLE_DECL() & co Takashi Iwai
2014-02-18 13:04 ` [PATCH 028/102] ASoC: ad193x: Use SOC_ENUM_SINGLE_DECL() Takashi Iwai
2014-02-20  1:39   ` Mark Brown
2014-02-20  2:12 ` [PATCH 029/102] ASoC: adau1373: " 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=1392723517-12772-17-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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.