]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - include/sound/tlv.h
Merge branch 'x86-efi-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
[karo-tx-linux.git] / include / sound / tlv.h
index 137d1654e8d6d8b949e4ca91022594bd2dbbe567..a64d8fe3f855b408e5c45ffae359d23ebb6db7eb 100644 (file)
 #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)                     \
 
 /* dB range container */
 /* Each item is: <min> <max> <TLV> */
+#define TLV_DB_RANGE_ITEM(...) \
+       TLV_ITEM(SNDRV_CTL_TLVT_DB_RANGE, __VA_ARGS__)
+#define DECLARE_TLV_DB_RANGE(name, ...) \
+       unsigned int name[] = { TLV_DB_RANGE_ITEM(__VA_ARGS__) }
 /* The below assumes that each item TLV is 4 words like DB_SCALE or LINEAR */
 #define TLV_DB_RANGE_HEAD(num)                 \
        SNDRV_CTL_TLVT_DB_RANGE, 6 * (num) * sizeof(unsigned int)