From 570aef5de13df21e42eeb90db67e2436bee91bd4 Mon Sep 17 00:00:00 2001 From: Clemens Ladisch Date: Fri, 2 Dec 2011 23:20:00 +0100 Subject: ALSA: tlv: add DECLARE_TLV_CONTAINER() Add the DECLARE_TLV_CONTAINER() macro to allow having static TLVs containing more than one item. Signed-off-by: Clemens Ladisch Signed-off-by: Takashi Iwai --- include/sound/tlv.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'include/sound') diff --git a/include/sound/tlv.h b/include/sound/tlv.h index 137d1654e8d6..a9ff3db38296 100644 --- a/include/sound/tlv.h +++ b/include/sound/tlv.h @@ -43,6 +43,11 @@ #define TLV_LENGTH(...) \ ((unsigned int)sizeof((const unsigned int[]) { __VA_ARGS__ })) +#define TLV_CONTAINER_ITEM(...) \ + TLV_ITEM(SNDRV_CTL_TLVT_CONTAINER, __VA_ARGS__) +#define DECLARE_TLV_CONTAINER(name, ...) \ + unsigned int name[] = { TLV_CONTAINER_ITEM(__VA_ARGS__) } + #define TLV_DB_SCALE_MASK 0xffff #define TLV_DB_SCALE_MUTE 0x10000 #define TLV_DB_SCALE_ITEM(min, step, mute) \ -- cgit v1.2.3