At Tue, 20 Nov 2007 09:25:37 +0000, Mark Brown wrote: > > From: Liam Girdwood <liam@xxxxxxxxxxxxxxxxxxxxx> > > --- > sound/soc/codecs/wm8753.c | 10 ++++++++-- > 1 files changed, 8 insertions(+), 2 deletions(-) > > diff --git a/sound/soc/codecs/wm8753.c b/sound/soc/codecs/wm8753.c > index efced93..8f2a6d1 100644 > --- a/sound/soc/codecs/wm8753.c > +++ b/sound/soc/codecs/wm8753.c > @@ -48,6 +48,7 @@ > #include <sound/soc.h> > #include <sound/soc-dapm.h> > #include <sound/initval.h> > +#include <sound/tlv.h> > #include <asm/div64.h> > > #include "wm8753.h" > @@ -258,6 +259,11 @@ static int wm8753_set_dai(struct snd_kcontrol *kcontrol, > return 1; > } > > +static const unsigned int rec_mix_tlv[] = { > + TLV_DB_RANGE_HEAD(1), > + 0,7, TLV_DB_LINEAR_ITEM(-1500, 600), > +}; > + You don't need TLV_DB_DB_RANGE_HEAD() for a single range. TLV_DB_RANGE*() is for multiple ranges. Simply use like below: static const DECLARE_TLV_DB_LINEAR(rec_mix_tlv, -500, 600); Takashi > static const struct snd_kcontrol_new wm8753_snd_controls[] = { > SOC_DOUBLE_R("PCM Volume", WM8753_LDAC, WM8753_RDAC, 0, 255, 0), > > @@ -287,8 +293,8 @@ SOC_SINGLE("Bass Volume", WM8753_BASS, 0, 15, 1), > SOC_SINGLE("Treble Volume", WM8753_TREBLE, 0, 15, 1), > SOC_ENUM("Treble Cut-off", wm8753_enum[2]), > > -SOC_DOUBLE("Sidetone Capture Volume", WM8753_RECMIX1, 0, 4, 7, 1), > -SOC_SINGLE("Voice Sidetone Capture Volume", WM8753_RECMIX2, 0, 7, 1), > +SOC_DOUBLE_TLV("Sidetone Capture Volume", WM8753_RECMIX1, 0, 4, 7, 1, rec_mix_tlv), > +SOC_SINGLE_TLV("Voice Sidetone Capture Volume", WM8753_RECMIX2, 0, 7, 1, rec_mix_tlv), > > SOC_DOUBLE_R("Capture Volume", WM8753_LINVOL, WM8753_RINVOL, 0, 63, 0), > SOC_DOUBLE_R("Capture ZC Switch", WM8753_LINVOL, WM8753_RINVOL, 6, 1, 0), > -- > 1.5.3.5 > > _______________________________________________ > Alsa-devel mailing list > Alsa-devel@xxxxxxxxxxxxxxxx > http://mailman.alsa-project.org/mailman/listinfo/alsa-devel > _______________________________________________ Alsa-devel mailing list Alsa-devel@xxxxxxxxxxxxxxxx http://mailman.alsa-project.org/mailman/listinfo/alsa-devel