aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc
diff options
context:
space:
mode:
authorLiam Girdwood <lg@opensource.wolfsonmicro.com>2008-01-10 08:43:48 -0500
committerJaroslav Kysela <perex@perex.cz>2008-01-31 11:29:51 -0500
commit2d6a4ac9eeb8e8eb0343a2c761b2c132957d2b71 (patch)
treee8ceb7423a29b9a944025eb245cf2d8e2b24f56f /sound/soc
parent0a22b87de0467bbc2ce863d54b55c3a7b649ba74 (diff)
[ALSA] soc - Initial WM8753 TLV support for capture mixer
Signed-off-by: Liam Girdwood <lg@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Diffstat (limited to 'sound/soc')
-rw-r--r--sound/soc/codecs/wm8753.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/sound/soc/codecs/wm8753.c b/sound/soc/codecs/wm8753.c
index e6a9b912ba1c..ddd9c71b3fde 100644
--- a/sound/soc/codecs/wm8753.c
+++ b/sound/soc/codecs/wm8753.c
@@ -47,6 +47,7 @@
47#include <sound/soc.h> 47#include <sound/soc.h>
48#include <sound/soc-dapm.h> 48#include <sound/soc-dapm.h>
49#include <sound/initval.h> 49#include <sound/initval.h>
50#include <sound/tlv.h>
50#include <asm/div64.h> 51#include <asm/div64.h>
51 52
52#include "wm8753.h" 53#include "wm8753.h"
@@ -257,6 +258,8 @@ static int wm8753_set_dai(struct snd_kcontrol *kcontrol,
257 return 1; 258 return 1;
258} 259}
259 260
261static const DECLARE_TLV_DB_LINEAR(rec_mix_tlv, -1500, 600);
262
260static const struct snd_kcontrol_new wm8753_snd_controls[] = { 263static const struct snd_kcontrol_new wm8753_snd_controls[] = {
261SOC_DOUBLE_R("PCM Volume", WM8753_LDAC, WM8753_RDAC, 0, 255, 0), 264SOC_DOUBLE_R("PCM Volume", WM8753_LDAC, WM8753_RDAC, 0, 255, 0),
262 265
@@ -286,8 +289,8 @@ SOC_SINGLE("Bass Volume", WM8753_BASS, 0, 15, 1),
286SOC_SINGLE("Treble Volume", WM8753_TREBLE, 0, 15, 1), 289SOC_SINGLE("Treble Volume", WM8753_TREBLE, 0, 15, 1),
287SOC_ENUM("Treble Cut-off", wm8753_enum[2]), 290SOC_ENUM("Treble Cut-off", wm8753_enum[2]),
288 291
289SOC_DOUBLE("Sidetone Capture Volume", WM8753_RECMIX1, 0, 4, 7, 1), 292SOC_DOUBLE_TLV("Sidetone Capture Volume", WM8753_RECMIX1, 0, 4, 7, 1, rec_mix_tlv),
290SOC_SINGLE("Voice Sidetone Capture Volume", WM8753_RECMIX2, 0, 7, 1), 293SOC_SINGLE_TLV("Voice Sidetone Capture Volume", WM8753_RECMIX2, 0, 7, 1, rec_mix_tlv),
291 294
292SOC_DOUBLE_R("Capture Volume", WM8753_LINVOL, WM8753_RINVOL, 0, 63, 0), 295SOC_DOUBLE_R("Capture Volume", WM8753_LINVOL, WM8753_RINVOL, 0, 63, 0),
293SOC_DOUBLE_R("Capture ZC Switch", WM8753_LINVOL, WM8753_RINVOL, 6, 1, 0), 296SOC_DOUBLE_R("Capture ZC Switch", WM8753_LINVOL, WM8753_RINVOL, 6, 1, 0),