Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d24f5a9a authored by David Henningsson's avatar David Henningsson Committed by Takashi Iwai
Browse files

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: default avatarDavid Henningsson <david.henningsson@canonical.com>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 17df3f55
Loading
Loading
Loading
Loading
+5 −1
Original line number Original line Diff line number Diff line
@@ -74,7 +74,11 @@
#define DECLARE_TLV_DB_LINEAR(name, min_dB, max_dB)	\
#define DECLARE_TLV_DB_LINEAR(name, min_dB, max_dB)	\
	unsigned int name[] = { TLV_DB_LINEAR_ITEM(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> */
/* Each item is: <min> <max> <TLV> */
#define TLV_DB_RANGE_ITEM(...) \
#define TLV_DB_RANGE_ITEM(...) \
	TLV_ITEM(SNDRV_CTL_TLVT_DB_RANGE, __VA_ARGS__)
	TLV_ITEM(SNDRV_CTL_TLVT_DB_RANGE, __VA_ARGS__)