blob: 0822429ec46578d25babab056b7093aed4c635ca [file] [log] [blame]
Christopher Ferris05d08e92016-02-04 13:16:38 -08001/****************************************************************************
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
Christopher Ferris05d08e92016-02-04 13:16:38 -080023#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
Christopher Ferris05d08e92016-02-04 13:16:38 -080027#define SNDRV_CTL_TLVT_CHMAP_FIXED 0x101
28#define SNDRV_CTL_TLVT_CHMAP_VAR 0x102
29#define SNDRV_CTL_TLVT_CHMAP_PAIRED 0x103
Christopher Ferris6a9755d2017-01-13 14:09:31 -080030#define SNDRV_CTL_TLVD_ITEM(type,...) (type), SNDRV_CTL_TLVD_LENGTH(__VA_ARGS__), __VA_ARGS__
Christopher Ferris6a9755d2017-01-13 14:09:31 -080031#define SNDRV_CTL_TLVD_LENGTH(...) ((unsigned int) sizeof((const unsigned int[]) { __VA_ARGS__ }))
Christopher Ferris9ce28842018-10-25 12:11:39 -070032#define SNDRV_CTL_TLVO_TYPE 0
33#define SNDRV_CTL_TLVO_LEN 1
Christopher Ferris6a9755d2017-01-13 14:09:31 -080034#define SNDRV_CTL_TLVD_CONTAINER_ITEM(...) SNDRV_CTL_TLVD_ITEM(SNDRV_CTL_TLVT_CONTAINER, __VA_ARGS__)
35#define SNDRV_CTL_TLVD_DECLARE_CONTAINER(name,...) unsigned int name[] = { SNDRV_CTL_TLVD_CONTAINER_ITEM(__VA_ARGS__) }
36#define SNDRV_CTL_TLVD_DB_SCALE_MASK 0xffff
Christopher Ferris6a9755d2017-01-13 14:09:31 -080037#define SNDRV_CTL_TLVD_DB_SCALE_MUTE 0x10000
38#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))
39#define SNDRV_CTL_TLVD_DECLARE_DB_SCALE(name,min,step,mute) unsigned int name[] = { SNDRV_CTL_TLVD_DB_SCALE_ITEM(min, step, mute) }
Christopher Ferris9ce28842018-10-25 12:11:39 -070040#define SNDRV_CTL_TLVO_DB_SCALE_MIN 2
41#define SNDRV_CTL_TLVO_DB_SCALE_MUTE_AND_STEP 3
Christopher Ferris6a9755d2017-01-13 14:09:31 -080042#define SNDRV_CTL_TLVD_DB_MINMAX_ITEM(min_dB,max_dB) SNDRV_CTL_TLVD_ITEM(SNDRV_CTL_TLVT_DB_MINMAX, (min_dB), (max_dB))
Christopher Ferris6a9755d2017-01-13 14:09:31 -080043#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))
44#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) }
45#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) }
Christopher Ferris9ce28842018-10-25 12:11:39 -070046#define SNDRV_CTL_TLVO_DB_MINMAX_MIN 2
47#define SNDRV_CTL_TLVO_DB_MINMAX_MAX 3
Christopher Ferris6a9755d2017-01-13 14:09:31 -080048#define SNDRV_CTL_TLVD_DB_LINEAR_ITEM(min_dB,max_dB) SNDRV_CTL_TLVD_ITEM(SNDRV_CTL_TLVT_DB_LINEAR, (min_dB), (max_dB))
Christopher Ferris6a9755d2017-01-13 14:09:31 -080049#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) }
Christopher Ferris9ce28842018-10-25 12:11:39 -070050#define SNDRV_CTL_TLVO_DB_LINEAR_MIN 2
51#define SNDRV_CTL_TLVO_DB_LINEAR_MAX 3
Christopher Ferris6a9755d2017-01-13 14:09:31 -080052#define SNDRV_CTL_TLVD_DB_RANGE_ITEM(...) SNDRV_CTL_TLVD_ITEM(SNDRV_CTL_TLVT_DB_RANGE, __VA_ARGS__)
53#define SNDRV_CTL_TLVD_DECLARE_DB_RANGE(name,...) unsigned int name[] = { SNDRV_CTL_TLVD_DB_RANGE_ITEM(__VA_ARGS__) }
54#define SNDRV_CTL_TLVD_DB_GAIN_MUTE - 9999999
Christopher Ferris6a9755d2017-01-13 14:09:31 -080055#endif