From d24f5a9ad9febffa53b1d3fcdf36c9a2283d848e Mon Sep 17 00:00:00 2001 From: David Henningsson Date: Wed, 8 May 2013 15:33:11 +0200 Subject: [PATCH] ALSA: Add comment for control TLV API Userspace is not meant to have to handle all strange dB ranges, so add a specification comment. Signed-off-by: David Henningsson Signed-off-by: Takashi Iwai --- include/sound/tlv.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/include/sound/tlv.h b/include/sound/tlv.h index 28c65e1ada21..e11e179420a1 100644 --- a/include/sound/tlv.h +++ b/include/sound/tlv.h @@ -74,7 +74,11 @@ #define DECLARE_TLV_DB_LINEAR(name, min_dB, max_dB) \ unsigned int name[] = { TLV_DB_LINEAR_ITEM(min_dB, max_dB) } -/* dB range container */ +/* dB range container: + * Items in 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 (which is also required for all other mixer controls). + */ /* Each item is: */ #define TLV_DB_RANGE_ITEM(...) \ TLV_ITEM(SNDRV_CTL_TLVT_DB_RANGE, __VA_ARGS__)