lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CADiBU39SKqSULSesj060a62YpMp1hD9ftfMPGtdcbOyZh8iPrw@mail.gmail.com>
Date:   Tue, 12 Oct 2021 11:07:43 +0800
From:   ChiYuan Huang <u0084500@...il.com>
To:     Mark Brown <broonie@...nel.org>
Cc:     oder_chiou@...ltek.com, perex@...ex.cz, tiwai@...e.com,
        Rob Herring <robh+dt@...nel.org>,
        Liam Girdwood <lgirdwood@...il.com>,
        alsa-devel@...a-project.org, lkml <linux-kernel@...r.kernel.org>,
        cy_huang <cy_huang@...htek.com>,
        "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" 
        <devicetree@...r.kernel.org>, allen lin <allen_lin@...htek.com>
Subject: Re: [PATCH v3 2/2] ASoC: rt9120: Add rt9210 audio amplifier support

ChiYuan Huang <u0084500@...il.com> 於 2021年10月12日 週二 上午10:47寫道:
>
> Mark Brown <broonie@...nel.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.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ