ALSA project - the C library reference
|
Go to the documentation of this file.
45 #define SND_PCM_DLSYM_VERSION _dlsym_pcm_001
213 SND_PCM_FORMAT_G723_24,
215 SND_PCM_FORMAT_G723_24_1B,
217 SND_PCM_FORMAT_G723_40,
219 SND_PCM_FORMAT_G723_40_1B,
221 SND_PCM_FORMAT_DSD_U8,
223 SND_PCM_FORMAT_DSD_U16_LE,
225 SND_PCM_FORMAT_DSD_U32_LE,
227 SND_PCM_FORMAT_DSD_U16_BE,
229 SND_PCM_FORMAT_DSD_U32_BE,
230 SND_PCM_FORMAT_LAST = SND_PCM_FORMAT_DSD_U32_BE,
232 #if __BYTE_ORDER == __LITTLE_ENDIAN
255 #elif __BYTE_ORDER == __BIG_ENDIAN
279 #error "Unknown endian"
288 } snd_pcm_subformat_t;
351 } snd_pcm_tstamp_type_t;
365 } snd_pcm_audio_tstamp_type_t;
369 unsigned int type_requested:4;
370 unsigned int report_delay:1;
371 } snd_pcm_audio_tstamp_config_t;
377 unsigned int valid:1;
380 unsigned int actual_type:4;
383 unsigned int accuracy_report:1;
384 unsigned int accuracy;
385 } snd_pcm_audio_tstamp_report_t;
393 #define SND_PCM_NONBLOCK 0x00000001
395 #define SND_PCM_ASYNC 0x00000002
397 #define SND_PCM_ABORT 0x00008000
399 #define SND_PCM_NO_AUTO_RESAMPLE 0x00010000
401 #define SND_PCM_NO_AUTO_CHANNELS 0x00020000
403 #define SND_PCM_NO_AUTO_FORMAT 0x00040000
405 #define SND_PCM_NO_SOFTVOL 0x00080000
489 } snd_pcm_channel_area_t;
494 unsigned char id[16];
505 snd_pcm_stream_t stream,
int mode);
507 snd_pcm_stream_t stream,
int mode,
510 const char *name,
const char *orig_name,
511 snd_pcm_stream_t stream,
int mode);
560 #define SND_CHMAP_API_VERSION ((1 << 16) | (0 << 8) | 1)
614 #define SND_CHMAP_POSITION_MASK 0xffff
617 #define SND_CHMAP_PHASE_INVERSE (0x01 << 16)
619 #define SND_CHMAP_DRIVER_SPEC (0x02 << 16)
631 } snd_pcm_chmap_query_t;
637 snd_pcm_stream_t stream);
658 snd_pcm_format_t format,
659 snd_pcm_access_t access,
660 unsigned int channels,
663 unsigned int latency);
682 #define snd_pcm_info_alloca(ptr) __snd_alloca(ptr, snd_pcm_info)
728 unsigned int *rate_num,
729 unsigned int *rate_den);
734 typedef struct _snd_pcm_hw_strategy snd_pcm_hw_strategy_t;
737 typedef struct _snd_pcm_hw_strategy_simple_choices_list {
739 unsigned int badness;
740 } snd_pcm_hw_strategy_simple_choices_list_t;
743 const snd_pcm_hw_strategy_t *strategy,
744 unsigned int badness_min,
745 unsigned int badness_max);
747 void snd_pcm_hw_strategy_free(snd_pcm_hw_strategy_t *strategy);
748 int snd_pcm_hw_strategy_simple(snd_pcm_hw_strategy_t **strategyp,
749 unsigned int badness_min,
750 unsigned int badness_max);
751 int snd_pcm_hw_params_try_explain_failure(
snd_pcm_t *pcm,
764 #define snd_pcm_hw_params_alloca(ptr) __snd_alloca(ptr, snd_pcm_hw_params)
769 #if !defined(ALSA_LIBRARY_BUILD) && !defined(ALSA_PCM_OLD_HW_PARAMS_API)
905 #define snd_pcm_sw_params_alloca(ptr) __snd_alloca(ptr, snd_pcm_sw_params)
911 #if !defined(ALSA_LIBRARY_BUILD) && !defined(ALSA_PCM_OLD_SW_PARAMS_API)
935 #ifndef ALSA_LIBRARY_BUILD
936 #if defined(ALSA_PCM_OLD_HW_PARAMS_API) || defined(ALSA_PCM_OLD_SW_PARAMS_API)
953 #define snd_pcm_access_mask_alloca(ptr) __snd_alloca(ptr, snd_pcm_access_mask)
978 #define snd_pcm_format_mask_alloca(ptr) __snd_alloca(ptr, snd_pcm_format_mask)
1003 #define snd_pcm_subformat_mask_alloca(ptr) __snd_alloca(ptr, snd_pcm_subformat_mask)
1028 #define snd_pcm_status_alloca(ptr) __snd_alloca(ptr, snd_pcm_status)
1040 snd_pcm_audio_tstamp_report_t *audio_tstamp_report);
1042 snd_pcm_audio_tstamp_config_t *audio_tstamp_config);
1044 static inline void snd_pcm_pack_audio_tstamp_config(
unsigned int *data,
1045 snd_pcm_audio_tstamp_config_t *config)
1047 *data = config->report_delay;
1049 *data |= config->type_requested;
1052 static inline void snd_pcm_unpack_audio_tstamp_report(
unsigned int data,
unsigned int accuracy,
1053 snd_pcm_audio_tstamp_report_t *report)
1056 report->valid = data & 1;
1057 report->actual_type = (data >> 1) & 0xF;
1058 report->accuracy_report = (data >> 5) & 1;
1059 report->accuracy = accuracy;
1114 const snd_pcm_channel_area_t **areas,
1157 unsigned int samples, snd_pcm_format_t format);
1162 unsigned int samples, snd_pcm_format_t format);
1169 const snd_pcm_channel_area_t *src_channels,
1172 const unsigned int channels,
1174 const snd_pcm_format_t format);
1183 static inline void *snd_pcm_channel_area_addr(
const snd_pcm_channel_area_t *area,
snd_pcm_uframes_t offset)
1185 return (
char *)area->addr + (area->first + area->step * offset) / 8;
1194 static inline unsigned int snd_pcm_channel_area_step(
const snd_pcm_channel_area_t *area)
1196 return area->step / 8;
1210 SND_PCM_HOOK_TYPE_HW_PARAMS = 0,
1211 SND_PCM_HOOK_TYPE_HW_FREE,
1212 SND_PCM_HOOK_TYPE_CLOSE,
1213 SND_PCM_HOOK_TYPE_LAST = SND_PCM_HOOK_TYPE_CLOSE
1214 } snd_pcm_hook_type_t;
1224 snd_pcm_hook_type_t type,
1267 } snd_pcm_scope_ops_t;
1278 const snd_pcm_scope_ops_t *val);
1286 unsigned int channel);
1308 } snd_spcm_latency_t;
1316 } snd_spcm_xrun_type_t;
1324 } snd_spcm_duplex_type_t;
1328 unsigned int channels,
1329 snd_pcm_format_t format,
1330 snd_pcm_subformat_t subformat,
1331 snd_spcm_latency_t latency,
1332 snd_pcm_access_t _access,
1333 snd_spcm_xrun_type_t xrun_type);
1338 unsigned int channels,
1339 snd_pcm_format_t format,
1340 snd_pcm_subformat_t subformat,
1341 snd_spcm_latency_t latency,
1342 snd_pcm_access_t _access,
1343 snd_spcm_xrun_type_t xrun_type,
1344 snd_spcm_duplex_type_t duplex_type);
1367 #if !defined(ALSA_LIBRARY_BUILD) && !defined(ALSA_PCM_OLD_SW_PARAMS_API)
1373 #if !defined(ALSA_LIBRARY_BUILD) && !defined(ALSA_PCM_OLD_HW_PARAMS_API)
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:2194
int snd_pcm_status(snd_pcm_t *pcm, snd_pcm_status_t *status)
Obtain status (runtime) information for PCM handle.
Definition: pcm.c:1039
int snd_pcm_pause(snd_pcm_t *pcm, int enable)
Pause/resume PCM.
Definition: pcm.c:1377
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:887
@ SND_PCM_FORMAT_U16_BE
Definition: pcm.h:139
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:4159
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:5687
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:6640
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:5180
int snd_pcm_poll_descriptors_count(snd_pcm_t *pcm)
get count of poll descriptors for PCM handle
Definition: pcm.c:1744
@ SND_PCM_TSTAMP_ENABLE
Definition: pcm.h:338
@ SND_CHMAP_RR
Definition: pcm.h:579
@ SND_SPCM_XRUN_STOP
Definition: pcm.h:1315
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:5015
@ SND_PCM_TYPE_LADSPA
Definition: pcm.h:456
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:4554
@ SND_PCM_FORMAT_U20_3BE
Definition: pcm.h:203
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:6576
int snd_pcm_dump_sw_setup(snd_pcm_t *pcm, snd_output_t *out)
Dump current software setup for PCM.
Definition: pcm.c:2310
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:1201
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:3522
@ SND_CHMAP_FLW
Definition: pcm.h:589
@ SND_PCM_TSTAMP_NONE
Definition: pcm.h:336
@ SND_PCM_ACCESS_RW_NONINTERLEAVED
Definition: pcm.h:120
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:1671
@ SND_SPCM_DUPLEX_LIBERAL
Definition: pcm.h:1321
long snd_pcm_sframes_t
Definition: pcm.h:390
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:5455
@ SND_PCM_AUDIO_TSTAMP_TYPE_COMPAT
Definition: pcm.h:358
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:5705
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:6856
@ SND_CHMAP_TSR
Definition: pcm.h:604
void snd_pcm_status_get_tstamp(const snd_pcm_status_t *obj, snd_timestamp_t *ptr)
Get "now" timestamp from a PCM status container.
Definition: pcm.c:6869
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:5640
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:6235
struct _snd_pcm_format_mask snd_pcm_format_mask_t
Definition: pcm.h:73
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:7147
@ SND_PCM_ACCESS_MMAP_INTERLEAVED
Definition: pcm.h:112
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:1211
@ SND_SPCM_LATENCY_STANDARD
Definition: pcm.h:1301
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:8792
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:4681
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:895
struct _snd_pcm_status snd_pcm_status_t
Definition: pcm.h:69
int snd_pcm_hw_params_set_tick_time_last(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int *val, int *dir) __attribute__((deprecated))
(DEPRECATED) Restrict a configuration space to contain only its maximum tick time
Definition: pcm.c:6133
@ SND_PCM_FORMAT_S24_3BE
Definition: pcm.h:191
@ SND_PCM_FORMAT_FLOAT
Definition: pcm.h:246
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:5937
@ SND_PCM_STATE_PAUSED
Definition: pcm.h:305
snd_pcm_sframes_t snd_pcm_forward(snd_pcm_t *pcm, snd_pcm_uframes_t frames)
Move application frame position forward.
Definition: pcm.c:1509
@ SND_CHMAP_BC
Definition: pcm.h:607
snd_pcm_state_t snd_pcm_state(snd_pcm_t *pcm)
Return PCM state.
Definition: pcm.c:1068
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:3736
void snd_pcm_access_mask_free(snd_pcm_access_mask_t *obj)
frees a previously allocated snd_pcm_access_mask_t
Definition: pcm.c:3864
int snd_pcm_hw_params_can_overrange(const snd_pcm_hw_params_t *params)
Check if hardware supports overrange detection.
Definition: pcm.c:3582
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:6561
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_type
Definition: pcm.h:411
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:5339
uint8_t snd_pcm_format_silence(snd_pcm_format_t format)
Return 8 bit expressing silence for a PCM sample format.
Definition: pcm_misc.c:594
@ SND_PCM_TSTAMP_MMAP
Definition: pcm.h:342
@ SND_PCM_TYPE_DSNOOP
Definition: pcm.h:462
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:5425
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:6400
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:4828
@ SND_PCM_FORMAT_S20_LE
Definition: pcm.h:179
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:4777
struct _snd_pcm snd_pcm_t
Definition: pcm.h:408
@ SND_PCM_FORMAT_U20_LE
Definition: pcm.h:183
@ SND_PCM_STATE_PREPARED
Definition: pcm.h:297
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:4530
@ SND_CHMAP_FLH
Definition: pcm.h:591
ssize_t snd_pcm_samples_to_bytes(snd_pcm_t *pcm, long samples)
Convert samples in bytes for a PCM.
Definition: pcm.c:2438
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
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:5230
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
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:6258
@ SND_SPCM_LATENCY_REALTIME
Definition: pcm.h:1307
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:3934
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:3903
@ SND_PCM_FORMAT_U32
Definition: pcm.h:244
unsigned int snd_pcm_info_get_subdevice(const snd_pcm_info_t *obj)
Get subdevice from a PCM info container.
Definition: pcm.c:7048
@ SND_PCM_FORMAT_UNKNOWN
Definition: pcm.h:127
int snd_pcm_hwsync(snd_pcm_t *pcm)
(DEPRECATED) Synchronize stream position with hardware
Definition: pcm.c:1092
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:6616
@ SND_PCM_FORMAT_U32_LE
Definition: pcm.h:153
int snd_pcm_areas_copy_wrap(const snd_pcm_channel_area_t *dst_channels, snd_pcm_uframes_t dst_offset, const snd_pcm_uframes_t dst_size, const snd_pcm_channel_area_t *src_channels, snd_pcm_uframes_t src_offset, const snd_pcm_uframes_t src_size, const unsigned int channels, snd_pcm_uframes_t frames, const snd_pcm_format_t format)
Copy one or more areas.
Definition: pcm.c:3413
unsigned int first
Definition: pcm.h:486
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:4406
@ SND_PCM_TYPE_SHARE
Definition: pcm.h:444
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:6961
@ SND_SPCM_DUPLEX_PEDANTIC
Definition: pcm.h:1323
@ SND_CHMAP_LFE
Definition: pcm.h:581
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:3813
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:4878
@ SND_CHMAP_TRR
Definition: pcm.h:599
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:7125
@ SND_CHMAP_TRL
Definition: pcm.h:598
@ SND_PCM_FORMAT_S20_BE
Definition: pcm.h:181
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:3772
void snd_pcm_status_get_audio_htstamp(const snd_pcm_status_t *obj, snd_htimestamp_t *ptr)
Get "now" hi-res audio timestamp from a PCM status container.
Definition: pcm.c:6897
@ SND_PCM_FORMAT_A_LAW
Definition: pcm.h:171
@ SND_PCM_FORMAT_S20_3BE
Definition: pcm.h:199
const char * snd_pcm_format_description(const snd_pcm_format_t format)
get description of PCM sample format
Definition: pcm.c:2131
@ SND_PCM_XRUN_STOP
Definition: pcm.h:329
_snd_pcm_subformat
Definition: pcm.h:284
snd_pcm_stream_t snd_pcm_stream(snd_pcm_t *pcm)
get stream for a PCM handle
Definition: pcm.c:750
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:861
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:3893
int snd_pcm_format_physical_width(snd_pcm_format_t format)
Return bits needed to store a PCM sample.
Definition: pcm_misc.c:277
int snd_pcm_sw_params_dump(snd_pcm_sw_params_t *params, snd_output_t *out)
Dump a software configuration.
Definition: pcm.c:6207
@ SND_PCM_TYPE_LINEAR_FLOAT
Definition: pcm.h:454
void snd_pcm_status_get_driver_htstamp(const snd_pcm_status_t *obj, snd_htimestamp_t *ptr)
Get "now" hi-res driver timestamp from a PCM status container. Defines when the status was generated ...
Definition: pcm.c:6909
int snd_pcm_chmap_print(const snd_pcm_chmap_t *map, size_t maxlen, char *buf)
Definition: pcm.c:8274
@ SND_PCM_TYPE_HOOKS
Definition: pcm.h:415
@ SND_PCM_FORMAT_S18_3LE
Definition: pcm.h:205
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:3502
@ SND_CHMAP_FRW
Definition: pcm.h:590
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:3214
_snd_pcm_tstamp
Definition: pcm.h:334
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:6488
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:2458
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:7026
const char * snd_pcm_chmap_long_name(enum snd_pcm_chmap_position val)
Definition: pcm.c:8259
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:6015
int snd_pcm_format_width(snd_pcm_format_t format)
Return nominal bits per a PCM sample.
Definition: pcm_misc.c:210
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
size_t snd_pcm_sw_params_sizeof(void)
get size of snd_pcm_sw_params_t
Definition: pcm.c:6225
struct _snd_pcm_hook snd_pcm_hook_t
Definition: pcm.h:1217
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:5998
@ SND_PCM_FORMAT_U8
Definition: pcm.h:131
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:6973
@ SND_PCM_TYPE_JACK
Definition: pcm.h:460
_snd_pcm_tstamp_type
Definition: pcm.h:346
int snd_pcm_hw_params_can_pause(const snd_pcm_hw_params_t *params)
Check if hardware supports pause.
Definition: pcm.c:3602
struct _snd_config snd_config_t
Internal structure for a configuration node object.
Definition: conf.h:69
@ SND_PCM_STATE_SETUP
Definition: pcm.h:295
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:7182
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:6920
struct _snd_output snd_output_t
Internal structure for an output object.
Definition: output.h:54
const char * snd_pcm_info_get_id(const snd_pcm_info_t *obj)
Get id from a PCM info container.
Definition: pcm.c:7081
int snd_pcm_hw_free(snd_pcm_t *pcm)
Remove PCM hardware configuration and free associated resources.
Definition: pcm.c:953
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:981
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:2406
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:3924
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:5524
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:4860
@ SND_PCM_FORMAT_U24_LE
Definition: pcm.h:145
@ SND_CHMAP_FCH
Definition: pcm.h:592
int snd_pcm_status_dump(snd_pcm_status_t *status, snd_output_t *out)
Dump status.
Definition: pcm.c:2350
void snd_pcm_status_free(snd_pcm_status_t *obj)
frees a previously allocated snd_pcm_status_t
Definition: pcm.c:6801
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:5249
@ SND_CHMAP_FL
Definition: pcm.h:576
@ SND_CHMAP_RL
Definition: pcm.h:578
@ SND_PCM_TYPE_COPY
Definition: pcm.h:428
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:4645
@ SND_PCM_FORMAT_U18_3BE
Definition: pcm.h:211
@ SND_PCM_STATE_XRUN
Definition: pcm.h:301
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:6531
@ SND_PCM_TYPE_INET
Definition: pcm.h:426
@ SND_CHMAP_RRC
Definition: pcm.h:588
@ SND_PCM_FORMAT_U20_3LE
Definition: pcm.h:201
@ SND_PCM_CLASS_MULTI
Definition: pcm.h:83
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:2210
struct _snd_pcm_hw_params snd_pcm_hw_params_t
Definition: pcm.h:64
@ SND_PCM_FORMAT_FLOAT_LE
Definition: pcm.h:157
int snd_pcm_reset(snd_pcm_t *pcm)
Reset PCM position.
Definition: pcm.c:1250
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:6951
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:3914
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:3884
@ SND_PCM_FORMAT_S16_BE
Definition: pcm.h:135
snd_pcm_chmap_t * snd_pcm_chmap_parse_string(const char *str)
Definition: pcm.c:8364
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:846
@ SND_PCM_FORMAT_IMA_ADPCM
Definition: pcm.h:173
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:3851
void(* snd_async_callback_t)(snd_async_handler_t *handler)
Async notification callback.
Definition: global.h:122
@ SND_PCM_FORMAT_U18_3LE
Definition: pcm.h:209
@ SND_PCM_TYPE_DMIX
Definition: pcm.h:458
const char * snd_pcm_tstamp_mode_name(const snd_pcm_tstamp_t mode)
get name of PCM tstamp mode setting
Definition: pcm.c:2226
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:5573
int snd_pcm_open(snd_pcm_t **pcm, const char *name, snd_pcm_stream_t stream, int mode)
Opens a PCM.
Definition: pcm.c:2686
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
unsigned int channels
Definition: pcm.h:623
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:4929
@ SND_PCM_TYPE_DROUTE
Definition: pcm.h:450
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:4198
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:3874
_snd_spcm_xrun_type
Definition: pcm.h:1311
snd_pcm_sframes_t snd_pcm_forwardable(snd_pcm_t *pcm)
Get safe count of frames which can be forwarded.
Definition: pcm.c:1475
@ SND_PCM_TYPE_PLUG
Definition: pcm.h:442
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:951
@ SND_CHMAP_FRC
Definition: pcm.h:586
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:4663
int snd_pcm_dump_setup(snd_pcm_t *pcm, snd_output_t *out)
Dump current setup (hardware and software) for PCM.
Definition: pcm.c:2337
@ SND_PCM_FORMAT_IEC958_SUBFRAME_LE
Definition: pcm.h:165
unsigned long snd_pcm_uframes_t
Definition: pcm.h:388
int snd_pcm_delay(snd_pcm_t *pcm, snd_pcm_sframes_t *delayp)
Obtain delay for a running PCM handle.
Definition: pcm.c:1137
snd_pcm_chmap_t * snd_pcm_get_chmap(snd_pcm_t *pcm)
Definition: pcm.c:8129
snd_pcm_t * snd_async_handler_get_pcm(snd_async_handler_t *handler)
Return PCM handle related to an async handler.
Definition: pcm.c:2488
@ SND_CHMAP_TYPE_VAR
Definition: pcm.h:566
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:6060
int snd_pcm_prepare(snd_pcm_t *pcm)
Prepare PCM for use.
Definition: pcm.c:1220
const char * snd_pcm_name(snd_pcm_t *pcm)
get identifier of PCM handle
Definition: pcm.c:724
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:4626
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:5724
@ SND_PCM_TYPE_ROUTE
Definition: pcm.h:440
@ SND_PCM_STREAM_PLAYBACK
Definition: pcm.h:103
@ SND_PCM_FORMAT_S24_3LE
Definition: pcm.h:189
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:6765
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:4182
@ SND_PCM_STATE_OPEN
Definition: pcm.h:293
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:6379
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:4355
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:4796
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:6331
_snd_pcm_hook_type
Definition: pcm.h:1209
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:3009
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:6983
int snd_pcm_drop(snd_pcm_t *pcm)
Stop a PCM dropping pending frames.
Definition: pcm.c:1306
@ SND_PCM_FORMAT_U16_LE
Definition: pcm.h:137
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:4907
@ SND_CHMAP_TRC
Definition: pcm.h:600
@ SND_CHMAP_UNKNOWN
Definition: pcm.h:573
@ SND_PCM_STATE_SUSPENDED
Definition: pcm.h:307
enum snd_pcm_chmap_type type
Definition: pcm.h:629
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:6837
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:7219
@ SND_PCM_CLASS_GENERIC
Definition: pcm.h:81
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:3163
@ SND_PCM_STATE_RUNNING
Definition: pcm.h:299
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:5373
snd_pcm_uframes_t snd_pcm_meter_get_now(snd_pcm_t *pcm)
Get meter "now" frame pointer from a SND_PCM_TYPE_METER PCM.
Definition: pcm_meter.c:923
int(* enable)(snd_pcm_scope_t *scope)
Enable and prepare it using current params.
Definition: pcm.h:1242
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:4462
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:4242
void snd_pcm_status_get_htstamp(const snd_pcm_status_t *obj, snd_htimestamp_t *ptr)
Get "now" hi-res timestamp from a PCM status container.
Definition: pcm.c:6884
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:5877
@ SND_PCM_TYPE_ALAW
Definition: pcm.h:432
enum _snd_pcm_type snd_pcm_type_t
Definition: pcm.h:479
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:5832
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:607
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:971
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
void * addr
Definition: pcm.h:484
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:6095
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:5625
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:5670
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:5818
void(* start)(snd_pcm_scope_t *scope)
PCM has been started.
Definition: pcm.h:1250
int snd_pcm_format_unsigned(snd_pcm_format_t format)
Return sign info for a PCM sample linear format.
Definition: pcm_misc.c:85
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:5136
@ SND_PCM_XRUN_NONE
Definition: pcm.h:327
const char * snd_pcm_info_get_name(const snd_pcm_info_t *obj)
Get name from a PCM info container.
Definition: pcm.c:7092
int snd_pcm_drain(snd_pcm_t *pcm)
Stop a PCM preserving pending frames.
Definition: pcm.c:1343
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:6077
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:716
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:938
@ SND_PCM_FORMAT_U24_3BE
Definition: pcm.h:195
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:4418
size_t snd_pcm_info_sizeof(void)
get size of snd_pcm_info_t
Definition: pcm.c:6993
@ SND_PCM_CLASS_DIGITIZER
Definition: pcm.h:87
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:3048
@ SND_PCM_TYPE_MULTI
Definition: pcm.h:418
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:961
_snd_pcm_subclass
Definition: pcm.h:92
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:4258
struct _snd_pcm_info snd_pcm_info_t
Definition: pcm.h:48
@ SND_CHMAP_MONO
Definition: pcm.h:575
@ SND_CHMAP_FC
Definition: pcm.h:580
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:5046
@ SND_PCM_FORMAT_FLOAT_BE
Definition: pcm.h:159
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:3482
@ SND_CHMAP_TFL
Definition: pcm.h:595
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:1179
@ SND_PCM_TSTAMP_TYPE_MONOTONIC
Definition: pcm.h:348
unsigned int snd_pcm_chmap_from_string(const char *str)
Definition: pcm.c:8352
@ SND_CHMAP_LLFE
Definition: pcm.h:605
void snd_pcm_info_free(snd_pcm_info_t *obj)
frees a previously allocated snd_pcm_info_t
Definition: pcm.c:7016
@ SND_PCM_START_DATA
Definition: pcm.h:318
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:4948
int snd_pcm_recover(snd_pcm_t *pcm, int err, int silent)
Recover the stream state from an error or suspend.
Definition: pcm.c:8555
int snd_pcm_format_linear(snd_pcm_format_t format)
Return linear info for a PCM sample format.
Definition: pcm_misc.c:100
_snd_pcm_access
Definition: pcm.h:110
int snd_pcm_start(snd_pcm_t *pcm)
Start a PCM.
Definition: pcm.c:1275
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:5270
void snd_pcm_hw_params_free(snd_pcm_hw_params_t *obj)
frees a previously allocated snd_pcm_hw_params_t
Definition: pcm.c:4172
@ SND_PCM_CLASS_MODEM
Definition: pcm.h:85
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:342
@ SND_PCM_SUBCLASS_MULTI_MIX
Definition: pcm.h:96
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:4312
int snd_pcm_unlink(snd_pcm_t *pcm)
Remove a PCM from a linked group.
Definition: pcm.c:1717
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:5655
size_t snd_pcm_hw_params_sizeof(void)
get size of snd_pcm_hw_params_t
Definition: pcm.c:4149
@ SND_PCM_SUBCLASS_GENERIC_MIX
Definition: pcm.h:94
snd_pcm_chmap_t map
Definition: pcm.h:630
int snd_pcm_info_get_card(const snd_pcm_info_t *obj)
Get card from a PCM info container.
Definition: pcm.c:7070
_snd_pcm_format
Definition: pcm.h:125
@ SND_PCM_FORMAT_U24_BE
Definition: pcm.h:147
size_t snd_pcm_access_mask_sizeof(void)
get size of snd_pcm_access_mask_t
Definition: pcm.c:3841
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:881
int snd_pcm_scope_malloc(snd_pcm_scope_t **ptr)
allocate an invalid snd_pcm_scope_t using standard malloc
Definition: pcm_meter.c:1230
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:6449
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:5844
const char * snd_pcm_type_name(snd_pcm_type_t type)
get name of PCM type
Definition: pcm.c:2265
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:6176
struct _snd_async_handler snd_async_handler_t
Internal structure for an async notification client handler.
Definition: global.h:115
@ SND_PCM_ACCESS_RW_INTERLEAVED
Definition: pcm.h:118
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:6030
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:6145
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:2390
@ SND_PCM_STATE_PRIVATE1
Definition: pcm.h:312
@ SND_PCM_FORMAT_S20_3LE
Definition: pcm.h:197
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:3642
snd_pcm_chmap_position
Definition: pcm.h:572
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:6114
@ SND_PCM_FORMAT_S24
Definition: pcm.h:238
@ SND_PCM_AUDIO_TSTAMP_TYPE_DEFAULT
Definition: pcm.h:359
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:5799
void(* update)(snd_pcm_scope_t *scope)
New frames are present.
Definition: pcm.h:1258
int snd_pcm_format_cpu_endian(snd_pcm_format_t format)
Return endian info for a PCM sample format.
Definition: pcm_misc.c:196
int snd_pcm_poll_descriptors(snd_pcm_t *pcm, struct pollfd *pfds, unsigned int space)
get poll descriptors
Definition: pcm.c:1802
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:4324
@ SND_PCM_FORMAT_U24_3LE
Definition: pcm.h:193
_snd_pcm_xrun
Definition: pcm.h:325
void * ptr
Definition: seq_event.h:199
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:6415
@ SND_PCM_SUBFORMAT_STD
Definition: pcm.h:286
@ SND_CHMAP_TYPE_FIXED
Definition: pcm.h:565
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:4449
size_t snd_pcm_status_sizeof(void)
get size of snd_pcm_status_t
Definition: pcm.c:6778
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:3542
@ SND_CHMAP_BLC
Definition: pcm.h:608
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:6711
@ SND_PCM_FORMAT_FLOAT64_LE
Definition: pcm.h:161
@ SND_CHMAP_FR
Definition: pcm.h:577
@ SND_PCM_FORMAT_MPEG
Definition: pcm.h:175
@ SND_CHMAP_TYPE_NONE
Definition: pcm.h:564
void(* stop)(snd_pcm_scope_t *scope)
PCM has been stopped.
Definition: pcm.h:1254
@ SND_PCM_FORMAT_S16
Definition: pcm.h:234
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:937
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:3462
int snd_pcm_info_malloc(snd_pcm_info_t **ptr)
allocate an invalid snd_pcm_info_t using standard malloc
Definition: pcm.c:7003
@ SND_PCM_FORMAT_IEC958_SUBFRAME_BE
Definition: pcm.h:167
@ SND_PCM_AUDIO_TSTAMP_TYPE_LINK_ESTIMATED
Definition: pcm.h:362
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:5063
@ SND_PCM_TYPE_EXTPLUG
Definition: pcm.h:472
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:3794
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:6432
@ SND_PCM_TSTAMP_TYPE_GETTIMEOFDAY
Definition: pcm.h:347
@ SND_CHMAP_SR
Definition: pcm.h:583
struct timespec snd_htimestamp_t
Definition: global.h:154
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:4697
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:5409
@ SND_PCM_STREAM_CAPTURE
Definition: pcm.h:105
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:5487
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:1632
@ SND_PCM_STATE_DRAINING
Definition: pcm.h:303
@ SND_PCM_FORMAT_IEC958_SUBFRAME
Definition: pcm.h:250
@ SND_PCM_TYPE_DSHARE
Definition: pcm.h:464
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:4502
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:6662
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:5543
snd_pcm_type_t snd_pcm_type(snd_pcm_t *pcm)
get type of PCM handle
Definition: pcm.c:737
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:2734
const char * snd_pcm_stream_name(const snd_pcm_stream_t stream)
get name of PCM stream type
Definition: pcm.c:2095
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_CHMAP_TSL
Definition: pcm.h:603
@ SND_CHMAP_BRC
Definition: pcm.h:609
@ SND_PCM_FORMAT_U20
Definition: pcm.h:254
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:4579
@ SND_PCM_AUDIO_TSTAMP_TYPE_LINK_SYNCHRONIZED
Definition: pcm.h:363
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:7171
@ SND_CHMAP_TFLC
Definition: pcm.h:601
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:5555
snd_pcm_chmap_query_t ** snd_pcm_query_chmaps(snd_pcm_t *pcm)
Definition: pcm.c:8101
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:4299
@ SND_PCM_TYPE_IEC958
Definition: pcm.h:466
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:6464
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_XRUN_IGNORE
Definition: pcm.h:1313
@ SND_CHMAP_TYPE_LAST
Definition: pcm.h:568
@ SND_CHMAP_RC
Definition: pcm.h:584
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:1837
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:6514
@ SND_PCM_FORMAT_S16_LE
Definition: pcm.h:133
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:4712
@ SND_PCM_ACCESS_MMAP_NONINTERLEAVED
Definition: pcm.h:114
long snd_pcm_bytes_to_samples(snd_pcm_t *pcm, ssize_t bytes)
Convert bytes in samples for a PCM.
Definition: pcm.c:2422
snd_pcm_sframes_t snd_pcm_rewind(snd_pcm_t *pcm, snd_pcm_uframes_t frames)
Move application frame position backward.
Definition: pcm.c:1440
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:1195
const char * snd_pcm_access_name(const snd_pcm_access_t _access)
get name of PCM access type
Definition: pcm.c:2107
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:4393
const char * snd_pcm_subformat_name(const snd_pcm_subformat_t subformat)
get name of PCM sample subformat
Definition: pcm.c:2170
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:5743
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:5505
@ SND_PCM_TYPE_ADPCM
Definition: pcm.h:436
@ SND_PCM_FORMAT_S24_BE
Definition: pcm.h:143
@ SND_PCM_START_EXPLICIT
Definition: pcm.h:320
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:3698
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:4984
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:3831
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:5960
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:4742
@ SND_CHMAP_TYPE_PAIRED
Definition: pcm.h:567
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:4815
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:2978
@ SND_PCM_TYPE_HW
Definition: pcm.h:413
@ SND_PCM_TYPE_RATE
Definition: pcm.h:438
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:6811
struct _snd_pcm_sw_params snd_pcm_sw_params_t
Definition: pcm.h:67
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:4215
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:5031
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:4472
@ SND_PCM_FORMAT_S8
Definition: pcm.h:129
int snd_spcm_init_get_params(snd_pcm_t *pcm, unsigned int *rate, snd_pcm_uframes_t *buffer_size, snd_pcm_uframes_t *period_size)
Get the set up of simple PCM.
Definition: pcm_simple.c:284
int snd_pcm_hw_params_can_resume(const snd_pcm_hw_params_t *params)
Check if hardware supports resume.
Definition: pcm.c:3622
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:4281
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:5200
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:5917
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:7193
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:6822
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:5158
uint64_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:410
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:5000
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:5316
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:4846
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:4610
@ SND_PCM_TYPE_SHM
Definition: pcm.h:424
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:5440
@ SND_PCM_FORMAT_FLOAT64_BE
Definition: pcm.h:163
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:4966
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:1554
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:5117
snd_pcm_chmap_type
Definition: pcm.h:563
int snd_pcm_format_little_endian(snd_pcm_format_t format)
Return endian info for a PCM sample format.
Definition: pcm_misc.c:128
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:6739
struct timeval snd_timestamp_t
Definition: global.h:152
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:4542
@ SND_PCM_FORMAT_S32_BE
Definition: pcm.h:151
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_spcm_latency
Definition: pcm.h:1298
@ SND_PCM_FORMAT_MU_LAW
Definition: pcm.h:169
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:3562
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:7136
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:4759
struct _snd_pcm_subformat_mask snd_pcm_subformat_mask_t
Definition: pcm.h:75
@ SND_CHMAP_TC
Definition: pcm.h:594
@ SND_PCM_ACCESS_MMAP_COMPLEX
Definition: pcm.h:116
@ SND_CHMAP_FRH
Definition: pcm.h:593
@ SND_PCM_TYPE_MIX
Definition: pcm.h:448
@ SND_CHMAP_TFR
Definition: pcm.h:596
int snd_pcm_set_chmap(snd_pcm_t *pcm, const snd_pcm_chmap_t *map)
Definition: pcm.c:8142
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:6284
@ SND_PCM_FORMAT_S32
Definition: pcm.h:242
int snd_pcm_dump(snd_pcm_t *pcm, snd_output_t *out)
Dump PCM info.
Definition: pcm.c:2371
@ SND_PCM_AUDIO_TSTAMP_TYPE_LINK
Definition: pcm.h:360
int snd_pcm_info(snd_pcm_t *pcm, snd_pcm_info_t *info)
Obtain general (static) information for PCM handle.
Definition: pcm.c:870
@ SND_PCM_TYPE_LINEAR
Definition: pcm.h:430
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:6544
@ SND_PCM_FORMAT_GSM
Definition: pcm.h:177
int snd_pcm_format_float(snd_pcm_format_t format)
Return float info for a PCM sample format.
Definition: pcm_misc.c:110
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:5897
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:4566
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:7114
const char * snd_pcm_format_name(const snd_pcm_format_t format)
get name of PCM sample format
Definition: pcm.c:2119
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:6045
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:2716
int snd_pcm_close(snd_pcm_t *pcm)
close PCM handle
Definition: pcm.c:764
@ SND_CHMAP_NA
Definition: pcm.h:574
unsigned int pos[0]
Definition: pcm.h:624
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:5293
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:909
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:5778
@ SND_PCM_FORMAT_S24_LE
Definition: pcm.h:141
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:6270
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:2954
@ SND_CHMAP_FLC
Definition: pcm.h:585
@ SND_PCM_FORMAT_S20
Definition: pcm.h:252
struct _snd_pcm_scope snd_pcm_scope_t
Definition: pcm.h:502
_snd_pcm_stream
Definition: pcm.h:101
int snd_pcm_dump_hw_setup(snd_pcm_t *pcm, snd_output_t *out)
Dump current hardware setup for PCM.
Definition: pcm.c:2280
@ SND_PCM_TYPE_IOPLUG
Definition: pcm.h:470
int snd_pcm_status_malloc(snd_pcm_status_t **ptr)
allocate an invalid snd_pcm_status_t using standard malloc
Definition: pcm.c:6788
_snd_pcm_start
Definition: pcm.h:316
@ SND_CHMAP_RLFE
Definition: pcm.h:606
_snd_pcm_state
Definition: pcm.h:291
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:7059
unsigned int step
Definition: pcm.h:488
@ SND_PCM_TYPE_FILE
Definition: pcm.h:420
int snd_pcm_link(snd_pcm_t *pcm1, snd_pcm_t *pcm2)
Link two PCMs.
Definition: pcm.c:1699
void snd_pcm_sw_params_free(snd_pcm_sw_params_t *obj)
frees a previously allocated snd_pcm_sw_params_t
Definition: pcm.c:6248
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:7332
@ SND_PCM_FORMAT_SPECIAL
Definition: pcm.h:187
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:4487
unsigned int id32[4]
Definition: pcm.h:498
@ SND_CHMAP_SL
Definition: pcm.h:582
@ SND_PCM_TYPE_METER
Definition: pcm.h:446
int(* snd_pcm_hook_func_t)(snd_pcm_hook_t *hook)
Definition: pcm.h:1219
@ SND_PCM_TYPE_LBSERVER
Definition: pcm.h:452
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:3335
struct _snd_pcm_access_mask snd_pcm_access_mask_t
Definition: pcm.h:71
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:7158
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:8603
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:5609
@ SND_PCM_TYPE_MMAP_EMUL
Definition: pcm.h:474
@ SND_PCM_STATE_DISCONNECTED
Definition: pcm.h:309
int snd_pcm_format_big_endian(snd_pcm_format_t format)
Return endian info for a PCM sample format.
Definition: pcm_misc.c:181
snd_pcm_sframes_t snd_pcm_rewindable(snd_pcm_t *pcm)
Get safe count of frames which can be rewinded.
Definition: pcm.c:1409
@ SND_PCM_FORMAT_U24
Definition: pcm.h:240
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:991
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:5100
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:4378
@ SND_PCM_FORMAT_U20_BE
Definition: pcm.h:185
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:4368
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:5215
unsigned short id16[8]
Definition: pcm.h:496
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:5081
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:6310
unsigned int snd_pcm_info_get_device(const snd_pcm_info_t *obj)
Get device from a PCM info container.
Definition: pcm.c:7037
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:4227
int snd_pcm_hook_remove(snd_pcm_hook_t *hook)
Remove a PCM hook.
Definition: pcm_hooks.c:628
@ SND_PCM_FORMAT_S32_LE
Definition: pcm.h:149
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:7103
@ SND_CHMAP_TFRC
Definition: pcm.h:602
uint16_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:583
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:3682
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:4271
@ SND_CHMAP_TFC
Definition: pcm.h:597
@ SND_PCM_FORMAT_FLOAT64
Definition: pcm.h:248
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:5759
const char * snd_pcm_chmap_type_name(enum snd_pcm_chmap_type val)
Definition: pcm.c:8173
@ SND_PCM_TYPE_NULL
Definition: pcm.h:422
_snd_pcm_audio_tstamp_type
Definition: pcm.h:353
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:3718
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:5591
@ SND_SPCM_LATENCY_MEDIUM
Definition: pcm.h:1304
const char * snd_pcm_chmap_name(enum snd_pcm_chmap_position val)
Definition: pcm.c:8206
@ SND_PCM_FORMAT_S18_3BE
Definition: pcm.h:207
@ SND_PCM_TSTAMP_TYPE_MONOTONIC_RAW
Definition: pcm.h:349
@ SND_PCM_TYPE_SOFTVOL
Definition: pcm.h:468
int snd_pcm_wait(snd_pcm_t *pcm, int timeout)
Wait for a PCM to become ready.
Definition: pcm.c:2844
void(* disable)(snd_pcm_scope_t *scope)
Disable.
Definition: pcm.h:1246
_snd_pcm_class
Definition: pcm.h:78
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:6685
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:4339
const char * snd_pcm_state_name(const snd_pcm_state_t state)
get name of PCM state
Definition: pcm.c:2250
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:5470
int snd_pcm_resume(snd_pcm_t *pcm)
Resume from suspend, no samples are lost.
Definition: pcm.c:1166
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:1593
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:5391
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:5860
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:986
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:6934
@ SND_PCM_FORMAT_U16
Definition: pcm.h:236
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:3662
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:4594
void(* close)(snd_pcm_scope_t *scope)
PCM is closing.
Definition: pcm.h:1266
_snd_spcm_duplex_type
Definition: pcm.h:1319
const char * snd_pcm_subformat_description(const snd_pcm_subformat_t subformat)
get description of PCM sample subformat
Definition: pcm.c:2182
@ SND_PCM_FORMAT_U32_BE
Definition: pcm.h:155
int snd_pcm_format_signed(snd_pcm_format_t format)
Return sign info for a PCM sample linear format.
Definition: pcm_misc.c:35
uint32_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:572
void(* reset)(snd_pcm_scope_t *scope)
Reset status.
Definition: pcm.h:1262
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
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:6596
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:4727
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:4517
@ SND_PCM_TYPE_MULAW
Definition: pcm.h:434
snd_pcm_format_t snd_pcm_format_value(const char *name)
get PCM sample format from name
Definition: pcm.c:2143
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:5355
@ SND_CHMAP_RLC
Definition: pcm.h:587
@ SND_PCM_AUDIO_TSTAMP_TYPE_LINK_ABSOLUTE
Definition: pcm.h:361
int snd_pcm_nonblock(snd_pcm_t *pcm, int nonblock)
set nonblock mode
Definition: pcm.c:800
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:6358
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:5979
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:4433
void snd_pcm_free_chmaps(snd_pcm_chmap_query_t **maps)
Definition: pcm.c:8112