1/****************************************************************************
2 ****************************************************************************
3 ***
4 ***   This header was automatically generated from a Linux kernel header
5 ***   of the same name, to make information necessary for userspace to
6 ***   call into the kernel available to libc.  It contains only constants,
7 ***   structures, and macros generated from the original header, and thus,
8 ***   contains no copyrightable information.
9 ***
10 ***   To edit the content of this header, modify the corresponding
11 ***   source file (e.g. under external/kernel-headers/original/) then
12 ***   run bionic/libc/kernel/tools/update_all.py
13 ***
14 ***   Any manual change here will be lost the next time this script will
15 ***   be run. You've been warned!
16 ***
17 ****************************************************************************
18 ****************************************************************************/
19#ifndef __UAPI_SOUND_TLV_H
20#define __UAPI_SOUND_TLV_H
21#define SNDRV_CTL_TLVT_CONTAINER 0
22#define SNDRV_CTL_TLVT_DB_SCALE 1
23#define SNDRV_CTL_TLVT_DB_LINEAR 2
24#define SNDRV_CTL_TLVT_DB_RANGE 3
25#define SNDRV_CTL_TLVT_DB_MINMAX 4
26#define SNDRV_CTL_TLVT_DB_MINMAX_MUTE 5
27#define SNDRV_CTL_TLVT_CHMAP_FIXED 0x101
28#define SNDRV_CTL_TLVT_CHMAP_VAR 0x102
29#define SNDRV_CTL_TLVT_CHMAP_PAIRED 0x103
30#define SNDRV_CTL_TLVD_ITEM(type,...) (type), SNDRV_CTL_TLVD_LENGTH(__VA_ARGS__), __VA_ARGS__
31#define SNDRV_CTL_TLVD_LENGTH(...) ((unsigned int) sizeof((const unsigned int[]) { __VA_ARGS__ }))
32#define SNDRV_CTL_TLVD_CONTAINER_ITEM(...) SNDRV_CTL_TLVD_ITEM(SNDRV_CTL_TLVT_CONTAINER, __VA_ARGS__)
33#define SNDRV_CTL_TLVD_DECLARE_CONTAINER(name,...) unsigned int name[] = { SNDRV_CTL_TLVD_CONTAINER_ITEM(__VA_ARGS__) }
34#define SNDRV_CTL_TLVD_DB_SCALE_MASK 0xffff
35#define SNDRV_CTL_TLVD_DB_SCALE_MUTE 0x10000
36#define SNDRV_CTL_TLVD_DB_SCALE_ITEM(min,step,mute) SNDRV_CTL_TLVD_ITEM(SNDRV_CTL_TLVT_DB_SCALE, (min), ((step) & SNDRV_CTL_TLVD_DB_SCALE_MASK) | ((mute) ? SNDRV_CTL_TLVD_DB_SCALE_MUTE : 0))
37#define SNDRV_CTL_TLVD_DECLARE_DB_SCALE(name,min,step,mute) unsigned int name[] = { SNDRV_CTL_TLVD_DB_SCALE_ITEM(min, step, mute) }
38#define SNDRV_CTL_TLVD_DB_MINMAX_ITEM(min_dB,max_dB) SNDRV_CTL_TLVD_ITEM(SNDRV_CTL_TLVT_DB_MINMAX, (min_dB), (max_dB))
39#define SNDRV_CTL_TLVD_DB_MINMAX_MUTE_ITEM(min_dB,max_dB) SNDRV_CTL_TLVD_ITEM(SNDRV_CTL_TLVT_DB_MINMAX_MUTE, (min_dB), (max_dB))
40#define SNDRV_CTL_TLVD_DECLARE_DB_MINMAX(name,min_dB,max_dB) unsigned int name[] = { SNDRV_CTL_TLVD_DB_MINMAX_ITEM(min_dB, max_dB) }
41#define SNDRV_CTL_TLVD_DECLARE_DB_MINMAX_MUTE(name,min_dB,max_dB) unsigned int name[] = { SNDRV_CTL_TLVD_DB_MINMAX_MUTE_ITEM(min_dB, max_dB) }
42#define SNDRV_CTL_TLVD_DB_LINEAR_ITEM(min_dB,max_dB) SNDRV_CTL_TLVD_ITEM(SNDRV_CTL_TLVT_DB_LINEAR, (min_dB), (max_dB))
43#define SNDRV_CTL_TLVD_DECLARE_DB_LINEAR(name,min_dB,max_dB) unsigned int name[] = { SNDRV_CTL_TLVD_DB_LINEAR_ITEM(min_dB, max_dB) }
44#define SNDRV_CTL_TLVD_DB_RANGE_ITEM(...) SNDRV_CTL_TLVD_ITEM(SNDRV_CTL_TLVT_DB_RANGE, __VA_ARGS__)
45#define SNDRV_CTL_TLVD_DECLARE_DB_RANGE(name,...) unsigned int name[] = { SNDRV_CTL_TLVD_DB_RANGE_ITEM(__VA_ARGS__) }
46#define SNDRV_CTL_TLVD_DB_GAIN_MUTE - 9999999
47#endif
48