jpayne@69: /** jpayne@69: * \file include/pcm.h jpayne@69: * \brief Application interface library for the ALSA driver jpayne@69: * \author Jaroslav Kysela jpayne@69: * \author Abramo Bagnara jpayne@69: * \author Takashi Iwai jpayne@69: * \date 1998-2001 jpayne@69: * jpayne@69: * Application interface library for the ALSA driver. jpayne@69: * See the \ref pcm page for more details. jpayne@69: */ jpayne@69: /* jpayne@69: * This library is free software; you can redistribute it and/or modify jpayne@69: * it under the terms of the GNU Lesser General Public License as jpayne@69: * published by the Free Software Foundation; either version 2.1 of jpayne@69: * the License, or (at your option) any later version. jpayne@69: * jpayne@69: * This program is distributed in the hope that it will be useful, jpayne@69: * but WITHOUT ANY WARRANTY; without even the implied warranty of jpayne@69: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the jpayne@69: * GNU Lesser General Public License for more details. jpayne@69: * jpayne@69: * You should have received a copy of the GNU Lesser General Public jpayne@69: * License along with this library; if not, write to the Free Software jpayne@69: * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA jpayne@69: * jpayne@69: */ jpayne@69: jpayne@69: #ifndef __ALSA_PCM_H jpayne@69: #define __ALSA_PCM_H jpayne@69: jpayne@69: #ifdef __cplusplus jpayne@69: extern "C" { jpayne@69: #endif jpayne@69: jpayne@69: #include jpayne@69: jpayne@69: /** jpayne@69: * \defgroup PCM PCM Interface jpayne@69: * See the \ref pcm page for more details. jpayne@69: * \{ jpayne@69: */ jpayne@69: jpayne@69: /** dlsym version for interface entry callback */ jpayne@69: #define SND_PCM_DLSYM_VERSION _dlsym_pcm_001 jpayne@69: jpayne@69: /** PCM generic info container */ jpayne@69: typedef struct _snd_pcm_info snd_pcm_info_t; jpayne@69: jpayne@69: /** PCM hardware configuration space container jpayne@69: * jpayne@69: * snd_pcm_hw_params_t is an opaque structure which contains a set of possible jpayne@69: * PCM hardware configurations. For example, a given instance might include a jpayne@69: * range of buffer sizes, a range of period sizes, and a set of several sample jpayne@69: * formats. Some subset of all possible combinations these sets may be valid, jpayne@69: * but not necessarily any combination will be valid. jpayne@69: * jpayne@69: * When a parameter is set or restricted using a snd_pcm_hw_params_set* jpayne@69: * function, all of the other ranges will be updated to exclude as many jpayne@69: * impossible configurations as possible. Attempting to set a parameter jpayne@69: * outside of its acceptable range will result in the function failing jpayne@69: * and an error code being returned. jpayne@69: */ jpayne@69: typedef struct _snd_pcm_hw_params snd_pcm_hw_params_t; jpayne@69: jpayne@69: /** PCM software configuration container */ jpayne@69: typedef struct _snd_pcm_sw_params snd_pcm_sw_params_t; jpayne@69: /** PCM status container */ jpayne@69: typedef struct _snd_pcm_status snd_pcm_status_t; jpayne@69: /** PCM access types mask */ jpayne@69: typedef struct _snd_pcm_access_mask snd_pcm_access_mask_t; jpayne@69: /** PCM formats mask */ jpayne@69: typedef struct _snd_pcm_format_mask snd_pcm_format_mask_t; jpayne@69: /** PCM subformats mask */ jpayne@69: typedef struct _snd_pcm_subformat_mask snd_pcm_subformat_mask_t; jpayne@69: jpayne@69: /** PCM class */ jpayne@69: typedef enum _snd_pcm_class { jpayne@69: /** standard device */ jpayne@69: jpayne@69: SND_PCM_CLASS_GENERIC = 0, jpayne@69: /** multichannel device */ jpayne@69: SND_PCM_CLASS_MULTI, jpayne@69: /** software modem device */ jpayne@69: SND_PCM_CLASS_MODEM, jpayne@69: /** digitizer device */ jpayne@69: SND_PCM_CLASS_DIGITIZER, jpayne@69: SND_PCM_CLASS_LAST = SND_PCM_CLASS_DIGITIZER jpayne@69: } snd_pcm_class_t; jpayne@69: jpayne@69: /** PCM subclass */ jpayne@69: typedef enum _snd_pcm_subclass { jpayne@69: /** subdevices are mixed together */ jpayne@69: SND_PCM_SUBCLASS_GENERIC_MIX = 0, jpayne@69: /** multichannel subdevices are mixed together */ jpayne@69: SND_PCM_SUBCLASS_MULTI_MIX, jpayne@69: SND_PCM_SUBCLASS_LAST = SND_PCM_SUBCLASS_MULTI_MIX jpayne@69: } snd_pcm_subclass_t; jpayne@69: jpayne@69: /** PCM stream (direction) */ jpayne@69: typedef enum _snd_pcm_stream { jpayne@69: /** Playback stream */ jpayne@69: SND_PCM_STREAM_PLAYBACK = 0, jpayne@69: /** Capture stream */ jpayne@69: SND_PCM_STREAM_CAPTURE, jpayne@69: SND_PCM_STREAM_LAST = SND_PCM_STREAM_CAPTURE jpayne@69: } snd_pcm_stream_t; jpayne@69: jpayne@69: /** PCM access type */ jpayne@69: typedef enum _snd_pcm_access { jpayne@69: /** mmap access with simple interleaved channels */ jpayne@69: SND_PCM_ACCESS_MMAP_INTERLEAVED = 0, jpayne@69: /** mmap access with simple non interleaved channels */ jpayne@69: SND_PCM_ACCESS_MMAP_NONINTERLEAVED, jpayne@69: /** mmap access with complex placement */ jpayne@69: SND_PCM_ACCESS_MMAP_COMPLEX, jpayne@69: /** snd_pcm_readi/snd_pcm_writei access */ jpayne@69: SND_PCM_ACCESS_RW_INTERLEAVED, jpayne@69: /** snd_pcm_readn/snd_pcm_writen access */ jpayne@69: SND_PCM_ACCESS_RW_NONINTERLEAVED, jpayne@69: SND_PCM_ACCESS_LAST = SND_PCM_ACCESS_RW_NONINTERLEAVED jpayne@69: } snd_pcm_access_t; jpayne@69: jpayne@69: /** PCM sample format */ jpayne@69: typedef enum _snd_pcm_format { jpayne@69: /** Unknown */ jpayne@69: SND_PCM_FORMAT_UNKNOWN = -1, jpayne@69: /** Signed 8 bit */ jpayne@69: SND_PCM_FORMAT_S8 = 0, jpayne@69: /** Unsigned 8 bit */ jpayne@69: SND_PCM_FORMAT_U8, jpayne@69: /** Signed 16 bit Little Endian */ jpayne@69: SND_PCM_FORMAT_S16_LE, jpayne@69: /** Signed 16 bit Big Endian */ jpayne@69: SND_PCM_FORMAT_S16_BE, jpayne@69: /** Unsigned 16 bit Little Endian */ jpayne@69: SND_PCM_FORMAT_U16_LE, jpayne@69: /** Unsigned 16 bit Big Endian */ jpayne@69: SND_PCM_FORMAT_U16_BE, jpayne@69: /** Signed 24 bit Little Endian using low three bytes in 32-bit word */ jpayne@69: SND_PCM_FORMAT_S24_LE, jpayne@69: /** Signed 24 bit Big Endian using low three bytes in 32-bit word */ jpayne@69: SND_PCM_FORMAT_S24_BE, jpayne@69: /** Unsigned 24 bit Little Endian using low three bytes in 32-bit word */ jpayne@69: SND_PCM_FORMAT_U24_LE, jpayne@69: /** Unsigned 24 bit Big Endian using low three bytes in 32-bit word */ jpayne@69: SND_PCM_FORMAT_U24_BE, jpayne@69: /** Signed 32 bit Little Endian */ jpayne@69: SND_PCM_FORMAT_S32_LE, jpayne@69: /** Signed 32 bit Big Endian */ jpayne@69: SND_PCM_FORMAT_S32_BE, jpayne@69: /** Unsigned 32 bit Little Endian */ jpayne@69: SND_PCM_FORMAT_U32_LE, jpayne@69: /** Unsigned 32 bit Big Endian */ jpayne@69: SND_PCM_FORMAT_U32_BE, jpayne@69: /** Float 32 bit Little Endian, Range -1.0 to 1.0 */ jpayne@69: SND_PCM_FORMAT_FLOAT_LE, jpayne@69: /** Float 32 bit Big Endian, Range -1.0 to 1.0 */ jpayne@69: SND_PCM_FORMAT_FLOAT_BE, jpayne@69: /** Float 64 bit Little Endian, Range -1.0 to 1.0 */ jpayne@69: SND_PCM_FORMAT_FLOAT64_LE, jpayne@69: /** Float 64 bit Big Endian, Range -1.0 to 1.0 */ jpayne@69: SND_PCM_FORMAT_FLOAT64_BE, jpayne@69: /** IEC-958 Little Endian */ jpayne@69: SND_PCM_FORMAT_IEC958_SUBFRAME_LE, jpayne@69: /** IEC-958 Big Endian */ jpayne@69: SND_PCM_FORMAT_IEC958_SUBFRAME_BE, jpayne@69: /** Mu-Law */ jpayne@69: SND_PCM_FORMAT_MU_LAW, jpayne@69: /** A-Law */ jpayne@69: SND_PCM_FORMAT_A_LAW, jpayne@69: /** Ima-ADPCM */ jpayne@69: SND_PCM_FORMAT_IMA_ADPCM, jpayne@69: /** MPEG */ jpayne@69: SND_PCM_FORMAT_MPEG, jpayne@69: /** GSM */ jpayne@69: SND_PCM_FORMAT_GSM, jpayne@69: /** Signed 20bit Little Endian in 4bytes format, LSB justified */ jpayne@69: SND_PCM_FORMAT_S20_LE, jpayne@69: /** Signed 20bit Big Endian in 4bytes format, LSB justified */ jpayne@69: SND_PCM_FORMAT_S20_BE, jpayne@69: /** Unsigned 20bit Little Endian in 4bytes format, LSB justified */ jpayne@69: SND_PCM_FORMAT_U20_LE, jpayne@69: /** Unsigned 20bit Big Endian in 4bytes format, LSB justified */ jpayne@69: SND_PCM_FORMAT_U20_BE, jpayne@69: /** Special */ jpayne@69: SND_PCM_FORMAT_SPECIAL = 31, jpayne@69: /** Signed 24bit Little Endian in 3bytes format */ jpayne@69: SND_PCM_FORMAT_S24_3LE = 32, jpayne@69: /** Signed 24bit Big Endian in 3bytes format */ jpayne@69: SND_PCM_FORMAT_S24_3BE, jpayne@69: /** Unsigned 24bit Little Endian in 3bytes format */ jpayne@69: SND_PCM_FORMAT_U24_3LE, jpayne@69: /** Unsigned 24bit Big Endian in 3bytes format */ jpayne@69: SND_PCM_FORMAT_U24_3BE, jpayne@69: /** Signed 20bit Little Endian in 3bytes format */ jpayne@69: SND_PCM_FORMAT_S20_3LE, jpayne@69: /** Signed 20bit Big Endian in 3bytes format */ jpayne@69: SND_PCM_FORMAT_S20_3BE, jpayne@69: /** Unsigned 20bit Little Endian in 3bytes format */ jpayne@69: SND_PCM_FORMAT_U20_3LE, jpayne@69: /** Unsigned 20bit Big Endian in 3bytes format */ jpayne@69: SND_PCM_FORMAT_U20_3BE, jpayne@69: /** Signed 18bit Little Endian in 3bytes format */ jpayne@69: SND_PCM_FORMAT_S18_3LE, jpayne@69: /** Signed 18bit Big Endian in 3bytes format */ jpayne@69: SND_PCM_FORMAT_S18_3BE, jpayne@69: /** Unsigned 18bit Little Endian in 3bytes format */ jpayne@69: SND_PCM_FORMAT_U18_3LE, jpayne@69: /** Unsigned 18bit Big Endian in 3bytes format */ jpayne@69: SND_PCM_FORMAT_U18_3BE, jpayne@69: /* G.723 (ADPCM) 24 kbit/s, 8 samples in 3 bytes */ jpayne@69: SND_PCM_FORMAT_G723_24, jpayne@69: /* G.723 (ADPCM) 24 kbit/s, 1 sample in 1 byte */ jpayne@69: SND_PCM_FORMAT_G723_24_1B, jpayne@69: /* G.723 (ADPCM) 40 kbit/s, 8 samples in 3 bytes */ jpayne@69: SND_PCM_FORMAT_G723_40, jpayne@69: /* G.723 (ADPCM) 40 kbit/s, 1 sample in 1 byte */ jpayne@69: SND_PCM_FORMAT_G723_40_1B, jpayne@69: /* Direct Stream Digital (DSD) in 1-byte samples (x8) */ jpayne@69: SND_PCM_FORMAT_DSD_U8, jpayne@69: /* Direct Stream Digital (DSD) in 2-byte samples (x16) */ jpayne@69: SND_PCM_FORMAT_DSD_U16_LE, jpayne@69: /* Direct Stream Digital (DSD) in 4-byte samples (x32) */ jpayne@69: SND_PCM_FORMAT_DSD_U32_LE, jpayne@69: /* Direct Stream Digital (DSD) in 2-byte samples (x16) */ jpayne@69: SND_PCM_FORMAT_DSD_U16_BE, jpayne@69: /* Direct Stream Digital (DSD) in 4-byte samples (x32) */ jpayne@69: SND_PCM_FORMAT_DSD_U32_BE, jpayne@69: SND_PCM_FORMAT_LAST = SND_PCM_FORMAT_DSD_U32_BE, jpayne@69: jpayne@69: #if __BYTE_ORDER == __LITTLE_ENDIAN jpayne@69: /** Signed 16 bit CPU endian */ jpayne@69: SND_PCM_FORMAT_S16 = SND_PCM_FORMAT_S16_LE, jpayne@69: /** Unsigned 16 bit CPU endian */ jpayne@69: SND_PCM_FORMAT_U16 = SND_PCM_FORMAT_U16_LE, jpayne@69: /** Signed 24 bit CPU endian */ jpayne@69: SND_PCM_FORMAT_S24 = SND_PCM_FORMAT_S24_LE, jpayne@69: /** Unsigned 24 bit CPU endian */ jpayne@69: SND_PCM_FORMAT_U24 = SND_PCM_FORMAT_U24_LE, jpayne@69: /** Signed 32 bit CPU endian */ jpayne@69: SND_PCM_FORMAT_S32 = SND_PCM_FORMAT_S32_LE, jpayne@69: /** Unsigned 32 bit CPU endian */ jpayne@69: SND_PCM_FORMAT_U32 = SND_PCM_FORMAT_U32_LE, jpayne@69: /** Float 32 bit CPU endian */ jpayne@69: SND_PCM_FORMAT_FLOAT = SND_PCM_FORMAT_FLOAT_LE, jpayne@69: /** Float 64 bit CPU endian */ jpayne@69: SND_PCM_FORMAT_FLOAT64 = SND_PCM_FORMAT_FLOAT64_LE, jpayne@69: /** IEC-958 CPU Endian */ jpayne@69: SND_PCM_FORMAT_IEC958_SUBFRAME = SND_PCM_FORMAT_IEC958_SUBFRAME_LE, jpayne@69: /** Signed 20bit in 4bytes format, LSB justified, CPU Endian */ jpayne@69: SND_PCM_FORMAT_S20 = SND_PCM_FORMAT_S20_LE, jpayne@69: /** Unsigned 20bit in 4bytes format, LSB justified, CPU Endian */ jpayne@69: SND_PCM_FORMAT_U20 = SND_PCM_FORMAT_U20_LE, jpayne@69: #elif __BYTE_ORDER == __BIG_ENDIAN jpayne@69: /** Signed 16 bit CPU endian */ jpayne@69: SND_PCM_FORMAT_S16 = SND_PCM_FORMAT_S16_BE, jpayne@69: /** Unsigned 16 bit CPU endian */ jpayne@69: SND_PCM_FORMAT_U16 = SND_PCM_FORMAT_U16_BE, jpayne@69: /** Signed 24 bit CPU endian */ jpayne@69: SND_PCM_FORMAT_S24 = SND_PCM_FORMAT_S24_BE, jpayne@69: /** Unsigned 24 bit CPU endian */ jpayne@69: SND_PCM_FORMAT_U24 = SND_PCM_FORMAT_U24_BE, jpayne@69: /** Signed 32 bit CPU endian */ jpayne@69: SND_PCM_FORMAT_S32 = SND_PCM_FORMAT_S32_BE, jpayne@69: /** Unsigned 32 bit CPU endian */ jpayne@69: SND_PCM_FORMAT_U32 = SND_PCM_FORMAT_U32_BE, jpayne@69: /** Float 32 bit CPU endian */ jpayne@69: SND_PCM_FORMAT_FLOAT = SND_PCM_FORMAT_FLOAT_BE, jpayne@69: /** Float 64 bit CPU endian */ jpayne@69: SND_PCM_FORMAT_FLOAT64 = SND_PCM_FORMAT_FLOAT64_BE, jpayne@69: /** IEC-958 CPU Endian */ jpayne@69: SND_PCM_FORMAT_IEC958_SUBFRAME = SND_PCM_FORMAT_IEC958_SUBFRAME_BE, jpayne@69: /** Signed 20bit in 4bytes format, LSB justified, CPU Endian */ jpayne@69: SND_PCM_FORMAT_S20 = SND_PCM_FORMAT_S20_BE, jpayne@69: /** Unsigned 20bit in 4bytes format, LSB justified, CPU Endian */ jpayne@69: SND_PCM_FORMAT_U20 = SND_PCM_FORMAT_U20_BE, jpayne@69: #else jpayne@69: #error "Unknown endian" jpayne@69: #endif jpayne@69: } snd_pcm_format_t; jpayne@69: jpayne@69: /** PCM sample subformat */ jpayne@69: typedef enum _snd_pcm_subformat { jpayne@69: /** Standard */ jpayne@69: SND_PCM_SUBFORMAT_STD = 0, jpayne@69: SND_PCM_SUBFORMAT_LAST = SND_PCM_SUBFORMAT_STD jpayne@69: } snd_pcm_subformat_t; jpayne@69: jpayne@69: /** PCM state */ jpayne@69: typedef enum _snd_pcm_state { jpayne@69: /** Open */ jpayne@69: SND_PCM_STATE_OPEN = 0, jpayne@69: /** Setup installed */ jpayne@69: SND_PCM_STATE_SETUP, jpayne@69: /** Ready to start */ jpayne@69: SND_PCM_STATE_PREPARED, jpayne@69: /** Running */ jpayne@69: SND_PCM_STATE_RUNNING, jpayne@69: /** Stopped: underrun (playback) or overrun (capture) detected */ jpayne@69: SND_PCM_STATE_XRUN, jpayne@69: /** Draining: running (playback) or stopped (capture) */ jpayne@69: SND_PCM_STATE_DRAINING, jpayne@69: /** Paused */ jpayne@69: SND_PCM_STATE_PAUSED, jpayne@69: /** Hardware is suspended */ jpayne@69: SND_PCM_STATE_SUSPENDED, jpayne@69: /** Hardware is disconnected */ jpayne@69: SND_PCM_STATE_DISCONNECTED, jpayne@69: SND_PCM_STATE_LAST = SND_PCM_STATE_DISCONNECTED, jpayne@69: /** Private - used internally in the library - do not use*/ jpayne@69: SND_PCM_STATE_PRIVATE1 = 1024 jpayne@69: } snd_pcm_state_t; jpayne@69: jpayne@69: /** PCM start mode */ jpayne@69: typedef enum _snd_pcm_start { jpayne@69: /** Automatic start on data read/write */ jpayne@69: SND_PCM_START_DATA = 0, jpayne@69: /** Explicit start */ jpayne@69: SND_PCM_START_EXPLICIT, jpayne@69: SND_PCM_START_LAST = SND_PCM_START_EXPLICIT jpayne@69: } snd_pcm_start_t; jpayne@69: jpayne@69: /** PCM xrun mode */ jpayne@69: typedef enum _snd_pcm_xrun { jpayne@69: /** Xrun detection disabled */ jpayne@69: SND_PCM_XRUN_NONE = 0, jpayne@69: /** Stop on xrun detection */ jpayne@69: SND_PCM_XRUN_STOP, jpayne@69: SND_PCM_XRUN_LAST = SND_PCM_XRUN_STOP jpayne@69: } snd_pcm_xrun_t; jpayne@69: jpayne@69: /** PCM timestamp mode */ jpayne@69: typedef enum _snd_pcm_tstamp { jpayne@69: /** No timestamp */ jpayne@69: SND_PCM_TSTAMP_NONE = 0, jpayne@69: /** Update timestamp at every hardware position update */ jpayne@69: SND_PCM_TSTAMP_ENABLE, jpayne@69: /** Equivalent with #SND_PCM_TSTAMP_ENABLE, jpayne@69: * just for compatibility with older versions jpayne@69: */ jpayne@69: SND_PCM_TSTAMP_MMAP = SND_PCM_TSTAMP_ENABLE, jpayne@69: SND_PCM_TSTAMP_LAST = SND_PCM_TSTAMP_ENABLE jpayne@69: } snd_pcm_tstamp_t; jpayne@69: jpayne@69: typedef enum _snd_pcm_tstamp_type { jpayne@69: SND_PCM_TSTAMP_TYPE_GETTIMEOFDAY = 0, /**< gettimeofday equivalent */ jpayne@69: SND_PCM_TSTAMP_TYPE_MONOTONIC, /**< posix_clock_monotonic equivalent */ jpayne@69: SND_PCM_TSTAMP_TYPE_MONOTONIC_RAW, /**< monotonic_raw (no NTP) */ jpayne@69: SND_PCM_TSTAMP_TYPE_LAST = SND_PCM_TSTAMP_TYPE_MONOTONIC_RAW, jpayne@69: } snd_pcm_tstamp_type_t; jpayne@69: jpayne@69: typedef struct _snd_pcm_audio_tstamp_config { jpayne@69: /* 5 of max 16 bits used */ jpayne@69: unsigned int type_requested:4; jpayne@69: unsigned int report_delay:1; /* add total delay to A/D or D/A */ jpayne@69: } snd_pcm_audio_tstamp_config_t; jpayne@69: jpayne@69: typedef struct _snd_pcm_audio_tstamp_report { jpayne@69: /* 6 of max 16 bits used for bit-fields */ jpayne@69: jpayne@69: /* for backwards compatibility */ jpayne@69: unsigned int valid:1; jpayne@69: jpayne@69: /* actual type if hardware could not support requested timestamp */ jpayne@69: unsigned int actual_type:4; jpayne@69: jpayne@69: /* accuracy represented in ns units */ jpayne@69: unsigned int accuracy_report:1; /* 0 if accuracy unknown, 1 if accuracy field is valid */ jpayne@69: unsigned int accuracy; /* up to 4.29s, will be packed in separate field */ jpayne@69: } snd_pcm_audio_tstamp_report_t; jpayne@69: jpayne@69: /** Unsigned frames quantity */ jpayne@69: typedef unsigned long snd_pcm_uframes_t; jpayne@69: /** Signed frames quantity */ jpayne@69: typedef long snd_pcm_sframes_t; jpayne@69: jpayne@69: /** Non blocking mode (flag for open mode) \hideinitializer */ jpayne@69: #define SND_PCM_NONBLOCK 0x00000001 jpayne@69: /** Async notification (flag for open mode) \hideinitializer */ jpayne@69: #define SND_PCM_ASYNC 0x00000002 jpayne@69: /** In an abort state (internal, not allowed for open) */ jpayne@69: #define SND_PCM_ABORT 0x00008000 jpayne@69: /** Disable automatic (but not forced!) rate resamplinig */ jpayne@69: #define SND_PCM_NO_AUTO_RESAMPLE 0x00010000 jpayne@69: /** Disable automatic (but not forced!) channel conversion */ jpayne@69: #define SND_PCM_NO_AUTO_CHANNELS 0x00020000 jpayne@69: /** Disable automatic (but not forced!) format conversion */ jpayne@69: #define SND_PCM_NO_AUTO_FORMAT 0x00040000 jpayne@69: /** Disable soft volume control */ jpayne@69: #define SND_PCM_NO_SOFTVOL 0x00080000 jpayne@69: jpayne@69: /** PCM handle */ jpayne@69: typedef struct _snd_pcm snd_pcm_t; jpayne@69: jpayne@69: /** PCM type */ jpayne@69: enum _snd_pcm_type { jpayne@69: /** Kernel level PCM */ jpayne@69: SND_PCM_TYPE_HW = 0, jpayne@69: /** Hooked PCM */ jpayne@69: SND_PCM_TYPE_HOOKS, jpayne@69: /** One or more linked PCM with exclusive access to selected jpayne@69: channels */ jpayne@69: SND_PCM_TYPE_MULTI, jpayne@69: /** File writing plugin */ jpayne@69: SND_PCM_TYPE_FILE, jpayne@69: /** Null endpoint PCM */ jpayne@69: SND_PCM_TYPE_NULL, jpayne@69: /** Shared memory client PCM */ jpayne@69: SND_PCM_TYPE_SHM, jpayne@69: /** INET client PCM (not yet implemented) */ jpayne@69: SND_PCM_TYPE_INET, jpayne@69: /** Copying plugin */ jpayne@69: SND_PCM_TYPE_COPY, jpayne@69: /** Linear format conversion PCM */ jpayne@69: SND_PCM_TYPE_LINEAR, jpayne@69: /** A-Law format conversion PCM */ jpayne@69: SND_PCM_TYPE_ALAW, jpayne@69: /** Mu-Law format conversion PCM */ jpayne@69: SND_PCM_TYPE_MULAW, jpayne@69: /** IMA-ADPCM format conversion PCM */ jpayne@69: SND_PCM_TYPE_ADPCM, jpayne@69: /** Rate conversion PCM */ jpayne@69: SND_PCM_TYPE_RATE, jpayne@69: /** Attenuated static route PCM */ jpayne@69: SND_PCM_TYPE_ROUTE, jpayne@69: /** Format adjusted PCM */ jpayne@69: SND_PCM_TYPE_PLUG, jpayne@69: /** Sharing PCM */ jpayne@69: SND_PCM_TYPE_SHARE, jpayne@69: /** Meter plugin */ jpayne@69: SND_PCM_TYPE_METER, jpayne@69: /** Mixing PCM */ jpayne@69: SND_PCM_TYPE_MIX, jpayne@69: /** Attenuated dynamic route PCM (not yet implemented) */ jpayne@69: SND_PCM_TYPE_DROUTE, jpayne@69: /** Loopback server plugin (not yet implemented) */ jpayne@69: SND_PCM_TYPE_LBSERVER, jpayne@69: /** Linear Integer <-> Linear Float format conversion PCM */ jpayne@69: SND_PCM_TYPE_LINEAR_FLOAT, jpayne@69: /** LADSPA integration plugin */ jpayne@69: SND_PCM_TYPE_LADSPA, jpayne@69: /** Direct Mixing plugin */ jpayne@69: SND_PCM_TYPE_DMIX, jpayne@69: /** Jack Audio Connection Kit plugin */ jpayne@69: SND_PCM_TYPE_JACK, jpayne@69: /** Direct Snooping plugin */ jpayne@69: SND_PCM_TYPE_DSNOOP, jpayne@69: /** Direct Sharing plugin */ jpayne@69: SND_PCM_TYPE_DSHARE, jpayne@69: /** IEC958 subframe plugin */ jpayne@69: SND_PCM_TYPE_IEC958, jpayne@69: /** Soft volume plugin */ jpayne@69: SND_PCM_TYPE_SOFTVOL, jpayne@69: /** External I/O plugin */ jpayne@69: SND_PCM_TYPE_IOPLUG, jpayne@69: /** External filter plugin */ jpayne@69: SND_PCM_TYPE_EXTPLUG, jpayne@69: /** Mmap-emulation plugin */ jpayne@69: SND_PCM_TYPE_MMAP_EMUL, jpayne@69: SND_PCM_TYPE_LAST = SND_PCM_TYPE_MMAP_EMUL jpayne@69: }; jpayne@69: jpayne@69: /** PCM type */ jpayne@69: typedef enum _snd_pcm_type snd_pcm_type_t; jpayne@69: jpayne@69: /** PCM area specification */ jpayne@69: typedef struct _snd_pcm_channel_area { jpayne@69: /** base address of channel samples */ jpayne@69: void *addr; jpayne@69: /** offset to first sample in bits */ jpayne@69: unsigned int first; jpayne@69: /** samples distance in bits */ jpayne@69: unsigned int step; jpayne@69: } snd_pcm_channel_area_t; jpayne@69: jpayne@69: /** PCM synchronization ID */ jpayne@69: typedef union _snd_pcm_sync_id { jpayne@69: /** 8-bit ID */ jpayne@69: unsigned char id[16]; jpayne@69: /** 16-bit ID */ jpayne@69: unsigned short id16[8]; jpayne@69: /** 32-bit ID */ jpayne@69: unsigned int id32[4]; jpayne@69: } snd_pcm_sync_id_t; jpayne@69: jpayne@69: /** #SND_PCM_TYPE_METER scope handle */ jpayne@69: typedef struct _snd_pcm_scope snd_pcm_scope_t; jpayne@69: jpayne@69: int snd_pcm_open(snd_pcm_t **pcm, const char *name, jpayne@69: snd_pcm_stream_t stream, int mode); jpayne@69: int snd_pcm_open_lconf(snd_pcm_t **pcm, const char *name, jpayne@69: snd_pcm_stream_t stream, int mode, jpayne@69: snd_config_t *lconf); jpayne@69: int snd_pcm_open_fallback(snd_pcm_t **pcm, snd_config_t *root, jpayne@69: const char *name, const char *orig_name, jpayne@69: snd_pcm_stream_t stream, int mode); jpayne@69: jpayne@69: int snd_pcm_close(snd_pcm_t *pcm); jpayne@69: const char *snd_pcm_name(snd_pcm_t *pcm); jpayne@69: snd_pcm_type_t snd_pcm_type(snd_pcm_t *pcm); jpayne@69: snd_pcm_stream_t snd_pcm_stream(snd_pcm_t *pcm); jpayne@69: int snd_pcm_poll_descriptors_count(snd_pcm_t *pcm); jpayne@69: int snd_pcm_poll_descriptors(snd_pcm_t *pcm, struct pollfd *pfds, unsigned int space); jpayne@69: int snd_pcm_poll_descriptors_revents(snd_pcm_t *pcm, struct pollfd *pfds, unsigned int nfds, unsigned short *revents); jpayne@69: int snd_pcm_nonblock(snd_pcm_t *pcm, int nonblock); jpayne@69: static __inline__ int snd_pcm_abort(snd_pcm_t *pcm) { return snd_pcm_nonblock(pcm, 2); } jpayne@69: int snd_async_add_pcm_handler(snd_async_handler_t **handler, snd_pcm_t *pcm, jpayne@69: snd_async_callback_t callback, void *private_data); jpayne@69: snd_pcm_t *snd_async_handler_get_pcm(snd_async_handler_t *handler); jpayne@69: int snd_pcm_info(snd_pcm_t *pcm, snd_pcm_info_t *info); jpayne@69: int snd_pcm_hw_params_current(snd_pcm_t *pcm, snd_pcm_hw_params_t *params); jpayne@69: int snd_pcm_hw_params(snd_pcm_t *pcm, snd_pcm_hw_params_t *params); jpayne@69: int snd_pcm_hw_free(snd_pcm_t *pcm); jpayne@69: int snd_pcm_sw_params_current(snd_pcm_t *pcm, snd_pcm_sw_params_t *params); jpayne@69: int snd_pcm_sw_params(snd_pcm_t *pcm, snd_pcm_sw_params_t *params); jpayne@69: int snd_pcm_prepare(snd_pcm_t *pcm); jpayne@69: int snd_pcm_reset(snd_pcm_t *pcm); jpayne@69: int snd_pcm_status(snd_pcm_t *pcm, snd_pcm_status_t *status); jpayne@69: int snd_pcm_start(snd_pcm_t *pcm); jpayne@69: int snd_pcm_drop(snd_pcm_t *pcm); jpayne@69: int snd_pcm_drain(snd_pcm_t *pcm); jpayne@69: int snd_pcm_pause(snd_pcm_t *pcm, int enable); jpayne@69: snd_pcm_state_t snd_pcm_state(snd_pcm_t *pcm); jpayne@69: int snd_pcm_hwsync(snd_pcm_t *pcm); jpayne@69: int snd_pcm_delay(snd_pcm_t *pcm, snd_pcm_sframes_t *delayp); jpayne@69: int snd_pcm_resume(snd_pcm_t *pcm); jpayne@69: int snd_pcm_htimestamp(snd_pcm_t *pcm, snd_pcm_uframes_t *avail, snd_htimestamp_t *tstamp); jpayne@69: snd_pcm_sframes_t snd_pcm_avail(snd_pcm_t *pcm); jpayne@69: snd_pcm_sframes_t snd_pcm_avail_update(snd_pcm_t *pcm); jpayne@69: int snd_pcm_avail_delay(snd_pcm_t *pcm, snd_pcm_sframes_t *availp, snd_pcm_sframes_t *delayp); jpayne@69: snd_pcm_sframes_t snd_pcm_rewindable(snd_pcm_t *pcm); jpayne@69: snd_pcm_sframes_t snd_pcm_rewind(snd_pcm_t *pcm, snd_pcm_uframes_t frames); jpayne@69: snd_pcm_sframes_t snd_pcm_forwardable(snd_pcm_t *pcm); jpayne@69: snd_pcm_sframes_t snd_pcm_forward(snd_pcm_t *pcm, snd_pcm_uframes_t frames); jpayne@69: snd_pcm_sframes_t snd_pcm_writei(snd_pcm_t *pcm, const void *buffer, snd_pcm_uframes_t size); jpayne@69: snd_pcm_sframes_t snd_pcm_readi(snd_pcm_t *pcm, void *buffer, snd_pcm_uframes_t size); jpayne@69: snd_pcm_sframes_t snd_pcm_writen(snd_pcm_t *pcm, void **bufs, snd_pcm_uframes_t size); jpayne@69: snd_pcm_sframes_t snd_pcm_readn(snd_pcm_t *pcm, void **bufs, snd_pcm_uframes_t size); jpayne@69: int snd_pcm_wait(snd_pcm_t *pcm, int timeout); jpayne@69: jpayne@69: int snd_pcm_link(snd_pcm_t *pcm1, snd_pcm_t *pcm2); jpayne@69: int snd_pcm_unlink(snd_pcm_t *pcm); jpayne@69: jpayne@69: /** channel mapping API version number */ jpayne@69: #define SND_CHMAP_API_VERSION ((1 << 16) | (0 << 8) | 1) jpayne@69: jpayne@69: /** channel map list type */ jpayne@69: enum snd_pcm_chmap_type { jpayne@69: SND_CHMAP_TYPE_NONE = 0,/**< unspecified channel position */ jpayne@69: SND_CHMAP_TYPE_FIXED, /**< fixed channel position */ jpayne@69: SND_CHMAP_TYPE_VAR, /**< freely swappable channel position */ jpayne@69: SND_CHMAP_TYPE_PAIRED, /**< pair-wise swappable channel position */ jpayne@69: SND_CHMAP_TYPE_LAST = SND_CHMAP_TYPE_PAIRED, /**< last entry */ jpayne@69: }; jpayne@69: jpayne@69: /** channel positions */ jpayne@69: enum snd_pcm_chmap_position { jpayne@69: SND_CHMAP_UNKNOWN = 0, /**< unspecified */ jpayne@69: SND_CHMAP_NA, /**< N/A, silent */ jpayne@69: SND_CHMAP_MONO, /**< mono stream */ jpayne@69: SND_CHMAP_FL, /**< front left */ jpayne@69: SND_CHMAP_FR, /**< front right */ jpayne@69: SND_CHMAP_RL, /**< rear left */ jpayne@69: SND_CHMAP_RR, /**< rear right */ jpayne@69: SND_CHMAP_FC, /**< front center */ jpayne@69: SND_CHMAP_LFE, /**< LFE */ jpayne@69: SND_CHMAP_SL, /**< side left */ jpayne@69: SND_CHMAP_SR, /**< side right */ jpayne@69: SND_CHMAP_RC, /**< rear center */ jpayne@69: SND_CHMAP_FLC, /**< front left center */ jpayne@69: SND_CHMAP_FRC, /**< front right center */ jpayne@69: SND_CHMAP_RLC, /**< rear left center */ jpayne@69: SND_CHMAP_RRC, /**< rear right center */ jpayne@69: SND_CHMAP_FLW, /**< front left wide */ jpayne@69: SND_CHMAP_FRW, /**< front right wide */ jpayne@69: SND_CHMAP_FLH, /**< front left high */ jpayne@69: SND_CHMAP_FCH, /**< front center high */ jpayne@69: SND_CHMAP_FRH, /**< front right high */ jpayne@69: SND_CHMAP_TC, /**< top center */ jpayne@69: SND_CHMAP_TFL, /**< top front left */ jpayne@69: SND_CHMAP_TFR, /**< top front right */ jpayne@69: SND_CHMAP_TFC, /**< top front center */ jpayne@69: SND_CHMAP_TRL, /**< top rear left */ jpayne@69: SND_CHMAP_TRR, /**< top rear right */ jpayne@69: SND_CHMAP_TRC, /**< top rear center */ jpayne@69: SND_CHMAP_TFLC, /**< top front left center */ jpayne@69: SND_CHMAP_TFRC, /**< top front right center */ jpayne@69: SND_CHMAP_TSL, /**< top side left */ jpayne@69: SND_CHMAP_TSR, /**< top side right */ jpayne@69: SND_CHMAP_LLFE, /**< left LFE */ jpayne@69: SND_CHMAP_RLFE, /**< right LFE */ jpayne@69: SND_CHMAP_BC, /**< bottom center */ jpayne@69: SND_CHMAP_BLC, /**< bottom left center */ jpayne@69: SND_CHMAP_BRC, /**< bottom right center */ jpayne@69: SND_CHMAP_LAST = SND_CHMAP_BRC, jpayne@69: }; jpayne@69: jpayne@69: /** bitmask for channel position */ jpayne@69: #define SND_CHMAP_POSITION_MASK 0xffff jpayne@69: jpayne@69: /** bit flag indicating the channel is phase inverted */ jpayne@69: #define SND_CHMAP_PHASE_INVERSE (0x01 << 16) jpayne@69: /** bit flag indicating the non-standard channel value */ jpayne@69: #define SND_CHMAP_DRIVER_SPEC (0x02 << 16) jpayne@69: jpayne@69: /** the channel map header */ jpayne@69: typedef struct snd_pcm_chmap { jpayne@69: unsigned int channels; /**< number of channels */ jpayne@69: unsigned int pos[0]; /**< channel position array */ jpayne@69: } snd_pcm_chmap_t; jpayne@69: jpayne@69: /** the header of array items returned from snd_pcm_query_chmaps() */ jpayne@69: typedef struct snd_pcm_chmap_query { jpayne@69: enum snd_pcm_chmap_type type; /**< channel map type */ jpayne@69: snd_pcm_chmap_t map; /**< available channel map */ jpayne@69: } snd_pcm_chmap_query_t; jpayne@69: jpayne@69: jpayne@69: snd_pcm_chmap_query_t **snd_pcm_query_chmaps(snd_pcm_t *pcm); jpayne@69: snd_pcm_chmap_query_t **snd_pcm_query_chmaps_from_hw(int card, int dev, jpayne@69: int subdev, jpayne@69: snd_pcm_stream_t stream); jpayne@69: void snd_pcm_free_chmaps(snd_pcm_chmap_query_t **maps); jpayne@69: snd_pcm_chmap_t *snd_pcm_get_chmap(snd_pcm_t *pcm); jpayne@69: int snd_pcm_set_chmap(snd_pcm_t *pcm, const snd_pcm_chmap_t *map); jpayne@69: jpayne@69: const char *snd_pcm_chmap_type_name(enum snd_pcm_chmap_type val); jpayne@69: const char *snd_pcm_chmap_name(enum snd_pcm_chmap_position val); jpayne@69: const char *snd_pcm_chmap_long_name(enum snd_pcm_chmap_position val); jpayne@69: int snd_pcm_chmap_print(const snd_pcm_chmap_t *map, size_t maxlen, char *buf); jpayne@69: unsigned int snd_pcm_chmap_from_string(const char *str); jpayne@69: snd_pcm_chmap_t *snd_pcm_chmap_parse_string(const char *str); jpayne@69: jpayne@69: //int snd_pcm_mixer_element(snd_pcm_t *pcm, snd_mixer_t *mixer, snd_mixer_elem_t **elem); jpayne@69: jpayne@69: /* jpayne@69: * application helpers - these functions are implemented on top jpayne@69: * of the basic API jpayne@69: */ jpayne@69: jpayne@69: int snd_pcm_recover(snd_pcm_t *pcm, int err, int silent); jpayne@69: int snd_pcm_set_params(snd_pcm_t *pcm, jpayne@69: snd_pcm_format_t format, jpayne@69: snd_pcm_access_t access, jpayne@69: unsigned int channels, jpayne@69: unsigned int rate, jpayne@69: int soft_resample, jpayne@69: unsigned int latency); jpayne@69: int snd_pcm_get_params(snd_pcm_t *pcm, jpayne@69: snd_pcm_uframes_t *buffer_size, jpayne@69: snd_pcm_uframes_t *period_size); jpayne@69: jpayne@69: /** \} */ jpayne@69: jpayne@69: /** jpayne@69: * \defgroup PCM_Info Stream Information jpayne@69: * \ingroup PCM jpayne@69: * See the \ref pcm page for more details. jpayne@69: * \{ jpayne@69: */ jpayne@69: jpayne@69: size_t snd_pcm_info_sizeof(void); jpayne@69: /** \hideinitializer jpayne@69: * \brief allocate an invalid #snd_pcm_info_t using standard alloca jpayne@69: * \param ptr returned pointer jpayne@69: */ jpayne@69: #define snd_pcm_info_alloca(ptr) __snd_alloca(ptr, snd_pcm_info) jpayne@69: int snd_pcm_info_malloc(snd_pcm_info_t **ptr); jpayne@69: void snd_pcm_info_free(snd_pcm_info_t *obj); jpayne@69: void snd_pcm_info_copy(snd_pcm_info_t *dst, const snd_pcm_info_t *src); jpayne@69: unsigned int snd_pcm_info_get_device(const snd_pcm_info_t *obj); jpayne@69: unsigned int snd_pcm_info_get_subdevice(const snd_pcm_info_t *obj); jpayne@69: snd_pcm_stream_t snd_pcm_info_get_stream(const snd_pcm_info_t *obj); jpayne@69: int snd_pcm_info_get_card(const snd_pcm_info_t *obj); jpayne@69: const char *snd_pcm_info_get_id(const snd_pcm_info_t *obj); jpayne@69: const char *snd_pcm_info_get_name(const snd_pcm_info_t *obj); jpayne@69: const char *snd_pcm_info_get_subdevice_name(const snd_pcm_info_t *obj); jpayne@69: snd_pcm_class_t snd_pcm_info_get_class(const snd_pcm_info_t *obj); jpayne@69: snd_pcm_subclass_t snd_pcm_info_get_subclass(const snd_pcm_info_t *obj); jpayne@69: unsigned int snd_pcm_info_get_subdevices_count(const snd_pcm_info_t *obj); jpayne@69: unsigned int snd_pcm_info_get_subdevices_avail(const snd_pcm_info_t *obj); jpayne@69: snd_pcm_sync_id_t snd_pcm_info_get_sync(const snd_pcm_info_t *obj); jpayne@69: void snd_pcm_info_set_device(snd_pcm_info_t *obj, unsigned int val); jpayne@69: void snd_pcm_info_set_subdevice(snd_pcm_info_t *obj, unsigned int val); jpayne@69: void snd_pcm_info_set_stream(snd_pcm_info_t *obj, snd_pcm_stream_t val); jpayne@69: jpayne@69: /** \} */ jpayne@69: jpayne@69: /** jpayne@69: * \defgroup PCM_HW_Params Hardware Parameters jpayne@69: * \ingroup PCM jpayne@69: * See the \ref pcm page for more details. jpayne@69: * \{ jpayne@69: */ jpayne@69: jpayne@69: int snd_pcm_hw_params_any(snd_pcm_t *pcm, snd_pcm_hw_params_t *params); jpayne@69: jpayne@69: int snd_pcm_hw_params_can_mmap_sample_resolution(const snd_pcm_hw_params_t *params); jpayne@69: int snd_pcm_hw_params_is_double(const snd_pcm_hw_params_t *params); jpayne@69: int snd_pcm_hw_params_is_batch(const snd_pcm_hw_params_t *params); jpayne@69: int snd_pcm_hw_params_is_block_transfer(const snd_pcm_hw_params_t *params); jpayne@69: int snd_pcm_hw_params_is_monotonic(const snd_pcm_hw_params_t *params); jpayne@69: int snd_pcm_hw_params_can_overrange(const snd_pcm_hw_params_t *params); jpayne@69: int snd_pcm_hw_params_can_pause(const snd_pcm_hw_params_t *params); jpayne@69: int snd_pcm_hw_params_can_resume(const snd_pcm_hw_params_t *params); jpayne@69: int snd_pcm_hw_params_is_half_duplex(const snd_pcm_hw_params_t *params); jpayne@69: int snd_pcm_hw_params_is_joint_duplex(const snd_pcm_hw_params_t *params); jpayne@69: int snd_pcm_hw_params_can_sync_start(const snd_pcm_hw_params_t *params); jpayne@69: int snd_pcm_hw_params_can_disable_period_wakeup(const snd_pcm_hw_params_t *params); jpayne@69: int snd_pcm_hw_params_supports_audio_wallclock_ts(const snd_pcm_hw_params_t *params); /* deprecated, use audio_ts_type */ jpayne@69: int snd_pcm_hw_params_supports_audio_ts_type(const snd_pcm_hw_params_t *params, int type); jpayne@69: int snd_pcm_hw_params_get_rate_numden(const snd_pcm_hw_params_t *params, jpayne@69: unsigned int *rate_num, jpayne@69: unsigned int *rate_den); jpayne@69: int snd_pcm_hw_params_get_sbits(const snd_pcm_hw_params_t *params); jpayne@69: int snd_pcm_hw_params_get_fifo_size(const snd_pcm_hw_params_t *params); jpayne@69: jpayne@69: #if 0 jpayne@69: typedef struct _snd_pcm_hw_strategy snd_pcm_hw_strategy_t; jpayne@69: jpayne@69: /* choices need to be sorted on ascending badness */ jpayne@69: typedef struct _snd_pcm_hw_strategy_simple_choices_list { jpayne@69: unsigned int value; jpayne@69: unsigned int badness; jpayne@69: } snd_pcm_hw_strategy_simple_choices_list_t; jpayne@69: jpayne@69: int snd_pcm_hw_params_strategy(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, jpayne@69: const snd_pcm_hw_strategy_t *strategy, jpayne@69: unsigned int badness_min, jpayne@69: unsigned int badness_max); jpayne@69: jpayne@69: void snd_pcm_hw_strategy_free(snd_pcm_hw_strategy_t *strategy); jpayne@69: int snd_pcm_hw_strategy_simple(snd_pcm_hw_strategy_t **strategyp, jpayne@69: unsigned int badness_min, jpayne@69: unsigned int badness_max); jpayne@69: int snd_pcm_hw_params_try_explain_failure(snd_pcm_t *pcm, jpayne@69: snd_pcm_hw_params_t *fail, jpayne@69: snd_pcm_hw_params_t *success, jpayne@69: unsigned int depth, jpayne@69: snd_output_t *out); jpayne@69: jpayne@69: #endif jpayne@69: jpayne@69: size_t snd_pcm_hw_params_sizeof(void); jpayne@69: /** \hideinitializer jpayne@69: * \brief allocate an invalid #snd_pcm_hw_params_t using standard alloca jpayne@69: * \param ptr returned pointer jpayne@69: */ jpayne@69: #define snd_pcm_hw_params_alloca(ptr) __snd_alloca(ptr, snd_pcm_hw_params) jpayne@69: int snd_pcm_hw_params_malloc(snd_pcm_hw_params_t **ptr); jpayne@69: void snd_pcm_hw_params_free(snd_pcm_hw_params_t *obj); jpayne@69: void snd_pcm_hw_params_copy(snd_pcm_hw_params_t *dst, const snd_pcm_hw_params_t *src); jpayne@69: jpayne@69: #if !defined(ALSA_LIBRARY_BUILD) && !defined(ALSA_PCM_OLD_HW_PARAMS_API) jpayne@69: jpayne@69: int snd_pcm_hw_params_get_access(const snd_pcm_hw_params_t *params, snd_pcm_access_t *_access); jpayne@69: int snd_pcm_hw_params_test_access(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, snd_pcm_access_t _access); jpayne@69: int snd_pcm_hw_params_set_access(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, snd_pcm_access_t _access); jpayne@69: int snd_pcm_hw_params_set_access_first(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, snd_pcm_access_t *_access); jpayne@69: int snd_pcm_hw_params_set_access_last(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, snd_pcm_access_t *_access); jpayne@69: int snd_pcm_hw_params_set_access_mask(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, snd_pcm_access_mask_t *mask); jpayne@69: int snd_pcm_hw_params_get_access_mask(snd_pcm_hw_params_t *params, snd_pcm_access_mask_t *mask); jpayne@69: jpayne@69: int snd_pcm_hw_params_get_format(const snd_pcm_hw_params_t *params, snd_pcm_format_t *val); jpayne@69: int snd_pcm_hw_params_test_format(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, snd_pcm_format_t val); jpayne@69: int snd_pcm_hw_params_set_format(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, snd_pcm_format_t val); jpayne@69: int snd_pcm_hw_params_set_format_first(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, snd_pcm_format_t *format); jpayne@69: int snd_pcm_hw_params_set_format_last(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, snd_pcm_format_t *format); jpayne@69: int snd_pcm_hw_params_set_format_mask(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, snd_pcm_format_mask_t *mask); jpayne@69: void snd_pcm_hw_params_get_format_mask(snd_pcm_hw_params_t *params, snd_pcm_format_mask_t *mask); jpayne@69: jpayne@69: int snd_pcm_hw_params_get_subformat(const snd_pcm_hw_params_t *params, snd_pcm_subformat_t *subformat); jpayne@69: int snd_pcm_hw_params_test_subformat(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, snd_pcm_subformat_t subformat); jpayne@69: int snd_pcm_hw_params_set_subformat(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, snd_pcm_subformat_t subformat); jpayne@69: int snd_pcm_hw_params_set_subformat_first(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, snd_pcm_subformat_t *subformat); jpayne@69: int snd_pcm_hw_params_set_subformat_last(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, snd_pcm_subformat_t *subformat); jpayne@69: int snd_pcm_hw_params_set_subformat_mask(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, snd_pcm_subformat_mask_t *mask); jpayne@69: void snd_pcm_hw_params_get_subformat_mask(snd_pcm_hw_params_t *params, snd_pcm_subformat_mask_t *mask); jpayne@69: jpayne@69: int snd_pcm_hw_params_get_channels(const snd_pcm_hw_params_t *params, unsigned int *val); jpayne@69: int snd_pcm_hw_params_get_channels_min(const snd_pcm_hw_params_t *params, unsigned int *val); jpayne@69: int snd_pcm_hw_params_get_channels_max(const snd_pcm_hw_params_t *params, unsigned int *val); jpayne@69: int snd_pcm_hw_params_test_channels(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int val); jpayne@69: int snd_pcm_hw_params_set_channels(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int val); jpayne@69: int snd_pcm_hw_params_set_channels_min(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int *val); jpayne@69: int snd_pcm_hw_params_set_channels_max(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int *val); jpayne@69: int snd_pcm_hw_params_set_channels_minmax(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int *min, unsigned int *max); jpayne@69: int snd_pcm_hw_params_set_channels_near(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int *val); jpayne@69: int snd_pcm_hw_params_set_channels_first(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int *val); jpayne@69: int snd_pcm_hw_params_set_channels_last(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int *val); jpayne@69: jpayne@69: int snd_pcm_hw_params_get_rate(const snd_pcm_hw_params_t *params, unsigned int *val, int *dir); jpayne@69: int snd_pcm_hw_params_get_rate_min(const snd_pcm_hw_params_t *params, unsigned int *val, int *dir); jpayne@69: int snd_pcm_hw_params_get_rate_max(const snd_pcm_hw_params_t *params, unsigned int *val, int *dir); jpayne@69: int snd_pcm_hw_params_test_rate(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int val, int dir); jpayne@69: int snd_pcm_hw_params_set_rate(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int val, int dir); jpayne@69: int snd_pcm_hw_params_set_rate_min(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int *val, int *dir); jpayne@69: int snd_pcm_hw_params_set_rate_max(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int *val, int *dir); jpayne@69: int snd_pcm_hw_params_set_rate_minmax(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int *min, int *mindir, unsigned int *max, int *maxdir); jpayne@69: int snd_pcm_hw_params_set_rate_near(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int *val, int *dir); jpayne@69: int snd_pcm_hw_params_set_rate_first(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int *val, int *dir); jpayne@69: int snd_pcm_hw_params_set_rate_last(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int *val, int *dir); jpayne@69: int snd_pcm_hw_params_set_rate_resample(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int val); jpayne@69: int snd_pcm_hw_params_get_rate_resample(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int *val); jpayne@69: int snd_pcm_hw_params_set_export_buffer(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int val); jpayne@69: int snd_pcm_hw_params_get_export_buffer(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int *val); jpayne@69: int snd_pcm_hw_params_set_period_wakeup(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int val); jpayne@69: int snd_pcm_hw_params_get_period_wakeup(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int *val); jpayne@69: jpayne@69: int snd_pcm_hw_params_get_period_time(const snd_pcm_hw_params_t *params, unsigned int *val, int *dir); jpayne@69: int snd_pcm_hw_params_get_period_time_min(const snd_pcm_hw_params_t *params, unsigned int *val, int *dir); jpayne@69: int snd_pcm_hw_params_get_period_time_max(const snd_pcm_hw_params_t *params, unsigned int *val, int *dir); jpayne@69: int snd_pcm_hw_params_test_period_time(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int val, int dir); jpayne@69: int snd_pcm_hw_params_set_period_time(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int val, int dir); jpayne@69: int snd_pcm_hw_params_set_period_time_min(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int *val, int *dir); jpayne@69: int snd_pcm_hw_params_set_period_time_max(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int *val, int *dir); jpayne@69: int snd_pcm_hw_params_set_period_time_minmax(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int *min, int *mindir, unsigned int *max, int *maxdir); jpayne@69: int snd_pcm_hw_params_set_period_time_near(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int *val, int *dir); jpayne@69: int snd_pcm_hw_params_set_period_time_first(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int *val, int *dir); jpayne@69: int snd_pcm_hw_params_set_period_time_last(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int *val, int *dir); jpayne@69: jpayne@69: int snd_pcm_hw_params_get_period_size(const snd_pcm_hw_params_t *params, snd_pcm_uframes_t *frames, int *dir); jpayne@69: int snd_pcm_hw_params_get_period_size_min(const snd_pcm_hw_params_t *params, snd_pcm_uframes_t *frames, int *dir); jpayne@69: int snd_pcm_hw_params_get_period_size_max(const snd_pcm_hw_params_t *params, snd_pcm_uframes_t *frames, int *dir); jpayne@69: int snd_pcm_hw_params_test_period_size(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, snd_pcm_uframes_t val, int dir); jpayne@69: int snd_pcm_hw_params_set_period_size(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, snd_pcm_uframes_t val, int dir); jpayne@69: int snd_pcm_hw_params_set_period_size_min(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, snd_pcm_uframes_t *val, int *dir); jpayne@69: int snd_pcm_hw_params_set_period_size_max(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, snd_pcm_uframes_t *val, int *dir); jpayne@69: int snd_pcm_hw_params_set_period_size_minmax(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, snd_pcm_uframes_t *min, int *mindir, snd_pcm_uframes_t *max, int *maxdir); jpayne@69: int snd_pcm_hw_params_set_period_size_near(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, snd_pcm_uframes_t *val, int *dir); jpayne@69: int snd_pcm_hw_params_set_period_size_first(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, snd_pcm_uframes_t *val, int *dir); jpayne@69: int snd_pcm_hw_params_set_period_size_last(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, snd_pcm_uframes_t *val, int *dir); jpayne@69: int snd_pcm_hw_params_set_period_size_integer(snd_pcm_t *pcm, snd_pcm_hw_params_t *params); jpayne@69: jpayne@69: int snd_pcm_hw_params_get_periods(const snd_pcm_hw_params_t *params, unsigned int *val, int *dir); jpayne@69: int snd_pcm_hw_params_get_periods_min(const snd_pcm_hw_params_t *params, unsigned int *val, int *dir); jpayne@69: int snd_pcm_hw_params_get_periods_max(const snd_pcm_hw_params_t *params, unsigned int *val, int *dir); jpayne@69: int snd_pcm_hw_params_test_periods(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int val, int dir); jpayne@69: int snd_pcm_hw_params_set_periods(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int val, int dir); jpayne@69: int snd_pcm_hw_params_set_periods_min(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int *val, int *dir); jpayne@69: int snd_pcm_hw_params_set_periods_max(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int *val, int *dir); jpayne@69: int snd_pcm_hw_params_set_periods_minmax(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int *min, int *mindir, unsigned int *max, int *maxdir); jpayne@69: int snd_pcm_hw_params_set_periods_near(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int *val, int *dir); jpayne@69: int snd_pcm_hw_params_set_periods_first(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int *val, int *dir); jpayne@69: int snd_pcm_hw_params_set_periods_last(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int *val, int *dir); jpayne@69: int snd_pcm_hw_params_set_periods_integer(snd_pcm_t *pcm, snd_pcm_hw_params_t *params); jpayne@69: jpayne@69: int snd_pcm_hw_params_get_buffer_time(const snd_pcm_hw_params_t *params, unsigned int *val, int *dir); jpayne@69: int snd_pcm_hw_params_get_buffer_time_min(const snd_pcm_hw_params_t *params, unsigned int *val, int *dir); jpayne@69: int snd_pcm_hw_params_get_buffer_time_max(const snd_pcm_hw_params_t *params, unsigned int *val, int *dir); jpayne@69: int snd_pcm_hw_params_test_buffer_time(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int val, int dir); jpayne@69: int snd_pcm_hw_params_set_buffer_time(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int val, int dir); jpayne@69: int snd_pcm_hw_params_set_buffer_time_min(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int *val, int *dir); jpayne@69: int snd_pcm_hw_params_set_buffer_time_max(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int *val, int *dir); jpayne@69: int snd_pcm_hw_params_set_buffer_time_minmax(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int *min, int *mindir, unsigned int *max, int *maxdir); jpayne@69: int snd_pcm_hw_params_set_buffer_time_near(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int *val, int *dir); jpayne@69: int snd_pcm_hw_params_set_buffer_time_first(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int *val, int *dir); jpayne@69: int snd_pcm_hw_params_set_buffer_time_last(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int *val, int *dir); jpayne@69: jpayne@69: int snd_pcm_hw_params_get_buffer_size(const snd_pcm_hw_params_t *params, snd_pcm_uframes_t *val); jpayne@69: int snd_pcm_hw_params_get_buffer_size_min(const snd_pcm_hw_params_t *params, snd_pcm_uframes_t *val); jpayne@69: int snd_pcm_hw_params_get_buffer_size_max(const snd_pcm_hw_params_t *params, snd_pcm_uframes_t *val); jpayne@69: int snd_pcm_hw_params_test_buffer_size(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, snd_pcm_uframes_t val); jpayne@69: int snd_pcm_hw_params_set_buffer_size(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, snd_pcm_uframes_t val); jpayne@69: int snd_pcm_hw_params_set_buffer_size_min(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, snd_pcm_uframes_t *val); jpayne@69: int snd_pcm_hw_params_set_buffer_size_max(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, snd_pcm_uframes_t *val); jpayne@69: int snd_pcm_hw_params_set_buffer_size_minmax(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, snd_pcm_uframes_t *min, snd_pcm_uframes_t *max); jpayne@69: int snd_pcm_hw_params_set_buffer_size_near(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, snd_pcm_uframes_t *val); jpayne@69: int snd_pcm_hw_params_set_buffer_size_first(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, snd_pcm_uframes_t *val); jpayne@69: int snd_pcm_hw_params_set_buffer_size_last(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, snd_pcm_uframes_t *val); jpayne@69: jpayne@69: #endif /* !ALSA_LIBRARY_BUILD && !ALSA_PCM_OLD_HW_PARAMS_API */ jpayne@69: jpayne@69: int snd_pcm_hw_params_get_min_align(const snd_pcm_hw_params_t *params, snd_pcm_uframes_t *val); jpayne@69: jpayne@69: /** \} */ jpayne@69: jpayne@69: /** jpayne@69: * \defgroup PCM_SW_Params Software Parameters jpayne@69: * \ingroup PCM jpayne@69: * See the \ref pcm page for more details. jpayne@69: * \{ jpayne@69: */ jpayne@69: jpayne@69: size_t snd_pcm_sw_params_sizeof(void); jpayne@69: /** \hideinitializer jpayne@69: * \brief allocate an invalid #snd_pcm_sw_params_t using standard alloca jpayne@69: * \param ptr returned pointer jpayne@69: */ jpayne@69: #define snd_pcm_sw_params_alloca(ptr) __snd_alloca(ptr, snd_pcm_sw_params) jpayne@69: int snd_pcm_sw_params_malloc(snd_pcm_sw_params_t **ptr); jpayne@69: void snd_pcm_sw_params_free(snd_pcm_sw_params_t *obj); jpayne@69: void snd_pcm_sw_params_copy(snd_pcm_sw_params_t *dst, const snd_pcm_sw_params_t *src); jpayne@69: int snd_pcm_sw_params_get_boundary(const snd_pcm_sw_params_t *params, snd_pcm_uframes_t *val); jpayne@69: jpayne@69: #if !defined(ALSA_LIBRARY_BUILD) && !defined(ALSA_PCM_OLD_SW_PARAMS_API) jpayne@69: jpayne@69: int snd_pcm_sw_params_set_tstamp_mode(snd_pcm_t *pcm, snd_pcm_sw_params_t *params, snd_pcm_tstamp_t val); jpayne@69: int snd_pcm_sw_params_get_tstamp_mode(const snd_pcm_sw_params_t *params, snd_pcm_tstamp_t *val); jpayne@69: int snd_pcm_sw_params_set_tstamp_type(snd_pcm_t *pcm, snd_pcm_sw_params_t *params, snd_pcm_tstamp_type_t val); jpayne@69: int snd_pcm_sw_params_get_tstamp_type(const snd_pcm_sw_params_t *params, snd_pcm_tstamp_type_t *val); jpayne@69: int snd_pcm_sw_params_set_avail_min(snd_pcm_t *pcm, snd_pcm_sw_params_t *params, snd_pcm_uframes_t val); jpayne@69: int snd_pcm_sw_params_get_avail_min(const snd_pcm_sw_params_t *params, snd_pcm_uframes_t *val); jpayne@69: int snd_pcm_sw_params_set_period_event(snd_pcm_t *pcm, snd_pcm_sw_params_t *params, int val); jpayne@69: int snd_pcm_sw_params_get_period_event(const snd_pcm_sw_params_t *params, int *val); jpayne@69: int snd_pcm_sw_params_set_start_threshold(snd_pcm_t *pcm, snd_pcm_sw_params_t *params, snd_pcm_uframes_t val); jpayne@69: int snd_pcm_sw_params_get_start_threshold(const snd_pcm_sw_params_t *paramsm, snd_pcm_uframes_t *val); jpayne@69: int snd_pcm_sw_params_set_stop_threshold(snd_pcm_t *pcm, snd_pcm_sw_params_t *params, snd_pcm_uframes_t val); jpayne@69: int snd_pcm_sw_params_get_stop_threshold(const snd_pcm_sw_params_t *params, snd_pcm_uframes_t *val); jpayne@69: int snd_pcm_sw_params_set_silence_threshold(snd_pcm_t *pcm, snd_pcm_sw_params_t *params, snd_pcm_uframes_t val); jpayne@69: int snd_pcm_sw_params_get_silence_threshold(const snd_pcm_sw_params_t *params, snd_pcm_uframes_t *val); jpayne@69: int snd_pcm_sw_params_set_silence_size(snd_pcm_t *pcm, snd_pcm_sw_params_t *params, snd_pcm_uframes_t val); jpayne@69: int snd_pcm_sw_params_get_silence_size(const snd_pcm_sw_params_t *params, snd_pcm_uframes_t *val); jpayne@69: jpayne@69: #endif /* !ALSA_LIBRARY_BUILD && !ALSA_PCM_OLD_SW_PARAMS_API */ jpayne@69: jpayne@69: /** \} */ jpayne@69: jpayne@69: /* include old API */ jpayne@69: #ifndef ALSA_LIBRARY_BUILD jpayne@69: #if defined(ALSA_PCM_OLD_HW_PARAMS_API) || defined(ALSA_PCM_OLD_SW_PARAMS_API) jpayne@69: #include "pcm_old.h" jpayne@69: #endif jpayne@69: #endif jpayne@69: jpayne@69: /** jpayne@69: * \defgroup PCM_Access Access Mask Functions jpayne@69: * \ingroup PCM jpayne@69: * See the \ref pcm page for more details. jpayne@69: * \{ jpayne@69: */ jpayne@69: jpayne@69: size_t snd_pcm_access_mask_sizeof(void); jpayne@69: /** \hideinitializer jpayne@69: * \brief allocate an empty #snd_pcm_access_mask_t using standard alloca jpayne@69: * \param ptr returned pointer jpayne@69: */ jpayne@69: #define snd_pcm_access_mask_alloca(ptr) __snd_alloca(ptr, snd_pcm_access_mask) jpayne@69: int snd_pcm_access_mask_malloc(snd_pcm_access_mask_t **ptr); jpayne@69: void snd_pcm_access_mask_free(snd_pcm_access_mask_t *obj); jpayne@69: void snd_pcm_access_mask_copy(snd_pcm_access_mask_t *dst, const snd_pcm_access_mask_t *src); jpayne@69: void snd_pcm_access_mask_none(snd_pcm_access_mask_t *mask); jpayne@69: void snd_pcm_access_mask_any(snd_pcm_access_mask_t *mask); jpayne@69: int snd_pcm_access_mask_test(const snd_pcm_access_mask_t *mask, snd_pcm_access_t val); jpayne@69: int snd_pcm_access_mask_empty(const snd_pcm_access_mask_t *mask); jpayne@69: void snd_pcm_access_mask_set(snd_pcm_access_mask_t *mask, snd_pcm_access_t val); jpayne@69: void snd_pcm_access_mask_reset(snd_pcm_access_mask_t *mask, snd_pcm_access_t val); jpayne@69: jpayne@69: /** \} */ jpayne@69: jpayne@69: /** jpayne@69: * \defgroup PCM_Format Format Mask Functions jpayne@69: * \ingroup PCM jpayne@69: * See the \ref pcm page for more details. jpayne@69: * \{ jpayne@69: */ jpayne@69: jpayne@69: size_t snd_pcm_format_mask_sizeof(void); jpayne@69: /** \hideinitializer jpayne@69: * \brief allocate an empty #snd_pcm_format_mask_t using standard alloca jpayne@69: * \param ptr returned pointer jpayne@69: */ jpayne@69: #define snd_pcm_format_mask_alloca(ptr) __snd_alloca(ptr, snd_pcm_format_mask) jpayne@69: int snd_pcm_format_mask_malloc(snd_pcm_format_mask_t **ptr); jpayne@69: void snd_pcm_format_mask_free(snd_pcm_format_mask_t *obj); jpayne@69: void snd_pcm_format_mask_copy(snd_pcm_format_mask_t *dst, const snd_pcm_format_mask_t *src); jpayne@69: void snd_pcm_format_mask_none(snd_pcm_format_mask_t *mask); jpayne@69: void snd_pcm_format_mask_any(snd_pcm_format_mask_t *mask); jpayne@69: int snd_pcm_format_mask_test(const snd_pcm_format_mask_t *mask, snd_pcm_format_t val); jpayne@69: int snd_pcm_format_mask_empty(const snd_pcm_format_mask_t *mask); jpayne@69: void snd_pcm_format_mask_set(snd_pcm_format_mask_t *mask, snd_pcm_format_t val); jpayne@69: void snd_pcm_format_mask_reset(snd_pcm_format_mask_t *mask, snd_pcm_format_t val); jpayne@69: jpayne@69: /** \} */ jpayne@69: jpayne@69: /** jpayne@69: * \defgroup PCM_SubFormat Subformat Mask Functions jpayne@69: * \ingroup PCM jpayne@69: * See the \ref pcm page for more details. jpayne@69: * \{ jpayne@69: */ jpayne@69: jpayne@69: size_t snd_pcm_subformat_mask_sizeof(void); jpayne@69: /** \hideinitializer jpayne@69: * \brief allocate an empty #snd_pcm_subformat_mask_t using standard alloca jpayne@69: * \param ptr returned pointer jpayne@69: */ jpayne@69: #define snd_pcm_subformat_mask_alloca(ptr) __snd_alloca(ptr, snd_pcm_subformat_mask) jpayne@69: int snd_pcm_subformat_mask_malloc(snd_pcm_subformat_mask_t **ptr); jpayne@69: void snd_pcm_subformat_mask_free(snd_pcm_subformat_mask_t *obj); jpayne@69: void snd_pcm_subformat_mask_copy(snd_pcm_subformat_mask_t *dst, const snd_pcm_subformat_mask_t *src); jpayne@69: void snd_pcm_subformat_mask_none(snd_pcm_subformat_mask_t *mask); jpayne@69: void snd_pcm_subformat_mask_any(snd_pcm_subformat_mask_t *mask); jpayne@69: int snd_pcm_subformat_mask_test(const snd_pcm_subformat_mask_t *mask, snd_pcm_subformat_t val); jpayne@69: int snd_pcm_subformat_mask_empty(const snd_pcm_subformat_mask_t *mask); jpayne@69: void snd_pcm_subformat_mask_set(snd_pcm_subformat_mask_t *mask, snd_pcm_subformat_t val); jpayne@69: void snd_pcm_subformat_mask_reset(snd_pcm_subformat_mask_t *mask, snd_pcm_subformat_t val); jpayne@69: jpayne@69: /** \} */ jpayne@69: jpayne@69: /** jpayne@69: * \defgroup PCM_Status Status Functions jpayne@69: * \ingroup PCM jpayne@69: * See the \ref pcm page for more details. jpayne@69: * \{ jpayne@69: */ jpayne@69: jpayne@69: size_t snd_pcm_status_sizeof(void); jpayne@69: /** \hideinitializer jpayne@69: * \brief allocate an invalid #snd_pcm_status_t using standard alloca jpayne@69: * \param ptr returned pointer jpayne@69: */ jpayne@69: #define snd_pcm_status_alloca(ptr) __snd_alloca(ptr, snd_pcm_status) jpayne@69: int snd_pcm_status_malloc(snd_pcm_status_t **ptr); jpayne@69: void snd_pcm_status_free(snd_pcm_status_t *obj); jpayne@69: void snd_pcm_status_copy(snd_pcm_status_t *dst, const snd_pcm_status_t *src); jpayne@69: snd_pcm_state_t snd_pcm_status_get_state(const snd_pcm_status_t *obj); jpayne@69: void snd_pcm_status_get_trigger_tstamp(const snd_pcm_status_t *obj, snd_timestamp_t *ptr); jpayne@69: void snd_pcm_status_get_trigger_htstamp(const snd_pcm_status_t *obj, snd_htimestamp_t *ptr); jpayne@69: void snd_pcm_status_get_tstamp(const snd_pcm_status_t *obj, snd_timestamp_t *ptr); jpayne@69: void snd_pcm_status_get_htstamp(const snd_pcm_status_t *obj, snd_htimestamp_t *ptr); jpayne@69: void snd_pcm_status_get_audio_htstamp(const snd_pcm_status_t *obj, snd_htimestamp_t *ptr); jpayne@69: void snd_pcm_status_get_driver_htstamp(const snd_pcm_status_t *obj, snd_htimestamp_t *ptr); jpayne@69: void snd_pcm_status_get_audio_htstamp_report(const snd_pcm_status_t *obj, jpayne@69: snd_pcm_audio_tstamp_report_t *audio_tstamp_report); jpayne@69: void snd_pcm_status_set_audio_htstamp_config(snd_pcm_status_t *obj, jpayne@69: snd_pcm_audio_tstamp_config_t *audio_tstamp_config); jpayne@69: jpayne@69: static inline void snd_pcm_pack_audio_tstamp_config(unsigned int *data, jpayne@69: snd_pcm_audio_tstamp_config_t *config) jpayne@69: { jpayne@69: *data = config->report_delay; jpayne@69: *data <<= 4; jpayne@69: *data |= config->type_requested; jpayne@69: } jpayne@69: jpayne@69: static inline void snd_pcm_unpack_audio_tstamp_report(unsigned int data, unsigned int accuracy, jpayne@69: snd_pcm_audio_tstamp_report_t *report) jpayne@69: { jpayne@69: data >>= 16; jpayne@69: report->valid = data & 1; jpayne@69: report->actual_type = (data >> 1) & 0xF; jpayne@69: report->accuracy_report = (data >> 5) & 1; jpayne@69: report->accuracy = accuracy; jpayne@69: } jpayne@69: jpayne@69: snd_pcm_sframes_t snd_pcm_status_get_delay(const snd_pcm_status_t *obj); jpayne@69: snd_pcm_uframes_t snd_pcm_status_get_avail(const snd_pcm_status_t *obj); jpayne@69: snd_pcm_uframes_t snd_pcm_status_get_avail_max(const snd_pcm_status_t *obj); jpayne@69: snd_pcm_uframes_t snd_pcm_status_get_overrange(const snd_pcm_status_t *obj); jpayne@69: jpayne@69: /** \} */ jpayne@69: jpayne@69: /** jpayne@69: * \defgroup PCM_Description Description Functions jpayne@69: * \ingroup PCM jpayne@69: * See the \ref pcm page for more details. jpayne@69: * \{ jpayne@69: */ jpayne@69: jpayne@69: const char *snd_pcm_type_name(snd_pcm_type_t type); jpayne@69: const char *snd_pcm_stream_name(const snd_pcm_stream_t stream); jpayne@69: const char *snd_pcm_access_name(const snd_pcm_access_t _access); jpayne@69: const char *snd_pcm_format_name(const snd_pcm_format_t format); jpayne@69: const char *snd_pcm_format_description(const snd_pcm_format_t format); jpayne@69: const char *snd_pcm_subformat_name(const snd_pcm_subformat_t subformat); jpayne@69: const char *snd_pcm_subformat_description(const snd_pcm_subformat_t subformat); jpayne@69: snd_pcm_format_t snd_pcm_format_value(const char* name); jpayne@69: const char *snd_pcm_tstamp_mode_name(const snd_pcm_tstamp_t mode); jpayne@69: const char *snd_pcm_state_name(const snd_pcm_state_t state); jpayne@69: jpayne@69: /** \} */ jpayne@69: jpayne@69: /** jpayne@69: * \defgroup PCM_Dump Debug Functions jpayne@69: * \ingroup PCM jpayne@69: * See the \ref pcm page for more details. jpayne@69: * \{ jpayne@69: */ jpayne@69: jpayne@69: int snd_pcm_dump(snd_pcm_t *pcm, snd_output_t *out); jpayne@69: int snd_pcm_dump_hw_setup(snd_pcm_t *pcm, snd_output_t *out); jpayne@69: int snd_pcm_dump_sw_setup(snd_pcm_t *pcm, snd_output_t *out); jpayne@69: int snd_pcm_dump_setup(snd_pcm_t *pcm, snd_output_t *out); jpayne@69: int snd_pcm_hw_params_dump(snd_pcm_hw_params_t *params, snd_output_t *out); jpayne@69: int snd_pcm_sw_params_dump(snd_pcm_sw_params_t *params, snd_output_t *out); jpayne@69: int snd_pcm_status_dump(snd_pcm_status_t *status, snd_output_t *out); jpayne@69: jpayne@69: /** \} */ jpayne@69: jpayne@69: /** jpayne@69: * \defgroup PCM_Direct Direct Access (MMAP) Functions jpayne@69: * \ingroup PCM jpayne@69: * See the \ref pcm page for more details. jpayne@69: * \{ jpayne@69: */ jpayne@69: jpayne@69: int snd_pcm_mmap_begin(snd_pcm_t *pcm, jpayne@69: const snd_pcm_channel_area_t **areas, jpayne@69: snd_pcm_uframes_t *offset, jpayne@69: snd_pcm_uframes_t *frames); jpayne@69: snd_pcm_sframes_t snd_pcm_mmap_commit(snd_pcm_t *pcm, jpayne@69: snd_pcm_uframes_t offset, jpayne@69: snd_pcm_uframes_t frames); jpayne@69: snd_pcm_sframes_t snd_pcm_mmap_writei(snd_pcm_t *pcm, const void *buffer, snd_pcm_uframes_t size); jpayne@69: snd_pcm_sframes_t snd_pcm_mmap_readi(snd_pcm_t *pcm, void *buffer, snd_pcm_uframes_t size); jpayne@69: snd_pcm_sframes_t snd_pcm_mmap_writen(snd_pcm_t *pcm, void **bufs, snd_pcm_uframes_t size); jpayne@69: snd_pcm_sframes_t snd_pcm_mmap_readn(snd_pcm_t *pcm, void **bufs, snd_pcm_uframes_t size); jpayne@69: jpayne@69: /** \} */ jpayne@69: jpayne@69: /** jpayne@69: * \defgroup PCM_Helpers Helper Functions jpayne@69: * \ingroup PCM jpayne@69: * See the \ref pcm page for more details. jpayne@69: * \{ jpayne@69: */ jpayne@69: jpayne@69: int snd_pcm_format_signed(snd_pcm_format_t format); jpayne@69: int snd_pcm_format_unsigned(snd_pcm_format_t format); jpayne@69: int snd_pcm_format_linear(snd_pcm_format_t format); jpayne@69: int snd_pcm_format_float(snd_pcm_format_t format); jpayne@69: int snd_pcm_format_little_endian(snd_pcm_format_t format); jpayne@69: int snd_pcm_format_big_endian(snd_pcm_format_t format); jpayne@69: int snd_pcm_format_cpu_endian(snd_pcm_format_t format); jpayne@69: int snd_pcm_format_width(snd_pcm_format_t format); /* in bits */ jpayne@69: int snd_pcm_format_physical_width(snd_pcm_format_t format); /* in bits */ jpayne@69: snd_pcm_format_t snd_pcm_build_linear_format(int width, int pwidth, int unsignd, int big_endian); jpayne@69: ssize_t snd_pcm_format_size(snd_pcm_format_t format, size_t samples); jpayne@69: uint8_t snd_pcm_format_silence(snd_pcm_format_t format); jpayne@69: uint16_t snd_pcm_format_silence_16(snd_pcm_format_t format); jpayne@69: uint32_t snd_pcm_format_silence_32(snd_pcm_format_t format); jpayne@69: uint64_t snd_pcm_format_silence_64(snd_pcm_format_t format); jpayne@69: int snd_pcm_format_set_silence(snd_pcm_format_t format, void *buf, unsigned int samples); jpayne@69: jpayne@69: snd_pcm_sframes_t snd_pcm_bytes_to_frames(snd_pcm_t *pcm, ssize_t bytes); jpayne@69: ssize_t snd_pcm_frames_to_bytes(snd_pcm_t *pcm, snd_pcm_sframes_t frames); jpayne@69: long snd_pcm_bytes_to_samples(snd_pcm_t *pcm, ssize_t bytes); jpayne@69: ssize_t snd_pcm_samples_to_bytes(snd_pcm_t *pcm, long samples); jpayne@69: jpayne@69: int snd_pcm_area_silence(const snd_pcm_channel_area_t *dst_channel, snd_pcm_uframes_t dst_offset, jpayne@69: unsigned int samples, snd_pcm_format_t format); jpayne@69: int snd_pcm_areas_silence(const snd_pcm_channel_area_t *dst_channels, snd_pcm_uframes_t dst_offset, jpayne@69: unsigned int channels, snd_pcm_uframes_t frames, snd_pcm_format_t format); jpayne@69: int snd_pcm_area_copy(const snd_pcm_channel_area_t *dst_channel, snd_pcm_uframes_t dst_offset, jpayne@69: const snd_pcm_channel_area_t *src_channel, snd_pcm_uframes_t src_offset, jpayne@69: unsigned int samples, snd_pcm_format_t format); jpayne@69: int snd_pcm_areas_copy(const snd_pcm_channel_area_t *dst_channels, snd_pcm_uframes_t dst_offset, jpayne@69: const snd_pcm_channel_area_t *src_channels, snd_pcm_uframes_t src_offset, jpayne@69: unsigned int channels, snd_pcm_uframes_t frames, snd_pcm_format_t format); jpayne@69: int snd_pcm_areas_copy_wrap(const snd_pcm_channel_area_t *dst_channels, jpayne@69: snd_pcm_uframes_t dst_offset, jpayne@69: const snd_pcm_uframes_t dst_size, jpayne@69: const snd_pcm_channel_area_t *src_channels, jpayne@69: snd_pcm_uframes_t src_offset, jpayne@69: const snd_pcm_uframes_t src_size, jpayne@69: const unsigned int channels, jpayne@69: snd_pcm_uframes_t frames, jpayne@69: const snd_pcm_format_t format); jpayne@69: jpayne@69: /** \} */ jpayne@69: jpayne@69: /** jpayne@69: * \defgroup PCM_Hook Hook Extension jpayne@69: * \ingroup PCM jpayne@69: * See the \ref pcm page for more details. jpayne@69: * \{ jpayne@69: */ jpayne@69: jpayne@69: /** type of pcm hook */ jpayne@69: typedef enum _snd_pcm_hook_type { jpayne@69: SND_PCM_HOOK_TYPE_HW_PARAMS = 0, jpayne@69: SND_PCM_HOOK_TYPE_HW_FREE, jpayne@69: SND_PCM_HOOK_TYPE_CLOSE, jpayne@69: SND_PCM_HOOK_TYPE_LAST = SND_PCM_HOOK_TYPE_CLOSE jpayne@69: } snd_pcm_hook_type_t; jpayne@69: jpayne@69: /** PCM hook container */ jpayne@69: typedef struct _snd_pcm_hook snd_pcm_hook_t; jpayne@69: /** PCM hook callback function */ jpayne@69: typedef int (*snd_pcm_hook_func_t)(snd_pcm_hook_t *hook); jpayne@69: snd_pcm_t *snd_pcm_hook_get_pcm(snd_pcm_hook_t *hook); jpayne@69: void *snd_pcm_hook_get_private(snd_pcm_hook_t *hook); jpayne@69: void snd_pcm_hook_set_private(snd_pcm_hook_t *hook, void *private_data); jpayne@69: int snd_pcm_hook_add(snd_pcm_hook_t **hookp, snd_pcm_t *pcm, jpayne@69: snd_pcm_hook_type_t type, jpayne@69: snd_pcm_hook_func_t func, void *private_data); jpayne@69: int snd_pcm_hook_remove(snd_pcm_hook_t *hook); jpayne@69: jpayne@69: /** \} */ jpayne@69: jpayne@69: /** jpayne@69: * \defgroup PCM_Scope Scope Plugin Extension jpayne@69: * \ingroup PCM jpayne@69: * See the \ref pcm page for more details. jpayne@69: * \{ jpayne@69: */ jpayne@69: jpayne@69: /** #SND_PCM_TYPE_METER scope functions */ jpayne@69: typedef struct _snd_pcm_scope_ops { jpayne@69: /** \brief Enable and prepare it using current params jpayne@69: * \param scope scope handle jpayne@69: */ jpayne@69: int (*enable)(snd_pcm_scope_t *scope); jpayne@69: /** \brief Disable jpayne@69: * \param scope scope handle jpayne@69: */ jpayne@69: void (*disable)(snd_pcm_scope_t *scope); jpayne@69: /** \brief PCM has been started jpayne@69: * \param scope scope handle jpayne@69: */ jpayne@69: void (*start)(snd_pcm_scope_t *scope); jpayne@69: /** \brief PCM has been stopped jpayne@69: * \param scope scope handle jpayne@69: */ jpayne@69: void (*stop)(snd_pcm_scope_t *scope); jpayne@69: /** \brief New frames are present jpayne@69: * \param scope scope handle jpayne@69: */ jpayne@69: void (*update)(snd_pcm_scope_t *scope); jpayne@69: /** \brief Reset status jpayne@69: * \param scope scope handle jpayne@69: */ jpayne@69: void (*reset)(snd_pcm_scope_t *scope); jpayne@69: /** \brief PCM is closing jpayne@69: * \param scope scope handle jpayne@69: */ jpayne@69: void (*close)(snd_pcm_scope_t *scope); jpayne@69: } snd_pcm_scope_ops_t; jpayne@69: jpayne@69: snd_pcm_uframes_t snd_pcm_meter_get_bufsize(snd_pcm_t *pcm); jpayne@69: unsigned int snd_pcm_meter_get_channels(snd_pcm_t *pcm); jpayne@69: unsigned int snd_pcm_meter_get_rate(snd_pcm_t *pcm); jpayne@69: snd_pcm_uframes_t snd_pcm_meter_get_now(snd_pcm_t *pcm); jpayne@69: snd_pcm_uframes_t snd_pcm_meter_get_boundary(snd_pcm_t *pcm); jpayne@69: int snd_pcm_meter_add_scope(snd_pcm_t *pcm, snd_pcm_scope_t *scope); jpayne@69: snd_pcm_scope_t *snd_pcm_meter_search_scope(snd_pcm_t *pcm, const char *name); jpayne@69: int snd_pcm_scope_malloc(snd_pcm_scope_t **ptr); jpayne@69: void snd_pcm_scope_set_ops(snd_pcm_scope_t *scope, jpayne@69: const snd_pcm_scope_ops_t *val); jpayne@69: void snd_pcm_scope_set_name(snd_pcm_scope_t *scope, const char *val); jpayne@69: const char *snd_pcm_scope_get_name(snd_pcm_scope_t *scope); jpayne@69: void *snd_pcm_scope_get_callback_private(snd_pcm_scope_t *scope); jpayne@69: void snd_pcm_scope_set_callback_private(snd_pcm_scope_t *scope, void *val); jpayne@69: int snd_pcm_scope_s16_open(snd_pcm_t *pcm, const char *name, jpayne@69: snd_pcm_scope_t **scopep); jpayne@69: int16_t *snd_pcm_scope_s16_get_channel_buffer(snd_pcm_scope_t *scope, jpayne@69: unsigned int channel); jpayne@69: jpayne@69: /** \} */ jpayne@69: jpayne@69: /** jpayne@69: * \defgroup PCM_Simple Simple setup functions jpayne@69: * \ingroup PCM jpayne@69: * See the \ref pcm page for more details. jpayne@69: * \{ jpayne@69: */ jpayne@69: jpayne@69: /** Simple PCM latency type */ jpayne@69: typedef enum _snd_spcm_latency { jpayne@69: /** standard latency - for standard playback or capture jpayne@69: (estimated latency in one direction 350ms) */ jpayne@69: SND_SPCM_LATENCY_STANDARD = 0, jpayne@69: /** medium latency - software phones etc. jpayne@69: (estimated latency in one direction maximally 25ms */ jpayne@69: SND_SPCM_LATENCY_MEDIUM, jpayne@69: /** realtime latency - realtime applications (effect processors etc.) jpayne@69: (estimated latency in one direction 5ms and better) */ jpayne@69: SND_SPCM_LATENCY_REALTIME jpayne@69: } snd_spcm_latency_t; jpayne@69: jpayne@69: /** Simple PCM xrun type */ jpayne@69: typedef enum _snd_spcm_xrun_type { jpayne@69: /** driver / library will ignore all xruns, the stream runs forever */ jpayne@69: SND_SPCM_XRUN_IGNORE = 0, jpayne@69: /** driver / library stops the stream when an xrun occurs */ jpayne@69: SND_SPCM_XRUN_STOP jpayne@69: } snd_spcm_xrun_type_t; jpayne@69: jpayne@69: /** Simple PCM duplex type */ jpayne@69: typedef enum _snd_spcm_duplex_type { jpayne@69: /** liberal duplex - the buffer and period sizes might not match */ jpayne@69: SND_SPCM_DUPLEX_LIBERAL = 0, jpayne@69: /** pedantic duplex - the buffer and period sizes MUST match */ jpayne@69: SND_SPCM_DUPLEX_PEDANTIC jpayne@69: } snd_spcm_duplex_type_t; jpayne@69: jpayne@69: int snd_spcm_init(snd_pcm_t *pcm, jpayne@69: unsigned int rate, jpayne@69: unsigned int channels, jpayne@69: snd_pcm_format_t format, jpayne@69: snd_pcm_subformat_t subformat, jpayne@69: snd_spcm_latency_t latency, jpayne@69: snd_pcm_access_t _access, jpayne@69: snd_spcm_xrun_type_t xrun_type); jpayne@69: jpayne@69: int snd_spcm_init_duplex(snd_pcm_t *playback_pcm, jpayne@69: snd_pcm_t *capture_pcm, jpayne@69: unsigned int rate, jpayne@69: unsigned int channels, jpayne@69: snd_pcm_format_t format, jpayne@69: snd_pcm_subformat_t subformat, jpayne@69: snd_spcm_latency_t latency, jpayne@69: snd_pcm_access_t _access, jpayne@69: snd_spcm_xrun_type_t xrun_type, jpayne@69: snd_spcm_duplex_type_t duplex_type); jpayne@69: jpayne@69: int snd_spcm_init_get_params(snd_pcm_t *pcm, jpayne@69: unsigned int *rate, jpayne@69: snd_pcm_uframes_t *buffer_size, jpayne@69: snd_pcm_uframes_t *period_size); jpayne@69: jpayne@69: /** \} */ jpayne@69: jpayne@69: /** jpayne@69: * \defgroup PCM_Deprecated Deprecated Functions jpayne@69: * \ingroup PCM jpayne@69: * See the \ref pcm page for more details. jpayne@69: * \{ jpayne@69: */ jpayne@69: jpayne@69: /* Deprecated functions, for compatibility */ jpayne@69: const char *snd_pcm_start_mode_name(snd_pcm_start_t mode) __attribute__((deprecated)); jpayne@69: const char *snd_pcm_xrun_mode_name(snd_pcm_xrun_t mode) __attribute__((deprecated)); jpayne@69: int snd_pcm_sw_params_set_start_mode(snd_pcm_t *pcm, snd_pcm_sw_params_t *params, snd_pcm_start_t val) __attribute__((deprecated)); jpayne@69: snd_pcm_start_t snd_pcm_sw_params_get_start_mode(const snd_pcm_sw_params_t *params) __attribute__((deprecated)); jpayne@69: int snd_pcm_sw_params_set_xrun_mode(snd_pcm_t *pcm, snd_pcm_sw_params_t *params, snd_pcm_xrun_t val) __attribute__((deprecated)); jpayne@69: snd_pcm_xrun_t snd_pcm_sw_params_get_xrun_mode(const snd_pcm_sw_params_t *params) __attribute__((deprecated)); jpayne@69: #if !defined(ALSA_LIBRARY_BUILD) && !defined(ALSA_PCM_OLD_SW_PARAMS_API) jpayne@69: int snd_pcm_sw_params_set_xfer_align(snd_pcm_t *pcm, snd_pcm_sw_params_t *params, snd_pcm_uframes_t val) __attribute__((deprecated)); jpayne@69: int snd_pcm_sw_params_get_xfer_align(const snd_pcm_sw_params_t *params, snd_pcm_uframes_t *val) __attribute__((deprecated)); jpayne@69: int snd_pcm_sw_params_set_sleep_min(snd_pcm_t *pcm, snd_pcm_sw_params_t *params, unsigned int val) __attribute__((deprecated)); jpayne@69: int snd_pcm_sw_params_get_sleep_min(const snd_pcm_sw_params_t *params, unsigned int *val) __attribute__((deprecated)); jpayne@69: #endif /* !ALSA_LIBRARY_BUILD && !ALSA_PCM_OLD_SW_PARAMS_API */ jpayne@69: #if !defined(ALSA_LIBRARY_BUILD) && !defined(ALSA_PCM_OLD_HW_PARAMS_API) jpayne@69: int snd_pcm_hw_params_get_tick_time(const snd_pcm_hw_params_t *params, unsigned int *val, int *dir) __attribute__((deprecated)); jpayne@69: int snd_pcm_hw_params_get_tick_time_min(const snd_pcm_hw_params_t *params, unsigned int *val, int *dir) __attribute__((deprecated)); jpayne@69: int snd_pcm_hw_params_get_tick_time_max(const snd_pcm_hw_params_t *params, unsigned int *val, int *dir) __attribute__((deprecated)); jpayne@69: int snd_pcm_hw_params_test_tick_time(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int val, int dir) __attribute__((deprecated)); jpayne@69: int snd_pcm_hw_params_set_tick_time(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int val, int dir) __attribute__((deprecated)); jpayne@69: int snd_pcm_hw_params_set_tick_time_min(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int *val, int *dir) __attribute__((deprecated)); jpayne@69: int snd_pcm_hw_params_set_tick_time_max(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int *val, int *dir) __attribute__((deprecated)); jpayne@69: int snd_pcm_hw_params_set_tick_time_minmax(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int *min, int *mindir, unsigned int *max, int *maxdir) __attribute__((deprecated)); jpayne@69: int snd_pcm_hw_params_set_tick_time_near(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int *val, int *dir) __attribute__((deprecated)); jpayne@69: int snd_pcm_hw_params_set_tick_time_first(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int *val, int *dir) __attribute__((deprecated)); jpayne@69: int snd_pcm_hw_params_set_tick_time_last(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int *val, int *dir) __attribute__((deprecated)); jpayne@69: #endif /* !ALSA_LIBRARY_BUILD && !ALSA_PCM_OLD_HW_PARAMS_API */ jpayne@69: jpayne@69: /** \} */ jpayne@69: jpayne@69: #ifdef __cplusplus jpayne@69: } jpayne@69: #endif jpayne@69: jpayne@69: #endif /* __ALSA_PCM_H */