On Mon, Jul 19, 2010 at 08:57:05AM +0300, Peter Ujfalusi wrote:
On Friday 16 July 2010 15:33:25 ext Mark Brown wrote:
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?
Well, I assume however writes the driver knows how to build up a lookup table which is consistent, so I don't really see a problem.
The problem I see is if the hardware step sizes result in discontinuties in the scale so you can't easily join the top end of one set of values with the bottom end of another you're pretty stuck - joining the ranges up will only work if they can be made to overlap which isn't always going to be the case.
For example, something like:
1: 0 2: 2 3: 4 4: 5 5: 7 6: 9
(a bit artificial but you get the idea) is going to be a bit tricky.
I'll post patches against alsa-lib to fix the _DB_RANGE handling. It will take some time to understand, and fix the code + testing it.
Thanks.