[PATCH v3 2/2] ASoC: rt9120: Add rt9210 audio amplifier support

ChiYuan Huang u0084500 at gmail.com
Tue Oct 12 04:47:05 CEST 2021


Mark Brown <broonie at 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?


More information about the Alsa-devel mailing list