Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Lars-Peter Clausen <lars@metafoo.de>
To: Mark Brown <broonie@kernel.org>, Liam Girdwood <lgirdwood@gmail.com>
Cc: alsa-devel@alsa-project.org, Lars-Peter Clausen <lars@metafoo.de>
Subject: [PATCH 07/11] ASoC: wm8994: Use SOC_SINGLE_EXT() instead of open-coding it
Date: Wed, 19 Jun 2013 19:33:59 +0200	[thread overview]
Message-ID: <1371663243-10032-7-git-send-email-lars@metafoo.de> (raw)
In-Reply-To: <1371663243-10032-1-git-send-email-lars@metafoo.de>

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
---
 sound/soc/codecs/wm8994.c | 12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)

diff --git a/sound/soc/codecs/wm8994.c b/sound/soc/codecs/wm8994.c
index 25580b5..1d4b1ec 100644
--- a/sound/soc/codecs/wm8994.c
+++ b/sound/soc/codecs/wm8994.c
@@ -290,10 +290,8 @@ static const DECLARE_TLV_DB_SCALE(ng_tlv, -10200, 600, 0);
 static const DECLARE_TLV_DB_SCALE(mixin_boost_tlv, 0, 900, 0);
 
 #define WM8994_DRC_SWITCH(xname, reg, shift) \
-{	.iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, \
-	.info = snd_soc_info_volsw, .get = snd_soc_get_volsw,\
-	.put = wm8994_put_drc_sw, \
-	.private_value =  SOC_SINGLE_VALUE(reg, shift, 1, 0) }
+	SOC_SINGLE_EXT(xname, reg, shift, 1, 0, \
+		snd_soc_get_volsw, wm8994_put_drc_sw)
 
 static int wm8994_put_drc_sw(struct snd_kcontrol *kcontrol,
 			     struct snd_ctl_elem_value *ucontrol)
@@ -1433,10 +1431,8 @@ SOC_DAPM_SINGLE("AIF1.1 Switch", WM8994_DAC2_RIGHT_MIXER_ROUTING,
 };
 
 #define WM8994_CLASS_W_SWITCH(xname, reg, shift, max, invert) \
-{	.iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, \
-	.info = snd_soc_info_volsw, \
-	.get = snd_soc_dapm_get_volsw, .put = wm8994_put_class_w, \
-	.private_value =  SOC_SINGLE_VALUE(reg, shift, max, invert) }
+	SOC_SINGLE_EXT(xname, reg, shift, max, invert, \
+		snd_soc_get_volsw, wm8994_put_class_w)
 
 static int wm8994_put_class_w(struct snd_kcontrol *kcontrol,
 			      struct snd_ctl_elem_value *ucontrol)
-- 
1.8.0

  parent reply	other threads:[~2013-06-19 17:34 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-19 17:33 [PATCH 01/11] ASoC: tlv320aix3x: Use SOC_SINGLE_EXT() instead of open-coding it Lars-Peter Clausen
2013-06-19 17:33 ` [PATCH 02/11] ASoC: wm8400: Use SOC_SINGLE_EXT_TLV() " Lars-Peter Clausen
2013-06-19 17:33 ` [PATCH 03/11] ASoC: wm8903: Use SOC_SINGLE_EXT() " Lars-Peter Clausen
2013-06-19 17:33 ` [PATCH 04/11] ASoC: wm8904: " Lars-Peter Clausen
2013-06-19 17:33 ` [PATCH 05/11] ASoC: wm8990: Use SOC_SINGLE_EXT_TLV() " Lars-Peter Clausen
2013-06-19 17:33 ` [PATCH 06/11] ASoC: wm8991: " Lars-Peter Clausen
2013-06-19 17:33 ` Lars-Peter Clausen [this message]
2013-06-19 17:34 ` [PATCH 08/11] ASoC: wm8995: Use SOC_SINGLE_EXT() " Lars-Peter Clausen
2013-06-19 17:34 ` [PATCH 09/11] ASoC: wm_hubs: " Lars-Peter Clausen
2013-06-19 17:34 ` [PATCH 10/11] ASoC: wm_adsp: Use SND_SOC_DAPM_PGA_E() " Lars-Peter Clausen
2013-06-19 17:34 ` [PATCH 11/11] ASoC: 88pm860x: " Lars-Peter Clausen
2013-06-19 18:46 ` [PATCH 01/11] ASoC: tlv320aix3x: Use SOC_SINGLE_EXT() " 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=1371663243-10032-7-git-send-email-lars@metafoo.de \
    --to=lars@metafoo.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