lkml.org 
[lkml]   [2021]   [Oct]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v3 2/2] ASoC: rt9120: Add rt9210 audio amplifier support
ChiYuan Huang <u0084500@gmail.com> 於 2021年10月12日 週二 上午10:47寫道:
>
> Mark Brown <broonie@kernel.org> 於 2021年10月8日 週五 下午8:51寫道:
> >
> > On Fri, Oct 08, 2021 at 12:50:12PM +0800, cy_huang wrote:
> >
> > > +static const struct snd_kcontrol_new rt9120_snd_controls[] = {
> > > + SOC_SINGLE_TLV("MS Volume", RT9120_REG_MSVOL, 0, 2047, 1, digital_gain),
> > > + SOC_SINGLE("SPK Gain", RT9120_REG_SPKGAIN, 0, 7, 0),
> >
> > Volume controls should end in Volume even if they don't have TLV
> > information so applications know how to render them. I'll fix
> > this up as I apply.
>
> It's not linear mapping analog gain and cannot use the TLV as you said.
> Mappling table is listed like as below
> 0 -> 6dB
> 1 -> 8dB
> 2 -> 10dB
> 3 -> 12dB
> 4 -> 13dB
> 5 -> 14dB
> 6 -> 15dB
> 7 -> 16dB
>
> Do I just need to change it to 'SPK Gain Volume' to present this control item?
> Or is there any table mapping for the nonlinear TLV information?

Finally found there's 'DECLARE_TLV_DB_RANGE' that can meet the requirement.
I will fix this by the tlv db range and naming it to 'SPK Gain Volume'.
If there's any changes still needed, please feel free to let me know.

\
 
 \ /
  Last update: 2021-10-12 05:08    [W:1.493 / U:0.032 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site