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