blob: 441f1d431a6aa40973ffa85bc27bee69e9869afc [file] [log] [blame]
Ben Cheng655a7c02013-10-16 16:09:24 -07001/****************************************************************************
2 ****************************************************************************
3 ***
4 *** This header was automatically generated from a Linux kernel header
5 *** of the same name, to make information necessary for userspace to
6 *** call into the kernel available to libc. It contains only constants,
7 *** structures, and macros generated from the original header, and thus,
8 *** contains no copyrightable information.
9 ***
10 *** To edit the content of this header, modify the corresponding
11 *** source file (e.g. under external/kernel-headers/original/) then
12 *** run bionic/libc/kernel/tools/update_all.py
13 ***
14 *** Any manual change here will be lost the next time this script will
15 *** be run. You've been warned!
16 ***
17 ****************************************************************************
18 ****************************************************************************/
19#ifndef _UAPI__SOUND_ASOUND_H
20#define _UAPI__SOUND_ASOUND_H
Christopher Ferris106b3a82016-08-24 12:15:38 -070021#ifdef __linux__
Ben Cheng655a7c02013-10-16 16:09:24 -070022#include <linux/types.h>
Christopher Ferrisbb9fcb42020-04-06 11:38:04 -070023#include <asm/byteorder.h>
Christopher Ferris106b3a82016-08-24 12:15:38 -070024#else
Christopher Ferrisbb9fcb42020-04-06 11:38:04 -070025#include <endian.h>
Christopher Ferris106b3a82016-08-24 12:15:38 -070026#include <sys/ioctl.h>
27#endif
Christopher Ferris05d08e92016-02-04 13:16:38 -080028#include <stdlib.h>
Christopher Ferris24f97eb2019-05-20 12:58:13 -070029#include <time.h>
Christopher Ferris05d08e92016-02-04 13:16:38 -080030#define SNDRV_PROTOCOL_VERSION(major,minor,subminor) (((major) << 16) | ((minor) << 8) | (subminor))
Tao Baod7db5942015-01-28 10:07:51 -080031#define SNDRV_PROTOCOL_MAJOR(version) (((version) >> 16) & 0xffff)
32#define SNDRV_PROTOCOL_MINOR(version) (((version) >> 8) & 0xff)
33#define SNDRV_PROTOCOL_MICRO(version) ((version) & 0xff)
Christopher Ferris05d08e92016-02-04 13:16:38 -080034#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)))
Ben Cheng655a7c02013-10-16 16:09:24 -070035struct snd_aes_iec958 {
Tao Baod7db5942015-01-28 10:07:51 -080036 unsigned char status[24];
37 unsigned char subcode[147];
Christopher Ferris05d08e92016-02-04 13:16:38 -080038 unsigned char pad;
Tao Baod7db5942015-01-28 10:07:51 -080039 unsigned char dig_subframe[4];
Ben Cheng655a7c02013-10-16 16:09:24 -070040};
41struct snd_cea_861_aud_if {
Christopher Ferris05d08e92016-02-04 13:16:38 -080042 unsigned char db1_ct_cc;
Tao Baod7db5942015-01-28 10:07:51 -080043 unsigned char db2_sf_ss;
44 unsigned char db3;
45 unsigned char db4_ca;
Christopher Ferris05d08e92016-02-04 13:16:38 -080046 unsigned char db5_dminh_lsv;
Ben Cheng655a7c02013-10-16 16:09:24 -070047};
48#define SNDRV_HWDEP_VERSION SNDRV_PROTOCOL_VERSION(1, 0, 1)
49enum {
Christopher Ferris05d08e92016-02-04 13:16:38 -080050 SNDRV_HWDEP_IFACE_OPL2 = 0,
Tao Baod7db5942015-01-28 10:07:51 -080051 SNDRV_HWDEP_IFACE_OPL3,
52 SNDRV_HWDEP_IFACE_OPL4,
53 SNDRV_HWDEP_IFACE_SB16CSP,
Christopher Ferris05d08e92016-02-04 13:16:38 -080054 SNDRV_HWDEP_IFACE_EMU10K1,
Tao Baod7db5942015-01-28 10:07:51 -080055 SNDRV_HWDEP_IFACE_YSS225,
56 SNDRV_HWDEP_IFACE_ICS2115,
57 SNDRV_HWDEP_IFACE_SSCAPE,
Christopher Ferris05d08e92016-02-04 13:16:38 -080058 SNDRV_HWDEP_IFACE_VX,
Tao Baod7db5942015-01-28 10:07:51 -080059 SNDRV_HWDEP_IFACE_MIXART,
60 SNDRV_HWDEP_IFACE_USX2Y,
61 SNDRV_HWDEP_IFACE_EMUX_WAVETABLE,
Christopher Ferris05d08e92016-02-04 13:16:38 -080062 SNDRV_HWDEP_IFACE_BLUETOOTH,
Tao Baod7db5942015-01-28 10:07:51 -080063 SNDRV_HWDEP_IFACE_USX2Y_PCM,
64 SNDRV_HWDEP_IFACE_PCXHR,
65 SNDRV_HWDEP_IFACE_SB_RC,
Christopher Ferris05d08e92016-02-04 13:16:38 -080066 SNDRV_HWDEP_IFACE_HDA,
Tao Baod7db5942015-01-28 10:07:51 -080067 SNDRV_HWDEP_IFACE_USB_STREAM,
68 SNDRV_HWDEP_IFACE_FW_DICE,
69 SNDRV_HWDEP_IFACE_FW_FIREWORKS,
Christopher Ferris05d08e92016-02-04 13:16:38 -080070 SNDRV_HWDEP_IFACE_FW_BEBOB,
71 SNDRV_HWDEP_IFACE_FW_OXFW,
72 SNDRV_HWDEP_IFACE_FW_DIGI00X,
73 SNDRV_HWDEP_IFACE_FW_TASCAM,
Christopher Ferris6a9755d2017-01-13 14:09:31 -080074 SNDRV_HWDEP_IFACE_LINE6,
Christopher Ferris525ce912017-07-26 13:12:53 -070075 SNDRV_HWDEP_IFACE_FW_MOTU,
76 SNDRV_HWDEP_IFACE_FW_FIREFACE,
77 SNDRV_HWDEP_IFACE_LAST = SNDRV_HWDEP_IFACE_FW_FIREFACE
Christopher Ferrisba8d4f42014-09-03 19:56:49 -070078};
Christopher Ferris38062f92014-07-09 15:33:25 -070079struct snd_hwdep_info {
Christopher Ferris6a9755d2017-01-13 14:09:31 -080080 unsigned int device;
Tao Baod7db5942015-01-28 10:07:51 -080081 int card;
82 unsigned char id[64];
83 unsigned char name[80];
Christopher Ferris6a9755d2017-01-13 14:09:31 -080084 int iface;
Tao Baod7db5942015-01-28 10:07:51 -080085 unsigned char reserved[64];
Ben Cheng655a7c02013-10-16 16:09:24 -070086};
Christopher Ferris38062f92014-07-09 15:33:25 -070087struct snd_hwdep_dsp_status {
Christopher Ferris6a9755d2017-01-13 14:09:31 -080088 unsigned int version;
Tao Baod7db5942015-01-28 10:07:51 -080089 unsigned char id[32];
90 unsigned int num_dsps;
91 unsigned int dsp_loaded;
Christopher Ferris6a9755d2017-01-13 14:09:31 -080092 unsigned int chip_ready;
Tao Baod7db5942015-01-28 10:07:51 -080093 unsigned char reserved[16];
Ben Cheng655a7c02013-10-16 16:09:24 -070094};
Christopher Ferris38062f92014-07-09 15:33:25 -070095struct snd_hwdep_dsp_image {
Christopher Ferris6a9755d2017-01-13 14:09:31 -080096 unsigned int index;
Tao Baod7db5942015-01-28 10:07:51 -080097 unsigned char name[64];
98 unsigned char __user * image;
99 size_t length;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800100 unsigned long driver_data;
Ben Cheng655a7c02013-10-16 16:09:24 -0700101};
Tao Baod7db5942015-01-28 10:07:51 -0800102#define SNDRV_HWDEP_IOCTL_PVERSION _IOR('H', 0x00, int)
103#define SNDRV_HWDEP_IOCTL_INFO _IOR('H', 0x01, struct snd_hwdep_info)
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800104#define SNDRV_HWDEP_IOCTL_DSP_STATUS _IOR('H', 0x02, struct snd_hwdep_dsp_status)
Ben Cheng655a7c02013-10-16 16:09:24 -0700105#define SNDRV_HWDEP_IOCTL_DSP_LOAD _IOW('H', 0x03, struct snd_hwdep_dsp_image)
Christopher Ferrisbb9fcb42020-04-06 11:38:04 -0700106#define SNDRV_PCM_VERSION SNDRV_PROTOCOL_VERSION(2, 0, 15)
Christopher Ferris38062f92014-07-09 15:33:25 -0700107typedef unsigned long snd_pcm_uframes_t;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800108typedef signed long snd_pcm_sframes_t;
Ben Cheng655a7c02013-10-16 16:09:24 -0700109enum {
Tao Baod7db5942015-01-28 10:07:51 -0800110 SNDRV_PCM_CLASS_GENERIC = 0,
111 SNDRV_PCM_CLASS_MULTI,
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800112 SNDRV_PCM_CLASS_MODEM,
Tao Baod7db5942015-01-28 10:07:51 -0800113 SNDRV_PCM_CLASS_DIGITIZER,
114 SNDRV_PCM_CLASS_LAST = SNDRV_PCM_CLASS_DIGITIZER,
Christopher Ferris38062f92014-07-09 15:33:25 -0700115};
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800116enum {
Tao Baod7db5942015-01-28 10:07:51 -0800117 SNDRV_PCM_SUBCLASS_GENERIC_MIX = 0,
118 SNDRV_PCM_SUBCLASS_MULTI_MIX,
119 SNDRV_PCM_SUBCLASS_LAST = SNDRV_PCM_SUBCLASS_MULTI_MIX,
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800120};
Ben Cheng655a7c02013-10-16 16:09:24 -0700121enum {
Tao Baod7db5942015-01-28 10:07:51 -0800122 SNDRV_PCM_STREAM_PLAYBACK = 0,
123 SNDRV_PCM_STREAM_CAPTURE,
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800124 SNDRV_PCM_STREAM_LAST = SNDRV_PCM_STREAM_CAPTURE,
Ben Cheng655a7c02013-10-16 16:09:24 -0700125};
126typedef int __bitwise snd_pcm_access_t;
Christopher Ferris38062f92014-07-09 15:33:25 -0700127#define SNDRV_PCM_ACCESS_MMAP_INTERLEAVED ((__force snd_pcm_access_t) 0)
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800128#define SNDRV_PCM_ACCESS_MMAP_NONINTERLEAVED ((__force snd_pcm_access_t) 1)
Ben Cheng655a7c02013-10-16 16:09:24 -0700129#define SNDRV_PCM_ACCESS_MMAP_COMPLEX ((__force snd_pcm_access_t) 2)
130#define SNDRV_PCM_ACCESS_RW_INTERLEAVED ((__force snd_pcm_access_t) 3)
Christopher Ferris38062f92014-07-09 15:33:25 -0700131#define SNDRV_PCM_ACCESS_RW_NONINTERLEAVED ((__force snd_pcm_access_t) 4)
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800132#define SNDRV_PCM_ACCESS_LAST SNDRV_PCM_ACCESS_RW_NONINTERLEAVED
Ben Cheng655a7c02013-10-16 16:09:24 -0700133typedef int __bitwise snd_pcm_format_t;
134#define SNDRV_PCM_FORMAT_S8 ((__force snd_pcm_format_t) 0)
Christopher Ferris38062f92014-07-09 15:33:25 -0700135#define SNDRV_PCM_FORMAT_U8 ((__force snd_pcm_format_t) 1)
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800136#define SNDRV_PCM_FORMAT_S16_LE ((__force snd_pcm_format_t) 2)
Ben Cheng655a7c02013-10-16 16:09:24 -0700137#define SNDRV_PCM_FORMAT_S16_BE ((__force snd_pcm_format_t) 3)
138#define SNDRV_PCM_FORMAT_U16_LE ((__force snd_pcm_format_t) 4)
Christopher Ferris38062f92014-07-09 15:33:25 -0700139#define SNDRV_PCM_FORMAT_U16_BE ((__force snd_pcm_format_t) 5)
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800140#define SNDRV_PCM_FORMAT_S24_LE ((__force snd_pcm_format_t) 6)
Ben Cheng655a7c02013-10-16 16:09:24 -0700141#define SNDRV_PCM_FORMAT_S24_BE ((__force snd_pcm_format_t) 7)
142#define SNDRV_PCM_FORMAT_U24_LE ((__force snd_pcm_format_t) 8)
Christopher Ferris38062f92014-07-09 15:33:25 -0700143#define SNDRV_PCM_FORMAT_U24_BE ((__force snd_pcm_format_t) 9)
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800144#define SNDRV_PCM_FORMAT_S32_LE ((__force snd_pcm_format_t) 10)
Ben Cheng655a7c02013-10-16 16:09:24 -0700145#define SNDRV_PCM_FORMAT_S32_BE ((__force snd_pcm_format_t) 11)
146#define SNDRV_PCM_FORMAT_U32_LE ((__force snd_pcm_format_t) 12)
Christopher Ferris38062f92014-07-09 15:33:25 -0700147#define SNDRV_PCM_FORMAT_U32_BE ((__force snd_pcm_format_t) 13)
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800148#define SNDRV_PCM_FORMAT_FLOAT_LE ((__force snd_pcm_format_t) 14)
Ben Cheng655a7c02013-10-16 16:09:24 -0700149#define SNDRV_PCM_FORMAT_FLOAT_BE ((__force snd_pcm_format_t) 15)
150#define SNDRV_PCM_FORMAT_FLOAT64_LE ((__force snd_pcm_format_t) 16)
Christopher Ferris38062f92014-07-09 15:33:25 -0700151#define SNDRV_PCM_FORMAT_FLOAT64_BE ((__force snd_pcm_format_t) 17)
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800152#define SNDRV_PCM_FORMAT_IEC958_SUBFRAME_LE ((__force snd_pcm_format_t) 18)
Ben Cheng655a7c02013-10-16 16:09:24 -0700153#define SNDRV_PCM_FORMAT_IEC958_SUBFRAME_BE ((__force snd_pcm_format_t) 19)
154#define SNDRV_PCM_FORMAT_MU_LAW ((__force snd_pcm_format_t) 20)
Christopher Ferris38062f92014-07-09 15:33:25 -0700155#define SNDRV_PCM_FORMAT_A_LAW ((__force snd_pcm_format_t) 21)
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800156#define SNDRV_PCM_FORMAT_IMA_ADPCM ((__force snd_pcm_format_t) 22)
Ben Cheng655a7c02013-10-16 16:09:24 -0700157#define SNDRV_PCM_FORMAT_MPEG ((__force snd_pcm_format_t) 23)
158#define SNDRV_PCM_FORMAT_GSM ((__force snd_pcm_format_t) 24)
Christopher Ferris76a1d452018-06-27 14:12:29 -0700159#define SNDRV_PCM_FORMAT_S20_LE ((__force snd_pcm_format_t) 25)
160#define SNDRV_PCM_FORMAT_S20_BE ((__force snd_pcm_format_t) 26)
161#define SNDRV_PCM_FORMAT_U20_LE ((__force snd_pcm_format_t) 27)
162#define SNDRV_PCM_FORMAT_U20_BE ((__force snd_pcm_format_t) 28)
Christopher Ferris38062f92014-07-09 15:33:25 -0700163#define SNDRV_PCM_FORMAT_SPECIAL ((__force snd_pcm_format_t) 31)
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800164#define SNDRV_PCM_FORMAT_S24_3LE ((__force snd_pcm_format_t) 32)
Ben Cheng655a7c02013-10-16 16:09:24 -0700165#define SNDRV_PCM_FORMAT_S24_3BE ((__force snd_pcm_format_t) 33)
166#define SNDRV_PCM_FORMAT_U24_3LE ((__force snd_pcm_format_t) 34)
Christopher Ferris38062f92014-07-09 15:33:25 -0700167#define SNDRV_PCM_FORMAT_U24_3BE ((__force snd_pcm_format_t) 35)
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800168#define SNDRV_PCM_FORMAT_S20_3LE ((__force snd_pcm_format_t) 36)
Ben Cheng655a7c02013-10-16 16:09:24 -0700169#define SNDRV_PCM_FORMAT_S20_3BE ((__force snd_pcm_format_t) 37)
170#define SNDRV_PCM_FORMAT_U20_3LE ((__force snd_pcm_format_t) 38)
Christopher Ferris38062f92014-07-09 15:33:25 -0700171#define SNDRV_PCM_FORMAT_U20_3BE ((__force snd_pcm_format_t) 39)
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800172#define SNDRV_PCM_FORMAT_S18_3LE ((__force snd_pcm_format_t) 40)
Ben Cheng655a7c02013-10-16 16:09:24 -0700173#define SNDRV_PCM_FORMAT_S18_3BE ((__force snd_pcm_format_t) 41)
174#define SNDRV_PCM_FORMAT_U18_3LE ((__force snd_pcm_format_t) 42)
Christopher Ferris38062f92014-07-09 15:33:25 -0700175#define SNDRV_PCM_FORMAT_U18_3BE ((__force snd_pcm_format_t) 43)
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800176#define SNDRV_PCM_FORMAT_G723_24 ((__force snd_pcm_format_t) 44)
Ben Cheng655a7c02013-10-16 16:09:24 -0700177#define SNDRV_PCM_FORMAT_G723_24_1B ((__force snd_pcm_format_t) 45)
178#define SNDRV_PCM_FORMAT_G723_40 ((__force snd_pcm_format_t) 46)
Christopher Ferris38062f92014-07-09 15:33:25 -0700179#define SNDRV_PCM_FORMAT_G723_40_1B ((__force snd_pcm_format_t) 47)
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800180#define SNDRV_PCM_FORMAT_DSD_U8 ((__force snd_pcm_format_t) 48)
Ben Cheng655a7c02013-10-16 16:09:24 -0700181#define SNDRV_PCM_FORMAT_DSD_U16_LE ((__force snd_pcm_format_t) 49)
Christopher Ferris82d75042015-01-26 10:57:07 -0800182#define SNDRV_PCM_FORMAT_DSD_U32_LE ((__force snd_pcm_format_t) 50)
183#define SNDRV_PCM_FORMAT_DSD_U16_BE ((__force snd_pcm_format_t) 51)
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800184#define SNDRV_PCM_FORMAT_DSD_U32_BE ((__force snd_pcm_format_t) 52)
Christopher Ferris82d75042015-01-26 10:57:07 -0800185#define SNDRV_PCM_FORMAT_LAST SNDRV_PCM_FORMAT_DSD_U32_BE
Christopher Ferris76a1d452018-06-27 14:12:29 -0700186#define SNDRV_PCM_FORMAT_FIRST SNDRV_PCM_FORMAT_S8
Christopher Ferris38062f92014-07-09 15:33:25 -0700187#ifdef SNDRV_LITTLE_ENDIAN
Ben Cheng655a7c02013-10-16 16:09:24 -0700188#define SNDRV_PCM_FORMAT_S16 SNDRV_PCM_FORMAT_S16_LE
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800189#define SNDRV_PCM_FORMAT_U16 SNDRV_PCM_FORMAT_U16_LE
Ben Cheng655a7c02013-10-16 16:09:24 -0700190#define SNDRV_PCM_FORMAT_S24 SNDRV_PCM_FORMAT_S24_LE
Christopher Ferris38062f92014-07-09 15:33:25 -0700191#define SNDRV_PCM_FORMAT_U24 SNDRV_PCM_FORMAT_U24_LE
Ben Cheng655a7c02013-10-16 16:09:24 -0700192#define SNDRV_PCM_FORMAT_S32 SNDRV_PCM_FORMAT_S32_LE
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800193#define SNDRV_PCM_FORMAT_U32 SNDRV_PCM_FORMAT_U32_LE
Ben Cheng655a7c02013-10-16 16:09:24 -0700194#define SNDRV_PCM_FORMAT_FLOAT SNDRV_PCM_FORMAT_FLOAT_LE
Christopher Ferris38062f92014-07-09 15:33:25 -0700195#define SNDRV_PCM_FORMAT_FLOAT64 SNDRV_PCM_FORMAT_FLOAT64_LE
Ben Cheng655a7c02013-10-16 16:09:24 -0700196#define SNDRV_PCM_FORMAT_IEC958_SUBFRAME SNDRV_PCM_FORMAT_IEC958_SUBFRAME_LE
Christopher Ferris76a1d452018-06-27 14:12:29 -0700197#define SNDRV_PCM_FORMAT_S20 SNDRV_PCM_FORMAT_S20_LE
198#define SNDRV_PCM_FORMAT_U20 SNDRV_PCM_FORMAT_U20_LE
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800199#endif
Ben Cheng655a7c02013-10-16 16:09:24 -0700200#ifdef SNDRV_BIG_ENDIAN
Christopher Ferris38062f92014-07-09 15:33:25 -0700201#define SNDRV_PCM_FORMAT_S16 SNDRV_PCM_FORMAT_S16_BE
Ben Cheng655a7c02013-10-16 16:09:24 -0700202#define SNDRV_PCM_FORMAT_U16 SNDRV_PCM_FORMAT_U16_BE
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800203#define SNDRV_PCM_FORMAT_S24 SNDRV_PCM_FORMAT_S24_BE
Ben Cheng655a7c02013-10-16 16:09:24 -0700204#define SNDRV_PCM_FORMAT_U24 SNDRV_PCM_FORMAT_U24_BE
Christopher Ferris38062f92014-07-09 15:33:25 -0700205#define SNDRV_PCM_FORMAT_S32 SNDRV_PCM_FORMAT_S32_BE
Ben Cheng655a7c02013-10-16 16:09:24 -0700206#define SNDRV_PCM_FORMAT_U32 SNDRV_PCM_FORMAT_U32_BE
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800207#define SNDRV_PCM_FORMAT_FLOAT SNDRV_PCM_FORMAT_FLOAT_BE
Ben Cheng655a7c02013-10-16 16:09:24 -0700208#define SNDRV_PCM_FORMAT_FLOAT64 SNDRV_PCM_FORMAT_FLOAT64_BE
Christopher Ferris38062f92014-07-09 15:33:25 -0700209#define SNDRV_PCM_FORMAT_IEC958_SUBFRAME SNDRV_PCM_FORMAT_IEC958_SUBFRAME_BE
Christopher Ferris76a1d452018-06-27 14:12:29 -0700210#define SNDRV_PCM_FORMAT_S20 SNDRV_PCM_FORMAT_S20_BE
211#define SNDRV_PCM_FORMAT_U20 SNDRV_PCM_FORMAT_U20_BE
Ben Cheng655a7c02013-10-16 16:09:24 -0700212#endif
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800213typedef int __bitwise snd_pcm_subformat_t;
Ben Cheng655a7c02013-10-16 16:09:24 -0700214#define SNDRV_PCM_SUBFORMAT_STD ((__force snd_pcm_subformat_t) 0)
Christopher Ferris38062f92014-07-09 15:33:25 -0700215#define SNDRV_PCM_SUBFORMAT_LAST SNDRV_PCM_SUBFORMAT_STD
Ben Cheng655a7c02013-10-16 16:09:24 -0700216#define SNDRV_PCM_INFO_MMAP 0x00000001
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800217#define SNDRV_PCM_INFO_MMAP_VALID 0x00000002
Ben Cheng655a7c02013-10-16 16:09:24 -0700218#define SNDRV_PCM_INFO_DOUBLE 0x00000004
Christopher Ferris38062f92014-07-09 15:33:25 -0700219#define SNDRV_PCM_INFO_BATCH 0x00000010
Christopher Ferris1308ad32017-11-14 17:32:13 -0800220#define SNDRV_PCM_INFO_SYNC_APPLPTR 0x00000020
Ben Cheng655a7c02013-10-16 16:09:24 -0700221#define SNDRV_PCM_INFO_INTERLEAVED 0x00000100
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800222#define SNDRV_PCM_INFO_NONINTERLEAVED 0x00000200
Ben Cheng655a7c02013-10-16 16:09:24 -0700223#define SNDRV_PCM_INFO_COMPLEX 0x00000400
Christopher Ferris38062f92014-07-09 15:33:25 -0700224#define SNDRV_PCM_INFO_BLOCK_TRANSFER 0x00010000
Ben Cheng655a7c02013-10-16 16:09:24 -0700225#define SNDRV_PCM_INFO_OVERRANGE 0x00020000
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800226#define SNDRV_PCM_INFO_RESUME 0x00040000
Ben Cheng655a7c02013-10-16 16:09:24 -0700227#define SNDRV_PCM_INFO_PAUSE 0x00080000
Christopher Ferris38062f92014-07-09 15:33:25 -0700228#define SNDRV_PCM_INFO_HALF_DUPLEX 0x00100000
Ben Cheng655a7c02013-10-16 16:09:24 -0700229#define SNDRV_PCM_INFO_JOINT_DUPLEX 0x00200000
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800230#define SNDRV_PCM_INFO_SYNC_START 0x00400000
Ben Cheng655a7c02013-10-16 16:09:24 -0700231#define SNDRV_PCM_INFO_NO_PERIOD_WAKEUP 0x00800000
Christopher Ferris38062f92014-07-09 15:33:25 -0700232#define SNDRV_PCM_INFO_HAS_WALL_CLOCK 0x01000000
Christopher Ferris05d08e92016-02-04 13:16:38 -0800233#define SNDRV_PCM_INFO_HAS_LINK_ATIME 0x01000000
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800234#define SNDRV_PCM_INFO_HAS_LINK_ABSOLUTE_ATIME 0x02000000
Christopher Ferris05d08e92016-02-04 13:16:38 -0800235#define SNDRV_PCM_INFO_HAS_LINK_ESTIMATED_ATIME 0x04000000
236#define SNDRV_PCM_INFO_HAS_LINK_SYNCHRONIZED_ATIME 0x08000000
Christopher Ferris2abfa9e2021-11-01 16:26:06 -0700237#define SNDRV_PCM_INFO_EXPLICIT_SYNC 0x10000000
Christopher Ferris05d08e92016-02-04 13:16:38 -0800238#define SNDRV_PCM_INFO_DRAIN_TRIGGER 0x40000000
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800239#define SNDRV_PCM_INFO_FIFO_IN_FRAMES 0x80000000
Christopher Ferrisbb9fcb42020-04-06 11:38:04 -0700240#if __BITS_PER_LONG == 32 && defined(__USE_TIME_BITS64)
241#define __SND_STRUCT_TIME64
242#endif
Christopher Ferris05d08e92016-02-04 13:16:38 -0800243typedef int __bitwise snd_pcm_state_t;
Ben Cheng655a7c02013-10-16 16:09:24 -0700244#define SNDRV_PCM_STATE_OPEN ((__force snd_pcm_state_t) 0)
Christopher Ferris38062f92014-07-09 15:33:25 -0700245#define SNDRV_PCM_STATE_SETUP ((__force snd_pcm_state_t) 1)
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800246#define SNDRV_PCM_STATE_PREPARED ((__force snd_pcm_state_t) 2)
Christopher Ferris05d08e92016-02-04 13:16:38 -0800247#define SNDRV_PCM_STATE_RUNNING ((__force snd_pcm_state_t) 3)
Ben Cheng655a7c02013-10-16 16:09:24 -0700248#define SNDRV_PCM_STATE_XRUN ((__force snd_pcm_state_t) 4)
Christopher Ferris38062f92014-07-09 15:33:25 -0700249#define SNDRV_PCM_STATE_DRAINING ((__force snd_pcm_state_t) 5)
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800250#define SNDRV_PCM_STATE_PAUSED ((__force snd_pcm_state_t) 6)
Christopher Ferris05d08e92016-02-04 13:16:38 -0800251#define SNDRV_PCM_STATE_SUSPENDED ((__force snd_pcm_state_t) 7)
Ben Cheng655a7c02013-10-16 16:09:24 -0700252#define SNDRV_PCM_STATE_DISCONNECTED ((__force snd_pcm_state_t) 8)
Christopher Ferris38062f92014-07-09 15:33:25 -0700253#define SNDRV_PCM_STATE_LAST SNDRV_PCM_STATE_DISCONNECTED
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800254enum {
Christopher Ferris05d08e92016-02-04 13:16:38 -0800255 SNDRV_PCM_MMAP_OFFSET_DATA = 0x00000000,
Christopher Ferrisbb9fcb42020-04-06 11:38:04 -0700256 SNDRV_PCM_MMAP_OFFSET_STATUS_OLD = 0x80000000,
257 SNDRV_PCM_MMAP_OFFSET_CONTROL_OLD = 0x81000000,
258 SNDRV_PCM_MMAP_OFFSET_STATUS_NEW = 0x82000000,
259 SNDRV_PCM_MMAP_OFFSET_CONTROL_NEW = 0x83000000,
260#ifdef __SND_STRUCT_TIME64
261 SNDRV_PCM_MMAP_OFFSET_STATUS = SNDRV_PCM_MMAP_OFFSET_STATUS_NEW,
262 SNDRV_PCM_MMAP_OFFSET_CONTROL = SNDRV_PCM_MMAP_OFFSET_CONTROL_NEW,
263#else
264 SNDRV_PCM_MMAP_OFFSET_STATUS = SNDRV_PCM_MMAP_OFFSET_STATUS_OLD,
265 SNDRV_PCM_MMAP_OFFSET_CONTROL = SNDRV_PCM_MMAP_OFFSET_CONTROL_OLD,
266#endif
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800267};
Christopher Ferris05d08e92016-02-04 13:16:38 -0800268union snd_pcm_sync_id {
Tao Baod7db5942015-01-28 10:07:51 -0800269 unsigned char id[16];
270 unsigned short id16[8];
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800271 unsigned int id32[4];
Christopher Ferris05d08e92016-02-04 13:16:38 -0800272};
Ben Cheng655a7c02013-10-16 16:09:24 -0700273struct snd_pcm_info {
Tao Baod7db5942015-01-28 10:07:51 -0800274 unsigned int device;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800275 unsigned int subdevice;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800276 int stream;
Tao Baod7db5942015-01-28 10:07:51 -0800277 int card;
278 unsigned char id[64];
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800279 unsigned char name[80];
Christopher Ferris05d08e92016-02-04 13:16:38 -0800280 unsigned char subname[32];
Tao Baod7db5942015-01-28 10:07:51 -0800281 int dev_class;
282 int dev_subclass;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800283 unsigned int subdevices_count;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800284 unsigned int subdevices_avail;
Tao Baod7db5942015-01-28 10:07:51 -0800285 union snd_pcm_sync_id sync;
286 unsigned char reserved[64];
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800287};
Christopher Ferris05d08e92016-02-04 13:16:38 -0800288typedef int snd_pcm_hw_param_t;
Ben Cheng655a7c02013-10-16 16:09:24 -0700289#define SNDRV_PCM_HW_PARAM_ACCESS 0
Christopher Ferris38062f92014-07-09 15:33:25 -0700290#define SNDRV_PCM_HW_PARAM_FORMAT 1
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800291#define SNDRV_PCM_HW_PARAM_SUBFORMAT 2
Christopher Ferris05d08e92016-02-04 13:16:38 -0800292#define SNDRV_PCM_HW_PARAM_FIRST_MASK SNDRV_PCM_HW_PARAM_ACCESS
Ben Cheng655a7c02013-10-16 16:09:24 -0700293#define SNDRV_PCM_HW_PARAM_LAST_MASK SNDRV_PCM_HW_PARAM_SUBFORMAT
Christopher Ferris38062f92014-07-09 15:33:25 -0700294#define SNDRV_PCM_HW_PARAM_SAMPLE_BITS 8
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800295#define SNDRV_PCM_HW_PARAM_FRAME_BITS 9
Christopher Ferris05d08e92016-02-04 13:16:38 -0800296#define SNDRV_PCM_HW_PARAM_CHANNELS 10
Ben Cheng655a7c02013-10-16 16:09:24 -0700297#define SNDRV_PCM_HW_PARAM_RATE 11
Christopher Ferris38062f92014-07-09 15:33:25 -0700298#define SNDRV_PCM_HW_PARAM_PERIOD_TIME 12
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800299#define SNDRV_PCM_HW_PARAM_PERIOD_SIZE 13
Christopher Ferris05d08e92016-02-04 13:16:38 -0800300#define SNDRV_PCM_HW_PARAM_PERIOD_BYTES 14
Ben Cheng655a7c02013-10-16 16:09:24 -0700301#define SNDRV_PCM_HW_PARAM_PERIODS 15
Christopher Ferris38062f92014-07-09 15:33:25 -0700302#define SNDRV_PCM_HW_PARAM_BUFFER_TIME 16
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800303#define SNDRV_PCM_HW_PARAM_BUFFER_SIZE 17
Christopher Ferris05d08e92016-02-04 13:16:38 -0800304#define SNDRV_PCM_HW_PARAM_BUFFER_BYTES 18
Ben Cheng655a7c02013-10-16 16:09:24 -0700305#define SNDRV_PCM_HW_PARAM_TICK_TIME 19
Christopher Ferris38062f92014-07-09 15:33:25 -0700306#define SNDRV_PCM_HW_PARAM_FIRST_INTERVAL SNDRV_PCM_HW_PARAM_SAMPLE_BITS
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800307#define SNDRV_PCM_HW_PARAM_LAST_INTERVAL SNDRV_PCM_HW_PARAM_TICK_TIME
Christopher Ferris05d08e92016-02-04 13:16:38 -0800308#define SNDRV_PCM_HW_PARAMS_NORESAMPLE (1 << 0)
Tao Baod7db5942015-01-28 10:07:51 -0800309#define SNDRV_PCM_HW_PARAMS_EXPORT_BUFFER (1 << 1)
310#define SNDRV_PCM_HW_PARAMS_NO_PERIOD_WAKEUP (1 << 2)
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800311struct snd_interval {
Christopher Ferris05d08e92016-02-04 13:16:38 -0800312 unsigned int min, max;
Tao Baod7db5942015-01-28 10:07:51 -0800313 unsigned int openmin : 1, openmax : 1, integer : 1, empty : 1;
Ben Cheng655a7c02013-10-16 16:09:24 -0700314};
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800315#define SNDRV_MASK_MAX 256
Christopher Ferris05d08e92016-02-04 13:16:38 -0800316struct snd_mask {
Tao Baod7db5942015-01-28 10:07:51 -0800317 __u32 bits[(SNDRV_MASK_MAX + 31) / 32];
Ben Cheng655a7c02013-10-16 16:09:24 -0700318};
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800319struct snd_pcm_hw_params {
Christopher Ferris05d08e92016-02-04 13:16:38 -0800320 unsigned int flags;
Tao Baod7db5942015-01-28 10:07:51 -0800321 struct snd_mask masks[SNDRV_PCM_HW_PARAM_LAST_MASK - SNDRV_PCM_HW_PARAM_FIRST_MASK + 1];
322 struct snd_mask mres[5];
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800323 struct snd_interval intervals[SNDRV_PCM_HW_PARAM_LAST_INTERVAL - SNDRV_PCM_HW_PARAM_FIRST_INTERVAL + 1];
Christopher Ferris05d08e92016-02-04 13:16:38 -0800324 struct snd_interval ires[9];
Tao Baod7db5942015-01-28 10:07:51 -0800325 unsigned int rmask;
326 unsigned int cmask;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800327 unsigned int info;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800328 unsigned int msbits;
Tao Baod7db5942015-01-28 10:07:51 -0800329 unsigned int rate_num;
330 unsigned int rate_den;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800331 snd_pcm_uframes_t fifo_size;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800332 unsigned char reserved[64];
Christopher Ferris38062f92014-07-09 15:33:25 -0700333};
Ben Cheng655a7c02013-10-16 16:09:24 -0700334enum {
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800335 SNDRV_PCM_TSTAMP_NONE = 0,
Christopher Ferris05d08e92016-02-04 13:16:38 -0800336 SNDRV_PCM_TSTAMP_ENABLE,
Tao Baod7db5942015-01-28 10:07:51 -0800337 SNDRV_PCM_TSTAMP_LAST = SNDRV_PCM_TSTAMP_ENABLE,
Ben Cheng655a7c02013-10-16 16:09:24 -0700338};
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800339struct snd_pcm_sw_params {
Christopher Ferris05d08e92016-02-04 13:16:38 -0800340 int tstamp_mode;
Tao Baod7db5942015-01-28 10:07:51 -0800341 unsigned int period_step;
342 unsigned int sleep_min;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800343 snd_pcm_uframes_t avail_min;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800344 snd_pcm_uframes_t xfer_align;
Tao Baod7db5942015-01-28 10:07:51 -0800345 snd_pcm_uframes_t start_threshold;
346 snd_pcm_uframes_t stop_threshold;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800347 snd_pcm_uframes_t silence_threshold;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800348 snd_pcm_uframes_t silence_size;
Tao Baod7db5942015-01-28 10:07:51 -0800349 snd_pcm_uframes_t boundary;
350 unsigned int proto;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800351 unsigned int tstamp_type;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800352 unsigned char reserved[56];
Ben Cheng655a7c02013-10-16 16:09:24 -0700353};
354struct snd_pcm_channel_info {
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800355 unsigned int channel;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800356 __kernel_off_t offset;
Tao Baod7db5942015-01-28 10:07:51 -0800357 unsigned int first;
358 unsigned int step;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800359};
Christopher Ferris05d08e92016-02-04 13:16:38 -0800360enum {
361 SNDRV_PCM_AUDIO_TSTAMP_TYPE_COMPAT = 0,
362 SNDRV_PCM_AUDIO_TSTAMP_TYPE_DEFAULT = 1,
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800363 SNDRV_PCM_AUDIO_TSTAMP_TYPE_LINK = 2,
Christopher Ferris05d08e92016-02-04 13:16:38 -0800364 SNDRV_PCM_AUDIO_TSTAMP_TYPE_LINK_ABSOLUTE = 3,
365 SNDRV_PCM_AUDIO_TSTAMP_TYPE_LINK_ESTIMATED = 4,
366 SNDRV_PCM_AUDIO_TSTAMP_TYPE_LINK_SYNCHRONIZED = 5,
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800367 SNDRV_PCM_AUDIO_TSTAMP_TYPE_LAST = SNDRV_PCM_AUDIO_TSTAMP_TYPE_LINK_SYNCHRONIZED
Christopher Ferris05d08e92016-02-04 13:16:38 -0800368};
Christopher Ferrisbb9fcb42020-04-06 11:38:04 -0700369typedef struct {
370 unsigned char pad[sizeof(time_t) - sizeof(int)];
371} __time_pad;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800372struct snd_pcm_status {
Tao Baod7db5942015-01-28 10:07:51 -0800373 snd_pcm_state_t state;
Christopher Ferrisbb9fcb42020-04-06 11:38:04 -0700374 __time_pad pad1;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800375 struct timespec trigger_tstamp;
Tao Baod7db5942015-01-28 10:07:51 -0800376 struct timespec tstamp;
377 snd_pcm_uframes_t appl_ptr;
Tao Baod7db5942015-01-28 10:07:51 -0800378 snd_pcm_uframes_t hw_ptr;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800379 snd_pcm_sframes_t delay;
Tao Baod7db5942015-01-28 10:07:51 -0800380 snd_pcm_uframes_t avail;
381 snd_pcm_uframes_t avail_max;
Tao Baod7db5942015-01-28 10:07:51 -0800382 snd_pcm_uframes_t overrange;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800383 snd_pcm_state_t suspended_state;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800384 __u32 audio_tstamp_data;
385 struct timespec audio_tstamp;
386 struct timespec driver_tstamp;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800387 __u32 audio_tstamp_accuracy;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800388 unsigned char reserved[52 - 2 * sizeof(struct timespec)];
Ben Cheng655a7c02013-10-16 16:09:24 -0700389};
Christopher Ferrisbb9fcb42020-04-06 11:38:04 -0700390#ifdef __SND_STRUCT_TIME64
391#define __snd_pcm_mmap_status64 snd_pcm_mmap_status
392#define __snd_pcm_mmap_control64 snd_pcm_mmap_control
393#define __snd_pcm_sync_ptr64 snd_pcm_sync_ptr
394#define __snd_timespec64 timespec
395struct __snd_timespec {
396 __s32 tv_sec;
397 __s32 tv_nsec;
398};
399#else
400#define __snd_pcm_mmap_status snd_pcm_mmap_status
401#define __snd_pcm_mmap_control snd_pcm_mmap_control
402#define __snd_pcm_sync_ptr snd_pcm_sync_ptr
403#define __snd_timespec timespec
404struct __snd_timespec64 {
405 __s64 tv_sec;
406 __s64 tv_nsec;
407};
408#endif
409struct __snd_pcm_mmap_status {
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800410 snd_pcm_state_t state;
Tao Baod7db5942015-01-28 10:07:51 -0800411 int pad1;
412 snd_pcm_uframes_t hw_ptr;
Christopher Ferrisbb9fcb42020-04-06 11:38:04 -0700413 struct __snd_timespec tstamp;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800414 snd_pcm_state_t suspended_state;
Christopher Ferrisbb9fcb42020-04-06 11:38:04 -0700415 struct __snd_timespec audio_tstamp;
Ben Cheng655a7c02013-10-16 16:09:24 -0700416};
Christopher Ferrisbb9fcb42020-04-06 11:38:04 -0700417struct __snd_pcm_mmap_control {
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800418 snd_pcm_uframes_t appl_ptr;
Tao Baod7db5942015-01-28 10:07:51 -0800419 snd_pcm_uframes_t avail_min;
Ben Cheng655a7c02013-10-16 16:09:24 -0700420};
Tao Baod7db5942015-01-28 10:07:51 -0800421#define SNDRV_PCM_SYNC_PTR_HWSYNC (1 << 0)
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800422#define SNDRV_PCM_SYNC_PTR_APPL (1 << 1)
Tao Baod7db5942015-01-28 10:07:51 -0800423#define SNDRV_PCM_SYNC_PTR_AVAIL_MIN (1 << 2)
Christopher Ferrisbb9fcb42020-04-06 11:38:04 -0700424struct __snd_pcm_sync_ptr {
Tao Baod7db5942015-01-28 10:07:51 -0800425 unsigned int flags;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800426 union {
Christopher Ferrisbb9fcb42020-04-06 11:38:04 -0700427 struct __snd_pcm_mmap_status status;
Tao Baod7db5942015-01-28 10:07:51 -0800428 unsigned char reserved[64];
429 } s;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800430 union {
Christopher Ferrisbb9fcb42020-04-06 11:38:04 -0700431 struct __snd_pcm_mmap_control control;
432 unsigned char reserved[64];
433 } c;
434};
435#if defined(__BYTE_ORDER) ? __BYTE_ORDER == __BIG_ENDIAN : defined(__BIG_ENDIAN)
436typedef char __pad_before_uframe[sizeof(__u64) - sizeof(snd_pcm_uframes_t)];
437typedef char __pad_after_uframe[0];
438#endif
439#if defined(__BYTE_ORDER) ? __BYTE_ORDER == __LITTLE_ENDIAN : defined(__LITTLE_ENDIAN)
440typedef char __pad_before_uframe[0];
441typedef char __pad_after_uframe[sizeof(__u64) - sizeof(snd_pcm_uframes_t)];
442#endif
443struct __snd_pcm_mmap_status64 {
444 snd_pcm_state_t state;
445 __u32 pad1;
446 __pad_before_uframe __pad1;
447 snd_pcm_uframes_t hw_ptr;
448 __pad_after_uframe __pad2;
449 struct __snd_timespec64 tstamp;
450 snd_pcm_state_t suspended_state;
451 __u32 pad3;
452 struct __snd_timespec64 audio_tstamp;
453};
454struct __snd_pcm_mmap_control64 {
455 __pad_before_uframe __pad1;
456 snd_pcm_uframes_t appl_ptr;
457 __pad_before_uframe __pad2;
458 __pad_before_uframe __pad3;
459 snd_pcm_uframes_t avail_min;
460 __pad_after_uframe __pad4;
461};
462struct __snd_pcm_sync_ptr64 {
463 __u32 flags;
464 __u32 pad1;
465 union {
466 struct __snd_pcm_mmap_status64 status;
467 unsigned char reserved[64];
468 } s;
469 union {
470 struct __snd_pcm_mmap_control64 control;
Tao Baod7db5942015-01-28 10:07:51 -0800471 unsigned char reserved[64];
472 } c;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800473};
Tao Baod7db5942015-01-28 10:07:51 -0800474struct snd_xferi {
475 snd_pcm_sframes_t result;
476 void __user * buf;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800477 snd_pcm_uframes_t frames;
Ben Cheng655a7c02013-10-16 16:09:24 -0700478};
479struct snd_xfern {
Tao Baod7db5942015-01-28 10:07:51 -0800480 snd_pcm_sframes_t result;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800481 void __user * __user * bufs;
Tao Baod7db5942015-01-28 10:07:51 -0800482 snd_pcm_uframes_t frames;
Ben Cheng655a7c02013-10-16 16:09:24 -0700483};
Christopher Ferris38062f92014-07-09 15:33:25 -0700484enum {
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800485 SNDRV_PCM_TSTAMP_TYPE_GETTIMEOFDAY = 0,
Tao Baod7db5942015-01-28 10:07:51 -0800486 SNDRV_PCM_TSTAMP_TYPE_MONOTONIC,
487 SNDRV_PCM_TSTAMP_TYPE_MONOTONIC_RAW,
488 SNDRV_PCM_TSTAMP_TYPE_LAST = SNDRV_PCM_TSTAMP_TYPE_MONOTONIC_RAW,
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800489};
Ben Cheng655a7c02013-10-16 16:09:24 -0700490enum {
Tao Baod7db5942015-01-28 10:07:51 -0800491 SNDRV_CHMAP_UNKNOWN = 0,
492 SNDRV_CHMAP_NA,
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800493 SNDRV_CHMAP_MONO,
Tao Baod7db5942015-01-28 10:07:51 -0800494 SNDRV_CHMAP_FL,
495 SNDRV_CHMAP_FR,
496 SNDRV_CHMAP_RL,
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800497 SNDRV_CHMAP_RR,
Tao Baod7db5942015-01-28 10:07:51 -0800498 SNDRV_CHMAP_FC,
499 SNDRV_CHMAP_LFE,
500 SNDRV_CHMAP_SL,
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800501 SNDRV_CHMAP_SR,
Tao Baod7db5942015-01-28 10:07:51 -0800502 SNDRV_CHMAP_RC,
503 SNDRV_CHMAP_FLC,
504 SNDRV_CHMAP_FRC,
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800505 SNDRV_CHMAP_RLC,
Tao Baod7db5942015-01-28 10:07:51 -0800506 SNDRV_CHMAP_RRC,
507 SNDRV_CHMAP_FLW,
508 SNDRV_CHMAP_FRW,
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800509 SNDRV_CHMAP_FLH,
Tao Baod7db5942015-01-28 10:07:51 -0800510 SNDRV_CHMAP_FCH,
511 SNDRV_CHMAP_FRH,
512 SNDRV_CHMAP_TC,
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800513 SNDRV_CHMAP_TFL,
Tao Baod7db5942015-01-28 10:07:51 -0800514 SNDRV_CHMAP_TFR,
515 SNDRV_CHMAP_TFC,
516 SNDRV_CHMAP_TRL,
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800517 SNDRV_CHMAP_TRR,
Tao Baod7db5942015-01-28 10:07:51 -0800518 SNDRV_CHMAP_TRC,
519 SNDRV_CHMAP_TFLC,
520 SNDRV_CHMAP_TFRC,
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800521 SNDRV_CHMAP_TSL,
Tao Baod7db5942015-01-28 10:07:51 -0800522 SNDRV_CHMAP_TSR,
523 SNDRV_CHMAP_LLFE,
524 SNDRV_CHMAP_RLFE,
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800525 SNDRV_CHMAP_BC,
Tao Baod7db5942015-01-28 10:07:51 -0800526 SNDRV_CHMAP_BLC,
527 SNDRV_CHMAP_BRC,
528 SNDRV_CHMAP_LAST = SNDRV_CHMAP_BRC,
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800529};
Ben Cheng655a7c02013-10-16 16:09:24 -0700530#define SNDRV_CHMAP_POSITION_MASK 0xffff
531#define SNDRV_CHMAP_PHASE_INVERSE (0x01 << 16)
532#define SNDRV_CHMAP_DRIVER_SPEC (0x02 << 16)
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800533#define SNDRV_PCM_IOCTL_PVERSION _IOR('A', 0x00, int)
Ben Cheng655a7c02013-10-16 16:09:24 -0700534#define SNDRV_PCM_IOCTL_INFO _IOR('A', 0x01, struct snd_pcm_info)
535#define SNDRV_PCM_IOCTL_TSTAMP _IOW('A', 0x02, int)
536#define SNDRV_PCM_IOCTL_TTSTAMP _IOW('A', 0x03, int)
Christopher Ferris1308ad32017-11-14 17:32:13 -0800537#define SNDRV_PCM_IOCTL_USER_PVERSION _IOW('A', 0x04, int)
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800538#define SNDRV_PCM_IOCTL_HW_REFINE _IOWR('A', 0x10, struct snd_pcm_hw_params)
Ben Cheng655a7c02013-10-16 16:09:24 -0700539#define SNDRV_PCM_IOCTL_HW_PARAMS _IOWR('A', 0x11, struct snd_pcm_hw_params)
540#define SNDRV_PCM_IOCTL_HW_FREE _IO('A', 0x12)
541#define SNDRV_PCM_IOCTL_SW_PARAMS _IOWR('A', 0x13, struct snd_pcm_sw_params)
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800542#define SNDRV_PCM_IOCTL_STATUS _IOR('A', 0x20, struct snd_pcm_status)
Ben Cheng655a7c02013-10-16 16:09:24 -0700543#define SNDRV_PCM_IOCTL_DELAY _IOR('A', 0x21, snd_pcm_sframes_t)
544#define SNDRV_PCM_IOCTL_HWSYNC _IO('A', 0x22)
Christopher Ferrisbb9fcb42020-04-06 11:38:04 -0700545#define __SNDRV_PCM_IOCTL_SYNC_PTR _IOWR('A', 0x23, struct __snd_pcm_sync_ptr)
546#define __SNDRV_PCM_IOCTL_SYNC_PTR64 _IOWR('A', 0x23, struct __snd_pcm_sync_ptr64)
Ben Cheng655a7c02013-10-16 16:09:24 -0700547#define SNDRV_PCM_IOCTL_SYNC_PTR _IOWR('A', 0x23, struct snd_pcm_sync_ptr)
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800548#define SNDRV_PCM_IOCTL_STATUS_EXT _IOWR('A', 0x24, struct snd_pcm_status)
Christopher Ferris05d08e92016-02-04 13:16:38 -0800549#define SNDRV_PCM_IOCTL_CHANNEL_INFO _IOR('A', 0x32, struct snd_pcm_channel_info)
Ben Cheng655a7c02013-10-16 16:09:24 -0700550#define SNDRV_PCM_IOCTL_PREPARE _IO('A', 0x40)
551#define SNDRV_PCM_IOCTL_RESET _IO('A', 0x41)
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800552#define SNDRV_PCM_IOCTL_START _IO('A', 0x42)
Christopher Ferris05d08e92016-02-04 13:16:38 -0800553#define SNDRV_PCM_IOCTL_DROP _IO('A', 0x43)
Ben Cheng655a7c02013-10-16 16:09:24 -0700554#define SNDRV_PCM_IOCTL_DRAIN _IO('A', 0x44)
555#define SNDRV_PCM_IOCTL_PAUSE _IOW('A', 0x45, int)
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800556#define SNDRV_PCM_IOCTL_REWIND _IOW('A', 0x46, snd_pcm_uframes_t)
Christopher Ferris05d08e92016-02-04 13:16:38 -0800557#define SNDRV_PCM_IOCTL_RESUME _IO('A', 0x47)
Ben Cheng655a7c02013-10-16 16:09:24 -0700558#define SNDRV_PCM_IOCTL_XRUN _IO('A', 0x48)
559#define SNDRV_PCM_IOCTL_FORWARD _IOW('A', 0x49, snd_pcm_uframes_t)
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800560#define SNDRV_PCM_IOCTL_WRITEI_FRAMES _IOW('A', 0x50, struct snd_xferi)
Christopher Ferris05d08e92016-02-04 13:16:38 -0800561#define SNDRV_PCM_IOCTL_READI_FRAMES _IOR('A', 0x51, struct snd_xferi)
Ben Cheng655a7c02013-10-16 16:09:24 -0700562#define SNDRV_PCM_IOCTL_WRITEN_FRAMES _IOW('A', 0x52, struct snd_xfern)
563#define SNDRV_PCM_IOCTL_READN_FRAMES _IOR('A', 0x53, struct snd_xfern)
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800564#define SNDRV_PCM_IOCTL_LINK _IOW('A', 0x60, int)
Christopher Ferris05d08e92016-02-04 13:16:38 -0800565#define SNDRV_PCM_IOCTL_UNLINK _IO('A', 0x61)
Christopher Ferris3a39c0b2021-09-02 00:03:38 +0000566#define SNDRV_RAWMIDI_VERSION SNDRV_PROTOCOL_VERSION(2, 0, 2)
Ben Cheng655a7c02013-10-16 16:09:24 -0700567enum {
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800568 SNDRV_RAWMIDI_STREAM_OUTPUT = 0,
Christopher Ferris05d08e92016-02-04 13:16:38 -0800569 SNDRV_RAWMIDI_STREAM_INPUT,
Tao Baod7db5942015-01-28 10:07:51 -0800570 SNDRV_RAWMIDI_STREAM_LAST = SNDRV_RAWMIDI_STREAM_INPUT,
Ben Cheng655a7c02013-10-16 16:09:24 -0700571};
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800572#define SNDRV_RAWMIDI_INFO_OUTPUT 0x00000001
Christopher Ferris05d08e92016-02-04 13:16:38 -0800573#define SNDRV_RAWMIDI_INFO_INPUT 0x00000002
Ben Cheng655a7c02013-10-16 16:09:24 -0700574#define SNDRV_RAWMIDI_INFO_DUPLEX 0x00000004
575struct snd_rawmidi_info {
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800576 unsigned int device;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800577 unsigned int subdevice;
Tao Baod7db5942015-01-28 10:07:51 -0800578 int stream;
579 int card;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800580 unsigned int flags;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800581 unsigned char id[64];
Tao Baod7db5942015-01-28 10:07:51 -0800582 unsigned char name[80];
583 unsigned char subname[32];
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800584 unsigned int subdevices_count;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800585 unsigned int subdevices_avail;
Tao Baod7db5942015-01-28 10:07:51 -0800586 unsigned char reserved[64];
Ben Cheng655a7c02013-10-16 16:09:24 -0700587};
Christopher Ferris3a39c0b2021-09-02 00:03:38 +0000588#define SNDRV_RAWMIDI_MODE_FRAMING_MASK (7 << 0)
589#define SNDRV_RAWMIDI_MODE_FRAMING_SHIFT 0
590#define SNDRV_RAWMIDI_MODE_FRAMING_NONE (0 << 0)
591#define SNDRV_RAWMIDI_MODE_FRAMING_TSTAMP (1 << 0)
592#define SNDRV_RAWMIDI_MODE_CLOCK_MASK (7 << 3)
593#define SNDRV_RAWMIDI_MODE_CLOCK_SHIFT 3
594#define SNDRV_RAWMIDI_MODE_CLOCK_NONE (0 << 3)
595#define SNDRV_RAWMIDI_MODE_CLOCK_REALTIME (1 << 3)
596#define SNDRV_RAWMIDI_MODE_CLOCK_MONOTONIC (2 << 3)
597#define SNDRV_RAWMIDI_MODE_CLOCK_MONOTONIC_RAW (3 << 3)
598#define SNDRV_RAWMIDI_FRAMING_DATA_LENGTH 16
599struct snd_rawmidi_framing_tstamp {
600 __u8 frame_type;
601 __u8 length;
602 __u8 reserved[2];
603 __u32 tv_nsec;
604 __u64 tv_sec;
605 __u8 data[SNDRV_RAWMIDI_FRAMING_DATA_LENGTH];
606} __packed;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800607struct snd_rawmidi_params {
Christopher Ferris05d08e92016-02-04 13:16:38 -0800608 int stream;
Tao Baod7db5942015-01-28 10:07:51 -0800609 size_t buffer_size;
610 size_t avail_min;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800611 unsigned int no_active_sensing : 1;
Christopher Ferris3a39c0b2021-09-02 00:03:38 +0000612 unsigned int mode;
613 unsigned char reserved[12];
Ben Cheng655a7c02013-10-16 16:09:24 -0700614};
615struct snd_rawmidi_status {
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800616 int stream;
Christopher Ferrisbb9fcb42020-04-06 11:38:04 -0700617 __time_pad pad1;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800618 struct timespec tstamp;
Tao Baod7db5942015-01-28 10:07:51 -0800619 size_t avail;
620 size_t xruns;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800621 unsigned char reserved[16];
Christopher Ferris05d08e92016-02-04 13:16:38 -0800622};
Ben Cheng655a7c02013-10-16 16:09:24 -0700623#define SNDRV_RAWMIDI_IOCTL_PVERSION _IOR('W', 0x00, int)
624#define SNDRV_RAWMIDI_IOCTL_INFO _IOR('W', 0x01, struct snd_rawmidi_info)
Christopher Ferris2abfa9e2021-11-01 16:26:06 -0700625#define SNDRV_RAWMIDI_IOCTL_USER_PVERSION _IOW('W', 0x02, int)
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800626#define SNDRV_RAWMIDI_IOCTL_PARAMS _IOWR('W', 0x10, struct snd_rawmidi_params)
Christopher Ferris05d08e92016-02-04 13:16:38 -0800627#define SNDRV_RAWMIDI_IOCTL_STATUS _IOWR('W', 0x20, struct snd_rawmidi_status)
Ben Cheng655a7c02013-10-16 16:09:24 -0700628#define SNDRV_RAWMIDI_IOCTL_DROP _IOW('W', 0x30, int)
629#define SNDRV_RAWMIDI_IOCTL_DRAIN _IOW('W', 0x31, int)
Christopher Ferrisbb9fcb42020-04-06 11:38:04 -0700630#define SNDRV_TIMER_VERSION SNDRV_PROTOCOL_VERSION(2, 0, 7)
Christopher Ferris05d08e92016-02-04 13:16:38 -0800631enum {
Tao Baod7db5942015-01-28 10:07:51 -0800632 SNDRV_TIMER_CLASS_NONE = - 1,
633 SNDRV_TIMER_CLASS_SLAVE = 0,
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800634 SNDRV_TIMER_CLASS_GLOBAL,
Christopher Ferris05d08e92016-02-04 13:16:38 -0800635 SNDRV_TIMER_CLASS_CARD,
Tao Baod7db5942015-01-28 10:07:51 -0800636 SNDRV_TIMER_CLASS_PCM,
637 SNDRV_TIMER_CLASS_LAST = SNDRV_TIMER_CLASS_PCM,
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800638};
Christopher Ferris05d08e92016-02-04 13:16:38 -0800639enum {
Tao Baod7db5942015-01-28 10:07:51 -0800640 SNDRV_TIMER_SCLASS_NONE = 0,
641 SNDRV_TIMER_SCLASS_APPLICATION,
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800642 SNDRV_TIMER_SCLASS_SEQUENCER,
Christopher Ferris05d08e92016-02-04 13:16:38 -0800643 SNDRV_TIMER_SCLASS_OSS_SEQUENCER,
Tao Baod7db5942015-01-28 10:07:51 -0800644 SNDRV_TIMER_SCLASS_LAST = SNDRV_TIMER_SCLASS_OSS_SEQUENCER,
Ben Cheng655a7c02013-10-16 16:09:24 -0700645};
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800646#define SNDRV_TIMER_GLOBAL_SYSTEM 0
Christopher Ferris05d08e92016-02-04 13:16:38 -0800647#define SNDRV_TIMER_GLOBAL_RTC 1
Ben Cheng655a7c02013-10-16 16:09:24 -0700648#define SNDRV_TIMER_GLOBAL_HPET 2
649#define SNDRV_TIMER_GLOBAL_HRTIMER 3
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800650#define SNDRV_TIMER_FLG_SLAVE (1 << 0)
Christopher Ferris05d08e92016-02-04 13:16:38 -0800651struct snd_timer_id {
Tao Baod7db5942015-01-28 10:07:51 -0800652 int dev_class;
653 int dev_sclass;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800654 int card;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800655 int device;
Tao Baod7db5942015-01-28 10:07:51 -0800656 int subdevice;
Ben Cheng655a7c02013-10-16 16:09:24 -0700657};
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800658struct snd_timer_ginfo {
Christopher Ferris05d08e92016-02-04 13:16:38 -0800659 struct snd_timer_id tid;
Tao Baod7db5942015-01-28 10:07:51 -0800660 unsigned int flags;
661 int card;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800662 unsigned char id[64];
Christopher Ferris05d08e92016-02-04 13:16:38 -0800663 unsigned char name[80];
Tao Baod7db5942015-01-28 10:07:51 -0800664 unsigned long reserved0;
665 unsigned long resolution;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800666 unsigned long resolution_min;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800667 unsigned long resolution_max;
Tao Baod7db5942015-01-28 10:07:51 -0800668 unsigned int clients;
669 unsigned char reserved[32];
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800670};
Christopher Ferris05d08e92016-02-04 13:16:38 -0800671struct snd_timer_gparams {
Tao Baod7db5942015-01-28 10:07:51 -0800672 struct snd_timer_id tid;
673 unsigned long period_num;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800674 unsigned long period_den;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800675 unsigned char reserved[32];
Ben Cheng655a7c02013-10-16 16:09:24 -0700676};
677struct snd_timer_gstatus {
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800678 struct snd_timer_id tid;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800679 unsigned long resolution;
Tao Baod7db5942015-01-28 10:07:51 -0800680 unsigned long resolution_num;
681 unsigned long resolution_den;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800682 unsigned char reserved[32];
Christopher Ferris05d08e92016-02-04 13:16:38 -0800683};
Ben Cheng655a7c02013-10-16 16:09:24 -0700684struct snd_timer_select {
Tao Baod7db5942015-01-28 10:07:51 -0800685 struct snd_timer_id id;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800686 unsigned char reserved[32];
Christopher Ferris05d08e92016-02-04 13:16:38 -0800687};
Ben Cheng655a7c02013-10-16 16:09:24 -0700688struct snd_timer_info {
Tao Baod7db5942015-01-28 10:07:51 -0800689 unsigned int flags;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800690 int card;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800691 unsigned char id[64];
Tao Baod7db5942015-01-28 10:07:51 -0800692 unsigned char name[80];
693 unsigned long reserved0;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800694 unsigned long resolution;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800695 unsigned char reserved[64];
Ben Cheng655a7c02013-10-16 16:09:24 -0700696};
Tao Baod7db5942015-01-28 10:07:51 -0800697#define SNDRV_TIMER_PSFLG_AUTO (1 << 0)
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800698#define SNDRV_TIMER_PSFLG_EXCLUSIVE (1 << 1)
Christopher Ferris05d08e92016-02-04 13:16:38 -0800699#define SNDRV_TIMER_PSFLG_EARLY_EVENT (1 << 2)
Ben Cheng655a7c02013-10-16 16:09:24 -0700700struct snd_timer_params {
Tao Baod7db5942015-01-28 10:07:51 -0800701 unsigned int flags;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800702 unsigned int ticks;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800703 unsigned int queue_size;
Tao Baod7db5942015-01-28 10:07:51 -0800704 unsigned int reserved0;
705 unsigned int filter;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800706 unsigned char reserved[60];
Christopher Ferris05d08e92016-02-04 13:16:38 -0800707};
Ben Cheng655a7c02013-10-16 16:09:24 -0700708struct snd_timer_status {
Tao Baod7db5942015-01-28 10:07:51 -0800709 struct timespec tstamp;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800710 unsigned int resolution;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800711 unsigned int lost;
Tao Baod7db5942015-01-28 10:07:51 -0800712 unsigned int overrun;
713 unsigned int queue;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800714 unsigned char reserved[64];
Christopher Ferris05d08e92016-02-04 13:16:38 -0800715};
Ben Cheng655a7c02013-10-16 16:09:24 -0700716#define SNDRV_TIMER_IOCTL_PVERSION _IOR('T', 0x00, int)
717#define SNDRV_TIMER_IOCTL_NEXT_DEVICE _IOWR('T', 0x01, struct snd_timer_id)
Christopher Ferrisbb9fcb42020-04-06 11:38:04 -0700718#define SNDRV_TIMER_IOCTL_TREAD_OLD _IOW('T', 0x02, int)
Christopher Ferris05d08e92016-02-04 13:16:38 -0800719#define SNDRV_TIMER_IOCTL_GINFO _IOWR('T', 0x03, struct snd_timer_ginfo)
Ben Cheng655a7c02013-10-16 16:09:24 -0700720#define SNDRV_TIMER_IOCTL_GPARAMS _IOW('T', 0x04, struct snd_timer_gparams)
721#define SNDRV_TIMER_IOCTL_GSTATUS _IOWR('T', 0x05, struct snd_timer_gstatus)
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800722#define SNDRV_TIMER_IOCTL_SELECT _IOW('T', 0x10, struct snd_timer_select)
Christopher Ferris05d08e92016-02-04 13:16:38 -0800723#define SNDRV_TIMER_IOCTL_INFO _IOR('T', 0x11, struct snd_timer_info)
Ben Cheng655a7c02013-10-16 16:09:24 -0700724#define SNDRV_TIMER_IOCTL_PARAMS _IOW('T', 0x12, struct snd_timer_params)
725#define SNDRV_TIMER_IOCTL_STATUS _IOR('T', 0x14, struct snd_timer_status)
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800726#define SNDRV_TIMER_IOCTL_START _IO('T', 0xa0)
Christopher Ferris05d08e92016-02-04 13:16:38 -0800727#define SNDRV_TIMER_IOCTL_STOP _IO('T', 0xa1)
Ben Cheng655a7c02013-10-16 16:09:24 -0700728#define SNDRV_TIMER_IOCTL_CONTINUE _IO('T', 0xa2)
729#define SNDRV_TIMER_IOCTL_PAUSE _IO('T', 0xa3)
Christopher Ferrisbb9fcb42020-04-06 11:38:04 -0700730#define SNDRV_TIMER_IOCTL_TREAD64 _IOW('T', 0xa4, int)
731#if __BITS_PER_LONG == 64
732#define SNDRV_TIMER_IOCTL_TREAD SNDRV_TIMER_IOCTL_TREAD_OLD
733#else
734#define SNDRV_TIMER_IOCTL_TREAD ((sizeof(__kernel_long_t) >= sizeof(time_t)) ? SNDRV_TIMER_IOCTL_TREAD_OLD : SNDRV_TIMER_IOCTL_TREAD64)
735#endif
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800736struct snd_timer_read {
Christopher Ferris05d08e92016-02-04 13:16:38 -0800737 unsigned int resolution;
Tao Baod7db5942015-01-28 10:07:51 -0800738 unsigned int ticks;
Ben Cheng655a7c02013-10-16 16:09:24 -0700739};
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800740enum {
Christopher Ferris05d08e92016-02-04 13:16:38 -0800741 SNDRV_TIMER_EVENT_RESOLUTION = 0,
Tao Baod7db5942015-01-28 10:07:51 -0800742 SNDRV_TIMER_EVENT_TICK,
743 SNDRV_TIMER_EVENT_START,
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800744 SNDRV_TIMER_EVENT_STOP,
Christopher Ferris05d08e92016-02-04 13:16:38 -0800745 SNDRV_TIMER_EVENT_CONTINUE,
Tao Baod7db5942015-01-28 10:07:51 -0800746 SNDRV_TIMER_EVENT_PAUSE,
747 SNDRV_TIMER_EVENT_EARLY,
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800748 SNDRV_TIMER_EVENT_SUSPEND,
Christopher Ferris05d08e92016-02-04 13:16:38 -0800749 SNDRV_TIMER_EVENT_RESUME,
Tao Baod7db5942015-01-28 10:07:51 -0800750 SNDRV_TIMER_EVENT_MSTART = SNDRV_TIMER_EVENT_START + 10,
751 SNDRV_TIMER_EVENT_MSTOP = SNDRV_TIMER_EVENT_STOP + 10,
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800752 SNDRV_TIMER_EVENT_MCONTINUE = SNDRV_TIMER_EVENT_CONTINUE + 10,
Christopher Ferris05d08e92016-02-04 13:16:38 -0800753 SNDRV_TIMER_EVENT_MPAUSE = SNDRV_TIMER_EVENT_PAUSE + 10,
Tao Baod7db5942015-01-28 10:07:51 -0800754 SNDRV_TIMER_EVENT_MSUSPEND = SNDRV_TIMER_EVENT_SUSPEND + 10,
755 SNDRV_TIMER_EVENT_MRESUME = SNDRV_TIMER_EVENT_RESUME + 10,
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800756};
Christopher Ferris05d08e92016-02-04 13:16:38 -0800757struct snd_timer_tread {
Tao Baod7db5942015-01-28 10:07:51 -0800758 int event;
Christopher Ferrisbb9fcb42020-04-06 11:38:04 -0700759 __time_pad pad1;
Tao Baod7db5942015-01-28 10:07:51 -0800760 struct timespec tstamp;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800761 unsigned int val;
Christopher Ferrisbb9fcb42020-04-06 11:38:04 -0700762 __time_pad pad2;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800763};
Christopher Ferrisbb9fcb42020-04-06 11:38:04 -0700764#define SNDRV_CTL_VERSION SNDRV_PROTOCOL_VERSION(2, 0, 8)
Ben Cheng655a7c02013-10-16 16:09:24 -0700765struct snd_ctl_card_info {
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800766 int card;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800767 int pad;
Tao Baod7db5942015-01-28 10:07:51 -0800768 unsigned char id[16];
769 unsigned char driver[16];
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800770 unsigned char name[32];
Christopher Ferris05d08e92016-02-04 13:16:38 -0800771 unsigned char longname[80];
Tao Baod7db5942015-01-28 10:07:51 -0800772 unsigned char reserved_[16];
773 unsigned char mixername[80];
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800774 unsigned char components[128];
Christopher Ferris05d08e92016-02-04 13:16:38 -0800775};
Ben Cheng655a7c02013-10-16 16:09:24 -0700776typedef int __bitwise snd_ctl_elem_type_t;
777#define SNDRV_CTL_ELEM_TYPE_NONE ((__force snd_ctl_elem_type_t) 0)
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800778#define SNDRV_CTL_ELEM_TYPE_BOOLEAN ((__force snd_ctl_elem_type_t) 1)
Christopher Ferris05d08e92016-02-04 13:16:38 -0800779#define SNDRV_CTL_ELEM_TYPE_INTEGER ((__force snd_ctl_elem_type_t) 2)
Ben Cheng655a7c02013-10-16 16:09:24 -0700780#define SNDRV_CTL_ELEM_TYPE_ENUMERATED ((__force snd_ctl_elem_type_t) 3)
781#define SNDRV_CTL_ELEM_TYPE_BYTES ((__force snd_ctl_elem_type_t) 4)
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800782#define SNDRV_CTL_ELEM_TYPE_IEC958 ((__force snd_ctl_elem_type_t) 5)
Christopher Ferris05d08e92016-02-04 13:16:38 -0800783#define SNDRV_CTL_ELEM_TYPE_INTEGER64 ((__force snd_ctl_elem_type_t) 6)
Ben Cheng655a7c02013-10-16 16:09:24 -0700784#define SNDRV_CTL_ELEM_TYPE_LAST SNDRV_CTL_ELEM_TYPE_INTEGER64
785typedef int __bitwise snd_ctl_elem_iface_t;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800786#define SNDRV_CTL_ELEM_IFACE_CARD ((__force snd_ctl_elem_iface_t) 0)
Christopher Ferris05d08e92016-02-04 13:16:38 -0800787#define SNDRV_CTL_ELEM_IFACE_HWDEP ((__force snd_ctl_elem_iface_t) 1)
Ben Cheng655a7c02013-10-16 16:09:24 -0700788#define SNDRV_CTL_ELEM_IFACE_MIXER ((__force snd_ctl_elem_iface_t) 2)
789#define SNDRV_CTL_ELEM_IFACE_PCM ((__force snd_ctl_elem_iface_t) 3)
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800790#define SNDRV_CTL_ELEM_IFACE_RAWMIDI ((__force snd_ctl_elem_iface_t) 4)
Christopher Ferris05d08e92016-02-04 13:16:38 -0800791#define SNDRV_CTL_ELEM_IFACE_TIMER ((__force snd_ctl_elem_iface_t) 5)
Ben Cheng655a7c02013-10-16 16:09:24 -0700792#define SNDRV_CTL_ELEM_IFACE_SEQUENCER ((__force snd_ctl_elem_iface_t) 6)
793#define SNDRV_CTL_ELEM_IFACE_LAST SNDRV_CTL_ELEM_IFACE_SEQUENCER
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800794#define SNDRV_CTL_ELEM_ACCESS_READ (1 << 0)
Christopher Ferris05d08e92016-02-04 13:16:38 -0800795#define SNDRV_CTL_ELEM_ACCESS_WRITE (1 << 1)
Tao Baod7db5942015-01-28 10:07:51 -0800796#define SNDRV_CTL_ELEM_ACCESS_READWRITE (SNDRV_CTL_ELEM_ACCESS_READ | SNDRV_CTL_ELEM_ACCESS_WRITE)
797#define SNDRV_CTL_ELEM_ACCESS_VOLATILE (1 << 2)
Christopher Ferris05d08e92016-02-04 13:16:38 -0800798#define SNDRV_CTL_ELEM_ACCESS_TLV_READ (1 << 4)
Tao Baod7db5942015-01-28 10:07:51 -0800799#define SNDRV_CTL_ELEM_ACCESS_TLV_WRITE (1 << 5)
800#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 -0800801#define SNDRV_CTL_ELEM_ACCESS_TLV_COMMAND (1 << 6)
Christopher Ferris05d08e92016-02-04 13:16:38 -0800802#define SNDRV_CTL_ELEM_ACCESS_INACTIVE (1 << 8)
Tao Baod7db5942015-01-28 10:07:51 -0800803#define SNDRV_CTL_ELEM_ACCESS_LOCK (1 << 9)
804#define SNDRV_CTL_ELEM_ACCESS_OWNER (1 << 10)
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800805#define SNDRV_CTL_ELEM_ACCESS_TLV_CALLBACK (1 << 28)
Christopher Ferris05d08e92016-02-04 13:16:38 -0800806#define SNDRV_CTL_ELEM_ACCESS_USER (1 << 29)
Ben Cheng655a7c02013-10-16 16:09:24 -0700807#define SNDRV_CTL_POWER_D0 0x0000
808#define SNDRV_CTL_POWER_D1 0x0100
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800809#define SNDRV_CTL_POWER_D2 0x0200
Christopher Ferris05d08e92016-02-04 13:16:38 -0800810#define SNDRV_CTL_POWER_D3 0x0300
Tao Baod7db5942015-01-28 10:07:51 -0800811#define SNDRV_CTL_POWER_D3hot (SNDRV_CTL_POWER_D3 | 0x0000)
812#define SNDRV_CTL_POWER_D3cold (SNDRV_CTL_POWER_D3 | 0x0001)
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800813#define SNDRV_CTL_ELEM_ID_NAME_MAXLEN 44
Christopher Ferris05d08e92016-02-04 13:16:38 -0800814struct snd_ctl_elem_id {
Tao Baod7db5942015-01-28 10:07:51 -0800815 unsigned int numid;
816 snd_ctl_elem_iface_t iface;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800817 unsigned int device;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800818 unsigned int subdevice;
819 unsigned char name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN];
Tao Baod7db5942015-01-28 10:07:51 -0800820 unsigned int index;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800821};
Christopher Ferris05d08e92016-02-04 13:16:38 -0800822struct snd_ctl_elem_list {
Tao Baod7db5942015-01-28 10:07:51 -0800823 unsigned int offset;
824 unsigned int space;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800825 unsigned int used;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800826 unsigned int count;
Tao Baod7db5942015-01-28 10:07:51 -0800827 struct snd_ctl_elem_id __user * pids;
828 unsigned char reserved[50];
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800829};
Christopher Ferris05d08e92016-02-04 13:16:38 -0800830struct snd_ctl_elem_info {
Tao Baod7db5942015-01-28 10:07:51 -0800831 struct snd_ctl_elem_id id;
832 snd_ctl_elem_type_t type;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800833 unsigned int access;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800834 unsigned int count;
Tao Baod7db5942015-01-28 10:07:51 -0800835 __kernel_pid_t owner;
836 union {
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800837 struct {
Christopher Ferris05d08e92016-02-04 13:16:38 -0800838 long min;
Tao Baod7db5942015-01-28 10:07:51 -0800839 long max;
840 long step;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800841 } integer;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800842 struct {
Tao Baod7db5942015-01-28 10:07:51 -0800843 long long min;
844 long long max;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800845 long long step;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800846 } integer64;
Tao Baod7db5942015-01-28 10:07:51 -0800847 struct {
848 unsigned int items;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800849 unsigned int item;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800850 char name[64];
Tao Baod7db5942015-01-28 10:07:51 -0800851 __u64 names_ptr;
852 unsigned int names_length;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800853 } enumerated;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800854 unsigned char reserved[128];
Tao Baod7db5942015-01-28 10:07:51 -0800855 } value;
Christopher Ferrisbb9fcb42020-04-06 11:38:04 -0700856 unsigned char reserved[64];
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800857};
Christopher Ferris05d08e92016-02-04 13:16:38 -0800858struct snd_ctl_elem_value {
Tao Baod7db5942015-01-28 10:07:51 -0800859 struct snd_ctl_elem_id id;
860 unsigned int indirect : 1;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800861 union {
Christopher Ferris05d08e92016-02-04 13:16:38 -0800862 union {
Tao Baod7db5942015-01-28 10:07:51 -0800863 long value[128];
864 long * value_ptr;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800865 } integer;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800866 union {
Tao Baod7db5942015-01-28 10:07:51 -0800867 long long value[64];
868 long long * value_ptr;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800869 } integer64;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800870 union {
Tao Baod7db5942015-01-28 10:07:51 -0800871 unsigned int item[128];
872 unsigned int * item_ptr;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800873 } enumerated;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800874 union {
Tao Baod7db5942015-01-28 10:07:51 -0800875 unsigned char data[512];
876 unsigned char * data_ptr;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800877 } bytes;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800878 struct snd_aes_iec958 iec958;
Tao Baod7db5942015-01-28 10:07:51 -0800879 } value;
Christopher Ferrisbb9fcb42020-04-06 11:38:04 -0700880 unsigned char reserved[128];
Christopher Ferris05d08e92016-02-04 13:16:38 -0800881};
Tao Baod7db5942015-01-28 10:07:51 -0800882struct snd_ctl_tlv {
883 unsigned int numid;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800884 unsigned int length;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800885 unsigned int tlv[0];
Ben Cheng655a7c02013-10-16 16:09:24 -0700886};
887#define SNDRV_CTL_IOCTL_PVERSION _IOR('U', 0x00, int)
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800888#define SNDRV_CTL_IOCTL_CARD_INFO _IOR('U', 0x01, struct snd_ctl_card_info)
Christopher Ferris05d08e92016-02-04 13:16:38 -0800889#define SNDRV_CTL_IOCTL_ELEM_LIST _IOWR('U', 0x10, struct snd_ctl_elem_list)
Ben Cheng655a7c02013-10-16 16:09:24 -0700890#define SNDRV_CTL_IOCTL_ELEM_INFO _IOWR('U', 0x11, struct snd_ctl_elem_info)
891#define SNDRV_CTL_IOCTL_ELEM_READ _IOWR('U', 0x12, struct snd_ctl_elem_value)
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800892#define SNDRV_CTL_IOCTL_ELEM_WRITE _IOWR('U', 0x13, struct snd_ctl_elem_value)
Christopher Ferris05d08e92016-02-04 13:16:38 -0800893#define SNDRV_CTL_IOCTL_ELEM_LOCK _IOW('U', 0x14, struct snd_ctl_elem_id)
Ben Cheng655a7c02013-10-16 16:09:24 -0700894#define SNDRV_CTL_IOCTL_ELEM_UNLOCK _IOW('U', 0x15, struct snd_ctl_elem_id)
895#define SNDRV_CTL_IOCTL_SUBSCRIBE_EVENTS _IOWR('U', 0x16, int)
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800896#define SNDRV_CTL_IOCTL_ELEM_ADD _IOWR('U', 0x17, struct snd_ctl_elem_info)
Christopher Ferris05d08e92016-02-04 13:16:38 -0800897#define SNDRV_CTL_IOCTL_ELEM_REPLACE _IOWR('U', 0x18, struct snd_ctl_elem_info)
Ben Cheng655a7c02013-10-16 16:09:24 -0700898#define SNDRV_CTL_IOCTL_ELEM_REMOVE _IOWR('U', 0x19, struct snd_ctl_elem_id)
899#define SNDRV_CTL_IOCTL_TLV_READ _IOWR('U', 0x1a, struct snd_ctl_tlv)
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800900#define SNDRV_CTL_IOCTL_TLV_WRITE _IOWR('U', 0x1b, struct snd_ctl_tlv)
Christopher Ferris05d08e92016-02-04 13:16:38 -0800901#define SNDRV_CTL_IOCTL_TLV_COMMAND _IOWR('U', 0x1c, struct snd_ctl_tlv)
Ben Cheng655a7c02013-10-16 16:09:24 -0700902#define SNDRV_CTL_IOCTL_HWDEP_NEXT_DEVICE _IOWR('U', 0x20, int)
903#define SNDRV_CTL_IOCTL_HWDEP_INFO _IOR('U', 0x21, struct snd_hwdep_info)
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800904#define SNDRV_CTL_IOCTL_PCM_NEXT_DEVICE _IOR('U', 0x30, int)
Christopher Ferris05d08e92016-02-04 13:16:38 -0800905#define SNDRV_CTL_IOCTL_PCM_INFO _IOWR('U', 0x31, struct snd_pcm_info)
Ben Cheng655a7c02013-10-16 16:09:24 -0700906#define SNDRV_CTL_IOCTL_PCM_PREFER_SUBDEVICE _IOW('U', 0x32, int)
907#define SNDRV_CTL_IOCTL_RAWMIDI_NEXT_DEVICE _IOWR('U', 0x40, int)
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800908#define SNDRV_CTL_IOCTL_RAWMIDI_INFO _IOWR('U', 0x41, struct snd_rawmidi_info)
Christopher Ferris05d08e92016-02-04 13:16:38 -0800909#define SNDRV_CTL_IOCTL_RAWMIDI_PREFER_SUBDEVICE _IOW('U', 0x42, int)
Ben Cheng655a7c02013-10-16 16:09:24 -0700910#define SNDRV_CTL_IOCTL_POWER _IOWR('U', 0xd0, int)
911#define SNDRV_CTL_IOCTL_POWER_STATE _IOR('U', 0xd1, int)
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800912enum sndrv_ctl_event_type {
Christopher Ferris05d08e92016-02-04 13:16:38 -0800913 SNDRV_CTL_EVENT_ELEM = 0,
Tao Baod7db5942015-01-28 10:07:51 -0800914 SNDRV_CTL_EVENT_LAST = SNDRV_CTL_EVENT_ELEM,
Ben Cheng655a7c02013-10-16 16:09:24 -0700915};
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800916#define SNDRV_CTL_EVENT_MASK_VALUE (1 << 0)
Christopher Ferris05d08e92016-02-04 13:16:38 -0800917#define SNDRV_CTL_EVENT_MASK_INFO (1 << 1)
Tao Baod7db5942015-01-28 10:07:51 -0800918#define SNDRV_CTL_EVENT_MASK_ADD (1 << 2)
919#define SNDRV_CTL_EVENT_MASK_TLV (1 << 3)
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800920#define SNDRV_CTL_EVENT_MASK_REMOVE (~0U)
Christopher Ferris05d08e92016-02-04 13:16:38 -0800921struct snd_ctl_event {
Tao Baod7db5942015-01-28 10:07:51 -0800922 int type;
923 union {
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800924 struct {
Christopher Ferris05d08e92016-02-04 13:16:38 -0800925 unsigned int mask;
Tao Baod7db5942015-01-28 10:07:51 -0800926 struct snd_ctl_elem_id id;
927 } elem;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800928 unsigned char data8[60];
Christopher Ferris05d08e92016-02-04 13:16:38 -0800929 } data;
Ben Cheng655a7c02013-10-16 16:09:24 -0700930};
931#define SNDRV_CTL_NAME_NONE ""
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800932#define SNDRV_CTL_NAME_PLAYBACK "Playback "
Christopher Ferris05d08e92016-02-04 13:16:38 -0800933#define SNDRV_CTL_NAME_CAPTURE "Capture "
Ben Cheng655a7c02013-10-16 16:09:24 -0700934#define SNDRV_CTL_NAME_IEC958_NONE ""
935#define SNDRV_CTL_NAME_IEC958_SWITCH "Switch"
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800936#define SNDRV_CTL_NAME_IEC958_VOLUME "Volume"
Christopher Ferris05d08e92016-02-04 13:16:38 -0800937#define SNDRV_CTL_NAME_IEC958_DEFAULT "Default"
Ben Cheng655a7c02013-10-16 16:09:24 -0700938#define SNDRV_CTL_NAME_IEC958_MASK "Mask"
939#define SNDRV_CTL_NAME_IEC958_CON_MASK "Con Mask"
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800940#define SNDRV_CTL_NAME_IEC958_PRO_MASK "Pro Mask"
Christopher Ferris05d08e92016-02-04 13:16:38 -0800941#define SNDRV_CTL_NAME_IEC958_PCM_STREAM "PCM Stream"
Tao Baod7db5942015-01-28 10:07:51 -0800942#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 -0700943#endif