aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/wm8731.c
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2009-07-08 11:53:12 -0400
committerMark Brown <broonie@opensource.wolfsonmicro.com>2009-07-08 12:08:40 -0400
commitd00efa648d3c78ba212f08facf0defdff385dc28 (patch)
tree76ee54d6bce8c76613b12ac314205208cd654d05 /sound/soc/codecs/wm8731.c
parent6e5414750af8a521c3ba7805d6ad460ba21df1a1 (diff)
ASoC: Add TLV information for WM8731
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/codecs/wm8731.c')
-rw-r--r--sound/soc/codecs/wm8731.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/sound/soc/codecs/wm8731.c b/sound/soc/codecs/wm8731.c
index dfbc1bb375f4..33e89a1d1e82 100644
--- a/sound/soc/codecs/wm8731.c
+++ b/sound/soc/codecs/wm8731.c
@@ -26,6 +26,7 @@
26#include <sound/soc.h> 26#include <sound/soc.h>
27#include <sound/soc-dapm.h> 27#include <sound/soc-dapm.h>
28#include <sound/initval.h> 28#include <sound/initval.h>
29#include <sound/tlv.h>
29 30
30#include "wm8731.h" 31#include "wm8731.h"
31 32
@@ -113,20 +114,26 @@ static const struct soc_enum wm8731_enum[] = {
113 SOC_ENUM_SINGLE(WM8731_APDIGI, 1, 4, wm8731_deemph), 114 SOC_ENUM_SINGLE(WM8731_APDIGI, 1, 4, wm8731_deemph),
114}; 115};
115 116
117static const DECLARE_TLV_DB_SCALE(in_tlv, -3450, 150, 0);
118static const DECLARE_TLV_DB_SCALE(sidetone_tlv, -1500, 300, 0);
119static const DECLARE_TLV_DB_SCALE(out_tlv, -12100, 100, 1);
120
116static const struct snd_kcontrol_new wm8731_snd_controls[] = { 121static const struct snd_kcontrol_new wm8731_snd_controls[] = {
117 122
118SOC_DOUBLE_R("Master Playback Volume", WM8731_LOUT1V, WM8731_ROUT1V, 123SOC_DOUBLE_R_TLV("Master Playback Volume", WM8731_LOUT1V, WM8731_ROUT1V,
119 0, 127, 0), 124 0, 127, 0, out_tlv),
120SOC_DOUBLE_R("Master Playback ZC Switch", WM8731_LOUT1V, WM8731_ROUT1V, 125SOC_DOUBLE_R("Master Playback ZC Switch", WM8731_LOUT1V, WM8731_ROUT1V,
121 7, 1, 0), 126 7, 1, 0),
122 127
123SOC_DOUBLE_R("Capture Volume", WM8731_LINVOL, WM8731_RINVOL, 0, 31, 0), 128SOC_DOUBLE_R_TLV("Capture Volume", WM8731_LINVOL, WM8731_RINVOL, 0, 31, 0,
129 in_tlv),
124SOC_DOUBLE_R("Line Capture Switch", WM8731_LINVOL, WM8731_RINVOL, 7, 1, 1), 130SOC_DOUBLE_R("Line Capture Switch", WM8731_LINVOL, WM8731_RINVOL, 7, 1, 1),
125 131
126SOC_SINGLE("Mic Boost (+20dB)", WM8731_APANA, 0, 1, 0), 132SOC_SINGLE("Mic Boost (+20dB)", WM8731_APANA, 0, 1, 0),
127SOC_SINGLE("Capture Mic Switch", WM8731_APANA, 1, 1, 1), 133SOC_SINGLE("Capture Mic Switch", WM8731_APANA, 1, 1, 1),
128 134
129SOC_SINGLE("Sidetone Playback Volume", WM8731_APANA, 6, 3, 1), 135SOC_SINGLE_TLV("Sidetone Playback Volume", WM8731_APANA, 6, 3, 1,
136 sidetone_tlv),
130 137
131SOC_SINGLE("ADC High Pass Filter Switch", WM8731_APDIGI, 0, 1, 1), 138SOC_SINGLE("ADC High Pass Filter Switch", WM8731_APDIGI, 0, 1, 1),
132SOC_SINGLE("Store DC Offset Switch", WM8731_APDIGI, 4, 1, 0), 139SOC_SINGLE("Store DC Offset Switch", WM8731_APDIGI, 4, 1, 0),