[alsa-devel] TLV question - ranges not in volume order
David Henningsson
david.henningsson at canonical.com
Wed May 8 13:21:41 CEST 2013
Hi,
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. I believe the numbers correctly match the hardware.
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?
Any TLV documentation on what TLVs are valid and invalid is also welcome :-)
static const unsigned int tlv[] = {
TLV_DB_RANGE_HEAD(8),
0, 0, TLV_DB_SCALE_ITEM(-100, 0, 1),
1, 1, TLV_DB_SCALE_ITEM(400, 0, 0),
2, 2, TLV_DB_SCALE_ITEM(200, 0, 0),
3, 3, TLV_DB_SCALE_ITEM(1000, 0, 0),
4, 4, TLV_DB_SCALE_ITEM(0, 0, 0),
5, 5, TLV_DB_SCALE_ITEM(800, 0, 0),
6, 6, TLV_DB_SCALE_ITEM(600, 0, 0),
7, 7, TLV_DB_SCALE_ITEM(1200, 0, 0),
};
--
David Henningsson, Canonical Ltd.
https://launchpad.net/~diwic
More information about the Alsa-devel
mailing list