Skip to content

Commit

Permalink
ALSA: tlv: add DECLARE_TLV_CONTAINER()
Browse files Browse the repository at this point in the history
Add the DECLARE_TLV_CONTAINER() macro to allow having static
TLVs containing more than one item.

Signed-off-by: Clemens Ladisch <[email protected]>
Signed-off-by: Takashi Iwai <[email protected]>
  • Loading branch information
cladisch authored and tiwai committed Jul 16, 2012
1 parent b5b9eb5 commit 570aef5
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions include/sound/tlv.h
Original file line number Diff line number Diff line change
Expand Up @@ -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) \
Expand Down

0 comments on commit 570aef5

Please sign in to comment.