From: Takashi Iwai <tiwai@suse.de>
To: Mark Brown <broonie@kernel.org>
Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>,
Johan Hovold <johan@kernel.org>,
perex@perex.cz, tiwai@suse.com, lgirdwood@gmail.com,
ckeepax@opensource.cirrus.com, kuninori.morimoto.gx@renesas.com,
linux-kernel@vger.kernel.org,
pierre-louis.bossart@linux.intel.com,
alsa-devel@alsa-project.org
Subject: Re: [PATCH] ASoC: codecs: wcd938x: fix dB range for HPHL and HPHR
Date: Fri, 07 Jul 2023 15:30:48 +0200 [thread overview]
Message-ID: <87wmzbkfw7.wl-tiwai@suse.de> (raw)
In-Reply-To: <3450ef1e-cb20-4242-b482-41d3d34c4564@sirena.org.uk>
On Fri, 07 Jul 2023 15:22:45 +0200,
Mark Brown wrote:
>
> On Fri, Jul 07, 2023 at 03:20:10PM +0200, Takashi Iwai wrote:
> > Srinivas Kandagatla wrote:
>
> > > yes, the highest value corresponds to lowest dB which is why its inverted.
>
> > Ouch, that's a bad design choice...
>
> It's moderately common - typically in these cases the control is
> described in the datasheet as an attenuation control rather than a gain,
> and this usually corresponds to the physical implementation being only
> able to make signals smaller relative to the reference.
Yeah, I see the use case. The problem is, however, that we're using
the very same dB info for both gain and attenuation. That means,
application has no idea how to interpret those dB values -- to be
added or to be subtracted.
We should have defined a new TLV type for attenuation to
differentiate, and define the TLV macro to give proper min/max.
Takashi
next prev parent reply other threads:[~2023-07-07 13:30 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-05 12:57 [PATCH] ASoC: codecs: wcd938x: fix dB range for HPHL and HPHR Srinivas Kandagatla
2023-07-06 15:03 ` Mark Brown
2023-07-07 7:35 ` Johan Hovold
2023-07-07 12:37 ` Mark Brown
2023-07-07 12:54 ` Srinivas Kandagatla
2023-07-07 13:20 ` Takashi Iwai
2023-07-07 13:22 ` Mark Brown
2023-07-07 13:30 ` Takashi Iwai [this message]
2023-07-07 13:35 ` Mark Brown
2023-07-07 13:47 ` Takashi Iwai
2023-07-07 15:06 ` Mark Brown
2023-07-10 8:19 ` Takashi Iwai
2023-07-07 13:40 ` Johan Hovold
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87wmzbkfw7.wl-tiwai@suse.de \
--to=tiwai@suse.de \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=ckeepax@opensource.cirrus.com \
--cc=johan@kernel.org \
--cc=kuninori.morimoto.gx@renesas.com \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=perex@perex.cz \
--cc=pierre-louis.bossart@linux.intel.com \
--cc=srinivas.kandagatla@linaro.org \
--cc=tiwai@suse.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox