>From 19778a06ef5bd995ba1e800dc14bbe7ff27dcb97 Mon Sep 17 00:00:00 2001 From: David Henningsson Date: Wed, 8 May 2013 15:28:49 +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 --- include/sound/tlv.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/include/sound/tlv.h b/include/sound/tlv.h index 28c65e1..84fc31a 100644 --- a/include/sound/tlv.h +++ b/include/sound/tlv.h @@ -74,7 +74,10 @@ #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__) -- 1.7.9.5