blob: cfe9f669a3c214645ed7fe1ca65a58bfdf7881d6 [file] [log] [blame]
Elliott Hughes180edef2023-11-02 00:08:05 +00001/*
2 * This file is auto-generated. Modifications will be lost.
3 *
4 * See https://android.googlesource.com/platform/bionic/+/master/libc/kernel/
5 * for more information.
6 */
Ben Cheng655a7c02013-10-16 16:09:24 -07007#ifndef _UAPI__SOUND_ASOUND_H
8#define _UAPI__SOUND_ASOUND_H
Christopher Ferris106b3a82016-08-24 12:15:38 -07009#ifdef __linux__
Ben Cheng655a7c02013-10-16 16:09:24 -070010#include <linux/types.h>
Christopher Ferrisbb9fcb42020-04-06 11:38:04 -070011#include <asm/byteorder.h>
Christopher Ferris106b3a82016-08-24 12:15:38 -070012#else
Christopher Ferrisbb9fcb42020-04-06 11:38:04 -070013#include <endian.h>
Christopher Ferris106b3a82016-08-24 12:15:38 -070014#include <sys/ioctl.h>
15#endif
Christopher Ferris05d08e92016-02-04 13:16:38 -080016#include <stdlib.h>
Christopher Ferris24f97eb2019-05-20 12:58:13 -070017#include <time.h>
Christopher Ferris05d08e92016-02-04 13:16:38 -080018#define SNDRV_PROTOCOL_VERSION(major,minor,subminor) (((major) << 16) | ((minor) << 8) | (subminor))
Tao Baod7db5942015-01-28 10:07:51 -080019#define SNDRV_PROTOCOL_MAJOR(version) (((version) >> 16) & 0xffff)
20#define SNDRV_PROTOCOL_MINOR(version) (((version) >> 8) & 0xff)
21#define SNDRV_PROTOCOL_MICRO(version) ((version) & 0xff)
Christopher Ferris05d08e92016-02-04 13:16:38 -080022#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)))
Christopher Ferris1ed55342022-03-22 16:06:25 -070023#define AES_IEC958_STATUS_SIZE 24
Ben Cheng655a7c02013-10-16 16:09:24 -070024struct snd_aes_iec958 {
Christopher Ferris1ed55342022-03-22 16:06:25 -070025 unsigned char status[AES_IEC958_STATUS_SIZE];
Tao Baod7db5942015-01-28 10:07:51 -080026 unsigned char subcode[147];
Christopher Ferris05d08e92016-02-04 13:16:38 -080027 unsigned char pad;
Tao Baod7db5942015-01-28 10:07:51 -080028 unsigned char dig_subframe[4];
Ben Cheng655a7c02013-10-16 16:09:24 -070029};
30struct snd_cea_861_aud_if {
Christopher Ferris05d08e92016-02-04 13:16:38 -080031 unsigned char db1_ct_cc;
Tao Baod7db5942015-01-28 10:07:51 -080032 unsigned char db2_sf_ss;
33 unsigned char db3;
34 unsigned char db4_ca;
Christopher Ferris05d08e92016-02-04 13:16:38 -080035 unsigned char db5_dminh_lsv;
Ben Cheng655a7c02013-10-16 16:09:24 -070036};
37#define SNDRV_HWDEP_VERSION SNDRV_PROTOCOL_VERSION(1, 0, 1)
38enum {
Christopher Ferris05d08e92016-02-04 13:16:38 -080039 SNDRV_HWDEP_IFACE_OPL2 = 0,
Tao Baod7db5942015-01-28 10:07:51 -080040 SNDRV_HWDEP_IFACE_OPL3,
41 SNDRV_HWDEP_IFACE_OPL4,
42 SNDRV_HWDEP_IFACE_SB16CSP,
Christopher Ferris05d08e92016-02-04 13:16:38 -080043 SNDRV_HWDEP_IFACE_EMU10K1,
Tao Baod7db5942015-01-28 10:07:51 -080044 SNDRV_HWDEP_IFACE_YSS225,
45 SNDRV_HWDEP_IFACE_ICS2115,
46 SNDRV_HWDEP_IFACE_SSCAPE,
Christopher Ferris05d08e92016-02-04 13:16:38 -080047 SNDRV_HWDEP_IFACE_VX,
Tao Baod7db5942015-01-28 10:07:51 -080048 SNDRV_HWDEP_IFACE_MIXART,
49 SNDRV_HWDEP_IFACE_USX2Y,
50 SNDRV_HWDEP_IFACE_EMUX_WAVETABLE,
Christopher Ferris05d08e92016-02-04 13:16:38 -080051 SNDRV_HWDEP_IFACE_BLUETOOTH,
Tao Baod7db5942015-01-28 10:07:51 -080052 SNDRV_HWDEP_IFACE_USX2Y_PCM,
53 SNDRV_HWDEP_IFACE_PCXHR,
54 SNDRV_HWDEP_IFACE_SB_RC,
Christopher Ferris05d08e92016-02-04 13:16:38 -080055 SNDRV_HWDEP_IFACE_HDA,
Tao Baod7db5942015-01-28 10:07:51 -080056 SNDRV_HWDEP_IFACE_USB_STREAM,
57 SNDRV_HWDEP_IFACE_FW_DICE,
58 SNDRV_HWDEP_IFACE_FW_FIREWORKS,
Christopher Ferris05d08e92016-02-04 13:16:38 -080059 SNDRV_HWDEP_IFACE_FW_BEBOB,
60 SNDRV_HWDEP_IFACE_FW_OXFW,
61 SNDRV_HWDEP_IFACE_FW_DIGI00X,
62 SNDRV_HWDEP_IFACE_FW_TASCAM,
Christopher Ferris6a9755d2017-01-13 14:09:31 -080063 SNDRV_HWDEP_IFACE_LINE6,
Christopher Ferris525ce912017-07-26 13:12:53 -070064 SNDRV_HWDEP_IFACE_FW_MOTU,
65 SNDRV_HWDEP_IFACE_FW_FIREFACE,
66 SNDRV_HWDEP_IFACE_LAST = SNDRV_HWDEP_IFACE_FW_FIREFACE
Christopher Ferrisba8d4f42014-09-03 19:56:49 -070067};
Christopher Ferris38062f92014-07-09 15:33:25 -070068struct snd_hwdep_info {
Christopher Ferris6a9755d2017-01-13 14:09:31 -080069 unsigned int device;
Tao Baod7db5942015-01-28 10:07:51 -080070 int card;
71 unsigned char id[64];
72 unsigned char name[80];
Christopher Ferris6a9755d2017-01-13 14:09:31 -080073 int iface;
Tao Baod7db5942015-01-28 10:07:51 -080074 unsigned char reserved[64];
Ben Cheng655a7c02013-10-16 16:09:24 -070075};
Christopher Ferris38062f92014-07-09 15:33:25 -070076struct snd_hwdep_dsp_status {
Christopher Ferris6a9755d2017-01-13 14:09:31 -080077 unsigned int version;
Tao Baod7db5942015-01-28 10:07:51 -080078 unsigned char id[32];
79 unsigned int num_dsps;
80 unsigned int dsp_loaded;
Christopher Ferris6a9755d2017-01-13 14:09:31 -080081 unsigned int chip_ready;
Tao Baod7db5942015-01-28 10:07:51 -080082 unsigned char reserved[16];
Ben Cheng655a7c02013-10-16 16:09:24 -070083};
Christopher Ferris38062f92014-07-09 15:33:25 -070084struct snd_hwdep_dsp_image {
Christopher Ferris6a9755d2017-01-13 14:09:31 -080085 unsigned int index;
Tao Baod7db5942015-01-28 10:07:51 -080086 unsigned char name[64];
Elliott Hughes0f0c18f2023-03-29 15:53:31 -070087 unsigned char * image;
Tao Baod7db5942015-01-28 10:07:51 -080088 size_t length;
Christopher Ferris6a9755d2017-01-13 14:09:31 -080089 unsigned long driver_data;
Ben Cheng655a7c02013-10-16 16:09:24 -070090};
Tao Baod7db5942015-01-28 10:07:51 -080091#define SNDRV_HWDEP_IOCTL_PVERSION _IOR('H', 0x00, int)
92#define SNDRV_HWDEP_IOCTL_INFO _IOR('H', 0x01, struct snd_hwdep_info)
Christopher Ferris6a9755d2017-01-13 14:09:31 -080093#define SNDRV_HWDEP_IOCTL_DSP_STATUS _IOR('H', 0x02, struct snd_hwdep_dsp_status)
Ben Cheng655a7c02013-10-16 16:09:24 -070094#define SNDRV_HWDEP_IOCTL_DSP_LOAD _IOW('H', 0x03, struct snd_hwdep_dsp_image)
Christopher Ferris63fcca42024-09-26 01:12:10 +000095#define SNDRV_PCM_VERSION SNDRV_PROTOCOL_VERSION(2, 0, 18)
Christopher Ferris38062f92014-07-09 15:33:25 -070096typedef unsigned long snd_pcm_uframes_t;
Christopher Ferris6a9755d2017-01-13 14:09:31 -080097typedef signed long snd_pcm_sframes_t;
Ben Cheng655a7c02013-10-16 16:09:24 -070098enum {
Tao Baod7db5942015-01-28 10:07:51 -080099 SNDRV_PCM_CLASS_GENERIC = 0,
100 SNDRV_PCM_CLASS_MULTI,
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800101 SNDRV_PCM_CLASS_MODEM,
Tao Baod7db5942015-01-28 10:07:51 -0800102 SNDRV_PCM_CLASS_DIGITIZER,
103 SNDRV_PCM_CLASS_LAST = SNDRV_PCM_CLASS_DIGITIZER,
Christopher Ferris38062f92014-07-09 15:33:25 -0700104};
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800105enum {
Tao Baod7db5942015-01-28 10:07:51 -0800106 SNDRV_PCM_SUBCLASS_GENERIC_MIX = 0,
107 SNDRV_PCM_SUBCLASS_MULTI_MIX,
108 SNDRV_PCM_SUBCLASS_LAST = SNDRV_PCM_SUBCLASS_MULTI_MIX,
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800109};
Ben Cheng655a7c02013-10-16 16:09:24 -0700110enum {
Tao Baod7db5942015-01-28 10:07:51 -0800111 SNDRV_PCM_STREAM_PLAYBACK = 0,
112 SNDRV_PCM_STREAM_CAPTURE,
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800113 SNDRV_PCM_STREAM_LAST = SNDRV_PCM_STREAM_CAPTURE,
Ben Cheng655a7c02013-10-16 16:09:24 -0700114};
115typedef int __bitwise snd_pcm_access_t;
Elliott Hughes0f0c18f2023-03-29 15:53:31 -0700116#define SNDRV_PCM_ACCESS_MMAP_INTERLEAVED (( snd_pcm_access_t) 0)
117#define SNDRV_PCM_ACCESS_MMAP_NONINTERLEAVED (( snd_pcm_access_t) 1)
118#define SNDRV_PCM_ACCESS_MMAP_COMPLEX (( snd_pcm_access_t) 2)
119#define SNDRV_PCM_ACCESS_RW_INTERLEAVED (( snd_pcm_access_t) 3)
120#define SNDRV_PCM_ACCESS_RW_NONINTERLEAVED (( snd_pcm_access_t) 4)
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800121#define SNDRV_PCM_ACCESS_LAST SNDRV_PCM_ACCESS_RW_NONINTERLEAVED
Ben Cheng655a7c02013-10-16 16:09:24 -0700122typedef int __bitwise snd_pcm_format_t;
Elliott Hughes0f0c18f2023-03-29 15:53:31 -0700123#define SNDRV_PCM_FORMAT_S8 (( snd_pcm_format_t) 0)
124#define SNDRV_PCM_FORMAT_U8 (( snd_pcm_format_t) 1)
125#define SNDRV_PCM_FORMAT_S16_LE (( snd_pcm_format_t) 2)
126#define SNDRV_PCM_FORMAT_S16_BE (( snd_pcm_format_t) 3)
127#define SNDRV_PCM_FORMAT_U16_LE (( snd_pcm_format_t) 4)
128#define SNDRV_PCM_FORMAT_U16_BE (( snd_pcm_format_t) 5)
129#define SNDRV_PCM_FORMAT_S24_LE (( snd_pcm_format_t) 6)
130#define SNDRV_PCM_FORMAT_S24_BE (( snd_pcm_format_t) 7)
131#define SNDRV_PCM_FORMAT_U24_LE (( snd_pcm_format_t) 8)
132#define SNDRV_PCM_FORMAT_U24_BE (( snd_pcm_format_t) 9)
133#define SNDRV_PCM_FORMAT_S32_LE (( snd_pcm_format_t) 10)
134#define SNDRV_PCM_FORMAT_S32_BE (( snd_pcm_format_t) 11)
135#define SNDRV_PCM_FORMAT_U32_LE (( snd_pcm_format_t) 12)
136#define SNDRV_PCM_FORMAT_U32_BE (( snd_pcm_format_t) 13)
137#define SNDRV_PCM_FORMAT_FLOAT_LE (( snd_pcm_format_t) 14)
138#define SNDRV_PCM_FORMAT_FLOAT_BE (( snd_pcm_format_t) 15)
139#define SNDRV_PCM_FORMAT_FLOAT64_LE (( snd_pcm_format_t) 16)
140#define SNDRV_PCM_FORMAT_FLOAT64_BE (( snd_pcm_format_t) 17)
141#define SNDRV_PCM_FORMAT_IEC958_SUBFRAME_LE (( snd_pcm_format_t) 18)
142#define SNDRV_PCM_FORMAT_IEC958_SUBFRAME_BE (( snd_pcm_format_t) 19)
143#define SNDRV_PCM_FORMAT_MU_LAW (( snd_pcm_format_t) 20)
144#define SNDRV_PCM_FORMAT_A_LAW (( snd_pcm_format_t) 21)
145#define SNDRV_PCM_FORMAT_IMA_ADPCM (( snd_pcm_format_t) 22)
146#define SNDRV_PCM_FORMAT_MPEG (( snd_pcm_format_t) 23)
147#define SNDRV_PCM_FORMAT_GSM (( snd_pcm_format_t) 24)
148#define SNDRV_PCM_FORMAT_S20_LE (( snd_pcm_format_t) 25)
149#define SNDRV_PCM_FORMAT_S20_BE (( snd_pcm_format_t) 26)
150#define SNDRV_PCM_FORMAT_U20_LE (( snd_pcm_format_t) 27)
151#define SNDRV_PCM_FORMAT_U20_BE (( snd_pcm_format_t) 28)
152#define SNDRV_PCM_FORMAT_SPECIAL (( snd_pcm_format_t) 31)
153#define SNDRV_PCM_FORMAT_S24_3LE (( snd_pcm_format_t) 32)
154#define SNDRV_PCM_FORMAT_S24_3BE (( snd_pcm_format_t) 33)
155#define SNDRV_PCM_FORMAT_U24_3LE (( snd_pcm_format_t) 34)
156#define SNDRV_PCM_FORMAT_U24_3BE (( snd_pcm_format_t) 35)
157#define SNDRV_PCM_FORMAT_S20_3LE (( snd_pcm_format_t) 36)
158#define SNDRV_PCM_FORMAT_S20_3BE (( snd_pcm_format_t) 37)
159#define SNDRV_PCM_FORMAT_U20_3LE (( snd_pcm_format_t) 38)
160#define SNDRV_PCM_FORMAT_U20_3BE (( snd_pcm_format_t) 39)
161#define SNDRV_PCM_FORMAT_S18_3LE (( snd_pcm_format_t) 40)
162#define SNDRV_PCM_FORMAT_S18_3BE (( snd_pcm_format_t) 41)
163#define SNDRV_PCM_FORMAT_U18_3LE (( snd_pcm_format_t) 42)
164#define SNDRV_PCM_FORMAT_U18_3BE (( snd_pcm_format_t) 43)
165#define SNDRV_PCM_FORMAT_G723_24 (( snd_pcm_format_t) 44)
166#define SNDRV_PCM_FORMAT_G723_24_1B (( snd_pcm_format_t) 45)
167#define SNDRV_PCM_FORMAT_G723_40 (( snd_pcm_format_t) 46)
168#define SNDRV_PCM_FORMAT_G723_40_1B (( snd_pcm_format_t) 47)
169#define SNDRV_PCM_FORMAT_DSD_U8 (( snd_pcm_format_t) 48)
170#define SNDRV_PCM_FORMAT_DSD_U16_LE (( snd_pcm_format_t) 49)
171#define SNDRV_PCM_FORMAT_DSD_U32_LE (( snd_pcm_format_t) 50)
172#define SNDRV_PCM_FORMAT_DSD_U16_BE (( snd_pcm_format_t) 51)
173#define SNDRV_PCM_FORMAT_DSD_U32_BE (( snd_pcm_format_t) 52)
Christopher Ferris82d75042015-01-26 10:57:07 -0800174#define SNDRV_PCM_FORMAT_LAST SNDRV_PCM_FORMAT_DSD_U32_BE
Christopher Ferris76a1d452018-06-27 14:12:29 -0700175#define SNDRV_PCM_FORMAT_FIRST SNDRV_PCM_FORMAT_S8
Christopher Ferris38062f92014-07-09 15:33:25 -0700176#ifdef SNDRV_LITTLE_ENDIAN
Ben Cheng655a7c02013-10-16 16:09:24 -0700177#define SNDRV_PCM_FORMAT_S16 SNDRV_PCM_FORMAT_S16_LE
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800178#define SNDRV_PCM_FORMAT_U16 SNDRV_PCM_FORMAT_U16_LE
Ben Cheng655a7c02013-10-16 16:09:24 -0700179#define SNDRV_PCM_FORMAT_S24 SNDRV_PCM_FORMAT_S24_LE
Christopher Ferris38062f92014-07-09 15:33:25 -0700180#define SNDRV_PCM_FORMAT_U24 SNDRV_PCM_FORMAT_U24_LE
Ben Cheng655a7c02013-10-16 16:09:24 -0700181#define SNDRV_PCM_FORMAT_S32 SNDRV_PCM_FORMAT_S32_LE
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800182#define SNDRV_PCM_FORMAT_U32 SNDRV_PCM_FORMAT_U32_LE
Ben Cheng655a7c02013-10-16 16:09:24 -0700183#define SNDRV_PCM_FORMAT_FLOAT SNDRV_PCM_FORMAT_FLOAT_LE
Christopher Ferris38062f92014-07-09 15:33:25 -0700184#define SNDRV_PCM_FORMAT_FLOAT64 SNDRV_PCM_FORMAT_FLOAT64_LE
Ben Cheng655a7c02013-10-16 16:09:24 -0700185#define SNDRV_PCM_FORMAT_IEC958_SUBFRAME SNDRV_PCM_FORMAT_IEC958_SUBFRAME_LE
Christopher Ferris76a1d452018-06-27 14:12:29 -0700186#define SNDRV_PCM_FORMAT_S20 SNDRV_PCM_FORMAT_S20_LE
187#define SNDRV_PCM_FORMAT_U20 SNDRV_PCM_FORMAT_U20_LE
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800188#endif
Ben Cheng655a7c02013-10-16 16:09:24 -0700189#ifdef SNDRV_BIG_ENDIAN
Christopher Ferris38062f92014-07-09 15:33:25 -0700190#define SNDRV_PCM_FORMAT_S16 SNDRV_PCM_FORMAT_S16_BE
Ben Cheng655a7c02013-10-16 16:09:24 -0700191#define SNDRV_PCM_FORMAT_U16 SNDRV_PCM_FORMAT_U16_BE
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800192#define SNDRV_PCM_FORMAT_S24 SNDRV_PCM_FORMAT_S24_BE
Ben Cheng655a7c02013-10-16 16:09:24 -0700193#define SNDRV_PCM_FORMAT_U24 SNDRV_PCM_FORMAT_U24_BE
Christopher Ferris38062f92014-07-09 15:33:25 -0700194#define SNDRV_PCM_FORMAT_S32 SNDRV_PCM_FORMAT_S32_BE
Ben Cheng655a7c02013-10-16 16:09:24 -0700195#define SNDRV_PCM_FORMAT_U32 SNDRV_PCM_FORMAT_U32_BE
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800196#define SNDRV_PCM_FORMAT_FLOAT SNDRV_PCM_FORMAT_FLOAT_BE
Ben Cheng655a7c02013-10-16 16:09:24 -0700197#define SNDRV_PCM_FORMAT_FLOAT64 SNDRV_PCM_FORMAT_FLOAT64_BE
Christopher Ferris38062f92014-07-09 15:33:25 -0700198#define SNDRV_PCM_FORMAT_IEC958_SUBFRAME SNDRV_PCM_FORMAT_IEC958_SUBFRAME_BE
Christopher Ferris76a1d452018-06-27 14:12:29 -0700199#define SNDRV_PCM_FORMAT_S20 SNDRV_PCM_FORMAT_S20_BE
200#define SNDRV_PCM_FORMAT_U20 SNDRV_PCM_FORMAT_U20_BE
Ben Cheng655a7c02013-10-16 16:09:24 -0700201#endif
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800202typedef int __bitwise snd_pcm_subformat_t;
Elliott Hughes0f0c18f2023-03-29 15:53:31 -0700203#define SNDRV_PCM_SUBFORMAT_STD (( snd_pcm_subformat_t) 0)
Christopher Ferrisb830ddf2024-03-28 11:48:08 -0700204#define SNDRV_PCM_SUBFORMAT_MSBITS_MAX (( snd_pcm_subformat_t) 1)
205#define SNDRV_PCM_SUBFORMAT_MSBITS_20 (( snd_pcm_subformat_t) 2)
206#define SNDRV_PCM_SUBFORMAT_MSBITS_24 (( snd_pcm_subformat_t) 3)
207#define SNDRV_PCM_SUBFORMAT_LAST SNDRV_PCM_SUBFORMAT_MSBITS_24
Ben Cheng655a7c02013-10-16 16:09:24 -0700208#define SNDRV_PCM_INFO_MMAP 0x00000001
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800209#define SNDRV_PCM_INFO_MMAP_VALID 0x00000002
Ben Cheng655a7c02013-10-16 16:09:24 -0700210#define SNDRV_PCM_INFO_DOUBLE 0x00000004
Christopher Ferris38062f92014-07-09 15:33:25 -0700211#define SNDRV_PCM_INFO_BATCH 0x00000010
Christopher Ferris1308ad32017-11-14 17:32:13 -0800212#define SNDRV_PCM_INFO_SYNC_APPLPTR 0x00000020
Christopher Ferris8666d042023-09-06 14:55:31 -0700213#define SNDRV_PCM_INFO_PERFECT_DRAIN 0x00000040
Ben Cheng655a7c02013-10-16 16:09:24 -0700214#define SNDRV_PCM_INFO_INTERLEAVED 0x00000100
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800215#define SNDRV_PCM_INFO_NONINTERLEAVED 0x00000200
Ben Cheng655a7c02013-10-16 16:09:24 -0700216#define SNDRV_PCM_INFO_COMPLEX 0x00000400
Christopher Ferris38062f92014-07-09 15:33:25 -0700217#define SNDRV_PCM_INFO_BLOCK_TRANSFER 0x00010000
Ben Cheng655a7c02013-10-16 16:09:24 -0700218#define SNDRV_PCM_INFO_OVERRANGE 0x00020000
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800219#define SNDRV_PCM_INFO_RESUME 0x00040000
Ben Cheng655a7c02013-10-16 16:09:24 -0700220#define SNDRV_PCM_INFO_PAUSE 0x00080000
Christopher Ferris38062f92014-07-09 15:33:25 -0700221#define SNDRV_PCM_INFO_HALF_DUPLEX 0x00100000
Ben Cheng655a7c02013-10-16 16:09:24 -0700222#define SNDRV_PCM_INFO_JOINT_DUPLEX 0x00200000
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800223#define SNDRV_PCM_INFO_SYNC_START 0x00400000
Ben Cheng655a7c02013-10-16 16:09:24 -0700224#define SNDRV_PCM_INFO_NO_PERIOD_WAKEUP 0x00800000
Christopher Ferris38062f92014-07-09 15:33:25 -0700225#define SNDRV_PCM_INFO_HAS_WALL_CLOCK 0x01000000
Christopher Ferris05d08e92016-02-04 13:16:38 -0800226#define SNDRV_PCM_INFO_HAS_LINK_ATIME 0x01000000
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800227#define SNDRV_PCM_INFO_HAS_LINK_ABSOLUTE_ATIME 0x02000000
Christopher Ferris05d08e92016-02-04 13:16:38 -0800228#define SNDRV_PCM_INFO_HAS_LINK_ESTIMATED_ATIME 0x04000000
229#define SNDRV_PCM_INFO_HAS_LINK_SYNCHRONIZED_ATIME 0x08000000
Christopher Ferris2abfa9e2021-11-01 16:26:06 -0700230#define SNDRV_PCM_INFO_EXPLICIT_SYNC 0x10000000
Christopher Ferris1ed55342022-03-22 16:06:25 -0700231#define SNDRV_PCM_INFO_NO_REWINDS 0x20000000
Christopher Ferris05d08e92016-02-04 13:16:38 -0800232#define SNDRV_PCM_INFO_DRAIN_TRIGGER 0x40000000
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800233#define SNDRV_PCM_INFO_FIFO_IN_FRAMES 0x80000000
Christopher Ferrisbb9fcb42020-04-06 11:38:04 -0700234#if __BITS_PER_LONG == 32 && defined(__USE_TIME_BITS64)
235#define __SND_STRUCT_TIME64
236#endif
Christopher Ferris05d08e92016-02-04 13:16:38 -0800237typedef int __bitwise snd_pcm_state_t;
Elliott Hughes0f0c18f2023-03-29 15:53:31 -0700238#define SNDRV_PCM_STATE_OPEN (( snd_pcm_state_t) 0)
239#define SNDRV_PCM_STATE_SETUP (( snd_pcm_state_t) 1)
240#define SNDRV_PCM_STATE_PREPARED (( snd_pcm_state_t) 2)
241#define SNDRV_PCM_STATE_RUNNING (( snd_pcm_state_t) 3)
242#define SNDRV_PCM_STATE_XRUN (( snd_pcm_state_t) 4)
243#define SNDRV_PCM_STATE_DRAINING (( snd_pcm_state_t) 5)
244#define SNDRV_PCM_STATE_PAUSED (( snd_pcm_state_t) 6)
245#define SNDRV_PCM_STATE_SUSPENDED (( snd_pcm_state_t) 7)
246#define SNDRV_PCM_STATE_DISCONNECTED (( snd_pcm_state_t) 8)
Christopher Ferris38062f92014-07-09 15:33:25 -0700247#define SNDRV_PCM_STATE_LAST SNDRV_PCM_STATE_DISCONNECTED
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800248enum {
Christopher Ferris05d08e92016-02-04 13:16:38 -0800249 SNDRV_PCM_MMAP_OFFSET_DATA = 0x00000000,
Christopher Ferrisbb9fcb42020-04-06 11:38:04 -0700250 SNDRV_PCM_MMAP_OFFSET_STATUS_OLD = 0x80000000,
251 SNDRV_PCM_MMAP_OFFSET_CONTROL_OLD = 0x81000000,
252 SNDRV_PCM_MMAP_OFFSET_STATUS_NEW = 0x82000000,
253 SNDRV_PCM_MMAP_OFFSET_CONTROL_NEW = 0x83000000,
254#ifdef __SND_STRUCT_TIME64
255 SNDRV_PCM_MMAP_OFFSET_STATUS = SNDRV_PCM_MMAP_OFFSET_STATUS_NEW,
256 SNDRV_PCM_MMAP_OFFSET_CONTROL = SNDRV_PCM_MMAP_OFFSET_CONTROL_NEW,
257#else
258 SNDRV_PCM_MMAP_OFFSET_STATUS = SNDRV_PCM_MMAP_OFFSET_STATUS_OLD,
259 SNDRV_PCM_MMAP_OFFSET_CONTROL = SNDRV_PCM_MMAP_OFFSET_CONTROL_OLD,
260#endif
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800261};
Christopher Ferris05d08e92016-02-04 13:16:38 -0800262union snd_pcm_sync_id {
Tao Baod7db5942015-01-28 10:07:51 -0800263 unsigned char id[16];
264 unsigned short id16[8];
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800265 unsigned int id32[4];
Christopher Ferris63fcca42024-09-26 01:12:10 +0000266} __attribute__((deprecated));
Ben Cheng655a7c02013-10-16 16:09:24 -0700267struct snd_pcm_info {
Tao Baod7db5942015-01-28 10:07:51 -0800268 unsigned int device;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800269 unsigned int subdevice;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800270 int stream;
Tao Baod7db5942015-01-28 10:07:51 -0800271 int card;
272 unsigned char id[64];
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800273 unsigned char name[80];
Christopher Ferris05d08e92016-02-04 13:16:38 -0800274 unsigned char subname[32];
Tao Baod7db5942015-01-28 10:07:51 -0800275 int dev_class;
276 int dev_subclass;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800277 unsigned int subdevices_count;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800278 unsigned int subdevices_avail;
Christopher Ferris63fcca42024-09-26 01:12:10 +0000279 unsigned char pad1[16];
Tao Baod7db5942015-01-28 10:07:51 -0800280 unsigned char reserved[64];
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800281};
Christopher Ferris05d08e92016-02-04 13:16:38 -0800282typedef int snd_pcm_hw_param_t;
Ben Cheng655a7c02013-10-16 16:09:24 -0700283#define SNDRV_PCM_HW_PARAM_ACCESS 0
Christopher Ferris38062f92014-07-09 15:33:25 -0700284#define SNDRV_PCM_HW_PARAM_FORMAT 1
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800285#define SNDRV_PCM_HW_PARAM_SUBFORMAT 2
Christopher Ferris05d08e92016-02-04 13:16:38 -0800286#define SNDRV_PCM_HW_PARAM_FIRST_MASK SNDRV_PCM_HW_PARAM_ACCESS
Ben Cheng655a7c02013-10-16 16:09:24 -0700287#define SNDRV_PCM_HW_PARAM_LAST_MASK SNDRV_PCM_HW_PARAM_SUBFORMAT
Christopher Ferris38062f92014-07-09 15:33:25 -0700288#define SNDRV_PCM_HW_PARAM_SAMPLE_BITS 8
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800289#define SNDRV_PCM_HW_PARAM_FRAME_BITS 9
Christopher Ferris05d08e92016-02-04 13:16:38 -0800290#define SNDRV_PCM_HW_PARAM_CHANNELS 10
Ben Cheng655a7c02013-10-16 16:09:24 -0700291#define SNDRV_PCM_HW_PARAM_RATE 11
Christopher Ferris38062f92014-07-09 15:33:25 -0700292#define SNDRV_PCM_HW_PARAM_PERIOD_TIME 12
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800293#define SNDRV_PCM_HW_PARAM_PERIOD_SIZE 13
Christopher Ferris05d08e92016-02-04 13:16:38 -0800294#define SNDRV_PCM_HW_PARAM_PERIOD_BYTES 14
Ben Cheng655a7c02013-10-16 16:09:24 -0700295#define SNDRV_PCM_HW_PARAM_PERIODS 15
Christopher Ferris38062f92014-07-09 15:33:25 -0700296#define SNDRV_PCM_HW_PARAM_BUFFER_TIME 16
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800297#define SNDRV_PCM_HW_PARAM_BUFFER_SIZE 17
Christopher Ferris05d08e92016-02-04 13:16:38 -0800298#define SNDRV_PCM_HW_PARAM_BUFFER_BYTES 18
Ben Cheng655a7c02013-10-16 16:09:24 -0700299#define SNDRV_PCM_HW_PARAM_TICK_TIME 19
Christopher Ferris38062f92014-07-09 15:33:25 -0700300#define SNDRV_PCM_HW_PARAM_FIRST_INTERVAL SNDRV_PCM_HW_PARAM_SAMPLE_BITS
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800301#define SNDRV_PCM_HW_PARAM_LAST_INTERVAL SNDRV_PCM_HW_PARAM_TICK_TIME
Christopher Ferris05d08e92016-02-04 13:16:38 -0800302#define SNDRV_PCM_HW_PARAMS_NORESAMPLE (1 << 0)
Tao Baod7db5942015-01-28 10:07:51 -0800303#define SNDRV_PCM_HW_PARAMS_EXPORT_BUFFER (1 << 1)
304#define SNDRV_PCM_HW_PARAMS_NO_PERIOD_WAKEUP (1 << 2)
Christopher Ferris8666d042023-09-06 14:55:31 -0700305#define SNDRV_PCM_HW_PARAMS_NO_DRAIN_SILENCE (1 << 3)
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800306struct snd_interval {
Christopher Ferris05d08e92016-02-04 13:16:38 -0800307 unsigned int min, max;
Tao Baod7db5942015-01-28 10:07:51 -0800308 unsigned int openmin : 1, openmax : 1, integer : 1, empty : 1;
Ben Cheng655a7c02013-10-16 16:09:24 -0700309};
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800310#define SNDRV_MASK_MAX 256
Christopher Ferris05d08e92016-02-04 13:16:38 -0800311struct snd_mask {
Tao Baod7db5942015-01-28 10:07:51 -0800312 __u32 bits[(SNDRV_MASK_MAX + 31) / 32];
Ben Cheng655a7c02013-10-16 16:09:24 -0700313};
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800314struct snd_pcm_hw_params {
Christopher Ferris05d08e92016-02-04 13:16:38 -0800315 unsigned int flags;
Tao Baod7db5942015-01-28 10:07:51 -0800316 struct snd_mask masks[SNDRV_PCM_HW_PARAM_LAST_MASK - SNDRV_PCM_HW_PARAM_FIRST_MASK + 1];
317 struct snd_mask mres[5];
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800318 struct snd_interval intervals[SNDRV_PCM_HW_PARAM_LAST_INTERVAL - SNDRV_PCM_HW_PARAM_FIRST_INTERVAL + 1];
Christopher Ferris05d08e92016-02-04 13:16:38 -0800319 struct snd_interval ires[9];
Tao Baod7db5942015-01-28 10:07:51 -0800320 unsigned int rmask;
321 unsigned int cmask;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800322 unsigned int info;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800323 unsigned int msbits;
Tao Baod7db5942015-01-28 10:07:51 -0800324 unsigned int rate_num;
325 unsigned int rate_den;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800326 snd_pcm_uframes_t fifo_size;
Christopher Ferris63fcca42024-09-26 01:12:10 +0000327 unsigned char sync[16];
328 unsigned char reserved[48];
Christopher Ferris38062f92014-07-09 15:33:25 -0700329};
Ben Cheng655a7c02013-10-16 16:09:24 -0700330enum {
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800331 SNDRV_PCM_TSTAMP_NONE = 0,
Christopher Ferris05d08e92016-02-04 13:16:38 -0800332 SNDRV_PCM_TSTAMP_ENABLE,
Tao Baod7db5942015-01-28 10:07:51 -0800333 SNDRV_PCM_TSTAMP_LAST = SNDRV_PCM_TSTAMP_ENABLE,
Ben Cheng655a7c02013-10-16 16:09:24 -0700334};
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800335struct snd_pcm_sw_params {
Christopher Ferris05d08e92016-02-04 13:16:38 -0800336 int tstamp_mode;
Tao Baod7db5942015-01-28 10:07:51 -0800337 unsigned int period_step;
338 unsigned int sleep_min;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800339 snd_pcm_uframes_t avail_min;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800340 snd_pcm_uframes_t xfer_align;
Tao Baod7db5942015-01-28 10:07:51 -0800341 snd_pcm_uframes_t start_threshold;
342 snd_pcm_uframes_t stop_threshold;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800343 snd_pcm_uframes_t silence_threshold;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800344 snd_pcm_uframes_t silence_size;
Tao Baod7db5942015-01-28 10:07:51 -0800345 snd_pcm_uframes_t boundary;
346 unsigned int proto;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800347 unsigned int tstamp_type;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800348 unsigned char reserved[56];
Ben Cheng655a7c02013-10-16 16:09:24 -0700349};
350struct snd_pcm_channel_info {
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800351 unsigned int channel;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800352 __kernel_off_t offset;
Tao Baod7db5942015-01-28 10:07:51 -0800353 unsigned int first;
354 unsigned int step;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800355};
Christopher Ferris05d08e92016-02-04 13:16:38 -0800356enum {
357 SNDRV_PCM_AUDIO_TSTAMP_TYPE_COMPAT = 0,
358 SNDRV_PCM_AUDIO_TSTAMP_TYPE_DEFAULT = 1,
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800359 SNDRV_PCM_AUDIO_TSTAMP_TYPE_LINK = 2,
Christopher Ferris05d08e92016-02-04 13:16:38 -0800360 SNDRV_PCM_AUDIO_TSTAMP_TYPE_LINK_ABSOLUTE = 3,
361 SNDRV_PCM_AUDIO_TSTAMP_TYPE_LINK_ESTIMATED = 4,
362 SNDRV_PCM_AUDIO_TSTAMP_TYPE_LINK_SYNCHRONIZED = 5,
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800363 SNDRV_PCM_AUDIO_TSTAMP_TYPE_LAST = SNDRV_PCM_AUDIO_TSTAMP_TYPE_LINK_SYNCHRONIZED
Christopher Ferris05d08e92016-02-04 13:16:38 -0800364};
Christopher Ferrisbb9fcb42020-04-06 11:38:04 -0700365typedef struct {
366 unsigned char pad[sizeof(time_t) - sizeof(int)];
367} __time_pad;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800368struct snd_pcm_status {
Tao Baod7db5942015-01-28 10:07:51 -0800369 snd_pcm_state_t state;
Christopher Ferrisbb9fcb42020-04-06 11:38:04 -0700370 __time_pad pad1;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800371 struct timespec trigger_tstamp;
Tao Baod7db5942015-01-28 10:07:51 -0800372 struct timespec tstamp;
373 snd_pcm_uframes_t appl_ptr;
Tao Baod7db5942015-01-28 10:07:51 -0800374 snd_pcm_uframes_t hw_ptr;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800375 snd_pcm_sframes_t delay;
Tao Baod7db5942015-01-28 10:07:51 -0800376 snd_pcm_uframes_t avail;
377 snd_pcm_uframes_t avail_max;
Tao Baod7db5942015-01-28 10:07:51 -0800378 snd_pcm_uframes_t overrange;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800379 snd_pcm_state_t suspended_state;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800380 __u32 audio_tstamp_data;
381 struct timespec audio_tstamp;
382 struct timespec driver_tstamp;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800383 __u32 audio_tstamp_accuracy;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800384 unsigned char reserved[52 - 2 * sizeof(struct timespec)];
Ben Cheng655a7c02013-10-16 16:09:24 -0700385};
Christopher Ferrisbb9fcb42020-04-06 11:38:04 -0700386#ifdef __SND_STRUCT_TIME64
387#define __snd_pcm_mmap_status64 snd_pcm_mmap_status
388#define __snd_pcm_mmap_control64 snd_pcm_mmap_control
389#define __snd_pcm_sync_ptr64 snd_pcm_sync_ptr
390#define __snd_timespec64 timespec
391struct __snd_timespec {
392 __s32 tv_sec;
393 __s32 tv_nsec;
394};
395#else
396#define __snd_pcm_mmap_status snd_pcm_mmap_status
397#define __snd_pcm_mmap_control snd_pcm_mmap_control
398#define __snd_pcm_sync_ptr snd_pcm_sync_ptr
399#define __snd_timespec timespec
400struct __snd_timespec64 {
401 __s64 tv_sec;
402 __s64 tv_nsec;
403};
404#endif
405struct __snd_pcm_mmap_status {
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800406 snd_pcm_state_t state;
Tao Baod7db5942015-01-28 10:07:51 -0800407 int pad1;
408 snd_pcm_uframes_t hw_ptr;
Christopher Ferrisbb9fcb42020-04-06 11:38:04 -0700409 struct __snd_timespec tstamp;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800410 snd_pcm_state_t suspended_state;
Christopher Ferrisbb9fcb42020-04-06 11:38:04 -0700411 struct __snd_timespec audio_tstamp;
Ben Cheng655a7c02013-10-16 16:09:24 -0700412};
Christopher Ferrisbb9fcb42020-04-06 11:38:04 -0700413struct __snd_pcm_mmap_control {
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800414 snd_pcm_uframes_t appl_ptr;
Tao Baod7db5942015-01-28 10:07:51 -0800415 snd_pcm_uframes_t avail_min;
Ben Cheng655a7c02013-10-16 16:09:24 -0700416};
Tao Baod7db5942015-01-28 10:07:51 -0800417#define SNDRV_PCM_SYNC_PTR_HWSYNC (1 << 0)
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800418#define SNDRV_PCM_SYNC_PTR_APPL (1 << 1)
Tao Baod7db5942015-01-28 10:07:51 -0800419#define SNDRV_PCM_SYNC_PTR_AVAIL_MIN (1 << 2)
Christopher Ferrisbb9fcb42020-04-06 11:38:04 -0700420struct __snd_pcm_sync_ptr {
Tao Baod7db5942015-01-28 10:07:51 -0800421 unsigned int flags;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800422 union {
Christopher Ferrisbb9fcb42020-04-06 11:38:04 -0700423 struct __snd_pcm_mmap_status status;
Tao Baod7db5942015-01-28 10:07:51 -0800424 unsigned char reserved[64];
425 } s;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800426 union {
Christopher Ferrisbb9fcb42020-04-06 11:38:04 -0700427 struct __snd_pcm_mmap_control control;
428 unsigned char reserved[64];
429 } c;
430};
431#if defined(__BYTE_ORDER) ? __BYTE_ORDER == __BIG_ENDIAN : defined(__BIG_ENDIAN)
432typedef char __pad_before_uframe[sizeof(__u64) - sizeof(snd_pcm_uframes_t)];
433typedef char __pad_after_uframe[0];
434#endif
435#if defined(__BYTE_ORDER) ? __BYTE_ORDER == __LITTLE_ENDIAN : defined(__LITTLE_ENDIAN)
436typedef char __pad_before_uframe[0];
437typedef char __pad_after_uframe[sizeof(__u64) - sizeof(snd_pcm_uframes_t)];
438#endif
439struct __snd_pcm_mmap_status64 {
440 snd_pcm_state_t state;
441 __u32 pad1;
442 __pad_before_uframe __pad1;
443 snd_pcm_uframes_t hw_ptr;
444 __pad_after_uframe __pad2;
445 struct __snd_timespec64 tstamp;
446 snd_pcm_state_t suspended_state;
447 __u32 pad3;
448 struct __snd_timespec64 audio_tstamp;
449};
450struct __snd_pcm_mmap_control64 {
451 __pad_before_uframe __pad1;
452 snd_pcm_uframes_t appl_ptr;
453 __pad_before_uframe __pad2;
454 __pad_before_uframe __pad3;
455 snd_pcm_uframes_t avail_min;
456 __pad_after_uframe __pad4;
457};
458struct __snd_pcm_sync_ptr64 {
459 __u32 flags;
460 __u32 pad1;
461 union {
462 struct __snd_pcm_mmap_status64 status;
463 unsigned char reserved[64];
464 } s;
465 union {
466 struct __snd_pcm_mmap_control64 control;
Tao Baod7db5942015-01-28 10:07:51 -0800467 unsigned char reserved[64];
468 } c;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800469};
Tao Baod7db5942015-01-28 10:07:51 -0800470struct snd_xferi {
471 snd_pcm_sframes_t result;
Elliott Hughes0f0c18f2023-03-29 15:53:31 -0700472 void * buf;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800473 snd_pcm_uframes_t frames;
Ben Cheng655a7c02013-10-16 16:09:24 -0700474};
475struct snd_xfern {
Tao Baod7db5942015-01-28 10:07:51 -0800476 snd_pcm_sframes_t result;
Elliott Hughes0f0c18f2023-03-29 15:53:31 -0700477 void * * bufs;
Tao Baod7db5942015-01-28 10:07:51 -0800478 snd_pcm_uframes_t frames;
Ben Cheng655a7c02013-10-16 16:09:24 -0700479};
Christopher Ferris38062f92014-07-09 15:33:25 -0700480enum {
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800481 SNDRV_PCM_TSTAMP_TYPE_GETTIMEOFDAY = 0,
Tao Baod7db5942015-01-28 10:07:51 -0800482 SNDRV_PCM_TSTAMP_TYPE_MONOTONIC,
483 SNDRV_PCM_TSTAMP_TYPE_MONOTONIC_RAW,
484 SNDRV_PCM_TSTAMP_TYPE_LAST = SNDRV_PCM_TSTAMP_TYPE_MONOTONIC_RAW,
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800485};
Ben Cheng655a7c02013-10-16 16:09:24 -0700486enum {
Tao Baod7db5942015-01-28 10:07:51 -0800487 SNDRV_CHMAP_UNKNOWN = 0,
488 SNDRV_CHMAP_NA,
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800489 SNDRV_CHMAP_MONO,
Tao Baod7db5942015-01-28 10:07:51 -0800490 SNDRV_CHMAP_FL,
491 SNDRV_CHMAP_FR,
492 SNDRV_CHMAP_RL,
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800493 SNDRV_CHMAP_RR,
Tao Baod7db5942015-01-28 10:07:51 -0800494 SNDRV_CHMAP_FC,
495 SNDRV_CHMAP_LFE,
496 SNDRV_CHMAP_SL,
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800497 SNDRV_CHMAP_SR,
Tao Baod7db5942015-01-28 10:07:51 -0800498 SNDRV_CHMAP_RC,
499 SNDRV_CHMAP_FLC,
500 SNDRV_CHMAP_FRC,
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800501 SNDRV_CHMAP_RLC,
Tao Baod7db5942015-01-28 10:07:51 -0800502 SNDRV_CHMAP_RRC,
503 SNDRV_CHMAP_FLW,
504 SNDRV_CHMAP_FRW,
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800505 SNDRV_CHMAP_FLH,
Tao Baod7db5942015-01-28 10:07:51 -0800506 SNDRV_CHMAP_FCH,
507 SNDRV_CHMAP_FRH,
508 SNDRV_CHMAP_TC,
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800509 SNDRV_CHMAP_TFL,
Tao Baod7db5942015-01-28 10:07:51 -0800510 SNDRV_CHMAP_TFR,
511 SNDRV_CHMAP_TFC,
512 SNDRV_CHMAP_TRL,
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800513 SNDRV_CHMAP_TRR,
Tao Baod7db5942015-01-28 10:07:51 -0800514 SNDRV_CHMAP_TRC,
515 SNDRV_CHMAP_TFLC,
516 SNDRV_CHMAP_TFRC,
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800517 SNDRV_CHMAP_TSL,
Tao Baod7db5942015-01-28 10:07:51 -0800518 SNDRV_CHMAP_TSR,
519 SNDRV_CHMAP_LLFE,
520 SNDRV_CHMAP_RLFE,
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800521 SNDRV_CHMAP_BC,
Tao Baod7db5942015-01-28 10:07:51 -0800522 SNDRV_CHMAP_BLC,
523 SNDRV_CHMAP_BRC,
524 SNDRV_CHMAP_LAST = SNDRV_CHMAP_BRC,
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800525};
Ben Cheng655a7c02013-10-16 16:09:24 -0700526#define SNDRV_CHMAP_POSITION_MASK 0xffff
527#define SNDRV_CHMAP_PHASE_INVERSE (0x01 << 16)
528#define SNDRV_CHMAP_DRIVER_SPEC (0x02 << 16)
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800529#define SNDRV_PCM_IOCTL_PVERSION _IOR('A', 0x00, int)
Ben Cheng655a7c02013-10-16 16:09:24 -0700530#define SNDRV_PCM_IOCTL_INFO _IOR('A', 0x01, struct snd_pcm_info)
531#define SNDRV_PCM_IOCTL_TSTAMP _IOW('A', 0x02, int)
532#define SNDRV_PCM_IOCTL_TTSTAMP _IOW('A', 0x03, int)
Christopher Ferris1308ad32017-11-14 17:32:13 -0800533#define SNDRV_PCM_IOCTL_USER_PVERSION _IOW('A', 0x04, int)
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800534#define SNDRV_PCM_IOCTL_HW_REFINE _IOWR('A', 0x10, struct snd_pcm_hw_params)
Ben Cheng655a7c02013-10-16 16:09:24 -0700535#define SNDRV_PCM_IOCTL_HW_PARAMS _IOWR('A', 0x11, struct snd_pcm_hw_params)
536#define SNDRV_PCM_IOCTL_HW_FREE _IO('A', 0x12)
537#define SNDRV_PCM_IOCTL_SW_PARAMS _IOWR('A', 0x13, struct snd_pcm_sw_params)
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800538#define SNDRV_PCM_IOCTL_STATUS _IOR('A', 0x20, struct snd_pcm_status)
Ben Cheng655a7c02013-10-16 16:09:24 -0700539#define SNDRV_PCM_IOCTL_DELAY _IOR('A', 0x21, snd_pcm_sframes_t)
540#define SNDRV_PCM_IOCTL_HWSYNC _IO('A', 0x22)
Christopher Ferrisbb9fcb42020-04-06 11:38:04 -0700541#define __SNDRV_PCM_IOCTL_SYNC_PTR _IOWR('A', 0x23, struct __snd_pcm_sync_ptr)
542#define __SNDRV_PCM_IOCTL_SYNC_PTR64 _IOWR('A', 0x23, struct __snd_pcm_sync_ptr64)
Ben Cheng655a7c02013-10-16 16:09:24 -0700543#define SNDRV_PCM_IOCTL_SYNC_PTR _IOWR('A', 0x23, struct snd_pcm_sync_ptr)
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800544#define SNDRV_PCM_IOCTL_STATUS_EXT _IOWR('A', 0x24, struct snd_pcm_status)
Christopher Ferris05d08e92016-02-04 13:16:38 -0800545#define SNDRV_PCM_IOCTL_CHANNEL_INFO _IOR('A', 0x32, struct snd_pcm_channel_info)
Ben Cheng655a7c02013-10-16 16:09:24 -0700546#define SNDRV_PCM_IOCTL_PREPARE _IO('A', 0x40)
547#define SNDRV_PCM_IOCTL_RESET _IO('A', 0x41)
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800548#define SNDRV_PCM_IOCTL_START _IO('A', 0x42)
Christopher Ferris05d08e92016-02-04 13:16:38 -0800549#define SNDRV_PCM_IOCTL_DROP _IO('A', 0x43)
Ben Cheng655a7c02013-10-16 16:09:24 -0700550#define SNDRV_PCM_IOCTL_DRAIN _IO('A', 0x44)
551#define SNDRV_PCM_IOCTL_PAUSE _IOW('A', 0x45, int)
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800552#define SNDRV_PCM_IOCTL_REWIND _IOW('A', 0x46, snd_pcm_uframes_t)
Christopher Ferris05d08e92016-02-04 13:16:38 -0800553#define SNDRV_PCM_IOCTL_RESUME _IO('A', 0x47)
Ben Cheng655a7c02013-10-16 16:09:24 -0700554#define SNDRV_PCM_IOCTL_XRUN _IO('A', 0x48)
555#define SNDRV_PCM_IOCTL_FORWARD _IOW('A', 0x49, snd_pcm_uframes_t)
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800556#define SNDRV_PCM_IOCTL_WRITEI_FRAMES _IOW('A', 0x50, struct snd_xferi)
Christopher Ferris05d08e92016-02-04 13:16:38 -0800557#define SNDRV_PCM_IOCTL_READI_FRAMES _IOR('A', 0x51, struct snd_xferi)
Ben Cheng655a7c02013-10-16 16:09:24 -0700558#define SNDRV_PCM_IOCTL_WRITEN_FRAMES _IOW('A', 0x52, struct snd_xfern)
559#define SNDRV_PCM_IOCTL_READN_FRAMES _IOR('A', 0x53, struct snd_xfern)
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800560#define SNDRV_PCM_IOCTL_LINK _IOW('A', 0x60, int)
Christopher Ferris05d08e92016-02-04 13:16:38 -0800561#define SNDRV_PCM_IOCTL_UNLINK _IO('A', 0x61)
Christopher Ferris8666d042023-09-06 14:55:31 -0700562#define SNDRV_RAWMIDI_VERSION SNDRV_PROTOCOL_VERSION(2, 0, 4)
Ben Cheng655a7c02013-10-16 16:09:24 -0700563enum {
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800564 SNDRV_RAWMIDI_STREAM_OUTPUT = 0,
Christopher Ferris05d08e92016-02-04 13:16:38 -0800565 SNDRV_RAWMIDI_STREAM_INPUT,
Tao Baod7db5942015-01-28 10:07:51 -0800566 SNDRV_RAWMIDI_STREAM_LAST = SNDRV_RAWMIDI_STREAM_INPUT,
Ben Cheng655a7c02013-10-16 16:09:24 -0700567};
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800568#define SNDRV_RAWMIDI_INFO_OUTPUT 0x00000001
Christopher Ferris05d08e92016-02-04 13:16:38 -0800569#define SNDRV_RAWMIDI_INFO_INPUT 0x00000002
Ben Cheng655a7c02013-10-16 16:09:24 -0700570#define SNDRV_RAWMIDI_INFO_DUPLEX 0x00000004
Christopher Ferris8666d042023-09-06 14:55:31 -0700571#define SNDRV_RAWMIDI_INFO_UMP 0x00000008
Ben Cheng655a7c02013-10-16 16:09:24 -0700572struct snd_rawmidi_info {
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800573 unsigned int device;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800574 unsigned int subdevice;
Tao Baod7db5942015-01-28 10:07:51 -0800575 int stream;
576 int card;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800577 unsigned int flags;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800578 unsigned char id[64];
Tao Baod7db5942015-01-28 10:07:51 -0800579 unsigned char name[80];
580 unsigned char subname[32];
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800581 unsigned int subdevices_count;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800582 unsigned int subdevices_avail;
Tao Baod7db5942015-01-28 10:07:51 -0800583 unsigned char reserved[64];
Ben Cheng655a7c02013-10-16 16:09:24 -0700584};
Christopher Ferris3a39c0b2021-09-02 00:03:38 +0000585#define SNDRV_RAWMIDI_MODE_FRAMING_MASK (7 << 0)
586#define SNDRV_RAWMIDI_MODE_FRAMING_SHIFT 0
587#define SNDRV_RAWMIDI_MODE_FRAMING_NONE (0 << 0)
588#define SNDRV_RAWMIDI_MODE_FRAMING_TSTAMP (1 << 0)
589#define SNDRV_RAWMIDI_MODE_CLOCK_MASK (7 << 3)
590#define SNDRV_RAWMIDI_MODE_CLOCK_SHIFT 3
591#define SNDRV_RAWMIDI_MODE_CLOCK_NONE (0 << 3)
592#define SNDRV_RAWMIDI_MODE_CLOCK_REALTIME (1 << 3)
593#define SNDRV_RAWMIDI_MODE_CLOCK_MONOTONIC (2 << 3)
594#define SNDRV_RAWMIDI_MODE_CLOCK_MONOTONIC_RAW (3 << 3)
595#define SNDRV_RAWMIDI_FRAMING_DATA_LENGTH 16
596struct snd_rawmidi_framing_tstamp {
597 __u8 frame_type;
598 __u8 length;
599 __u8 reserved[2];
600 __u32 tv_nsec;
601 __u64 tv_sec;
602 __u8 data[SNDRV_RAWMIDI_FRAMING_DATA_LENGTH];
Colin Cross4ac33222022-12-15 15:45:35 -0800603} __attribute__((__packed__));
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800604struct snd_rawmidi_params {
Christopher Ferris05d08e92016-02-04 13:16:38 -0800605 int stream;
Tao Baod7db5942015-01-28 10:07:51 -0800606 size_t buffer_size;
607 size_t avail_min;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800608 unsigned int no_active_sensing : 1;
Christopher Ferris3a39c0b2021-09-02 00:03:38 +0000609 unsigned int mode;
610 unsigned char reserved[12];
Ben Cheng655a7c02013-10-16 16:09:24 -0700611};
612struct snd_rawmidi_status {
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800613 int stream;
Christopher Ferrisbb9fcb42020-04-06 11:38:04 -0700614 __time_pad pad1;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800615 struct timespec tstamp;
Tao Baod7db5942015-01-28 10:07:51 -0800616 size_t avail;
617 size_t xruns;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800618 unsigned char reserved[16];
Christopher Ferris05d08e92016-02-04 13:16:38 -0800619};
Christopher Ferris8666d042023-09-06 14:55:31 -0700620#define SNDRV_UMP_EP_INFO_STATIC_BLOCKS 0x01
621#define SNDRV_UMP_EP_INFO_PROTO_MIDI_MASK 0x0300
622#define SNDRV_UMP_EP_INFO_PROTO_MIDI1 0x0100
623#define SNDRV_UMP_EP_INFO_PROTO_MIDI2 0x0200
624#define SNDRV_UMP_EP_INFO_PROTO_JRTS_MASK 0x0003
625#define SNDRV_UMP_EP_INFO_PROTO_JRTS_TX 0x0001
626#define SNDRV_UMP_EP_INFO_PROTO_JRTS_RX 0x0002
627struct snd_ump_endpoint_info {
628 int card;
629 int device;
630 unsigned int flags;
631 unsigned int protocol_caps;
632 unsigned int protocol;
633 unsigned int num_blocks;
634 unsigned short version;
635 unsigned short family_id;
636 unsigned short model_id;
637 unsigned int manufacturer_id;
638 unsigned char sw_revision[4];
639 unsigned short padding;
640 unsigned char name[128];
641 unsigned char product_id[128];
642 unsigned char reserved[32];
643} __attribute__((__packed__));
644#define SNDRV_UMP_DIR_INPUT 0x01
645#define SNDRV_UMP_DIR_OUTPUT 0x02
646#define SNDRV_UMP_DIR_BIDIRECTION 0x03
647#define SNDRV_UMP_BLOCK_IS_MIDI1 (1U << 0)
648#define SNDRV_UMP_BLOCK_IS_LOWSPEED (1U << 1)
649#define SNDRV_UMP_BLOCK_UI_HINT_UNKNOWN 0x00
650#define SNDRV_UMP_BLOCK_UI_HINT_RECEIVER 0x01
651#define SNDRV_UMP_BLOCK_UI_HINT_SENDER 0x02
652#define SNDRV_UMP_BLOCK_UI_HINT_BOTH 0x03
653#define SNDRV_UMP_MAX_GROUPS 16
654#define SNDRV_UMP_MAX_BLOCKS 32
655struct snd_ump_block_info {
656 int card;
657 int device;
658 unsigned char block_id;
659 unsigned char direction;
660 unsigned char active;
661 unsigned char first_group;
662 unsigned char num_groups;
663 unsigned char midi_ci_version;
664 unsigned char sysex8_streams;
665 unsigned char ui_hint;
666 unsigned int flags;
667 unsigned char name[128];
668 unsigned char reserved[32];
669} __attribute__((__packed__));
Ben Cheng655a7c02013-10-16 16:09:24 -0700670#define SNDRV_RAWMIDI_IOCTL_PVERSION _IOR('W', 0x00, int)
671#define SNDRV_RAWMIDI_IOCTL_INFO _IOR('W', 0x01, struct snd_rawmidi_info)
Christopher Ferris2abfa9e2021-11-01 16:26:06 -0700672#define SNDRV_RAWMIDI_IOCTL_USER_PVERSION _IOW('W', 0x02, int)
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800673#define SNDRV_RAWMIDI_IOCTL_PARAMS _IOWR('W', 0x10, struct snd_rawmidi_params)
Christopher Ferris05d08e92016-02-04 13:16:38 -0800674#define SNDRV_RAWMIDI_IOCTL_STATUS _IOWR('W', 0x20, struct snd_rawmidi_status)
Ben Cheng655a7c02013-10-16 16:09:24 -0700675#define SNDRV_RAWMIDI_IOCTL_DROP _IOW('W', 0x30, int)
676#define SNDRV_RAWMIDI_IOCTL_DRAIN _IOW('W', 0x31, int)
Christopher Ferris8666d042023-09-06 14:55:31 -0700677#define SNDRV_UMP_IOCTL_ENDPOINT_INFO _IOR('W', 0x40, struct snd_ump_endpoint_info)
678#define SNDRV_UMP_IOCTL_BLOCK_INFO _IOR('W', 0x41, struct snd_ump_block_info)
Christopher Ferrisbb9fcb42020-04-06 11:38:04 -0700679#define SNDRV_TIMER_VERSION SNDRV_PROTOCOL_VERSION(2, 0, 7)
Christopher Ferris05d08e92016-02-04 13:16:38 -0800680enum {
Tao Baod7db5942015-01-28 10:07:51 -0800681 SNDRV_TIMER_CLASS_NONE = - 1,
682 SNDRV_TIMER_CLASS_SLAVE = 0,
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800683 SNDRV_TIMER_CLASS_GLOBAL,
Christopher Ferris05d08e92016-02-04 13:16:38 -0800684 SNDRV_TIMER_CLASS_CARD,
Tao Baod7db5942015-01-28 10:07:51 -0800685 SNDRV_TIMER_CLASS_PCM,
686 SNDRV_TIMER_CLASS_LAST = SNDRV_TIMER_CLASS_PCM,
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800687};
Christopher Ferris05d08e92016-02-04 13:16:38 -0800688enum {
Tao Baod7db5942015-01-28 10:07:51 -0800689 SNDRV_TIMER_SCLASS_NONE = 0,
690 SNDRV_TIMER_SCLASS_APPLICATION,
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800691 SNDRV_TIMER_SCLASS_SEQUENCER,
Christopher Ferris05d08e92016-02-04 13:16:38 -0800692 SNDRV_TIMER_SCLASS_OSS_SEQUENCER,
Tao Baod7db5942015-01-28 10:07:51 -0800693 SNDRV_TIMER_SCLASS_LAST = SNDRV_TIMER_SCLASS_OSS_SEQUENCER,
Ben Cheng655a7c02013-10-16 16:09:24 -0700694};
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800695#define SNDRV_TIMER_GLOBAL_SYSTEM 0
Christopher Ferris05d08e92016-02-04 13:16:38 -0800696#define SNDRV_TIMER_GLOBAL_RTC 1
Ben Cheng655a7c02013-10-16 16:09:24 -0700697#define SNDRV_TIMER_GLOBAL_HPET 2
698#define SNDRV_TIMER_GLOBAL_HRTIMER 3
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800699#define SNDRV_TIMER_FLG_SLAVE (1 << 0)
Christopher Ferris05d08e92016-02-04 13:16:38 -0800700struct snd_timer_id {
Tao Baod7db5942015-01-28 10:07:51 -0800701 int dev_class;
702 int dev_sclass;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800703 int card;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800704 int device;
Tao Baod7db5942015-01-28 10:07:51 -0800705 int subdevice;
Ben Cheng655a7c02013-10-16 16:09:24 -0700706};
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800707struct snd_timer_ginfo {
Christopher Ferris05d08e92016-02-04 13:16:38 -0800708 struct snd_timer_id tid;
Tao Baod7db5942015-01-28 10:07:51 -0800709 unsigned int flags;
710 int card;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800711 unsigned char id[64];
Christopher Ferris05d08e92016-02-04 13:16:38 -0800712 unsigned char name[80];
Tao Baod7db5942015-01-28 10:07:51 -0800713 unsigned long reserved0;
714 unsigned long resolution;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800715 unsigned long resolution_min;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800716 unsigned long resolution_max;
Tao Baod7db5942015-01-28 10:07:51 -0800717 unsigned int clients;
718 unsigned char reserved[32];
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800719};
Christopher Ferris05d08e92016-02-04 13:16:38 -0800720struct snd_timer_gparams {
Tao Baod7db5942015-01-28 10:07:51 -0800721 struct snd_timer_id tid;
722 unsigned long period_num;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800723 unsigned long period_den;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800724 unsigned char reserved[32];
Ben Cheng655a7c02013-10-16 16:09:24 -0700725};
726struct snd_timer_gstatus {
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800727 struct snd_timer_id tid;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800728 unsigned long resolution;
Tao Baod7db5942015-01-28 10:07:51 -0800729 unsigned long resolution_num;
730 unsigned long resolution_den;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800731 unsigned char reserved[32];
Christopher Ferris05d08e92016-02-04 13:16:38 -0800732};
Ben Cheng655a7c02013-10-16 16:09:24 -0700733struct snd_timer_select {
Tao Baod7db5942015-01-28 10:07:51 -0800734 struct snd_timer_id id;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800735 unsigned char reserved[32];
Christopher Ferris05d08e92016-02-04 13:16:38 -0800736};
Ben Cheng655a7c02013-10-16 16:09:24 -0700737struct snd_timer_info {
Tao Baod7db5942015-01-28 10:07:51 -0800738 unsigned int flags;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800739 int card;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800740 unsigned char id[64];
Tao Baod7db5942015-01-28 10:07:51 -0800741 unsigned char name[80];
742 unsigned long reserved0;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800743 unsigned long resolution;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800744 unsigned char reserved[64];
Ben Cheng655a7c02013-10-16 16:09:24 -0700745};
Tao Baod7db5942015-01-28 10:07:51 -0800746#define SNDRV_TIMER_PSFLG_AUTO (1 << 0)
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800747#define SNDRV_TIMER_PSFLG_EXCLUSIVE (1 << 1)
Christopher Ferris05d08e92016-02-04 13:16:38 -0800748#define SNDRV_TIMER_PSFLG_EARLY_EVENT (1 << 2)
Ben Cheng655a7c02013-10-16 16:09:24 -0700749struct snd_timer_params {
Tao Baod7db5942015-01-28 10:07:51 -0800750 unsigned int flags;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800751 unsigned int ticks;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800752 unsigned int queue_size;
Tao Baod7db5942015-01-28 10:07:51 -0800753 unsigned int reserved0;
754 unsigned int filter;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800755 unsigned char reserved[60];
Christopher Ferris05d08e92016-02-04 13:16:38 -0800756};
Ben Cheng655a7c02013-10-16 16:09:24 -0700757struct snd_timer_status {
Tao Baod7db5942015-01-28 10:07:51 -0800758 struct timespec tstamp;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800759 unsigned int resolution;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800760 unsigned int lost;
Tao Baod7db5942015-01-28 10:07:51 -0800761 unsigned int overrun;
762 unsigned int queue;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800763 unsigned char reserved[64];
Christopher Ferris05d08e92016-02-04 13:16:38 -0800764};
Ben Cheng655a7c02013-10-16 16:09:24 -0700765#define SNDRV_TIMER_IOCTL_PVERSION _IOR('T', 0x00, int)
766#define SNDRV_TIMER_IOCTL_NEXT_DEVICE _IOWR('T', 0x01, struct snd_timer_id)
Christopher Ferrisbb9fcb42020-04-06 11:38:04 -0700767#define SNDRV_TIMER_IOCTL_TREAD_OLD _IOW('T', 0x02, int)
Christopher Ferris05d08e92016-02-04 13:16:38 -0800768#define SNDRV_TIMER_IOCTL_GINFO _IOWR('T', 0x03, struct snd_timer_ginfo)
Ben Cheng655a7c02013-10-16 16:09:24 -0700769#define SNDRV_TIMER_IOCTL_GPARAMS _IOW('T', 0x04, struct snd_timer_gparams)
770#define SNDRV_TIMER_IOCTL_GSTATUS _IOWR('T', 0x05, struct snd_timer_gstatus)
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800771#define SNDRV_TIMER_IOCTL_SELECT _IOW('T', 0x10, struct snd_timer_select)
Christopher Ferris05d08e92016-02-04 13:16:38 -0800772#define SNDRV_TIMER_IOCTL_INFO _IOR('T', 0x11, struct snd_timer_info)
Ben Cheng655a7c02013-10-16 16:09:24 -0700773#define SNDRV_TIMER_IOCTL_PARAMS _IOW('T', 0x12, struct snd_timer_params)
774#define SNDRV_TIMER_IOCTL_STATUS _IOR('T', 0x14, struct snd_timer_status)
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800775#define SNDRV_TIMER_IOCTL_START _IO('T', 0xa0)
Christopher Ferris05d08e92016-02-04 13:16:38 -0800776#define SNDRV_TIMER_IOCTL_STOP _IO('T', 0xa1)
Ben Cheng655a7c02013-10-16 16:09:24 -0700777#define SNDRV_TIMER_IOCTL_CONTINUE _IO('T', 0xa2)
778#define SNDRV_TIMER_IOCTL_PAUSE _IO('T', 0xa3)
Christopher Ferrisbb9fcb42020-04-06 11:38:04 -0700779#define SNDRV_TIMER_IOCTL_TREAD64 _IOW('T', 0xa4, int)
780#if __BITS_PER_LONG == 64
781#define SNDRV_TIMER_IOCTL_TREAD SNDRV_TIMER_IOCTL_TREAD_OLD
782#else
783#define SNDRV_TIMER_IOCTL_TREAD ((sizeof(__kernel_long_t) >= sizeof(time_t)) ? SNDRV_TIMER_IOCTL_TREAD_OLD : SNDRV_TIMER_IOCTL_TREAD64)
784#endif
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800785struct snd_timer_read {
Christopher Ferris05d08e92016-02-04 13:16:38 -0800786 unsigned int resolution;
Tao Baod7db5942015-01-28 10:07:51 -0800787 unsigned int ticks;
Ben Cheng655a7c02013-10-16 16:09:24 -0700788};
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800789enum {
Christopher Ferris05d08e92016-02-04 13:16:38 -0800790 SNDRV_TIMER_EVENT_RESOLUTION = 0,
Tao Baod7db5942015-01-28 10:07:51 -0800791 SNDRV_TIMER_EVENT_TICK,
792 SNDRV_TIMER_EVENT_START,
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800793 SNDRV_TIMER_EVENT_STOP,
Christopher Ferris05d08e92016-02-04 13:16:38 -0800794 SNDRV_TIMER_EVENT_CONTINUE,
Tao Baod7db5942015-01-28 10:07:51 -0800795 SNDRV_TIMER_EVENT_PAUSE,
796 SNDRV_TIMER_EVENT_EARLY,
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800797 SNDRV_TIMER_EVENT_SUSPEND,
Christopher Ferris05d08e92016-02-04 13:16:38 -0800798 SNDRV_TIMER_EVENT_RESUME,
Tao Baod7db5942015-01-28 10:07:51 -0800799 SNDRV_TIMER_EVENT_MSTART = SNDRV_TIMER_EVENT_START + 10,
800 SNDRV_TIMER_EVENT_MSTOP = SNDRV_TIMER_EVENT_STOP + 10,
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800801 SNDRV_TIMER_EVENT_MCONTINUE = SNDRV_TIMER_EVENT_CONTINUE + 10,
Christopher Ferris05d08e92016-02-04 13:16:38 -0800802 SNDRV_TIMER_EVENT_MPAUSE = SNDRV_TIMER_EVENT_PAUSE + 10,
Tao Baod7db5942015-01-28 10:07:51 -0800803 SNDRV_TIMER_EVENT_MSUSPEND = SNDRV_TIMER_EVENT_SUSPEND + 10,
804 SNDRV_TIMER_EVENT_MRESUME = SNDRV_TIMER_EVENT_RESUME + 10,
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800805};
Christopher Ferris05d08e92016-02-04 13:16:38 -0800806struct snd_timer_tread {
Tao Baod7db5942015-01-28 10:07:51 -0800807 int event;
Christopher Ferrisbb9fcb42020-04-06 11:38:04 -0700808 __time_pad pad1;
Tao Baod7db5942015-01-28 10:07:51 -0800809 struct timespec tstamp;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800810 unsigned int val;
Christopher Ferrisbb9fcb42020-04-06 11:38:04 -0700811 __time_pad pad2;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800812};
Christopher Ferris8666d042023-09-06 14:55:31 -0700813#define SNDRV_CTL_VERSION SNDRV_PROTOCOL_VERSION(2, 0, 9)
Ben Cheng655a7c02013-10-16 16:09:24 -0700814struct snd_ctl_card_info {
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800815 int card;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800816 int pad;
Tao Baod7db5942015-01-28 10:07:51 -0800817 unsigned char id[16];
818 unsigned char driver[16];
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800819 unsigned char name[32];
Christopher Ferris05d08e92016-02-04 13:16:38 -0800820 unsigned char longname[80];
Tao Baod7db5942015-01-28 10:07:51 -0800821 unsigned char reserved_[16];
822 unsigned char mixername[80];
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800823 unsigned char components[128];
Christopher Ferris05d08e92016-02-04 13:16:38 -0800824};
Ben Cheng655a7c02013-10-16 16:09:24 -0700825typedef int __bitwise snd_ctl_elem_type_t;
Elliott Hughes0f0c18f2023-03-29 15:53:31 -0700826#define SNDRV_CTL_ELEM_TYPE_NONE (( snd_ctl_elem_type_t) 0)
827#define SNDRV_CTL_ELEM_TYPE_BOOLEAN (( snd_ctl_elem_type_t) 1)
828#define SNDRV_CTL_ELEM_TYPE_INTEGER (( snd_ctl_elem_type_t) 2)
829#define SNDRV_CTL_ELEM_TYPE_ENUMERATED (( snd_ctl_elem_type_t) 3)
830#define SNDRV_CTL_ELEM_TYPE_BYTES (( snd_ctl_elem_type_t) 4)
831#define SNDRV_CTL_ELEM_TYPE_IEC958 (( snd_ctl_elem_type_t) 5)
832#define SNDRV_CTL_ELEM_TYPE_INTEGER64 (( snd_ctl_elem_type_t) 6)
Ben Cheng655a7c02013-10-16 16:09:24 -0700833#define SNDRV_CTL_ELEM_TYPE_LAST SNDRV_CTL_ELEM_TYPE_INTEGER64
834typedef int __bitwise snd_ctl_elem_iface_t;
Elliott Hughes0f0c18f2023-03-29 15:53:31 -0700835#define SNDRV_CTL_ELEM_IFACE_CARD (( snd_ctl_elem_iface_t) 0)
836#define SNDRV_CTL_ELEM_IFACE_HWDEP (( snd_ctl_elem_iface_t) 1)
837#define SNDRV_CTL_ELEM_IFACE_MIXER (( snd_ctl_elem_iface_t) 2)
838#define SNDRV_CTL_ELEM_IFACE_PCM (( snd_ctl_elem_iface_t) 3)
839#define SNDRV_CTL_ELEM_IFACE_RAWMIDI (( snd_ctl_elem_iface_t) 4)
840#define SNDRV_CTL_ELEM_IFACE_TIMER (( snd_ctl_elem_iface_t) 5)
841#define SNDRV_CTL_ELEM_IFACE_SEQUENCER (( snd_ctl_elem_iface_t) 6)
Ben Cheng655a7c02013-10-16 16:09:24 -0700842#define SNDRV_CTL_ELEM_IFACE_LAST SNDRV_CTL_ELEM_IFACE_SEQUENCER
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800843#define SNDRV_CTL_ELEM_ACCESS_READ (1 << 0)
Christopher Ferris05d08e92016-02-04 13:16:38 -0800844#define SNDRV_CTL_ELEM_ACCESS_WRITE (1 << 1)
Tao Baod7db5942015-01-28 10:07:51 -0800845#define SNDRV_CTL_ELEM_ACCESS_READWRITE (SNDRV_CTL_ELEM_ACCESS_READ | SNDRV_CTL_ELEM_ACCESS_WRITE)
846#define SNDRV_CTL_ELEM_ACCESS_VOLATILE (1 << 2)
Christopher Ferris05d08e92016-02-04 13:16:38 -0800847#define SNDRV_CTL_ELEM_ACCESS_TLV_READ (1 << 4)
Tao Baod7db5942015-01-28 10:07:51 -0800848#define SNDRV_CTL_ELEM_ACCESS_TLV_WRITE (1 << 5)
849#define SNDRV_CTL_ELEM_ACCESS_TLV_READWRITE (SNDRV_CTL_ELEM_ACCESS_TLV_READ | SNDRV_CTL_ELEM_ACCESS_TLV_WRITE)
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800850#define SNDRV_CTL_ELEM_ACCESS_TLV_COMMAND (1 << 6)
Christopher Ferris05d08e92016-02-04 13:16:38 -0800851#define SNDRV_CTL_ELEM_ACCESS_INACTIVE (1 << 8)
Tao Baod7db5942015-01-28 10:07:51 -0800852#define SNDRV_CTL_ELEM_ACCESS_LOCK (1 << 9)
853#define SNDRV_CTL_ELEM_ACCESS_OWNER (1 << 10)
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800854#define SNDRV_CTL_ELEM_ACCESS_TLV_CALLBACK (1 << 28)
Christopher Ferris05d08e92016-02-04 13:16:38 -0800855#define SNDRV_CTL_ELEM_ACCESS_USER (1 << 29)
Ben Cheng655a7c02013-10-16 16:09:24 -0700856#define SNDRV_CTL_POWER_D0 0x0000
857#define SNDRV_CTL_POWER_D1 0x0100
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800858#define SNDRV_CTL_POWER_D2 0x0200
Christopher Ferris05d08e92016-02-04 13:16:38 -0800859#define SNDRV_CTL_POWER_D3 0x0300
Tao Baod7db5942015-01-28 10:07:51 -0800860#define SNDRV_CTL_POWER_D3hot (SNDRV_CTL_POWER_D3 | 0x0000)
861#define SNDRV_CTL_POWER_D3cold (SNDRV_CTL_POWER_D3 | 0x0001)
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800862#define SNDRV_CTL_ELEM_ID_NAME_MAXLEN 44
Christopher Ferris05d08e92016-02-04 13:16:38 -0800863struct snd_ctl_elem_id {
Tao Baod7db5942015-01-28 10:07:51 -0800864 unsigned int numid;
865 snd_ctl_elem_iface_t iface;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800866 unsigned int device;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800867 unsigned int subdevice;
868 unsigned char name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN];
Tao Baod7db5942015-01-28 10:07:51 -0800869 unsigned int index;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800870};
Christopher Ferris05d08e92016-02-04 13:16:38 -0800871struct snd_ctl_elem_list {
Tao Baod7db5942015-01-28 10:07:51 -0800872 unsigned int offset;
873 unsigned int space;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800874 unsigned int used;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800875 unsigned int count;
Elliott Hughes0f0c18f2023-03-29 15:53:31 -0700876 struct snd_ctl_elem_id * pids;
Tao Baod7db5942015-01-28 10:07:51 -0800877 unsigned char reserved[50];
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800878};
Christopher Ferris05d08e92016-02-04 13:16:38 -0800879struct snd_ctl_elem_info {
Tao Baod7db5942015-01-28 10:07:51 -0800880 struct snd_ctl_elem_id id;
881 snd_ctl_elem_type_t type;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800882 unsigned int access;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800883 unsigned int count;
Tao Baod7db5942015-01-28 10:07:51 -0800884 __kernel_pid_t owner;
885 union {
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800886 struct {
Christopher Ferris05d08e92016-02-04 13:16:38 -0800887 long min;
Tao Baod7db5942015-01-28 10:07:51 -0800888 long max;
889 long step;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800890 } integer;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800891 struct {
Tao Baod7db5942015-01-28 10:07:51 -0800892 long long min;
893 long long max;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800894 long long step;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800895 } integer64;
Tao Baod7db5942015-01-28 10:07:51 -0800896 struct {
897 unsigned int items;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800898 unsigned int item;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800899 char name[64];
Tao Baod7db5942015-01-28 10:07:51 -0800900 __u64 names_ptr;
901 unsigned int names_length;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800902 } enumerated;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800903 unsigned char reserved[128];
Tao Baod7db5942015-01-28 10:07:51 -0800904 } value;
Christopher Ferrisbb9fcb42020-04-06 11:38:04 -0700905 unsigned char reserved[64];
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800906};
Christopher Ferris05d08e92016-02-04 13:16:38 -0800907struct snd_ctl_elem_value {
Tao Baod7db5942015-01-28 10:07:51 -0800908 struct snd_ctl_elem_id id;
909 unsigned int indirect : 1;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800910 union {
Christopher Ferris05d08e92016-02-04 13:16:38 -0800911 union {
Tao Baod7db5942015-01-28 10:07:51 -0800912 long value[128];
913 long * value_ptr;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800914 } integer;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800915 union {
Tao Baod7db5942015-01-28 10:07:51 -0800916 long long value[64];
917 long long * value_ptr;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800918 } integer64;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800919 union {
Tao Baod7db5942015-01-28 10:07:51 -0800920 unsigned int item[128];
921 unsigned int * item_ptr;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800922 } enumerated;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800923 union {
Tao Baod7db5942015-01-28 10:07:51 -0800924 unsigned char data[512];
925 unsigned char * data_ptr;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800926 } bytes;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800927 struct snd_aes_iec958 iec958;
Tao Baod7db5942015-01-28 10:07:51 -0800928 } value;
Christopher Ferrisbb9fcb42020-04-06 11:38:04 -0700929 unsigned char reserved[128];
Christopher Ferris05d08e92016-02-04 13:16:38 -0800930};
Tao Baod7db5942015-01-28 10:07:51 -0800931struct snd_ctl_tlv {
932 unsigned int numid;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800933 unsigned int length;
Christopher Ferris7447a1c2022-10-04 18:24:44 -0700934 unsigned int tlv[];
Ben Cheng655a7c02013-10-16 16:09:24 -0700935};
936#define SNDRV_CTL_IOCTL_PVERSION _IOR('U', 0x00, int)
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800937#define SNDRV_CTL_IOCTL_CARD_INFO _IOR('U', 0x01, struct snd_ctl_card_info)
Christopher Ferris05d08e92016-02-04 13:16:38 -0800938#define SNDRV_CTL_IOCTL_ELEM_LIST _IOWR('U', 0x10, struct snd_ctl_elem_list)
Ben Cheng655a7c02013-10-16 16:09:24 -0700939#define SNDRV_CTL_IOCTL_ELEM_INFO _IOWR('U', 0x11, struct snd_ctl_elem_info)
940#define SNDRV_CTL_IOCTL_ELEM_READ _IOWR('U', 0x12, struct snd_ctl_elem_value)
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800941#define SNDRV_CTL_IOCTL_ELEM_WRITE _IOWR('U', 0x13, struct snd_ctl_elem_value)
Christopher Ferris05d08e92016-02-04 13:16:38 -0800942#define SNDRV_CTL_IOCTL_ELEM_LOCK _IOW('U', 0x14, struct snd_ctl_elem_id)
Ben Cheng655a7c02013-10-16 16:09:24 -0700943#define SNDRV_CTL_IOCTL_ELEM_UNLOCK _IOW('U', 0x15, struct snd_ctl_elem_id)
944#define SNDRV_CTL_IOCTL_SUBSCRIBE_EVENTS _IOWR('U', 0x16, int)
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800945#define SNDRV_CTL_IOCTL_ELEM_ADD _IOWR('U', 0x17, struct snd_ctl_elem_info)
Christopher Ferris05d08e92016-02-04 13:16:38 -0800946#define SNDRV_CTL_IOCTL_ELEM_REPLACE _IOWR('U', 0x18, struct snd_ctl_elem_info)
Ben Cheng655a7c02013-10-16 16:09:24 -0700947#define SNDRV_CTL_IOCTL_ELEM_REMOVE _IOWR('U', 0x19, struct snd_ctl_elem_id)
948#define SNDRV_CTL_IOCTL_TLV_READ _IOWR('U', 0x1a, struct snd_ctl_tlv)
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800949#define SNDRV_CTL_IOCTL_TLV_WRITE _IOWR('U', 0x1b, struct snd_ctl_tlv)
Christopher Ferris05d08e92016-02-04 13:16:38 -0800950#define SNDRV_CTL_IOCTL_TLV_COMMAND _IOWR('U', 0x1c, struct snd_ctl_tlv)
Ben Cheng655a7c02013-10-16 16:09:24 -0700951#define SNDRV_CTL_IOCTL_HWDEP_NEXT_DEVICE _IOWR('U', 0x20, int)
952#define SNDRV_CTL_IOCTL_HWDEP_INFO _IOR('U', 0x21, struct snd_hwdep_info)
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800953#define SNDRV_CTL_IOCTL_PCM_NEXT_DEVICE _IOR('U', 0x30, int)
Christopher Ferris05d08e92016-02-04 13:16:38 -0800954#define SNDRV_CTL_IOCTL_PCM_INFO _IOWR('U', 0x31, struct snd_pcm_info)
Ben Cheng655a7c02013-10-16 16:09:24 -0700955#define SNDRV_CTL_IOCTL_PCM_PREFER_SUBDEVICE _IOW('U', 0x32, int)
956#define SNDRV_CTL_IOCTL_RAWMIDI_NEXT_DEVICE _IOWR('U', 0x40, int)
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800957#define SNDRV_CTL_IOCTL_RAWMIDI_INFO _IOWR('U', 0x41, struct snd_rawmidi_info)
Christopher Ferris05d08e92016-02-04 13:16:38 -0800958#define SNDRV_CTL_IOCTL_RAWMIDI_PREFER_SUBDEVICE _IOW('U', 0x42, int)
Christopher Ferris8666d042023-09-06 14:55:31 -0700959#define SNDRV_CTL_IOCTL_UMP_NEXT_DEVICE _IOWR('U', 0x43, int)
960#define SNDRV_CTL_IOCTL_UMP_ENDPOINT_INFO _IOWR('U', 0x44, struct snd_ump_endpoint_info)
961#define SNDRV_CTL_IOCTL_UMP_BLOCK_INFO _IOWR('U', 0x45, struct snd_ump_block_info)
Ben Cheng655a7c02013-10-16 16:09:24 -0700962#define SNDRV_CTL_IOCTL_POWER _IOWR('U', 0xd0, int)
963#define SNDRV_CTL_IOCTL_POWER_STATE _IOR('U', 0xd1, int)
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800964enum sndrv_ctl_event_type {
Christopher Ferris05d08e92016-02-04 13:16:38 -0800965 SNDRV_CTL_EVENT_ELEM = 0,
Tao Baod7db5942015-01-28 10:07:51 -0800966 SNDRV_CTL_EVENT_LAST = SNDRV_CTL_EVENT_ELEM,
Ben Cheng655a7c02013-10-16 16:09:24 -0700967};
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800968#define SNDRV_CTL_EVENT_MASK_VALUE (1 << 0)
Christopher Ferris05d08e92016-02-04 13:16:38 -0800969#define SNDRV_CTL_EVENT_MASK_INFO (1 << 1)
Tao Baod7db5942015-01-28 10:07:51 -0800970#define SNDRV_CTL_EVENT_MASK_ADD (1 << 2)
971#define SNDRV_CTL_EVENT_MASK_TLV (1 << 3)
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800972#define SNDRV_CTL_EVENT_MASK_REMOVE (~0U)
Christopher Ferris05d08e92016-02-04 13:16:38 -0800973struct snd_ctl_event {
Tao Baod7db5942015-01-28 10:07:51 -0800974 int type;
975 union {
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800976 struct {
Christopher Ferris05d08e92016-02-04 13:16:38 -0800977 unsigned int mask;
Tao Baod7db5942015-01-28 10:07:51 -0800978 struct snd_ctl_elem_id id;
979 } elem;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800980 unsigned char data8[60];
Christopher Ferris05d08e92016-02-04 13:16:38 -0800981 } data;
Ben Cheng655a7c02013-10-16 16:09:24 -0700982};
983#define SNDRV_CTL_NAME_NONE ""
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800984#define SNDRV_CTL_NAME_PLAYBACK "Playback "
Christopher Ferris05d08e92016-02-04 13:16:38 -0800985#define SNDRV_CTL_NAME_CAPTURE "Capture "
Ben Cheng655a7c02013-10-16 16:09:24 -0700986#define SNDRV_CTL_NAME_IEC958_NONE ""
987#define SNDRV_CTL_NAME_IEC958_SWITCH "Switch"
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800988#define SNDRV_CTL_NAME_IEC958_VOLUME "Volume"
Christopher Ferris05d08e92016-02-04 13:16:38 -0800989#define SNDRV_CTL_NAME_IEC958_DEFAULT "Default"
Ben Cheng655a7c02013-10-16 16:09:24 -0700990#define SNDRV_CTL_NAME_IEC958_MASK "Mask"
991#define SNDRV_CTL_NAME_IEC958_CON_MASK "Con Mask"
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800992#define SNDRV_CTL_NAME_IEC958_PRO_MASK "Pro Mask"
Christopher Ferris05d08e92016-02-04 13:16:38 -0800993#define SNDRV_CTL_NAME_IEC958_PCM_STREAM "PCM Stream"
Tao Baod7db5942015-01-28 10:07:51 -0800994#define SNDRV_CTL_NAME_IEC958(expl,direction,what) "IEC958 " expl SNDRV_CTL_NAME_ ##direction SNDRV_CTL_NAME_IEC958_ ##what
Ben Cheng655a7c02013-10-16 16:09:24 -0700995#endif