blob: 397cccce8ef1dac9bfe280d6ce2d95cfe05ddef6 [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
237#define SNDRV_PCM_INFO_DRAIN_TRIGGER 0x40000000
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800238#define SNDRV_PCM_INFO_FIFO_IN_FRAMES 0x80000000
Christopher Ferrisbb9fcb42020-04-06 11:38:04 -0700239#if __BITS_PER_LONG == 32 && defined(__USE_TIME_BITS64)
240#define __SND_STRUCT_TIME64
241#endif
Christopher Ferris05d08e92016-02-04 13:16:38 -0800242typedef int __bitwise snd_pcm_state_t;
Ben Cheng655a7c02013-10-16 16:09:24 -0700243#define SNDRV_PCM_STATE_OPEN ((__force snd_pcm_state_t) 0)
Christopher Ferris38062f92014-07-09 15:33:25 -0700244#define SNDRV_PCM_STATE_SETUP ((__force snd_pcm_state_t) 1)
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800245#define SNDRV_PCM_STATE_PREPARED ((__force snd_pcm_state_t) 2)
Christopher Ferris05d08e92016-02-04 13:16:38 -0800246#define SNDRV_PCM_STATE_RUNNING ((__force snd_pcm_state_t) 3)
Ben Cheng655a7c02013-10-16 16:09:24 -0700247#define SNDRV_PCM_STATE_XRUN ((__force snd_pcm_state_t) 4)
Christopher Ferris38062f92014-07-09 15:33:25 -0700248#define SNDRV_PCM_STATE_DRAINING ((__force snd_pcm_state_t) 5)
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800249#define SNDRV_PCM_STATE_PAUSED ((__force snd_pcm_state_t) 6)
Christopher Ferris05d08e92016-02-04 13:16:38 -0800250#define SNDRV_PCM_STATE_SUSPENDED ((__force snd_pcm_state_t) 7)
Ben Cheng655a7c02013-10-16 16:09:24 -0700251#define SNDRV_PCM_STATE_DISCONNECTED ((__force snd_pcm_state_t) 8)
Christopher Ferris38062f92014-07-09 15:33:25 -0700252#define SNDRV_PCM_STATE_LAST SNDRV_PCM_STATE_DISCONNECTED
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800253enum {
Christopher Ferris05d08e92016-02-04 13:16:38 -0800254 SNDRV_PCM_MMAP_OFFSET_DATA = 0x00000000,
Christopher Ferrisbb9fcb42020-04-06 11:38:04 -0700255 SNDRV_PCM_MMAP_OFFSET_STATUS_OLD = 0x80000000,
256 SNDRV_PCM_MMAP_OFFSET_CONTROL_OLD = 0x81000000,
257 SNDRV_PCM_MMAP_OFFSET_STATUS_NEW = 0x82000000,
258 SNDRV_PCM_MMAP_OFFSET_CONTROL_NEW = 0x83000000,
259#ifdef __SND_STRUCT_TIME64
260 SNDRV_PCM_MMAP_OFFSET_STATUS = SNDRV_PCM_MMAP_OFFSET_STATUS_NEW,
261 SNDRV_PCM_MMAP_OFFSET_CONTROL = SNDRV_PCM_MMAP_OFFSET_CONTROL_NEW,
262#else
263 SNDRV_PCM_MMAP_OFFSET_STATUS = SNDRV_PCM_MMAP_OFFSET_STATUS_OLD,
264 SNDRV_PCM_MMAP_OFFSET_CONTROL = SNDRV_PCM_MMAP_OFFSET_CONTROL_OLD,
265#endif
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800266};
Christopher Ferris05d08e92016-02-04 13:16:38 -0800267union snd_pcm_sync_id {
Tao Baod7db5942015-01-28 10:07:51 -0800268 unsigned char id[16];
269 unsigned short id16[8];
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800270 unsigned int id32[4];
Christopher Ferris05d08e92016-02-04 13:16:38 -0800271};
Ben Cheng655a7c02013-10-16 16:09:24 -0700272struct snd_pcm_info {
Tao Baod7db5942015-01-28 10:07:51 -0800273 unsigned int device;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800274 unsigned int subdevice;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800275 int stream;
Tao Baod7db5942015-01-28 10:07:51 -0800276 int card;
277 unsigned char id[64];
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800278 unsigned char name[80];
Christopher Ferris05d08e92016-02-04 13:16:38 -0800279 unsigned char subname[32];
Tao Baod7db5942015-01-28 10:07:51 -0800280 int dev_class;
281 int dev_subclass;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800282 unsigned int subdevices_count;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800283 unsigned int subdevices_avail;
Tao Baod7db5942015-01-28 10:07:51 -0800284 union snd_pcm_sync_id sync;
285 unsigned char reserved[64];
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800286};
Christopher Ferris05d08e92016-02-04 13:16:38 -0800287typedef int snd_pcm_hw_param_t;
Ben Cheng655a7c02013-10-16 16:09:24 -0700288#define SNDRV_PCM_HW_PARAM_ACCESS 0
Christopher Ferris38062f92014-07-09 15:33:25 -0700289#define SNDRV_PCM_HW_PARAM_FORMAT 1
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800290#define SNDRV_PCM_HW_PARAM_SUBFORMAT 2
Christopher Ferris05d08e92016-02-04 13:16:38 -0800291#define SNDRV_PCM_HW_PARAM_FIRST_MASK SNDRV_PCM_HW_PARAM_ACCESS
Ben Cheng655a7c02013-10-16 16:09:24 -0700292#define SNDRV_PCM_HW_PARAM_LAST_MASK SNDRV_PCM_HW_PARAM_SUBFORMAT
Christopher Ferris38062f92014-07-09 15:33:25 -0700293#define SNDRV_PCM_HW_PARAM_SAMPLE_BITS 8
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800294#define SNDRV_PCM_HW_PARAM_FRAME_BITS 9
Christopher Ferris05d08e92016-02-04 13:16:38 -0800295#define SNDRV_PCM_HW_PARAM_CHANNELS 10
Ben Cheng655a7c02013-10-16 16:09:24 -0700296#define SNDRV_PCM_HW_PARAM_RATE 11
Christopher Ferris38062f92014-07-09 15:33:25 -0700297#define SNDRV_PCM_HW_PARAM_PERIOD_TIME 12
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800298#define SNDRV_PCM_HW_PARAM_PERIOD_SIZE 13
Christopher Ferris05d08e92016-02-04 13:16:38 -0800299#define SNDRV_PCM_HW_PARAM_PERIOD_BYTES 14
Ben Cheng655a7c02013-10-16 16:09:24 -0700300#define SNDRV_PCM_HW_PARAM_PERIODS 15
Christopher Ferris38062f92014-07-09 15:33:25 -0700301#define SNDRV_PCM_HW_PARAM_BUFFER_TIME 16
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800302#define SNDRV_PCM_HW_PARAM_BUFFER_SIZE 17
Christopher Ferris05d08e92016-02-04 13:16:38 -0800303#define SNDRV_PCM_HW_PARAM_BUFFER_BYTES 18
Ben Cheng655a7c02013-10-16 16:09:24 -0700304#define SNDRV_PCM_HW_PARAM_TICK_TIME 19
Christopher Ferris38062f92014-07-09 15:33:25 -0700305#define SNDRV_PCM_HW_PARAM_FIRST_INTERVAL SNDRV_PCM_HW_PARAM_SAMPLE_BITS
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800306#define SNDRV_PCM_HW_PARAM_LAST_INTERVAL SNDRV_PCM_HW_PARAM_TICK_TIME
Christopher Ferris05d08e92016-02-04 13:16:38 -0800307#define SNDRV_PCM_HW_PARAMS_NORESAMPLE (1 << 0)
Tao Baod7db5942015-01-28 10:07:51 -0800308#define SNDRV_PCM_HW_PARAMS_EXPORT_BUFFER (1 << 1)
309#define SNDRV_PCM_HW_PARAMS_NO_PERIOD_WAKEUP (1 << 2)
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800310struct snd_interval {
Christopher Ferris05d08e92016-02-04 13:16:38 -0800311 unsigned int min, max;
Tao Baod7db5942015-01-28 10:07:51 -0800312 unsigned int openmin : 1, openmax : 1, integer : 1, empty : 1;
Ben Cheng655a7c02013-10-16 16:09:24 -0700313};
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800314#define SNDRV_MASK_MAX 256
Christopher Ferris05d08e92016-02-04 13:16:38 -0800315struct snd_mask {
Tao Baod7db5942015-01-28 10:07:51 -0800316 __u32 bits[(SNDRV_MASK_MAX + 31) / 32];
Ben Cheng655a7c02013-10-16 16:09:24 -0700317};
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800318struct snd_pcm_hw_params {
Christopher Ferris05d08e92016-02-04 13:16:38 -0800319 unsigned int flags;
Tao Baod7db5942015-01-28 10:07:51 -0800320 struct snd_mask masks[SNDRV_PCM_HW_PARAM_LAST_MASK - SNDRV_PCM_HW_PARAM_FIRST_MASK + 1];
321 struct snd_mask mres[5];
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800322 struct snd_interval intervals[SNDRV_PCM_HW_PARAM_LAST_INTERVAL - SNDRV_PCM_HW_PARAM_FIRST_INTERVAL + 1];
Christopher Ferris05d08e92016-02-04 13:16:38 -0800323 struct snd_interval ires[9];
Tao Baod7db5942015-01-28 10:07:51 -0800324 unsigned int rmask;
325 unsigned int cmask;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800326 unsigned int info;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800327 unsigned int msbits;
Tao Baod7db5942015-01-28 10:07:51 -0800328 unsigned int rate_num;
329 unsigned int rate_den;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800330 snd_pcm_uframes_t fifo_size;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800331 unsigned char reserved[64];
Christopher Ferris38062f92014-07-09 15:33:25 -0700332};
Ben Cheng655a7c02013-10-16 16:09:24 -0700333enum {
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800334 SNDRV_PCM_TSTAMP_NONE = 0,
Christopher Ferris05d08e92016-02-04 13:16:38 -0800335 SNDRV_PCM_TSTAMP_ENABLE,
Tao Baod7db5942015-01-28 10:07:51 -0800336 SNDRV_PCM_TSTAMP_LAST = SNDRV_PCM_TSTAMP_ENABLE,
Ben Cheng655a7c02013-10-16 16:09:24 -0700337};
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800338struct snd_pcm_sw_params {
Christopher Ferris05d08e92016-02-04 13:16:38 -0800339 int tstamp_mode;
Tao Baod7db5942015-01-28 10:07:51 -0800340 unsigned int period_step;
341 unsigned int sleep_min;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800342 snd_pcm_uframes_t avail_min;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800343 snd_pcm_uframes_t xfer_align;
Tao Baod7db5942015-01-28 10:07:51 -0800344 snd_pcm_uframes_t start_threshold;
345 snd_pcm_uframes_t stop_threshold;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800346 snd_pcm_uframes_t silence_threshold;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800347 snd_pcm_uframes_t silence_size;
Tao Baod7db5942015-01-28 10:07:51 -0800348 snd_pcm_uframes_t boundary;
349 unsigned int proto;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800350 unsigned int tstamp_type;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800351 unsigned char reserved[56];
Ben Cheng655a7c02013-10-16 16:09:24 -0700352};
353struct snd_pcm_channel_info {
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800354 unsigned int channel;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800355 __kernel_off_t offset;
Tao Baod7db5942015-01-28 10:07:51 -0800356 unsigned int first;
357 unsigned int step;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800358};
Christopher Ferris05d08e92016-02-04 13:16:38 -0800359enum {
360 SNDRV_PCM_AUDIO_TSTAMP_TYPE_COMPAT = 0,
361 SNDRV_PCM_AUDIO_TSTAMP_TYPE_DEFAULT = 1,
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800362 SNDRV_PCM_AUDIO_TSTAMP_TYPE_LINK = 2,
Christopher Ferris05d08e92016-02-04 13:16:38 -0800363 SNDRV_PCM_AUDIO_TSTAMP_TYPE_LINK_ABSOLUTE = 3,
364 SNDRV_PCM_AUDIO_TSTAMP_TYPE_LINK_ESTIMATED = 4,
365 SNDRV_PCM_AUDIO_TSTAMP_TYPE_LINK_SYNCHRONIZED = 5,
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800366 SNDRV_PCM_AUDIO_TSTAMP_TYPE_LAST = SNDRV_PCM_AUDIO_TSTAMP_TYPE_LINK_SYNCHRONIZED
Christopher Ferris05d08e92016-02-04 13:16:38 -0800367};
Christopher Ferrisbb9fcb42020-04-06 11:38:04 -0700368typedef struct {
369 unsigned char pad[sizeof(time_t) - sizeof(int)];
370} __time_pad;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800371struct snd_pcm_status {
Tao Baod7db5942015-01-28 10:07:51 -0800372 snd_pcm_state_t state;
Christopher Ferrisbb9fcb42020-04-06 11:38:04 -0700373 __time_pad pad1;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800374 struct timespec trigger_tstamp;
Tao Baod7db5942015-01-28 10:07:51 -0800375 struct timespec tstamp;
376 snd_pcm_uframes_t appl_ptr;
Tao Baod7db5942015-01-28 10:07:51 -0800377 snd_pcm_uframes_t hw_ptr;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800378 snd_pcm_sframes_t delay;
Tao Baod7db5942015-01-28 10:07:51 -0800379 snd_pcm_uframes_t avail;
380 snd_pcm_uframes_t avail_max;
Tao Baod7db5942015-01-28 10:07:51 -0800381 snd_pcm_uframes_t overrange;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800382 snd_pcm_state_t suspended_state;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800383 __u32 audio_tstamp_data;
384 struct timespec audio_tstamp;
385 struct timespec driver_tstamp;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800386 __u32 audio_tstamp_accuracy;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800387 unsigned char reserved[52 - 2 * sizeof(struct timespec)];
Ben Cheng655a7c02013-10-16 16:09:24 -0700388};
Christopher Ferrisbb9fcb42020-04-06 11:38:04 -0700389#ifdef __SND_STRUCT_TIME64
390#define __snd_pcm_mmap_status64 snd_pcm_mmap_status
391#define __snd_pcm_mmap_control64 snd_pcm_mmap_control
392#define __snd_pcm_sync_ptr64 snd_pcm_sync_ptr
393#define __snd_timespec64 timespec
394struct __snd_timespec {
395 __s32 tv_sec;
396 __s32 tv_nsec;
397};
398#else
399#define __snd_pcm_mmap_status snd_pcm_mmap_status
400#define __snd_pcm_mmap_control snd_pcm_mmap_control
401#define __snd_pcm_sync_ptr snd_pcm_sync_ptr
402#define __snd_timespec timespec
403struct __snd_timespec64 {
404 __s64 tv_sec;
405 __s64 tv_nsec;
406};
407#endif
408struct __snd_pcm_mmap_status {
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800409 snd_pcm_state_t state;
Tao Baod7db5942015-01-28 10:07:51 -0800410 int pad1;
411 snd_pcm_uframes_t hw_ptr;
Christopher Ferrisbb9fcb42020-04-06 11:38:04 -0700412 struct __snd_timespec tstamp;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800413 snd_pcm_state_t suspended_state;
Christopher Ferrisbb9fcb42020-04-06 11:38:04 -0700414 struct __snd_timespec audio_tstamp;
Ben Cheng655a7c02013-10-16 16:09:24 -0700415};
Christopher Ferrisbb9fcb42020-04-06 11:38:04 -0700416struct __snd_pcm_mmap_control {
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800417 snd_pcm_uframes_t appl_ptr;
Tao Baod7db5942015-01-28 10:07:51 -0800418 snd_pcm_uframes_t avail_min;
Ben Cheng655a7c02013-10-16 16:09:24 -0700419};
Tao Baod7db5942015-01-28 10:07:51 -0800420#define SNDRV_PCM_SYNC_PTR_HWSYNC (1 << 0)
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800421#define SNDRV_PCM_SYNC_PTR_APPL (1 << 1)
Tao Baod7db5942015-01-28 10:07:51 -0800422#define SNDRV_PCM_SYNC_PTR_AVAIL_MIN (1 << 2)
Christopher Ferrisbb9fcb42020-04-06 11:38:04 -0700423struct __snd_pcm_sync_ptr {
Tao Baod7db5942015-01-28 10:07:51 -0800424 unsigned int flags;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800425 union {
Christopher Ferrisbb9fcb42020-04-06 11:38:04 -0700426 struct __snd_pcm_mmap_status status;
Tao Baod7db5942015-01-28 10:07:51 -0800427 unsigned char reserved[64];
428 } s;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800429 union {
Christopher Ferrisbb9fcb42020-04-06 11:38:04 -0700430 struct __snd_pcm_mmap_control control;
431 unsigned char reserved[64];
432 } c;
433};
434#if defined(__BYTE_ORDER) ? __BYTE_ORDER == __BIG_ENDIAN : defined(__BIG_ENDIAN)
435typedef char __pad_before_uframe[sizeof(__u64) - sizeof(snd_pcm_uframes_t)];
436typedef char __pad_after_uframe[0];
437#endif
438#if defined(__BYTE_ORDER) ? __BYTE_ORDER == __LITTLE_ENDIAN : defined(__LITTLE_ENDIAN)
439typedef char __pad_before_uframe[0];
440typedef char __pad_after_uframe[sizeof(__u64) - sizeof(snd_pcm_uframes_t)];
441#endif
442struct __snd_pcm_mmap_status64 {
443 snd_pcm_state_t state;
444 __u32 pad1;
445 __pad_before_uframe __pad1;
446 snd_pcm_uframes_t hw_ptr;
447 __pad_after_uframe __pad2;
448 struct __snd_timespec64 tstamp;
449 snd_pcm_state_t suspended_state;
450 __u32 pad3;
451 struct __snd_timespec64 audio_tstamp;
452};
453struct __snd_pcm_mmap_control64 {
454 __pad_before_uframe __pad1;
455 snd_pcm_uframes_t appl_ptr;
456 __pad_before_uframe __pad2;
457 __pad_before_uframe __pad3;
458 snd_pcm_uframes_t avail_min;
459 __pad_after_uframe __pad4;
460};
461struct __snd_pcm_sync_ptr64 {
462 __u32 flags;
463 __u32 pad1;
464 union {
465 struct __snd_pcm_mmap_status64 status;
466 unsigned char reserved[64];
467 } s;
468 union {
469 struct __snd_pcm_mmap_control64 control;
Tao Baod7db5942015-01-28 10:07:51 -0800470 unsigned char reserved[64];
471 } c;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800472};
Tao Baod7db5942015-01-28 10:07:51 -0800473struct snd_xferi {
474 snd_pcm_sframes_t result;
475 void __user * buf;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800476 snd_pcm_uframes_t frames;
Ben Cheng655a7c02013-10-16 16:09:24 -0700477};
478struct snd_xfern {
Tao Baod7db5942015-01-28 10:07:51 -0800479 snd_pcm_sframes_t result;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800480 void __user * __user * bufs;
Tao Baod7db5942015-01-28 10:07:51 -0800481 snd_pcm_uframes_t frames;
Ben Cheng655a7c02013-10-16 16:09:24 -0700482};
Christopher Ferris38062f92014-07-09 15:33:25 -0700483enum {
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800484 SNDRV_PCM_TSTAMP_TYPE_GETTIMEOFDAY = 0,
Tao Baod7db5942015-01-28 10:07:51 -0800485 SNDRV_PCM_TSTAMP_TYPE_MONOTONIC,
486 SNDRV_PCM_TSTAMP_TYPE_MONOTONIC_RAW,
487 SNDRV_PCM_TSTAMP_TYPE_LAST = SNDRV_PCM_TSTAMP_TYPE_MONOTONIC_RAW,
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800488};
Ben Cheng655a7c02013-10-16 16:09:24 -0700489enum {
Tao Baod7db5942015-01-28 10:07:51 -0800490 SNDRV_CHMAP_UNKNOWN = 0,
491 SNDRV_CHMAP_NA,
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800492 SNDRV_CHMAP_MONO,
Tao Baod7db5942015-01-28 10:07:51 -0800493 SNDRV_CHMAP_FL,
494 SNDRV_CHMAP_FR,
495 SNDRV_CHMAP_RL,
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800496 SNDRV_CHMAP_RR,
Tao Baod7db5942015-01-28 10:07:51 -0800497 SNDRV_CHMAP_FC,
498 SNDRV_CHMAP_LFE,
499 SNDRV_CHMAP_SL,
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800500 SNDRV_CHMAP_SR,
Tao Baod7db5942015-01-28 10:07:51 -0800501 SNDRV_CHMAP_RC,
502 SNDRV_CHMAP_FLC,
503 SNDRV_CHMAP_FRC,
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800504 SNDRV_CHMAP_RLC,
Tao Baod7db5942015-01-28 10:07:51 -0800505 SNDRV_CHMAP_RRC,
506 SNDRV_CHMAP_FLW,
507 SNDRV_CHMAP_FRW,
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800508 SNDRV_CHMAP_FLH,
Tao Baod7db5942015-01-28 10:07:51 -0800509 SNDRV_CHMAP_FCH,
510 SNDRV_CHMAP_FRH,
511 SNDRV_CHMAP_TC,
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800512 SNDRV_CHMAP_TFL,
Tao Baod7db5942015-01-28 10:07:51 -0800513 SNDRV_CHMAP_TFR,
514 SNDRV_CHMAP_TFC,
515 SNDRV_CHMAP_TRL,
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800516 SNDRV_CHMAP_TRR,
Tao Baod7db5942015-01-28 10:07:51 -0800517 SNDRV_CHMAP_TRC,
518 SNDRV_CHMAP_TFLC,
519 SNDRV_CHMAP_TFRC,
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800520 SNDRV_CHMAP_TSL,
Tao Baod7db5942015-01-28 10:07:51 -0800521 SNDRV_CHMAP_TSR,
522 SNDRV_CHMAP_LLFE,
523 SNDRV_CHMAP_RLFE,
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800524 SNDRV_CHMAP_BC,
Tao Baod7db5942015-01-28 10:07:51 -0800525 SNDRV_CHMAP_BLC,
526 SNDRV_CHMAP_BRC,
527 SNDRV_CHMAP_LAST = SNDRV_CHMAP_BRC,
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800528};
Ben Cheng655a7c02013-10-16 16:09:24 -0700529#define SNDRV_CHMAP_POSITION_MASK 0xffff
530#define SNDRV_CHMAP_PHASE_INVERSE (0x01 << 16)
531#define SNDRV_CHMAP_DRIVER_SPEC (0x02 << 16)
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800532#define SNDRV_PCM_IOCTL_PVERSION _IOR('A', 0x00, int)
Ben Cheng655a7c02013-10-16 16:09:24 -0700533#define SNDRV_PCM_IOCTL_INFO _IOR('A', 0x01, struct snd_pcm_info)
534#define SNDRV_PCM_IOCTL_TSTAMP _IOW('A', 0x02, int)
535#define SNDRV_PCM_IOCTL_TTSTAMP _IOW('A', 0x03, int)
Christopher Ferris1308ad32017-11-14 17:32:13 -0800536#define SNDRV_PCM_IOCTL_USER_PVERSION _IOW('A', 0x04, int)
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800537#define SNDRV_PCM_IOCTL_HW_REFINE _IOWR('A', 0x10, struct snd_pcm_hw_params)
Ben Cheng655a7c02013-10-16 16:09:24 -0700538#define SNDRV_PCM_IOCTL_HW_PARAMS _IOWR('A', 0x11, struct snd_pcm_hw_params)
539#define SNDRV_PCM_IOCTL_HW_FREE _IO('A', 0x12)
540#define SNDRV_PCM_IOCTL_SW_PARAMS _IOWR('A', 0x13, struct snd_pcm_sw_params)
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800541#define SNDRV_PCM_IOCTL_STATUS _IOR('A', 0x20, struct snd_pcm_status)
Ben Cheng655a7c02013-10-16 16:09:24 -0700542#define SNDRV_PCM_IOCTL_DELAY _IOR('A', 0x21, snd_pcm_sframes_t)
543#define SNDRV_PCM_IOCTL_HWSYNC _IO('A', 0x22)
Christopher Ferrisbb9fcb42020-04-06 11:38:04 -0700544#define __SNDRV_PCM_IOCTL_SYNC_PTR _IOWR('A', 0x23, struct __snd_pcm_sync_ptr)
545#define __SNDRV_PCM_IOCTL_SYNC_PTR64 _IOWR('A', 0x23, struct __snd_pcm_sync_ptr64)
Ben Cheng655a7c02013-10-16 16:09:24 -0700546#define SNDRV_PCM_IOCTL_SYNC_PTR _IOWR('A', 0x23, struct snd_pcm_sync_ptr)
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800547#define SNDRV_PCM_IOCTL_STATUS_EXT _IOWR('A', 0x24, struct snd_pcm_status)
Christopher Ferris05d08e92016-02-04 13:16:38 -0800548#define SNDRV_PCM_IOCTL_CHANNEL_INFO _IOR('A', 0x32, struct snd_pcm_channel_info)
Ben Cheng655a7c02013-10-16 16:09:24 -0700549#define SNDRV_PCM_IOCTL_PREPARE _IO('A', 0x40)
550#define SNDRV_PCM_IOCTL_RESET _IO('A', 0x41)
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800551#define SNDRV_PCM_IOCTL_START _IO('A', 0x42)
Christopher Ferris05d08e92016-02-04 13:16:38 -0800552#define SNDRV_PCM_IOCTL_DROP _IO('A', 0x43)
Ben Cheng655a7c02013-10-16 16:09:24 -0700553#define SNDRV_PCM_IOCTL_DRAIN _IO('A', 0x44)
554#define SNDRV_PCM_IOCTL_PAUSE _IOW('A', 0x45, int)
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800555#define SNDRV_PCM_IOCTL_REWIND _IOW('A', 0x46, snd_pcm_uframes_t)
Christopher Ferris05d08e92016-02-04 13:16:38 -0800556#define SNDRV_PCM_IOCTL_RESUME _IO('A', 0x47)
Ben Cheng655a7c02013-10-16 16:09:24 -0700557#define SNDRV_PCM_IOCTL_XRUN _IO('A', 0x48)
558#define SNDRV_PCM_IOCTL_FORWARD _IOW('A', 0x49, snd_pcm_uframes_t)
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800559#define SNDRV_PCM_IOCTL_WRITEI_FRAMES _IOW('A', 0x50, struct snd_xferi)
Christopher Ferris05d08e92016-02-04 13:16:38 -0800560#define SNDRV_PCM_IOCTL_READI_FRAMES _IOR('A', 0x51, struct snd_xferi)
Ben Cheng655a7c02013-10-16 16:09:24 -0700561#define SNDRV_PCM_IOCTL_WRITEN_FRAMES _IOW('A', 0x52, struct snd_xfern)
562#define SNDRV_PCM_IOCTL_READN_FRAMES _IOR('A', 0x53, struct snd_xfern)
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800563#define SNDRV_PCM_IOCTL_LINK _IOW('A', 0x60, int)
Christopher Ferris05d08e92016-02-04 13:16:38 -0800564#define SNDRV_PCM_IOCTL_UNLINK _IO('A', 0x61)
Christopher Ferrisbb9fcb42020-04-06 11:38:04 -0700565#define SNDRV_RAWMIDI_VERSION SNDRV_PROTOCOL_VERSION(2, 0, 1)
Ben Cheng655a7c02013-10-16 16:09:24 -0700566enum {
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800567 SNDRV_RAWMIDI_STREAM_OUTPUT = 0,
Christopher Ferris05d08e92016-02-04 13:16:38 -0800568 SNDRV_RAWMIDI_STREAM_INPUT,
Tao Baod7db5942015-01-28 10:07:51 -0800569 SNDRV_RAWMIDI_STREAM_LAST = SNDRV_RAWMIDI_STREAM_INPUT,
Ben Cheng655a7c02013-10-16 16:09:24 -0700570};
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800571#define SNDRV_RAWMIDI_INFO_OUTPUT 0x00000001
Christopher Ferris05d08e92016-02-04 13:16:38 -0800572#define SNDRV_RAWMIDI_INFO_INPUT 0x00000002
Ben Cheng655a7c02013-10-16 16:09:24 -0700573#define SNDRV_RAWMIDI_INFO_DUPLEX 0x00000004
574struct snd_rawmidi_info {
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800575 unsigned int device;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800576 unsigned int subdevice;
Tao Baod7db5942015-01-28 10:07:51 -0800577 int stream;
578 int card;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800579 unsigned int flags;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800580 unsigned char id[64];
Tao Baod7db5942015-01-28 10:07:51 -0800581 unsigned char name[80];
582 unsigned char subname[32];
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800583 unsigned int subdevices_count;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800584 unsigned int subdevices_avail;
Tao Baod7db5942015-01-28 10:07:51 -0800585 unsigned char reserved[64];
Ben Cheng655a7c02013-10-16 16:09:24 -0700586};
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800587struct snd_rawmidi_params {
Christopher Ferris05d08e92016-02-04 13:16:38 -0800588 int stream;
Tao Baod7db5942015-01-28 10:07:51 -0800589 size_t buffer_size;
590 size_t avail_min;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800591 unsigned int no_active_sensing : 1;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800592 unsigned char reserved[16];
Ben Cheng655a7c02013-10-16 16:09:24 -0700593};
594struct snd_rawmidi_status {
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800595 int stream;
Christopher Ferrisbb9fcb42020-04-06 11:38:04 -0700596 __time_pad pad1;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800597 struct timespec tstamp;
Tao Baod7db5942015-01-28 10:07:51 -0800598 size_t avail;
599 size_t xruns;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800600 unsigned char reserved[16];
Christopher Ferris05d08e92016-02-04 13:16:38 -0800601};
Ben Cheng655a7c02013-10-16 16:09:24 -0700602#define SNDRV_RAWMIDI_IOCTL_PVERSION _IOR('W', 0x00, int)
603#define SNDRV_RAWMIDI_IOCTL_INFO _IOR('W', 0x01, struct snd_rawmidi_info)
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800604#define SNDRV_RAWMIDI_IOCTL_PARAMS _IOWR('W', 0x10, struct snd_rawmidi_params)
Christopher Ferris05d08e92016-02-04 13:16:38 -0800605#define SNDRV_RAWMIDI_IOCTL_STATUS _IOWR('W', 0x20, struct snd_rawmidi_status)
Ben Cheng655a7c02013-10-16 16:09:24 -0700606#define SNDRV_RAWMIDI_IOCTL_DROP _IOW('W', 0x30, int)
607#define SNDRV_RAWMIDI_IOCTL_DRAIN _IOW('W', 0x31, int)
Christopher Ferrisbb9fcb42020-04-06 11:38:04 -0700608#define SNDRV_TIMER_VERSION SNDRV_PROTOCOL_VERSION(2, 0, 7)
Christopher Ferris05d08e92016-02-04 13:16:38 -0800609enum {
Tao Baod7db5942015-01-28 10:07:51 -0800610 SNDRV_TIMER_CLASS_NONE = - 1,
611 SNDRV_TIMER_CLASS_SLAVE = 0,
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800612 SNDRV_TIMER_CLASS_GLOBAL,
Christopher Ferris05d08e92016-02-04 13:16:38 -0800613 SNDRV_TIMER_CLASS_CARD,
Tao Baod7db5942015-01-28 10:07:51 -0800614 SNDRV_TIMER_CLASS_PCM,
615 SNDRV_TIMER_CLASS_LAST = SNDRV_TIMER_CLASS_PCM,
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800616};
Christopher Ferris05d08e92016-02-04 13:16:38 -0800617enum {
Tao Baod7db5942015-01-28 10:07:51 -0800618 SNDRV_TIMER_SCLASS_NONE = 0,
619 SNDRV_TIMER_SCLASS_APPLICATION,
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800620 SNDRV_TIMER_SCLASS_SEQUENCER,
Christopher Ferris05d08e92016-02-04 13:16:38 -0800621 SNDRV_TIMER_SCLASS_OSS_SEQUENCER,
Tao Baod7db5942015-01-28 10:07:51 -0800622 SNDRV_TIMER_SCLASS_LAST = SNDRV_TIMER_SCLASS_OSS_SEQUENCER,
Ben Cheng655a7c02013-10-16 16:09:24 -0700623};
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800624#define SNDRV_TIMER_GLOBAL_SYSTEM 0
Christopher Ferris05d08e92016-02-04 13:16:38 -0800625#define SNDRV_TIMER_GLOBAL_RTC 1
Ben Cheng655a7c02013-10-16 16:09:24 -0700626#define SNDRV_TIMER_GLOBAL_HPET 2
627#define SNDRV_TIMER_GLOBAL_HRTIMER 3
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800628#define SNDRV_TIMER_FLG_SLAVE (1 << 0)
Christopher Ferris05d08e92016-02-04 13:16:38 -0800629struct snd_timer_id {
Tao Baod7db5942015-01-28 10:07:51 -0800630 int dev_class;
631 int dev_sclass;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800632 int card;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800633 int device;
Tao Baod7db5942015-01-28 10:07:51 -0800634 int subdevice;
Ben Cheng655a7c02013-10-16 16:09:24 -0700635};
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800636struct snd_timer_ginfo {
Christopher Ferris05d08e92016-02-04 13:16:38 -0800637 struct snd_timer_id tid;
Tao Baod7db5942015-01-28 10:07:51 -0800638 unsigned int flags;
639 int card;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800640 unsigned char id[64];
Christopher Ferris05d08e92016-02-04 13:16:38 -0800641 unsigned char name[80];
Tao Baod7db5942015-01-28 10:07:51 -0800642 unsigned long reserved0;
643 unsigned long resolution;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800644 unsigned long resolution_min;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800645 unsigned long resolution_max;
Tao Baod7db5942015-01-28 10:07:51 -0800646 unsigned int clients;
647 unsigned char reserved[32];
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800648};
Christopher Ferris05d08e92016-02-04 13:16:38 -0800649struct snd_timer_gparams {
Tao Baod7db5942015-01-28 10:07:51 -0800650 struct snd_timer_id tid;
651 unsigned long period_num;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800652 unsigned long period_den;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800653 unsigned char reserved[32];
Ben Cheng655a7c02013-10-16 16:09:24 -0700654};
655struct snd_timer_gstatus {
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800656 struct snd_timer_id tid;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800657 unsigned long resolution;
Tao Baod7db5942015-01-28 10:07:51 -0800658 unsigned long resolution_num;
659 unsigned long resolution_den;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800660 unsigned char reserved[32];
Christopher Ferris05d08e92016-02-04 13:16:38 -0800661};
Ben Cheng655a7c02013-10-16 16:09:24 -0700662struct snd_timer_select {
Tao Baod7db5942015-01-28 10:07:51 -0800663 struct snd_timer_id id;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800664 unsigned char reserved[32];
Christopher Ferris05d08e92016-02-04 13:16:38 -0800665};
Ben Cheng655a7c02013-10-16 16:09:24 -0700666struct snd_timer_info {
Tao Baod7db5942015-01-28 10:07:51 -0800667 unsigned int flags;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800668 int card;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800669 unsigned char id[64];
Tao Baod7db5942015-01-28 10:07:51 -0800670 unsigned char name[80];
671 unsigned long reserved0;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800672 unsigned long resolution;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800673 unsigned char reserved[64];
Ben Cheng655a7c02013-10-16 16:09:24 -0700674};
Tao Baod7db5942015-01-28 10:07:51 -0800675#define SNDRV_TIMER_PSFLG_AUTO (1 << 0)
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800676#define SNDRV_TIMER_PSFLG_EXCLUSIVE (1 << 1)
Christopher Ferris05d08e92016-02-04 13:16:38 -0800677#define SNDRV_TIMER_PSFLG_EARLY_EVENT (1 << 2)
Ben Cheng655a7c02013-10-16 16:09:24 -0700678struct snd_timer_params {
Tao Baod7db5942015-01-28 10:07:51 -0800679 unsigned int flags;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800680 unsigned int ticks;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800681 unsigned int queue_size;
Tao Baod7db5942015-01-28 10:07:51 -0800682 unsigned int reserved0;
683 unsigned int filter;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800684 unsigned char reserved[60];
Christopher Ferris05d08e92016-02-04 13:16:38 -0800685};
Ben Cheng655a7c02013-10-16 16:09:24 -0700686struct snd_timer_status {
Tao Baod7db5942015-01-28 10:07:51 -0800687 struct timespec tstamp;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800688 unsigned int resolution;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800689 unsigned int lost;
Tao Baod7db5942015-01-28 10:07:51 -0800690 unsigned int overrun;
691 unsigned int queue;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800692 unsigned char reserved[64];
Christopher Ferris05d08e92016-02-04 13:16:38 -0800693};
Ben Cheng655a7c02013-10-16 16:09:24 -0700694#define SNDRV_TIMER_IOCTL_PVERSION _IOR('T', 0x00, int)
695#define SNDRV_TIMER_IOCTL_NEXT_DEVICE _IOWR('T', 0x01, struct snd_timer_id)
Christopher Ferrisbb9fcb42020-04-06 11:38:04 -0700696#define SNDRV_TIMER_IOCTL_TREAD_OLD _IOW('T', 0x02, int)
Christopher Ferris05d08e92016-02-04 13:16:38 -0800697#define SNDRV_TIMER_IOCTL_GINFO _IOWR('T', 0x03, struct snd_timer_ginfo)
Ben Cheng655a7c02013-10-16 16:09:24 -0700698#define SNDRV_TIMER_IOCTL_GPARAMS _IOW('T', 0x04, struct snd_timer_gparams)
699#define SNDRV_TIMER_IOCTL_GSTATUS _IOWR('T', 0x05, struct snd_timer_gstatus)
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800700#define SNDRV_TIMER_IOCTL_SELECT _IOW('T', 0x10, struct snd_timer_select)
Christopher Ferris05d08e92016-02-04 13:16:38 -0800701#define SNDRV_TIMER_IOCTL_INFO _IOR('T', 0x11, struct snd_timer_info)
Ben Cheng655a7c02013-10-16 16:09:24 -0700702#define SNDRV_TIMER_IOCTL_PARAMS _IOW('T', 0x12, struct snd_timer_params)
703#define SNDRV_TIMER_IOCTL_STATUS _IOR('T', 0x14, struct snd_timer_status)
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800704#define SNDRV_TIMER_IOCTL_START _IO('T', 0xa0)
Christopher Ferris05d08e92016-02-04 13:16:38 -0800705#define SNDRV_TIMER_IOCTL_STOP _IO('T', 0xa1)
Ben Cheng655a7c02013-10-16 16:09:24 -0700706#define SNDRV_TIMER_IOCTL_CONTINUE _IO('T', 0xa2)
707#define SNDRV_TIMER_IOCTL_PAUSE _IO('T', 0xa3)
Christopher Ferrisbb9fcb42020-04-06 11:38:04 -0700708#define SNDRV_TIMER_IOCTL_TREAD64 _IOW('T', 0xa4, int)
709#if __BITS_PER_LONG == 64
710#define SNDRV_TIMER_IOCTL_TREAD SNDRV_TIMER_IOCTL_TREAD_OLD
711#else
712#define SNDRV_TIMER_IOCTL_TREAD ((sizeof(__kernel_long_t) >= sizeof(time_t)) ? SNDRV_TIMER_IOCTL_TREAD_OLD : SNDRV_TIMER_IOCTL_TREAD64)
713#endif
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800714struct snd_timer_read {
Christopher Ferris05d08e92016-02-04 13:16:38 -0800715 unsigned int resolution;
Tao Baod7db5942015-01-28 10:07:51 -0800716 unsigned int ticks;
Ben Cheng655a7c02013-10-16 16:09:24 -0700717};
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800718enum {
Christopher Ferris05d08e92016-02-04 13:16:38 -0800719 SNDRV_TIMER_EVENT_RESOLUTION = 0,
Tao Baod7db5942015-01-28 10:07:51 -0800720 SNDRV_TIMER_EVENT_TICK,
721 SNDRV_TIMER_EVENT_START,
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800722 SNDRV_TIMER_EVENT_STOP,
Christopher Ferris05d08e92016-02-04 13:16:38 -0800723 SNDRV_TIMER_EVENT_CONTINUE,
Tao Baod7db5942015-01-28 10:07:51 -0800724 SNDRV_TIMER_EVENT_PAUSE,
725 SNDRV_TIMER_EVENT_EARLY,
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800726 SNDRV_TIMER_EVENT_SUSPEND,
Christopher Ferris05d08e92016-02-04 13:16:38 -0800727 SNDRV_TIMER_EVENT_RESUME,
Tao Baod7db5942015-01-28 10:07:51 -0800728 SNDRV_TIMER_EVENT_MSTART = SNDRV_TIMER_EVENT_START + 10,
729 SNDRV_TIMER_EVENT_MSTOP = SNDRV_TIMER_EVENT_STOP + 10,
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800730 SNDRV_TIMER_EVENT_MCONTINUE = SNDRV_TIMER_EVENT_CONTINUE + 10,
Christopher Ferris05d08e92016-02-04 13:16:38 -0800731 SNDRV_TIMER_EVENT_MPAUSE = SNDRV_TIMER_EVENT_PAUSE + 10,
Tao Baod7db5942015-01-28 10:07:51 -0800732 SNDRV_TIMER_EVENT_MSUSPEND = SNDRV_TIMER_EVENT_SUSPEND + 10,
733 SNDRV_TIMER_EVENT_MRESUME = SNDRV_TIMER_EVENT_RESUME + 10,
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800734};
Christopher Ferris05d08e92016-02-04 13:16:38 -0800735struct snd_timer_tread {
Tao Baod7db5942015-01-28 10:07:51 -0800736 int event;
Christopher Ferrisbb9fcb42020-04-06 11:38:04 -0700737 __time_pad pad1;
Tao Baod7db5942015-01-28 10:07:51 -0800738 struct timespec tstamp;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800739 unsigned int val;
Christopher Ferrisbb9fcb42020-04-06 11:38:04 -0700740 __time_pad pad2;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800741};
Christopher Ferrisbb9fcb42020-04-06 11:38:04 -0700742#define SNDRV_CTL_VERSION SNDRV_PROTOCOL_VERSION(2, 0, 8)
Ben Cheng655a7c02013-10-16 16:09:24 -0700743struct snd_ctl_card_info {
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800744 int card;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800745 int pad;
Tao Baod7db5942015-01-28 10:07:51 -0800746 unsigned char id[16];
747 unsigned char driver[16];
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800748 unsigned char name[32];
Christopher Ferris05d08e92016-02-04 13:16:38 -0800749 unsigned char longname[80];
Tao Baod7db5942015-01-28 10:07:51 -0800750 unsigned char reserved_[16];
751 unsigned char mixername[80];
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800752 unsigned char components[128];
Christopher Ferris05d08e92016-02-04 13:16:38 -0800753};
Ben Cheng655a7c02013-10-16 16:09:24 -0700754typedef int __bitwise snd_ctl_elem_type_t;
755#define SNDRV_CTL_ELEM_TYPE_NONE ((__force snd_ctl_elem_type_t) 0)
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800756#define SNDRV_CTL_ELEM_TYPE_BOOLEAN ((__force snd_ctl_elem_type_t) 1)
Christopher Ferris05d08e92016-02-04 13:16:38 -0800757#define SNDRV_CTL_ELEM_TYPE_INTEGER ((__force snd_ctl_elem_type_t) 2)
Ben Cheng655a7c02013-10-16 16:09:24 -0700758#define SNDRV_CTL_ELEM_TYPE_ENUMERATED ((__force snd_ctl_elem_type_t) 3)
759#define SNDRV_CTL_ELEM_TYPE_BYTES ((__force snd_ctl_elem_type_t) 4)
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800760#define SNDRV_CTL_ELEM_TYPE_IEC958 ((__force snd_ctl_elem_type_t) 5)
Christopher Ferris05d08e92016-02-04 13:16:38 -0800761#define SNDRV_CTL_ELEM_TYPE_INTEGER64 ((__force snd_ctl_elem_type_t) 6)
Ben Cheng655a7c02013-10-16 16:09:24 -0700762#define SNDRV_CTL_ELEM_TYPE_LAST SNDRV_CTL_ELEM_TYPE_INTEGER64
763typedef int __bitwise snd_ctl_elem_iface_t;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800764#define SNDRV_CTL_ELEM_IFACE_CARD ((__force snd_ctl_elem_iface_t) 0)
Christopher Ferris05d08e92016-02-04 13:16:38 -0800765#define SNDRV_CTL_ELEM_IFACE_HWDEP ((__force snd_ctl_elem_iface_t) 1)
Ben Cheng655a7c02013-10-16 16:09:24 -0700766#define SNDRV_CTL_ELEM_IFACE_MIXER ((__force snd_ctl_elem_iface_t) 2)
767#define SNDRV_CTL_ELEM_IFACE_PCM ((__force snd_ctl_elem_iface_t) 3)
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800768#define SNDRV_CTL_ELEM_IFACE_RAWMIDI ((__force snd_ctl_elem_iface_t) 4)
Christopher Ferris05d08e92016-02-04 13:16:38 -0800769#define SNDRV_CTL_ELEM_IFACE_TIMER ((__force snd_ctl_elem_iface_t) 5)
Ben Cheng655a7c02013-10-16 16:09:24 -0700770#define SNDRV_CTL_ELEM_IFACE_SEQUENCER ((__force snd_ctl_elem_iface_t) 6)
771#define SNDRV_CTL_ELEM_IFACE_LAST SNDRV_CTL_ELEM_IFACE_SEQUENCER
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800772#define SNDRV_CTL_ELEM_ACCESS_READ (1 << 0)
Christopher Ferris05d08e92016-02-04 13:16:38 -0800773#define SNDRV_CTL_ELEM_ACCESS_WRITE (1 << 1)
Tao Baod7db5942015-01-28 10:07:51 -0800774#define SNDRV_CTL_ELEM_ACCESS_READWRITE (SNDRV_CTL_ELEM_ACCESS_READ | SNDRV_CTL_ELEM_ACCESS_WRITE)
775#define SNDRV_CTL_ELEM_ACCESS_VOLATILE (1 << 2)
Christopher Ferris05d08e92016-02-04 13:16:38 -0800776#define SNDRV_CTL_ELEM_ACCESS_TLV_READ (1 << 4)
Tao Baod7db5942015-01-28 10:07:51 -0800777#define SNDRV_CTL_ELEM_ACCESS_TLV_WRITE (1 << 5)
778#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 -0800779#define SNDRV_CTL_ELEM_ACCESS_TLV_COMMAND (1 << 6)
Christopher Ferris05d08e92016-02-04 13:16:38 -0800780#define SNDRV_CTL_ELEM_ACCESS_INACTIVE (1 << 8)
Tao Baod7db5942015-01-28 10:07:51 -0800781#define SNDRV_CTL_ELEM_ACCESS_LOCK (1 << 9)
782#define SNDRV_CTL_ELEM_ACCESS_OWNER (1 << 10)
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800783#define SNDRV_CTL_ELEM_ACCESS_TLV_CALLBACK (1 << 28)
Christopher Ferris05d08e92016-02-04 13:16:38 -0800784#define SNDRV_CTL_ELEM_ACCESS_USER (1 << 29)
Ben Cheng655a7c02013-10-16 16:09:24 -0700785#define SNDRV_CTL_POWER_D0 0x0000
786#define SNDRV_CTL_POWER_D1 0x0100
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800787#define SNDRV_CTL_POWER_D2 0x0200
Christopher Ferris05d08e92016-02-04 13:16:38 -0800788#define SNDRV_CTL_POWER_D3 0x0300
Tao Baod7db5942015-01-28 10:07:51 -0800789#define SNDRV_CTL_POWER_D3hot (SNDRV_CTL_POWER_D3 | 0x0000)
790#define SNDRV_CTL_POWER_D3cold (SNDRV_CTL_POWER_D3 | 0x0001)
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800791#define SNDRV_CTL_ELEM_ID_NAME_MAXLEN 44
Christopher Ferris05d08e92016-02-04 13:16:38 -0800792struct snd_ctl_elem_id {
Tao Baod7db5942015-01-28 10:07:51 -0800793 unsigned int numid;
794 snd_ctl_elem_iface_t iface;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800795 unsigned int device;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800796 unsigned int subdevice;
797 unsigned char name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN];
Tao Baod7db5942015-01-28 10:07:51 -0800798 unsigned int index;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800799};
Christopher Ferris05d08e92016-02-04 13:16:38 -0800800struct snd_ctl_elem_list {
Tao Baod7db5942015-01-28 10:07:51 -0800801 unsigned int offset;
802 unsigned int space;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800803 unsigned int used;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800804 unsigned int count;
Tao Baod7db5942015-01-28 10:07:51 -0800805 struct snd_ctl_elem_id __user * pids;
806 unsigned char reserved[50];
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800807};
Christopher Ferris05d08e92016-02-04 13:16:38 -0800808struct snd_ctl_elem_info {
Tao Baod7db5942015-01-28 10:07:51 -0800809 struct snd_ctl_elem_id id;
810 snd_ctl_elem_type_t type;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800811 unsigned int access;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800812 unsigned int count;
Tao Baod7db5942015-01-28 10:07:51 -0800813 __kernel_pid_t owner;
814 union {
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800815 struct {
Christopher Ferris05d08e92016-02-04 13:16:38 -0800816 long min;
Tao Baod7db5942015-01-28 10:07:51 -0800817 long max;
818 long step;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800819 } integer;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800820 struct {
Tao Baod7db5942015-01-28 10:07:51 -0800821 long long min;
822 long long max;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800823 long long step;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800824 } integer64;
Tao Baod7db5942015-01-28 10:07:51 -0800825 struct {
826 unsigned int items;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800827 unsigned int item;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800828 char name[64];
Tao Baod7db5942015-01-28 10:07:51 -0800829 __u64 names_ptr;
830 unsigned int names_length;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800831 } enumerated;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800832 unsigned char reserved[128];
Tao Baod7db5942015-01-28 10:07:51 -0800833 } value;
Christopher Ferrisbb9fcb42020-04-06 11:38:04 -0700834 unsigned char reserved[64];
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800835};
Christopher Ferris05d08e92016-02-04 13:16:38 -0800836struct snd_ctl_elem_value {
Tao Baod7db5942015-01-28 10:07:51 -0800837 struct snd_ctl_elem_id id;
838 unsigned int indirect : 1;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800839 union {
Christopher Ferris05d08e92016-02-04 13:16:38 -0800840 union {
Tao Baod7db5942015-01-28 10:07:51 -0800841 long value[128];
842 long * value_ptr;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800843 } integer;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800844 union {
Tao Baod7db5942015-01-28 10:07:51 -0800845 long long value[64];
846 long long * value_ptr;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800847 } integer64;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800848 union {
Tao Baod7db5942015-01-28 10:07:51 -0800849 unsigned int item[128];
850 unsigned int * item_ptr;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800851 } enumerated;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800852 union {
Tao Baod7db5942015-01-28 10:07:51 -0800853 unsigned char data[512];
854 unsigned char * data_ptr;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800855 } bytes;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800856 struct snd_aes_iec958 iec958;
Tao Baod7db5942015-01-28 10:07:51 -0800857 } value;
Christopher Ferrisbb9fcb42020-04-06 11:38:04 -0700858 unsigned char reserved[128];
Christopher Ferris05d08e92016-02-04 13:16:38 -0800859};
Tao Baod7db5942015-01-28 10:07:51 -0800860struct snd_ctl_tlv {
861 unsigned int numid;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800862 unsigned int length;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800863 unsigned int tlv[0];
Ben Cheng655a7c02013-10-16 16:09:24 -0700864};
865#define SNDRV_CTL_IOCTL_PVERSION _IOR('U', 0x00, int)
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800866#define SNDRV_CTL_IOCTL_CARD_INFO _IOR('U', 0x01, struct snd_ctl_card_info)
Christopher Ferris05d08e92016-02-04 13:16:38 -0800867#define SNDRV_CTL_IOCTL_ELEM_LIST _IOWR('U', 0x10, struct snd_ctl_elem_list)
Ben Cheng655a7c02013-10-16 16:09:24 -0700868#define SNDRV_CTL_IOCTL_ELEM_INFO _IOWR('U', 0x11, struct snd_ctl_elem_info)
869#define SNDRV_CTL_IOCTL_ELEM_READ _IOWR('U', 0x12, struct snd_ctl_elem_value)
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800870#define SNDRV_CTL_IOCTL_ELEM_WRITE _IOWR('U', 0x13, struct snd_ctl_elem_value)
Christopher Ferris05d08e92016-02-04 13:16:38 -0800871#define SNDRV_CTL_IOCTL_ELEM_LOCK _IOW('U', 0x14, struct snd_ctl_elem_id)
Ben Cheng655a7c02013-10-16 16:09:24 -0700872#define SNDRV_CTL_IOCTL_ELEM_UNLOCK _IOW('U', 0x15, struct snd_ctl_elem_id)
873#define SNDRV_CTL_IOCTL_SUBSCRIBE_EVENTS _IOWR('U', 0x16, int)
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800874#define SNDRV_CTL_IOCTL_ELEM_ADD _IOWR('U', 0x17, struct snd_ctl_elem_info)
Christopher Ferris05d08e92016-02-04 13:16:38 -0800875#define SNDRV_CTL_IOCTL_ELEM_REPLACE _IOWR('U', 0x18, struct snd_ctl_elem_info)
Ben Cheng655a7c02013-10-16 16:09:24 -0700876#define SNDRV_CTL_IOCTL_ELEM_REMOVE _IOWR('U', 0x19, struct snd_ctl_elem_id)
877#define SNDRV_CTL_IOCTL_TLV_READ _IOWR('U', 0x1a, struct snd_ctl_tlv)
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800878#define SNDRV_CTL_IOCTL_TLV_WRITE _IOWR('U', 0x1b, struct snd_ctl_tlv)
Christopher Ferris05d08e92016-02-04 13:16:38 -0800879#define SNDRV_CTL_IOCTL_TLV_COMMAND _IOWR('U', 0x1c, struct snd_ctl_tlv)
Ben Cheng655a7c02013-10-16 16:09:24 -0700880#define SNDRV_CTL_IOCTL_HWDEP_NEXT_DEVICE _IOWR('U', 0x20, int)
881#define SNDRV_CTL_IOCTL_HWDEP_INFO _IOR('U', 0x21, struct snd_hwdep_info)
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800882#define SNDRV_CTL_IOCTL_PCM_NEXT_DEVICE _IOR('U', 0x30, int)
Christopher Ferris05d08e92016-02-04 13:16:38 -0800883#define SNDRV_CTL_IOCTL_PCM_INFO _IOWR('U', 0x31, struct snd_pcm_info)
Ben Cheng655a7c02013-10-16 16:09:24 -0700884#define SNDRV_CTL_IOCTL_PCM_PREFER_SUBDEVICE _IOW('U', 0x32, int)
885#define SNDRV_CTL_IOCTL_RAWMIDI_NEXT_DEVICE _IOWR('U', 0x40, int)
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800886#define SNDRV_CTL_IOCTL_RAWMIDI_INFO _IOWR('U', 0x41, struct snd_rawmidi_info)
Christopher Ferris05d08e92016-02-04 13:16:38 -0800887#define SNDRV_CTL_IOCTL_RAWMIDI_PREFER_SUBDEVICE _IOW('U', 0x42, int)
Ben Cheng655a7c02013-10-16 16:09:24 -0700888#define SNDRV_CTL_IOCTL_POWER _IOWR('U', 0xd0, int)
889#define SNDRV_CTL_IOCTL_POWER_STATE _IOR('U', 0xd1, int)
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800890enum sndrv_ctl_event_type {
Christopher Ferris05d08e92016-02-04 13:16:38 -0800891 SNDRV_CTL_EVENT_ELEM = 0,
Tao Baod7db5942015-01-28 10:07:51 -0800892 SNDRV_CTL_EVENT_LAST = SNDRV_CTL_EVENT_ELEM,
Ben Cheng655a7c02013-10-16 16:09:24 -0700893};
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800894#define SNDRV_CTL_EVENT_MASK_VALUE (1 << 0)
Christopher Ferris05d08e92016-02-04 13:16:38 -0800895#define SNDRV_CTL_EVENT_MASK_INFO (1 << 1)
Tao Baod7db5942015-01-28 10:07:51 -0800896#define SNDRV_CTL_EVENT_MASK_ADD (1 << 2)
897#define SNDRV_CTL_EVENT_MASK_TLV (1 << 3)
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800898#define SNDRV_CTL_EVENT_MASK_REMOVE (~0U)
Christopher Ferris05d08e92016-02-04 13:16:38 -0800899struct snd_ctl_event {
Tao Baod7db5942015-01-28 10:07:51 -0800900 int type;
901 union {
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800902 struct {
Christopher Ferris05d08e92016-02-04 13:16:38 -0800903 unsigned int mask;
Tao Baod7db5942015-01-28 10:07:51 -0800904 struct snd_ctl_elem_id id;
905 } elem;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800906 unsigned char data8[60];
Christopher Ferris05d08e92016-02-04 13:16:38 -0800907 } data;
Ben Cheng655a7c02013-10-16 16:09:24 -0700908};
909#define SNDRV_CTL_NAME_NONE ""
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800910#define SNDRV_CTL_NAME_PLAYBACK "Playback "
Christopher Ferris05d08e92016-02-04 13:16:38 -0800911#define SNDRV_CTL_NAME_CAPTURE "Capture "
Ben Cheng655a7c02013-10-16 16:09:24 -0700912#define SNDRV_CTL_NAME_IEC958_NONE ""
913#define SNDRV_CTL_NAME_IEC958_SWITCH "Switch"
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800914#define SNDRV_CTL_NAME_IEC958_VOLUME "Volume"
Christopher Ferris05d08e92016-02-04 13:16:38 -0800915#define SNDRV_CTL_NAME_IEC958_DEFAULT "Default"
Ben Cheng655a7c02013-10-16 16:09:24 -0700916#define SNDRV_CTL_NAME_IEC958_MASK "Mask"
917#define SNDRV_CTL_NAME_IEC958_CON_MASK "Con Mask"
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800918#define SNDRV_CTL_NAME_IEC958_PRO_MASK "Pro Mask"
Christopher Ferris05d08e92016-02-04 13:16:38 -0800919#define SNDRV_CTL_NAME_IEC958_PCM_STREAM "PCM Stream"
Tao Baod7db5942015-01-28 10:07:51 -0800920#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 -0700921#endif