]> Pileus Git - ~andy/linux/commitdiff
ALSA: Add comment for control TLV API
authorDavid Henningsson <david.henningsson@canonical.com>
Wed, 8 May 2013 13:33:11 +0000 (15:33 +0200)
committerTakashi Iwai <tiwai@suse.de>
Wed, 8 May 2013 13:43:56 +0000 (15:43 +0200)
Userspace is not meant to have to handle all strange dB ranges,
so add a specification comment.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
include/sound/tlv.h

index 28c65e1ada21e8f632422055d70d66789d63a3d5..e11e179420a11fb07bce24e48e960bfdba9671a4 100644 (file)
 #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: <min> <max> <TLV> */
 #define TLV_DB_RANGE_ITEM(...) \
        TLV_ITEM(SNDRV_CTL_TLVT_DB_RANGE, __VA_ARGS__)