[alsa-devel] [PATCH - alsa-lib 2/3] tlv: Handle 'holes' in SND_CTL_TLVT_DB_RANGE array

Mark Brown broonie at opensource.wolfsonmicro.com
Mon Jul 19 19:09:47 CEST 2010


On Mon, Jul 19, 2010 at 06:44:31PM +0200, Takashi Iwai wrote:

> The guess work isn't always trivial.  If the hardware switches the
> curve between log and linear over a hole, which should be taken for a
> value in the hole?  Whne TLV is given for the hole, at least it's a
> good hint.

I don't see what difference the curves make here?  However the gap is
expressed only the points at either end are selectable (and there's
always the chance that this is part of a series of random individual
points with no particular curve through them).

> > Personally I'd rather the kernel just provided a mapping between control
> > values and dB scales and then the application layer can decide what it
> > thinks an appropriate match is.  Decisions about how accurate a match is
> > needed seem very policy like and therefore userspaceish and it seems
> > wrong to be coding the data tables in the kernel in a way that works
> > around the particular match algorithm in the application layer.

> User space can check the correctness always by checking the reverse
> conversion between dB <-> value again.

It still seems silly to have to paper over this for every single dB
interval - if we need to link up the ranges it seems like we ought to
be fixing this in one place.


More information about the Alsa-devel mailing list