From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Cc: alsa-devel@alsa-project.org, "lrg@slimlogic.co.uk" <lrg@slimlogic.co.uk>
Subject: Re: [PATCH 0/3] ASoC: twl4030/tpa6130a2:?DB_RANGE mapping fixes
Date: Fri, 16 Jul 2010 13:33:25 +0100 [thread overview]
Message-ID: <20100716123325.GA18152@rakim.wolfsonmicro.main> (raw)
In-Reply-To: <201007161405.40985.peter.ujfalusi@nokia.com>
On Fri, Jul 16, 2010 at 02:05:40PM +0300, Peter Ujfalusi wrote:
> On Friday 16 July 2010 13:24:05 ext Mark Brown wrote:
> > - it doesn't seem right to specify two values for the indexes at the edge of
> > each range,
> Sort of.
> The tlv struct is a lookup table for the dB mapping.
> Query the raw value, and it will return the associated dB.
> If you ask for dB value, it will go through the table, and try to find the best
> matching raw value (with up or down rounding).
Sure, and the forward mapping in particular seems to make it very clear
what should be happening here. The way I'd parse this the ability to
specify ranges is just a way of saving on typing and we should always
end up with single mapping entries between raw values and dB values.
The API is inherently getting a list of specific point values, it's just
using a compact encoding for some of them.
> In both cases, if you query based on raw value, you get the same dB.
> In both cases, if you ask for -10, -5, 0, 2, or 4 dB, you get the same raw.
> In both case, if you ask for less than -10dB, than you get 0 as raw
> In both case, if you ask for bigger than 4dB, than it is not changing the volume
> (I think this is really a bug, it should pick 4).
Isn't this going to get messy when the increments don't line up so that
it's easy to overlap the start of one range with the beginning of the
next?
> Probably alsa-lib can be fixed somehow to look in between the ranges, when it is
> looking for certain dB value, but at first look it is not that straight forward.
Well, I'd expect it to do something like go through all the ranges
available and look for the closest match which doesn't seem terribly
complex. I haven't looked at the code at all, though.
next prev parent reply other threads:[~2010-07-16 12:33 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-16 10:17 [PATCH 0/3] ASoC: twl4030/tpa6130a2: DB_RANGE mapping fixes Peter Ujfalusi
2010-07-16 10:17 ` [PATCH 1/3] ASoC: TWL4030: Fix DB_RANGE tlv mapping for digital loopback Peter Ujfalusi
2010-07-16 10:17 ` [PATCH 2/3] ASoC: tpa6130a2: Fix DB_RANGE mapping for tpa6130a2 chip Peter Ujfalusi
2010-07-16 10:17 ` [PATCH 3/3] ASoC: tpa6130a2: Fix DB_RANGE mapping for tpa6140a2 chip Peter Ujfalusi
2010-07-16 10:24 ` [PATCH 0/3] ASoC: twl4030/tpa6130a2: DB_RANGE mapping fixes Mark Brown
2010-07-16 11:05 ` Peter Ujfalusi
2010-07-16 12:33 ` Mark Brown [this message]
2010-07-19 5:57 ` [PATCH 0/3] ASoC: twl4030/tpa6130a2:?DB_RANGE " Peter Ujfalusi
2010-07-19 8:51 ` Mark Brown
2010-07-19 9:14 ` Peter Ujfalusi
2010-07-19 10:30 ` Mark Brown
2010-07-19 10:32 ` Peter Ujfalusi
2010-07-19 10:43 ` Peter Ujfalusi
2010-07-19 16:25 ` Takashi Iwai
2010-07-20 5:39 ` Peter Ujfalusi
2010-07-20 5:42 ` Takashi Iwai
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=20100716123325.GA18152@rakim.wolfsonmicro.main \
--to=broonie@opensource.wolfsonmicro.com \
--cc=alsa-devel@alsa-project.org \
--cc=lrg@slimlogic.co.uk \
--cc=peter.ujfalusi@nokia.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;
as well as URLs for NNTP newsgroup(s).