122851890Sopenharmony_ci/****************************************************************************
222851890Sopenharmony_ci ****************************************************************************
322851890Sopenharmony_ci ***
422851890Sopenharmony_ci ***   This header was automatically generated from a Linux kernel header
522851890Sopenharmony_ci ***   of the same name, to make information necessary for userspace to
622851890Sopenharmony_ci ***   call into the kernel available to libc.  It contains only constants,
722851890Sopenharmony_ci ***   structures, and macros generated from the original header, and thus,
822851890Sopenharmony_ci ***   contains no copyrightable information.
922851890Sopenharmony_ci ***
1022851890Sopenharmony_ci ***   To edit the content of this header, modify the corresponding
1122851890Sopenharmony_ci ***   source file (e.g. under external/kernel-headers/original/) then
1222851890Sopenharmony_ci ***   run bionic/libc/kernel/tools/update_all.py
1322851890Sopenharmony_ci ***
1422851890Sopenharmony_ci ***   Any manual change here will be lost the next time this script will
1522851890Sopenharmony_ci ***   be run. You've been warned!
1622851890Sopenharmony_ci ***
1722851890Sopenharmony_ci ****************************************************************************
1822851890Sopenharmony_ci ****************************************************************************/
1922851890Sopenharmony_ci#ifndef _UAPI__SOUND_ASOUND_H
2022851890Sopenharmony_ci#define _UAPI__SOUND_ASOUND_H
2122851890Sopenharmony_ci#ifdef __linux__
2222851890Sopenharmony_ci#include <linux/types.h>
2322851890Sopenharmony_ci#include <asm/byteorder.h>
2422851890Sopenharmony_ci#else
2522851890Sopenharmony_ci#include <endian.h>
2622851890Sopenharmony_ci#include <sys/ioctl.h>
2722851890Sopenharmony_ci#endif
2822851890Sopenharmony_ci#include <stdlib.h>
2922851890Sopenharmony_ci#include <time.h>
3022851890Sopenharmony_ci#define SNDRV_PROTOCOL_VERSION(major,minor,subminor) (((major) << 16) | ((minor) << 8) | (subminor))
3122851890Sopenharmony_ci#define SNDRV_PROTOCOL_MAJOR(version) (((version) >> 16) & 0xffff)
3222851890Sopenharmony_ci#define SNDRV_PROTOCOL_MINOR(version) (((version) >> 8) & 0xff)
3322851890Sopenharmony_ci#define SNDRV_PROTOCOL_MICRO(version) ((version) & 0xff)
3422851890Sopenharmony_ci#define SNDRV_PROTOCOL_INCOMPATIBLE(kversion,uversion) (SNDRV_PROTOCOL_MAJOR(kversion) != SNDRV_PROTOCOL_MAJOR(uversion) || (SNDRV_PROTOCOL_MAJOR(kversion) == SNDRV_PROTOCOL_MAJOR(uversion) && SNDRV_PROTOCOL_MINOR(kversion) != SNDRV_PROTOCOL_MINOR(uversion)))
3522851890Sopenharmony_cistruct snd_aes_iec958 {
3622851890Sopenharmony_ci  unsigned char status[24];
3722851890Sopenharmony_ci  unsigned char subcode[147];
3822851890Sopenharmony_ci  unsigned char pad;
3922851890Sopenharmony_ci  unsigned char dig_subframe[4];
4022851890Sopenharmony_ci};
4122851890Sopenharmony_cistruct snd_cea_861_aud_if {
4222851890Sopenharmony_ci  unsigned char db1_ct_cc;
4322851890Sopenharmony_ci  unsigned char db2_sf_ss;
4422851890Sopenharmony_ci  unsigned char db3;
4522851890Sopenharmony_ci  unsigned char db4_ca;
4622851890Sopenharmony_ci  unsigned char db5_dminh_lsv;
4722851890Sopenharmony_ci};
4822851890Sopenharmony_ci#define SNDRV_HWDEP_VERSION SNDRV_PROTOCOL_VERSION(1, 0, 1)
4922851890Sopenharmony_cienum {
5022851890Sopenharmony_ci  SNDRV_HWDEP_IFACE_OPL2 = 0,
5122851890Sopenharmony_ci  SNDRV_HWDEP_IFACE_OPL3,
5222851890Sopenharmony_ci  SNDRV_HWDEP_IFACE_OPL4,
5322851890Sopenharmony_ci  SNDRV_HWDEP_IFACE_SB16CSP,
5422851890Sopenharmony_ci  SNDRV_HWDEP_IFACE_EMU10K1,
5522851890Sopenharmony_ci  SNDRV_HWDEP_IFACE_YSS225,
5622851890Sopenharmony_ci  SNDRV_HWDEP_IFACE_ICS2115,
5722851890Sopenharmony_ci  SNDRV_HWDEP_IFACE_SSCAPE,
5822851890Sopenharmony_ci  SNDRV_HWDEP_IFACE_VX,
5922851890Sopenharmony_ci  SNDRV_HWDEP_IFACE_MIXART,
6022851890Sopenharmony_ci  SNDRV_HWDEP_IFACE_USX2Y,
6122851890Sopenharmony_ci  SNDRV_HWDEP_IFACE_EMUX_WAVETABLE,
6222851890Sopenharmony_ci  SNDRV_HWDEP_IFACE_BLUETOOTH,
6322851890Sopenharmony_ci  SNDRV_HWDEP_IFACE_USX2Y_PCM,
6422851890Sopenharmony_ci  SNDRV_HWDEP_IFACE_PCXHR,
6522851890Sopenharmony_ci  SNDRV_HWDEP_IFACE_SB_RC,
6622851890Sopenharmony_ci  SNDRV_HWDEP_IFACE_HDA,
6722851890Sopenharmony_ci  SNDRV_HWDEP_IFACE_USB_STREAM,
6822851890Sopenharmony_ci  SNDRV_HWDEP_IFACE_FW_DICE,
6922851890Sopenharmony_ci  SNDRV_HWDEP_IFACE_FW_FIREWORKS,
7022851890Sopenharmony_ci  SNDRV_HWDEP_IFACE_FW_BEBOB,
7122851890Sopenharmony_ci  SNDRV_HWDEP_IFACE_FW_OXFW,
7222851890Sopenharmony_ci  SNDRV_HWDEP_IFACE_FW_DIGI00X,
7322851890Sopenharmony_ci  SNDRV_HWDEP_IFACE_FW_TASCAM,
7422851890Sopenharmony_ci  SNDRV_HWDEP_IFACE_LINE6,
7522851890Sopenharmony_ci  SNDRV_HWDEP_IFACE_FW_MOTU,
7622851890Sopenharmony_ci  SNDRV_HWDEP_IFACE_FW_FIREFACE,
7722851890Sopenharmony_ci  SNDRV_HWDEP_IFACE_LAST = SNDRV_HWDEP_IFACE_FW_FIREFACE
7822851890Sopenharmony_ci};
7922851890Sopenharmony_cistruct snd_hwdep_info {
8022851890Sopenharmony_ci  unsigned int device;
8122851890Sopenharmony_ci  int card;
8222851890Sopenharmony_ci  unsigned char id[64];
8322851890Sopenharmony_ci  unsigned char name[80];
8422851890Sopenharmony_ci  int iface;
8522851890Sopenharmony_ci  unsigned char reserved[64];
8622851890Sopenharmony_ci};
8722851890Sopenharmony_cistruct snd_hwdep_dsp_status {
8822851890Sopenharmony_ci  unsigned int version;
8922851890Sopenharmony_ci  unsigned char id[32];
9022851890Sopenharmony_ci  unsigned int num_dsps;
9122851890Sopenharmony_ci  unsigned int dsp_loaded;
9222851890Sopenharmony_ci  unsigned int chip_ready;
9322851890Sopenharmony_ci  unsigned char reserved[16];
9422851890Sopenharmony_ci};
9522851890Sopenharmony_cistruct snd_hwdep_dsp_image {
9622851890Sopenharmony_ci  unsigned int index;
9722851890Sopenharmony_ci  unsigned char name[64];
9822851890Sopenharmony_ci  unsigned char __user * image;
9922851890Sopenharmony_ci  size_t length;
10022851890Sopenharmony_ci  unsigned long driver_data;
10122851890Sopenharmony_ci};
10222851890Sopenharmony_ci#define SNDRV_HWDEP_IOCTL_PVERSION _IOR('H', 0x00, int)
10322851890Sopenharmony_ci#define SNDRV_HWDEP_IOCTL_INFO _IOR('H', 0x01, struct snd_hwdep_info)
10422851890Sopenharmony_ci#define SNDRV_HWDEP_IOCTL_DSP_STATUS _IOR('H', 0x02, struct snd_hwdep_dsp_status)
10522851890Sopenharmony_ci#define SNDRV_HWDEP_IOCTL_DSP_LOAD _IOW('H', 0x03, struct snd_hwdep_dsp_image)
10622851890Sopenharmony_ci#define SNDRV_PCM_VERSION SNDRV_PROTOCOL_VERSION(2, 0, 15)
10722851890Sopenharmony_citypedef unsigned long snd_pcm_uframes_t;
10822851890Sopenharmony_citypedef signed long snd_pcm_sframes_t;
10922851890Sopenharmony_cienum {
11022851890Sopenharmony_ci  SNDRV_PCM_CLASS_GENERIC = 0,
11122851890Sopenharmony_ci  SNDRV_PCM_CLASS_MULTI,
11222851890Sopenharmony_ci  SNDRV_PCM_CLASS_MODEM,
11322851890Sopenharmony_ci  SNDRV_PCM_CLASS_DIGITIZER,
11422851890Sopenharmony_ci  SNDRV_PCM_CLASS_LAST = SNDRV_PCM_CLASS_DIGITIZER,
11522851890Sopenharmony_ci};
11622851890Sopenharmony_cienum {
11722851890Sopenharmony_ci  SNDRV_PCM_SUBCLASS_GENERIC_MIX = 0,
11822851890Sopenharmony_ci  SNDRV_PCM_SUBCLASS_MULTI_MIX,
11922851890Sopenharmony_ci  SNDRV_PCM_SUBCLASS_LAST = SNDRV_PCM_SUBCLASS_MULTI_MIX,
12022851890Sopenharmony_ci};
12122851890Sopenharmony_cienum {
12222851890Sopenharmony_ci  SNDRV_PCM_STREAM_PLAYBACK = 0,
12322851890Sopenharmony_ci  SNDRV_PCM_STREAM_CAPTURE,
12422851890Sopenharmony_ci  SNDRV_PCM_STREAM_LAST = SNDRV_PCM_STREAM_CAPTURE,
12522851890Sopenharmony_ci};
12622851890Sopenharmony_citypedef int __bitwise snd_pcm_access_t;
12722851890Sopenharmony_ci#define SNDRV_PCM_ACCESS_MMAP_INTERLEAVED ((__force snd_pcm_access_t) 0)
12822851890Sopenharmony_ci#define SNDRV_PCM_ACCESS_MMAP_NONINTERLEAVED ((__force snd_pcm_access_t) 1)
12922851890Sopenharmony_ci#define SNDRV_PCM_ACCESS_MMAP_COMPLEX ((__force snd_pcm_access_t) 2)
13022851890Sopenharmony_ci#define SNDRV_PCM_ACCESS_RW_INTERLEAVED ((__force snd_pcm_access_t) 3)
13122851890Sopenharmony_ci#define SNDRV_PCM_ACCESS_RW_NONINTERLEAVED ((__force snd_pcm_access_t) 4)
13222851890Sopenharmony_ci#define SNDRV_PCM_ACCESS_LAST SNDRV_PCM_ACCESS_RW_NONINTERLEAVED
13322851890Sopenharmony_citypedef int __bitwise snd_pcm_format_t;
13422851890Sopenharmony_ci#define SNDRV_PCM_FORMAT_S8 ((__force snd_pcm_format_t) 0)
13522851890Sopenharmony_ci#define SNDRV_PCM_FORMAT_U8 ((__force snd_pcm_format_t) 1)
13622851890Sopenharmony_ci#define SNDRV_PCM_FORMAT_S16_LE ((__force snd_pcm_format_t) 2)
13722851890Sopenharmony_ci#define SNDRV_PCM_FORMAT_S16_BE ((__force snd_pcm_format_t) 3)
13822851890Sopenharmony_ci#define SNDRV_PCM_FORMAT_U16_LE ((__force snd_pcm_format_t) 4)
13922851890Sopenharmony_ci#define SNDRV_PCM_FORMAT_U16_BE ((__force snd_pcm_format_t) 5)
14022851890Sopenharmony_ci#define SNDRV_PCM_FORMAT_S24_LE ((__force snd_pcm_format_t) 6)
14122851890Sopenharmony_ci#define SNDRV_PCM_FORMAT_S24_BE ((__force snd_pcm_format_t) 7)
14222851890Sopenharmony_ci#define SNDRV_PCM_FORMAT_U24_LE ((__force snd_pcm_format_t) 8)
14322851890Sopenharmony_ci#define SNDRV_PCM_FORMAT_U24_BE ((__force snd_pcm_format_t) 9)
14422851890Sopenharmony_ci#define SNDRV_PCM_FORMAT_S32_LE ((__force snd_pcm_format_t) 10)
14522851890Sopenharmony_ci#define SNDRV_PCM_FORMAT_S32_BE ((__force snd_pcm_format_t) 11)
14622851890Sopenharmony_ci#define SNDRV_PCM_FORMAT_U32_LE ((__force snd_pcm_format_t) 12)
14722851890Sopenharmony_ci#define SNDRV_PCM_FORMAT_U32_BE ((__force snd_pcm_format_t) 13)
14822851890Sopenharmony_ci#define SNDRV_PCM_FORMAT_FLOAT_LE ((__force snd_pcm_format_t) 14)
14922851890Sopenharmony_ci#define SNDRV_PCM_FORMAT_FLOAT_BE ((__force snd_pcm_format_t) 15)
15022851890Sopenharmony_ci#define SNDRV_PCM_FORMAT_FLOAT64_LE ((__force snd_pcm_format_t) 16)
15122851890Sopenharmony_ci#define SNDRV_PCM_FORMAT_FLOAT64_BE ((__force snd_pcm_format_t) 17)
15222851890Sopenharmony_ci#define SNDRV_PCM_FORMAT_IEC958_SUBFRAME_LE ((__force snd_pcm_format_t) 18)
15322851890Sopenharmony_ci#define SNDRV_PCM_FORMAT_IEC958_SUBFRAME_BE ((__force snd_pcm_format_t) 19)
15422851890Sopenharmony_ci#define SNDRV_PCM_FORMAT_MU_LAW ((__force snd_pcm_format_t) 20)
15522851890Sopenharmony_ci#define SNDRV_PCM_FORMAT_A_LAW ((__force snd_pcm_format_t) 21)
15622851890Sopenharmony_ci#define SNDRV_PCM_FORMAT_IMA_ADPCM ((__force snd_pcm_format_t) 22)
15722851890Sopenharmony_ci#define SNDRV_PCM_FORMAT_MPEG ((__force snd_pcm_format_t) 23)
15822851890Sopenharmony_ci#define SNDRV_PCM_FORMAT_GSM ((__force snd_pcm_format_t) 24)
15922851890Sopenharmony_ci#define SNDRV_PCM_FORMAT_S20_LE ((__force snd_pcm_format_t) 25)
16022851890Sopenharmony_ci#define SNDRV_PCM_FORMAT_S20_BE ((__force snd_pcm_format_t) 26)
16122851890Sopenharmony_ci#define SNDRV_PCM_FORMAT_U20_LE ((__force snd_pcm_format_t) 27)
16222851890Sopenharmony_ci#define SNDRV_PCM_FORMAT_U20_BE ((__force snd_pcm_format_t) 28)
16322851890Sopenharmony_ci#define SNDRV_PCM_FORMAT_SPECIAL ((__force snd_pcm_format_t) 31)
16422851890Sopenharmony_ci#define SNDRV_PCM_FORMAT_S24_3LE ((__force snd_pcm_format_t) 32)
16522851890Sopenharmony_ci#define SNDRV_PCM_FORMAT_S24_3BE ((__force snd_pcm_format_t) 33)
16622851890Sopenharmony_ci#define SNDRV_PCM_FORMAT_U24_3LE ((__force snd_pcm_format_t) 34)
16722851890Sopenharmony_ci#define SNDRV_PCM_FORMAT_U24_3BE ((__force snd_pcm_format_t) 35)
16822851890Sopenharmony_ci#define SNDRV_PCM_FORMAT_S20_3LE ((__force snd_pcm_format_t) 36)
16922851890Sopenharmony_ci#define SNDRV_PCM_FORMAT_S20_3BE ((__force snd_pcm_format_t) 37)
17022851890Sopenharmony_ci#define SNDRV_PCM_FORMAT_U20_3LE ((__force snd_pcm_format_t) 38)
17122851890Sopenharmony_ci#define SNDRV_PCM_FORMAT_U20_3BE ((__force snd_pcm_format_t) 39)
17222851890Sopenharmony_ci#define SNDRV_PCM_FORMAT_S18_3LE ((__force snd_pcm_format_t) 40)
17322851890Sopenharmony_ci#define SNDRV_PCM_FORMAT_S18_3BE ((__force snd_pcm_format_t) 41)
17422851890Sopenharmony_ci#define SNDRV_PCM_FORMAT_U18_3LE ((__force snd_pcm_format_t) 42)
17522851890Sopenharmony_ci#define SNDRV_PCM_FORMAT_U18_3BE ((__force snd_pcm_format_t) 43)
17622851890Sopenharmony_ci#define SNDRV_PCM_FORMAT_G723_24 ((__force snd_pcm_format_t) 44)
17722851890Sopenharmony_ci#define SNDRV_PCM_FORMAT_G723_24_1B ((__force snd_pcm_format_t) 45)
17822851890Sopenharmony_ci#define SNDRV_PCM_FORMAT_G723_40 ((__force snd_pcm_format_t) 46)
17922851890Sopenharmony_ci#define SNDRV_PCM_FORMAT_G723_40_1B ((__force snd_pcm_format_t) 47)
18022851890Sopenharmony_ci#define SNDRV_PCM_FORMAT_DSD_U8 ((__force snd_pcm_format_t) 48)
18122851890Sopenharmony_ci#define SNDRV_PCM_FORMAT_DSD_U16_LE ((__force snd_pcm_format_t) 49)
18222851890Sopenharmony_ci#define SNDRV_PCM_FORMAT_DSD_U32_LE ((__force snd_pcm_format_t) 50)
18322851890Sopenharmony_ci#define SNDRV_PCM_FORMAT_DSD_U16_BE ((__force snd_pcm_format_t) 51)
18422851890Sopenharmony_ci#define SNDRV_PCM_FORMAT_DSD_U32_BE ((__force snd_pcm_format_t) 52)
18522851890Sopenharmony_ci#define SNDRV_PCM_FORMAT_LAST SNDRV_PCM_FORMAT_DSD_U32_BE
18622851890Sopenharmony_ci#define SNDRV_PCM_FORMAT_FIRST SNDRV_PCM_FORMAT_S8
18722851890Sopenharmony_ci#ifdef SNDRV_LITTLE_ENDIAN
18822851890Sopenharmony_ci#define SNDRV_PCM_FORMAT_S16 SNDRV_PCM_FORMAT_S16_LE
18922851890Sopenharmony_ci#define SNDRV_PCM_FORMAT_U16 SNDRV_PCM_FORMAT_U16_LE
19022851890Sopenharmony_ci#define SNDRV_PCM_FORMAT_S24 SNDRV_PCM_FORMAT_S24_LE
19122851890Sopenharmony_ci#define SNDRV_PCM_FORMAT_U24 SNDRV_PCM_FORMAT_U24_LE
19222851890Sopenharmony_ci#define SNDRV_PCM_FORMAT_S32 SNDRV_PCM_FORMAT_S32_LE
19322851890Sopenharmony_ci#define SNDRV_PCM_FORMAT_U32 SNDRV_PCM_FORMAT_U32_LE
19422851890Sopenharmony_ci#define SNDRV_PCM_FORMAT_FLOAT SNDRV_PCM_FORMAT_FLOAT_LE
19522851890Sopenharmony_ci#define SNDRV_PCM_FORMAT_FLOAT64 SNDRV_PCM_FORMAT_FLOAT64_LE
19622851890Sopenharmony_ci#define SNDRV_PCM_FORMAT_IEC958_SUBFRAME SNDRV_PCM_FORMAT_IEC958_SUBFRAME_LE
19722851890Sopenharmony_ci#define SNDRV_PCM_FORMAT_S20 SNDRV_PCM_FORMAT_S20_LE
19822851890Sopenharmony_ci#define SNDRV_PCM_FORMAT_U20 SNDRV_PCM_FORMAT_U20_LE
19922851890Sopenharmony_ci#endif
20022851890Sopenharmony_ci#ifdef SNDRV_BIG_ENDIAN
20122851890Sopenharmony_ci#define SNDRV_PCM_FORMAT_S16 SNDRV_PCM_FORMAT_S16_BE
20222851890Sopenharmony_ci#define SNDRV_PCM_FORMAT_U16 SNDRV_PCM_FORMAT_U16_BE
20322851890Sopenharmony_ci#define SNDRV_PCM_FORMAT_S24 SNDRV_PCM_FORMAT_S24_BE
20422851890Sopenharmony_ci#define SNDRV_PCM_FORMAT_U24 SNDRV_PCM_FORMAT_U24_BE
20522851890Sopenharmony_ci#define SNDRV_PCM_FORMAT_S32 SNDRV_PCM_FORMAT_S32_BE
20622851890Sopenharmony_ci#define SNDRV_PCM_FORMAT_U32 SNDRV_PCM_FORMAT_U32_BE
20722851890Sopenharmony_ci#define SNDRV_PCM_FORMAT_FLOAT SNDRV_PCM_FORMAT_FLOAT_BE
20822851890Sopenharmony_ci#define SNDRV_PCM_FORMAT_FLOAT64 SNDRV_PCM_FORMAT_FLOAT64_BE
20922851890Sopenharmony_ci#define SNDRV_PCM_FORMAT_IEC958_SUBFRAME SNDRV_PCM_FORMAT_IEC958_SUBFRAME_BE
21022851890Sopenharmony_ci#define SNDRV_PCM_FORMAT_S20 SNDRV_PCM_FORMAT_S20_BE
21122851890Sopenharmony_ci#define SNDRV_PCM_FORMAT_U20 SNDRV_PCM_FORMAT_U20_BE
21222851890Sopenharmony_ci#endif
21322851890Sopenharmony_citypedef int __bitwise snd_pcm_subformat_t;
21422851890Sopenharmony_ci#define SNDRV_PCM_SUBFORMAT_STD ((__force snd_pcm_subformat_t) 0)
21522851890Sopenharmony_ci#define SNDRV_PCM_SUBFORMAT_LAST SNDRV_PCM_SUBFORMAT_STD
21622851890Sopenharmony_ci#define SNDRV_PCM_INFO_MMAP 0x00000001
21722851890Sopenharmony_ci#define SNDRV_PCM_INFO_MMAP_VALID 0x00000002
21822851890Sopenharmony_ci#define SNDRV_PCM_INFO_DOUBLE 0x00000004
21922851890Sopenharmony_ci#define SNDRV_PCM_INFO_BATCH 0x00000010
22022851890Sopenharmony_ci#define SNDRV_PCM_INFO_SYNC_APPLPTR 0x00000020
22122851890Sopenharmony_ci#define SNDRV_PCM_INFO_INTERLEAVED 0x00000100
22222851890Sopenharmony_ci#define SNDRV_PCM_INFO_NONINTERLEAVED 0x00000200
22322851890Sopenharmony_ci#define SNDRV_PCM_INFO_COMPLEX 0x00000400
22422851890Sopenharmony_ci#define SNDRV_PCM_INFO_BLOCK_TRANSFER 0x00010000
22522851890Sopenharmony_ci#define SNDRV_PCM_INFO_OVERRANGE 0x00020000
22622851890Sopenharmony_ci#define SNDRV_PCM_INFO_RESUME 0x00040000
22722851890Sopenharmony_ci#define SNDRV_PCM_INFO_PAUSE 0x00080000
22822851890Sopenharmony_ci#define SNDRV_PCM_INFO_HALF_DUPLEX 0x00100000
22922851890Sopenharmony_ci#define SNDRV_PCM_INFO_JOINT_DUPLEX 0x00200000
23022851890Sopenharmony_ci#define SNDRV_PCM_INFO_SYNC_START 0x00400000
23122851890Sopenharmony_ci#define SNDRV_PCM_INFO_NO_PERIOD_WAKEUP 0x00800000
23222851890Sopenharmony_ci#define SNDRV_PCM_INFO_HAS_WALL_CLOCK 0x01000000
23322851890Sopenharmony_ci#define SNDRV_PCM_INFO_HAS_LINK_ATIME 0x01000000
23422851890Sopenharmony_ci#define SNDRV_PCM_INFO_HAS_LINK_ABSOLUTE_ATIME 0x02000000
23522851890Sopenharmony_ci#define SNDRV_PCM_INFO_HAS_LINK_ESTIMATED_ATIME 0x04000000
23622851890Sopenharmony_ci#define SNDRV_PCM_INFO_HAS_LINK_SYNCHRONIZED_ATIME 0x08000000
23722851890Sopenharmony_ci#define SNDRV_PCM_INFO_DRAIN_TRIGGER 0x40000000
23822851890Sopenharmony_ci#define SNDRV_PCM_INFO_FIFO_IN_FRAMES 0x80000000
23922851890Sopenharmony_ci#if __BITS_PER_LONG == 32 && defined(__USE_TIME_BITS64)
24022851890Sopenharmony_ci#define __SND_STRUCT_TIME64
24122851890Sopenharmony_ci#endif
24222851890Sopenharmony_citypedef int __bitwise snd_pcm_state_t;
24322851890Sopenharmony_ci#define SNDRV_PCM_STATE_OPEN ((__force snd_pcm_state_t) 0)
24422851890Sopenharmony_ci#define SNDRV_PCM_STATE_SETUP ((__force snd_pcm_state_t) 1)
24522851890Sopenharmony_ci#define SNDRV_PCM_STATE_PREPARED ((__force snd_pcm_state_t) 2)
24622851890Sopenharmony_ci#define SNDRV_PCM_STATE_RUNNING ((__force snd_pcm_state_t) 3)
24722851890Sopenharmony_ci#define SNDRV_PCM_STATE_XRUN ((__force snd_pcm_state_t) 4)
24822851890Sopenharmony_ci#define SNDRV_PCM_STATE_DRAINING ((__force snd_pcm_state_t) 5)
24922851890Sopenharmony_ci#define SNDRV_PCM_STATE_PAUSED ((__force snd_pcm_state_t) 6)
25022851890Sopenharmony_ci#define SNDRV_PCM_STATE_SUSPENDED ((__force snd_pcm_state_t) 7)
25122851890Sopenharmony_ci#define SNDRV_PCM_STATE_DISCONNECTED ((__force snd_pcm_state_t) 8)
25222851890Sopenharmony_ci#define SNDRV_PCM_STATE_LAST SNDRV_PCM_STATE_DISCONNECTED
25322851890Sopenharmony_cienum {
25422851890Sopenharmony_ci  SNDRV_PCM_MMAP_OFFSET_DATA = 0x00000000,
25522851890Sopenharmony_ci  SNDRV_PCM_MMAP_OFFSET_STATUS_OLD = 0x80000000,
25622851890Sopenharmony_ci  SNDRV_PCM_MMAP_OFFSET_CONTROL_OLD = 0x81000000,
25722851890Sopenharmony_ci  SNDRV_PCM_MMAP_OFFSET_STATUS_NEW = 0x82000000,
25822851890Sopenharmony_ci  SNDRV_PCM_MMAP_OFFSET_CONTROL_NEW = 0x83000000,
25922851890Sopenharmony_ci#ifdef __SND_STRUCT_TIME64
26022851890Sopenharmony_ci  SNDRV_PCM_MMAP_OFFSET_STATUS = SNDRV_PCM_MMAP_OFFSET_STATUS_NEW,
26122851890Sopenharmony_ci  SNDRV_PCM_MMAP_OFFSET_CONTROL = SNDRV_PCM_MMAP_OFFSET_CONTROL_NEW,
26222851890Sopenharmony_ci#else
26322851890Sopenharmony_ci  SNDRV_PCM_MMAP_OFFSET_STATUS = SNDRV_PCM_MMAP_OFFSET_STATUS_OLD,
26422851890Sopenharmony_ci  SNDRV_PCM_MMAP_OFFSET_CONTROL = SNDRV_PCM_MMAP_OFFSET_CONTROL_OLD,
26522851890Sopenharmony_ci#endif
26622851890Sopenharmony_ci};
26722851890Sopenharmony_ciunion snd_pcm_sync_id {
26822851890Sopenharmony_ci  unsigned char id[16];
26922851890Sopenharmony_ci  unsigned short id16[8];
27022851890Sopenharmony_ci  unsigned int id32[4];
27122851890Sopenharmony_ci};
27222851890Sopenharmony_cistruct snd_pcm_info {
27322851890Sopenharmony_ci  unsigned int device;
27422851890Sopenharmony_ci  unsigned int subdevice;
27522851890Sopenharmony_ci  int stream;
27622851890Sopenharmony_ci  int card;
27722851890Sopenharmony_ci  unsigned char id[64];
27822851890Sopenharmony_ci  unsigned char name[80];
27922851890Sopenharmony_ci  unsigned char subname[32];
28022851890Sopenharmony_ci  int dev_class;
28122851890Sopenharmony_ci  int dev_subclass;
28222851890Sopenharmony_ci  unsigned int subdevices_count;
28322851890Sopenharmony_ci  unsigned int subdevices_avail;
28422851890Sopenharmony_ci  union snd_pcm_sync_id sync;
28522851890Sopenharmony_ci  unsigned char reserved[64];
28622851890Sopenharmony_ci};
28722851890Sopenharmony_citypedef int snd_pcm_hw_param_t;
28822851890Sopenharmony_ci#define SNDRV_PCM_HW_PARAM_ACCESS 0
28922851890Sopenharmony_ci#define SNDRV_PCM_HW_PARAM_FORMAT 1
29022851890Sopenharmony_ci#define SNDRV_PCM_HW_PARAM_SUBFORMAT 2
29122851890Sopenharmony_ci#define SNDRV_PCM_HW_PARAM_FIRST_MASK SNDRV_PCM_HW_PARAM_ACCESS
29222851890Sopenharmony_ci#define SNDRV_PCM_HW_PARAM_LAST_MASK SNDRV_PCM_HW_PARAM_SUBFORMAT
29322851890Sopenharmony_ci#define SNDRV_PCM_HW_PARAM_SAMPLE_BITS 8
29422851890Sopenharmony_ci#define SNDRV_PCM_HW_PARAM_FRAME_BITS 9
29522851890Sopenharmony_ci#define SNDRV_PCM_HW_PARAM_CHANNELS 10
29622851890Sopenharmony_ci#define SNDRV_PCM_HW_PARAM_RATE 11
29722851890Sopenharmony_ci#define SNDRV_PCM_HW_PARAM_PERIOD_TIME 12
29822851890Sopenharmony_ci#define SNDRV_PCM_HW_PARAM_PERIOD_SIZE 13
29922851890Sopenharmony_ci#define SNDRV_PCM_HW_PARAM_PERIOD_BYTES 14
30022851890Sopenharmony_ci#define SNDRV_PCM_HW_PARAM_PERIODS 15
30122851890Sopenharmony_ci#define SNDRV_PCM_HW_PARAM_BUFFER_TIME 16
30222851890Sopenharmony_ci#define SNDRV_PCM_HW_PARAM_BUFFER_SIZE 17
30322851890Sopenharmony_ci#define SNDRV_PCM_HW_PARAM_BUFFER_BYTES 18
30422851890Sopenharmony_ci#define SNDRV_PCM_HW_PARAM_TICK_TIME 19
30522851890Sopenharmony_ci#define SNDRV_PCM_HW_PARAM_FIRST_INTERVAL SNDRV_PCM_HW_PARAM_SAMPLE_BITS
30622851890Sopenharmony_ci#define SNDRV_PCM_HW_PARAM_LAST_INTERVAL SNDRV_PCM_HW_PARAM_TICK_TIME
30722851890Sopenharmony_ci#define SNDRV_PCM_HW_PARAMS_NORESAMPLE (1 << 0)
30822851890Sopenharmony_ci#define SNDRV_PCM_HW_PARAMS_EXPORT_BUFFER (1 << 1)
30922851890Sopenharmony_ci#define SNDRV_PCM_HW_PARAMS_NO_PERIOD_WAKEUP (1 << 2)
31022851890Sopenharmony_cistruct snd_interval {
31122851890Sopenharmony_ci  unsigned int min, max;
31222851890Sopenharmony_ci  unsigned int openmin : 1, openmax : 1, integer : 1, empty : 1;
31322851890Sopenharmony_ci};
31422851890Sopenharmony_ci#define SNDRV_MASK_MAX 256
31522851890Sopenharmony_cistruct snd_mask {
31622851890Sopenharmony_ci  __u32 bits[(SNDRV_MASK_MAX + 31) / 32];
31722851890Sopenharmony_ci};
31822851890Sopenharmony_cistruct snd_pcm_hw_params {
31922851890Sopenharmony_ci  unsigned int flags;
32022851890Sopenharmony_ci  struct snd_mask masks[SNDRV_PCM_HW_PARAM_LAST_MASK - SNDRV_PCM_HW_PARAM_FIRST_MASK + 1];
32122851890Sopenharmony_ci  struct snd_mask mres[5];
32222851890Sopenharmony_ci  struct snd_interval intervals[SNDRV_PCM_HW_PARAM_LAST_INTERVAL - SNDRV_PCM_HW_PARAM_FIRST_INTERVAL + 1];
32322851890Sopenharmony_ci  struct snd_interval ires[9];
32422851890Sopenharmony_ci  unsigned int rmask;
32522851890Sopenharmony_ci  unsigned int cmask;
32622851890Sopenharmony_ci  unsigned int info;
32722851890Sopenharmony_ci  unsigned int msbits;
32822851890Sopenharmony_ci  unsigned int rate_num;
32922851890Sopenharmony_ci  unsigned int rate_den;
33022851890Sopenharmony_ci  snd_pcm_uframes_t fifo_size;
33122851890Sopenharmony_ci  unsigned char reserved[64];
33222851890Sopenharmony_ci};
33322851890Sopenharmony_cienum {
33422851890Sopenharmony_ci  SNDRV_PCM_TSTAMP_NONE = 0,
33522851890Sopenharmony_ci  SNDRV_PCM_TSTAMP_ENABLE,
33622851890Sopenharmony_ci  SNDRV_PCM_TSTAMP_LAST = SNDRV_PCM_TSTAMP_ENABLE,
33722851890Sopenharmony_ci};
33822851890Sopenharmony_cistruct snd_pcm_sw_params {
33922851890Sopenharmony_ci  int tstamp_mode;
34022851890Sopenharmony_ci  unsigned int period_step;
34122851890Sopenharmony_ci  unsigned int sleep_min;
34222851890Sopenharmony_ci  snd_pcm_uframes_t avail_min;
34322851890Sopenharmony_ci  snd_pcm_uframes_t xfer_align;
34422851890Sopenharmony_ci  snd_pcm_uframes_t start_threshold;
34522851890Sopenharmony_ci  snd_pcm_uframes_t stop_threshold;
34622851890Sopenharmony_ci  snd_pcm_uframes_t silence_threshold;
34722851890Sopenharmony_ci  snd_pcm_uframes_t silence_size;
34822851890Sopenharmony_ci  snd_pcm_uframes_t boundary;
34922851890Sopenharmony_ci  unsigned int proto;
35022851890Sopenharmony_ci  unsigned int tstamp_type;
35122851890Sopenharmony_ci  unsigned char reserved[56];
35222851890Sopenharmony_ci};
35322851890Sopenharmony_cistruct snd_pcm_channel_info {
35422851890Sopenharmony_ci  unsigned int channel;
35522851890Sopenharmony_ci  __kernel_off_t offset;
35622851890Sopenharmony_ci  unsigned int first;
35722851890Sopenharmony_ci  unsigned int step;
35822851890Sopenharmony_ci};
35922851890Sopenharmony_cienum {
36022851890Sopenharmony_ci  SNDRV_PCM_AUDIO_TSTAMP_TYPE_COMPAT = 0,
36122851890Sopenharmony_ci  SNDRV_PCM_AUDIO_TSTAMP_TYPE_DEFAULT = 1,
36222851890Sopenharmony_ci  SNDRV_PCM_AUDIO_TSTAMP_TYPE_LINK = 2,
36322851890Sopenharmony_ci  SNDRV_PCM_AUDIO_TSTAMP_TYPE_LINK_ABSOLUTE = 3,
36422851890Sopenharmony_ci  SNDRV_PCM_AUDIO_TSTAMP_TYPE_LINK_ESTIMATED = 4,
36522851890Sopenharmony_ci  SNDRV_PCM_AUDIO_TSTAMP_TYPE_LINK_SYNCHRONIZED = 5,
36622851890Sopenharmony_ci  SNDRV_PCM_AUDIO_TSTAMP_TYPE_LAST = SNDRV_PCM_AUDIO_TSTAMP_TYPE_LINK_SYNCHRONIZED
36722851890Sopenharmony_ci};
36822851890Sopenharmony_citypedef struct {
36922851890Sopenharmony_ci  unsigned char pad[sizeof(time_t) - sizeof(int)];
37022851890Sopenharmony_ci} __time_pad;
37122851890Sopenharmony_cistruct snd_pcm_status {
37222851890Sopenharmony_ci  snd_pcm_state_t state;
37322851890Sopenharmony_ci  __time_pad pad1;
37422851890Sopenharmony_ci  struct timespec trigger_tstamp;
37522851890Sopenharmony_ci  struct timespec tstamp;
37622851890Sopenharmony_ci  snd_pcm_uframes_t appl_ptr;
37722851890Sopenharmony_ci  snd_pcm_uframes_t hw_ptr;
37822851890Sopenharmony_ci  snd_pcm_sframes_t delay;
37922851890Sopenharmony_ci  snd_pcm_uframes_t avail;
38022851890Sopenharmony_ci  snd_pcm_uframes_t avail_max;
38122851890Sopenharmony_ci  snd_pcm_uframes_t overrange;
38222851890Sopenharmony_ci  snd_pcm_state_t suspended_state;
38322851890Sopenharmony_ci  __u32 audio_tstamp_data;
38422851890Sopenharmony_ci  struct timespec audio_tstamp;
38522851890Sopenharmony_ci  struct timespec driver_tstamp;
38622851890Sopenharmony_ci  __u32 audio_tstamp_accuracy;
38722851890Sopenharmony_ci  unsigned char reserved[52 - 2 * sizeof(struct timespec)];
38822851890Sopenharmony_ci};
38922851890Sopenharmony_ci#ifdef __SND_STRUCT_TIME64
39022851890Sopenharmony_ci#define __snd_pcm_mmap_status64 snd_pcm_mmap_status
39122851890Sopenharmony_ci#define __snd_pcm_mmap_control64 snd_pcm_mmap_control
39222851890Sopenharmony_ci#define __snd_pcm_sync_ptr64 snd_pcm_sync_ptr
39322851890Sopenharmony_ci#define __snd_timespec64 timespec
39422851890Sopenharmony_cistruct __snd_timespec {
39522851890Sopenharmony_ci  __s32 tv_sec;
39622851890Sopenharmony_ci  __s32 tv_nsec;
39722851890Sopenharmony_ci};
39822851890Sopenharmony_ci#else
39922851890Sopenharmony_ci#define __snd_pcm_mmap_status snd_pcm_mmap_status
40022851890Sopenharmony_ci#define __snd_pcm_mmap_control snd_pcm_mmap_control
40122851890Sopenharmony_ci#define __snd_pcm_sync_ptr snd_pcm_sync_ptr
40222851890Sopenharmony_ci#define __snd_timespec timespec
40322851890Sopenharmony_cistruct __snd_timespec64 {
40422851890Sopenharmony_ci  __s64 tv_sec;
40522851890Sopenharmony_ci  __s64 tv_nsec;
40622851890Sopenharmony_ci};
40722851890Sopenharmony_ci#endif
40822851890Sopenharmony_cistruct __snd_pcm_mmap_status {
40922851890Sopenharmony_ci  snd_pcm_state_t state;
41022851890Sopenharmony_ci  int pad1;
41122851890Sopenharmony_ci  snd_pcm_uframes_t hw_ptr;
41222851890Sopenharmony_ci  struct __snd_timespec tstamp;
41322851890Sopenharmony_ci  snd_pcm_state_t suspended_state;
41422851890Sopenharmony_ci  struct __snd_timespec audio_tstamp;
41522851890Sopenharmony_ci};
41622851890Sopenharmony_cistruct __snd_pcm_mmap_control {
41722851890Sopenharmony_ci  snd_pcm_uframes_t appl_ptr;
41822851890Sopenharmony_ci  snd_pcm_uframes_t avail_min;
41922851890Sopenharmony_ci};
42022851890Sopenharmony_ci#define SNDRV_PCM_SYNC_PTR_HWSYNC (1 << 0)
42122851890Sopenharmony_ci#define SNDRV_PCM_SYNC_PTR_APPL (1 << 1)
42222851890Sopenharmony_ci#define SNDRV_PCM_SYNC_PTR_AVAIL_MIN (1 << 2)
42322851890Sopenharmony_cistruct __snd_pcm_sync_ptr {
42422851890Sopenharmony_ci  unsigned int flags;
42522851890Sopenharmony_ci  union {
42622851890Sopenharmony_ci    struct __snd_pcm_mmap_status status;
42722851890Sopenharmony_ci    unsigned char reserved[64];
42822851890Sopenharmony_ci  } s;
42922851890Sopenharmony_ci  union {
43022851890Sopenharmony_ci    struct __snd_pcm_mmap_control control;
43122851890Sopenharmony_ci    unsigned char reserved[64];
43222851890Sopenharmony_ci  } c;
43322851890Sopenharmony_ci};
43422851890Sopenharmony_ci#if defined(__BYTE_ORDER) ? __BYTE_ORDER == __BIG_ENDIAN : defined(__BIG_ENDIAN)
43522851890Sopenharmony_citypedef char __pad_before_uframe[sizeof(__u64) - sizeof(snd_pcm_uframes_t)];
43622851890Sopenharmony_citypedef char __pad_after_uframe[0];
43722851890Sopenharmony_ci#endif
43822851890Sopenharmony_ci#if defined(__BYTE_ORDER) ? __BYTE_ORDER == __LITTLE_ENDIAN : defined(__LITTLE_ENDIAN)
43922851890Sopenharmony_citypedef char __pad_before_uframe[0];
44022851890Sopenharmony_citypedef char __pad_after_uframe[sizeof(__u64) - sizeof(snd_pcm_uframes_t)];
44122851890Sopenharmony_ci#endif
44222851890Sopenharmony_cistruct __snd_pcm_mmap_status64 {
44322851890Sopenharmony_ci  snd_pcm_state_t state;
44422851890Sopenharmony_ci  __u32 pad1;
44522851890Sopenharmony_ci  __pad_before_uframe __pad1;
44622851890Sopenharmony_ci  snd_pcm_uframes_t hw_ptr;
44722851890Sopenharmony_ci  __pad_after_uframe __pad2;
44822851890Sopenharmony_ci  struct __snd_timespec64 tstamp;
44922851890Sopenharmony_ci  snd_pcm_state_t suspended_state;
45022851890Sopenharmony_ci  __u32 pad3;
45122851890Sopenharmony_ci  struct __snd_timespec64 audio_tstamp;
45222851890Sopenharmony_ci};
45322851890Sopenharmony_cistruct __snd_pcm_mmap_control64 {
45422851890Sopenharmony_ci  __pad_before_uframe __pad1;
45522851890Sopenharmony_ci  snd_pcm_uframes_t appl_ptr;
45622851890Sopenharmony_ci  __pad_before_uframe __pad2;
45722851890Sopenharmony_ci  __pad_before_uframe __pad3;
45822851890Sopenharmony_ci  snd_pcm_uframes_t avail_min;
45922851890Sopenharmony_ci  __pad_after_uframe __pad4;
46022851890Sopenharmony_ci};
46122851890Sopenharmony_cistruct __snd_pcm_sync_ptr64 {
46222851890Sopenharmony_ci  __u32 flags;
46322851890Sopenharmony_ci  __u32 pad1;
46422851890Sopenharmony_ci  union {
46522851890Sopenharmony_ci    struct __snd_pcm_mmap_status64 status;
46622851890Sopenharmony_ci    unsigned char reserved[64];
46722851890Sopenharmony_ci  } s;
46822851890Sopenharmony_ci  union {
46922851890Sopenharmony_ci    struct __snd_pcm_mmap_control64 control;
47022851890Sopenharmony_ci    unsigned char reserved[64];
47122851890Sopenharmony_ci  } c;
47222851890Sopenharmony_ci};
47322851890Sopenharmony_cistruct snd_xferi {
47422851890Sopenharmony_ci  snd_pcm_sframes_t result;
47522851890Sopenharmony_ci  void __user * buf;
47622851890Sopenharmony_ci  snd_pcm_uframes_t frames;
47722851890Sopenharmony_ci};
47822851890Sopenharmony_cistruct snd_xfern {
47922851890Sopenharmony_ci  snd_pcm_sframes_t result;
48022851890Sopenharmony_ci  void __user * __user * bufs;
48122851890Sopenharmony_ci  snd_pcm_uframes_t frames;
48222851890Sopenharmony_ci};
48322851890Sopenharmony_cienum {
48422851890Sopenharmony_ci  SNDRV_PCM_TSTAMP_TYPE_GETTIMEOFDAY = 0,
48522851890Sopenharmony_ci  SNDRV_PCM_TSTAMP_TYPE_MONOTONIC,
48622851890Sopenharmony_ci  SNDRV_PCM_TSTAMP_TYPE_MONOTONIC_RAW,
48722851890Sopenharmony_ci  SNDRV_PCM_TSTAMP_TYPE_LAST = SNDRV_PCM_TSTAMP_TYPE_MONOTONIC_RAW,
48822851890Sopenharmony_ci};
48922851890Sopenharmony_cienum {
49022851890Sopenharmony_ci  SNDRV_CHMAP_UNKNOWN = 0,
49122851890Sopenharmony_ci  SNDRV_CHMAP_NA,
49222851890Sopenharmony_ci  SNDRV_CHMAP_MONO,
49322851890Sopenharmony_ci  SNDRV_CHMAP_FL,
49422851890Sopenharmony_ci  SNDRV_CHMAP_FR,
49522851890Sopenharmony_ci  SNDRV_CHMAP_RL,
49622851890Sopenharmony_ci  SNDRV_CHMAP_RR,
49722851890Sopenharmony_ci  SNDRV_CHMAP_FC,
49822851890Sopenharmony_ci  SNDRV_CHMAP_LFE,
49922851890Sopenharmony_ci  SNDRV_CHMAP_SL,
50022851890Sopenharmony_ci  SNDRV_CHMAP_SR,
50122851890Sopenharmony_ci  SNDRV_CHMAP_RC,
50222851890Sopenharmony_ci  SNDRV_CHMAP_FLC,
50322851890Sopenharmony_ci  SNDRV_CHMAP_FRC,
50422851890Sopenharmony_ci  SNDRV_CHMAP_RLC,
50522851890Sopenharmony_ci  SNDRV_CHMAP_RRC,
50622851890Sopenharmony_ci  SNDRV_CHMAP_FLW,
50722851890Sopenharmony_ci  SNDRV_CHMAP_FRW,
50822851890Sopenharmony_ci  SNDRV_CHMAP_FLH,
50922851890Sopenharmony_ci  SNDRV_CHMAP_FCH,
51022851890Sopenharmony_ci  SNDRV_CHMAP_FRH,
51122851890Sopenharmony_ci  SNDRV_CHMAP_TC,
51222851890Sopenharmony_ci  SNDRV_CHMAP_TFL,
51322851890Sopenharmony_ci  SNDRV_CHMAP_TFR,
51422851890Sopenharmony_ci  SNDRV_CHMAP_TFC,
51522851890Sopenharmony_ci  SNDRV_CHMAP_TRL,
51622851890Sopenharmony_ci  SNDRV_CHMAP_TRR,
51722851890Sopenharmony_ci  SNDRV_CHMAP_TRC,
51822851890Sopenharmony_ci  SNDRV_CHMAP_TFLC,
51922851890Sopenharmony_ci  SNDRV_CHMAP_TFRC,
52022851890Sopenharmony_ci  SNDRV_CHMAP_TSL,
52122851890Sopenharmony_ci  SNDRV_CHMAP_TSR,
52222851890Sopenharmony_ci  SNDRV_CHMAP_LLFE,
52322851890Sopenharmony_ci  SNDRV_CHMAP_RLFE,
52422851890Sopenharmony_ci  SNDRV_CHMAP_BC,
52522851890Sopenharmony_ci  SNDRV_CHMAP_BLC,
52622851890Sopenharmony_ci  SNDRV_CHMAP_BRC,
52722851890Sopenharmony_ci  SNDRV_CHMAP_LAST = SNDRV_CHMAP_BRC,
52822851890Sopenharmony_ci};
52922851890Sopenharmony_ci#define SNDRV_CHMAP_POSITION_MASK 0xffff
53022851890Sopenharmony_ci#define SNDRV_CHMAP_PHASE_INVERSE (0x01 << 16)
53122851890Sopenharmony_ci#define SNDRV_CHMAP_DRIVER_SPEC (0x02 << 16)
53222851890Sopenharmony_ci#define SNDRV_PCM_IOCTL_PVERSION _IOR('A', 0x00, int)
53322851890Sopenharmony_ci#define SNDRV_PCM_IOCTL_INFO _IOR('A', 0x01, struct snd_pcm_info)
53422851890Sopenharmony_ci#define SNDRV_PCM_IOCTL_TSTAMP _IOW('A', 0x02, int)
53522851890Sopenharmony_ci#define SNDRV_PCM_IOCTL_TTSTAMP _IOW('A', 0x03, int)
53622851890Sopenharmony_ci#define SNDRV_PCM_IOCTL_USER_PVERSION _IOW('A', 0x04, int)
53722851890Sopenharmony_ci#define SNDRV_PCM_IOCTL_HW_REFINE _IOWR('A', 0x10, struct snd_pcm_hw_params)
53822851890Sopenharmony_ci#define SNDRV_PCM_IOCTL_HW_PARAMS _IOWR('A', 0x11, struct snd_pcm_hw_params)
53922851890Sopenharmony_ci#define SNDRV_PCM_IOCTL_HW_FREE _IO('A', 0x12)
54022851890Sopenharmony_ci#define SNDRV_PCM_IOCTL_SW_PARAMS _IOWR('A', 0x13, struct snd_pcm_sw_params)
54122851890Sopenharmony_ci#define SNDRV_PCM_IOCTL_STATUS _IOR('A', 0x20, struct snd_pcm_status)
54222851890Sopenharmony_ci#define SNDRV_PCM_IOCTL_DELAY _IOR('A', 0x21, snd_pcm_sframes_t)
54322851890Sopenharmony_ci#define SNDRV_PCM_IOCTL_HWSYNC _IO('A', 0x22)
54422851890Sopenharmony_ci#define __SNDRV_PCM_IOCTL_SYNC_PTR _IOWR('A', 0x23, struct __snd_pcm_sync_ptr)
54522851890Sopenharmony_ci#define __SNDRV_PCM_IOCTL_SYNC_PTR64 _IOWR('A', 0x23, struct __snd_pcm_sync_ptr64)
54622851890Sopenharmony_ci#define SNDRV_PCM_IOCTL_SYNC_PTR _IOWR('A', 0x23, struct snd_pcm_sync_ptr)
54722851890Sopenharmony_ci#define SNDRV_PCM_IOCTL_STATUS_EXT _IOWR('A', 0x24, struct snd_pcm_status)
54822851890Sopenharmony_ci#define SNDRV_PCM_IOCTL_CHANNEL_INFO _IOR('A', 0x32, struct snd_pcm_channel_info)
54922851890Sopenharmony_ci#define SNDRV_PCM_IOCTL_PREPARE _IO('A', 0x40)
55022851890Sopenharmony_ci#define SNDRV_PCM_IOCTL_RESET _IO('A', 0x41)
55122851890Sopenharmony_ci#define SNDRV_PCM_IOCTL_START _IO('A', 0x42)
55222851890Sopenharmony_ci#define SNDRV_PCM_IOCTL_DROP _IO('A', 0x43)
55322851890Sopenharmony_ci#define SNDRV_PCM_IOCTL_DRAIN _IO('A', 0x44)
55422851890Sopenharmony_ci#define SNDRV_PCM_IOCTL_PAUSE _IOW('A', 0x45, int)
55522851890Sopenharmony_ci#define SNDRV_PCM_IOCTL_REWIND _IOW('A', 0x46, snd_pcm_uframes_t)
55622851890Sopenharmony_ci#define SNDRV_PCM_IOCTL_RESUME _IO('A', 0x47)
55722851890Sopenharmony_ci#define SNDRV_PCM_IOCTL_XRUN _IO('A', 0x48)
55822851890Sopenharmony_ci#define SNDRV_PCM_IOCTL_FORWARD _IOW('A', 0x49, snd_pcm_uframes_t)
55922851890Sopenharmony_ci#define SNDRV_PCM_IOCTL_WRITEI_FRAMES _IOW('A', 0x50, struct snd_xferi)
56022851890Sopenharmony_ci#define SNDRV_PCM_IOCTL_READI_FRAMES _IOR('A', 0x51, struct snd_xferi)
56122851890Sopenharmony_ci#define SNDRV_PCM_IOCTL_WRITEN_FRAMES _IOW('A', 0x52, struct snd_xfern)
56222851890Sopenharmony_ci#define SNDRV_PCM_IOCTL_READN_FRAMES _IOR('A', 0x53, struct snd_xfern)
56322851890Sopenharmony_ci#define SNDRV_PCM_IOCTL_LINK _IOW('A', 0x60, int)
56422851890Sopenharmony_ci#define SNDRV_PCM_IOCTL_UNLINK _IO('A', 0x61)
56522851890Sopenharmony_ci#define SNDRV_RAWMIDI_VERSION SNDRV_PROTOCOL_VERSION(2, 0, 1)
56622851890Sopenharmony_cienum {
56722851890Sopenharmony_ci  SNDRV_RAWMIDI_STREAM_OUTPUT = 0,
56822851890Sopenharmony_ci  SNDRV_RAWMIDI_STREAM_INPUT,
56922851890Sopenharmony_ci  SNDRV_RAWMIDI_STREAM_LAST = SNDRV_RAWMIDI_STREAM_INPUT,
57022851890Sopenharmony_ci};
57122851890Sopenharmony_ci#define SNDRV_RAWMIDI_INFO_OUTPUT 0x00000001
57222851890Sopenharmony_ci#define SNDRV_RAWMIDI_INFO_INPUT 0x00000002
57322851890Sopenharmony_ci#define SNDRV_RAWMIDI_INFO_DUPLEX 0x00000004
57422851890Sopenharmony_cistruct snd_rawmidi_info {
57522851890Sopenharmony_ci  unsigned int device;
57622851890Sopenharmony_ci  unsigned int subdevice;
57722851890Sopenharmony_ci  int stream;
57822851890Sopenharmony_ci  int card;
57922851890Sopenharmony_ci  unsigned int flags;
58022851890Sopenharmony_ci  unsigned char id[64];
58122851890Sopenharmony_ci  unsigned char name[80];
58222851890Sopenharmony_ci  unsigned char subname[32];
58322851890Sopenharmony_ci  unsigned int subdevices_count;
58422851890Sopenharmony_ci  unsigned int subdevices_avail;
58522851890Sopenharmony_ci  unsigned char reserved[64];
58622851890Sopenharmony_ci};
58722851890Sopenharmony_cistruct snd_rawmidi_params {
58822851890Sopenharmony_ci  int stream;
58922851890Sopenharmony_ci  size_t buffer_size;
59022851890Sopenharmony_ci  size_t avail_min;
59122851890Sopenharmony_ci  unsigned int no_active_sensing : 1;
59222851890Sopenharmony_ci  unsigned char reserved[16];
59322851890Sopenharmony_ci};
59422851890Sopenharmony_cistruct snd_rawmidi_status {
59522851890Sopenharmony_ci  int stream;
59622851890Sopenharmony_ci  __time_pad pad1;
59722851890Sopenharmony_ci  struct timespec tstamp;
59822851890Sopenharmony_ci  size_t avail;
59922851890Sopenharmony_ci  size_t xruns;
60022851890Sopenharmony_ci  unsigned char reserved[16];
60122851890Sopenharmony_ci};
60222851890Sopenharmony_ci#define SNDRV_RAWMIDI_IOCTL_PVERSION _IOR('W', 0x00, int)
60322851890Sopenharmony_ci#define SNDRV_RAWMIDI_IOCTL_INFO _IOR('W', 0x01, struct snd_rawmidi_info)
60422851890Sopenharmony_ci#define SNDRV_RAWMIDI_IOCTL_PARAMS _IOWR('W', 0x10, struct snd_rawmidi_params)
60522851890Sopenharmony_ci#define SNDRV_RAWMIDI_IOCTL_STATUS _IOWR('W', 0x20, struct snd_rawmidi_status)
60622851890Sopenharmony_ci#define SNDRV_RAWMIDI_IOCTL_DROP _IOW('W', 0x30, int)
60722851890Sopenharmony_ci#define SNDRV_RAWMIDI_IOCTL_DRAIN _IOW('W', 0x31, int)
60822851890Sopenharmony_ci#define SNDRV_TIMER_VERSION SNDRV_PROTOCOL_VERSION(2, 0, 7)
60922851890Sopenharmony_cienum {
61022851890Sopenharmony_ci  SNDRV_TIMER_CLASS_NONE = - 1,
61122851890Sopenharmony_ci  SNDRV_TIMER_CLASS_SLAVE = 0,
61222851890Sopenharmony_ci  SNDRV_TIMER_CLASS_GLOBAL,
61322851890Sopenharmony_ci  SNDRV_TIMER_CLASS_CARD,
61422851890Sopenharmony_ci  SNDRV_TIMER_CLASS_PCM,
61522851890Sopenharmony_ci  SNDRV_TIMER_CLASS_LAST = SNDRV_TIMER_CLASS_PCM,
61622851890Sopenharmony_ci};
61722851890Sopenharmony_cienum {
61822851890Sopenharmony_ci  SNDRV_TIMER_SCLASS_NONE = 0,
61922851890Sopenharmony_ci  SNDRV_TIMER_SCLASS_APPLICATION,
62022851890Sopenharmony_ci  SNDRV_TIMER_SCLASS_SEQUENCER,
62122851890Sopenharmony_ci  SNDRV_TIMER_SCLASS_OSS_SEQUENCER,
62222851890Sopenharmony_ci  SNDRV_TIMER_SCLASS_LAST = SNDRV_TIMER_SCLASS_OSS_SEQUENCER,
62322851890Sopenharmony_ci};
62422851890Sopenharmony_ci#define SNDRV_TIMER_GLOBAL_SYSTEM 0
62522851890Sopenharmony_ci#define SNDRV_TIMER_GLOBAL_RTC 1
62622851890Sopenharmony_ci#define SNDRV_TIMER_GLOBAL_HPET 2
62722851890Sopenharmony_ci#define SNDRV_TIMER_GLOBAL_HRTIMER 3
62822851890Sopenharmony_ci#define SNDRV_TIMER_FLG_SLAVE (1 << 0)
62922851890Sopenharmony_cistruct snd_timer_id {
63022851890Sopenharmony_ci  int dev_class;
63122851890Sopenharmony_ci  int dev_sclass;
63222851890Sopenharmony_ci  int card;
63322851890Sopenharmony_ci  int device;
63422851890Sopenharmony_ci  int subdevice;
63522851890Sopenharmony_ci};
63622851890Sopenharmony_cistruct snd_timer_ginfo {
63722851890Sopenharmony_ci  struct snd_timer_id tid;
63822851890Sopenharmony_ci  unsigned int flags;
63922851890Sopenharmony_ci  int card;
64022851890Sopenharmony_ci  unsigned char id[64];
64122851890Sopenharmony_ci  unsigned char name[80];
64222851890Sopenharmony_ci  unsigned long reserved0;
64322851890Sopenharmony_ci  unsigned long resolution;
64422851890Sopenharmony_ci  unsigned long resolution_min;
64522851890Sopenharmony_ci  unsigned long resolution_max;
64622851890Sopenharmony_ci  unsigned int clients;
64722851890Sopenharmony_ci  unsigned char reserved[32];
64822851890Sopenharmony_ci};
64922851890Sopenharmony_cistruct snd_timer_gparams {
65022851890Sopenharmony_ci  struct snd_timer_id tid;
65122851890Sopenharmony_ci  unsigned long period_num;
65222851890Sopenharmony_ci  unsigned long period_den;
65322851890Sopenharmony_ci  unsigned char reserved[32];
65422851890Sopenharmony_ci};
65522851890Sopenharmony_cistruct snd_timer_gstatus {
65622851890Sopenharmony_ci  struct snd_timer_id tid;
65722851890Sopenharmony_ci  unsigned long resolution;
65822851890Sopenharmony_ci  unsigned long resolution_num;
65922851890Sopenharmony_ci  unsigned long resolution_den;
66022851890Sopenharmony_ci  unsigned char reserved[32];
66122851890Sopenharmony_ci};
66222851890Sopenharmony_cistruct snd_timer_select {
66322851890Sopenharmony_ci  struct snd_timer_id id;
66422851890Sopenharmony_ci  unsigned char reserved[32];
66522851890Sopenharmony_ci};
66622851890Sopenharmony_cistruct snd_timer_info {
66722851890Sopenharmony_ci  unsigned int flags;
66822851890Sopenharmony_ci  int card;
66922851890Sopenharmony_ci  unsigned char id[64];
67022851890Sopenharmony_ci  unsigned char name[80];
67122851890Sopenharmony_ci  unsigned long reserved0;
67222851890Sopenharmony_ci  unsigned long resolution;
67322851890Sopenharmony_ci  unsigned char reserved[64];
67422851890Sopenharmony_ci};
67522851890Sopenharmony_ci#define SNDRV_TIMER_PSFLG_AUTO (1 << 0)
67622851890Sopenharmony_ci#define SNDRV_TIMER_PSFLG_EXCLUSIVE (1 << 1)
67722851890Sopenharmony_ci#define SNDRV_TIMER_PSFLG_EARLY_EVENT (1 << 2)
67822851890Sopenharmony_cistruct snd_timer_params {
67922851890Sopenharmony_ci  unsigned int flags;
68022851890Sopenharmony_ci  unsigned int ticks;
68122851890Sopenharmony_ci  unsigned int queue_size;
68222851890Sopenharmony_ci  unsigned int reserved0;
68322851890Sopenharmony_ci  unsigned int filter;
68422851890Sopenharmony_ci  unsigned char reserved[60];
68522851890Sopenharmony_ci};
68622851890Sopenharmony_cistruct snd_timer_status {
68722851890Sopenharmony_ci  struct timespec tstamp;
68822851890Sopenharmony_ci  unsigned int resolution;
68922851890Sopenharmony_ci  unsigned int lost;
69022851890Sopenharmony_ci  unsigned int overrun;
69122851890Sopenharmony_ci  unsigned int queue;
69222851890Sopenharmony_ci  unsigned char reserved[64];
69322851890Sopenharmony_ci};
69422851890Sopenharmony_ci#define SNDRV_TIMER_IOCTL_PVERSION _IOR('T', 0x00, int)
69522851890Sopenharmony_ci#define SNDRV_TIMER_IOCTL_NEXT_DEVICE _IOWR('T', 0x01, struct snd_timer_id)
69622851890Sopenharmony_ci#define SNDRV_TIMER_IOCTL_TREAD_OLD _IOW('T', 0x02, int)
69722851890Sopenharmony_ci#define SNDRV_TIMER_IOCTL_GINFO _IOWR('T', 0x03, struct snd_timer_ginfo)
69822851890Sopenharmony_ci#define SNDRV_TIMER_IOCTL_GPARAMS _IOW('T', 0x04, struct snd_timer_gparams)
69922851890Sopenharmony_ci#define SNDRV_TIMER_IOCTL_GSTATUS _IOWR('T', 0x05, struct snd_timer_gstatus)
70022851890Sopenharmony_ci#define SNDRV_TIMER_IOCTL_SELECT _IOW('T', 0x10, struct snd_timer_select)
70122851890Sopenharmony_ci#define SNDRV_TIMER_IOCTL_INFO _IOR('T', 0x11, struct snd_timer_info)
70222851890Sopenharmony_ci#define SNDRV_TIMER_IOCTL_PARAMS _IOW('T', 0x12, struct snd_timer_params)
70322851890Sopenharmony_ci#define SNDRV_TIMER_IOCTL_STATUS _IOR('T', 0x14, struct snd_timer_status)
70422851890Sopenharmony_ci#define SNDRV_TIMER_IOCTL_START _IO('T', 0xa0)
70522851890Sopenharmony_ci#define SNDRV_TIMER_IOCTL_STOP _IO('T', 0xa1)
70622851890Sopenharmony_ci#define SNDRV_TIMER_IOCTL_CONTINUE _IO('T', 0xa2)
70722851890Sopenharmony_ci#define SNDRV_TIMER_IOCTL_PAUSE _IO('T', 0xa3)
70822851890Sopenharmony_ci#define SNDRV_TIMER_IOCTL_TREAD64 _IOW('T', 0xa4, int)
70922851890Sopenharmony_ci#if __BITS_PER_LONG == 64
71022851890Sopenharmony_ci#define SNDRV_TIMER_IOCTL_TREAD SNDRV_TIMER_IOCTL_TREAD_OLD
71122851890Sopenharmony_ci#else
71222851890Sopenharmony_ci#define SNDRV_TIMER_IOCTL_TREAD ((sizeof(__kernel_long_t) >= sizeof(time_t)) ? SNDRV_TIMER_IOCTL_TREAD_OLD : SNDRV_TIMER_IOCTL_TREAD64)
71322851890Sopenharmony_ci#endif
71422851890Sopenharmony_cistruct snd_timer_read {
71522851890Sopenharmony_ci  unsigned int resolution;
71622851890Sopenharmony_ci  unsigned int ticks;
71722851890Sopenharmony_ci};
71822851890Sopenharmony_cienum {
71922851890Sopenharmony_ci  SNDRV_TIMER_EVENT_RESOLUTION = 0,
72022851890Sopenharmony_ci  SNDRV_TIMER_EVENT_TICK,
72122851890Sopenharmony_ci  SNDRV_TIMER_EVENT_START,
72222851890Sopenharmony_ci  SNDRV_TIMER_EVENT_STOP,
72322851890Sopenharmony_ci  SNDRV_TIMER_EVENT_CONTINUE,
72422851890Sopenharmony_ci  SNDRV_TIMER_EVENT_PAUSE,
72522851890Sopenharmony_ci  SNDRV_TIMER_EVENT_EARLY,
72622851890Sopenharmony_ci  SNDRV_TIMER_EVENT_SUSPEND,
72722851890Sopenharmony_ci  SNDRV_TIMER_EVENT_RESUME,
72822851890Sopenharmony_ci  SNDRV_TIMER_EVENT_MSTART = SNDRV_TIMER_EVENT_START + 10,
72922851890Sopenharmony_ci  SNDRV_TIMER_EVENT_MSTOP = SNDRV_TIMER_EVENT_STOP + 10,
73022851890Sopenharmony_ci  SNDRV_TIMER_EVENT_MCONTINUE = SNDRV_TIMER_EVENT_CONTINUE + 10,
73122851890Sopenharmony_ci  SNDRV_TIMER_EVENT_MPAUSE = SNDRV_TIMER_EVENT_PAUSE + 10,
73222851890Sopenharmony_ci  SNDRV_TIMER_EVENT_MSUSPEND = SNDRV_TIMER_EVENT_SUSPEND + 10,
73322851890Sopenharmony_ci  SNDRV_TIMER_EVENT_MRESUME = SNDRV_TIMER_EVENT_RESUME + 10,
73422851890Sopenharmony_ci};
73522851890Sopenharmony_cistruct snd_timer_tread {
73622851890Sopenharmony_ci  int event;
73722851890Sopenharmony_ci  __time_pad pad1;
73822851890Sopenharmony_ci  struct timespec tstamp;
73922851890Sopenharmony_ci  unsigned int val;
74022851890Sopenharmony_ci  __time_pad pad2;
74122851890Sopenharmony_ci};
74222851890Sopenharmony_ci#define SNDRV_CTL_VERSION SNDRV_PROTOCOL_VERSION(2, 0, 8)
74322851890Sopenharmony_cistruct snd_ctl_card_info {
74422851890Sopenharmony_ci  int card;
74522851890Sopenharmony_ci  int pad;
74622851890Sopenharmony_ci  unsigned char id[16];
74722851890Sopenharmony_ci  unsigned char driver[16];
74822851890Sopenharmony_ci  unsigned char name[32];
74922851890Sopenharmony_ci  unsigned char longname[80];
75022851890Sopenharmony_ci  unsigned char reserved_[16];
75122851890Sopenharmony_ci  unsigned char mixername[80];
75222851890Sopenharmony_ci  unsigned char components[128];
75322851890Sopenharmony_ci};
75422851890Sopenharmony_citypedef int __bitwise snd_ctl_elem_type_t;
75522851890Sopenharmony_ci#define SNDRV_CTL_ELEM_TYPE_NONE ((__force snd_ctl_elem_type_t) 0)
75622851890Sopenharmony_ci#define SNDRV_CTL_ELEM_TYPE_BOOLEAN ((__force snd_ctl_elem_type_t) 1)
75722851890Sopenharmony_ci#define SNDRV_CTL_ELEM_TYPE_INTEGER ((__force snd_ctl_elem_type_t) 2)
75822851890Sopenharmony_ci#define SNDRV_CTL_ELEM_TYPE_ENUMERATED ((__force snd_ctl_elem_type_t) 3)
75922851890Sopenharmony_ci#define SNDRV_CTL_ELEM_TYPE_BYTES ((__force snd_ctl_elem_type_t) 4)
76022851890Sopenharmony_ci#define SNDRV_CTL_ELEM_TYPE_IEC958 ((__force snd_ctl_elem_type_t) 5)
76122851890Sopenharmony_ci#define SNDRV_CTL_ELEM_TYPE_INTEGER64 ((__force snd_ctl_elem_type_t) 6)
76222851890Sopenharmony_ci#define SNDRV_CTL_ELEM_TYPE_LAST SNDRV_CTL_ELEM_TYPE_INTEGER64
76322851890Sopenharmony_citypedef int __bitwise snd_ctl_elem_iface_t;
76422851890Sopenharmony_ci#define SNDRV_CTL_ELEM_IFACE_CARD ((__force snd_ctl_elem_iface_t) 0)
76522851890Sopenharmony_ci#define SNDRV_CTL_ELEM_IFACE_HWDEP ((__force snd_ctl_elem_iface_t) 1)
76622851890Sopenharmony_ci#define SNDRV_CTL_ELEM_IFACE_MIXER ((__force snd_ctl_elem_iface_t) 2)
76722851890Sopenharmony_ci#define SNDRV_CTL_ELEM_IFACE_PCM ((__force snd_ctl_elem_iface_t) 3)
76822851890Sopenharmony_ci#define SNDRV_CTL_ELEM_IFACE_RAWMIDI ((__force snd_ctl_elem_iface_t) 4)
76922851890Sopenharmony_ci#define SNDRV_CTL_ELEM_IFACE_TIMER ((__force snd_ctl_elem_iface_t) 5)
77022851890Sopenharmony_ci#define SNDRV_CTL_ELEM_IFACE_SEQUENCER ((__force snd_ctl_elem_iface_t) 6)
77122851890Sopenharmony_ci#define SNDRV_CTL_ELEM_IFACE_LAST SNDRV_CTL_ELEM_IFACE_SEQUENCER
77222851890Sopenharmony_ci#define SNDRV_CTL_ELEM_ACCESS_READ (1 << 0)
77322851890Sopenharmony_ci#define SNDRV_CTL_ELEM_ACCESS_WRITE (1 << 1)
77422851890Sopenharmony_ci#define SNDRV_CTL_ELEM_ACCESS_READWRITE (SNDRV_CTL_ELEM_ACCESS_READ | SNDRV_CTL_ELEM_ACCESS_WRITE)
77522851890Sopenharmony_ci#define SNDRV_CTL_ELEM_ACCESS_VOLATILE (1 << 2)
77622851890Sopenharmony_ci#define SNDRV_CTL_ELEM_ACCESS_TLV_READ (1 << 4)
77722851890Sopenharmony_ci#define SNDRV_CTL_ELEM_ACCESS_TLV_WRITE (1 << 5)
77822851890Sopenharmony_ci#define SNDRV_CTL_ELEM_ACCESS_TLV_READWRITE (SNDRV_CTL_ELEM_ACCESS_TLV_READ | SNDRV_CTL_ELEM_ACCESS_TLV_WRITE)
77922851890Sopenharmony_ci#define SNDRV_CTL_ELEM_ACCESS_TLV_COMMAND (1 << 6)
78022851890Sopenharmony_ci#define SNDRV_CTL_ELEM_ACCESS_INACTIVE (1 << 8)
78122851890Sopenharmony_ci#define SNDRV_CTL_ELEM_ACCESS_LOCK (1 << 9)
78222851890Sopenharmony_ci#define SNDRV_CTL_ELEM_ACCESS_OWNER (1 << 10)
78322851890Sopenharmony_ci#define SNDRV_CTL_ELEM_ACCESS_TLV_CALLBACK (1 << 28)
78422851890Sopenharmony_ci#define SNDRV_CTL_ELEM_ACCESS_USER (1 << 29)
78522851890Sopenharmony_ci#define SNDRV_CTL_POWER_D0 0x0000
78622851890Sopenharmony_ci#define SNDRV_CTL_POWER_D1 0x0100
78722851890Sopenharmony_ci#define SNDRV_CTL_POWER_D2 0x0200
78822851890Sopenharmony_ci#define SNDRV_CTL_POWER_D3 0x0300
78922851890Sopenharmony_ci#define SNDRV_CTL_POWER_D3hot (SNDRV_CTL_POWER_D3 | 0x0000)
79022851890Sopenharmony_ci#define SNDRV_CTL_POWER_D3cold (SNDRV_CTL_POWER_D3 | 0x0001)
79122851890Sopenharmony_ci#define SNDRV_CTL_ELEM_ID_NAME_MAXLEN 44
79222851890Sopenharmony_cistruct snd_ctl_elem_id {
79322851890Sopenharmony_ci  unsigned int numid;
79422851890Sopenharmony_ci  snd_ctl_elem_iface_t iface;
79522851890Sopenharmony_ci  unsigned int device;
79622851890Sopenharmony_ci  unsigned int subdevice;
79722851890Sopenharmony_ci  unsigned char name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN];
79822851890Sopenharmony_ci  unsigned int index;
79922851890Sopenharmony_ci};
80022851890Sopenharmony_cistruct snd_ctl_elem_list {
80122851890Sopenharmony_ci  unsigned int offset;
80222851890Sopenharmony_ci  unsigned int space;
80322851890Sopenharmony_ci  unsigned int used;
80422851890Sopenharmony_ci  unsigned int count;
80522851890Sopenharmony_ci  struct snd_ctl_elem_id __user * pids;
80622851890Sopenharmony_ci  unsigned char reserved[50];
80722851890Sopenharmony_ci};
80822851890Sopenharmony_cistruct snd_ctl_elem_info {
80922851890Sopenharmony_ci  struct snd_ctl_elem_id id;
81022851890Sopenharmony_ci  snd_ctl_elem_type_t type;
81122851890Sopenharmony_ci  unsigned int access;
81222851890Sopenharmony_ci  unsigned int count;
81322851890Sopenharmony_ci  __kernel_pid_t owner;
81422851890Sopenharmony_ci  union {
81522851890Sopenharmony_ci    struct {
81622851890Sopenharmony_ci      long min;
81722851890Sopenharmony_ci      long max;
81822851890Sopenharmony_ci      long step;
81922851890Sopenharmony_ci    } integer;
82022851890Sopenharmony_ci    struct {
82122851890Sopenharmony_ci      long long min;
82222851890Sopenharmony_ci      long long max;
82322851890Sopenharmony_ci      long long step;
82422851890Sopenharmony_ci    } integer64;
82522851890Sopenharmony_ci    struct {
82622851890Sopenharmony_ci      unsigned int items;
82722851890Sopenharmony_ci      unsigned int item;
82822851890Sopenharmony_ci      char name[64];
82922851890Sopenharmony_ci      __u64 names_ptr;
83022851890Sopenharmony_ci      unsigned int names_length;
83122851890Sopenharmony_ci    } enumerated;
83222851890Sopenharmony_ci    unsigned char reserved[128];
83322851890Sopenharmony_ci  } value;
83422851890Sopenharmony_ci  unsigned char reserved[64];
83522851890Sopenharmony_ci};
83622851890Sopenharmony_cistruct snd_ctl_elem_value {
83722851890Sopenharmony_ci  struct snd_ctl_elem_id id;
83822851890Sopenharmony_ci  unsigned int indirect : 1;
83922851890Sopenharmony_ci  union {
84022851890Sopenharmony_ci    union {
84122851890Sopenharmony_ci      long value[128];
84222851890Sopenharmony_ci      long * value_ptr;
84322851890Sopenharmony_ci    } integer;
84422851890Sopenharmony_ci    union {
84522851890Sopenharmony_ci      long long value[64];
84622851890Sopenharmony_ci      long long * value_ptr;
84722851890Sopenharmony_ci    } integer64;
84822851890Sopenharmony_ci    union {
84922851890Sopenharmony_ci      unsigned int item[128];
85022851890Sopenharmony_ci      unsigned int * item_ptr;
85122851890Sopenharmony_ci    } enumerated;
85222851890Sopenharmony_ci    union {
85322851890Sopenharmony_ci      unsigned char data[512];
85422851890Sopenharmony_ci      unsigned char * data_ptr;
85522851890Sopenharmony_ci    } bytes;
85622851890Sopenharmony_ci    struct snd_aes_iec958 iec958;
85722851890Sopenharmony_ci  } value;
85822851890Sopenharmony_ci  unsigned char reserved[128];
85922851890Sopenharmony_ci};
86022851890Sopenharmony_cistruct snd_ctl_tlv {
86122851890Sopenharmony_ci  unsigned int numid;
86222851890Sopenharmony_ci  unsigned int length;
86322851890Sopenharmony_ci  unsigned int tlv[0];
86422851890Sopenharmony_ci};
86522851890Sopenharmony_ci#define SNDRV_CTL_IOCTL_PVERSION _IOR('U', 0x00, int)
86622851890Sopenharmony_ci#define SNDRV_CTL_IOCTL_CARD_INFO _IOR('U', 0x01, struct snd_ctl_card_info)
86722851890Sopenharmony_ci#define SNDRV_CTL_IOCTL_ELEM_LIST _IOWR('U', 0x10, struct snd_ctl_elem_list)
86822851890Sopenharmony_ci#define SNDRV_CTL_IOCTL_ELEM_INFO _IOWR('U', 0x11, struct snd_ctl_elem_info)
86922851890Sopenharmony_ci#define SNDRV_CTL_IOCTL_ELEM_READ _IOWR('U', 0x12, struct snd_ctl_elem_value)
87022851890Sopenharmony_ci#define SNDRV_CTL_IOCTL_ELEM_WRITE _IOWR('U', 0x13, struct snd_ctl_elem_value)
87122851890Sopenharmony_ci#define SNDRV_CTL_IOCTL_ELEM_LOCK _IOW('U', 0x14, struct snd_ctl_elem_id)
87222851890Sopenharmony_ci#define SNDRV_CTL_IOCTL_ELEM_UNLOCK _IOW('U', 0x15, struct snd_ctl_elem_id)
87322851890Sopenharmony_ci#define SNDRV_CTL_IOCTL_SUBSCRIBE_EVENTS _IOWR('U', 0x16, int)
87422851890Sopenharmony_ci#define SNDRV_CTL_IOCTL_ELEM_ADD _IOWR('U', 0x17, struct snd_ctl_elem_info)
87522851890Sopenharmony_ci#define SNDRV_CTL_IOCTL_ELEM_REPLACE _IOWR('U', 0x18, struct snd_ctl_elem_info)
87622851890Sopenharmony_ci#define SNDRV_CTL_IOCTL_ELEM_REMOVE _IOWR('U', 0x19, struct snd_ctl_elem_id)
87722851890Sopenharmony_ci#define SNDRV_CTL_IOCTL_TLV_READ _IOWR('U', 0x1a, struct snd_ctl_tlv)
87822851890Sopenharmony_ci#define SNDRV_CTL_IOCTL_TLV_WRITE _IOWR('U', 0x1b, struct snd_ctl_tlv)
87922851890Sopenharmony_ci#define SNDRV_CTL_IOCTL_TLV_COMMAND _IOWR('U', 0x1c, struct snd_ctl_tlv)
88022851890Sopenharmony_ci#define SNDRV_CTL_IOCTL_HWDEP_NEXT_DEVICE _IOWR('U', 0x20, int)
88122851890Sopenharmony_ci#define SNDRV_CTL_IOCTL_HWDEP_INFO _IOR('U', 0x21, struct snd_hwdep_info)
88222851890Sopenharmony_ci#define SNDRV_CTL_IOCTL_PCM_NEXT_DEVICE _IOR('U', 0x30, int)
88322851890Sopenharmony_ci#define SNDRV_CTL_IOCTL_PCM_INFO _IOWR('U', 0x31, struct snd_pcm_info)
88422851890Sopenharmony_ci#define SNDRV_CTL_IOCTL_PCM_PREFER_SUBDEVICE _IOW('U', 0x32, int)
88522851890Sopenharmony_ci#define SNDRV_CTL_IOCTL_RAWMIDI_NEXT_DEVICE _IOWR('U', 0x40, int)
88622851890Sopenharmony_ci#define SNDRV_CTL_IOCTL_RAWMIDI_INFO _IOWR('U', 0x41, struct snd_rawmidi_info)
88722851890Sopenharmony_ci#define SNDRV_CTL_IOCTL_RAWMIDI_PREFER_SUBDEVICE _IOW('U', 0x42, int)
88822851890Sopenharmony_ci#define SNDRV_CTL_IOCTL_POWER _IOWR('U', 0xd0, int)
88922851890Sopenharmony_ci#define SNDRV_CTL_IOCTL_POWER_STATE _IOR('U', 0xd1, int)
89022851890Sopenharmony_cienum sndrv_ctl_event_type {
89122851890Sopenharmony_ci  SNDRV_CTL_EVENT_ELEM = 0,
89222851890Sopenharmony_ci  SNDRV_CTL_EVENT_LAST = SNDRV_CTL_EVENT_ELEM,
89322851890Sopenharmony_ci};
89422851890Sopenharmony_ci#define SNDRV_CTL_EVENT_MASK_VALUE (1 << 0)
89522851890Sopenharmony_ci#define SNDRV_CTL_EVENT_MASK_INFO (1 << 1)
89622851890Sopenharmony_ci#define SNDRV_CTL_EVENT_MASK_ADD (1 << 2)
89722851890Sopenharmony_ci#define SNDRV_CTL_EVENT_MASK_TLV (1 << 3)
89822851890Sopenharmony_ci#define SNDRV_CTL_EVENT_MASK_REMOVE (~0U)
89922851890Sopenharmony_cistruct snd_ctl_event {
90022851890Sopenharmony_ci  int type;
90122851890Sopenharmony_ci  union {
90222851890Sopenharmony_ci    struct {
90322851890Sopenharmony_ci      unsigned int mask;
90422851890Sopenharmony_ci      struct snd_ctl_elem_id id;
90522851890Sopenharmony_ci    } elem;
90622851890Sopenharmony_ci    unsigned char data8[60];
90722851890Sopenharmony_ci  } data;
90822851890Sopenharmony_ci};
90922851890Sopenharmony_ci#define SNDRV_CTL_NAME_NONE ""
91022851890Sopenharmony_ci#define SNDRV_CTL_NAME_PLAYBACK "Playback "
91122851890Sopenharmony_ci#define SNDRV_CTL_NAME_CAPTURE "Capture "
91222851890Sopenharmony_ci#define SNDRV_CTL_NAME_IEC958_NONE ""
91322851890Sopenharmony_ci#define SNDRV_CTL_NAME_IEC958_SWITCH "Switch"
91422851890Sopenharmony_ci#define SNDRV_CTL_NAME_IEC958_VOLUME "Volume"
91522851890Sopenharmony_ci#define SNDRV_CTL_NAME_IEC958_DEFAULT "Default"
91622851890Sopenharmony_ci#define SNDRV_CTL_NAME_IEC958_MASK "Mask"
91722851890Sopenharmony_ci#define SNDRV_CTL_NAME_IEC958_CON_MASK "Con Mask"
91822851890Sopenharmony_ci#define SNDRV_CTL_NAME_IEC958_PRO_MASK "Pro Mask"
91922851890Sopenharmony_ci#define SNDRV_CTL_NAME_IEC958_PCM_STREAM "PCM Stream"
92022851890Sopenharmony_ci#define SNDRV_CTL_NAME_IEC958(expl,direction,what) "IEC958 " expl SNDRV_CTL_NAME_ ##direction SNDRV_CTL_NAME_IEC958_ ##what
92122851890Sopenharmony_ci#endif
922