diff options
author | Clemens Ladisch <clemens@ladisch.de> | 2011-12-02 17:20:00 -0500 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2012-07-16 04:02:16 -0400 |
commit | 570aef5de13df21e42eeb90db67e2436bee91bd4 (patch) | |
tree | 8625d8f3375be1f96bdefedeb373e13012c1ad64 /include/sound | |
parent | b5b9eb546762c4015c67c31364a6ec6f83fd2ada (diff) |
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 <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'include/sound')
-rw-r--r-- | include/sound/tlv.h | 5 |
1 files changed, 5 insertions, 0 deletions
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 @@ | |||
43 | #define TLV_LENGTH(...) \ | 43 | #define TLV_LENGTH(...) \ |
44 | ((unsigned int)sizeof((const unsigned int[]) { __VA_ARGS__ })) | 44 | ((unsigned int)sizeof((const unsigned int[]) { __VA_ARGS__ })) |
45 | 45 | ||
46 | #define TLV_CONTAINER_ITEM(...) \ | ||
47 | TLV_ITEM(SNDRV_CTL_TLVT_CONTAINER, __VA_ARGS__) | ||
48 | #define DECLARE_TLV_CONTAINER(name, ...) \ | ||
49 | unsigned int name[] = { TLV_CONTAINER_ITEM(__VA_ARGS__) } | ||
50 | |||
46 | #define TLV_DB_SCALE_MASK 0xffff | 51 | #define TLV_DB_SCALE_MASK 0xffff |
47 | #define TLV_DB_SCALE_MUTE 0x10000 | 52 | #define TLV_DB_SCALE_MUTE 0x10000 |
48 | #define TLV_DB_SCALE_ITEM(min, step, mute) \ | 53 | #define TLV_DB_SCALE_ITEM(min, step, mute) \ |