ASoC: core: Rework SOC_DOUBLE_R_SX_TLV add SOC_SINGLE_SX_TLV
authorBrian Austin <brian.austin@cirrus.com>
Fri, 30 Mar 2012 15:43:55 +0000 (10:43 -0500)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Tue, 3 Apr 2012 10:43:23 +0000 (11:43 +0100)
commit1d99f2436d0d1c7741d6dfd9d27b5376cdbbca40
treef3fc73ca59b2d3876b429de52c66e4c2e6294a78
parent152ad442315517e6275efe6c142c06cb8aced6dd
ASoC: core: Rework SOC_DOUBLE_R_SX_TLV add SOC_SINGLE_SX_TLV

Some codecs namely Cirrus Logic Codecs have a way of wrapping the dB scale around 0dB without 0dB being in the middle.

Rework of SOC_DOUBLE_R_SX_TLV to be more consistent with other asoc tlv macros.
Add single register macro : SOC_SINGLE_SX_TLV.
Use snd_soc_info_volsw for .info
Use snd_soc_get_volsw_sx, snd_soc_put_volsw_sx for single and double.

kcontrols for CS42L51 and CS42L73 are adjusted to these new TLV Macros.

The max value is determined by: (number of steps) +1 for 0dB +max from codec datasheet.

Signed-off-by: Brian Austin <brian.austin@cirrus.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
include/sound/soc.h
sound/soc/codecs/cs42l51.c
sound/soc/codecs/cs42l73.c
sound/soc/soc-core.c