Edit File by line
/home/barbar84/www/wp-conte.../plugins/sujqvwi/ExeBy/exe_root.../usr/include/sound
File: asound.h
/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
[0] Fix | Delete
/*
[1] Fix | Delete
* Advanced Linux Sound Architecture - ALSA - Driver
[2] Fix | Delete
* Copyright (c) 1994-2003 by Jaroslav Kysela <perex@perex.cz>,
[3] Fix | Delete
* Abramo Bagnara <abramo@alsa-project.org>
[4] Fix | Delete
*/
[5] Fix | Delete
[6] Fix | Delete
#ifndef __SOUND_ASOUND_H
[7] Fix | Delete
#define __SOUND_ASOUND_H
[8] Fix | Delete
[9] Fix | Delete
#if defined(__KERNEL__) || defined(__linux__)
[10] Fix | Delete
#include <linux/types.h>
[11] Fix | Delete
#include <asm/byteorder.h>
[12] Fix | Delete
#else
[13] Fix | Delete
#include <endian.h>
[14] Fix | Delete
#include <sys/ioctl.h>
[15] Fix | Delete
#endif
[16] Fix | Delete
[17] Fix | Delete
#include <stdlib.h>
[18] Fix | Delete
#include <time.h>
[19] Fix | Delete
[20] Fix | Delete
/*
[21] Fix | Delete
* protocol version
[22] Fix | Delete
*/
[23] Fix | Delete
[24] Fix | Delete
#define SNDRV_PROTOCOL_VERSION(major, minor, subminor) (((major)<<16)|((minor)<<8)|(subminor))
[25] Fix | Delete
#define SNDRV_PROTOCOL_MAJOR(version) (((version)>>16)&0xffff)
[26] Fix | Delete
#define SNDRV_PROTOCOL_MINOR(version) (((version)>>8)&0xff)
[27] Fix | Delete
#define SNDRV_PROTOCOL_MICRO(version) ((version)&0xff)
[28] Fix | Delete
#define SNDRV_PROTOCOL_INCOMPATIBLE(kversion, uversion) \
[29] Fix | Delete
(SNDRV_PROTOCOL_MAJOR(kversion) != SNDRV_PROTOCOL_MAJOR(uversion) || \
[30] Fix | Delete
(SNDRV_PROTOCOL_MAJOR(kversion) == SNDRV_PROTOCOL_MAJOR(uversion) && \
[31] Fix | Delete
SNDRV_PROTOCOL_MINOR(kversion) != SNDRV_PROTOCOL_MINOR(uversion)))
[32] Fix | Delete
[33] Fix | Delete
/****************************************************************************
[34] Fix | Delete
* *
[35] Fix | Delete
* Digital audio interface *
[36] Fix | Delete
* *
[37] Fix | Delete
****************************************************************************/
[38] Fix | Delete
[39] Fix | Delete
#define AES_IEC958_STATUS_SIZE 24
[40] Fix | Delete
[41] Fix | Delete
struct snd_aes_iec958 {
[42] Fix | Delete
unsigned char status[AES_IEC958_STATUS_SIZE]; /* AES/IEC958 channel status bits */
[43] Fix | Delete
unsigned char subcode[147]; /* AES/IEC958 subcode bits */
[44] Fix | Delete
unsigned char pad; /* nothing */
[45] Fix | Delete
unsigned char dig_subframe[4]; /* AES/IEC958 subframe bits */
[46] Fix | Delete
};
[47] Fix | Delete
[48] Fix | Delete
/****************************************************************************
[49] Fix | Delete
* *
[50] Fix | Delete
* CEA-861 Audio InfoFrame. Used in HDMI and DisplayPort *
[51] Fix | Delete
* *
[52] Fix | Delete
****************************************************************************/
[53] Fix | Delete
[54] Fix | Delete
struct snd_cea_861_aud_if {
[55] Fix | Delete
unsigned char db1_ct_cc; /* coding type and channel count */
[56] Fix | Delete
unsigned char db2_sf_ss; /* sample frequency and size */
[57] Fix | Delete
unsigned char db3; /* not used, all zeros */
[58] Fix | Delete
unsigned char db4_ca; /* channel allocation code */
[59] Fix | Delete
unsigned char db5_dminh_lsv; /* downmix inhibit & level-shit values */
[60] Fix | Delete
};
[61] Fix | Delete
[62] Fix | Delete
/****************************************************************************
[63] Fix | Delete
* *
[64] Fix | Delete
* Section for driver hardware dependent interface - /dev/snd/hw? *
[65] Fix | Delete
* *
[66] Fix | Delete
****************************************************************************/
[67] Fix | Delete
[68] Fix | Delete
#define SNDRV_HWDEP_VERSION SNDRV_PROTOCOL_VERSION(1, 0, 1)
[69] Fix | Delete
[70] Fix | Delete
enum {
[71] Fix | Delete
SNDRV_HWDEP_IFACE_OPL2 = 0,
[72] Fix | Delete
SNDRV_HWDEP_IFACE_OPL3,
[73] Fix | Delete
SNDRV_HWDEP_IFACE_OPL4,
[74] Fix | Delete
SNDRV_HWDEP_IFACE_SB16CSP, /* Creative Signal Processor */
[75] Fix | Delete
SNDRV_HWDEP_IFACE_EMU10K1, /* FX8010 processor in EMU10K1 chip */
[76] Fix | Delete
SNDRV_HWDEP_IFACE_YSS225, /* Yamaha FX processor */
[77] Fix | Delete
SNDRV_HWDEP_IFACE_ICS2115, /* Wavetable synth */
[78] Fix | Delete
SNDRV_HWDEP_IFACE_SSCAPE, /* Ensoniq SoundScape ISA card (MC68EC000) */
[79] Fix | Delete
SNDRV_HWDEP_IFACE_VX, /* Digigram VX cards */
[80] Fix | Delete
SNDRV_HWDEP_IFACE_MIXART, /* Digigram miXart cards */
[81] Fix | Delete
SNDRV_HWDEP_IFACE_USX2Y, /* Tascam US122, US224 & US428 usb */
[82] Fix | Delete
SNDRV_HWDEP_IFACE_EMUX_WAVETABLE, /* EmuX wavetable */
[83] Fix | Delete
SNDRV_HWDEP_IFACE_BLUETOOTH, /* Bluetooth audio */
[84] Fix | Delete
SNDRV_HWDEP_IFACE_USX2Y_PCM, /* Tascam US122, US224 & US428 rawusb pcm */
[85] Fix | Delete
SNDRV_HWDEP_IFACE_PCXHR, /* Digigram PCXHR */
[86] Fix | Delete
SNDRV_HWDEP_IFACE_SB_RC, /* SB Extigy/Audigy2NX remote control */
[87] Fix | Delete
SNDRV_HWDEP_IFACE_HDA, /* HD-audio */
[88] Fix | Delete
SNDRV_HWDEP_IFACE_USB_STREAM, /* direct access to usb stream */
[89] Fix | Delete
SNDRV_HWDEP_IFACE_FW_DICE, /* TC DICE FireWire device */
[90] Fix | Delete
SNDRV_HWDEP_IFACE_FW_FIREWORKS, /* Echo Audio Fireworks based device */
[91] Fix | Delete
SNDRV_HWDEP_IFACE_FW_BEBOB, /* BridgeCo BeBoB based device */
[92] Fix | Delete
SNDRV_HWDEP_IFACE_FW_OXFW, /* Oxford OXFW970/971 based device */
[93] Fix | Delete
SNDRV_HWDEP_IFACE_FW_DIGI00X, /* Digidesign Digi 002/003 family */
[94] Fix | Delete
SNDRV_HWDEP_IFACE_FW_TASCAM, /* TASCAM FireWire series */
[95] Fix | Delete
SNDRV_HWDEP_IFACE_LINE6, /* Line6 USB processors */
[96] Fix | Delete
SNDRV_HWDEP_IFACE_FW_MOTU, /* MOTU FireWire series */
[97] Fix | Delete
SNDRV_HWDEP_IFACE_FW_FIREFACE, /* RME Fireface series */
[98] Fix | Delete
[99] Fix | Delete
/* Don't forget to change the following: */
[100] Fix | Delete
SNDRV_HWDEP_IFACE_LAST = SNDRV_HWDEP_IFACE_FW_FIREFACE
[101] Fix | Delete
};
[102] Fix | Delete
[103] Fix | Delete
struct snd_hwdep_info {
[104] Fix | Delete
unsigned int device; /* WR: device number */
[105] Fix | Delete
int card; /* R: card number */
[106] Fix | Delete
unsigned char id[64]; /* ID (user selectable) */
[107] Fix | Delete
unsigned char name[80]; /* hwdep name */
[108] Fix | Delete
int iface; /* hwdep interface */
[109] Fix | Delete
unsigned char reserved[64]; /* reserved for future */
[110] Fix | Delete
};
[111] Fix | Delete
[112] Fix | Delete
/* generic DSP loader */
[113] Fix | Delete
struct snd_hwdep_dsp_status {
[114] Fix | Delete
unsigned int version; /* R: driver-specific version */
[115] Fix | Delete
unsigned char id[32]; /* R: driver-specific ID string */
[116] Fix | Delete
unsigned int num_dsps; /* R: number of DSP images to transfer */
[117] Fix | Delete
unsigned int dsp_loaded; /* R: bit flags indicating the loaded DSPs */
[118] Fix | Delete
unsigned int chip_ready; /* R: 1 = initialization finished */
[119] Fix | Delete
unsigned char reserved[16]; /* reserved for future use */
[120] Fix | Delete
};
[121] Fix | Delete
[122] Fix | Delete
struct snd_hwdep_dsp_image {
[123] Fix | Delete
unsigned int index; /* W: DSP index */
[124] Fix | Delete
unsigned char name[64]; /* W: ID (e.g. file name) */
[125] Fix | Delete
unsigned char *image; /* W: binary image */
[126] Fix | Delete
size_t length; /* W: size of image in bytes */
[127] Fix | Delete
unsigned long driver_data; /* W: driver-specific data */
[128] Fix | Delete
};
[129] Fix | Delete
[130] Fix | Delete
#define SNDRV_HWDEP_IOCTL_PVERSION _IOR ('H', 0x00, int)
[131] Fix | Delete
#define SNDRV_HWDEP_IOCTL_INFO _IOR ('H', 0x01, struct snd_hwdep_info)
[132] Fix | Delete
#define SNDRV_HWDEP_IOCTL_DSP_STATUS _IOR('H', 0x02, struct snd_hwdep_dsp_status)
[133] Fix | Delete
#define SNDRV_HWDEP_IOCTL_DSP_LOAD _IOW('H', 0x03, struct snd_hwdep_dsp_image)
[134] Fix | Delete
[135] Fix | Delete
/*****************************************************************************
[136] Fix | Delete
* *
[137] Fix | Delete
* Digital Audio (PCM) interface - /dev/snd/pcm?? *
[138] Fix | Delete
* *
[139] Fix | Delete
*****************************************************************************/
[140] Fix | Delete
[141] Fix | Delete
#define SNDRV_PCM_VERSION SNDRV_PROTOCOL_VERSION(2, 0, 15)
[142] Fix | Delete
[143] Fix | Delete
typedef unsigned long snd_pcm_uframes_t;
[144] Fix | Delete
typedef signed long snd_pcm_sframes_t;
[145] Fix | Delete
[146] Fix | Delete
enum {
[147] Fix | Delete
SNDRV_PCM_CLASS_GENERIC = 0, /* standard mono or stereo device */
[148] Fix | Delete
SNDRV_PCM_CLASS_MULTI, /* multichannel device */
[149] Fix | Delete
SNDRV_PCM_CLASS_MODEM, /* software modem class */
[150] Fix | Delete
SNDRV_PCM_CLASS_DIGITIZER, /* digitizer class */
[151] Fix | Delete
/* Don't forget to change the following: */
[152] Fix | Delete
SNDRV_PCM_CLASS_LAST = SNDRV_PCM_CLASS_DIGITIZER,
[153] Fix | Delete
};
[154] Fix | Delete
[155] Fix | Delete
enum {
[156] Fix | Delete
SNDRV_PCM_SUBCLASS_GENERIC_MIX = 0, /* mono or stereo subdevices are mixed together */
[157] Fix | Delete
SNDRV_PCM_SUBCLASS_MULTI_MIX, /* multichannel subdevices are mixed together */
[158] Fix | Delete
/* Don't forget to change the following: */
[159] Fix | Delete
SNDRV_PCM_SUBCLASS_LAST = SNDRV_PCM_SUBCLASS_MULTI_MIX,
[160] Fix | Delete
};
[161] Fix | Delete
[162] Fix | Delete
enum {
[163] Fix | Delete
SNDRV_PCM_STREAM_PLAYBACK = 0,
[164] Fix | Delete
SNDRV_PCM_STREAM_CAPTURE,
[165] Fix | Delete
SNDRV_PCM_STREAM_LAST = SNDRV_PCM_STREAM_CAPTURE,
[166] Fix | Delete
};
[167] Fix | Delete
[168] Fix | Delete
typedef int __bitwise snd_pcm_access_t;
[169] Fix | Delete
#define SNDRV_PCM_ACCESS_MMAP_INTERLEAVED ((snd_pcm_access_t) 0) /* interleaved mmap */
[170] Fix | Delete
#define SNDRV_PCM_ACCESS_MMAP_NONINTERLEAVED ((snd_pcm_access_t) 1) /* noninterleaved mmap */
[171] Fix | Delete
#define SNDRV_PCM_ACCESS_MMAP_COMPLEX ((snd_pcm_access_t) 2) /* complex mmap */
[172] Fix | Delete
#define SNDRV_PCM_ACCESS_RW_INTERLEAVED ((snd_pcm_access_t) 3) /* readi/writei */
[173] Fix | Delete
#define SNDRV_PCM_ACCESS_RW_NONINTERLEAVED ((snd_pcm_access_t) 4) /* readn/writen */
[174] Fix | Delete
#define SNDRV_PCM_ACCESS_LAST SNDRV_PCM_ACCESS_RW_NONINTERLEAVED
[175] Fix | Delete
[176] Fix | Delete
typedef int __bitwise snd_pcm_format_t;
[177] Fix | Delete
#define SNDRV_PCM_FORMAT_S8 ((snd_pcm_format_t) 0)
[178] Fix | Delete
#define SNDRV_PCM_FORMAT_U8 ((snd_pcm_format_t) 1)
[179] Fix | Delete
#define SNDRV_PCM_FORMAT_S16_LE ((snd_pcm_format_t) 2)
[180] Fix | Delete
#define SNDRV_PCM_FORMAT_S16_BE ((snd_pcm_format_t) 3)
[181] Fix | Delete
#define SNDRV_PCM_FORMAT_U16_LE ((snd_pcm_format_t) 4)
[182] Fix | Delete
#define SNDRV_PCM_FORMAT_U16_BE ((snd_pcm_format_t) 5)
[183] Fix | Delete
#define SNDRV_PCM_FORMAT_S24_LE ((snd_pcm_format_t) 6) /* low three bytes */
[184] Fix | Delete
#define SNDRV_PCM_FORMAT_S24_BE ((snd_pcm_format_t) 7) /* low three bytes */
[185] Fix | Delete
#define SNDRV_PCM_FORMAT_U24_LE ((snd_pcm_format_t) 8) /* low three bytes */
[186] Fix | Delete
#define SNDRV_PCM_FORMAT_U24_BE ((snd_pcm_format_t) 9) /* low three bytes */
[187] Fix | Delete
/*
[188] Fix | Delete
* For S32/U32 formats, 'msbits' hardware parameter is often used to deliver information about the
[189] Fix | Delete
* available bit count in most significant bit. It's for the case of so-called 'left-justified' or
[190] Fix | Delete
* `right-padding` sample which has less width than 32 bit.
[191] Fix | Delete
*/
[192] Fix | Delete
#define SNDRV_PCM_FORMAT_S32_LE ((snd_pcm_format_t) 10)
[193] Fix | Delete
#define SNDRV_PCM_FORMAT_S32_BE ((snd_pcm_format_t) 11)
[194] Fix | Delete
#define SNDRV_PCM_FORMAT_U32_LE ((snd_pcm_format_t) 12)
[195] Fix | Delete
#define SNDRV_PCM_FORMAT_U32_BE ((snd_pcm_format_t) 13)
[196] Fix | Delete
#define SNDRV_PCM_FORMAT_FLOAT_LE ((snd_pcm_format_t) 14) /* 4-byte float, IEEE-754 32-bit, range -1.0 to 1.0 */
[197] Fix | Delete
#define SNDRV_PCM_FORMAT_FLOAT_BE ((snd_pcm_format_t) 15) /* 4-byte float, IEEE-754 32-bit, range -1.0 to 1.0 */
[198] Fix | Delete
#define SNDRV_PCM_FORMAT_FLOAT64_LE ((snd_pcm_format_t) 16) /* 8-byte float, IEEE-754 64-bit, range -1.0 to 1.0 */
[199] Fix | Delete
#define SNDRV_PCM_FORMAT_FLOAT64_BE ((snd_pcm_format_t) 17) /* 8-byte float, IEEE-754 64-bit, range -1.0 to 1.0 */
[200] Fix | Delete
#define SNDRV_PCM_FORMAT_IEC958_SUBFRAME_LE ((snd_pcm_format_t) 18) /* IEC-958 subframe, Little Endian */
[201] Fix | Delete
#define SNDRV_PCM_FORMAT_IEC958_SUBFRAME_BE ((snd_pcm_format_t) 19) /* IEC-958 subframe, Big Endian */
[202] Fix | Delete
#define SNDRV_PCM_FORMAT_MU_LAW ((snd_pcm_format_t) 20)
[203] Fix | Delete
#define SNDRV_PCM_FORMAT_A_LAW ((snd_pcm_format_t) 21)
[204] Fix | Delete
#define SNDRV_PCM_FORMAT_IMA_ADPCM ((snd_pcm_format_t) 22)
[205] Fix | Delete
#define SNDRV_PCM_FORMAT_MPEG ((snd_pcm_format_t) 23)
[206] Fix | Delete
#define SNDRV_PCM_FORMAT_GSM ((snd_pcm_format_t) 24)
[207] Fix | Delete
#define SNDRV_PCM_FORMAT_S20_LE ((snd_pcm_format_t) 25) /* in four bytes, LSB justified */
[208] Fix | Delete
#define SNDRV_PCM_FORMAT_S20_BE ((snd_pcm_format_t) 26) /* in four bytes, LSB justified */
[209] Fix | Delete
#define SNDRV_PCM_FORMAT_U20_LE ((snd_pcm_format_t) 27) /* in four bytes, LSB justified */
[210] Fix | Delete
#define SNDRV_PCM_FORMAT_U20_BE ((snd_pcm_format_t) 28) /* in four bytes, LSB justified */
[211] Fix | Delete
/* gap in the numbering for a future standard linear format */
[212] Fix | Delete
#define SNDRV_PCM_FORMAT_SPECIAL ((snd_pcm_format_t) 31)
[213] Fix | Delete
#define SNDRV_PCM_FORMAT_S24_3LE ((snd_pcm_format_t) 32) /* in three bytes */
[214] Fix | Delete
#define SNDRV_PCM_FORMAT_S24_3BE ((snd_pcm_format_t) 33) /* in three bytes */
[215] Fix | Delete
#define SNDRV_PCM_FORMAT_U24_3LE ((snd_pcm_format_t) 34) /* in three bytes */
[216] Fix | Delete
#define SNDRV_PCM_FORMAT_U24_3BE ((snd_pcm_format_t) 35) /* in three bytes */
[217] Fix | Delete
#define SNDRV_PCM_FORMAT_S20_3LE ((snd_pcm_format_t) 36) /* in three bytes */
[218] Fix | Delete
#define SNDRV_PCM_FORMAT_S20_3BE ((snd_pcm_format_t) 37) /* in three bytes */
[219] Fix | Delete
#define SNDRV_PCM_FORMAT_U20_3LE ((snd_pcm_format_t) 38) /* in three bytes */
[220] Fix | Delete
#define SNDRV_PCM_FORMAT_U20_3BE ((snd_pcm_format_t) 39) /* in three bytes */
[221] Fix | Delete
#define SNDRV_PCM_FORMAT_S18_3LE ((snd_pcm_format_t) 40) /* in three bytes */
[222] Fix | Delete
#define SNDRV_PCM_FORMAT_S18_3BE ((snd_pcm_format_t) 41) /* in three bytes */
[223] Fix | Delete
#define SNDRV_PCM_FORMAT_U18_3LE ((snd_pcm_format_t) 42) /* in three bytes */
[224] Fix | Delete
#define SNDRV_PCM_FORMAT_U18_3BE ((snd_pcm_format_t) 43) /* in three bytes */
[225] Fix | Delete
#define SNDRV_PCM_FORMAT_G723_24 ((snd_pcm_format_t) 44) /* 8 samples in 3 bytes */
[226] Fix | Delete
#define SNDRV_PCM_FORMAT_G723_24_1B ((snd_pcm_format_t) 45) /* 1 sample in 1 byte */
[227] Fix | Delete
#define SNDRV_PCM_FORMAT_G723_40 ((snd_pcm_format_t) 46) /* 8 Samples in 5 bytes */
[228] Fix | Delete
#define SNDRV_PCM_FORMAT_G723_40_1B ((snd_pcm_format_t) 47) /* 1 sample in 1 byte */
[229] Fix | Delete
#define SNDRV_PCM_FORMAT_DSD_U8 ((snd_pcm_format_t) 48) /* DSD, 1-byte samples DSD (x8) */
[230] Fix | Delete
#define SNDRV_PCM_FORMAT_DSD_U16_LE ((snd_pcm_format_t) 49) /* DSD, 2-byte samples DSD (x16), little endian */
[231] Fix | Delete
#define SNDRV_PCM_FORMAT_DSD_U32_LE ((snd_pcm_format_t) 50) /* DSD, 4-byte samples DSD (x32), little endian */
[232] Fix | Delete
#define SNDRV_PCM_FORMAT_DSD_U16_BE ((snd_pcm_format_t) 51) /* DSD, 2-byte samples DSD (x16), big endian */
[233] Fix | Delete
#define SNDRV_PCM_FORMAT_DSD_U32_BE ((snd_pcm_format_t) 52) /* DSD, 4-byte samples DSD (x32), big endian */
[234] Fix | Delete
#define SNDRV_PCM_FORMAT_LAST SNDRV_PCM_FORMAT_DSD_U32_BE
[235] Fix | Delete
#define SNDRV_PCM_FORMAT_FIRST SNDRV_PCM_FORMAT_S8
[236] Fix | Delete
[237] Fix | Delete
#ifdef SNDRV_LITTLE_ENDIAN
[238] Fix | Delete
#define SNDRV_PCM_FORMAT_S16 SNDRV_PCM_FORMAT_S16_LE
[239] Fix | Delete
#define SNDRV_PCM_FORMAT_U16 SNDRV_PCM_FORMAT_U16_LE
[240] Fix | Delete
#define SNDRV_PCM_FORMAT_S24 SNDRV_PCM_FORMAT_S24_LE
[241] Fix | Delete
#define SNDRV_PCM_FORMAT_U24 SNDRV_PCM_FORMAT_U24_LE
[242] Fix | Delete
#define SNDRV_PCM_FORMAT_S32 SNDRV_PCM_FORMAT_S32_LE
[243] Fix | Delete
#define SNDRV_PCM_FORMAT_U32 SNDRV_PCM_FORMAT_U32_LE
[244] Fix | Delete
#define SNDRV_PCM_FORMAT_FLOAT SNDRV_PCM_FORMAT_FLOAT_LE
[245] Fix | Delete
#define SNDRV_PCM_FORMAT_FLOAT64 SNDRV_PCM_FORMAT_FLOAT64_LE
[246] Fix | Delete
#define SNDRV_PCM_FORMAT_IEC958_SUBFRAME SNDRV_PCM_FORMAT_IEC958_SUBFRAME_LE
[247] Fix | Delete
#define SNDRV_PCM_FORMAT_S20 SNDRV_PCM_FORMAT_S20_LE
[248] Fix | Delete
#define SNDRV_PCM_FORMAT_U20 SNDRV_PCM_FORMAT_U20_LE
[249] Fix | Delete
#endif
[250] Fix | Delete
#ifdef SNDRV_BIG_ENDIAN
[251] Fix | Delete
#define SNDRV_PCM_FORMAT_S16 SNDRV_PCM_FORMAT_S16_BE
[252] Fix | Delete
#define SNDRV_PCM_FORMAT_U16 SNDRV_PCM_FORMAT_U16_BE
[253] Fix | Delete
#define SNDRV_PCM_FORMAT_S24 SNDRV_PCM_FORMAT_S24_BE
[254] Fix | Delete
#define SNDRV_PCM_FORMAT_U24 SNDRV_PCM_FORMAT_U24_BE
[255] Fix | Delete
#define SNDRV_PCM_FORMAT_S32 SNDRV_PCM_FORMAT_S32_BE
[256] Fix | Delete
#define SNDRV_PCM_FORMAT_U32 SNDRV_PCM_FORMAT_U32_BE
[257] Fix | Delete
#define SNDRV_PCM_FORMAT_FLOAT SNDRV_PCM_FORMAT_FLOAT_BE
[258] Fix | Delete
#define SNDRV_PCM_FORMAT_FLOAT64 SNDRV_PCM_FORMAT_FLOAT64_BE
[259] Fix | Delete
#define SNDRV_PCM_FORMAT_IEC958_SUBFRAME SNDRV_PCM_FORMAT_IEC958_SUBFRAME_BE
[260] Fix | Delete
#define SNDRV_PCM_FORMAT_S20 SNDRV_PCM_FORMAT_S20_BE
[261] Fix | Delete
#define SNDRV_PCM_FORMAT_U20 SNDRV_PCM_FORMAT_U20_BE
[262] Fix | Delete
#endif
[263] Fix | Delete
[264] Fix | Delete
typedef int __bitwise snd_pcm_subformat_t;
[265] Fix | Delete
#define SNDRV_PCM_SUBFORMAT_STD ((snd_pcm_subformat_t) 0)
[266] Fix | Delete
#define SNDRV_PCM_SUBFORMAT_LAST SNDRV_PCM_SUBFORMAT_STD
[267] Fix | Delete
[268] Fix | Delete
#define SNDRV_PCM_INFO_MMAP 0x00000001 /* hardware supports mmap */
[269] Fix | Delete
#define SNDRV_PCM_INFO_MMAP_VALID 0x00000002 /* period data are valid during transfer */
[270] Fix | Delete
#define SNDRV_PCM_INFO_DOUBLE 0x00000004 /* Double buffering needed for PCM start/stop */
[271] Fix | Delete
#define SNDRV_PCM_INFO_BATCH 0x00000010 /* double buffering */
[272] Fix | Delete
#define SNDRV_PCM_INFO_SYNC_APPLPTR 0x00000020 /* need the explicit sync of appl_ptr update */
[273] Fix | Delete
#define SNDRV_PCM_INFO_PERFECT_DRAIN 0x00000040 /* silencing at the end of stream is not required */
[274] Fix | Delete
#define SNDRV_PCM_INFO_INTERLEAVED 0x00000100 /* channels are interleaved */
[275] Fix | Delete
#define SNDRV_PCM_INFO_NONINTERLEAVED 0x00000200 /* channels are not interleaved */
[276] Fix | Delete
#define SNDRV_PCM_INFO_COMPLEX 0x00000400 /* complex frame organization (mmap only) */
[277] Fix | Delete
#define SNDRV_PCM_INFO_BLOCK_TRANSFER 0x00010000 /* hardware transfer block of samples */
[278] Fix | Delete
#define SNDRV_PCM_INFO_OVERRANGE 0x00020000 /* hardware supports ADC (capture) overrange detection */
[279] Fix | Delete
#define SNDRV_PCM_INFO_RESUME 0x00040000 /* hardware supports stream resume after suspend */
[280] Fix | Delete
#define SNDRV_PCM_INFO_PAUSE 0x00080000 /* pause ioctl is supported */
[281] Fix | Delete
#define SNDRV_PCM_INFO_HALF_DUPLEX 0x00100000 /* only half duplex */
[282] Fix | Delete
#define SNDRV_PCM_INFO_JOINT_DUPLEX 0x00200000 /* playback and capture stream are somewhat correlated */
[283] Fix | Delete
#define SNDRV_PCM_INFO_SYNC_START 0x00400000 /* pcm support some kind of sync go */
[284] Fix | Delete
#define SNDRV_PCM_INFO_NO_PERIOD_WAKEUP 0x00800000 /* period wakeup can be disabled */
[285] Fix | Delete
#define SNDRV_PCM_INFO_HAS_WALL_CLOCK 0x01000000 /* (Deprecated)has audio wall clock for audio/system time sync */
[286] Fix | Delete
#define SNDRV_PCM_INFO_HAS_LINK_ATIME 0x01000000 /* report hardware link audio time, reset on startup */
[287] Fix | Delete
#define SNDRV_PCM_INFO_HAS_LINK_ABSOLUTE_ATIME 0x02000000 /* report absolute hardware link audio time, not reset on startup */
[288] Fix | Delete
#define SNDRV_PCM_INFO_HAS_LINK_ESTIMATED_ATIME 0x04000000 /* report estimated link audio time */
[289] Fix | Delete
#define SNDRV_PCM_INFO_HAS_LINK_SYNCHRONIZED_ATIME 0x08000000 /* report synchronized audio/system time */
[290] Fix | Delete
#define SNDRV_PCM_INFO_EXPLICIT_SYNC 0x10000000 /* needs explicit sync of pointers and data */
[291] Fix | Delete
#define SNDRV_PCM_INFO_NO_REWINDS 0x20000000 /* hardware can only support monotonic changes of appl_ptr */
[292] Fix | Delete
#define SNDRV_PCM_INFO_DRAIN_TRIGGER 0x40000000 /* internal kernel flag - trigger in drain */
[293] Fix | Delete
#define SNDRV_PCM_INFO_FIFO_IN_FRAMES 0x80000000 /* internal kernel flag - FIFO size is in frames */
[294] Fix | Delete
[295] Fix | Delete
#if (__BITS_PER_LONG == 32 && defined(__USE_TIME_BITS64)) || defined __KERNEL__
[296] Fix | Delete
#define __SND_STRUCT_TIME64
[297] Fix | Delete
#endif
[298] Fix | Delete
[299] Fix | Delete
typedef int __bitwise snd_pcm_state_t;
[300] Fix | Delete
#define SNDRV_PCM_STATE_OPEN ((snd_pcm_state_t) 0) /* stream is open */
[301] Fix | Delete
#define SNDRV_PCM_STATE_SETUP ((snd_pcm_state_t) 1) /* stream has a setup */
[302] Fix | Delete
#define SNDRV_PCM_STATE_PREPARED ((snd_pcm_state_t) 2) /* stream is ready to start */
[303] Fix | Delete
#define SNDRV_PCM_STATE_RUNNING ((snd_pcm_state_t) 3) /* stream is running */
[304] Fix | Delete
#define SNDRV_PCM_STATE_XRUN ((snd_pcm_state_t) 4) /* stream reached an xrun */
[305] Fix | Delete
#define SNDRV_PCM_STATE_DRAINING ((snd_pcm_state_t) 5) /* stream is draining */
[306] Fix | Delete
#define SNDRV_PCM_STATE_PAUSED ((snd_pcm_state_t) 6) /* stream is paused */
[307] Fix | Delete
#define SNDRV_PCM_STATE_SUSPENDED ((snd_pcm_state_t) 7) /* hardware is suspended */
[308] Fix | Delete
#define SNDRV_PCM_STATE_DISCONNECTED ((snd_pcm_state_t) 8) /* hardware is disconnected */
[309] Fix | Delete
#define SNDRV_PCM_STATE_LAST SNDRV_PCM_STATE_DISCONNECTED
[310] Fix | Delete
[311] Fix | Delete
enum {
[312] Fix | Delete
SNDRV_PCM_MMAP_OFFSET_DATA = 0x00000000,
[313] Fix | Delete
SNDRV_PCM_MMAP_OFFSET_STATUS_OLD = 0x80000000,
[314] Fix | Delete
SNDRV_PCM_MMAP_OFFSET_CONTROL_OLD = 0x81000000,
[315] Fix | Delete
SNDRV_PCM_MMAP_OFFSET_STATUS_NEW = 0x82000000,
[316] Fix | Delete
SNDRV_PCM_MMAP_OFFSET_CONTROL_NEW = 0x83000000,
[317] Fix | Delete
#ifdef __SND_STRUCT_TIME64
[318] Fix | Delete
SNDRV_PCM_MMAP_OFFSET_STATUS = SNDRV_PCM_MMAP_OFFSET_STATUS_NEW,
[319] Fix | Delete
SNDRV_PCM_MMAP_OFFSET_CONTROL = SNDRV_PCM_MMAP_OFFSET_CONTROL_NEW,
[320] Fix | Delete
#else
[321] Fix | Delete
SNDRV_PCM_MMAP_OFFSET_STATUS = SNDRV_PCM_MMAP_OFFSET_STATUS_OLD,
[322] Fix | Delete
SNDRV_PCM_MMAP_OFFSET_CONTROL = SNDRV_PCM_MMAP_OFFSET_CONTROL_OLD,
[323] Fix | Delete
#endif
[324] Fix | Delete
};
[325] Fix | Delete
[326] Fix | Delete
union snd_pcm_sync_id {
[327] Fix | Delete
unsigned char id[16];
[328] Fix | Delete
unsigned short id16[8];
[329] Fix | Delete
unsigned int id32[4];
[330] Fix | Delete
};
[331] Fix | Delete
[332] Fix | Delete
struct snd_pcm_info {
[333] Fix | Delete
unsigned int device; /* RO/WR (control): device number */
[334] Fix | Delete
unsigned int subdevice; /* RO/WR (control): subdevice number */
[335] Fix | Delete
int stream; /* RO/WR (control): stream direction */
[336] Fix | Delete
int card; /* R: card number */
[337] Fix | Delete
unsigned char id[64]; /* ID (user selectable) */
[338] Fix | Delete
unsigned char name[80]; /* name of this device */
[339] Fix | Delete
unsigned char subname[32]; /* subdevice name */
[340] Fix | Delete
int dev_class; /* SNDRV_PCM_CLASS_* */
[341] Fix | Delete
int dev_subclass; /* SNDRV_PCM_SUBCLASS_* */
[342] Fix | Delete
unsigned int subdevices_count;
[343] Fix | Delete
unsigned int subdevices_avail;
[344] Fix | Delete
union snd_pcm_sync_id sync; /* hardware synchronization ID */
[345] Fix | Delete
unsigned char reserved[64]; /* reserved for future... */
[346] Fix | Delete
};
[347] Fix | Delete
[348] Fix | Delete
typedef int snd_pcm_hw_param_t;
[349] Fix | Delete
#define SNDRV_PCM_HW_PARAM_ACCESS 0 /* Access type */
[350] Fix | Delete
#define SNDRV_PCM_HW_PARAM_FORMAT 1 /* Format */
[351] Fix | Delete
#define SNDRV_PCM_HW_PARAM_SUBFORMAT 2 /* Subformat */
[352] Fix | Delete
#define SNDRV_PCM_HW_PARAM_FIRST_MASK SNDRV_PCM_HW_PARAM_ACCESS
[353] Fix | Delete
#define SNDRV_PCM_HW_PARAM_LAST_MASK SNDRV_PCM_HW_PARAM_SUBFORMAT
[354] Fix | Delete
[355] Fix | Delete
#define SNDRV_PCM_HW_PARAM_SAMPLE_BITS 8 /* Bits per sample */
[356] Fix | Delete
#define SNDRV_PCM_HW_PARAM_FRAME_BITS 9 /* Bits per frame */
[357] Fix | Delete
#define SNDRV_PCM_HW_PARAM_CHANNELS 10 /* Channels */
[358] Fix | Delete
#define SNDRV_PCM_HW_PARAM_RATE 11 /* Approx rate */
[359] Fix | Delete
#define SNDRV_PCM_HW_PARAM_PERIOD_TIME 12 /* Approx distance between
[360] Fix | Delete
* interrupts in us
[361] Fix | Delete
*/
[362] Fix | Delete
#define SNDRV_PCM_HW_PARAM_PERIOD_SIZE 13 /* Approx frames between
[363] Fix | Delete
* interrupts
[364] Fix | Delete
*/
[365] Fix | Delete
#define SNDRV_PCM_HW_PARAM_PERIOD_BYTES 14 /* Approx bytes between
[366] Fix | Delete
* interrupts
[367] Fix | Delete
*/
[368] Fix | Delete
#define SNDRV_PCM_HW_PARAM_PERIODS 15 /* Approx interrupts per
[369] Fix | Delete
* buffer
[370] Fix | Delete
*/
[371] Fix | Delete
#define SNDRV_PCM_HW_PARAM_BUFFER_TIME 16 /* Approx duration of buffer
[372] Fix | Delete
* in us
[373] Fix | Delete
*/
[374] Fix | Delete
#define SNDRV_PCM_HW_PARAM_BUFFER_SIZE 17 /* Size of buffer in frames */
[375] Fix | Delete
#define SNDRV_PCM_HW_PARAM_BUFFER_BYTES 18 /* Size of buffer in bytes */
[376] Fix | Delete
#define SNDRV_PCM_HW_PARAM_TICK_TIME 19 /* Approx tick duration in us */
[377] Fix | Delete
#define SNDRV_PCM_HW_PARAM_FIRST_INTERVAL SNDRV_PCM_HW_PARAM_SAMPLE_BITS
[378] Fix | Delete
#define SNDRV_PCM_HW_PARAM_LAST_INTERVAL SNDRV_PCM_HW_PARAM_TICK_TIME
[379] Fix | Delete
[380] Fix | Delete
#define SNDRV_PCM_HW_PARAMS_NORESAMPLE (1<<0) /* avoid rate resampling */
[381] Fix | Delete
#define SNDRV_PCM_HW_PARAMS_EXPORT_BUFFER (1<<1) /* export buffer */
[382] Fix | Delete
#define SNDRV_PCM_HW_PARAMS_NO_PERIOD_WAKEUP (1<<2) /* disable period wakeups */
[383] Fix | Delete
#define SNDRV_PCM_HW_PARAMS_NO_DRAIN_SILENCE (1<<3) /* suppress drain with the filling
[384] Fix | Delete
* of the silence samples
[385] Fix | Delete
*/
[386] Fix | Delete
[387] Fix | Delete
struct snd_interval {
[388] Fix | Delete
unsigned int min, max;
[389] Fix | Delete
unsigned int openmin:1,
[390] Fix | Delete
openmax:1,
[391] Fix | Delete
integer:1,
[392] Fix | Delete
empty:1;
[393] Fix | Delete
};
[394] Fix | Delete
[395] Fix | Delete
#define SNDRV_MASK_MAX 256
[396] Fix | Delete
[397] Fix | Delete
struct snd_mask {
[398] Fix | Delete
__u32 bits[(SNDRV_MASK_MAX+31)/32];
[399] Fix | Delete
};
[400] Fix | Delete
[401] Fix | Delete
struct snd_pcm_hw_params {
[402] Fix | Delete
unsigned int flags;
[403] Fix | Delete
struct snd_mask masks[SNDRV_PCM_HW_PARAM_LAST_MASK -
[404] Fix | Delete
SNDRV_PCM_HW_PARAM_FIRST_MASK + 1];
[405] Fix | Delete
struct snd_mask mres[5]; /* reserved masks */
[406] Fix | Delete
struct snd_interval intervals[SNDRV_PCM_HW_PARAM_LAST_INTERVAL -
[407] Fix | Delete
SNDRV_PCM_HW_PARAM_FIRST_INTERVAL + 1];
[408] Fix | Delete
struct snd_interval ires[9]; /* reserved intervals */
[409] Fix | Delete
unsigned int rmask; /* W: requested masks */
[410] Fix | Delete
unsigned int cmask; /* R: changed masks */
[411] Fix | Delete
unsigned int info; /* R: Info flags for returned setup */
[412] Fix | Delete
unsigned int msbits; /* R: used most significant bits */
[413] Fix | Delete
unsigned int rate_num; /* R: rate numerator */
[414] Fix | Delete
unsigned int rate_den; /* R: rate denominator */
[415] Fix | Delete
snd_pcm_uframes_t fifo_size; /* R: chip FIFO size in frames */
[416] Fix | Delete
unsigned char reserved[64]; /* reserved for future */
[417] Fix | Delete
};
[418] Fix | Delete
[419] Fix | Delete
enum {
[420] Fix | Delete
SNDRV_PCM_TSTAMP_NONE = 0,
[421] Fix | Delete
SNDRV_PCM_TSTAMP_ENABLE,
[422] Fix | Delete
SNDRV_PCM_TSTAMP_LAST = SNDRV_PCM_TSTAMP_ENABLE,
[423] Fix | Delete
};
[424] Fix | Delete
[425] Fix | Delete
struct snd_pcm_sw_params {
[426] Fix | Delete
int tstamp_mode; /* timestamp mode */
[427] Fix | Delete
unsigned int period_step;
[428] Fix | Delete
unsigned int sleep_min; /* min ticks to sleep */
[429] Fix | Delete
snd_pcm_uframes_t avail_min; /* min avail frames for wakeup */
[430] Fix | Delete
snd_pcm_uframes_t xfer_align; /* obsolete: xfer size need to be a multiple */
[431] Fix | Delete
snd_pcm_uframes_t start_threshold; /* min hw_avail frames for automatic start */
[432] Fix | Delete
/*
[433] Fix | Delete
* The following two thresholds alleviate playback buffer underruns; when
[434] Fix | Delete
* hw_avail drops below the threshold, the respective action is triggered:
[435] Fix | Delete
*/
[436] Fix | Delete
snd_pcm_uframes_t stop_threshold; /* - stop playback */
[437] Fix | Delete
snd_pcm_uframes_t silence_threshold; /* - pre-fill buffer with silence */
[438] Fix | Delete
snd_pcm_uframes_t silence_size; /* max size of silence pre-fill; when >= boundary,
[439] Fix | Delete
* fill played area with silence immediately */
[440] Fix | Delete
snd_pcm_uframes_t boundary; /* pointers wrap point */
[441] Fix | Delete
unsigned int proto; /* protocol version */
[442] Fix | Delete
unsigned int tstamp_type; /* timestamp type (req. proto >= 2.0.12) */
[443] Fix | Delete
unsigned char reserved[56]; /* reserved for future */
[444] Fix | Delete
};
[445] Fix | Delete
[446] Fix | Delete
struct snd_pcm_channel_info {
[447] Fix | Delete
unsigned int channel;
[448] Fix | Delete
__kernel_off_t offset; /* mmap offset */
[449] Fix | Delete
unsigned int first; /* offset to first sample in bits */
[450] Fix | Delete
unsigned int step; /* samples distance in bits */
[451] Fix | Delete
};
[452] Fix | Delete
[453] Fix | Delete
enum {
[454] Fix | Delete
/*
[455] Fix | Delete
* first definition for backwards compatibility only,
[456] Fix | Delete
* maps to wallclock/link time for HDAudio playback and DEFAULT/DMA time for everything else
[457] Fix | Delete
*/
[458] Fix | Delete
SNDRV_PCM_AUDIO_TSTAMP_TYPE_COMPAT = 0,
[459] Fix | Delete
[460] Fix | Delete
/* timestamp definitions */
[461] Fix | Delete
SNDRV_PCM_AUDIO_TSTAMP_TYPE_DEFAULT = 1, /* DMA time, reported as per hw_ptr */
[462] Fix | Delete
SNDRV_PCM_AUDIO_TSTAMP_TYPE_LINK = 2, /* link time reported by sample or wallclock counter, reset on startup */
[463] Fix | Delete
SNDRV_PCM_AUDIO_TSTAMP_TYPE_LINK_ABSOLUTE = 3, /* link time reported by sample or wallclock counter, not reset on startup */
[464] Fix | Delete
SNDRV_PCM_AUDIO_TSTAMP_TYPE_LINK_ESTIMATED = 4, /* link time estimated indirectly */
[465] Fix | Delete
SNDRV_PCM_AUDIO_TSTAMP_TYPE_LINK_SYNCHRONIZED = 5, /* link time synchronized with system time */
[466] Fix | Delete
SNDRV_PCM_AUDIO_TSTAMP_TYPE_LAST = SNDRV_PCM_AUDIO_TSTAMP_TYPE_LINK_SYNCHRONIZED
[467] Fix | Delete
};
[468] Fix | Delete
[469] Fix | Delete
/* explicit padding avoids incompatibility between i386 and x86-64 */
[470] Fix | Delete
typedef struct { unsigned char pad[sizeof(time_t) - sizeof(int)]; } __time_pad;
[471] Fix | Delete
[472] Fix | Delete
struct snd_pcm_status {
[473] Fix | Delete
snd_pcm_state_t state; /* stream state */
[474] Fix | Delete
__time_pad pad1; /* align to timespec */
[475] Fix | Delete
struct timespec trigger_tstamp; /* time when stream was started/stopped/paused */
[476] Fix | Delete
struct timespec tstamp; /* reference timestamp */
[477] Fix | Delete
snd_pcm_uframes_t appl_ptr; /* appl ptr */
[478] Fix | Delete
snd_pcm_uframes_t hw_ptr; /* hw ptr */
[479] Fix | Delete
snd_pcm_sframes_t delay; /* current delay in frames */
[480] Fix | Delete
snd_pcm_uframes_t avail; /* number of frames available */
[481] Fix | Delete
snd_pcm_uframes_t avail_max; /* max frames available on hw since last status */
[482] Fix | Delete
snd_pcm_uframes_t overrange; /* count of ADC (capture) overrange detections from last status */
[483] Fix | Delete
snd_pcm_state_t suspended_state; /* suspended stream state */
[484] Fix | Delete
__u32 audio_tstamp_data; /* needed for 64-bit alignment, used for configs/report to/from userspace */
[485] Fix | Delete
struct timespec audio_tstamp; /* sample counter, wall clock, PHC or on-demand sync'ed */
[486] Fix | Delete
struct timespec driver_tstamp; /* useful in case reference system tstamp is reported with delay */
[487] Fix | Delete
__u32 audio_tstamp_accuracy; /* in ns units, only valid if indicated in audio_tstamp_data */
[488] Fix | Delete
unsigned char reserved[52-2*sizeof(struct timespec)]; /* must be filled with zero */
[489] Fix | Delete
};
[490] Fix | Delete
[491] Fix | Delete
/*
[492] Fix | Delete
* For mmap operations, we need the 64-bit layout, both for compat mode,
[493] Fix | Delete
* and for y2038 compatibility. For 64-bit applications, the two definitions
[494] Fix | Delete
* are identical, so we keep the traditional version.
[495] Fix | Delete
*/
[496] Fix | Delete
#ifdef __SND_STRUCT_TIME64
[497] Fix | Delete
#define __snd_pcm_mmap_status64 snd_pcm_mmap_status
[498] Fix | Delete
#define __snd_pcm_mmap_control64 snd_pcm_mmap_control
[499] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function