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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Jul 19, 2010 at 05:51:27PM +0200, Takashi Iwai wrote:
> Peter Ujfalusi wrote:

> > If user asks for 1dB the snd_tlv_convert_from_dB will not find
> > the raw value, since the 1dB is not part of either range.

> In the case above, can't you set like

> 	TLV_DB_RANGE_HEAD(2),
> 	0, 2, TLV_DB_SCALE_ITEM(-1000, 500, 0),
> 	2, 4, TLV_DB_SCALE_ITEM(0, 200, 0)

> ??

So, this came from a review comment from me in response to a patch doing
just that.  The issue I had was that this definition of overlapping
ranges really feels like the kernel is bodging around limitations of the
userspace library - the library is already trying to find the best match
among the actual dB values available, it seems silly that it requires
the kernel to provide patches between the ranges.  It's moderately
painful, especially if you have a bunch of values that aren't very well
joined together in the hardware.
_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel


[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux