29#if !defined(__ASOUNDLIB_H) && !defined(ALSA_LIBRARY_BUILD)
31#warning "use #include <alsa/asoundlib.h>, <alsa/pcm.h> should not be used directly"
32#include <alsa/asoundlib.h>
49#define SND_PCM_DLSYM_VERSION _dlsym_pcm_001
52typedef struct _snd_pcm_info snd_pcm_info_t;
68typedef struct _snd_pcm_hw_params snd_pcm_hw_params_t;
71typedef struct _snd_pcm_sw_params snd_pcm_sw_params_t;
73 typedef struct _snd_pcm_status snd_pcm_status_t;
75typedef struct _snd_pcm_access_mask snd_pcm_access_mask_t;
77typedef struct _snd_pcm_format_mask snd_pcm_format_mask_t;
79typedef struct _snd_pcm_subformat_mask snd_pcm_subformat_mask_t;
82typedef enum _snd_pcm_class {
85 SND_PCM_CLASS_GENERIC = 0,
91 SND_PCM_CLASS_DIGITIZER,
92 SND_PCM_CLASS_LAST = SND_PCM_CLASS_DIGITIZER
96typedef enum _snd_pcm_subclass {
98 SND_PCM_SUBCLASS_GENERIC_MIX = 0,
100 SND_PCM_SUBCLASS_MULTI_MIX,
101 SND_PCM_SUBCLASS_LAST = SND_PCM_SUBCLASS_MULTI_MIX
105typedef enum _snd_pcm_stream {
107 SND_PCM_STREAM_PLAYBACK = 0,
109 SND_PCM_STREAM_CAPTURE,
110 SND_PCM_STREAM_LAST = SND_PCM_STREAM_CAPTURE
114typedef enum _snd_pcm_access {
116 SND_PCM_ACCESS_MMAP_INTERLEAVED = 0,
118 SND_PCM_ACCESS_MMAP_NONINTERLEAVED,
120 SND_PCM_ACCESS_MMAP_COMPLEX,
122 SND_PCM_ACCESS_RW_INTERLEAVED,
124 SND_PCM_ACCESS_RW_NONINTERLEAVED,
125 SND_PCM_ACCESS_LAST = SND_PCM_ACCESS_RW_NONINTERLEAVED
129typedef enum _snd_pcm_format {
131 SND_PCM_FORMAT_UNKNOWN = -1,
133 SND_PCM_FORMAT_S8 = 0,
137 SND_PCM_FORMAT_S16_LE,
139 SND_PCM_FORMAT_S16_BE,
141 SND_PCM_FORMAT_U16_LE,
143 SND_PCM_FORMAT_U16_BE,
145 SND_PCM_FORMAT_S24_LE,
147 SND_PCM_FORMAT_S24_BE,
149 SND_PCM_FORMAT_U24_LE,
151 SND_PCM_FORMAT_U24_BE,
153 SND_PCM_FORMAT_S32_LE,
155 SND_PCM_FORMAT_S32_BE,
157 SND_PCM_FORMAT_U32_LE,
159 SND_PCM_FORMAT_U32_BE,
161 SND_PCM_FORMAT_FLOAT_LE,
163 SND_PCM_FORMAT_FLOAT_BE,
165 SND_PCM_FORMAT_FLOAT64_LE,
167 SND_PCM_FORMAT_FLOAT64_BE,
169 SND_PCM_FORMAT_IEC958_SUBFRAME_LE,
171 SND_PCM_FORMAT_IEC958_SUBFRAME_BE,
173 SND_PCM_FORMAT_MU_LAW,
175 SND_PCM_FORMAT_A_LAW,
177 SND_PCM_FORMAT_IMA_ADPCM,
183 SND_PCM_FORMAT_S20_LE,
185 SND_PCM_FORMAT_S20_BE,
187 SND_PCM_FORMAT_U20_LE,
189 SND_PCM_FORMAT_U20_BE,
191 SND_PCM_FORMAT_SPECIAL = 31,
193 SND_PCM_FORMAT_S24_3LE = 32,
195 SND_PCM_FORMAT_S24_3BE,
197 SND_PCM_FORMAT_U24_3LE,
199 SND_PCM_FORMAT_U24_3BE,
201 SND_PCM_FORMAT_S20_3LE,
203 SND_PCM_FORMAT_S20_3BE,
205 SND_PCM_FORMAT_U20_3LE,
207 SND_PCM_FORMAT_U20_3BE,
209 SND_PCM_FORMAT_S18_3LE,
211 SND_PCM_FORMAT_S18_3BE,
213 SND_PCM_FORMAT_U18_3LE,
215 SND_PCM_FORMAT_U18_3BE,
217 SND_PCM_FORMAT_G723_24,
219 SND_PCM_FORMAT_G723_24_1B,
221 SND_PCM_FORMAT_G723_40,
223 SND_PCM_FORMAT_G723_40_1B,
225 SND_PCM_FORMAT_DSD_U8,
227 SND_PCM_FORMAT_DSD_U16_LE,
229 SND_PCM_FORMAT_DSD_U32_LE,
231 SND_PCM_FORMAT_DSD_U16_BE,
233 SND_PCM_FORMAT_DSD_U32_BE,
234 SND_PCM_FORMAT_LAST = SND_PCM_FORMAT_DSD_U32_BE,
236#if __BYTE_ORDER == __LITTLE_ENDIAN
238 SND_PCM_FORMAT_S16 = SND_PCM_FORMAT_S16_LE,
240 SND_PCM_FORMAT_U16 = SND_PCM_FORMAT_U16_LE,
242 SND_PCM_FORMAT_S24 = SND_PCM_FORMAT_S24_LE,
244 SND_PCM_FORMAT_U24 = SND_PCM_FORMAT_U24_LE,
246 SND_PCM_FORMAT_S32 = SND_PCM_FORMAT_S32_LE,
248 SND_PCM_FORMAT_U32 = SND_PCM_FORMAT_U32_LE,
250 SND_PCM_FORMAT_FLOAT = SND_PCM_FORMAT_FLOAT_LE,
252 SND_PCM_FORMAT_FLOAT64 = SND_PCM_FORMAT_FLOAT64_LE,
254 SND_PCM_FORMAT_IEC958_SUBFRAME = SND_PCM_FORMAT_IEC958_SUBFRAME_LE,
256 SND_PCM_FORMAT_S20 = SND_PCM_FORMAT_S20_LE,
258 SND_PCM_FORMAT_U20 = SND_PCM_FORMAT_U20_LE,
259#elif __BYTE_ORDER == __BIG_ENDIAN
261 SND_PCM_FORMAT_S16 = SND_PCM_FORMAT_S16_BE,
263 SND_PCM_FORMAT_U16 = SND_PCM_FORMAT_U16_BE,
265 SND_PCM_FORMAT_S24 = SND_PCM_FORMAT_S24_BE,
267 SND_PCM_FORMAT_U24 = SND_PCM_FORMAT_U24_BE,
269 SND_PCM_FORMAT_S32 = SND_PCM_FORMAT_S32_BE,
271 SND_PCM_FORMAT_U32 = SND_PCM_FORMAT_U32_BE,
273 SND_PCM_FORMAT_FLOAT = SND_PCM_FORMAT_FLOAT_BE,
275 SND_PCM_FORMAT_FLOAT64 = SND_PCM_FORMAT_FLOAT64_BE,
277 SND_PCM_FORMAT_IEC958_SUBFRAME = SND_PCM_FORMAT_IEC958_SUBFRAME_BE,
279 SND_PCM_FORMAT_S20 = SND_PCM_FORMAT_S20_BE,
281 SND_PCM_FORMAT_U20 = SND_PCM_FORMAT_U20_BE,
283#error "Unknown endian"
288typedef enum _snd_pcm_subformat {
290 SND_PCM_SUBFORMAT_UNKNOWN = -1,
292 SND_PCM_SUBFORMAT_STD = 0,
294 SND_PCM_SUBFORMAT_MSBITS_MAX = 1,
296 SND_PCM_SUBFORMAT_MSBITS_20 = 2,
298 SND_PCM_SUBFORMAT_MSBITS_24 = 3,
299 SND_PCM_SUBFORMAT_LAST = SND_PCM_SUBFORMAT_MSBITS_24
300} snd_pcm_subformat_t;
303typedef enum _snd_pcm_state {
305 SND_PCM_STATE_OPEN = 0,
309 SND_PCM_STATE_PREPARED,
311 SND_PCM_STATE_RUNNING,
315 SND_PCM_STATE_DRAINING,
317 SND_PCM_STATE_PAUSED,
319 SND_PCM_STATE_SUSPENDED,
321 SND_PCM_STATE_DISCONNECTED,
322 SND_PCM_STATE_LAST = SND_PCM_STATE_DISCONNECTED,
324 SND_PCM_STATE_PRIVATE1 = 1024
328typedef enum _snd_pcm_start {
330 SND_PCM_START_DATA = 0,
332 SND_PCM_START_EXPLICIT,
333 SND_PCM_START_LAST = SND_PCM_START_EXPLICIT
337typedef enum _snd_pcm_xrun {
339 SND_PCM_XRUN_NONE = 0,
342 SND_PCM_XRUN_LAST = SND_PCM_XRUN_STOP
346typedef enum _snd_pcm_tstamp {
348 SND_PCM_TSTAMP_NONE = 0,
350 SND_PCM_TSTAMP_ENABLE,
354 SND_PCM_TSTAMP_MMAP = SND_PCM_TSTAMP_ENABLE,
355 SND_PCM_TSTAMP_LAST = SND_PCM_TSTAMP_ENABLE
359typedef enum _snd_pcm_tstamp_type {
360 SND_PCM_TSTAMP_TYPE_GETTIMEOFDAY = 0,
361 SND_PCM_TSTAMP_TYPE_MONOTONIC,
362 SND_PCM_TSTAMP_TYPE_MONOTONIC_RAW,
363 SND_PCM_TSTAMP_TYPE_LAST = SND_PCM_TSTAMP_TYPE_MONOTONIC_RAW,
364} snd_pcm_tstamp_type_t;
367typedef enum _snd_pcm_audio_tstamp_type {
372 SND_PCM_AUDIO_TSTAMP_TYPE_COMPAT = 0,
373 SND_PCM_AUDIO_TSTAMP_TYPE_DEFAULT = 1,
374 SND_PCM_AUDIO_TSTAMP_TYPE_LINK = 2,
375 SND_PCM_AUDIO_TSTAMP_TYPE_LINK_ABSOLUTE = 3,
376 SND_PCM_AUDIO_TSTAMP_TYPE_LINK_ESTIMATED = 4,
377 SND_PCM_AUDIO_TSTAMP_TYPE_LINK_SYNCHRONIZED = 5,
378 SND_PCM_AUDIO_TSTAMP_TYPE_LAST = SND_PCM_AUDIO_TSTAMP_TYPE_LINK_SYNCHRONIZED
379} snd_pcm_audio_tstamp_type_t;
382typedef struct _snd_pcm_audio_tstamp_config {
384 unsigned int type_requested:4;
385 unsigned int report_delay:1;
386} snd_pcm_audio_tstamp_config_t;
389typedef struct _snd_pcm_audio_tstamp_report {
392 unsigned int valid:1;
393 unsigned int actual_type:4;
395 unsigned int accuracy_report:1;
396 unsigned int accuracy;
397} snd_pcm_audio_tstamp_report_t;
400typedef unsigned long snd_pcm_uframes_t;
402typedef long snd_pcm_sframes_t;
405#define SND_PCM_NONBLOCK 0x00000001
407#define SND_PCM_ASYNC 0x00000002
409#define SND_PCM_EINTR 0x00000080
411#define SND_PCM_ABORT 0x00008000
413#define SND_PCM_NO_AUTO_RESAMPLE 0x00010000
415#define SND_PCM_NO_AUTO_CHANNELS 0x00020000
417#define SND_PCM_NO_AUTO_FORMAT 0x00040000
419#define SND_PCM_NO_SOFTVOL 0x00080000
422typedef struct _snd_pcm snd_pcm_t;
466 SND_PCM_TYPE_LBSERVER,
468 SND_PCM_TYPE_LINEAR_FLOAT,
482 SND_PCM_TYPE_SOFTVOL,
486 SND_PCM_TYPE_EXTPLUG,
488 SND_PCM_TYPE_MMAP_EMUL,
489 SND_PCM_TYPE_LAST = SND_PCM_TYPE_MMAP_EMUL
493typedef enum _snd_pcm_type snd_pcm_type_t;
496typedef struct _snd_pcm_channel_area {
503} snd_pcm_channel_area_t;
506typedef union _snd_pcm_sync_id {
508 unsigned char id[16];
510 unsigned short id16[8];
512 unsigned int id32[4];
516#define SND_PCM_HW_PARAMS_SYNC_SIZE 16
519#define SND_PCM_WAIT_INFINITE (-1)
521#define SND_PCM_WAIT_IO (-10001)
523#define SND_PCM_WAIT_DRAIN (-10002)
526typedef struct _snd_pcm_scope snd_pcm_scope_t;
529 snd_pcm_stream_t stream,
int mode);
531 snd_pcm_stream_t stream,
int mode,
532 snd_config_t *lconf);
534 const char *name,
const char *orig_name,
535 snd_pcm_stream_t stream,
int mode);
545static __inline__
int snd_pcm_abort(snd_pcm_t *pcm) {
return snd_pcm_nonblock(pcm, 2); }
547 snd_async_callback_t callback,
void *private_data);
566int snd_pcm_htimestamp(snd_pcm_t *pcm, snd_pcm_uframes_t *avail, snd_htimestamp_t *tstamp);
569int snd_pcm_avail_delay(snd_pcm_t *pcm, snd_pcm_sframes_t *availp, snd_pcm_sframes_t *delayp);
571snd_pcm_sframes_t
snd_pcm_rewind(snd_pcm_t *pcm, snd_pcm_uframes_t frames);
573snd_pcm_sframes_t
snd_pcm_forward(snd_pcm_t *pcm, snd_pcm_uframes_t frames);
574snd_pcm_sframes_t
snd_pcm_writei(snd_pcm_t *pcm,
const void *buffer, snd_pcm_uframes_t size);
575snd_pcm_sframes_t
snd_pcm_readi(snd_pcm_t *pcm,
void *buffer, snd_pcm_uframes_t size);
576snd_pcm_sframes_t
snd_pcm_writen(snd_pcm_t *pcm,
void **bufs, snd_pcm_uframes_t size);
577snd_pcm_sframes_t
snd_pcm_readn(snd_pcm_t *pcm,
void **bufs, snd_pcm_uframes_t size);
584#define SND_CHMAP_API_VERSION ((1 << 16) | (0 << 8) | 1)
587enum snd_pcm_chmap_type {
588 SND_CHMAP_TYPE_NONE = 0,
589 SND_CHMAP_TYPE_FIXED,
591 SND_CHMAP_TYPE_PAIRED,
592 SND_CHMAP_TYPE_LAST = SND_CHMAP_TYPE_PAIRED,
596enum snd_pcm_chmap_position {
597 SND_CHMAP_UNKNOWN = 0,
634 SND_CHMAP_LAST = SND_CHMAP_BRC,
638#define SND_CHMAP_POSITION_MASK 0xffff
641#define SND_CHMAP_PHASE_INVERSE (0x01 << 16)
643#define SND_CHMAP_DRIVER_SPEC (0x02 << 16)
646typedef struct snd_pcm_chmap {
647 unsigned int channels;
652typedef struct snd_pcm_chmap_query {
653 enum snd_pcm_chmap_type type;
655} snd_pcm_chmap_query_t;
661 snd_pcm_stream_t stream);
682 snd_pcm_format_t format,
683 snd_pcm_access_t access,
684 unsigned int channels,
687 unsigned int latency);
689 snd_pcm_uframes_t *buffer_size,
690 snd_pcm_uframes_t *period_size);
706#define snd_pcm_info_alloca(ptr) __snd_alloca(ptr, snd_pcm_info)
753 unsigned int *rate_num,
754 unsigned int *rate_den);
760typedef struct _snd_pcm_hw_strategy snd_pcm_hw_strategy_t;
763typedef struct _snd_pcm_hw_strategy_simple_choices_list {
765 unsigned int badness;
766} snd_pcm_hw_strategy_simple_choices_list_t;
768int snd_pcm_hw_params_strategy(snd_pcm_t *pcm, snd_pcm_hw_params_t *params,
769 const snd_pcm_hw_strategy_t *strategy,
770 unsigned int badness_min,
771 unsigned int badness_max);
773void snd_pcm_hw_strategy_free(snd_pcm_hw_strategy_t *strategy);
774int snd_pcm_hw_strategy_simple(snd_pcm_hw_strategy_t **strategyp,
775 unsigned int badness_min,
776 unsigned int badness_max);
777int snd_pcm_hw_params_try_explain_failure(snd_pcm_t *pcm,
778 snd_pcm_hw_params_t *fail,
779 snd_pcm_hw_params_t *success,
790#define snd_pcm_hw_params_alloca(ptr) __snd_alloca(ptr, snd_pcm_hw_params)
795#if !defined(ALSA_LIBRARY_BUILD) && !defined(ALSA_PCM_OLD_HW_PARAMS_API)
933#define snd_pcm_sw_params_alloca(ptr) __snd_alloca(ptr, snd_pcm_sw_params)
939#if !defined(ALSA_LIBRARY_BUILD) && !defined(ALSA_PCM_OLD_SW_PARAMS_API)
963#ifndef ALSA_LIBRARY_BUILD
964#if defined(ALSA_PCM_OLD_HW_PARAMS_API) || defined(ALSA_PCM_OLD_SW_PARAMS_API)
981#define snd_pcm_access_mask_alloca(ptr) __snd_alloca(ptr, snd_pcm_access_mask)
1006#define snd_pcm_format_mask_alloca(ptr) __snd_alloca(ptr, snd_pcm_format_mask)
1031#define snd_pcm_subformat_mask_alloca(ptr) __snd_alloca(ptr, snd_pcm_subformat_mask)
1056#define snd_pcm_status_alloca(ptr) __snd_alloca(ptr, snd_pcm_status)
1068 snd_pcm_audio_tstamp_report_t *audio_tstamp_report);
1070 snd_pcm_audio_tstamp_config_t *audio_tstamp_config);
1072static inline void snd_pcm_pack_audio_tstamp_config(
unsigned int *data,
1073 snd_pcm_audio_tstamp_config_t *config)
1075 *data = config->report_delay;
1077 *data |= config->type_requested;
1080static inline void snd_pcm_unpack_audio_tstamp_report(
unsigned int data,
unsigned int accuracy,
1081 snd_pcm_audio_tstamp_report_t *report)
1084 report->valid = data & 1;
1085 report->actual_type = (data >> 1) & 0xF;
1086 report->accuracy_report = (data >> 5) & 1;
1087 report->accuracy = accuracy;
1143 const snd_pcm_channel_area_t **areas,
1144 snd_pcm_uframes_t *offset,
1145 snd_pcm_uframes_t *frames);
1147 snd_pcm_uframes_t offset,
1148 snd_pcm_uframes_t frames);
1149snd_pcm_sframes_t snd_pcm_mmap_writei(snd_pcm_t *pcm,
const void *buffer, snd_pcm_uframes_t size);
1150snd_pcm_sframes_t snd_pcm_mmap_readi(snd_pcm_t *pcm,
void *buffer, snd_pcm_uframes_t size);
1151snd_pcm_sframes_t snd_pcm_mmap_writen(snd_pcm_t *pcm,
void **bufs, snd_pcm_uframes_t size);
1152snd_pcm_sframes_t snd_pcm_mmap_readn(snd_pcm_t *pcm,
void **bufs, snd_pcm_uframes_t size);
1163int snd_pcm_format_signed(snd_pcm_format_t format);
1164int snd_pcm_format_unsigned(snd_pcm_format_t format);
1165int snd_pcm_format_linear(snd_pcm_format_t format);
1166int snd_pcm_format_float(snd_pcm_format_t format);
1167int snd_pcm_format_little_endian(snd_pcm_format_t format);
1168int snd_pcm_format_big_endian(snd_pcm_format_t format);
1169int snd_pcm_format_cpu_endian(snd_pcm_format_t format);
1170int snd_pcm_format_width(snd_pcm_format_t format);
1171int snd_pcm_format_physical_width(snd_pcm_format_t format);
1172snd_pcm_format_t snd_pcm_build_linear_format(
int width,
int pwidth,
int unsignd,
int big_endian);
1173ssize_t snd_pcm_format_size(snd_pcm_format_t format,
size_t samples);
1174uint8_t snd_pcm_format_silence(snd_pcm_format_t format);
1175uint16_t snd_pcm_format_silence_16(snd_pcm_format_t format);
1176uint32_t snd_pcm_format_silence_32(snd_pcm_format_t format);
1177uint64_t snd_pcm_format_silence_64(snd_pcm_format_t format);
1178int snd_pcm_format_set_silence(snd_pcm_format_t format,
void *buf,
unsigned int samples);
1185int snd_pcm_area_silence(
const snd_pcm_channel_area_t *dst_channel, snd_pcm_uframes_t dst_offset,
1186 unsigned int samples, snd_pcm_format_t format);
1188 unsigned int channels, snd_pcm_uframes_t frames, snd_pcm_format_t format);
1189int snd_pcm_area_copy(
const snd_pcm_channel_area_t *dst_channel, snd_pcm_uframes_t dst_offset,
1190 const snd_pcm_channel_area_t *src_channel, snd_pcm_uframes_t src_offset,
1191 unsigned int samples, snd_pcm_format_t format);
1192int snd_pcm_areas_copy(
const snd_pcm_channel_area_t *dst_channels, snd_pcm_uframes_t dst_offset,
1193 const snd_pcm_channel_area_t *src_channels, snd_pcm_uframes_t src_offset,
1194 unsigned int channels, snd_pcm_uframes_t frames, snd_pcm_format_t format);
1196 snd_pcm_uframes_t dst_offset,
1197 const snd_pcm_uframes_t dst_size,
1198 const snd_pcm_channel_area_t *src_channels,
1199 snd_pcm_uframes_t src_offset,
1200 const snd_pcm_uframes_t src_size,
1201 const unsigned int channels,
1202 snd_pcm_uframes_t frames,
1203 const snd_pcm_format_t format);
1212static inline void *snd_pcm_channel_area_addr(
const snd_pcm_channel_area_t *area, snd_pcm_uframes_t offset)
1214 return (
char *)area->addr + (area->first + area->step * offset) / 8;
1223static inline unsigned int snd_pcm_channel_area_step(
const snd_pcm_channel_area_t *area)
1225 return area->step / 8;
1238typedef enum _snd_pcm_hook_type {
1239 SND_PCM_HOOK_TYPE_HW_PARAMS = 0,
1240 SND_PCM_HOOK_TYPE_HW_FREE,
1241 SND_PCM_HOOK_TYPE_CLOSE,
1242 SND_PCM_HOOK_TYPE_LAST = SND_PCM_HOOK_TYPE_CLOSE
1243} snd_pcm_hook_type_t;
1246typedef struct _snd_pcm_hook snd_pcm_hook_t;
1248typedef int (*snd_pcm_hook_func_t)(snd_pcm_hook_t *hook);
1253 snd_pcm_hook_type_t type,
1254 snd_pcm_hook_func_t func,
void *private_data);
1267typedef struct _snd_pcm_scope_ops {
1271 int (*enable)(snd_pcm_scope_t *scope);
1275 void (*disable)(snd_pcm_scope_t *scope);
1279 void (*start)(snd_pcm_scope_t *scope);
1283 void (*stop)(snd_pcm_scope_t *scope);
1287 void (*update)(snd_pcm_scope_t *scope);
1291 void (*reset)(snd_pcm_scope_t *scope);
1295 void (*close)(snd_pcm_scope_t *scope);
1296} snd_pcm_scope_ops_t;
1307 const snd_pcm_scope_ops_t *val);
1313 snd_pcm_scope_t **scopep);
1315 unsigned int channel);
1327typedef enum _snd_spcm_latency {
1330 SND_SPCM_LATENCY_STANDARD = 0,
1333 SND_SPCM_LATENCY_MEDIUM,
1336 SND_SPCM_LATENCY_REALTIME
1337} snd_spcm_latency_t;
1340typedef enum _snd_spcm_xrun_type {
1342 SND_SPCM_XRUN_IGNORE = 0,
1345} snd_spcm_xrun_type_t;
1348typedef enum _snd_spcm_duplex_type {
1350 SND_SPCM_DUPLEX_LIBERAL = 0,
1352 SND_SPCM_DUPLEX_PEDANTIC
1353} snd_spcm_duplex_type_t;
1357 unsigned int channels,
1358 snd_pcm_format_t format,
1359 snd_pcm_subformat_t subformat,
1360 snd_spcm_latency_t latency,
1361 snd_pcm_access_t _access,
1362 snd_spcm_xrun_type_t xrun_type);
1365 snd_pcm_t *capture_pcm,
1367 unsigned int channels,
1368 snd_pcm_format_t format,
1369 snd_pcm_subformat_t subformat,
1370 snd_spcm_latency_t latency,
1371 snd_pcm_access_t _access,
1372 snd_spcm_xrun_type_t xrun_type,
1373 snd_spcm_duplex_type_t duplex_type);
1377 snd_pcm_uframes_t *buffer_size,
1378 snd_pcm_uframes_t *period_size);
1396#if !defined(ALSA_LIBRARY_BUILD) && !defined(ALSA_PCM_OLD_SW_PARAMS_API)
1402#if !defined(ALSA_LIBRARY_BUILD) && !defined(ALSA_PCM_OLD_HW_PARAMS_API)
int snd_pcm_delay(snd_pcm_t *pcm, snd_pcm_sframes_t *delayp)
Obtain delay for a running PCM handle.
Definition pcm.c:1152
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)
Restrict a configuration space to have rates in a given range.
Definition pcm.c:4911
void snd_pcm_format_mask_set(snd_pcm_format_mask_t *mask, snd_pcm_format_t val)
make a format present in a #snd_pcm_format_mask_t
Definition pcm.c:4178
int snd_pcm_close(snd_pcm_t *pcm)
close PCM handle
Definition pcm.c:776
int snd_pcm_sw_params_get_period_event(const snd_pcm_sw_params_t *params, int *val)
Get period event from a software configuration container.
Definition pcm.c:6740
const char * snd_pcm_access_name(const snd_pcm_access_t acc)
get name of PCM access type
Definition pcm.c:2141
size_t snd_pcm_subformat_mask_sizeof()
get size of #snd_pcm_subformat_mask_t
Definition pcm.c:4198
int snd_pcm_hw_params_set_subformat(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, snd_pcm_subformat_t subformat)
Restrict a configuration space to contain only one subformat.
Definition pcm.c:4570
void snd_pcm_free_chmaps(snd_pcm_chmap_query_t **maps)
Definition pcm.c:8316
int snd_pcm_hw_params_get_period_size_max(const snd_pcm_hw_params_t *params, snd_pcm_uframes_t *val, int *dir)
Extract maximum period size from a configuration space.
Definition pcm.c:5369
int snd_pcm_sw_params_get_sleep_min(const snd_pcm_sw_params_t *params, unsigned int *val)
(DEPRECATED) Get minimum numbers of ticks to sleep from a software configuration container
Definition pcm.c:6660
int snd_pcm_unlink(snd_pcm_t *pcm)
Remove a PCM from a linked group.
Definition pcm.c:1732
int snd_pcm_hw_params_test_periods(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int val, int dir)
Verify if a periods count is available inside a configuration space for a PCM.
Definition pcm.c:5614
snd_pcm_sframes_t snd_pcm_rewindable(snd_pcm_t *pcm)
Get safe count of frames which can be rewinded.
Definition pcm.c:1424
int snd_pcm_hw_params_dump(snd_pcm_hw_params_t *params, snd_output_t *out)
Dump a PCM hardware configuration space.
Definition pcm.c:3558
size_t snd_pcm_hw_params_sizeof()
get size of #snd_pcm_hw_params_t
Definition pcm.c:4301
int snd_pcm_hw_params_set_subformat_first(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, snd_pcm_subformat_t *subformat)
Restrict a configuration space to contain only its first subformat.
Definition pcm.c:4585
int snd_pcm_open_fallback(snd_pcm_t **pcmp, snd_config_t *root, const char *name, const char *orig_name, snd_pcm_stream_t stream, int mode)
Opens a fallback PCM.
Definition pcm.c:2792
int snd_pcm_hw_params_get_fifo_size(const snd_pcm_hw_params_t *params)
Get hardware FIFO size info from a configuration space.
Definition pcm.c:3941
int snd_pcm_resume(snd_pcm_t *pcm)
Resume from suspend, no samples are lost.
Definition pcm.c:1181
int snd_pcm_hw_params_set_periods_last(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int *val, int *dir)
Restrict a configuration space to contain only its maximum periods count.
Definition pcm.c:5732
unsigned int snd_pcm_info_get_device(const snd_pcm_info_t *obj)
Get device from a PCM info container.
Definition pcm.c:7237
void snd_pcm_info_copy(snd_pcm_info_t *dst, const snd_pcm_info_t *src)
copy one #snd_pcm_info_t to another
Definition pcm.c:7226
int snd_pcm_hw_params_set_period_size_integer(snd_pcm_t *pcm, snd_pcm_hw_params_t *params)
Restrict a configuration space to contain only integer period sizes.
Definition pcm.c:5544
int snd_pcm_hw_params_set_channels_min(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int *val)
Restrict a configuration space with a minimum channels count.
Definition pcm.c:4706
void snd_pcm_status_get_audio_htstamp(const snd_pcm_status_t *obj, snd_htimestamp_t *ptr)
Get "now" hi-res audio timestamp from a PCM status container.
Definition pcm.c:7097
int snd_pcm_avail_delay(snd_pcm_t *pcm, snd_pcm_sframes_t *availp, snd_pcm_sframes_t *delayp)
Combine snd_pcm_avail and snd_pcm_delay functions.
Definition pcm.c:3105
int snd_pcm_area_silence(const snd_pcm_channel_area_t *dst_area, snd_pcm_uframes_t dst_offset, unsigned int samples, snd_pcm_format_t format)
Silence an area.
Definition pcm.c:3144
int snd_pcm_hw_params_get_periods_min(const snd_pcm_hw_params_t *params, unsigned int *val, int *dir)
Extract minimum periods count from a configuration space.
Definition pcm.c:5580
int snd_pcm_hw_params_get_buffer_size_min(const snd_pcm_hw_params_t *params, snd_pcm_uframes_t *val)
Extract minimum buffer size from a configuration space.
Definition pcm.c:5967
const char * snd_pcm_chmap_name(enum snd_pcm_chmap_position val)
Definition pcm.c:8410
int snd_pcm_hw_params(snd_pcm_t *pcm, snd_pcm_hw_params_t *params)
Install one PCM hardware configuration chosen from a configuration space and snd_pcm_prepare it.
Definition pcm.c:951
int snd_pcm_sw_params_get_tstamp_type(const snd_pcm_sw_params_t *params, snd_pcm_tstamp_type_t *val)
Get timestamp type from a software configuration container.
Definition pcm.c:6628
int snd_pcm_sw_params_set_start_threshold(snd_pcm_t *pcm, snd_pcm_sw_params_t *params, snd_pcm_uframes_t val)
Set start threshold inside a software configuration container.
Definition pcm.c:6792
int snd_pcm_hw_params_get_drain_silence(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int *val)
Extract drain with the filling of silence samples from a configuration space.
Definition pcm.c:5118
void snd_pcm_subformat_mask_free(snd_pcm_subformat_mask_t *obj)
frees a previously allocated #snd_pcm_subformat_mask_t
Definition pcm.c:4221
int snd_pcm_chmap_print(const snd_pcm_chmap_t *map, size_t maxlen, char *buf)
Definition pcm.c:8478
int snd_pcm_hw_params_set_tick_time_max(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int *val, int *dir)
(DEPRECATED) Restrict a configuration space with a maximum tick time
Definition pcm.c:6249
snd_pcm_sframes_t snd_pcm_status_get_delay(const snd_pcm_status_t *obj)
Get delay from a PCM status container (see snd_pcm_delay)
Definition pcm.c:7151
int snd_pcm_hw_params_get_access_mask(snd_pcm_hw_params_t *params, snd_pcm_access_mask_t *mask)
Get access mask from a configuration space.
Definition pcm.c:4433
int snd_pcm_subformat_mask_test(const snd_pcm_subformat_mask_t *mask, snd_pcm_subformat_t val)
test the presence of a subformat in a #snd_pcm_subformat_mask_t
Definition pcm.c:4260
int snd_pcm_hw_params_set_tick_time_near(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int *val, int *dir)
(DEPRECATED) Restrict a configuration space to have tick time nearest to a target
Definition pcm.c:6284
int snd_pcm_recover(snd_pcm_t *pcm, int err, int silent)
Recover the stream state from an error or suspend.
Definition pcm.c:8759
int snd_pcm_access_mask_empty(const snd_pcm_access_mask_t *mask)
test, if given a #snd_pcm_access_mask_t is empty
Definition pcm.c:4066
int snd_pcm_hw_params_set_access_first(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, snd_pcm_access_t *access)
Restrict a configuration space to contain only its first access type.
Definition pcm.c:4394
int snd_pcm_sw_params_malloc(snd_pcm_sw_params_t **ptr)
allocate an invalid #snd_pcm_sw_params_t using standard malloc
Definition pcm.c:6431
int snd_pcm_info_malloc(snd_pcm_info_t **ptr)
allocate an invalid #snd_pcm_info_t using standard malloc
Definition pcm.c:7203
int snd_pcm_hw_free(snd_pcm_t *pcm)
Remove PCM hardware configuration and free associated resources.
Definition pcm.c:968
int snd_pcm_hw_params_set_channels_minmax(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int *min, unsigned int *max)
Restrict a configuration space to have channels counts in a given range.
Definition pcm.c:4731
int snd_pcm_hw_params_set_access_last(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, snd_pcm_access_t *access)
Restrict a configuration space to contain only its last access type.
Definition pcm.c:4410
int snd_pcm_hw_params_get_min_align(const snd_pcm_hw_params_t *params, snd_pcm_uframes_t *val)
Get the minimum transfer align value in samples.
Definition pcm.c:6334
int snd_pcm_get_params(snd_pcm_t *pcm, snd_pcm_uframes_t *buffer_size, snd_pcm_uframes_t *period_size)
Get the transfer size parameters in a simple way.
Definition pcm.c:8996
int snd_pcm_hw_params_set_rate(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int val, int dir)
Restrict a configuration space to contain only one rate.
Definition pcm.c:4864
void snd_pcm_info_set_subdevice(snd_pcm_info_t *obj, unsigned int val)
Set wanted subdevice inside a PCM info container (see snd_ctl_pcm_info)
Definition pcm.c:7385
const char * snd_pcm_xrun_mode_name(snd_pcm_xrun_t mode)
(DEPRECATED) get name of PCM xrun mode setting
Definition pcm.c:2268
int snd_pcm_hw_params_set_buffer_time_min(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int *val, int *dir)
Restrict a configuration space with a minimum buffer time.
Definition pcm.c:5844
int snd_pcm_hw_params_set_buffer_size_near(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, snd_pcm_uframes_t *val)
Restrict a configuration space to have buffer size nearest to a target.
Definition pcm.c:6086
int snd_pcm_hw_params_set_export_buffer(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int val)
Restrict a configuration space to allow the buffer to be accessible from outside.
Definition pcm.c:5012
int snd_pcm_hw_params_set_period_time_last(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int *val, int *dir)
Restrict a configuration space to contain only its maximum period time.
Definition pcm.c:5306
int snd_pcm_hw_params_set_period_time_min(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int *val, int *dir)
Restrict a configuration space with a minimum period time.
Definition pcm.c:5220
const char * snd_pcm_format_name(const snd_pcm_format_t format)
get name of PCM sample format
Definition pcm.c:2153
snd_pcm_xrun_t snd_pcm_sw_params_get_xrun_mode(const snd_pcm_sw_params_t *params)
(DEPRECATED) Get xrun mode from a software configuration container
Definition pcm.c:6554
const char * snd_pcm_info_get_subdevice_name(const snd_pcm_info_t *obj)
Get subdevice name from a PCM info container.
Definition pcm.c:7303
int snd_pcm_areas_copy(const snd_pcm_channel_area_t *dst_areas, snd_pcm_uframes_t dst_offset, const snd_pcm_channel_area_t *src_areas, snd_pcm_uframes_t src_offset, unsigned int channels, snd_pcm_uframes_t frames, snd_pcm_format_t format)
Copy one or more areas.
Definition pcm.c:3431
int snd_pcm_hw_params_set_periods_near(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int *val, int *dir)
Restrict a configuration space to have periods count nearest to a target.
Definition pcm.c:5694
snd_pcm_subclass_t snd_pcm_info_get_subclass(const snd_pcm_info_t *obj)
Get subclass from a PCM info container.
Definition pcm.c:7325
void snd_pcm_status_copy(snd_pcm_status_t *dst, const snd_pcm_status_t *src)
copy one #snd_pcm_status_t to another
Definition pcm.c:7011
int snd_pcm_sw_params_set_start_mode(snd_pcm_t *pcm, snd_pcm_sw_params_t *params, snd_pcm_start_t val)
(DEPRECATED) Set start mode inside a software configuration container
Definition pcm.c:6480
int snd_pcm_status(snd_pcm_t *pcm, snd_pcm_status_t *status)
Obtain status (runtime) information for PCM handle.
Definition pcm.c:1054
int snd_pcm_hw_params_set_format_mask(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, snd_pcm_format_mask_t *mask)
Restrict a configuration space to contain only a set of formats.
Definition pcm.c:4520
int snd_pcm_hw_params_get_format(const snd_pcm_hw_params_t *params, snd_pcm_format_t *format)
Extract format from a configuration space.
Definition pcm.c:4451
snd_pcm_start_t snd_pcm_sw_params_get_start_mode(const snd_pcm_sw_params_t *params)
(DEPRECATED) Get start mode from a software configuration container
Definition pcm.c:6506
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)
Restrict a configuration space to have period sizes in a given range.
Definition pcm.c:5459
void snd_pcm_sw_params_free(snd_pcm_sw_params_t *obj)
frees a previously allocated #snd_pcm_sw_params_t
Definition pcm.c:6444
void snd_pcm_access_mask_reset(snd_pcm_access_mask_t *mask, snd_pcm_access_t val)
make an access type missing from a #snd_pcm_access_mask_t
Definition pcm.c:4086
int snd_pcm_hw_params_is_batch(const snd_pcm_hw_params_t *params)
Check if hardware does double buffering for data transfers for given configuration.
Definition pcm.c:3618
int snd_pcm_access_mask_test(const snd_pcm_access_mask_t *mask, snd_pcm_access_t val)
test the presence of an access type in a #snd_pcm_access_mask_t
Definition pcm.c:4055
int snd_pcm_areas_copy_wrap(const snd_pcm_channel_area_t *dst_channels, snd_pcm_uframes_t dst_offset, const snd_pcm_uframes_t dst_size, const snd_pcm_channel_area_t *src_channels, snd_pcm_uframes_t src_offset, const snd_pcm_uframes_t src_size, const unsigned int channels, snd_pcm_uframes_t frames, const snd_pcm_format_t format)
Copy one or more areas.
Definition pcm.c:3509
int snd_pcm_reset(snd_pcm_t *pcm)
Reset PCM position.
Definition pcm.c:1265
int snd_pcm_hw_params_set_rate_near(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int *val, int *dir)
Restrict a configuration space to have rate nearest to a target.
Definition pcm.c:4929
int snd_pcm_htimestamp(snd_pcm_t *pcm, snd_pcm_uframes_t *avail, snd_htimestamp_t *tstamp)
Obtain last position update hi-res timestamp.
Definition pcm.c:1210
const char * snd_pcm_format_description(const snd_pcm_format_t format)
get description of PCM sample format
Definition pcm.c:2165
int snd_pcm_hw_params_set_channels(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int val)
Restrict a configuration space to contain only one channels count.
Definition pcm.c:4694
int snd_pcm_info_get_card(const snd_pcm_info_t *obj)
Get card from a PCM info container.
Definition pcm.c:7270
void snd_pcm_format_mask_free(snd_pcm_format_mask_t *obj)
frees a previously allocated #snd_pcm_format_mask_t
Definition pcm.c:4118
int snd_pcm_dump_setup(snd_pcm_t *pcm, snd_output_t *out)
Dump current setup (hardware and software) for PCM.
Definition pcm.c:2395
int snd_pcm_sw_params_get_start_threshold(const snd_pcm_sw_params_t *params, snd_pcm_uframes_t *val)
Get start threshold from a software configuration container.
Definition pcm.c:6812
int snd_pcm_hwsync(snd_pcm_t *pcm)
(DEPRECATED) Synchronize stream position with hardware
Definition pcm.c:1107
void snd_pcm_subformat_mask_none(snd_pcm_subformat_mask_t *mask)
reset all bits in a #snd_pcm_subformat_mask_t
Definition pcm.c:4241
int snd_pcm_hw_params_set_buffer_time_near(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int *val, int *dir)
Restrict a configuration space to have buffer time nearest to a target.
Definition pcm.c:5894
int snd_pcm_hw_params_is_double(const snd_pcm_hw_params_t *params)
Check if hardware does double buffering for start/stop for given configuration.
Definition pcm.c:3598
int snd_pcm_hw_params_get_buffer_size_max(const snd_pcm_hw_params_t *params, snd_pcm_uframes_t *val)
Extract maximum buffer size from a configuration space.
Definition pcm.c:5988
int snd_pcm_hw_params_test_buffer_size(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, snd_pcm_uframes_t val)
Verify if a buffer size is available inside a configuration space for a PCM.
Definition pcm.c:6007
int snd_pcm_hw_params_set_subformat_mask(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, snd_pcm_subformat_mask_t *mask)
Restrict a configuration space to contain only a set of subformats.
Definition pcm.c:4614
snd_pcm_uframes_t snd_pcm_status_get_overrange(const snd_pcm_status_t *obj)
Get count of ADC overrange detections since last call.
Definition pcm.c:7183
void snd_pcm_format_mask_none(snd_pcm_format_mask_t *mask)
reset all bits in a #snd_pcm_format_mask_t
Definition pcm.c:4138
int snd_pcm_hw_params_get_period_wakeup(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int *val)
Extract period wakeup flag from a configuration space.
Definition pcm.c:5081
int snd_pcm_hw_params_get_rate(const snd_pcm_hw_params_t *params, unsigned int *val, int *dir)
Extract rate from a configuration space.
Definition pcm.c:4797
int snd_pcm_hw_params_get_tick_time(const snd_pcm_hw_params_t *params, unsigned int *val, int *dir)
(DEPRECATED) Extract tick time from a configuration space
Definition pcm.c:6149
void snd_pcm_hw_params_get_format_mask(snd_pcm_hw_params_t *params, snd_pcm_format_mask_t *mask)
Get format mask from a configuration space.
Definition pcm.c:4530
int snd_pcm_set_params(snd_pcm_t *pcm, snd_pcm_format_t format, snd_pcm_access_t access, unsigned int channels, unsigned int rate, int soft_resample, unsigned int latency)
Set the hardware and software parameters in a simple way.
Definition pcm.c:8807
int snd_pcm_dump_hw_setup(snd_pcm_t *pcm, snd_output_t *out)
Dump current hardware setup for PCM.
Definition pcm.c:2338
int snd_pcm_hw_params_set_periods(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int val, int dir)
Restrict a configuration space to contain only one periods count.
Definition pcm.c:5629
int snd_pcm_hw_params_set_period_time_first(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int *val, int *dir)
Restrict a configuration space to contain only its minimum period time.
Definition pcm.c:5289
int snd_pcm_drain(snd_pcm_t *pcm)
Stop a PCM preserving pending frames.
Definition pcm.c:1358
int snd_pcm_hw_params_get_period_size_min(const snd_pcm_hw_params_t *params, snd_pcm_uframes_t *val, int *dir)
Extract minimum period size from a configuration space.
Definition pcm.c:5347
snd_pcm_sync_id_t snd_pcm_info_get_sync(const snd_pcm_info_t *obj)
(DEPRECATED) Get hardware synchronization ID from a PCM info container
Definition pcm.c:7358
int snd_pcm_hw_params_set_format_last(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, snd_pcm_format_t *format)
Restrict a configuration space to contain only its last format.
Definition pcm.c:4507
int snd_pcm_subformat_mask_malloc(snd_pcm_subformat_mask_t **ptr)
allocate an empty #snd_pcm_subformat_mask_t using standard malloc
Definition pcm.c:4208
int snd_pcm_hw_params_set_drain_silence(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int val)
Restrict a configuration space to fill the end of playback stream with silence when drain() is invoke...
Definition pcm.c:5100
snd_pcm_sframes_t snd_pcm_readi(snd_pcm_t *pcm, void *buffer, snd_pcm_uframes_t size)
Read interleaved frames from a PCM.
Definition pcm.c:1647
int snd_pcm_sw_params_get_tstamp_mode(const snd_pcm_sw_params_t *params, snd_pcm_tstamp_t *val)
Get timestamp mode from a software configuration container.
Definition pcm.c:6596
void snd_pcm_access_mask_copy(snd_pcm_access_mask_t *dst, const snd_pcm_access_mask_t *src)
copy one #snd_pcm_access_mask_t to another
Definition pcm.c:4026
size_t snd_pcm_status_sizeof()
get size of #snd_pcm_status_t
Definition pcm.c:6978
int snd_pcm_hw_params_can_mmap_sample_resolution(const snd_pcm_hw_params_t *params)
Check if hardware supports sample-resolution mmap for given configuration.
Definition pcm.c:3578
int snd_pcm_hw_params_set_channels_last(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int *val)
Restrict a configuration space to contain only its maximum channels count.
Definition pcm.c:4778
int snd_pcm_hw_params_get_rate_numden(const snd_pcm_hw_params_t *params, unsigned int *rate_num, unsigned int *rate_den)
Get rate exact info from a configuration space.
Definition pcm.c:3891
snd_pcm_t * snd_async_handler_get_pcm(snd_async_handler_t *handler)
Return PCM handle related to an async handler.
Definition pcm.c:2546
void snd_pcm_format_mask_any(snd_pcm_format_mask_t *mask)
set all bits in a #snd_pcm_format_mask_t
Definition pcm.c:4147
const char * snd_pcm_chmap_type_name(enum snd_pcm_chmap_type val)
Definition pcm.c:8377
snd_pcm_sframes_t snd_pcm_avail(snd_pcm_t *pcm)
Return number of frames ready to be read (capture) / written (playback)
Definition pcm.c:3074
int snd_pcm_sw_params_get_avail_min(const snd_pcm_sw_params_t *params, snd_pcm_uframes_t *val)
Get avail min from a software configuration container.
Definition pcm.c:6710
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)
Restrict a configuration space with a minimum period size.
Definition pcm.c:5419
snd_pcm_chmap_t * snd_pcm_chmap_parse_string(const char *str)
Definition pcm.c:8568
int snd_pcm_hw_params_set_channels_near(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int *val)
Restrict a configuration space to have channels count nearest to a target.
Definition pcm.c:4746
snd_pcm_format_t snd_pcm_format_value(const char *name)
get PCM sample format from name
Definition pcm.c:2177
int snd_pcm_sw_params_set_silence_threshold(snd_pcm_t *pcm, snd_pcm_sw_params_t *params, snd_pcm_uframes_t val)
Set silence threshold inside a software configuration container.
Definition pcm.c:6881
int snd_async_add_pcm_handler(snd_async_handler_t **handler, snd_pcm_t *pcm, snd_async_callback_t callback, void *private_data)
Add an async handler for a PCM.
Definition pcm.c:2516
int snd_pcm_hw_params_set_tick_time_last(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int *val, int *dir)
(DEPRECATED) Restrict a configuration space to contain only its maximum tick time
Definition pcm.c:6322
size_t snd_pcm_info_sizeof()
get size of #snd_pcm_info_t
Definition pcm.c:7193
int snd_pcm_hw_params_set_rate_last(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int *val, int *dir)
Restrict a configuration space to contain only its maximum rate.
Definition pcm.c:4967
void snd_pcm_status_get_trigger_tstamp(const snd_pcm_status_t *obj, snd_timestamp_t *ptr)
Get trigger timestamp from a PCM status container.
Definition pcm.c:7037
int snd_pcm_hw_params_test_rate(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int val, int dir)
Verify if a rate is available inside a configuration space for a PCM.
Definition pcm.c:4849
void snd_pcm_format_mask_copy(snd_pcm_format_mask_t *dst, const snd_pcm_format_mask_t *src)
copy one #snd_pcm_format_mask_t to another
Definition pcm.c:4128
int snd_pcm_hw_params_get_periods_max(const snd_pcm_hw_params_t *params, unsigned int *val, int *dir)
Extract maximum periods count from a configuration space.
Definition pcm.c:5598
void snd_pcm_format_mask_reset(snd_pcm_format_mask_t *mask, snd_pcm_format_t val)
make a format missing from a #snd_pcm_format_mask_t
Definition pcm.c:4188
int snd_pcm_set_chmap(snd_pcm_t *pcm, const snd_pcm_chmap_t *map)
Definition pcm.c:8346
int snd_pcm_sw_params_current(snd_pcm_t *pcm, snd_pcm_sw_params_t *params)
Return current software configuration for a PCM.
Definition pcm.c:6384
int snd_pcm_hw_params_set_periods_max(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int *val, int *dir)
Restrict a configuration space with a maximum periods count.
Definition pcm.c:5659
snd_pcm_chmap_query_t ** snd_pcm_query_chmaps(snd_pcm_t *pcm)
Definition pcm.c:8305
int snd_pcm_subformat_mask_empty(const snd_pcm_subformat_mask_t *mask)
test, if given a #snd_pcm_subformat_mask_t is empty
Definition pcm.c:4271
int snd_pcm_hw_params_get_rate_max(const snd_pcm_hw_params_t *params, unsigned int *val, int *dir)
Extract maximum rate from a configuration space.
Definition pcm.c:4833
int snd_pcm_hw_params_get_buffer_time_max(const snd_pcm_hw_params_t *params, unsigned int *val, int *dir)
Extract maximum buffer time from a configuration space.
Definition pcm.c:5798
const char * snd_pcm_name(snd_pcm_t *pcm)
get identifier of PCM handle
Definition pcm.c:736
int snd_pcm_sw_params_get_silence_size(const snd_pcm_sw_params_t *params, snd_pcm_uframes_t *val)
Get silence size from a software configuration container.
Definition pcm.c:6965
int snd_pcm_hw_params_set_buffer_time_first(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int *val, int *dir)
Restrict a configuration space to contain only its minimum buffer time.
Definition pcm.c:5913
int snd_pcm_sw_params_set_stop_threshold(snd_pcm_t *pcm, snd_pcm_sw_params_t *params, snd_pcm_uframes_t val)
Set stop threshold inside a software configuration container.
Definition pcm.c:6836
const char * snd_pcm_info_get_name(const snd_pcm_info_t *obj)
Get name from a PCM info container.
Definition pcm.c:7292
int snd_pcm_hw_params_can_resume(const snd_pcm_hw_params_t *params)
Check if hardware supports resume.
Definition pcm.c:3718
void snd_pcm_info_set_stream(snd_pcm_info_t *obj, snd_pcm_stream_t val)
Set wanted stream inside a PCM info container (see snd_ctl_pcm_info)
Definition pcm.c:7396
int snd_pcm_start(snd_pcm_t *pcm)
Start a PCM.
Definition pcm.c:1290
snd_pcm_sframes_t snd_pcm_rewind(snd_pcm_t *pcm, snd_pcm_uframes_t frames)
Move application frame position backward.
Definition pcm.c:1455
int snd_pcm_hw_params_set_format(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, snd_pcm_format_t format)
Restrict a configuration space to contain only one format.
Definition pcm.c:4476
int snd_pcm_mmap_begin(snd_pcm_t *pcm, const snd_pcm_channel_area_t **areas, snd_pcm_uframes_t *offset, snd_pcm_uframes_t *frames)
Application request to access a portion of direct (mmap) area.
Definition pcm.c:7422
int snd_pcm_hw_params_any(snd_pcm_t *pcm, snd_pcm_hw_params_t *params)
Fill params with a full configuration space for a PCM.
Definition pcm.c:3983
int snd_pcm_hw_params_malloc(snd_pcm_hw_params_t **ptr)
allocate an invalid #snd_pcm_hw_params_t using standard malloc
Definition pcm.c:4311
void snd_pcm_status_get_driver_htstamp(const snd_pcm_status_t *obj, snd_htimestamp_t *ptr)
Get "now" hi-res driver timestamp from a PCM status container. Defines when the status was generated ...
Definition pcm.c:7109
int snd_pcm_drop(snd_pcm_t *pcm)
Stop a PCM dropping pending frames.
Definition pcm.c:1321
int snd_pcm_hw_params_get_period_time(const snd_pcm_hw_params_t *params, unsigned int *val, int *dir)
Extract period time from a configuration space.
Definition pcm.c:5137
int snd_pcm_hw_params_get_periods(const snd_pcm_hw_params_t *params, unsigned int *val, int *dir)
Extract periods from a configuration space.
Definition pcm.c:5562
int snd_pcm_hw_params_set_channels_max(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int *val)
Restrict a configuration space with a maximum channels count.
Definition pcm.c:4718
int snd_pcm_poll_descriptors(snd_pcm_t *pcm, struct pollfd *pfds, unsigned int space)
get poll descriptors
Definition pcm.c:1823
int snd_pcm_hw_params_get_period_time_max(const snd_pcm_hw_params_t *params, unsigned int *val, int *dir)
Extract maximum period time from a configuration space.
Definition pcm.c:5173
int snd_pcm_area_copy(const snd_pcm_channel_area_t *dst_area, snd_pcm_uframes_t dst_offset, const snd_pcm_channel_area_t *src_area, snd_pcm_uframes_t src_offset, unsigned int samples, snd_pcm_format_t format)
Copy an area.
Definition pcm.c:3310
int snd_pcm_hw_params_set_format_first(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, snd_pcm_format_t *format)
Restrict a configuration space to contain only its first format.
Definition pcm.c:4491
void snd_pcm_access_mask_any(snd_pcm_access_mask_t *mask)
set all bits in a #snd_pcm_access_mask_t
Definition pcm.c:4045
int snd_pcm_hw_params_get_subformat(const snd_pcm_hw_params_t *params, snd_pcm_subformat_t *subformat)
Extract subformat from a configuration space.
Definition pcm.c:4545
int snd_pcm_prepare(snd_pcm_t *pcm)
Prepare PCM for use.
Definition pcm.c:1235
void snd_pcm_status_get_audio_htstamp_report(const snd_pcm_status_t *obj, snd_pcm_audio_tstamp_report_t *audio_tstamp_report)
Get audio_tstamp_report from a PCM status container.
Definition pcm.c:7120
int snd_pcm_sw_params_set_xrun_mode(snd_pcm_t *pcm, snd_pcm_sw_params_t *params, snd_pcm_xrun_t val)
(DEPRECATED) Set xrun mode inside a software configuration container
Definition pcm.c:6527
int snd_pcm_sw_params_set_avail_min(snd_pcm_t *pcm, snd_pcm_sw_params_t *params, snd_pcm_uframes_t val)
Set avail min inside a software configuration container.
Definition pcm.c:6684
int snd_pcm_hw_params_is_monotonic(const snd_pcm_hw_params_t *params)
Check if timestamps are monotonic for given configuration.
Definition pcm.c:3658
int snd_pcm_poll_descriptors_revents(snd_pcm_t *pcm, struct pollfd *pfds, unsigned int nfds, unsigned short *revents)
get returned events from poll descriptors
Definition pcm.c:1865
const char * snd_pcm_start_mode_name(snd_pcm_start_t mode)
(DEPRECATED) get name of PCM start mode setting
Definition pcm.c:2252
int snd_pcm_hw_params_set_buffer_size(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, snd_pcm_uframes_t val)
Restrict a configuration space to contain only one buffer size.
Definition pcm.c:6021
int snd_pcm_hw_params_set_rate_resample(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int val)
Restrict a configuration space to contain only real hardware rates.
Definition pcm.c:4980
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)
Restrict a configuration space to have buffer times in a given range.
Definition pcm.c:5876
int snd_pcm_hw_params_get_tick_time_min(const snd_pcm_hw_params_t *params, unsigned int *val, int *dir)
(DEPRECATED) Extract minimum tick time from a configuration space
Definition pcm.c:6168
int snd_pcm_hw_params_set_rate_max(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int *val, int *dir)
Restrict a configuration space with a maximum rate.
Definition pcm.c:4894
snd_pcm_subformat_t snd_pcm_subformat_value(const char *name)
get PCM sample subformat from name
Definition pcm.c:2228
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)
Restrict a configuration space to contain only one period size.
Definition pcm.c:5404
int snd_pcm_hw_params_set_access(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, snd_pcm_access_t access)
Restrict a configuration space to contain only one access type.
Definition pcm.c:4379
snd_pcm_state_t snd_pcm_state(snd_pcm_t *pcm)
Return PCM state.
Definition pcm.c:1083
int snd_pcm_sw_params(snd_pcm_t *pcm, snd_pcm_sw_params_t *params)
Install PCM software configuration defined by params.
Definition pcm.c:1001
int snd_pcm_hw_params_set_rate_min(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int *val, int *dir)
Restrict a configuration space with a minimum rate.
Definition pcm.c:4879
int snd_pcm_hw_params_test_format(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, snd_pcm_format_t format)
Verify if a format is available inside a configuration space for a PCM.
Definition pcm.c:4464
int snd_pcm_sw_params_get_silence_threshold(const snd_pcm_sw_params_t *params, snd_pcm_uframes_t *val)
Get silence threshold from a software configuration container.
Definition pcm.c:6907
int snd_pcm_sw_params_get_stop_threshold(const snd_pcm_sw_params_t *params, snd_pcm_uframes_t *val)
Get stop threshold from a software configuration container.
Definition pcm.c:6858
int snd_pcm_open_lconf(snd_pcm_t **pcmp, const char *name, snd_pcm_stream_t stream, int mode, snd_config_t *lconf)
Opens a PCM using local configuration.
Definition pcm.c:2774
int snd_pcm_hw_params_is_perfect_drain(const snd_pcm_hw_params_t *params)
Check if hardware is capable of perfect drain.
Definition pcm.c:3817
int snd_pcm_hw_params_get_sbits(const snd_pcm_hw_params_t *params)
Get sample resolution info from a configuration space.
Definition pcm.c:3922
snd_pcm_sframes_t snd_pcm_avail_update(snd_pcm_t *pcm)
Return number of frames ready to be read (capture) / written (playback)
Definition pcm.c:3050
int snd_pcm_sw_params_get_boundary(const snd_pcm_sw_params_t *params, snd_pcm_uframes_t *val)
Get boundary for ring pointers from a software configuration container.
Definition pcm.c:6466
void snd_pcm_hw_params_free(snd_pcm_hw_params_t *obj)
frees a previously allocated #snd_pcm_hw_params_t
Definition pcm.c:4324
int snd_pcm_nonblock(snd_pcm_t *pcm, int nonblock)
set nonblock mode
Definition pcm.c:812
snd_pcm_stream_t snd_pcm_stream(snd_pcm_t *pcm)
get stream for a PCM handle
Definition pcm.c:762
int snd_pcm_hw_params_test_channels(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int val)
Verify if a channels count is available inside a configuration space for a PCM.
Definition pcm.c:4682
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)
Restrict a configuration space with a maximum period size.
Definition pcm.c:5438
int snd_pcm_sw_params_set_tstamp_type(snd_pcm_t *pcm, snd_pcm_sw_params_t *params, snd_pcm_tstamp_type_t val)
Set timestamp type inside a software configuration container.
Definition pcm.c:6611
int snd_pcm_hw_params_set_tick_time_min(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int *val, int *dir)
(DEPRECATED) Restrict a configuration space with a minimum tick time
Definition pcm.c:6234
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)
Restrict a configuration space to have period size nearest to a target.
Definition pcm.c:5482
snd_pcm_uframes_t snd_pcm_status_get_avail(const snd_pcm_status_t *obj)
Get number of frames available from a PCM status container (see snd_pcm_avail_update)
Definition pcm.c:7161
size_t snd_pcm_sw_params_sizeof()
get size of #snd_pcm_sw_params_t
Definition pcm.c:6421
int snd_pcm_hw_params_test_access(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, snd_pcm_access_t access)
Verify if an access type is available inside a configuration space for a PCM.
Definition pcm.c:4367
int snd_pcm_hw_params_get_channels_min(const snd_pcm_hw_params_t *params, unsigned int *val)
Extract minimum channels count from a configuration space.
Definition pcm.c:4654
const char * snd_pcm_type_name(snd_pcm_type_t type)
get name of PCM type
Definition pcm.c:2323
void snd_pcm_access_mask_free(snd_pcm_access_mask_t *obj)
frees a previously allocated #snd_pcm_access_mask_t
Definition pcm.c:4016
int snd_pcm_dump_sw_setup(snd_pcm_t *pcm, snd_output_t *out)
Dump current software setup for PCM.
Definition pcm.c:2368
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)
Restrict a configuration space to have period times in a given range.
Definition pcm.c:5252
int snd_pcm_hw_params_test_buffer_time(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int val, int dir)
Verify if a buffer time is available inside a configuration space for a PCM.
Definition pcm.c:5814
void snd_pcm_hw_params_copy(snd_pcm_hw_params_t *dst, const snd_pcm_hw_params_t *src)
copy one #snd_pcm_hw_params_t to another
Definition pcm.c:4334
int snd_pcm_dump(snd_pcm_t *pcm, snd_output_t *out)
Dump PCM info.
Definition pcm.c:2429
int snd_pcm_open(snd_pcm_t **pcmp, const char *name, snd_pcm_stream_t stream, int mode)
Opens a PCM.
Definition pcm.c:2744
const char * snd_pcm_info_get_id(const snd_pcm_info_t *obj)
Get id from a PCM info container.
Definition pcm.c:7281
int snd_pcm_hw_params_set_tick_time_first(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int *val, int *dir)
(DEPRECATED) Restrict a configuration space to contain only its minimum tick time
Definition pcm.c:6303
int snd_pcm_hw_params_get_buffer_time_min(const snd_pcm_hw_params_t *params, unsigned int *val, int *dir)
Extract minimum buffer time from a configuration space.
Definition pcm.c:5780
int snd_pcm_hw_params_supports_audio_ts_type(const snd_pcm_hw_params_t *params, int type)
Check if hardware supports type of audio timestamps.
Definition pcm.c:3855
int snd_pcm_hw_params_set_period_time_near(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int *val, int *dir)
Restrict a configuration space to have period time nearest to a target.
Definition pcm.c:5270
int snd_pcm_hw_params_set_periods_min(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int *val, int *dir)
Restrict a configuration space with a minimum periods count.
Definition pcm.c:5644
int snd_pcm_hw_params_set_period_time(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int val, int dir)
Restrict a configuration space to contain only one period time.
Definition pcm.c:5204
snd_pcm_sframes_t snd_pcm_forwardable(snd_pcm_t *pcm)
Get safe count of frames which can be forwarded.
Definition pcm.c:1490
size_t snd_pcm_access_mask_sizeof()
get size of #snd_pcm_access_mask_t
Definition pcm.c:3993
int snd_pcm_hw_params_get_tick_time_max(const snd_pcm_hw_params_t *params, unsigned int *val, int *dir)
(DEPRECATED) Extract maximum tick time from a configuration space
Definition pcm.c:6187
snd_pcm_type_t snd_pcm_type(snd_pcm_t *pcm)
get type of PCM handle
Definition pcm.c:749
void snd_pcm_access_mask_none(snd_pcm_access_mask_t *mask)
reset all bits in a #snd_pcm_access_mask_t
Definition pcm.c:4036
int snd_pcm_hw_params_set_periods_first(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int *val, int *dir)
Restrict a configuration space to contain only its minimum periods count.
Definition pcm.c:5713
void snd_pcm_info_free(snd_pcm_info_t *obj)
frees a previously allocated #snd_pcm_info_t
Definition pcm.c:7216
int snd_pcm_format_mask_empty(const snd_pcm_format_mask_t *mask)
test, if given a #snd_pcm_format_mask_t is empty
Definition pcm.c:4168
int snd_pcm_status_malloc(snd_pcm_status_t **ptr)
allocate an invalid #snd_pcm_status_t using standard malloc
Definition pcm.c:6988
int snd_pcm_sw_params_set_xfer_align(snd_pcm_t *pcm, snd_pcm_sw_params_t *params, snd_pcm_uframes_t val)
(DEPRECATED) Set xfer align inside a software configuration container
Definition pcm.c:6757
const char * snd_pcm_chmap_long_name(enum snd_pcm_chmap_position val)
Definition pcm.c:8463
int snd_pcm_hw_params_can_pause(const snd_pcm_hw_params_t *params)
Check if hardware supports pause.
Definition pcm.c:3698
int snd_pcm_hw_params_set_period_time_max(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int *val, int *dir)
Restrict a configuration space with a maximum period time.
Definition pcm.c:5235
void snd_pcm_hw_params_get_subformat_mask(snd_pcm_hw_params_t *params, snd_pcm_subformat_mask_t *mask)
Get subformat mask from a configuration space.
Definition pcm.c:4624
int snd_pcm_hw_params_set_subformat_last(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, snd_pcm_subformat_t *subformat)
Restrict a configuration space to contain only its last subformat.
Definition pcm.c:4601
void snd_pcm_status_get_trigger_htstamp(const snd_pcm_status_t *obj, snd_htimestamp_t *ptr)
Get trigger hi-res timestamp from a PCM status container.
Definition pcm.c:7056
void snd_pcm_subformat_mask_set(snd_pcm_subformat_mask_t *mask, snd_pcm_subformat_t val)
make a subformat present in a #snd_pcm_subformat_mask_t
Definition pcm.c:4281
int snd_pcm_hw_params_get_buffer_size(const snd_pcm_hw_params_t *params, snd_pcm_uframes_t *val)
Extract buffer size from a configuration space.
Definition pcm.c:5948
int snd_pcm_hw_params_set_periods_integer(snd_pcm_t *pcm, snd_pcm_hw_params_t *params)
Restrict a configuration space to contain only integer periods counts.
Definition pcm.c:5744
int snd_pcm_hw_params_set_buffer_time_max(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int *val, int *dir)
Restrict a configuration space with a maximum buffer time.
Definition pcm.c:5859
int snd_pcm_hw_params_get_access(const snd_pcm_hw_params_t *params, snd_pcm_access_t *access)
Extract access type from a configuration space.
Definition pcm.c:4350
void snd_pcm_info_set_device(snd_pcm_info_t *obj, unsigned int val)
Set wanted device inside a PCM info container (see snd_ctl_pcm_info)
Definition pcm.c:7374
snd_pcm_state_t snd_pcm_status_get_state(const snd_pcm_status_t *obj)
Get state from a PCM status container (see snd_pcm_state)
Definition pcm.c:7022
int snd_pcm_hw_params_is_half_duplex(const snd_pcm_hw_params_t *params)
Check if hardware does half-duplex only.
Definition pcm.c:3738
int snd_pcm_hw_params_get_period_size(const snd_pcm_hw_params_t *params, snd_pcm_uframes_t *val, int *dir)
Extract period size from a configuration space.
Definition pcm.c:5325
snd_pcm_sframes_t snd_pcm_writei(snd_pcm_t *pcm, const void *buffer, snd_pcm_uframes_t size)
Write interleaved frames to a PCM.
Definition pcm.c:1569
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)
Verify if a period size is available inside a configuration space for a PCM.
Definition pcm.c:5389
snd_pcm_chmap_t * snd_pcm_get_chmap(snd_pcm_t *pcm)
Definition pcm.c:8333
int snd_pcm_hw_params_get_buffer_time(const snd_pcm_hw_params_t *params, unsigned int *val, int *dir)
Extract buffer time from a configuration space.
Definition pcm.c:5762
const char * snd_pcm_state_name(const snd_pcm_state_t state)
get name of PCM state
Definition pcm.c:2308
ssize_t snd_pcm_frames_to_bytes(snd_pcm_t *pcm, snd_pcm_sframes_t frames)
Convert frames in bytes for a PCM.
Definition pcm.c:2464
int snd_pcm_hw_params_set_rate_first(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int *val, int *dir)
Restrict a configuration space to contain only its minimum rate.
Definition pcm.c:4948
int snd_pcm_hw_params_set_period_wakeup(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int val)
Restrict a configuration space to settings without period wakeups.
Definition pcm.c:5059
int snd_pcm_sw_params_set_tstamp_mode(snd_pcm_t *pcm, snd_pcm_sw_params_t *params, snd_pcm_tstamp_t val)
Set timestamp mode inside a software configuration container.
Definition pcm.c:6575
snd_pcm_sframes_t snd_pcm_mmap_commit(snd_pcm_t *pcm, snd_pcm_uframes_t offset, snd_pcm_uframes_t frames)
Application has completed the access to area requested with snd_pcm_mmap_begin.
Definition pcm.c:7535
int snd_pcm_hw_params_set_buffer_size_max(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, snd_pcm_uframes_t *val)
Restrict a configuration space with a maximum buffer size.
Definition pcm.c:6049
int snd_pcm_hw_params_is_block_transfer(const snd_pcm_hw_params_t *params)
Check if hardware does block transfers for samples for given configuration.
Definition pcm.c:3638
snd_pcm_uframes_t snd_pcm_status_get_avail_max(const snd_pcm_status_t *obj)
Get maximum number of frames available from a PCM status container after last snd_pcm_status call.
Definition pcm.c:7173
int snd_pcm_link(snd_pcm_t *pcm1, snd_pcm_t *pcm2)
Link two PCMs.
Definition pcm.c:1714
int snd_pcm_hw_params_get_channels_max(const snd_pcm_hw_params_t *params, unsigned int *val)
Extract maximum channels count from a configuration space.
Definition pcm.c:4669
int snd_pcm_poll_descriptors_count(snd_pcm_t *pcm)
get count of poll descriptors for PCM handle
Definition pcm.c:1759
int snd_pcm_hw_params_set_buffer_size_first(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, snd_pcm_uframes_t *val)
Restrict a configuration space to contain only its minimum buffer size.
Definition pcm.c:6106
int snd_pcm_hw_params_get_rate_resample(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int *val)
Extract resample state from a configuration space.
Definition pcm.c:4998
int snd_pcm_hw_params_set_buffer_time(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int val, int dir)
Restrict a configuration space to contain only one buffer time.
Definition pcm.c:5829
int snd_pcm_hw_params_can_overrange(const snd_pcm_hw_params_t *params)
Check if hardware supports overrange detection.
Definition pcm.c:3678
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)
(DEPRECATED) Restrict a configuration space to have tick times in a given range
Definition pcm.c:6266
int snd_pcm_hw_params_set_buffer_size_min(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, snd_pcm_uframes_t *val)
Restrict a configuration space with a minimum buffer size.
Definition pcm.c:6033
int snd_pcm_format_mask_malloc(snd_pcm_format_mask_t **ptr)
allocate an empty #snd_pcm_format_mask_t using standard malloc
Definition pcm.c:4105
snd_pcm_stream_t snd_pcm_info_get_stream(const snd_pcm_info_t *obj)
Get stream (direction) from a PCM info container.
Definition pcm.c:7259
void snd_pcm_subformat_mask_any(snd_pcm_subformat_mask_t *mask)
set all bits in a #snd_pcm_subformat_mask_t
Definition pcm.c:4250
snd_pcm_sframes_t snd_pcm_forward(snd_pcm_t *pcm, snd_pcm_uframes_t frames)
Move application frame position forward.
Definition pcm.c:1524
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)
Restrict a configuration space to contain only its maximum period size.
Definition pcm.c:5528
void snd_pcm_status_set_audio_htstamp_config(snd_pcm_status_t *obj, snd_pcm_audio_tstamp_config_t *audio_tstamp_config)
set audio_tstamp_config from a PCM status container
Definition pcm.c:7134
int snd_pcm_hw_params_can_disable_period_wakeup(const snd_pcm_hw_params_t *params)
Check if hardware can disable period wakeups.
Definition pcm.c:3794
void snd_pcm_subformat_mask_reset(snd_pcm_subformat_mask_t *mask, snd_pcm_subformat_t val)
make a subformat missing from a #snd_pcm_subformat_mask_t
Definition pcm.c:4291
int snd_pcm_hw_params_set_tick_time(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int val, int dir)
(DEPRECATED) Restrict a configuration space to contain only one tick time
Definition pcm.c:6219
unsigned int snd_pcm_chmap_from_string(const char *str)
Definition pcm.c:8556
size_t snd_pcm_format_mask_sizeof()
get size of #snd_pcm_format_mask_t
Definition pcm.c:4095
int snd_pcm_wait(snd_pcm_t *pcm, int timeout)
Wait for a PCM to become ready.
Definition pcm.c:2903
int snd_pcm_hw_params_set_access_mask(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, snd_pcm_access_mask_t *mask)
Restrict a configuration space to contain only a set of access types.
Definition pcm.c:4423
void snd_pcm_subformat_mask_copy(snd_pcm_subformat_mask_t *dst, const snd_pcm_subformat_mask_t *src)
copy one #snd_pcm_subformat_mask_t to another
Definition pcm.c:4231
int snd_pcm_sw_params_dump(snd_pcm_sw_params_t *params, snd_output_t *out)
Dump a software configuration.
Definition pcm.c:6403
int snd_pcm_pause(snd_pcm_t *pcm, int enable)
Pause/resume PCM.
Definition pcm.c:1392
unsigned int snd_pcm_info_get_subdevices_avail(const snd_pcm_info_t *obj)
Get available subdevices count from a PCM info container.
Definition pcm.c:7347
const char * snd_pcm_tstamp_mode_name(const snd_pcm_tstamp_t mode)
get name of PCM tstamp mode setting
Definition pcm.c:2284
snd_pcm_class_t snd_pcm_info_get_class(const snd_pcm_info_t *obj)
Get class from a PCM info container.
Definition pcm.c:7314
int snd_pcm_areas_silence(const snd_pcm_channel_area_t *dst_areas, snd_pcm_uframes_t dst_offset, unsigned int channels, snd_pcm_uframes_t frames, snd_pcm_format_t format)
Silence one or more areas.
Definition pcm.c:3259
void snd_pcm_access_mask_set(snd_pcm_access_mask_t *mask, snd_pcm_access_t val)
make an access type present in a #snd_pcm_access_mask_t
Definition pcm.c:4076
const char * snd_pcm_stream_name(const snd_pcm_stream_t stream)
get name of PCM stream type
Definition pcm.c:2129
int snd_pcm_info(snd_pcm_t *pcm, snd_pcm_info_t *info)
Obtain general (static) information for PCM handle.
Definition pcm.c:882
int snd_pcm_hw_params_set_buffer_size_last(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, snd_pcm_uframes_t *val)
Restrict a configuration space to contain only its maximum buffer size.
Definition pcm.c:6126
int snd_pcm_hw_params_set_channels_first(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int *val)
Restrict a configuration space to contain only its minimum channels count.
Definition pcm.c:4762
int snd_pcm_hw_params_get_channels(const snd_pcm_hw_params_t *params, unsigned int *val)
Extract channels from a configuration space.
Definition pcm.c:4639
ssize_t snd_pcm_samples_to_bytes(snd_pcm_t *pcm, long samples)
Convert samples in bytes for a PCM.
Definition pcm.c:2496
snd_pcm_sframes_t snd_pcm_writen(snd_pcm_t *pcm, void **bufs, snd_pcm_uframes_t size)
Write non interleaved frames to a PCM.
Definition pcm.c:1608
int snd_pcm_hw_params_get_period_time_min(const snd_pcm_hw_params_t *params, unsigned int *val, int *dir)
Extract minimum period time from a configuration space.
Definition pcm.c:5155
int snd_pcm_hw_params_is_joint_duplex(const snd_pcm_hw_params_t *params)
Check if hardware does joint-duplex (playback and capture are somewhat correlated)
Definition pcm.c:3758
int snd_pcm_sw_params_set_sleep_min(snd_pcm_t *pcm, snd_pcm_sw_params_t *params, unsigned int val)
(DEPRECATED) Set minimum number of ticks to sleep inside a software configuration container
Definition pcm.c:6645
void snd_pcm_status_get_tstamp(const snd_pcm_status_t *obj, snd_timestamp_t *ptr)
Get "now" timestamp from a PCM status container.
Definition pcm.c:7069
void snd_pcm_status_free(snd_pcm_status_t *obj)
frees a previously allocated #snd_pcm_status_t
Definition pcm.c:7001
int snd_pcm_sw_params_set_silence_size(snd_pcm_t *pcm, snd_pcm_sw_params_t *params, snd_pcm_uframes_t val)
Set silence size inside a software configuration container.
Definition pcm.c:6939
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)
Restrict a configuration space to have buffer sizes in a given range.
Definition pcm.c:6066
int snd_pcm_hw_params_set_buffer_time_last(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int *val, int *dir)
Restrict a configuration space to contain only its maximum buffered time.
Definition pcm.c:5932
int snd_pcm_format_mask_test(const snd_pcm_format_mask_t *mask, snd_pcm_format_t val)
test the presence of a format in a #snd_pcm_format_mask_t
Definition pcm.c:4157
unsigned int snd_pcm_info_get_subdevices_count(const snd_pcm_info_t *obj)
Get subdevices count from a PCM info container.
Definition pcm.c:7336
long snd_pcm_bytes_to_samples(snd_pcm_t *pcm, ssize_t bytes)
Convert bytes in samples for a PCM.
Definition pcm.c:2480
unsigned int snd_pcm_info_get_subdevice(const snd_pcm_info_t *obj)
Get subdevice from a PCM info container.
Definition pcm.c:7248
int snd_pcm_hw_params_test_period_time(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int val, int dir)
Verify if a period time is available inside a configuration space for a PCM.
Definition pcm.c:5189
int snd_pcm_status_dump(snd_pcm_status_t *status, snd_output_t *out)
Dump status.
Definition pcm.c:2408
const char * snd_pcm_subformat_name(const snd_pcm_subformat_t subformat)
get name of PCM sample subformat
Definition pcm.c:2204
snd_pcm_sframes_t snd_pcm_bytes_to_frames(snd_pcm_t *pcm, ssize_t bytes)
Convert bytes in frames for a PCM.
Definition pcm.c:2448
int snd_pcm_hw_params_test_subformat(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, snd_pcm_subformat_t subformat)
Verify if a subformat is available inside a configuration space for a PCM.
Definition pcm.c:4558
const unsigned char * snd_pcm_hw_params_get_sync(const snd_pcm_hw_params_t *params)
Get hardware synchronization ID from a PCM info container.
Definition pcm.c:3964
int snd_pcm_sw_params_set_period_event(snd_pcm_t *pcm, snd_pcm_sw_params_t *params, int val)
Set period event inside a software configuration container.
Definition pcm.c:6727
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)
Restrict a configuration space to have periods counts in a given range.
Definition pcm.c:5676
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)
Restrict a configuration space to contain only its minimum period size.
Definition pcm.c:5505
int snd_pcm_hw_params_get_rate_min(const snd_pcm_hw_params_t *params, unsigned int *val, int *dir)
Extract minimum rate from a configuration space.
Definition pcm.c:4815
int snd_pcm_hw_params_current(snd_pcm_t *pcm, snd_pcm_hw_params_t *params)
Retreive current PCM hardware configuration chosen with snd_pcm_hw_params.
Definition pcm.c:900
const char * snd_pcm_subformat_description(const snd_pcm_subformat_t subformat)
get description of PCM sample subformat
Definition pcm.c:2216
int snd_pcm_hw_params_test_tick_time(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int val, int dir)
(DEPRECATED) Verify if a tick time is available inside a configuration space for a PCM
Definition pcm.c:6204
void snd_pcm_status_get_htstamp(const snd_pcm_status_t *obj, snd_htimestamp_t *ptr)
Get "now" hi-res timestamp from a PCM status container.
Definition pcm.c:7084
int snd_pcm_sw_params_get_xfer_align(const snd_pcm_sw_params_t *params, snd_pcm_uframes_t *val)
(DEPRECATED) Get xfer align from a software configuration container
Definition pcm.c:6772
int snd_pcm_hw_params_can_sync_start(const snd_pcm_hw_params_t *params)
Check if hardware supports synchronized start with sample resolution.
Definition pcm.c:3778
int snd_pcm_hw_params_supports_audio_wallclock_ts(const snd_pcm_hw_params_t *params)
Check if hardware supports audio wallclock timestamps.
Definition pcm.c:3837
void snd_pcm_sw_params_copy(snd_pcm_sw_params_t *dst, const snd_pcm_sw_params_t *src)
copy one #snd_pcm_sw_params_t to another
Definition pcm.c:6454
snd_pcm_sframes_t snd_pcm_readn(snd_pcm_t *pcm, void **bufs, snd_pcm_uframes_t size)
Read non interleaved frames to a PCM.
Definition pcm.c:1686
int snd_pcm_hw_params_get_export_buffer(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int *val)
Extract buffer accessibility from a configuration space.
Definition pcm.c:5030
int snd_pcm_access_mask_malloc(snd_pcm_access_mask_t **ptr)
allocate an empty #snd_pcm_access_mask_t using standard malloc
Definition pcm.c:4003
snd_pcm_t * snd_pcm_hook_get_pcm(snd_pcm_hook_t *hook)
Get PCM handle for a PCM hook.
Definition pcm_hooks.c:560
void * snd_pcm_hook_get_private(snd_pcm_hook_t *hook)
Get callback function private data for a PCM hook.
Definition pcm_hooks.c:571
int snd_pcm_hook_remove(snd_pcm_hook_t *hook)
Remove a PCM hook.
Definition pcm_hooks.c:628
void snd_pcm_hook_set_private(snd_pcm_hook_t *hook, void *private_data)
Set callback function private data for a PCM hook.
Definition pcm_hooks.c:582
int snd_pcm_hook_add(snd_pcm_hook_t **hookp, snd_pcm_t *pcm, snd_pcm_hook_type_t type, snd_pcm_hook_func_t func, void *private_data)
Add a PCM hook at end of hooks chain.
Definition pcm_hooks.c:600
snd_pcm_chmap_query_t ** snd_pcm_query_chmaps_from_hw(int card, int dev, int subdev, snd_pcm_stream_t stream)
Definition pcm_hw.c:1286
const char * snd_pcm_scope_get_name(snd_pcm_scope_t *scope)
Get name of a #SND_PCM_TYPE_METER PCM scope.
Definition pcm_meter.c:963
void * snd_pcm_scope_get_callback_private(snd_pcm_scope_t *scope)
Get callbacks private value for a #SND_PCM_TYPE_METER PCM scope.
Definition pcm_meter.c:983
int snd_pcm_scope_malloc(snd_pcm_scope_t **ptr)
allocate an invalid #snd_pcm_scope_t using standard malloc
Definition pcm_meter.c:1232
snd_pcm_uframes_t snd_pcm_meter_get_bufsize(snd_pcm_t *pcm)
Get meter buffer size from a #SND_PCM_TYPE_METER PCM.
Definition pcm_meter.c:883
int snd_pcm_scope_s16_open(snd_pcm_t *pcm, const char *name, snd_pcm_scope_t **scopep)
Add a s16 pseudo scope to a #SND_PCM_TYPE_METER PCM.
Definition pcm_meter.c:1181
snd_pcm_uframes_t snd_pcm_meter_get_boundary(snd_pcm_t *pcm)
Get boundary for frame pointers from a #SND_PCM_TYPE_METER PCM.
Definition pcm_meter.c:939
void snd_pcm_scope_set_callback_private(snd_pcm_scope_t *scope, void *val)
Get callbacks private value for a #SND_PCM_TYPE_METER PCM scope.
Definition pcm_meter.c:993
unsigned int snd_pcm_meter_get_rate(snd_pcm_t *pcm)
Get meter rate from a #SND_PCM_TYPE_METER PCM.
Definition pcm_meter.c:911
snd_pcm_scope_t * snd_pcm_meter_search_scope(snd_pcm_t *pcm, const char *name)
Search an installed scope inside a #SND_PCM_TYPE_METER PCM.
Definition pcm_meter.c:863
snd_pcm_uframes_t snd_pcm_meter_get_now(snd_pcm_t *pcm)
Get meter "now" frame pointer from a #SND_PCM_TYPE_METER PCM.
Definition pcm_meter.c:925
void snd_pcm_scope_set_name(snd_pcm_scope_t *scope, const char *val)
Set name of a #SND_PCM_TYPE_METER PCM scope.
Definition pcm_meter.c:953
void snd_pcm_scope_set_ops(snd_pcm_scope_t *scope, const snd_pcm_scope_ops_t *val)
Set callbacks for a #SND_PCM_TYPE_METER PCM scope.
Definition pcm_meter.c:973
int16_t * snd_pcm_scope_s16_get_channel_buffer(snd_pcm_scope_t *scope, unsigned int channel)
Get s16 pseudo scope frames buffer for a channel.
Definition pcm_meter.c:1213
int snd_pcm_meter_add_scope(snd_pcm_t *pcm, snd_pcm_scope_t *scope)
Add a scope to a #SND_PCM_TYPE_METER PCM.
Definition pcm_meter.c:848
unsigned int snd_pcm_meter_get_channels(snd_pcm_t *pcm)
Get meter channels from a #SND_PCM_TYPE_METER PCM.
Definition pcm_meter.c:897
int snd_spcm_init_duplex(snd_pcm_t *playback_pcm, snd_pcm_t *capture_pcm, unsigned int rate, unsigned int channels, snd_pcm_format_t format, snd_pcm_subformat_t subformat, snd_spcm_latency_t latency, snd_pcm_access_t access, snd_spcm_xrun_type_t xrun_type, snd_spcm_duplex_type_t duplex_type)
Initialize simple PCMs in the duplex mode.
Definition pcm_simple.c:209
int snd_spcm_init_get_params(snd_pcm_t *pcm, unsigned int *rate, snd_pcm_uframes_t *buffer_size, snd_pcm_uframes_t *period_size)
Get the set up of simple PCM.
Definition pcm_simple.c:284
int snd_spcm_init(snd_pcm_t *pcm, unsigned int rate, unsigned int channels, snd_pcm_format_t format, snd_pcm_subformat_t subformat, snd_spcm_latency_t latency, snd_pcm_access_t access, snd_spcm_xrun_type_t xrun_type)
Set up a simple PCM.
Definition pcm_simple.c:157