[alsa-devel] TLV question - ranges not in volume order

David Henningsson david.henningsson at canonical.com
Wed May 8 15:33:11 CEST 2013

On 05/08/2013 02:14 PM, Takashi Iwai wrote:
> At Wed, 08 May 2013 14:09:31 +0200,
> Clemens Ladisch wrote:
>> David Henningsson wrote:
>>> I recently came across a strange ASoC volume control. In this case,
>>> the values are not in volume order, i e, the control is declared
>>> something like below.
>>> However alsamixer seems not to handle this "reordering" correctly. My
>>> question is if this is something that should be fixed in alsamixer (or
>>> possibly alsa-lib?), or does one need to write some kind of mapping
>>> table in the kernel, just to make something come in volume order to
>>> userspace?
>> Items in a DB_RANGE container must be ordered by their values *and* by
>> their dB values.  This implies that larger values must correspond with
>> larger dB values, whis is also required for all other mixer controls.
>> If the register values are unordered, the driver must reorder them.
> Yep.  Although there is no explicit definition, it's an implicit rule,
> as we have never implemented the parser code to allow the disorder.
> We should add a text mentioning that somewhere.  A patch is welcome ;)

Like this? (Feel free to apply if you think it's good)

David Henningsson, Canonical Ltd.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-ALSA-Add-comment-for-control-TLV-API.patch
Type: text/x-patch
Size: 1150 bytes
Desc: not available
URL: <http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20130508/610525a4/attachment.bin>

More information about the Alsa-devel mailing list