diff options
author | Peter Ujfalusi <peter.ujfalusi@ti.com> | 2011-10-05 11:29:19 +0400 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2011-10-05 20:10:08 +0400 |
commit | 0f9887d11e7c59ebae5e464f30a6dde788ed9011 (patch) | |
tree | a207635ae6f45a576f1ace0489b2c69043baa5ea /sound/soc/codecs/wm_hubs.c | |
parent | 7508b12a8eb713436feb65893ae7ada57bf165ce (diff) | |
download | linux-0f9887d11e7c59ebae5e464f30a6dde788ed9011.tar.xz |
ASoC: Consolidate use of controls with custom get/put function
Use the macros for controls require custom get/put function.
This is to make sure that the soc_mixer_control is used
consistently among the drivers.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Cc: Arun KS <arunks@mistralsolutions.com>
Cc: Misael Lopez Cruz <misael.lopez@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/codecs/wm_hubs.c')
-rw-r--r-- | sound/soc/codecs/wm_hubs.c | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/sound/soc/codecs/wm_hubs.c b/sound/soc/codecs/wm_hubs.c index ca8ce03510f4..f3583a5b8095 100644 --- a/sound/soc/codecs/wm_hubs.c +++ b/sound/soc/codecs/wm_hubs.c @@ -362,19 +362,11 @@ SOC_DOUBLE_TLV("Speaker Boost Volume", WM8993_SPKOUT_BOOST, 3, 0, 7, 0, SOC_ENUM("Speaker Reference", speaker_ref), SOC_ENUM("Speaker Mode", speaker_mode), -{ - .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = "Headphone Volume", - .access = SNDRV_CTL_ELEM_ACCESS_TLV_READ | - SNDRV_CTL_ELEM_ACCESS_READWRITE, - .tlv.p = outpga_tlv, - .info = snd_soc_info_volsw_2r, - .get = snd_soc_get_volsw_2r, .put = wm8993_put_dc_servo, - .private_value = (unsigned long)&(struct soc_mixer_control) { - .reg = WM8993_LEFT_OUTPUT_VOLUME, - .rreg = WM8993_RIGHT_OUTPUT_VOLUME, - .shift = 0, .max = 63 - }, -}, +SOC_DOUBLE_R_EXT_TLV("Headphone Volume", + WM8993_LEFT_OUTPUT_VOLUME, WM8993_RIGHT_OUTPUT_VOLUME, + 0, 63, 0, snd_soc_get_volsw_2r, wm8993_put_dc_servo, + outpga_tlv), + SOC_DOUBLE_R("Headphone Switch", WM8993_LEFT_OUTPUT_VOLUME, WM8993_RIGHT_OUTPUT_VOLUME, 6, 1, 0), SOC_DOUBLE_R("Headphone ZC Switch", WM8993_LEFT_OUTPUT_VOLUME, |