ALSA project - the C library reference: /builddir/build/BUILD/alsa-lib-1.1.3/include/pcm.h Source File

ALSA project - the C library reference

- Main Page
- Related Pages
- Modules
- Data Structures
- Files
- Examples

- File List
- Globals

All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
pcm.h
Go to the documentation of this file.
1
12 /*
13 * This library is free software; you can redistribute it and/or modify
14 * it under the terms of the GNU Lesser General Public License as
15 * published by the Free Software Foundation; either version 2.1 of
16 * the License, or (at your option) any later version.
17 *
18 * This program is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License for more details.
22 *
23 * You should have received a copy of the GNU Lesser General Public
24 * License along with this library; if not, write to the Free Software
25 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
26 *
27 */
28
29 #ifndef __ALSA_PCM_H
30 #define __ALSA_PCM_H
31
32 #ifdef __cplusplus
33 extern "C" {
34 #endif
35
43 #define SND_PCM_DLSYM_VERSION _dlsym_pcm_001
44
46 typedef struct _snd_pcm_info snd_pcm_info_t;
47
62 typedef struct _snd_pcm_hw_params snd_pcm_hw_params_t;
63
65 typedef struct _snd_pcm_sw_params snd_pcm_sw_params_t;
67 typedef struct _snd_pcm_status snd_pcm_status_t;
69 typedef struct _snd_pcm_access_mask snd_pcm_access_mask_t;
71 typedef struct _snd_pcm_format_mask snd_pcm_format_mask_t;
73 typedef struct _snd_pcm_subformat_mask snd_pcm_subformat_mask_t;
74
76 typedef enum _snd_pcm_class {
79 SND_PCM_CLASS_GENERIC = 0,
81 SND_PCM_CLASS_MULTI,
83 SND_PCM_CLASS_MODEM,
85 SND_PCM_CLASS_DIGITIZER,
86 SND_PCM_CLASS_LAST = SND_PCM_CLASS_DIGITIZER
87 } snd_pcm_class_t;
88
90 typedef enum _snd_pcm_subclass {
92 SND_PCM_SUBCLASS_GENERIC_MIX = 0,
94 SND_PCM_SUBCLASS_MULTI_MIX,
95 SND_PCM_SUBCLASS_LAST = SND_PCM_SUBCLASS_MULTI_MIX
96 } snd_pcm_subclass_t;
97
99 typedef enum _snd_pcm_stream {
101 SND_PCM_STREAM_PLAYBACK = 0,
103 SND_PCM_STREAM_CAPTURE,
104 SND_PCM_STREAM_LAST = SND_PCM_STREAM_CAPTURE
105 } snd_pcm_stream_t;
106
108 typedef enum _snd_pcm_access {
110 SND_PCM_ACCESS_MMAP_INTERLEAVED = 0,
112 SND_PCM_ACCESS_MMAP_NONINTERLEAVED,
114 SND_PCM_ACCESS_MMAP_COMPLEX,
116 SND_PCM_ACCESS_RW_INTERLEAVED,
118 SND_PCM_ACCESS_RW_NONINTERLEAVED,
119 SND_PCM_ACCESS_LAST = SND_PCM_ACCESS_RW_NONINTERLEAVED
120 } snd_pcm_access_t;
121
123 typedef enum _snd_pcm_format {
125 SND_PCM_FORMAT_UNKNOWN = -1,
127 SND_PCM_FORMAT_S8 = 0,
129 SND_PCM_FORMAT_U8,
131 SND_PCM_FORMAT_S16_LE,
133 SND_PCM_FORMAT_S16_BE,
135 SND_PCM_FORMAT_U16_LE,
137 SND_PCM_FORMAT_U16_BE,
139 SND_PCM_FORMAT_S24_LE,
141 SND_PCM_FORMAT_S24_BE,
143 SND_PCM_FORMAT_U24_LE,
145 SND_PCM_FORMAT_U24_BE,
147 SND_PCM_FORMAT_S32_LE,
149 SND_PCM_FORMAT_S32_BE,
151 SND_PCM_FORMAT_U32_LE,
153 SND_PCM_FORMAT_U32_BE,
155 SND_PCM_FORMAT_FLOAT_LE,
157 SND_PCM_FORMAT_FLOAT_BE,
159 SND_PCM_FORMAT_FLOAT64_LE,
161 SND_PCM_FORMAT_FLOAT64_BE,
163 SND_PCM_FORMAT_IEC958_SUBFRAME_LE,
165 SND_PCM_FORMAT_IEC958_SUBFRAME_BE,
167 SND_PCM_FORMAT_MU_LAW,
169 SND_PCM_FORMAT_A_LAW,
171 SND_PCM_FORMAT_IMA_ADPCM,
173 SND_PCM_FORMAT_MPEG,
175 SND_PCM_FORMAT_GSM,
177 SND_PCM_FORMAT_SPECIAL = 31,
179 SND_PCM_FORMAT_S24_3LE = 32,
181 SND_PCM_FORMAT_S24_3BE,
183 SND_PCM_FORMAT_U24_3LE,
185 SND_PCM_FORMAT_U24_3BE,
187 SND_PCM_FORMAT_S20_3LE,
189 SND_PCM_FORMAT_S20_3BE,
191 SND_PCM_FORMAT_U20_3LE,
193 SND_PCM_FORMAT_U20_3BE,
195 SND_PCM_FORMAT_S18_3LE,
197 SND_PCM_FORMAT_S18_3BE,
199 SND_PCM_FORMAT_U18_3LE,
201 SND_PCM_FORMAT_U18_3BE,
202 /* G.723 (ADPCM) 24 kbit/s, 8 samples in 3 bytes */
203 SND_PCM_FORMAT_G723_24,
204 /* G.723 (ADPCM) 24 kbit/s, 1 sample in 1 byte */
205 SND_PCM_FORMAT_G723_24_1B,
206 /* G.723 (ADPCM) 40 kbit/s, 8 samples in 3 bytes */
207 SND_PCM_FORMAT_G723_40,
208 /* G.723 (ADPCM) 40 kbit/s, 1 sample in 1 byte */
209 SND_PCM_FORMAT_G723_40_1B,
210 /* Direct Stream Digital (DSD) in 1-byte samples (x8) */
211 SND_PCM_FORMAT_DSD_U8,
212 /* Direct Stream Digital (DSD) in 2-byte samples (x16) */
213 SND_PCM_FORMAT_DSD_U16_LE,
214 /* Direct Stream Digital (DSD) in 4-byte samples (x32) */
215 SND_PCM_FORMAT_DSD_U32_LE,
216 /* Direct Stream Digital (DSD) in 2-byte samples (x16) */
217 SND_PCM_FORMAT_DSD_U16_BE,
218 /* Direct Stream Digital (DSD) in 4-byte samples (x32) */
219 SND_PCM_FORMAT_DSD_U32_BE,
220 SND_PCM_FORMAT_LAST = SND_PCM_FORMAT_DSD_U32_BE,
221
222 #if __BYTE_ORDER == __LITTLE_ENDIAN
223
224 SND_PCM_FORMAT_S16 = SND_PCM_FORMAT_S16_LE,
226 SND_PCM_FORMAT_U16 = SND_PCM_FORMAT_U16_LE,
228 SND_PCM_FORMAT_S24 = SND_PCM_FORMAT_S24_LE,
230 SND_PCM_FORMAT_U24 = SND_PCM_FORMAT_U24_LE,
232 SND_PCM_FORMAT_S32 = SND_PCM_FORMAT_S32_LE,
234 SND_PCM_FORMAT_U32 = SND_PCM_FORMAT_U32_LE,
236 SND_PCM_FORMAT_FLOAT = SND_PCM_FORMAT_FLOAT_LE,
238 SND_PCM_FORMAT_FLOAT64 = SND_PCM_FORMAT_FLOAT64_LE,
240 SND_PCM_FORMAT_IEC958_SUBFRAME = SND_PCM_FORMAT_IEC958_SUBFRAME_LE
241 #elif __BYTE_ORDER == __BIG_ENDIAN
242
243 SND_PCM_FORMAT_S16 = SND_PCM_FORMAT_S16_BE,
245 SND_PCM_FORMAT_U16 = SND_PCM_FORMAT_U16_BE,
247 SND_PCM_FORMAT_S24 = SND_PCM_FORMAT_S24_BE,
249 SND_PCM_FORMAT_U24 = SND_PCM_FORMAT_U24_BE,
251 SND_PCM_FORMAT_S32 = SND_PCM_FORMAT_S32_BE,
253 SND_PCM_FORMAT_U32 = SND_PCM_FORMAT_U32_BE,
255 SND_PCM_FORMAT_FLOAT = SND_PCM_FORMAT_FLOAT_BE,
257 SND_PCM_FORMAT_FLOAT64 = SND_PCM_FORMAT_FLOAT64_BE,
259 SND_PCM_FORMAT_IEC958_SUBFRAME = SND_PCM_FORMAT_IEC958_SUBFRAME_BE
260 #else
261 #error "Unknown endian"
262 #endif
263 } snd_pcm_format_t;
264
266 typedef enum _snd_pcm_subformat {
268 SND_PCM_SUBFORMAT_STD = 0,
269 SND_PCM_SUBFORMAT_LAST = SND_PCM_SUBFORMAT_STD
270 } snd_pcm_subformat_t;
271
273 typedef enum _snd_pcm_state {
275 SND_PCM_STATE_OPEN = 0,
277 SND_PCM_STATE_SETUP,
279 SND_PCM_STATE_PREPARED,
281 SND_PCM_STATE_RUNNING,
283 SND_PCM_STATE_XRUN,
285 SND_PCM_STATE_DRAINING,
287 SND_PCM_STATE_PAUSED,
289 SND_PCM_STATE_SUSPENDED,
291 SND_PCM_STATE_DISCONNECTED,
292 SND_PCM_STATE_LAST = SND_PCM_STATE_DISCONNECTED
293 } snd_pcm_state_t;
294
296 typedef enum _snd_pcm_start {
298 SND_PCM_START_DATA = 0,
300 SND_PCM_START_EXPLICIT,
301 SND_PCM_START_LAST = SND_PCM_START_EXPLICIT
302 } snd_pcm_start_t;
303
305 typedef enum _snd_pcm_xrun {
307 SND_PCM_XRUN_NONE = 0,
309 SND_PCM_XRUN_STOP,
310 SND_PCM_XRUN_LAST = SND_PCM_XRUN_STOP
311 } snd_pcm_xrun_t;
312
314 typedef enum _snd_pcm_tstamp {
316 SND_PCM_TSTAMP_NONE = 0,
318 SND_PCM_TSTAMP_ENABLE,
322 SND_PCM_TSTAMP_MMAP = SND_PCM_TSTAMP_ENABLE,
323 SND_PCM_TSTAMP_LAST = SND_PCM_TSTAMP_ENABLE
324 } snd_pcm_tstamp_t;
325
326 typedef enum _snd_pcm_tstamp_type {
327 SND_PCM_TSTAMP_TYPE_GETTIMEOFDAY = 0,
328 SND_PCM_TSTAMP_TYPE_MONOTONIC,
329 SND_PCM_TSTAMP_TYPE_MONOTONIC_RAW,
330 SND_PCM_TSTAMP_TYPE_LAST = SND_PCM_TSTAMP_TYPE_MONOTONIC_RAW,
331 } snd_pcm_tstamp_type_t;
332
333 typedef struct _snd_pcm_audio_tstamp_config {
334 /* 5 of max 16 bits used */
335 unsigned int type_requested:4;
336 unsigned int report_delay:1; /* add total delay to A/D or D/A */
337 } snd_pcm_audio_tstamp_config_t;
338
339 typedef struct _snd_pcm_audio_tstamp_report {
340 /* 6 of max 16 bits used for bit-fields */
341
342 /* for backwards compatibility */
343 unsigned int valid:1;
344
345 /* actual type if hardware could not support requested timestamp */
346 unsigned int actual_type:4;
347
348 /* accuracy represented in ns units */
349 unsigned int accuracy_report:1; /* 0 if accuracy unknown, 1 if accuracy field is valid */
350 unsigned int accuracy; /* up to 4.29s, will be packed in separate field */
351 } snd_pcm_audio_tstamp_report_t;
352
354 typedef unsigned long snd_pcm_uframes_t;
356 typedef long snd_pcm_sframes_t;
357
359 #define SND_PCM_NONBLOCK 0x00000001
360
361 #define SND_PCM_ASYNC 0x00000002
362
363 #define SND_PCM_ABORT 0x00008000
364
365 #define SND_PCM_NO_AUTO_RESAMPLE 0x00010000
366
367 #define SND_PCM_NO_AUTO_CHANNELS 0x00020000
368
369 #define SND_PCM_NO_AUTO_FORMAT 0x00040000
370
371 #define SND_PCM_NO_SOFTVOL 0x00080000
372
374 typedef struct _snd_pcm snd_pcm_t;
375
377 enum _snd_pcm_type {
379 SND_PCM_TYPE_HW = 0,
381 SND_PCM_TYPE_HOOKS,
384 SND_PCM_TYPE_MULTI,
386 SND_PCM_TYPE_FILE,
388 SND_PCM_TYPE_NULL,
390 SND_PCM_TYPE_SHM,
392 SND_PCM_TYPE_INET,
394 SND_PCM_TYPE_COPY,
396 SND_PCM_TYPE_LINEAR,
398 SND_PCM_TYPE_ALAW,
400 SND_PCM_TYPE_MULAW,
402 SND_PCM_TYPE_ADPCM,
404 SND_PCM_TYPE_RATE,
406 SND_PCM_TYPE_ROUTE,
408 SND_PCM_TYPE_PLUG,
410 SND_PCM_TYPE_SHARE,
412 SND_PCM_TYPE_METER,
414 SND_PCM_TYPE_MIX,
416 SND_PCM_TYPE_DROUTE,
418 SND_PCM_TYPE_LBSERVER,
420 SND_PCM_TYPE_LINEAR_FLOAT,
422 SND_PCM_TYPE_LADSPA,
424 SND_PCM_TYPE_DMIX,
426 SND_PCM_TYPE_JACK,
428 SND_PCM_TYPE_DSNOOP,
430 SND_PCM_TYPE_DSHARE,
432 SND_PCM_TYPE_IEC958,
434 SND_PCM_TYPE_SOFTVOL,
436 SND_PCM_TYPE_IOPLUG,
438 SND_PCM_TYPE_EXTPLUG,
440 SND_PCM_TYPE_MMAP_EMUL,
441 SND_PCM_TYPE_LAST = SND_PCM_TYPE_MMAP_EMUL
442 };
443
445 typedef enum _snd_pcm_type snd_pcm_type_t;
446
448 typedef struct _snd_pcm_channel_area {
450 void *addr;
452 unsigned int first;
454 unsigned int step;
455 } snd_pcm_channel_area_t;
456
458 typedef union _snd_pcm_sync_id {
460 unsigned char id[16];
462 unsigned short id16[8];
464 unsigned int id32[4];
465 } snd_pcm_sync_id_t;
466
468 typedef struct _snd_pcm_scope snd_pcm_scope_t;
469
470 int snd_pcm_open(snd_pcm_t **pcm, const char *name,
471 snd_pcm_stream_t stream, int mode);
472 int snd_pcm_open_lconf(snd_pcm_t **pcm, const char *name,
473 snd_pcm_stream_t stream, int mode,
474 snd_config_t *lconf);
475 int snd_pcm_open_fallback(snd_pcm_t **pcm, snd_config_t *root,
476 const char *name, const char *orig_name,
477 snd_pcm_stream_t stream, int mode);
478
479 int snd_pcm_close(snd_pcm_t *pcm);
480 const char *snd_pcm_name(snd_pcm_t *pcm);
481 snd_pcm_type_t snd_pcm_type(snd_pcm_t *pcm);
482 snd_pcm_stream_t snd_pcm_stream(snd_pcm_t *pcm);
483 int snd_pcm_poll_descriptors_count(snd_pcm_t *pcm);
484 int snd_pcm_poll_descriptors(snd_pcm_t *pcm, struct pollfd *pfds, unsigned int space);
485 int snd_pcm_poll_descriptors_revents(snd_pcm_t *pcm, struct pollfd *pfds, unsigned int nfds, unsigned short *revents);
486 int snd_pcm_nonblock(snd_pcm_t *pcm, int nonblock);
487 static __inline__ int snd_pcm_abort(snd_pcm_t *pcm) { return snd_pcm_nonblock(pcm, 2); }
488 int snd_async_add_pcm_handler(snd_async_handler_t **handler, snd_pcm_t *pcm,
489 snd_async_callback_t callback, void *private_data);
490 snd_pcm_t *snd_async_handler_get_pcm(snd_async_handler_t *handler);
491 int snd_pcm_info(snd_pcm_t *pcm, snd_pcm_info_t *info);
492 int snd_pcm_hw_params_current(snd_pcm_t *pcm, snd_pcm_hw_params_t *params);
493 int snd_pcm_hw_params(snd_pcm_t *pcm, snd_pcm_hw_params_t *params);
494 int snd_pcm_hw_free(snd_pcm_t *pcm);
495 int snd_pcm_sw_params_current(snd_pcm_t *pcm, snd_pcm_sw_params_t *params);
496 int snd_pcm_sw_params(snd_pcm_t *pcm, snd_pcm_sw_params_t *params);
497 int snd_pcm_prepare(snd_pcm_t *pcm);
498 int snd_pcm_reset(snd_pcm_t *pcm);
499 int snd_pcm_status(snd_pcm_t *pcm, snd_pcm_status_t *status);
500 int snd_pcm_start(snd_pcm_t *pcm);
501 int snd_pcm_drop(snd_pcm_t *pcm);
502 int snd_pcm_drain(snd_pcm_t *pcm);
503 int snd_pcm_pause(snd_pcm_t *pcm, int enable);
504 snd_pcm_state_t snd_pcm_state(snd_pcm_t *pcm);
505 int snd_pcm_hwsync(snd_pcm_t *pcm);
506 int snd_pcm_delay(snd_pcm_t *pcm, snd_pcm_sframes_t *delayp);
507 int snd_pcm_resume(snd_pcm_t *pcm);
508 int snd_pcm_htimestamp(snd_pcm_t *pcm, snd_pcm_uframes_t *avail, snd_htimestamp_t *tstamp);
509 snd_pcm_sframes_t snd_pcm_avail(snd_pcm_t *pcm);
510 snd_pcm_sframes_t snd_pcm_avail_update(snd_pcm_t *pcm);
511 int snd_pcm_avail_delay(snd_pcm_t *pcm, snd_pcm_sframes_t *availp, snd_pcm_sframes_t *delayp);
512 snd_pcm_sframes_t snd_pcm_rewindable(snd_pcm_t *pcm);
513 snd_pcm_sframes_t snd_pcm_rewind(snd_pcm_t *pcm, snd_pcm_uframes_t frames);
514 snd_pcm_sframes_t snd_pcm_forwardable(snd_pcm_t *pcm);
515 snd_pcm_sframes_t snd_pcm_forward(snd_pcm_t *pcm, snd_pcm_uframes_t frames);
516 snd_pcm_sframes_t snd_pcm_writei(snd_pcm_t *pcm, const void *buffer, snd_pcm_uframes_t size);
517 snd_pcm_sframes_t snd_pcm_readi(snd_pcm_t *pcm, void *buffer, snd_pcm_uframes_t size);
518 snd_pcm_sframes_t snd_pcm_writen(snd_pcm_t *pcm, void **bufs, snd_pcm_uframes_t size);
519 snd_pcm_sframes_t snd_pcm_readn(snd_pcm_t *pcm, void **bufs, snd_pcm_uframes_t size);
520 int snd_pcm_wait(snd_pcm_t *pcm, int timeout);
521
522 int snd_pcm_link(snd_pcm_t *pcm1, snd_pcm_t *pcm2);
523 int snd_pcm_unlink(snd_pcm_t *pcm);
524
526 #define SND_CHMAP_API_VERSION ((1 << 16) | (0 << 8) | 1)
527
529 enum snd_pcm_chmap_type {
530 SND_CHMAP_TYPE_NONE = 0,
531 SND_CHMAP_TYPE_FIXED,
532 SND_CHMAP_TYPE_VAR,
533 SND_CHMAP_TYPE_PAIRED,
534 SND_CHMAP_TYPE_LAST = SND_CHMAP_TYPE_PAIRED,
535 };
536
538 enum snd_pcm_chmap_position {
539 SND_CHMAP_UNKNOWN = 0,
540 SND_CHMAP_NA,
541 SND_CHMAP_MONO,
542 SND_CHMAP_FL,
543 SND_CHMAP_FR,
544 SND_CHMAP_RL,
545 SND_CHMAP_RR,
546 SND_CHMAP_FC,
547 SND_CHMAP_LFE,
548 SND_CHMAP_SL,
549 SND_CHMAP_SR,
550 SND_CHMAP_RC,
551 SND_CHMAP_FLC,
552 SND_CHMAP_FRC,
553 SND_CHMAP_RLC,
554 SND_CHMAP_RRC,
555 SND_CHMAP_FLW,
556 SND_CHMAP_FRW,
557 SND_CHMAP_FLH,
558 SND_CHMAP_FCH,
559 SND_CHMAP_FRH,
560 SND_CHMAP_TC,
561 SND_CHMAP_TFL,
562 SND_CHMAP_TFR,
563 SND_CHMAP_TFC,
564 SND_CHMAP_TRL,
565 SND_CHMAP_TRR,
566 SND_CHMAP_TRC,
567 SND_CHMAP_TFLC,
568 SND_CHMAP_TFRC,
569 SND_CHMAP_TSL,
570 SND_CHMAP_TSR,
571 SND_CHMAP_LLFE,
572 SND_CHMAP_RLFE,
573 SND_CHMAP_BC,
574 SND_CHMAP_BLC,
575 SND_CHMAP_BRC,
576 SND_CHMAP_LAST = SND_CHMAP_BRC,
577 };
578
580 #define SND_CHMAP_POSITION_MASK 0xffff
581
583 #define SND_CHMAP_PHASE_INVERSE (0x01 << 16)
584
585 #define SND_CHMAP_DRIVER_SPEC (0x02 << 16)
586
588 typedef struct snd_pcm_chmap {
589 unsigned int channels;
590 unsigned int pos[0];
591 } snd_pcm_chmap_t;
592
594 typedef struct snd_pcm_chmap_query {
595 enum snd_pcm_chmap_type type;
596 snd_pcm_chmap_t map;
597 } snd_pcm_chmap_query_t;
598
599
600 snd_pcm_chmap_query_t **snd_pcm_query_chmaps(snd_pcm_t *pcm);
601 snd_pcm_chmap_query_t **snd_pcm_query_chmaps_from_hw(int card, int dev,
602 int subdev,
603 snd_pcm_stream_t stream);
604 void snd_pcm_free_chmaps(snd_pcm_chmap_query_t **maps);
605 snd_pcm_chmap_t *snd_pcm_get_chmap(snd_pcm_t *pcm);
606 int snd_pcm_set_chmap(snd_pcm_t *pcm, const snd_pcm_chmap_t *map);
607
608 const char *snd_pcm_chmap_type_name(enum snd_pcm_chmap_type val);
609 const char *snd_pcm_chmap_name(enum snd_pcm_chmap_position val);
610 const char *snd_pcm_chmap_long_name(enum snd_pcm_chmap_position val);
611 int snd_pcm_chmap_print(const snd_pcm_chmap_t *map, size_t maxlen, char *buf);
612 unsigned int snd_pcm_chmap_from_string(const char *str);
613 snd_pcm_chmap_t *snd_pcm_chmap_parse_string(const char *str);
614
615 //int snd_pcm_mixer_element(snd_pcm_t *pcm, snd_mixer_t *mixer, snd_mixer_elem_t **elem);
616
617 /*
618 * application helpers - these functions are implemented on top
619 * of the basic API
620 */
621
622 int snd_pcm_recover(snd_pcm_t *pcm, int err, int silent);
623 int snd_pcm_set_params(snd_pcm_t *pcm,
624 snd_pcm_format_t format,
625 snd_pcm_access_t access,
626 unsigned int channels,
627 unsigned int rate,
628 int soft_resample,
629 unsigned int latency);
630 int snd_pcm_get_params(snd_pcm_t *pcm,
631 snd_pcm_uframes_t *buffer_size,
632 snd_pcm_uframes_t *period_size);
633
643 size_t snd_pcm_info_sizeof(void);
648 #define snd_pcm_info_alloca(ptr) __snd_alloca(ptr, snd_pcm_info)
649 int snd_pcm_info_malloc(snd_pcm_info_t **ptr);
650 void snd_pcm_info_free(snd_pcm_info_t *obj);
651 void snd_pcm_info_copy(snd_pcm_info_t *dst, const snd_pcm_info_t *src);
652 unsigned int snd_pcm_info_get_device(const snd_pcm_info_t *obj);
653 unsigned int snd_pcm_info_get_subdevice(const snd_pcm_info_t *obj);
654 snd_pcm_stream_t snd_pcm_info_get_stream(const snd_pcm_info_t *obj);
655 int snd_pcm_info_get_card(const snd_pcm_info_t *obj);
656 const char *snd_pcm_info_get_id(const snd_pcm_info_t *obj);
657 const char *snd_pcm_info_get_name(const snd_pcm_info_t *obj);
658 const char *snd_pcm_info_get_subdevice_name(const snd_pcm_info_t *obj);
659 snd_pcm_class_t snd_pcm_info_get_class(const snd_pcm_info_t *obj);
660 snd_pcm_subclass_t snd_pcm_info_get_subclass(const snd_pcm_info_t *obj);
661 unsigned int snd_pcm_info_get_subdevices_count(const snd_pcm_info_t *obj);
662 unsigned int snd_pcm_info_get_subdevices_avail(const snd_pcm_info_t *obj);
663 snd_pcm_sync_id_t snd_pcm_info_get_sync(const snd_pcm_info_t *obj);
664 void snd_pcm_info_set_device(snd_pcm_info_t *obj, unsigned int val);
665 void snd_pcm_info_set_subdevice(snd_pcm_info_t *obj, unsigned int val);
666 void snd_pcm_info_set_stream(snd_pcm_info_t *obj, snd_pcm_stream_t val);
667
677 int snd_pcm_hw_params_any(snd_pcm_t *pcm, snd_pcm_hw_params_t *params);
678
679 int snd_pcm_hw_params_can_mmap_sample_resolution(const snd_pcm_hw_params_t *params);
680 int snd_pcm_hw_params_is_double(const snd_pcm_hw_params_t *params);
681 int snd_pcm_hw_params_is_batch(const snd_pcm_hw_params_t *params);
682 int snd_pcm_hw_params_is_block_transfer(const snd_pcm_hw_params_t *params);
683 int snd_pcm_hw_params_is_monotonic(const snd_pcm_hw_params_t *params);
684 int snd_pcm_hw_params_can_overrange(const snd_pcm_hw_params_t *params);
685 int snd_pcm_hw_params_can_pause(const snd_pcm_hw_params_t *params);
686 int snd_pcm_hw_params_can_resume(const snd_pcm_hw_params_t *params);
687 int snd_pcm_hw_params_is_half_duplex(const snd_pcm_hw_params_t *params);
688 int snd_pcm_hw_params_is_joint_duplex(const snd_pcm_hw_params_t *params);
689 int snd_pcm_hw_params_can_sync_start(const snd_pcm_hw_params_t *params);
690 int snd_pcm_hw_params_can_disable_period_wakeup(const snd_pcm_hw_params_t *params);
691 int snd_pcm_hw_params_supports_audio_wallclock_ts(const snd_pcm_hw_params_t *params); /* deprecated, use audio_ts_type */
692 int snd_pcm_hw_params_supports_audio_ts_type(const snd_pcm_hw_params_t *params, int type);
693 int snd_pcm_hw_params_get_rate_numden(const snd_pcm_hw_params_t *params,
694 unsigned int *rate_num,
695 unsigned int *rate_den);
696 int snd_pcm_hw_params_get_sbits(const snd_pcm_hw_params_t *params);
697 int snd_pcm_hw_params_get_fifo_size(const snd_pcm_hw_params_t *params);
698
699 #if 0
700 typedef struct _snd_pcm_hw_strategy snd_pcm_hw_strategy_t;
701
702 /* choices need to be sorted on ascending badness */
703 typedef struct _snd_pcm_hw_strategy_simple_choices_list {
704 unsigned int value;
705 unsigned int badness;
706 } snd_pcm_hw_strategy_simple_choices_list_t;
707
708 int snd_pcm_hw_params_strategy(snd_pcm_t *pcm, snd_pcm_hw_params_t *params,
709 const snd_pcm_hw_strategy_t *strategy,
710 unsigned int badness_min,
711 unsigned int badness_max);
712
713 void snd_pcm_hw_strategy_free(snd_pcm_hw_strategy_t *strategy);
714 int snd_pcm_hw_strategy_simple(snd_pcm_hw_strategy_t **strategyp,
715 unsigned int badness_min,
716 unsigned int badness_max);
717 int snd_pcm_hw_params_try_explain_failure(snd_pcm_t *pcm,
718 snd_pcm_hw_params_t *fail,
719 snd_pcm_hw_params_t *success,
720 unsigned int depth,
721 snd_output_t *out);
722
723 #endif
724
725 size_t snd_pcm_hw_params_sizeof(void);
730 #define snd_pcm_hw_params_alloca(ptr) __snd_alloca(ptr, snd_pcm_hw_params)
731 int snd_pcm_hw_params_malloc(snd_pcm_hw_params_t **ptr);
732 void snd_pcm_hw_params_free(snd_pcm_hw_params_t *obj);
733 void snd_pcm_hw_params_copy(snd_pcm_hw_params_t *dst, const snd_pcm_hw_params_t *src);
734
735 #if !defined(ALSA_LIBRARY_BUILD) && !defined(ALSA_PCM_OLD_HW_PARAMS_API)
736
737 int snd_pcm_hw_params_get_access(const snd_pcm_hw_params_t *params, snd_pcm_access_t *_access);
738 int snd_pcm_hw_params_test_access(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, snd_pcm_access_t _access);
739 int snd_pcm_hw_params_set_access(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, snd_pcm_access_t _access);
740 int snd_pcm_hw_params_set_access_first(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, snd_pcm_access_t *_access);
741 int snd_pcm_hw_params_set_access_last(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, snd_pcm_access_t *_access);
742 int snd_pcm_hw_params_set_access_mask(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, snd_pcm_access_mask_t *mask);
743 int snd_pcm_hw_params_get_access_mask(snd_pcm_hw_params_t *params, snd_pcm_access_mask_t *mask);
744
745 int snd_pcm_hw_params_get_format(const snd_pcm_hw_params_t *params, snd_pcm_format_t *val);
746 int snd_pcm_hw_params_test_format(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, snd_pcm_format_t val);
747 int snd_pcm_hw_params_set_format(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, snd_pcm_format_t val);
748 int snd_pcm_hw_params_set_format_first(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, snd_pcm_format_t *format);
749 int snd_pcm_hw_params_set_format_last(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, snd_pcm_format_t *format);
750 int snd_pcm_hw_params_set_format_mask(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, snd_pcm_format_mask_t *mask);
751 void snd_pcm_hw_params_get_format_mask(snd_pcm_hw_params_t *params, snd_pcm_format_mask_t *mask);
752
753 int snd_pcm_hw_params_get_subformat(const snd_pcm_hw_params_t *params, snd_pcm_subformat_t *subformat);
754 int snd_pcm_hw_params_test_subformat(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, snd_pcm_subformat_t subformat);
755 int snd_pcm_hw_params_set_subformat(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, snd_pcm_subformat_t subformat);
756 int snd_pcm_hw_params_set_subformat_first(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, snd_pcm_subformat_t *subformat);
757 int snd_pcm_hw_params_set_subformat_last(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, snd_pcm_subformat_t *subformat);
758 int snd_pcm_hw_params_set_subformat_mask(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, snd_pcm_subformat_mask_t *mask);
759 void snd_pcm_hw_params_get_subformat_mask(snd_pcm_hw_params_t *params, snd_pcm_subformat_mask_t *mask);
760
761 int snd_pcm_hw_params_get_channels(const snd_pcm_hw_params_t *params, unsigned int *val);
762 int snd_pcm_hw_params_get_channels_min(const snd_pcm_hw_params_t *params, unsigned int *val);
763 int snd_pcm_hw_params_get_channels_max(const snd_pcm_hw_params_t *params, unsigned int *val);
764 int snd_pcm_hw_params_test_channels(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int val);
765 int snd_pcm_hw_params_set_channels(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int val);
766 int snd_pcm_hw_params_set_channels_min(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int *val);
767 int snd_pcm_hw_params_set_channels_max(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int *val);
768 int snd_pcm_hw_params_set_channels_minmax(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int *min, unsigned int *max);
769 int snd_pcm_hw_params_set_channels_near(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int *val);
770 int snd_pcm_hw_params_set_channels_first(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int *val);
771 int snd_pcm_hw_params_set_channels_last(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int *val);
772
773 int snd_pcm_hw_params_get_rate(const snd_pcm_hw_params_t *params, unsigned int *val, int *dir);
774 int snd_pcm_hw_params_get_rate_min(const snd_pcm_hw_params_t *params, unsigned int *val, int *dir);
775 int snd_pcm_hw_params_get_rate_max(const snd_pcm_hw_params_t *params, unsigned int *val, int *dir);
776 int snd_pcm_hw_params_test_rate(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int val, int dir);
777 int snd_pcm_hw_params_set_rate(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int val, int dir);
778 int snd_pcm_hw_params_set_rate_min(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int *val, int *dir);
779 int snd_pcm_hw_params_set_rate_max(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int *val, int *dir);
780 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);
781 int snd_pcm_hw_params_set_rate_near(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int *val, int *dir);
782 int snd_pcm_hw_params_set_rate_first(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int *val, int *dir);
783 int snd_pcm_hw_params_set_rate_last(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int *val, int *dir);
784 int snd_pcm_hw_params_set_rate_resample(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int val);
785 int snd_pcm_hw_params_get_rate_resample(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int *val);
786 int snd_pcm_hw_params_set_export_buffer(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int val);
787 int snd_pcm_hw_params_get_export_buffer(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int *val);
788 int snd_pcm_hw_params_set_period_wakeup(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int val);
789 int snd_pcm_hw_params_get_period_wakeup(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int *val);
790
791 int snd_pcm_hw_params_get_period_time(const snd_pcm_hw_params_t *params, unsigned int *val, int *dir);
792 int snd_pcm_hw_params_get_period_time_min(const snd_pcm_hw_params_t *params, unsigned int *val, int *dir);
793 int snd_pcm_hw_params_get_period_time_max(const snd_pcm_hw_params_t *params, unsigned int *val, int *dir);
794 int snd_pcm_hw_params_test_period_time(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int val, int dir);
795 int snd_pcm_hw_params_set_period_time(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int val, int dir);
796 int snd_pcm_hw_params_set_period_time_min(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int *val, int *dir);
797 int snd_pcm_hw_params_set_period_time_max(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int *val, int *dir);
798 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);
799 int snd_pcm_hw_params_set_period_time_near(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int *val, int *dir);
800 int snd_pcm_hw_params_set_period_time_first(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int *val, int *dir);
801 int snd_pcm_hw_params_set_period_time_last(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int *val, int *dir);
802
803 int snd_pcm_hw_params_get_period_size(const snd_pcm_hw_params_t *params, snd_pcm_uframes_t *frames, int *dir);
804 int snd_pcm_hw_params_get_period_size_min(const snd_pcm_hw_params_t *params, snd_pcm_uframes_t *frames, int *dir);
805 int snd_pcm_hw_params_get_period_size_max(const snd_pcm_hw_params_t *params, snd_pcm_uframes_t *frames, int *dir);
806 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);
807 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);
808 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);
809 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);
810 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);
811 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);
812 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);
813 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);
814 int snd_pcm_hw_params_set_period_size_integer(snd_pcm_t *pcm, snd_pcm_hw_params_t *params);
815
816 int snd_pcm_hw_params_get_periods(const snd_pcm_hw_params_t *params, unsigned int *val, int *dir);
817 int snd_pcm_hw_params_get_periods_min(const snd_pcm_hw_params_t *params, unsigned int *val, int *dir);
818 int snd_pcm_hw_params_get_periods_max(const snd_pcm_hw_params_t *params, unsigned int *val, int *dir);
819 int snd_pcm_hw_params_test_periods(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int val, int dir);
820 int snd_pcm_hw_params_set_periods(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int val, int dir);
821 int snd_pcm_hw_params_set_periods_min(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int *val, int *dir);
822 int snd_pcm_hw_params_set_periods_max(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int *val, int *dir);
823 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);
824 int snd_pcm_hw_params_set_periods_near(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int *val, int *dir);
825 int snd_pcm_hw_params_set_periods_first(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int *val, int *dir);
826 int snd_pcm_hw_params_set_periods_last(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int *val, int *dir);
827 int snd_pcm_hw_params_set_periods_integer(snd_pcm_t *pcm, snd_pcm_hw_params_t *params);
828
829 int snd_pcm_hw_params_get_buffer_time(const snd_pcm_hw_params_t *params, unsigned int *val, int *dir);
830 int snd_pcm_hw_params_get_buffer_time_min(const snd_pcm_hw_params_t *params, unsigned int *val, int *dir);
831 int snd_pcm_hw_params_get_buffer_time_max(const snd_pcm_hw_params_t *params, unsigned int *val, int *dir);
832 int snd_pcm_hw_params_test_buffer_time(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int val, int dir);
833 int snd_pcm_hw_params_set_buffer_time(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int val, int dir);
834 int snd_pcm_hw_params_set_buffer_time_min(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int *val, int *dir);
835 int snd_pcm_hw_params_set_buffer_time_max(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int *val, int *dir);
836 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);
837 int snd_pcm_hw_params_set_buffer_time_near(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int *val, int *dir);
838 int snd_pcm_hw_params_set_buffer_time_first(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int *val, int *dir);
839 int snd_pcm_hw_params_set_buffer_time_last(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int *val, int *dir);
840
841 int snd_pcm_hw_params_get_buffer_size(const snd_pcm_hw_params_t *params, snd_pcm_uframes_t *val);
842 int snd_pcm_hw_params_get_buffer_size_min(const snd_pcm_hw_params_t *params, snd_pcm_uframes_t *val);
843 int snd_pcm_hw_params_get_buffer_size_max(const snd_pcm_hw_params_t *params, snd_pcm_uframes_t *val);
844 int snd_pcm_hw_params_test_buffer_size(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, snd_pcm_uframes_t val);
845 int snd_pcm_hw_params_set_buffer_size(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, snd_pcm_uframes_t val);
846 int snd_pcm_hw_params_set_buffer_size_min(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, snd_pcm_uframes_t *val);
847 int snd_pcm_hw_params_set_buffer_size_max(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, snd_pcm_uframes_t *val);
848 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);
849 int snd_pcm_hw_params_set_buffer_size_near(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, snd_pcm_uframes_t *val);
850 int snd_pcm_hw_params_set_buffer_size_first(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, snd_pcm_uframes_t *val);
851 int snd_pcm_hw_params_set_buffer_size_last(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, snd_pcm_uframes_t *val);
852
853 #endif /* !ALSA_LIBRARY_BUILD && !ALSA_PCM_OLD_HW_PARAMS_API */
854
855 int snd_pcm_hw_params_get_min_align(const snd_pcm_hw_params_t *params, snd_pcm_uframes_t *val);
856
866 size_t snd_pcm_sw_params_sizeof(void);
871 #define snd_pcm_sw_params_alloca(ptr) __snd_alloca(ptr, snd_pcm_sw_params)
872 int snd_pcm_sw_params_malloc(snd_pcm_sw_params_t **ptr);
873 void snd_pcm_sw_params_free(snd_pcm_sw_params_t *obj);
874 void snd_pcm_sw_params_copy(snd_pcm_sw_params_t *dst, const snd_pcm_sw_params_t *src);
875 int snd_pcm_sw_params_get_boundary(const snd_pcm_sw_params_t *params, snd_pcm_uframes_t *val);
876
877 #if !defined(ALSA_LIBRARY_BUILD) && !defined(ALSA_PCM_OLD_SW_PARAMS_API)
878
879 int snd_pcm_sw_params_set_tstamp_mode(snd_pcm_t *pcm, snd_pcm_sw_params_t *params, snd_pcm_tstamp_t val);
880 int snd_pcm_sw_params_get_tstamp_mode(const snd_pcm_sw_params_t *params, snd_pcm_tstamp_t *val);
881 int snd_pcm_sw_params_set_tstamp_type(snd_pcm_t *pcm, snd_pcm_sw_params_t *params, snd_pcm_tstamp_type_t val);
882 int snd_pcm_sw_params_get_tstamp_type(const snd_pcm_sw_params_t *params, snd_pcm_tstamp_type_t *val);
883 int snd_pcm_sw_params_set_avail_min(snd_pcm_t *pcm, snd_pcm_sw_params_t *params, snd_pcm_uframes_t val);
884 int snd_pcm_sw_params_get_avail_min(const snd_pcm_sw_params_t *params, snd_pcm_uframes_t *val);
885 int snd_pcm_sw_params_set_period_event(snd_pcm_t *pcm, snd_pcm_sw_params_t *params, int val);
886 int snd_pcm_sw_params_get_period_event(const snd_pcm_sw_params_t *params, int *val);
887 int snd_pcm_sw_params_set_start_threshold(snd_pcm_t *pcm, snd_pcm_sw_params_t *params, snd_pcm_uframes_t val);
888 int snd_pcm_sw_params_get_start_threshold(const snd_pcm_sw_params_t *paramsm, snd_pcm_uframes_t *val);
889 int snd_pcm_sw_params_set_stop_threshold(snd_pcm_t *pcm, snd_pcm_sw_params_t *params, snd_pcm_uframes_t val);
890 int snd_pcm_sw_params_get_stop_threshold(const snd_pcm_sw_params_t *params, snd_pcm_uframes_t *val);
891 int snd_pcm_sw_params_set_silence_threshold(snd_pcm_t *pcm, snd_pcm_sw_params_t *params, snd_pcm_uframes_t val);
892 int snd_pcm_sw_params_get_silence_threshold(const snd_pcm_sw_params_t *params, snd_pcm_uframes_t *val);
893 int snd_pcm_sw_params_set_silence_size(snd_pcm_t *pcm, snd_pcm_sw_params_t *params, snd_pcm_uframes_t val);
894 int snd_pcm_sw_params_get_silence_size(const snd_pcm_sw_params_t *params, snd_pcm_uframes_t *val);
895
896 #endif /* !ALSA_LIBRARY_BUILD && !ALSA_PCM_OLD_SW_PARAMS_API */
897
900 /* include old API */
901 #ifndef ALSA_LIBRARY_BUILD
902 #if defined(ALSA_PCM_OLD_HW_PARAMS_API) || defined(ALSA_PCM_OLD_SW_PARAMS_API)
903 #include "pcm_old.h"
904 #endif
905 #endif
906
914 size_t snd_pcm_access_mask_sizeof(void);
919 #define snd_pcm_access_mask_alloca(ptr) __snd_alloca(ptr, snd_pcm_access_mask)
920 int snd_pcm_access_mask_malloc(snd_pcm_access_mask_t **ptr);
921 void snd_pcm_access_mask_free(snd_pcm_access_mask_t *obj);
922 void snd_pcm_access_mask_copy(snd_pcm_access_mask_t *dst, const snd_pcm_access_mask_t *src);
923 void snd_pcm_access_mask_none(snd_pcm_access_mask_t *mask);
924 void snd_pcm_access_mask_any(snd_pcm_access_mask_t *mask);
925 int snd_pcm_access_mask_test(const snd_pcm_access_mask_t *mask, snd_pcm_access_t val);
926 int snd_pcm_access_mask_empty(const snd_pcm_access_mask_t *mask);
927 void snd_pcm_access_mask_set(snd_pcm_access_mask_t *mask, snd_pcm_access_t val);
928 void snd_pcm_access_mask_reset(snd_pcm_access_mask_t *mask, snd_pcm_access_t val);
929
939 size_t snd_pcm_format_mask_sizeof(void);
944 #define snd_pcm_format_mask_alloca(ptr) __snd_alloca(ptr, snd_pcm_format_mask)
945 int snd_pcm_format_mask_malloc(snd_pcm_format_mask_t **ptr);
946 void snd_pcm_format_mask_free(snd_pcm_format_mask_t *obj);
947 void snd_pcm_format_mask_copy(snd_pcm_format_mask_t *dst, const snd_pcm_format_mask_t *src);
948 void snd_pcm_format_mask_none(snd_pcm_format_mask_t *mask);
949 void snd_pcm_format_mask_any(snd_pcm_format_mask_t *mask);
950 int snd_pcm_format_mask_test(const snd_pcm_format_mask_t *mask, snd_pcm_format_t val);
951 int snd_pcm_format_mask_empty(const snd_pcm_format_mask_t *mask);
952 void snd_pcm_format_mask_set(snd_pcm_format_mask_t *mask, snd_pcm_format_t val);
953 void snd_pcm_format_mask_reset(snd_pcm_format_mask_t *mask, snd_pcm_format_t val);
954
964 size_t snd_pcm_subformat_mask_sizeof(void);
969 #define snd_pcm_subformat_mask_alloca(ptr) __snd_alloca(ptr, snd_pcm_subformat_mask)
970 int snd_pcm_subformat_mask_malloc(snd_pcm_subformat_mask_t **ptr);
971 void snd_pcm_subformat_mask_free(snd_pcm_subformat_mask_t *obj);
972 void snd_pcm_subformat_mask_copy(snd_pcm_subformat_mask_t *dst, const snd_pcm_subformat_mask_t *src);
973 void snd_pcm_subformat_mask_none(snd_pcm_subformat_mask_t *mask);
974 void snd_pcm_subformat_mask_any(snd_pcm_subformat_mask_t *mask);
975 int snd_pcm_subformat_mask_test(const snd_pcm_subformat_mask_t *mask, snd_pcm_subformat_t val);
976 int snd_pcm_subformat_mask_empty(const snd_pcm_subformat_mask_t *mask);
977 void snd_pcm_subformat_mask_set(snd_pcm_subformat_mask_t *mask, snd_pcm_subformat_t val);
978 void snd_pcm_subformat_mask_reset(snd_pcm_subformat_mask_t *mask, snd_pcm_subformat_t val);
979
989 size_t snd_pcm_status_sizeof(void);
994 #define snd_pcm_status_alloca(ptr) __snd_alloca(ptr, snd_pcm_status)
995 int snd_pcm_status_malloc(snd_pcm_status_t **ptr);
996 void snd_pcm_status_free(snd_pcm_status_t *obj);
997 void snd_pcm_status_copy(snd_pcm_status_t *dst, const snd_pcm_status_t *src);
998 snd_pcm_state_t snd_pcm_status_get_state(const snd_pcm_status_t *obj);
999 void snd_pcm_status_get_trigger_tstamp(const snd_pcm_status_t *obj, snd_timestamp_t *ptr);
1000 void snd_pcm_status_get_trigger_htstamp(const snd_pcm_status_t *obj, snd_htimestamp_t *ptr);
1001 void snd_pcm_status_get_tstamp(const snd_pcm_status_t *obj, snd_timestamp_t *ptr);
1002 void snd_pcm_status_get_htstamp(const snd_pcm_status_t *obj, snd_htimestamp_t *ptr);
1003 void snd_pcm_status_get_audio_htstamp(const snd_pcm_status_t *obj, snd_htimestamp_t *ptr);
1004 void snd_pcm_status_get_driver_htstamp(const snd_pcm_status_t *obj, snd_htimestamp_t *ptr);
1005 void snd_pcm_status_get_audio_htstamp_report(const snd_pcm_status_t *obj,
1006 snd_pcm_audio_tstamp_report_t *audio_tstamp_report);
1007 void snd_pcm_status_set_audio_htstamp_config(snd_pcm_status_t *obj,
1008 snd_pcm_audio_tstamp_config_t *audio_tstamp_config);
1009
1010 static inline void snd_pcm_pack_audio_tstamp_config(unsigned int *data,
1011 snd_pcm_audio_tstamp_config_t *config)
1012 {
1013 *data = config->report_delay;
1014 *data <<= 4;
1015 *data |= config->type_requested;
1016 }
1017
1018 static inline void snd_pcm_unpack_audio_tstamp_report(unsigned int data, unsigned int accuracy,
1019 snd_pcm_audio_tstamp_report_t *report)
1020 {
1021 data >>= 16;
1022 report->valid = data & 1;
1023 report->actual_type = (data >> 1) & 0xF;
1024 report->accuracy_report = (data >> 5) & 1;
1025 report->accuracy = accuracy;
1026 }
1027
1028 snd_pcm_sframes_t snd_pcm_status_get_delay(const snd_pcm_status_t *obj);
1029 snd_pcm_uframes_t snd_pcm_status_get_avail(const snd_pcm_status_t *obj);
1030 snd_pcm_uframes_t snd_pcm_status_get_avail_max(const snd_pcm_status_t *obj);
1031 snd_pcm_uframes_t snd_pcm_status_get_overrange(const snd_pcm_status_t *obj);
1032
1042 const char *snd_pcm_type_name(snd_pcm_type_t type);
1043 const char *snd_pcm_stream_name(const snd_pcm_stream_t stream);
1044 const char *snd_pcm_access_name(const snd_pcm_access_t _access);
1045 const char *snd_pcm_format_name(const snd_pcm_format_t format);
1046 const char *snd_pcm_format_description(const snd_pcm_format_t format);
1047 const char *snd_pcm_subformat_name(const snd_pcm_subformat_t subformat);
1048 const char *snd_pcm_subformat_description(const snd_pcm_subformat_t subformat);
1049 snd_pcm_format_t snd_pcm_format_value(const char* name);
1050 const char *snd_pcm_tstamp_mode_name(const snd_pcm_tstamp_t mode);
1051 const char *snd_pcm_state_name(const snd_pcm_state_t state);
1052
1062 int snd_pcm_dump(snd_pcm_t *pcm, snd_output_t *out);
1063 int snd_pcm_dump_hw_setup(snd_pcm_t *pcm, snd_output_t *out);
1064 int snd_pcm_dump_sw_setup(snd_pcm_t *pcm, snd_output_t *out);
1065 int snd_pcm_dump_setup(snd_pcm_t *pcm, snd_output_t *out);
1066 int snd_pcm_hw_params_dump(snd_pcm_hw_params_t *params, snd_output_t *out);
1067 int snd_pcm_sw_params_dump(snd_pcm_sw_params_t *params, snd_output_t *out);
1068 int snd_pcm_status_dump(snd_pcm_status_t *status, snd_output_t *out);
1069
1079 int snd_pcm_mmap_begin(snd_pcm_t *pcm,
1080 const snd_pcm_channel_area_t **areas,
1081 snd_pcm_uframes_t *offset,
1082 snd_pcm_uframes_t *frames);
1083 snd_pcm_sframes_t snd_pcm_mmap_commit(snd_pcm_t *pcm,
1084 snd_pcm_uframes_t offset,
1085 snd_pcm_uframes_t frames);
1086 snd_pcm_sframes_t snd_pcm_mmap_writei(snd_pcm_t *pcm, const void *buffer, snd_pcm_uframes_t size);
1087 snd_pcm_sframes_t snd_pcm_mmap_readi(snd_pcm_t *pcm, void *buffer, snd_pcm_uframes_t size);
1088 snd_pcm_sframes_t snd_pcm_mmap_writen(snd_pcm_t *pcm, void **bufs, snd_pcm_uframes_t size);
1089 snd_pcm_sframes_t snd_pcm_mmap_readn(snd_pcm_t *pcm, void **bufs, snd_pcm_uframes_t size);
1090
1100 int snd_pcm_format_signed(snd_pcm_format_t format);
1101 int snd_pcm_format_unsigned(snd_pcm_format_t format);
1102 int snd_pcm_format_linear(snd_pcm_format_t format);
1103 int snd_pcm_format_float(snd_pcm_format_t format);
1104 int snd_pcm_format_little_endian(snd_pcm_format_t format);
1105 int snd_pcm_format_big_endian(snd_pcm_format_t format);
1106 int snd_pcm_format_cpu_endian(snd_pcm_format_t format);
1107 int snd_pcm_format_width(snd_pcm_format_t format); /* in bits */
1108 int snd_pcm_format_physical_width(snd_pcm_format_t format); /* in bits */
1109 snd_pcm_format_t snd_pcm_build_linear_format(int width, int pwidth, int unsignd, int big_endian);
1110 ssize_t snd_pcm_format_size(snd_pcm_format_t format, size_t samples);
1111 u_int8_t snd_pcm_format_silence(snd_pcm_format_t format);
1112 u_int16_t snd_pcm_format_silence_16(snd_pcm_format_t format);
1113 u_int32_t snd_pcm_format_silence_32(snd_pcm_format_t format);
1114 u_int64_t snd_pcm_format_silence_64(snd_pcm_format_t format);
1115 int snd_pcm_format_set_silence(snd_pcm_format_t format, void *buf, unsigned int samples);
1116
1117 snd_pcm_sframes_t snd_pcm_bytes_to_frames(snd_pcm_t *pcm, ssize_t bytes);
1118 ssize_t snd_pcm_frames_to_bytes(snd_pcm_t *pcm, snd_pcm_sframes_t frames);
1119 long snd_pcm_bytes_to_samples(snd_pcm_t *pcm, ssize_t bytes);
1120 ssize_t snd_pcm_samples_to_bytes(snd_pcm_t *pcm, long samples);
1121
1122 int snd_pcm_area_silence(const snd_pcm_channel_area_t *dst_channel, snd_pcm_uframes_t dst_offset,
1123 unsigned int samples, snd_pcm_format_t format);
1124 int snd_pcm_areas_silence(const snd_pcm_channel_area_t *dst_channels, snd_pcm_uframes_t dst_offset,
1125 unsigned int channels, snd_pcm_uframes_t frames, snd_pcm_format_t format);
1126 int snd_pcm_area_copy(const snd_pcm_channel_area_t *dst_channel, snd_pcm_uframes_t dst_offset,
1127 const snd_pcm_channel_area_t *src_channel, snd_pcm_uframes_t src_offset,
1128 unsigned int samples, snd_pcm_format_t format);
1129 int snd_pcm_areas_copy(const snd_pcm_channel_area_t *dst_channels, snd_pcm_uframes_t dst_offset,
1130 const snd_pcm_channel_area_t *src_channels, snd_pcm_uframes_t src_offset,
1131 unsigned int channels, snd_pcm_uframes_t frames, snd_pcm_format_t format);
1132
1143 typedef enum _snd_pcm_hook_type {
1144 SND_PCM_HOOK_TYPE_HW_PARAMS = 0,
1145 SND_PCM_HOOK_TYPE_HW_FREE,
1146 SND_PCM_HOOK_TYPE_CLOSE,
1147 SND_PCM_HOOK_TYPE_LAST = SND_PCM_HOOK_TYPE_CLOSE
1148 } snd_pcm_hook_type_t;
1149
1151 typedef struct _snd_pcm_hook snd_pcm_hook_t;
1153 typedef int (*snd_pcm_hook_func_t)(snd_pcm_hook_t *hook);
1154 snd_pcm_t *snd_pcm_hook_get_pcm(snd_pcm_hook_t *hook);
1155 void *snd_pcm_hook_get_private(snd_pcm_hook_t *hook);
1156 void snd_pcm_hook_set_private(snd_pcm_hook_t *hook, void *private_data);
1157 int snd_pcm_hook_add(snd_pcm_hook_t **hookp, snd_pcm_t *pcm,
1158 snd_pcm_hook_type_t type,
1159 snd_pcm_hook_func_t func, void *private_data);
1160 int snd_pcm_hook_remove(snd_pcm_hook_t *hook);
1161
1172 typedef struct _snd_pcm_scope_ops {
1176 int (*enable)(snd_pcm_scope_t *scope);
1180 void (*disable)(snd_pcm_scope_t *scope);
1184 void (*start)(snd_pcm_scope_t *scope);
1188 void (*stop)(snd_pcm_scope_t *scope);
1192 void (*update)(snd_pcm_scope_t *scope);
1196 void (*reset)(snd_pcm_scope_t *scope);
1200 void (*close)(snd_pcm_scope_t *scope);
1201 } snd_pcm_scope_ops_t;
1202
1203 snd_pcm_uframes_t snd_pcm_meter_get_bufsize(snd_pcm_t *pcm);
1204 unsigned int snd_pcm_meter_get_channels(snd_pcm_t *pcm);
1205 unsigned int snd_pcm_meter_get_rate(snd_pcm_t *pcm);
1206 snd_pcm_uframes_t snd_pcm_meter_get_now(snd_pcm_t *pcm);
1207 snd_pcm_uframes_t snd_pcm_meter_get_boundary(snd_pcm_t *pcm);
1208 int snd_pcm_meter_add_scope(snd_pcm_t *pcm, snd_pcm_scope_t *scope);
1209 snd_pcm_scope_t *snd_pcm_meter_search_scope(snd_pcm_t *pcm, const char *name);
1210 int snd_pcm_scope_malloc(snd_pcm_scope_t **ptr);
1211 void snd_pcm_scope_set_ops(snd_pcm_scope_t *scope,
1212 const snd_pcm_scope_ops_t *val);
1213 void snd_pcm_scope_set_name(snd_pcm_scope_t *scope, const char *val);
1214 const char *snd_pcm_scope_get_name(snd_pcm_scope_t *scope);
1215 void *snd_pcm_scope_get_callback_private(snd_pcm_scope_t *scope);
1216 void snd_pcm_scope_set_callback_private(snd_pcm_scope_t *scope, void *val);
1217 int snd_pcm_scope_s16_open(snd_pcm_t *pcm, const char *name,
1218 snd_pcm_scope_t **scopep);
1219 int16_t *snd_pcm_scope_s16_get_channel_buffer(snd_pcm_scope_t *scope,
1220 unsigned int channel);
1221
1232 typedef enum _snd_spcm_latency {
1235 SND_SPCM_LATENCY_STANDARD = 0,
1238 SND_SPCM_LATENCY_MEDIUM,
1241 SND_SPCM_LATENCY_REALTIME
1242 } snd_spcm_latency_t;
1243
1245 typedef enum _snd_spcm_xrun_type {
1247 SND_SPCM_XRUN_IGNORE = 0,
1249 SND_SPCM_XRUN_STOP
1250 } snd_spcm_xrun_type_t;
1251
1253 typedef enum _snd_spcm_duplex_type {
1255 SND_SPCM_DUPLEX_LIBERAL = 0,
1257 SND_SPCM_DUPLEX_PEDANTIC
1258 } snd_spcm_duplex_type_t;
1259
1260 int snd_spcm_init(snd_pcm_t *pcm,
1261 unsigned int rate,
1262 unsigned int channels,
1263 snd_pcm_format_t format,
1264 snd_pcm_subformat_t subformat,
1265 snd_spcm_latency_t latency,
1266 snd_pcm_access_t _access,
1267 snd_spcm_xrun_type_t xrun_type);
1268
1269 int snd_spcm_init_duplex(snd_pcm_t *playback_pcm,
1270 snd_pcm_t *capture_pcm,
1271 unsigned int rate,
1272 unsigned int channels,
1273 snd_pcm_format_t format,
1274 snd_pcm_subformat_t subformat,
1275 snd_spcm_latency_t latency,
1276 snd_pcm_access_t _access,
1277 snd_spcm_xrun_type_t xrun_type,
1278 snd_spcm_duplex_type_t duplex_type);
1279
1280 int snd_spcm_init_get_params(snd_pcm_t *pcm,
1281 unsigned int *rate,
1282 snd_pcm_uframes_t *buffer_size,
1283 snd_pcm_uframes_t *period_size);
1284
1294 /* Deprecated functions, for compatibility */
1295 const char *snd_pcm_start_mode_name(snd_pcm_start_t mode) __attribute__((deprecated));
1296 const char *snd_pcm_xrun_mode_name(snd_pcm_xrun_t mode) __attribute__((deprecated));
1297 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));
1298 snd_pcm_start_t snd_pcm_sw_params_get_start_mode(const snd_pcm_sw_params_t *params) __attribute__((deprecated));
1299 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));
1300 snd_pcm_xrun_t snd_pcm_sw_params_get_xrun_mode(const snd_pcm_sw_params_t *params) __attribute__((deprecated));
1301 #if !defined(ALSA_LIBRARY_BUILD) && !defined(ALSA_PCM_OLD_SW_PARAMS_API)
1302 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));
1303 int snd_pcm_sw_params_get_xfer_align(const snd_pcm_sw_params_t *params, snd_pcm_uframes_t *val) __attribute__((deprecated));
1304 int snd_pcm_sw_params_set_sleep_min(snd_pcm_t *pcm, snd_pcm_sw_params_t *params, unsigned int val) __attribute__((deprecated));
1305 int snd_pcm_sw_params_get_sleep_min(const snd_pcm_sw_params_t *params, unsigned int *val) __attribute__((deprecated));
1306 #endif /* !ALSA_LIBRARY_BUILD && !ALSA_PCM_OLD_SW_PARAMS_API */
1307 #if !defined(ALSA_LIBRARY_BUILD) && !defined(ALSA_PCM_OLD_HW_PARAMS_API)
1308 int snd_pcm_hw_params_get_tick_time(const snd_pcm_hw_params_t *params, unsigned int *val, int *dir) __attribute__((deprecated));
1309 int snd_pcm_hw_params_get_tick_time_min(const snd_pcm_hw_params_t *params, unsigned int *val, int *dir) __attribute__((deprecated));
1310 int snd_pcm_hw_params_get_tick_time_max(const snd_pcm_hw_params_t *params, unsigned int *val, int *dir) __attribute__((deprecated));
1311 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));
1312 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));
1313 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));
1314 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));
1315 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));
1316 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));
1317 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));
1318 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));
1319 #endif /* !ALSA_LIBRARY_BUILD && !ALSA_PCM_OLD_HW_PARAMS_API */
1320
1323 #ifdef __cplusplus
1324 }
1325 #endif
1326
1327 #endif /* __ALSA_PCM_H */
SND_PCM_TSTAMP_ENABLE
Definition: pcm.h:318
snd_pcm_sw_params_get_avail_min
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:6285
snd_pcm_sw_params_get_boundary
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:6044
snd_pcm_hw_params_set_buffer_size_last
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:5711
snd_pcm_hw_params_get_buffer_size
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:5533
snd_pcm_hwsync
int snd_pcm_hwsync(snd_pcm_t *pcm)
(DEPRECATED) Synchronize stream position with hardware
Definition: pcm.c:1015
snd_pcm_sw_params_t
struct _snd_pcm_sw_params snd_pcm_sw_params_t
Definition: pcm.h:65
snd_pcm_hw_params_get_subformat_mask
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:4246
snd_pcm_hook_set_private
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
snd_spcm_init_get_params
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
SND_PCM_FORMAT_FLOAT64_LE
Definition: pcm.h:159
snd_pcm_access_mask_empty
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:3688
SND_PCM_TYPE_ROUTE
Definition: pcm.h:406
snd_pcm_set_chmap
int snd_pcm_set_chmap(snd_pcm_t *pcm, const snd_pcm_chmap_t *map)
Definition: pcm.c:7895
snd_pcm_xrun_t
snd_pcm_xrun_t
Definition: pcm.h:305
snd_pcm_sw_params_dump
int snd_pcm_sw_params_dump(snd_pcm_sw_params_t *params, snd_output_t *out)
Dump a software configuration.
Definition: pcm.c:5981
snd_pcm_hw_params_set_buffer_time_first
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:5498
snd_pcm_sw_params_get_xfer_align
int snd_pcm_sw_params_get_xfer_align(const snd_pcm_sw_params_t *params, snd_pcm_uframes_t *val) __attribute__((deprecated))
(DEPRECATED) Get xfer align from a software configuration container
Definition: pcm.c:6347
snd_pcm_format_float
int snd_pcm_format_float(snd_pcm_format_t format)
Return float info for a PCM sample format.
Definition: pcm_misc.c:106
snd_pcm_info
int snd_pcm_info(snd_pcm_t *pcm, snd_pcm_info_t *info)
Obtain general (static) information for PCM handle.
Definition: pcm.c:814
snd_pcm_hw_params_get_period_size_min
int snd_pcm_hw_params_get_period_size_min(const snd_pcm_hw_params_t *params, snd_pcm_uframes_t *frames, int *dir)
Extract minimum period size from a configuration space.
Definition: pcm.c:4932
snd_pcm_hw_params_test_subformat
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:4180
snd_pcm_hw_params_get_tick_time_min
int snd_pcm_hw_params_get_tick_time_min(const snd_pcm_hw_params_t *params, unsigned int *val, int *dir) __attribute__((deprecated))
(DEPRECATED) Extract minimum tick time from a configuration space
Definition: pcm.c:5753
snd_pcm_hw_params_get_rate_resample
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:4620
snd_pcm_hw_params_set_rate_first
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:4570
snd_pcm_sw_params_get_start_mode
snd_pcm_start_t snd_pcm_sw_params_get_start_mode(const snd_pcm_sw_params_t *params) __attribute__((deprecated))
(DEPRECATED) Get start mode from a software configuration container
Definition: pcm.c:6084
snd_pcm_hw_params_get_periods_min
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:5165
SND_PCM_ACCESS_MMAP_NONINTERLEAVED
Definition: pcm.h:112
SND_CHMAP_BLC
Definition: pcm.h:574
snd_pcm_chmap_query_t::map
snd_pcm_chmap_t map
Definition: pcm.h:596
SND_PCM_SUBFORMAT_STD
Definition: pcm.h:268
snd_pcm_hw_params_get_period_wakeup
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:4703
snd_pcm_hw_params_get_export_buffer
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:4652
snd_pcm_start_mode_name
const char * snd_pcm_start_mode_name(snd_pcm_start_t mode) __attribute__((deprecated))
(DEPRECATED) get name of PCM start mode setting
Definition: pcm.c:2036
snd_pcm_info_sizeof
size_t snd_pcm_info_sizeof(void)
get size of snd_pcm_info_t
Definition: pcm.c:6762
snd_pcm_hw_params_test_tick_time
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))
(DEPRECATED) Verify if a tick time is available inside a configuration space for a PCM ...
Definition: pcm.c:5789
SND_PCM_FORMAT_UNKNOWN
Definition: pcm.h:125
snd_pcm_hw_params_get_periods
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:5147
SND_PCM_TYPE_LINEAR_FLOAT
Definition: pcm.h:420
SND_CHMAP_FR
Definition: pcm.h:543
snd_pcm_chmap_query_t
Definition: pcm.h:594
snd_pcm_subformat_mask_t
struct _snd_pcm_subformat_mask snd_pcm_subformat_mask_t
Definition: pcm.h:73
snd_pcm_scope_s16_get_channel_buffer
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:1207
SND_PCM_ACCESS_MMAP_INTERLEAVED
Definition: pcm.h:110
SND_PCM_FORMAT_U24_BE
Definition: pcm.h:145
SND_CHMAP_FRH
Definition: pcm.h:559
snd_pcm_hw_params_set_buffer_size_minmax
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:5651
snd_pcm_state_t
snd_pcm_state_t
Definition: pcm.h:273
snd_pcm_status_malloc
int snd_pcm_status_malloc(snd_pcm_status_t **ptr)
allocate an invalid snd_pcm_status_t using standard malloc
Definition: pcm.c:6559
snd_pcm_hw_params_set_periods_min
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:5229
snd_pcm_status_get_trigger_htstamp
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:6627
SND_SPCM_XRUN_STOP
Definition: pcm.h:1249
snd_pcm_hw_params_test_buffer_time
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:5399
snd_pcm_class_t
snd_pcm_class_t
Definition: pcm.h:76
SND_PCM_TYPE_EXTPLUG
Definition: pcm.h:438
snd_pcm_meter_get_channels
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:893
snd_pcm_hw_params_set_buffer_size_near
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:5671
snd_pcm_hw_params_set_channels_max
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:4340
snd_pcm_areas_copy
int snd_pcm_areas_copy(const snd_pcm_channel_area_t *dst_channels, snd_pcm_uframes_t dst_offset, const snd_pcm_channel_area_t *src_channels, 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:3158
snd_pcm_format_mask_sizeof
size_t snd_pcm_format_mask_sizeof(void)
get size of snd_pcm_format_mask_t
Definition: pcm.c:3717
snd_pcm_drop
int snd_pcm_drop(snd_pcm_t *pcm)
Stop a PCM dropping pending frames.
Definition: pcm.c:1215
SND_CHMAP_NA
Definition: pcm.h:540
snd_pcm_status
int snd_pcm_status(snd_pcm_t *pcm, snd_pcm_status_t *status)
Obtain status (runtime) information for PCM handle.
Definition: pcm.c:971
snd_pcm_poll_descriptors_count
int snd_pcm_poll_descriptors_count(snd_pcm_t *pcm)
get count of poll descriptors for PCM handle
Definition: pcm.c:1596
snd_pcm_status_get_avail_max
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:6742
SND_CHMAP_TFL
Definition: pcm.h:561
snd_pcm_format_mask_set
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:3800
SND_PCM_STATE_SUSPENDED
Definition: pcm.h:289
SND_CHMAP_LLFE
Definition: pcm.h:571
snd_pcm_channel_area_t
Definition: pcm.h:448
snd_async_callback_t
void(* snd_async_callback_t)(snd_async_handler_t *handler)
Async notification callback.
Definition: global.h:121
SND_PCM_TYPE_COPY
Definition: pcm.h:394
SND_PCM_FORMAT_S24
Definition: pcm.h:228
SND_CHMAP_RLFE
Definition: pcm.h:572
SND_PCM_TYPE_IEC958
Definition: pcm.h:432
SND_PCM_FORMAT_S24_BE
Definition: pcm.h:141
snd_pcm_format_set_silence
int snd_pcm_format_set_silence(snd_pcm_format_t format, void *buf, unsigned int samples)
Silence a PCM samples buffer.
Definition: pcm_misc.c:577
snd_pcm_hw_params_set_periods_first
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:5298
SND_PCM_TYPE_IOPLUG
Definition: pcm.h:436
SND_CHMAP_TYPE_LAST
Definition: pcm.h:534
snd_pcm_start
int snd_pcm_start(snd_pcm_t *pcm)
Start a PCM.
Definition: pcm.c:1185
snd_pcm_subformat_t
snd_pcm_subformat_t
Definition: pcm.h:266
snd_pcm_format_unsigned
int snd_pcm_format_unsigned(snd_pcm_format_t format)
Return sign info for a PCM sample linear format.
Definition: pcm_misc.c:81
snd_pcm_hw_params_set_period_size_min
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:5004
snd_pcm_hw_params_t
struct _snd_pcm_hw_params snd_pcm_hw_params_t
Definition: pcm.h:62
snd_pcm_chmap_t
Definition: pcm.h:588
SND_CHMAP_RC
Definition: pcm.h:550
snd_pcm_hw_params_supports_audio_ts_type
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:3510
snd_pcm_type
snd_pcm_type_t snd_pcm_type(snd_pcm_t *pcm)
get type of PCM handle
Definition: pcm.c:697
snd_pcm_hw_params_set_access_last
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:4032
snd_pcm_channel_area_t::addr
void * addr
Definition: pcm.h:450
snd_pcm_status_t
struct _snd_pcm_status snd_pcm_status_t
Definition: pcm.h:67
snd_pcm_info_t
struct _snd_pcm_info snd_pcm_info_t
Definition: pcm.h:46
SND_PCM_FORMAT_U8
Definition: pcm.h:129
snd_pcm_chmap_name
const char * snd_pcm_chmap_name(enum snd_pcm_chmap_position val)
Definition: pcm.c:7954
snd_pcm_hw_params_can_mmap_sample_resolution
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:3256
SND_PCM_FORMAT_U20_3BE
Definition: pcm.h:193
snd_pcm_hw_params_set_period_time_first
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:4874
snd_pcm_format_mask_reset
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:3810
SND_PCM_FORMAT_S16_BE
Definition: pcm.h:133
SND_PCM_FORMAT_U16_BE
Definition: pcm.h:137
snd_pcm_hw_params_get_format_mask
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:4152
snd_pcm_hw_params_set_format_first
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:4113
SND_PCM_TYPE_PLUG
Definition: pcm.h:408
_snd_pcm_type
_snd_pcm_type
Definition: pcm.h:377
SND_PCM_FORMAT_MU_LAW
Definition: pcm.h:167
snd_pcm_hw_params_set_rate_near
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:4551
SND_CHMAP_TYPE_PAIRED
Definition: pcm.h:533
snd_pcm_chmap_type
snd_pcm_chmap_type
Definition: pcm.h:529
SND_PCM_TYPE_RATE
Definition: pcm.h:404
SND_PCM_FORMAT_S24_3LE
Definition: pcm.h:179
snd_pcm_hw_params_is_joint_duplex
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:3436
snd_pcm_subclass_t
snd_pcm_subclass_t
Definition: pcm.h:90
snd_pcm_delay
int snd_pcm_delay(snd_pcm_t *pcm, snd_pcm_sframes_t *delayp)
Obtain delay for a running PCM handle.
Definition: pcm.c:1063
SND_PCM_FORMAT_S16_LE
Definition: pcm.h:131
snd_pcm_hw_params_test_format
int snd_pcm_hw_params_test_format(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, snd_pcm_format_t val)
Verify if a format is available inside a configuration space for a PCM.
Definition: pcm.c:4086
snd_pcm_areas_silence
int snd_pcm_areas_silence(const snd_pcm_channel_area_t *dst_channels, 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:2986
snd_pcm_hw_params_get_buffer_size_max
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:5573
snd_pcm_format_description
const char * snd_pcm_format_description(const snd_pcm_format_t format)
get description of PCM sample format
Definition: pcm.c:1973
SND_PCM_TYPE_NULL
Definition: pcm.h:388
snd_pcm_wait
int snd_pcm_wait(snd_pcm_t *pcm, int timeout)
Wait for a PCM to become ready.
Definition: pcm.c:2666
snd_pcm_hook_remove
int snd_pcm_hook_remove(snd_pcm_hook_t *hook)
Remove a PCM hook.
Definition: pcm_hooks.c:628
snd_pcm_meter_search_scope
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:859
snd_pcm_hw_params_dump
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:3236
snd_pcm_hw_params_get_tick_time_max
int snd_pcm_hw_params_get_tick_time_max(const snd_pcm_hw_params_t *params, unsigned int *val, int *dir) __attribute__((deprecated))
(DEPRECATED) Extract maximum tick time from a configuration space
Definition: pcm.c:5772
snd_pcm_hw_params_set_subformat_last
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:4223
snd_pcm_hw_params_is_block_transfer
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:3316
snd_pcm_access_mask_any
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:3667
snd_pcm_hw_params_get_buffer_time
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:5347
snd_pcm_close
int snd_pcm_close(snd_pcm_t *pcm)
close PCM handle
Definition: pcm.c:724
snd_pcm_info_get_subdevice_name
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:6872
snd_pcm_status_get_driver_htstamp
void snd_pcm_status_get_driver_htstamp(const snd_pcm_status_t *obj, snd_htimestamp_t *ptr)
Get &quot;now&quot; hi-res driver timestamp from a PCM status container. Defines when the status was generated ...
Definition: pcm.c:6680
snd_pcm_sw_params_set_xfer_align
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))
(DEPRECATED) Set xfer align inside a software configuration container
Definition: pcm.c:6332
SND_CHMAP_TC
Definition: pcm.h:560
SND_PCM_FORMAT_U24_LE
Definition: pcm.h:143
snd_pcm_subformat_mask_reset
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:3913
SND_CHMAP_TYPE_NONE
Definition: pcm.h:530
SND_PCM_TYPE_ALAW
Definition: pcm.h:398
snd_pcm_hw_params_set_period_time
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:4789
snd_pcm_subformat_mask_free
void snd_pcm_subformat_mask_free(snd_pcm_subformat_mask_t *obj)
frees a previously allocated snd_pcm_subformat_mask_t
Definition: pcm.c:3843
snd_pcm_sw_params_get_tstamp_mode
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:6174
snd_pcm_status_dump
int snd_pcm_status_dump(snd_pcm_status_t *status, snd_output_t *out)
Dump status.
Definition: pcm.c:2192
SND_PCM_TYPE_LINEAR
Definition: pcm.h:396
snd_pcm_hw_params_set_rate_min
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:4501
SND_PCM_TYPE_MIX
Definition: pcm.h:414
snd_pcm_scope_set_name
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:949
SND_PCM_TYPE_MULAW
Definition: pcm.h:400
SND_PCM_FORMAT_IEC958_SUBFRAME
Definition: pcm.h:240
SND_SPCM_LATENCY_REALTIME
Definition: pcm.h:1241
snd_pcm_hw_params_copy
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:3956
snd_pcm_start_t
snd_pcm_start_t
Definition: pcm.h:296
snd_pcm_format_width
int snd_pcm_format_width(snd_pcm_format_t format)
Return nominal bits per a PCM sample.
Definition: pcm_misc.c:202
snd_pcm_hw_params_can_pause
int snd_pcm_hw_params_can_pause(const snd_pcm_hw_params_t *params)
Check if hardware supports pause.
Definition: pcm.c:3376
snd_pcm_hw_params_set_buffer_size
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:5606
snd_pcm_nonblock
int snd_pcm_nonblock(snd_pcm_t *pcm, int nonblock)
set nonblock mode
Definition: pcm.c:757
snd_pcm_status_get_tstamp
void snd_pcm_status_get_tstamp(const snd_pcm_status_t *obj, snd_timestamp_t *ptr)
Get &quot;now&quot; timestamp from a PCM status container.
Definition: pcm.c:6640
snd_pcm_scope_get_callback_private
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:979
SND_SPCM_XRUN_IGNORE
Definition: pcm.h:1247
snd_pcm_status_sizeof
size_t snd_pcm_status_sizeof(void)
get size of snd_pcm_status_t
Definition: pcm.c:6549
snd_pcm_hw_params_set_format_last
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:4129
snd_pcm_info_free
void snd_pcm_info_free(snd_pcm_info_t *obj)
frees a previously allocated snd_pcm_info_t
Definition: pcm.c:6785
SND_SPCM_DUPLEX_LIBERAL
Definition: pcm.h:1255
SND_PCM_FORMAT_S32_BE
Definition: pcm.h:149
snd_pcm_hw_params_get_period_size
int snd_pcm_hw_params_get_period_size(const snd_pcm_hw_params_t *params, snd_pcm_uframes_t *frames, int *dir)
Extract period size from a configuration space.
Definition: pcm.c:4910
snd_pcm_get_params
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:8539
SND_PCM_TSTAMP_NONE
Definition: pcm.h:316
snd_pcm_hw_params_malloc
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:3933
SND_CHMAP_FLC
Definition: pcm.h:551
SND_PCM_STREAM_CAPTURE
Definition: pcm.h:103
snd_pcm_hw_params_get_rate_max
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:4455
SND_CHMAP_TSL
Definition: pcm.h:569
snd_pcm_hw_params_set_period_size_max
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:5023
snd_pcm_chmap_print
int snd_pcm_chmap_print(const snd_pcm_chmap_t *map, size_t maxlen, char *buf)
Definition: pcm.c:8022
SND_PCM_STATE_RUNNING
Definition: pcm.h:281
snd_pcm_access_mask_free
void snd_pcm_access_mask_free(snd_pcm_access_mask_t *obj)
frees a previously allocated snd_pcm_access_mask_t
Definition: pcm.c:3638
SND_PCM_FORMAT_FLOAT64_BE
Definition: pcm.h:161
snd_pcm_hw_params_set_subformat_mask
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:4236
snd_pcm_format_mask_free
void snd_pcm_format_mask_free(snd_pcm_format_mask_t *obj)
frees a previously allocated snd_pcm_format_mask_t
Definition: pcm.c:3740
snd_pcm_subformat_mask_empty
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:3893
snd_pcm_xrun_mode_name
const char * snd_pcm_xrun_mode_name(snd_pcm_xrun_t mode) __attribute__((deprecated))
(DEPRECATED) get name of PCM xrun mode setting
Definition: pcm.c:2052
snd_pcm_hw_params_test_periods
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:5199
SND_PCM_TYPE_LADSPA
Definition: pcm.h:422
snd_pcm_hw_params_set_periods_integer
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:5329
snd_pcm_meter_get_now
snd_pcm_uframes_t snd_pcm_meter_get_now(snd_pcm_t *pcm)
Get meter &quot;now&quot; frame pointer from a SND_PCM_TYPE_METER PCM.
Definition: pcm_meter.c:921
SND_CHMAP_SL
Definition: pcm.h:548
SND_PCM_TYPE_METER
Definition: pcm.h:412
snd_pcm_format_t
snd_pcm_format_t
Definition: pcm.h:123
snd_pcm_chmap_long_name
const char * snd_pcm_chmap_long_name(enum snd_pcm_chmap_position val)
Definition: pcm.c:8007
snd_pcm_sframes_t
long snd_pcm_sframes_t
Definition: pcm.h:356
SND_PCM_STATE_PREPARED
Definition: pcm.h:279
SND_PCM_FORMAT_U32_BE
Definition: pcm.h:153
snd_pcm_hw_params_test_rate
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:4471
SND_PCM_TYPE_FILE
Definition: pcm.h:386
SND_CHMAP_FLW
Definition: pcm.h:555
snd_pcm_hw_params_test_buffer_size
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:5592
SND_PCM_FORMAT_S18_3LE
Definition: pcm.h:195
SND_PCM_FORMAT_MPEG
Definition: pcm.h:173
snd_pcm_open_lconf
int snd_pcm_open_lconf(snd_pcm_t **pcm, const char *name, snd_pcm_stream_t stream, int mode, snd_config_t *lconf)
Opens a PCM using local configuration.
Definition: pcm.c:2547
SND_PCM_STATE_PAUSED
Definition: pcm.h:287
snd_pcm_tstamp_mode_name
const char * snd_pcm_tstamp_mode_name(const snd_pcm_tstamp_t mode)
get name of PCM tstamp mode setting
Definition: pcm.c:2068
snd_pcm_chmap_type_name
const char * snd_pcm_chmap_type_name(enum snd_pcm_chmap_type val)
Definition: pcm.c:7921
snd_pcm_hw_params_get_channels_min
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:4276
snd_pcm_mmap_begin
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:6988
snd_pcm_meter_add_scope
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:844
SND_CHMAP_TSR
Definition: pcm.h:570
SND_PCM_FORMAT_U32
Definition: pcm.h:234
snd_pcm_format_mask_none
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:3760
snd_pcm_hw_params_free
void snd_pcm_hw_params_free(snd_pcm_hw_params_t *obj)
frees a previously allocated snd_pcm_hw_params_t
Definition: pcm.c:3946
snd_pcm_hw_params_get_access
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:3972
snd_pcm_hw_params_set_subformat
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:4192
snd_pcm_audio_tstamp_config_t
Definition: pcm.h:333
snd_pcm_access_mask_copy
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:3648
SND_PCM_FORMAT_S32
Definition: pcm.h:232
snd_pcm_info_set_stream
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:6962
snd_pcm_scope_t
struct _snd_pcm_scope snd_pcm_scope_t
Definition: pcm.h:468
snd_pcm_hw_params_sizeof
size_t snd_pcm_hw_params_sizeof(void)
get size of snd_pcm_hw_params_t
Definition: pcm.c:3923
snd_pcm_hw_params_set_tick_time_near
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))
(DEPRECATED) Restrict a configuration space to have tick time nearest to a target ...
Definition: pcm.c:5869
snd_pcm_hw_params_get_rate_min
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:4437
snd_pcm_avail
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:2812
snd_pcm_sw_params_set_avail_min
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:6262
SND_PCM_TYPE_HW
Definition: pcm.h:379
snd_pcm_info_set_device
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:6940
snd_pcm_hw_params_set_rate_resample
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:4602
SND_CHMAP_FCH
Definition: pcm.h:558
snd_pcm_hw_params_set_channels_last
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:4400
snd_pcm_scope_get_name
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:959
snd_pcm_scope_s16_open
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:1175
SND_CHMAP_TFC
Definition: pcm.h:563
snd_pcm_info_get_subdevice
unsigned int snd_pcm_info_get_subdevice(const snd_pcm_info_t *obj)
Get subdevice from a PCM info container.
Definition: pcm.c:6817
SND_PCM_FORMAT_SPECIAL
Definition: pcm.h:177
snd_pcm_hw_params_set_period_time_min
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:4805
snd_pcm_info_get_subdevices_count
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:6905
SND_CHMAP_TFRC
Definition: pcm.h:568
snd_pcm_hw_params_get_period_time
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:4722
snd_pcm_info_get_id
const char * snd_pcm_info_get_id(const snd_pcm_info_t *obj)
Get id from a PCM info container.
Definition: pcm.c:6850
snd_pcm_hw_params_get_tick_time
int snd_pcm_hw_params_get_tick_time(const snd_pcm_hw_params_t *params, unsigned int *val, int *dir) __attribute__((deprecated))
(DEPRECATED) Extract tick time from a configuration space
Definition: pcm.c:5734
snd_pcm_hw_params_get_fifo_size
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:3587
snd_pcm_hw_params_set_period_size_minmax
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:5044
snd_pcm_status_get_state
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:6593
snd_pcm_sw_params_set_stop_threshold
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:6411
SND_PCM_TYPE_SOFTVOL
Definition: pcm.h:434
snd_pcm_subformat_mask_any
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:3872
SND_PCM_TYPE_SHM
Definition: pcm.h:390
SND_PCM_CLASS_MULTI
Definition: pcm.h:81
SND_PCM_FORMAT_IMA_ADPCM
Definition: pcm.h:171
snd_output_t
struct _snd_output snd_output_t
Internal structure for an output object.
Definition: output.h:54
snd_htimestamp_t
struct timespec snd_htimestamp_t
Definition: global.h:153
snd_pcm_sw_params_set_xrun_mode
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))
(DEPRECATED) Set xrun mode inside a software configuration container
Definition: pcm.c:6105
SND_PCM_FORMAT_IEC958_SUBFRAME_LE
Definition: pcm.h:163
snd_pcm_free_chmaps
void snd_pcm_free_chmaps(snd_pcm_chmap_query_t **maps)
Definition: pcm.c:7865
snd_pcm_hw_params_set_format
int snd_pcm_hw_params_set_format(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, snd_pcm_format_t val)
Restrict a configuration space to contain only one format.
Definition: pcm.c:4098
snd_pcm_status_get_htstamp
void snd_pcm_status_get_htstamp(const snd_pcm_status_t *obj, snd_htimestamp_t *ptr)
Get &quot;now&quot; hi-res timestamp from a PCM status container.
Definition: pcm.c:6655
snd_pcm_access_mask_sizeof
size_t snd_pcm_access_mask_sizeof(void)
get size of snd_pcm_access_mask_t
Definition: pcm.c:3615
snd_pcm_hw_params_set_channels
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:4316
snd_pcm_mmap_readi
snd_pcm_sframes_t snd_pcm_mmap_readi(snd_pcm_t *pcm, void *buffer, snd_pcm_uframes_t size)
Read interleaved frames from a PCM using direct buffer (mmap)
Definition: pcm_mmap.c:199
snd_pcm_meter_get_bufsize
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:879
snd_pcm_subformat_mask_copy
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:3853
SND_SPCM_DUPLEX_PEDANTIC
Definition: pcm.h:1257
snd_pcm_hw_params_set_buffer_time_max
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:5444
snd_pcm_scope_set_ops
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:969
snd_pcm_subformat_mask_set
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:3903
SND_PCM_FORMAT_S24_LE
Definition: pcm.h:139
SND_CHMAP_LFE
Definition: pcm.h:547
SND_PCM_FORMAT_U18_3LE
Definition: pcm.h:199
SND_PCM_FORMAT_S24_3BE
Definition: pcm.h:181
snd_pcm_hw_params_is_half_duplex
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:3416
SND_PCM_CLASS_DIGITIZER
Definition: pcm.h:85
SND_PCM_START_EXPLICIT
Definition: pcm.h:300
snd_pcm_format_mask_any
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:3769
snd_pcm_hw_params_set_period_wakeup
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:4681
SND_CHMAP_TRR
Definition: pcm.h:565
snd_pcm_readn
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:1534
snd_pcm_status_get_trigger_tstamp
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:6608
snd_pcm_hw_params_get_rate_numden
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:3546
SND_PCM_TYPE_DSHARE
Definition: pcm.h:430
snd_pcm_hw_params_set_tick_time_max
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))
(DEPRECATED) Restrict a configuration space with a maximum tick time
Definition: pcm.c:5834
SND_CHMAP_RLC
Definition: pcm.h:553
SND_PCM_STATE_DISCONNECTED
Definition: pcm.h:291
snd_spcm_xrun_type_t
snd_spcm_xrun_type_t
Definition: pcm.h:1245
snd_pcm_hw_params_set_access_first
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:4016
SND_PCM_FORMAT_U18_3BE
Definition: pcm.h:201
snd_pcm_sw_params_set_sleep_min
int snd_pcm_sw_params_set_sleep_min(snd_pcm_t *pcm, snd_pcm_sw_params_t *params, unsigned int val) __attribute__((deprecated))
(DEPRECATED) Set minimum number of ticks to sleep inside a software configuration container ...
Definition: pcm.c:6223
SND_PCM_ACCESS_RW_NONINTERLEAVED
Definition: pcm.h:118
snd_pcm_hook_type_t
snd_pcm_hook_type_t
Definition: pcm.h:1143
snd_pcm_mmap_writei
snd_pcm_sframes_t snd_pcm_mmap_writei(snd_pcm_t *pcm, const void *buffer, snd_pcm_uframes_t size)
Write interleaved frames to a PCM using direct buffer (mmap)
Definition: pcm_mmap.c:149
snd_pcm_dump_setup
int snd_pcm_dump_setup(snd_pcm_t *pcm, snd_output_t *out)
Dump current setup (hardware and software) for PCM.
Definition: pcm.c:2179
snd_pcm_stream
snd_pcm_stream_t snd_pcm_stream(snd_pcm_t *pcm)
get stream for a PCM handle
Definition: pcm.c:710
SND_SPCM_LATENCY_MEDIUM
Definition: pcm.h:1238
SND_CHMAP_UNKNOWN
Definition: pcm.h:539
snd_pcm_avail_update
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:2788
snd_pcm_info_get_sync
snd_pcm_sync_id_t snd_pcm_info_get_sync(const snd_pcm_info_t *obj)
Get hardware synchronization ID from a PCM info container.
Definition: pcm.c:6927
SND_PCM_FORMAT_U16
Definition: pcm.h:226
SND_PCM_TYPE_HOOKS
Definition: pcm.h:381
SND_PCM_STATE_SETUP
Definition: pcm.h:277
snd_pcm_hw_params_set_export_buffer
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:4634
SND_PCM_FORMAT_U24_3LE
Definition: pcm.h:183
snd_pcm_hw_params_set_tick_time
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))
(DEPRECATED) Restrict a configuration space to contain only one tick time
Definition: pcm.c:5804
snd_pcm_hook_get_pcm
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
snd_pcm_query_chmaps
snd_pcm_chmap_query_t ** snd_pcm_query_chmaps(snd_pcm_t *pcm)
Definition: pcm.c:7854
snd_pcm_info_get_subclass
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:6894
snd_spcm_duplex_type_t
snd_spcm_duplex_type_t
Definition: pcm.h:1253
snd_pcm_info_get_class
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:6883
snd_pcm_sw_params_set_tstamp_mode
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:6153
SND_PCM_TYPE_LBSERVER
Definition: pcm.h:418
snd_pcm_access_mask_none
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:3658
snd_pcm_access_mask_t
struct _snd_pcm_access_mask snd_pcm_access_mask_t
Definition: pcm.h:69
SND_PCM_FORMAT_FLOAT
Definition: pcm.h:236
snd_pcm_set_params
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:8350
snd_pcm_subformat_mask_sizeof
size_t snd_pcm_subformat_mask_sizeof(void)
get size of snd_pcm_subformat_mask_t
Definition: pcm.c:3820
snd_pcm_htimestamp
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:1115
snd_pcm_hook_get_private
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
snd_pcm_scope_malloc
int snd_pcm_scope_malloc(snd_pcm_scope_t **ptr)
allocate an invalid snd_pcm_scope_t using standard malloc
Definition: pcm_meter.c:1226
SND_PCM_TYPE_JACK
Definition: pcm.h:426
snd_pcm_type_name
const char * snd_pcm_type_name(snd_pcm_type_t type)
get name of PCM type
Definition: pcm.c:2107
snd_pcm_rewindable
snd_pcm_sframes_t snd_pcm_rewindable(snd_pcm_t *pcm)
Get safe count of frames which can be rewinded.
Definition: pcm.c:1301
snd_pcm_bytes_to_frames
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:2227
snd_pcm_access_mask_set
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:3698
SND_PCM_TSTAMP_TYPE_GETTIMEOFDAY
Definition: pcm.h:327
snd_pcm_hw_params_set_tick_time_first
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))
(DEPRECATED) Restrict a configuration space to contain only its minimum tick time ...
Definition: pcm.c:5888
snd_pcm_stream_name
const char * snd_pcm_stream_name(const snd_pcm_stream_t stream)
get name of PCM stream type
Definition: pcm.c:1937
snd_pcm_info_get_stream
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:6828
snd_pcm_hook_t
struct _snd_pcm_hook snd_pcm_hook_t
Definition: pcm.h:1151
snd_pcm_status_free
void snd_pcm_status_free(snd_pcm_status_t *obj)
frees a previously allocated snd_pcm_status_t
Definition: pcm.c:6572
snd_pcm_forwardable
snd_pcm_sframes_t snd_pcm_forwardable(snd_pcm_t *pcm)
Get safe count of frames which can be forwarded.
Definition: pcm.c:1357
snd_pcm_sw_params_get_tstamp_type
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:6206
snd_pcm_hw_params_get_rate
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:4419
snd_pcm_format_silence_32
u_int32_t snd_pcm_format_silence_32(snd_pcm_format_t format)
Return 32 bit expressing silence for a PCM sample format.
Definition: pcm_misc.c:542
snd_pcm_dump_hw_setup
int snd_pcm_dump_hw_setup(snd_pcm_t *pcm, snd_output_t *out)
Dump current hardware setup for PCM.
Definition: pcm.c:2122
snd_pcm_format_size
ssize_t snd_pcm_format_size(snd_pcm_format_t format, size_t samples)
Return bytes needed to store a quantity of PCM sample.
Definition: pcm_misc.c:326
snd_pcm_hw_params_can_sync_start
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:3456
SND_PCM_STREAM_PLAYBACK
Definition: pcm.h:101
snd_pcm_name
const char * snd_pcm_name(snd_pcm_t *pcm)
get identifier of PCM handle
Definition: pcm.c:684
snd_pcm_hw_params_set_access_mask
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:4045
snd_pcm_hw_params_set_tick_time_minmax
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))
(DEPRECATED) Restrict a configuration space to have tick times in a given range
Definition: pcm.c:5851
SND_PCM_FORMAT_U24_3BE
Definition: pcm.h:185
snd_pcm_sw_params_get_stop_threshold
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:6433
snd_pcm_bytes_to_samples
long snd_pcm_bytes_to_samples(snd_pcm_t *pcm, ssize_t bytes)
Convert bytes in samples for a PCM.
Definition: pcm.c:2259
snd_pcm_hw_params_set_buffer_size_min
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:5618
snd_pcm_hw_params_test_access
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:3989
snd_pcm_hw_params_get_buffer_time_max
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:5383
SND_PCM_TYPE_INET
Definition: pcm.h:392
snd_pcm_hw_params_can_resume
int snd_pcm_hw_params_can_resume(const snd_pcm_hw_params_t *params)
Check if hardware supports resume.
Definition: pcm.c:3396
SND_PCM_STATE_XRUN
Definition: pcm.h:283
snd_pcm_state
snd_pcm_state_t snd_pcm_state(snd_pcm_t *pcm)
Return PCM state.
Definition: pcm.c:993
snd_pcm_tstamp_type_t
snd_pcm_tstamp_type_t
Definition: pcm.h:326
snd_pcm_hw_params_get_subformat
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:4167
snd_pcm_hw_params_set_buffer_size_first
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:5691
snd_pcm_status_get_overrange
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:6752
SND_PCM_TYPE_DMIX
Definition: pcm.h:424
snd_pcm_sw_params_current
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:5950
SND_PCM_FORMAT_S16
Definition: pcm.h:224
SND_PCM_CLASS_GENERIC
Definition: pcm.h:79
snd_pcm_resume
int snd_pcm_resume(snd_pcm_t *pcm)
Resume from suspend, no samples are lost.
Definition: pcm.c:1092
snd_pcm_format_mask_malloc
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:3727
snd_pcm_writen
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:1462
snd_pcm_format_silence_16
u_int16_t snd_pcm_format_silence_16(snd_pcm_format_t format)
Return 16 bit expressing silence for a PCM sample format.
Definition: pcm_misc.c:553
snd_pcm_format_signed
int snd_pcm_format_signed(snd_pcm_format_t format)
Return sign info for a PCM sample linear format.
Definition: pcm_misc.c:35
snd_pcm_hw_params_set_rate_max
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:4516
snd_pcm_hw_params_set_rate_last
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:4589
SND_CHMAP_TFR
Definition: pcm.h:562
snd_async_handler_get_pcm
snd_pcm_t * snd_async_handler_get_pcm(snd_async_handler_t *handler)
Return PCM handle related to an async handler.
Definition: pcm.c:2325
snd_pcm_prepare
int snd_pcm_prepare(snd_pcm_t *pcm)
Prepare PCM for use.
Definition: pcm.c:1137
SND_PCM_TYPE_SHARE
Definition: pcm.h:410
snd_pcm_info_get_card
int snd_pcm_info_get_card(const snd_pcm_info_t *obj)
Get card from a PCM info container.
Definition: pcm.c:6839
SND_PCM_FORMAT_U32_LE
Definition: pcm.h:151
snd_pcm_meter_get_boundary
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:935
SND_PCM_STATE_DRAINING
Definition: pcm.h:285
SND_PCM_ACCESS_RW_INTERLEAVED
Definition: pcm.h:116
snd_spcm_init
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
snd_async_handler_t
struct _snd_async_handler snd_async_handler_t
Internal structure for an async notification client handler.
Definition: global.h:114
snd_pcm_format_cpu_endian
int snd_pcm_format_cpu_endian(snd_pcm_format_t format)
Return endian info for a PCM sample format.
Definition: pcm_misc.c:188
SND_PCM_FORMAT_S20_3BE
Definition: pcm.h:189
snd_pcm_drain
int snd_pcm_drain(snd_pcm_t *pcm)
Stop a PCM preserving pending frames.
Definition: pcm.c:1248
SND_PCM_FORMAT_U24
Definition: pcm.h:230
SND_PCM_CLASS_MODEM
Definition: pcm.h:83
snd_pcm_sw_params_free
void snd_pcm_sw_params_free(snd_pcm_sw_params_t *obj)
frees a previously allocated snd_pcm_sw_params_t
Definition: pcm.c:6022
snd_pcm_hw_params_set_periods_last
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:5317
snd_timestamp_t
struct timeval snd_timestamp_t
Definition: global.h:151
snd_pcm_hw_params
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:876
snd_pcm_format_physical_width
int snd_pcm_format_physical_width(snd_pcm_format_t format)
Return bits needed to store a PCM sample.
Definition: pcm_misc.c:265
snd_pcm_hw_params_test_period_time
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:4774
SND_CHMAP_RR
Definition: pcm.h:545
SND_PCM_SUBCLASS_GENERIC_MIX
Definition: pcm.h:92
snd_pcm_hw_params_set_periods_max
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:5244
SND_PCM_FORMAT_A_LAW
Definition: pcm.h:169
SND_CHMAP_TRC
Definition: pcm.h:566
snd_pcm_hook_func_t
int(* snd_pcm_hook_func_t)(snd_pcm_hook_t *hook)
Definition: pcm.h:1153
snd_pcm_pause
int snd_pcm_pause(snd_pcm_t *pcm, int enable)
Pause/resume PCM.
Definition: pcm.c:1273
snd_pcm_audio_tstamp_report_t
Definition: pcm.h:339
snd_pcm_hw_params_set_buffer_time_minmax
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:5461
snd_pcm_hw_params_set_buffer_size_max
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:5634
snd_pcm_hw_free
int snd_pcm_hw_free(snd_pcm_t *pcm)
Remove PCM hardware configuration and free associated resources.
Definition: pcm.c:891
snd_pcm_sw_params
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:921
snd_pcm_subformat_mask_malloc
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:3830
snd_pcm_channel_area_t::step
unsigned int step
Definition: pcm.h:454
SND_PCM_FORMAT_S32_LE
Definition: pcm.h:147
snd_pcm_hw_params_set_periods_minmax
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:5261
snd_pcm_dump
int snd_pcm_dump(snd_pcm_t *pcm, snd_output_t *out)
Dump PCM info.
Definition: pcm.c:2213
snd_pcm_chmap_from_string
unsigned int snd_pcm_chmap_from_string(const char *str)
Definition: pcm.c:8100
snd_pcm_info_get_device
unsigned int snd_pcm_info_get_device(const snd_pcm_info_t *obj)
Get device from a PCM info container.
Definition: pcm.c:6806
snd_pcm_hw_params_set_period_size_integer
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:5129
snd_pcm_link
int snd_pcm_link(snd_pcm_t *pcm1, snd_pcm_t *pcm2)
Link two PCMs.
Definition: pcm.c:1559
snd_pcm_hw_params_set_buffer_time_near
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:5479
SND_PCM_FORMAT_U20_3LE
Definition: pcm.h:191
snd_pcm_access_name
const char * snd_pcm_access_name(const snd_pcm_access_t _access)
get name of PCM access type
Definition: pcm.c:1949
SND_PCM_FORMAT_S20_3LE
Definition: pcm.h:187
SND_CHMAP_SR
Definition: pcm.h:549
snd_pcm_subformat_name
const char * snd_pcm_subformat_name(const snd_pcm_subformat_t subformat)
get name of PCM sample subformat
Definition: pcm.c:2012
snd_pcm_hw_params_set_buffer_time
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:5414
snd_pcm_subformat_mask_test
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:3882
SND_PCM_TYPE_MULTI
Definition: pcm.h:384
snd_pcm_unlink
int snd_pcm_unlink(snd_pcm_t *pcm)
Remove a PCM from a linked group.
Definition: pcm.c:1573
snd_pcm_reset
int snd_pcm_reset(snd_pcm_t *pcm)
Reset PCM position.
Definition: pcm.c:1163
snd_pcm_sw_params_copy
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:6032
SND_PCM_TYPE_MMAP_EMUL
Definition: pcm.h:440
snd_pcm_info_malloc
int snd_pcm_info_malloc(snd_pcm_info_t **ptr)
allocate an invalid snd_pcm_info_t using standard malloc
Definition: pcm.c:6772
snd_pcm_chmap_parse_string
snd_pcm_chmap_t * snd_pcm_chmap_parse_string(const char *str)
Definition: pcm.c:8112
SND_CHMAP_BC
Definition: pcm.h:573
snd_pcm_mmap_readn
snd_pcm_sframes_t snd_pcm_mmap_readn(snd_pcm_t *pcm, void **bufs, snd_pcm_uframes_t size)
Read non interleaved frames to a PCM using direct buffer (mmap)
Definition: pcm_mmap.c:224
snd_pcm_hw_params_get_period_time_max
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:4758
snd_pcm_hw_params_set_period_time_max
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:4820
snd_pcm_sync_id_t
Definition: pcm.h:458
snd_pcm_format_name
const char * snd_pcm_format_name(const snd_pcm_format_t format)
get name of PCM sample format
Definition: pcm.c:1961
snd_pcm_hw_params_set_channels_min
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:4328
snd_pcm_hw_params_get_format
int snd_pcm_hw_params_get_format(const snd_pcm_hw_params_t *params, snd_pcm_format_t *val)
Extract format from a configuration space.
Definition: pcm.c:4073
snd_pcm_build_linear_format
snd_pcm_format_t snd_pcm_build_linear_format(int width, int pwidth, int unsignd, int big_endian)
Compose a PCM sample linear format.
Definition: pcm_misc.c:684
snd_pcm_status_copy
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:6582
snd_pcm_hook_add
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_hw_params_can_overrange
int snd_pcm_hw_params_can_overrange(const snd_pcm_hw_params_t *params)
Check if hardware supports overrange detection.
Definition: pcm.c:3356
SND_PCM_START_DATA
Definition: pcm.h:298
snd_pcm_hw_params_is_batch
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:3296
SND_PCM_FORMAT_FLOAT_LE
Definition: pcm.h:155
snd_pcm_hw_params_get_min_align
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:5919
snd_async_add_pcm_handler
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:2295
snd_pcm_hw_params_set_tick_time_min
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))
(DEPRECATED) Restrict a configuration space with a minimum tick time
Definition: pcm.c:5819
SND_CHMAP_FL
Definition: pcm.h:542
snd_pcm_info_get_subdevices_avail
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:6916
snd_pcm_format_mask_empty
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:3790
snd_pcm_recover
int snd_pcm_recover(snd_pcm_t *pcm, int err, int silent)
Recover the stream state from an error or suspend.
Definition: pcm.c:8302
snd_pcm_tstamp_t
snd_pcm_tstamp_t
Definition: pcm.h:314
snd_spcm_init_duplex
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
snd_pcm_hw_params_set_periods_near
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:5279
snd_pcm_chmap_position
snd_pcm_chmap_position
Definition: pcm.h:538
snd_pcm_format_mask_t
struct _snd_pcm_format_mask snd_pcm_format_mask_t
Definition: pcm.h:71
snd_pcm_channel_area_t::first
unsigned int first
Definition: pcm.h:452
snd_pcm_hw_params_set_channels_first
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:4384
snd_pcm_hw_params_set_buffer_time_min
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:5429
snd_config_t
struct _snd_config snd_config_t
Internal structure for a configuration node object.
Definition: conf.h:69
snd_pcm_hw_params_set_periods
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:5214
snd_pcm_hw_params_any
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:3605
snd_pcm_scope_set_callback_private
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:989
snd_pcm_hw_params_get_period_time_min
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:4740
SND_PCM_TSTAMP_MMAP
Definition: pcm.h:322
snd_pcm_subformat_mask_none
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:3863
snd_pcm_sw_params_set_silence_size
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:6510
SND_PCM_TSTAMP_TYPE_MONOTONIC
Definition: pcm.h:328
snd_pcm_forward
snd_pcm_sframes_t snd_pcm_forward(snd_pcm_t *pcm, snd_pcm_uframes_t frames)
Move application frame position forward.
Definition: pcm.c:1386
SND_PCM_FORMAT_S18_3BE
Definition: pcm.h:197
snd_pcm_hw_params_set_period_size_last
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:5113
snd_pcm_sw_params_get_sleep_min
int snd_pcm_sw_params_get_sleep_min(const snd_pcm_sw_params_t *params, unsigned int *val) __attribute__((deprecated))
(DEPRECATED) Get minimum numbers of ticks to sleep from a software configuration container ...
Definition: pcm.c:6238
SND_CHMAP_FRC
Definition: pcm.h:552
snd_pcm_format_silence
u_int8_t snd_pcm_format_silence(snd_pcm_format_t format)
Return 8 bit expressing silence for a PCM sample format.
Definition: pcm_misc.c:564
SND_PCM_TYPE_DROUTE
Definition: pcm.h:416
snd_pcm_sw_params_set_start_mode
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))
(DEPRECATED) Set start mode inside a software configuration container
Definition: pcm.c:6058
snd_pcm_frames_to_bytes
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:2243
snd_pcm_sw_params_set_silence_threshold
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:6456
SND_CHMAP_TYPE_VAR
Definition: pcm.h:532
snd_pcm_hw_params_set_format_mask
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:4142
SND_PCM_XRUN_NONE
Definition: pcm.h:307
snd_pcm_hw_params_set_period_time_near
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:4855
snd_pcm_hw_params_set_access
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:4001
snd_pcm_sw_params_get_period_event
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:6315
snd_pcm_hw_params_test_channels
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:4304
snd_pcm_meter_get_rate
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:907
snd_pcm_status_set_audio_htstamp_config
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:6705
snd_pcm_hw_params_set_channels_near
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:4368
snd_pcm_hw_params_get_sbits
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:3568
snd_pcm_area_silence
int snd_pcm_area_silence(const snd_pcm_channel_area_t *dst_channel, snd_pcm_uframes_t dst_offset, unsigned int samples, snd_pcm_format_t format)
Silence an area.
Definition: pcm.c:2882
snd_pcm_hw_params_set_period_time_last
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:4891
snd_pcm_info_get_name
const char * snd_pcm_info_get_name(const snd_pcm_info_t *obj)
Get name from a PCM info container.
Definition: pcm.c:6861
snd_spcm_latency_t
snd_spcm_latency_t
Definition: pcm.h:1232
SND_PCM_FORMAT_U16_LE
Definition: pcm.h:135
snd_pcm_open
int snd_pcm_open(snd_pcm_t **pcm, const char *name, snd_pcm_stream_t stream, int mode)
Opens a PCM.
Definition: pcm.c:2523
snd_pcm_poll_descriptors
int snd_pcm_poll_descriptors(snd_pcm_t *pcm, struct pollfd *pfds, unsigned int space)
get poll descriptors
Definition: pcm.c:1654
SND_CHMAP_TRL
Definition: pcm.h:564
snd_pcm_sw_params_set_start_threshold
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:6367
SND_PCM_STATE_OPEN
Definition: pcm.h:275
snd_pcm_access_mask_reset
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:3708
snd_pcm_hw_params_get_channels_max
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:4291
snd_pcm_access_mask_test
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:3677
snd_pcm_writei
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:1426
snd_pcm_hw_params_get_buffer_size_min
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:5552
snd_pcm_hw_params_is_monotonic
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:3336
SND_CHMAP_TYPE_FIXED
Definition: pcm.h:531
snd_pcm_status_get_audio_htstamp
void snd_pcm_status_get_audio_htstamp(const snd_pcm_status_t *obj, snd_htimestamp_t *ptr)
Get &quot;now&quot; hi-res audio timestamp from a PCM status container.
Definition: pcm.c:6668
snd_pcm_hw_params_set_rate_minmax
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:4533
snd_pcm_format_silence_64
u_int64_t snd_pcm_format_silence_64(snd_pcm_format_t format)
Return 64 bit expressing silence for a PCM sample format.
Definition: pcm_misc.c:390
snd_pcm_sw_params_get_silence_size
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:6536
snd_pcm_mmap_commit
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:7086
snd_pcm_format_little_endian
int snd_pcm_format_little_endian(snd_pcm_format_t format)
Return endian info for a PCM sample format.
Definition: pcm_misc.c:124
snd_pcm_hw_params_current
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:825
snd_pcm_uframes_t
unsigned long snd_pcm_uframes_t
Definition: pcm.h:354
snd_pcm_status_get_avail
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:6732
snd_pcm_get_chmap
snd_pcm_chmap_t * snd_pcm_get_chmap(snd_pcm_t *pcm)
Definition: pcm.c:7882
snd_pcm_format_mask_test
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:3779
snd_pcm_mmap_writen
snd_pcm_sframes_t snd_pcm_mmap_writen(snd_pcm_t *pcm, void **bufs, snd_pcm_uframes_t size)
Write non interleaved frames to a PCM using direct buffer (mmap)
Definition: pcm_mmap.c:174
SND_CHMAP_FRW
Definition: pcm.h:556
SND_PCM_XRUN_STOP
Definition: pcm.h:309
SND_PCM_TSTAMP_TYPE_MONOTONIC_RAW
Definition: pcm.h:329
snd_pcm_hw_params_set_channels_minmax
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:4353
snd_pcm_hw_params_get_period_size_max
int snd_pcm_hw_params_get_period_size_max(const snd_pcm_hw_params_t *params, snd_pcm_uframes_t *frames, int *dir)
Extract maximum period size from a configuration space.
Definition: pcm.c:4954
SND_PCM_FORMAT_S8
Definition: pcm.h:127
snd_pcm_hw_params_set_period_time_minmax
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:4837
snd_pcm_hw_params_get_channels
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:4261
snd_pcm_subformat_description
const char * snd_pcm_subformat_description(const snd_pcm_subformat_t subformat)
get description of PCM sample subformat
Definition: pcm.c:2024
snd_pcm_query_chmaps_from_hw
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:1093
ptr
void * ptr
Definition: seq_event.h:199
snd_pcm_hw_params_is_double
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:3276
snd_pcm_hw_params_set_tick_time_last
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))
(DEPRECATED) Restrict a configuration space to contain only its maximum tick time ...
Definition: pcm.c:5907
snd_pcm_sw_params_get_silence_threshold
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:6482
SND_PCM_FORMAT_IEC958_SUBFRAME_BE
Definition: pcm.h:165
snd_pcm_avail_delay
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:2843
snd_pcm_hw_params_get_periods_max
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:5183
snd_pcm_hw_params_set_period_size_near
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:5067
snd_pcm_poll_descriptors_revents
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:1689
SND_PCM_SUBCLASS_MULTI_MIX
Definition: pcm.h:94
snd_pcm_readi
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:1498
snd_pcm_dump_sw_setup
int snd_pcm_dump_sw_setup(snd_pcm_t *pcm, snd_output_t *out)
Dump current software setup for PCM.
Definition: pcm.c:2152
snd_pcm_format_mask_copy
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:3750
snd_pcm_hw_params_set_rate
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:4486
snd_pcm_format_value
snd_pcm_format_t snd_pcm_format_value(const char *name)
get PCM sample format from name
Definition: pcm.c:1985
SND_PCM_FORMAT_FLOAT64
Definition: pcm.h:238
SND_CHMAP_MONO
Definition: pcm.h:541
snd_pcm_stream_t
snd_pcm_stream_t
Definition: pcm.h:99
snd_pcm_sw_params_set_period_event
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:6302
snd_pcm_sw_params_set_tstamp_type
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:6189
snd_pcm_format_big_endian
int snd_pcm_format_big_endian(snd_pcm_format_t format)
Return endian info for a PCM sample format.
Definition: pcm_misc.c:173
snd_pcm_open_fallback
int snd_pcm_open_fallback(snd_pcm_t **pcm, 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:2565
SND_PCM_FORMAT_GSM
Definition: pcm.h:175
snd_pcm_hw_params_set_subformat_first
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:4207
snd_pcm_hw_params_set_buffer_time_last
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:5517
SND_CHMAP_RL
Definition: pcm.h:544
SND_CHMAP_BRC
Definition: pcm.h:575
SND_CHMAP_FC
Definition: pcm.h:546
snd_pcm_hw_params_can_disable_period_wakeup
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:3472
SND_PCM_TYPE_DSNOOP
Definition: pcm.h:428
snd_pcm_type_t
enum _snd_pcm_type snd_pcm_type_t
Definition: pcm.h:445
SND_CHMAP_TFLC
Definition: pcm.h:567
snd_pcm_scope_ops_t
Definition: pcm.h:1172
SND_SPCM_LATENCY_STANDARD
Definition: pcm.h:1235
snd_pcm_info_copy
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:6795
snd_pcm_sw_params_sizeof
size_t snd_pcm_sw_params_sizeof(void)
get size of snd_pcm_sw_params_t
Definition: pcm.c:5999
snd_pcm_area_copy
int snd_pcm_area_copy(const snd_pcm_channel_area_t *dst_channel, snd_pcm_uframes_t dst_offset, const snd_pcm_channel_area_t *src_channel, snd_pcm_uframes_t src_offset, unsigned int samples, snd_pcm_format_t format)
Copy an area.
Definition: pcm.c:3037
snd_pcm_info_set_subdevice
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:6951
SND_CHMAP_RRC
Definition: pcm.h:554
snd_pcm_hw_params_supports_audio_wallclock_ts
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:3492
SND_CHMAP_FLH
Definition: pcm.h:557
snd_pcm_t
struct _snd_pcm snd_pcm_t
Definition: pcm.h:374
snd_pcm_hw_params_get_buffer_time_min
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:5365
snd_pcm_hw_params_get_access_mask
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:4055
snd_pcm_samples_to_bytes
ssize_t snd_pcm_samples_to_bytes(snd_pcm_t *pcm, long samples)
Convert samples in bytes for a PCM.
Definition: pcm.c:2275
snd_pcm_hw_params_test_period_size
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:4974
snd_pcm_chmap_t::channels
unsigned int channels
Definition: pcm.h:589
snd_pcm_status_get_delay
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:6722
snd_pcm_status_get_audio_htstamp_report
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:6691
snd_pcm_rewind
snd_pcm_sframes_t snd_pcm_rewind(snd_pcm_t *pcm, snd_pcm_uframes_t frames)
Move application frame position backward.
Definition: pcm.c:1327
snd_pcm_sw_params_get_xrun_mode
snd_pcm_xrun_t snd_pcm_sw_params_get_xrun_mode(const snd_pcm_sw_params_t *params) __attribute__((deprecated))
(DEPRECATED) Get xrun mode from a software configuration container
Definition: pcm.c:6132
snd_pcm_access_mask_malloc
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:3625
SND_PCM_FORMAT_FLOAT_BE
Definition: pcm.h:157
snd_pcm_format_linear
int snd_pcm_format_linear(snd_pcm_format_t format)
Return linear info for a PCM sample format.
Definition: pcm_misc.c:96
snd_pcm_sw_params_malloc
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:6009
snd_pcm_hw_params_set_period_size
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:4989
snd_pcm_access_t
snd_pcm_access_t
Definition: pcm.h:108
snd_pcm_hw_params_set_period_size_first
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:5090
SND_PCM_ACCESS_MMAP_COMPLEX
Definition: pcm.h:114
snd_pcm_sw_params_get_start_threshold
int snd_pcm_sw_params_get_start_threshold(const snd_pcm_sw_params_t *paramsm, snd_pcm_uframes_t *val)
Get start threshold from a software configuration container.
Definition: pcm.c:6387
SND_PCM_TYPE_ADPCM
Definition: pcm.h:402
snd_pcm_state_name
const char * snd_pcm_state_name(const snd_pcm_state_t state)
get name of PCM state
Definition: pcm.c:2092