aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorLars-Peter Clausen <lars@metafoo.de>2013-06-19 13:33:59 -0400
committerMark Brown <broonie@linaro.org>2013-06-19 14:47:40 -0400
commit6e06509c583496fe24ffb498894bf2838b26492e (patch)
treeab1845047cb880545b3612836dfdbc2207e3cdba /sound
parent9578121c80a59f2cdd93c8a48bc9549ee873b14c (diff)
ASoC: wm8994: Use SOC_SINGLE_EXT() instead of open-coding it
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/codecs/wm8994.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/sound/soc/codecs/wm8994.c b/sound/soc/codecs/wm8994.c
index 29e95f93d482..9e13edd81292 100644
--- a/sound/soc/codecs/wm8994.c
+++ b/sound/soc/codecs/wm8994.c
@@ -289,10 +289,8 @@ static const DECLARE_TLV_DB_SCALE(ng_tlv, -10200, 600, 0);
289static const DECLARE_TLV_DB_SCALE(mixin_boost_tlv, 0, 900, 0); 289static const DECLARE_TLV_DB_SCALE(mixin_boost_tlv, 0, 900, 0);
290 290
291#define WM8994_DRC_SWITCH(xname, reg, shift) \ 291#define WM8994_DRC_SWITCH(xname, reg, shift) \
292{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, \ 292 SOC_SINGLE_EXT(xname, reg, shift, 1, 0, \
293 .info = snd_soc_info_volsw, .get = snd_soc_get_volsw,\ 293 snd_soc_get_volsw, wm8994_put_drc_sw)
294 .put = wm8994_put_drc_sw, \
295 .private_value = SOC_SINGLE_VALUE(reg, shift, 1, 0) }
296 294
297static int wm8994_put_drc_sw(struct snd_kcontrol *kcontrol, 295static int wm8994_put_drc_sw(struct snd_kcontrol *kcontrol,
298 struct snd_ctl_elem_value *ucontrol) 296 struct snd_ctl_elem_value *ucontrol)
@@ -1432,10 +1430,8 @@ SOC_DAPM_SINGLE("AIF1.1 Switch", WM8994_DAC2_RIGHT_MIXER_ROUTING,
1432}; 1430};
1433 1431
1434#define WM8994_CLASS_W_SWITCH(xname, reg, shift, max, invert) \ 1432#define WM8994_CLASS_W_SWITCH(xname, reg, shift, max, invert) \
1435{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, \ 1433 SOC_SINGLE_EXT(xname, reg, shift, max, invert, \
1436 .info = snd_soc_info_volsw, \ 1434 snd_soc_get_volsw, wm8994_put_class_w)
1437 .get = snd_soc_dapm_get_volsw, .put = wm8994_put_class_w, \
1438 .private_value = SOC_SINGLE_VALUE(reg, shift, max, invert) }
1439 1435
1440static int wm8994_put_class_w(struct snd_kcontrol *kcontrol, 1436static int wm8994_put_class_w(struct snd_kcontrol *kcontrol,
1441 struct snd_ctl_elem_value *ucontrol) 1437 struct snd_ctl_elem_value *ucontrol)