tlv.h 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. /* SPDX-License-Identifier: GPL-2.0-or-later */
  2. #ifndef __SOUND_TLV_H
  3. #define __SOUND_TLV_H
  4. /*
  5. * Advanced Linux Sound Architecture - ALSA - Driver
  6. * Copyright (c) 2006 by Jaroslav Kysela <[email protected]>
  7. */
  8. #include <uapi/sound/tlv.h>
  9. /* For historical reasons, these macros are aliases to the ones in UAPI. */
  10. #define TLV_ITEM SNDRV_CTL_TLVD_ITEM
  11. #define TLV_LENGTH SNDRV_CTL_TLVD_LENGTH
  12. #define TLV_CONTAINER_ITEM SNDRV_CTL_TLVD_CONTAINER_ITEM
  13. #define DECLARE_TLV_CONTAINER SNDRV_CTL_TLVD_DECLARE_CONTAINER
  14. #define TLV_DB_SCALE_MASK SNDRV_CTL_TLVD_DB_SCALE_MASK
  15. #define TLV_DB_SCALE_MUTE SNDRV_CTL_TLVD_DB_SCALE_MUTE
  16. #define TLV_DB_SCALE_ITEM SNDRV_CTL_TLVD_DB_SCALE_ITEM
  17. #define DECLARE_TLV_DB_SCALE SNDRV_CTL_TLVD_DECLARE_DB_SCALE
  18. #define TLV_DB_MINMAX_ITEM SNDRV_CTL_TLVD_DB_MINMAX_ITEM
  19. #define TLV_DB_MINMAX_MUTE_ITEM SNDRV_CTL_TLVD_DB_MINMAX_MUTE_ITEM
  20. #define DECLARE_TLV_DB_MINMAX SNDRV_CTL_TLVD_DECLARE_DB_MINMAX
  21. #define DECLARE_TLV_DB_MINMAX_MUTE SNDRV_CTL_TLVD_DECLARE_DB_MINMAX_MUTE
  22. #define TLV_DB_LINEAR_ITEM SNDRV_CTL_TLVD_DB_LINEAR_ITEM
  23. #define DECLARE_TLV_DB_LINEAR SNDRV_CTL_TLVD_DECLARE_DB_LINEAR
  24. #define TLV_DB_RANGE_ITEM SNDRV_CTL_TLVD_DB_RANGE_ITEM
  25. #define DECLARE_TLV_DB_RANGE SNDRV_CTL_TLVD_DECLARE_DB_RANGE
  26. #define TLV_DB_GAIN_MUTE SNDRV_CTL_TLVD_DB_GAIN_MUTE
  27. /*
  28. * The below assumes that each item TLV is 4 words like DB_SCALE or LINEAR.
  29. * This is an old fasion and obsoleted by commit bf1d1c9b6179("ALSA: tlv: add
  30. * DECLARE_TLV_DB_RANGE()").
  31. */
  32. #define TLV_DB_RANGE_HEAD(num) \
  33. SNDRV_CTL_TLVT_DB_RANGE, 6 * (num) * sizeof(unsigned int)
  34. #endif /* __SOUND_TLV_H */