mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-11-08 13:30:03 -05:00
Fix doxygen documents
Fix the warnings of doxygen parsing. Add some missing documentation.
This commit is contained in:
parent
7651690858
commit
087184b0f9
49 changed files with 300 additions and 167 deletions
|
|
@ -1047,7 +1047,7 @@ int snd_pcm_drain(snd_pcm_t *pcm)
|
|||
/**
|
||||
* \brief Pause/resume PCM
|
||||
* \param pcm PCM handle
|
||||
* \param pause 0 = resume, 1 = pause
|
||||
* \param enable 0 = resume, 1 = pause
|
||||
* \return 0 on success otherwise a negative error code
|
||||
*
|
||||
* Note that this function works only on the hardware which supports
|
||||
|
|
@ -1552,7 +1552,7 @@ const char *snd_pcm_stream_name(snd_pcm_stream_t stream)
|
|||
|
||||
/**
|
||||
* \brief get name of PCM access type
|
||||
* \param access PCM access type
|
||||
* \param acc PCM access type
|
||||
* \return ascii name of PCM access type
|
||||
*/
|
||||
const char *snd_pcm_access_name(snd_pcm_access_t acc)
|
||||
|
|
@ -1615,7 +1615,7 @@ snd_pcm_format_t snd_pcm_format_value(const char* name)
|
|||
|
||||
/**
|
||||
* \brief get name of PCM sample subformat
|
||||
* \param format PCM sample subformat
|
||||
* \param subformat PCM sample subformat
|
||||
* \return ascii name of PCM sample subformat
|
||||
*/
|
||||
const char *snd_pcm_subformat_name(snd_pcm_subformat_t subformat)
|
||||
|
|
@ -2663,7 +2663,7 @@ int snd_pcm_hw_params_dump(snd_pcm_hw_params_t *params, snd_output_t *out)
|
|||
|
||||
/**
|
||||
* \brief Check, if hardware supports sample-resolution mmap for given configuration
|
||||
* \param param Configuration space
|
||||
* \param params Configuration space
|
||||
* \return Boolean value
|
||||
* \retval 0 Hardware doesn't support sample-resolution mmap
|
||||
* \retval 1 Hardware supports sample-resolution mmap
|
||||
|
|
@ -2684,7 +2684,7 @@ int snd_pcm_hw_params_can_mmap_sample_resolution(const snd_pcm_hw_params_t *para
|
|||
|
||||
/**
|
||||
* \brief Check, if hardware does double buffering for start/stop for given configuration
|
||||
* \param param Configuration space
|
||||
* \param params Configuration space
|
||||
* \return Boolean value
|
||||
* \retval 0 Hardware doesn't do double buffering for start/stop
|
||||
* \retval 1 Hardware does double buffering for start/stop
|
||||
|
|
@ -2705,7 +2705,7 @@ int snd_pcm_hw_params_is_double(const snd_pcm_hw_params_t *params)
|
|||
|
||||
/**
|
||||
* \brief Check, if hardware does double buffering for data transfers for given configuration
|
||||
* \param param Configuration space
|
||||
* \param params Configuration space
|
||||
* \return Boolean value
|
||||
* \retval 0 Hardware doesn't do double buffering for data transfers
|
||||
* \retval 1 Hardware does double buffering for data transfers
|
||||
|
|
@ -2726,7 +2726,7 @@ int snd_pcm_hw_params_is_batch(const snd_pcm_hw_params_t *params)
|
|||
|
||||
/**
|
||||
* \brief Check, if hardware does block transfers for samples for given configuration
|
||||
* \param param Configuration space
|
||||
* \param params Configuration space
|
||||
* \return Boolean value
|
||||
* \retval 0 Hardware doesn't block transfers
|
||||
* \retval 1 Hardware does block transfers
|
||||
|
|
@ -2747,7 +2747,7 @@ int snd_pcm_hw_params_is_block_transfer(const snd_pcm_hw_params_t *params)
|
|||
|
||||
/**
|
||||
* \brief Check, if hardware supports overrange detection
|
||||
* \param param Configuration space
|
||||
* \param params Configuration space
|
||||
* \return Boolean value
|
||||
* \retval 0 Hardware doesn't support overrange detection
|
||||
* \retval 1 Hardware supports overrange detection
|
||||
|
|
@ -2768,7 +2768,7 @@ int snd_pcm_hw_params_can_overrange(const snd_pcm_hw_params_t *params)
|
|||
|
||||
/**
|
||||
* \brief Check, if hardware supports pause
|
||||
* \param param Configuration space
|
||||
* \param params Configuration space
|
||||
* \return Boolean value
|
||||
* \retval 0 Hardware doesn't support pause
|
||||
* \retval 1 Hardware supports pause
|
||||
|
|
@ -2789,7 +2789,7 @@ int snd_pcm_hw_params_can_pause(const snd_pcm_hw_params_t *params)
|
|||
|
||||
/**
|
||||
* \brief Check, if hardware supports resume
|
||||
* \param param Configuration space
|
||||
* \param params Configuration space
|
||||
* \return Boolean value
|
||||
* \retval 0 Hardware doesn't support resume
|
||||
* \retval 1 Hardware supports resume
|
||||
|
|
@ -2810,7 +2810,7 @@ int snd_pcm_hw_params_can_resume(const snd_pcm_hw_params_t *params)
|
|||
|
||||
/**
|
||||
* \brief Check, if hardware does half-duplex only
|
||||
* \param param Configuration space
|
||||
* \param params Configuration space
|
||||
* \return Boolean value
|
||||
* \retval 0 Hardware doesn't do half-duplex
|
||||
* \retval 1 Hardware does half-duplex
|
||||
|
|
@ -2831,7 +2831,7 @@ int snd_pcm_hw_params_is_half_duplex(const snd_pcm_hw_params_t *params)
|
|||
|
||||
/**
|
||||
* \brief Check, if hardware does joint-duplex (playback and capture are somewhat correlated)
|
||||
* \param param Configuration space
|
||||
* \param params Configuration space
|
||||
* \return Boolean value
|
||||
* \retval 0 Hardware doesn't do joint-duplex
|
||||
* \retval 1 Hardware does joint-duplex
|
||||
|
|
@ -2852,7 +2852,7 @@ int snd_pcm_hw_params_is_joint_duplex(const snd_pcm_hw_params_t *params)
|
|||
|
||||
/**
|
||||
* \brief Check, if hardware supports synchronized start with sample resolution
|
||||
* \param param Configuration space
|
||||
* \param params Configuration space
|
||||
* \return Boolean value
|
||||
* \retval 0 Hardware doesn't support synchronized start
|
||||
* \retval 1 Hardware supports synchronized start
|
||||
|
|
@ -2969,7 +2969,7 @@ int snd_pcm_access_mask_malloc(snd_pcm_access_mask_t **ptr)
|
|||
|
||||
/**
|
||||
* \brief frees a previously allocated #snd_pcm_access_mask_t
|
||||
* \param pointer to object to free
|
||||
* \param obj pointer to object to free
|
||||
*/
|
||||
void snd_pcm_access_mask_free(snd_pcm_access_mask_t *obj)
|
||||
{
|
||||
|
|
@ -3071,7 +3071,7 @@ int snd_pcm_format_mask_malloc(snd_pcm_format_mask_t **ptr)
|
|||
|
||||
/**
|
||||
* \brief frees a previously allocated #snd_pcm_format_mask_t
|
||||
* \param pointer to object to free
|
||||
* \param obj pointer to object to free
|
||||
*/
|
||||
void snd_pcm_format_mask_free(snd_pcm_format_mask_t *obj)
|
||||
{
|
||||
|
|
@ -3174,7 +3174,7 @@ int snd_pcm_subformat_mask_malloc(snd_pcm_subformat_mask_t **ptr)
|
|||
|
||||
/**
|
||||
* \brief frees a previously allocated #snd_pcm_subformat_mask_t
|
||||
* \param pointer to object to free
|
||||
* \param obj pointer to object to free
|
||||
*/
|
||||
void snd_pcm_subformat_mask_free(snd_pcm_subformat_mask_t *obj)
|
||||
{
|
||||
|
|
@ -3277,7 +3277,7 @@ int snd_pcm_hw_params_malloc(snd_pcm_hw_params_t **ptr)
|
|||
|
||||
/**
|
||||
* \brief frees a previously allocated #snd_pcm_hw_params_t
|
||||
* \param pointer to object to free
|
||||
* \param obj pointer to object to free
|
||||
*/
|
||||
void snd_pcm_hw_params_free(snd_pcm_hw_params_t *obj)
|
||||
{
|
||||
|
|
@ -3359,7 +3359,7 @@ int snd_pcm_hw_params_set_access_first(snd_pcm_t *pcm, snd_pcm_hw_params_t *para
|
|||
* \brief Restrict a configuration space to contain only its last access type
|
||||
* \param pcm PCM handle
|
||||
* \param params Configuration space
|
||||
* \param val Returned last access type
|
||||
* \param access Returned last access type
|
||||
* \return 0 otherwise a negative error code
|
||||
*/
|
||||
#ifndef DOXYGEN
|
||||
|
|
@ -3876,6 +3876,7 @@ int snd_pcm_hw_params_set_rate_minmax(snd_pcm_t *pcm, snd_pcm_hw_params_t *param
|
|||
* \param pcm PCM handle
|
||||
* \param params Configuration space
|
||||
* \param val approximate target rate / returned approximate set rate
|
||||
* \param dir Sub unit direction
|
||||
* \return 0 otherwise a negative error code if configuration space is empty
|
||||
*
|
||||
* target/chosen exact value is <,=,> val following dir (-1,0,1)
|
||||
|
|
@ -3947,7 +3948,8 @@ int snd_pcm_hw_params_set_rate_resample(snd_pcm_t *pcm, snd_pcm_hw_params_t *par
|
|||
/**
|
||||
* \brief Extract resample state from a configuration space
|
||||
* \param pcm PCM handle
|
||||
* \param *val 0 = disable, 1 = enable rate resampling
|
||||
* \param params Configuration space
|
||||
* \param val 0 = disable, 1 = enable rate resampling
|
||||
* \return 0 otherwise a negative error code
|
||||
*/
|
||||
int snd_pcm_hw_params_get_rate_resample(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int *val)
|
||||
|
|
@ -3977,7 +3979,8 @@ int snd_pcm_hw_params_set_export_buffer(snd_pcm_t *pcm, snd_pcm_hw_params_t *par
|
|||
/**
|
||||
* \brief Extract buffer accessibility from a configuration space
|
||||
* \param pcm PCM handle
|
||||
* \param *val 0 = disable, 1 = enable exporting buffer
|
||||
* \param params Configuration space
|
||||
* \param val 0 = disable, 1 = enable exporting buffer
|
||||
* \return 0 otherwise a negative error code
|
||||
*/
|
||||
int snd_pcm_hw_params_get_export_buffer(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int *val)
|
||||
|
|
@ -4124,6 +4127,7 @@ int snd_pcm_hw_params_set_period_time_minmax(snd_pcm_t *pcm, snd_pcm_hw_params_t
|
|||
* \param pcm PCM handle
|
||||
* \param params Configuration space
|
||||
* \param val approximate target period duration in us / returned chosen approximate target period duration
|
||||
* \param dir Sub unit direction
|
||||
* \return 0 otherwise a negative error code if configuration space is empty
|
||||
*
|
||||
* target/chosen exact value is <,=,> val following dir (-1,0,1)
|
||||
|
|
@ -4160,10 +4164,9 @@ int snd_pcm_hw_params_set_period_time_first(snd_pcm_t *pcm, snd_pcm_hw_params_t
|
|||
* \brief Restrict a configuration space to contain only its maximum period time
|
||||
* \param pcm PCM handle
|
||||
* \param params Configuration space
|
||||
* \param val Returned maximum approximate period time
|
||||
* \param dir Sub unit direction
|
||||
* \return approximate period duration in us
|
||||
*
|
||||
* Actual exact value is <,=,> the approximate one following dir (-1, 0, 1)
|
||||
*/
|
||||
#ifndef DOXYGEN
|
||||
int INTERNAL(snd_pcm_hw_params_set_period_time_last)(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int *val, int *dir)
|
||||
|
|
@ -4336,6 +4339,7 @@ int snd_pcm_hw_params_set_period_size_minmax(snd_pcm_t *pcm, snd_pcm_hw_params_t
|
|||
* \param pcm PCM handle
|
||||
* \param params Configuration space
|
||||
* \param val approximate target period size in frames / returned chosen approximate target period size
|
||||
* \param dir Sub unit direction
|
||||
* \return 0 otherwise a negative error code if configuration space is empty
|
||||
*
|
||||
* target/chosen exact value is <,=,> val following dir (-1,0,1)
|
||||
|
|
@ -4547,6 +4551,7 @@ int snd_pcm_hw_params_set_periods_minmax(snd_pcm_t *pcm, snd_pcm_hw_params_t *pa
|
|||
* \param pcm PCM handle
|
||||
* \param params Configuration space
|
||||
* \param val approximate target periods per buffer / returned chosen approximate target periods per buffer
|
||||
* \param dir Sub unit direction
|
||||
* \return 0 otherwise a negative error code if configuration space is empty
|
||||
*
|
||||
* target/chosen exact value is <,=,> val following dir (-1,0,1)
|
||||
|
|
@ -4613,7 +4618,6 @@ int snd_pcm_hw_params_set_periods_integer(snd_pcm_t *pcm, snd_pcm_hw_params_t *p
|
|||
/**
|
||||
* \brief Extract buffer time from a configuration space
|
||||
* \param params Configuration space
|
||||
* \param approximate buffer duration in us
|
||||
* \param val Returned buffer time in us
|
||||
* \param dir Sub unit direction
|
||||
* \return 0 otherwise a negative error code if not exactly one is present
|
||||
|
|
@ -4747,6 +4751,7 @@ int snd_pcm_hw_params_set_buffer_time_minmax(snd_pcm_t *pcm, snd_pcm_hw_params_t
|
|||
* \param pcm PCM handle
|
||||
* \param params Configuration space
|
||||
* \param val approximate target buffer duration in us / returned chosen approximate target buffer duration
|
||||
* \param dir Sub unit direction
|
||||
* \return 0 otherwise a negative error code if configuration space is empty
|
||||
*
|
||||
* target/chosen exact value is <,=,> val following dir (-1,0,1)
|
||||
|
|
@ -4822,10 +4827,7 @@ int snd_pcm_hw_params_get_buffer_size(const snd_pcm_hw_params_t *params, snd_pcm
|
|||
* \brief Extract minimum buffer size from a configuration space
|
||||
* \param params Configuration space
|
||||
* \param val Returned approximate minimum buffer size in frames
|
||||
* \param dir Sub unit direction
|
||||
* \return 0 otherwise a negative error code
|
||||
*
|
||||
* Exact value is <,=,> the returned one following dir (-1,0,1)
|
||||
*/
|
||||
#ifndef DOXYGEN
|
||||
int INTERNAL(snd_pcm_hw_params_get_buffer_size_min)(const snd_pcm_hw_params_t *params, snd_pcm_uframes_t *val)
|
||||
|
|
@ -4844,7 +4846,6 @@ int snd_pcm_hw_params_get_buffer_size_min(const snd_pcm_hw_params_t *params, snd
|
|||
* \brief Extract maximum buffer size from a configuration space
|
||||
* \param params Configuration space
|
||||
* \param val Returned approximate maximum buffer size in frames
|
||||
* \param dir Sub unit direction
|
||||
* \return 0 otherwise a negative error code
|
||||
*
|
||||
* Exact value is <,=,> the returned one following dir (-1,0,1)
|
||||
|
|
@ -4867,7 +4868,6 @@ int snd_pcm_hw_params_get_buffer_size_max(const snd_pcm_hw_params_t *params, snd
|
|||
* \param pcm PCM handle
|
||||
* \param params Configuration space
|
||||
* \param val buffer size in frames
|
||||
* \param dir Sub unit direction
|
||||
* \return 0 if available a negative error code otherwise
|
||||
*
|
||||
* Wanted exact value is <,=,> val following dir (-1,0,1)
|
||||
|
|
@ -4896,10 +4896,7 @@ int snd_pcm_hw_params_set_buffer_size(snd_pcm_t *pcm, snd_pcm_hw_params_t *param
|
|||
* \param pcm PCM handle
|
||||
* \param params Configuration space
|
||||
* \param val approximate minimum buffer size in frames (on return filled with actual minimum)
|
||||
* \param dir Sub unit direction (on return filled with actual direction)
|
||||
* \return 0 otherwise a negative error code if configuration space would become empty
|
||||
*
|
||||
* Wanted/actual exact minimum is <,=,> val following dir (-1,0,1)
|
||||
*/
|
||||
int snd_pcm_hw_params_set_buffer_size_min(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, snd_pcm_uframes_t *val)
|
||||
{
|
||||
|
|
@ -4915,10 +4912,7 @@ int snd_pcm_hw_params_set_buffer_size_min(snd_pcm_t *pcm, snd_pcm_hw_params_t *p
|
|||
* \param pcm PCM handle
|
||||
* \param params Configuration space
|
||||
* \param val approximate maximum buffer size in frames (on return filled with actual maximum)
|
||||
* \param dir Sub unit direction (on return filled with actual direction)
|
||||
* \return 0 otherwise a negative error code if configuration space would become empty
|
||||
*
|
||||
* Wanted/actual exact minimum is <,=,> val following dir (-1,0,1)
|
||||
*/
|
||||
int snd_pcm_hw_params_set_buffer_size_max(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, snd_pcm_uframes_t *val)
|
||||
{
|
||||
|
|
@ -4934,12 +4928,8 @@ int snd_pcm_hw_params_set_buffer_size_max(snd_pcm_t *pcm, snd_pcm_hw_params_t *p
|
|||
* \param pcm PCM handle
|
||||
* \param params Configuration space
|
||||
* \param min approximate minimum buffer size in frames (on return filled with actual minimum)
|
||||
* \param mindir Sub unit direction for minimum (on return filled with actual direction)
|
||||
* \param max approximate maximum buffer size in frames (on return filled with actual maximum)
|
||||
* \param maxdir Sub unit direction for maximum (on return filled with actual direction)
|
||||
* \return 0 otherwise a negative error code if configuration space would become empty
|
||||
*
|
||||
* Wanted/actual exact min/max is <,=,> val following dir (-1,0,1)
|
||||
*/
|
||||
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)
|
||||
{
|
||||
|
|
@ -4957,8 +4947,6 @@ int snd_pcm_hw_params_set_buffer_size_minmax(snd_pcm_t *pcm, snd_pcm_hw_params_t
|
|||
* \param params Configuration space
|
||||
* \param val approximate target buffer size in frames / returned chosen approximate target buffer size in frames
|
||||
* \return 0 otherwise a negative error code if configuration space is empty
|
||||
*
|
||||
* target/chosen exact value is <,=,> val following dir (-1,0,1)
|
||||
*/
|
||||
#ifndef DOXYGEN
|
||||
int INTERNAL(snd_pcm_hw_params_set_buffer_size_near)(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, snd_pcm_uframes_t *val)
|
||||
|
|
@ -5150,6 +5138,7 @@ int snd_pcm_hw_params_set_tick_time_minmax(snd_pcm_t *pcm, snd_pcm_hw_params_t *
|
|||
* \param pcm PCM handle
|
||||
* \param params Configuration space
|
||||
* \param val approximate target tick duration in us / returned chosen approximate target tick duration in us
|
||||
* \param dir Sub unit direction
|
||||
* \return 0 otherwise a negative error code if configuration space is empty
|
||||
*
|
||||
* target/chosen exact value is <,=,> val following dir (-1,0,1)
|
||||
|
|
@ -5302,7 +5291,7 @@ int snd_pcm_sw_params_malloc(snd_pcm_sw_params_t **ptr)
|
|||
|
||||
/**
|
||||
* \brief frees a previously allocated #snd_pcm_sw_params_t
|
||||
* \param pointer to object to free
|
||||
* \param obj pointer to object to free
|
||||
*/
|
||||
void snd_pcm_sw_params_free(snd_pcm_sw_params_t *obj)
|
||||
{
|
||||
|
|
@ -5320,7 +5309,7 @@ void snd_pcm_sw_params_copy(snd_pcm_sw_params_t *dst, const snd_pcm_sw_params_t
|
|||
*dst = *src;
|
||||
}
|
||||
|
||||
/*
|
||||
/**
|
||||
* \brief Get boundary for ring pointers from a software configuration container
|
||||
* \param params Software configuration container
|
||||
* \param val Returned boundary in frames
|
||||
|
|
@ -5570,7 +5559,7 @@ int snd_pcm_sw_params_set_xfer_align(snd_pcm_t *pcm, snd_pcm_sw_params_t *params
|
|||
* \brief Get xfer align from a software configuration container
|
||||
* \param params Software configuration container
|
||||
* \param val returned chunk size (frames are attempted to be transferred in chunks)
|
||||
* \param 0 otherwise a negative error code
|
||||
* \return 0 otherwise a negative error code
|
||||
*/
|
||||
#ifndef DOXYGEN
|
||||
int INTERNAL(snd_pcm_sw_params_get_xfer_align)(const snd_pcm_sw_params_t *params, snd_pcm_uframes_t *val)
|
||||
|
|
@ -5800,7 +5789,7 @@ int snd_pcm_status_malloc(snd_pcm_status_t **ptr)
|
|||
|
||||
/**
|
||||
* \brief frees a previously allocated #snd_pcm_status_t
|
||||
* \param pointer to object to free
|
||||
* \param obj pointer to object to free
|
||||
*/
|
||||
void snd_pcm_status_free(snd_pcm_status_t *obj)
|
||||
{
|
||||
|
|
@ -5820,6 +5809,7 @@ void snd_pcm_status_copy(snd_pcm_status_t *dst, const snd_pcm_status_t *src)
|
|||
|
||||
/**
|
||||
* \brief Get state from a PCM status container (see #snd_pcm_state)
|
||||
* \param obj #snd_pcm_status_t pointer
|
||||
* \return PCM state
|
||||
*/
|
||||
snd_pcm_state_t snd_pcm_status_get_state(const snd_pcm_status_t *obj)
|
||||
|
|
@ -5830,6 +5820,7 @@ snd_pcm_state_t snd_pcm_status_get_state(const snd_pcm_status_t *obj)
|
|||
|
||||
/**
|
||||
* \brief Get trigger timestamp from a PCM status container
|
||||
* \param obj #snd_pcm_status_t pointer
|
||||
* \param ptr Pointer to returned timestamp
|
||||
*/
|
||||
void snd_pcm_status_get_trigger_tstamp(const snd_pcm_status_t *obj, snd_timestamp_t *ptr)
|
||||
|
|
@ -5841,6 +5832,7 @@ void snd_pcm_status_get_trigger_tstamp(const snd_pcm_status_t *obj, snd_timestam
|
|||
|
||||
/**
|
||||
* \brief Get trigger hi-res timestamp from a PCM status container
|
||||
* \param obj #snd_pcm_status_t pointer
|
||||
* \param ptr Pointer to returned timestamp
|
||||
*/
|
||||
#ifndef DOXYGEN
|
||||
|
|
@ -5856,6 +5848,7 @@ use_default_symbol_version(__snd_pcm_status_get_trigger_htstamp, snd_pcm_status_
|
|||
|
||||
/**
|
||||
* \brief Get "now" timestamp from a PCM status container
|
||||
* \param obj #snd_pcm_status_t pointer
|
||||
* \param ptr Pointer to returned timestamp
|
||||
*/
|
||||
void snd_pcm_status_get_tstamp(const snd_pcm_status_t *obj, snd_timestamp_t *ptr)
|
||||
|
|
@ -5867,6 +5860,7 @@ void snd_pcm_status_get_tstamp(const snd_pcm_status_t *obj, snd_timestamp_t *ptr
|
|||
|
||||
/**
|
||||
* \brief Get "now" hi-res timestamp from a PCM status container
|
||||
* \param obj pointer to #snd_pcm_status_t
|
||||
* \param ptr Pointer to returned timestamp
|
||||
*/
|
||||
#ifndef DOXYGEN
|
||||
|
|
@ -5951,7 +5945,7 @@ int snd_pcm_info_malloc(snd_pcm_info_t **ptr)
|
|||
|
||||
/**
|
||||
* \brief frees a previously allocated #snd_pcm_info_t
|
||||
* \param pointer to object to free
|
||||
* \param obj pointer to object to free
|
||||
*/
|
||||
void snd_pcm_info_free(snd_pcm_info_t *obj)
|
||||
{
|
||||
|
|
@ -6186,7 +6180,7 @@ int snd_pcm_mmap_begin(snd_pcm_t *pcm,
|
|||
* \brief Application has completed the access to area requested with #snd_pcm_mmap_begin
|
||||
* \param pcm PCM handle
|
||||
* \param offset area offset in area steps (== frames)
|
||||
* \param size area portion size in frames
|
||||
* \param frames area portion size in frames
|
||||
* \return count of transferred frames otherwise a negative error code
|
||||
*
|
||||
* You should pass this function the offset value that
|
||||
|
|
|
|||
|
|
@ -1,10 +1,3 @@
|
|||
/**
|
||||
* \file pcm/pcm_direct.c
|
||||
* \ingroup PCM_Plugins
|
||||
* \brief PCM Direct Stream Mixing (dmix) Plugin Interface
|
||||
* \author Jaroslav Kysela <perex@suse.cz>
|
||||
* \date 2003
|
||||
*/
|
||||
/*
|
||||
* PCM - Direct Stream Mixing
|
||||
* Copyright (c) 2003 by Jaroslav Kysela <perex@suse.cz>
|
||||
|
|
|
|||
|
|
@ -1,10 +1,3 @@
|
|||
/**
|
||||
* \file pcm/pcm_dmix.c
|
||||
* \ingroup PCM_Plugins
|
||||
* \brief PCM Direct Stream Mixing (dmix) Plugin Interface
|
||||
* \author Jaroslav Kysela <perex@suse.cz>
|
||||
* \date 2003
|
||||
*/
|
||||
/*
|
||||
* PCM - Direct Stream Mixing
|
||||
* Copyright (c) 2003 by Jaroslav Kysela <perex@suse.cz>
|
||||
|
|
|
|||
|
|
@ -49,8 +49,10 @@
|
|||
const char *_snd_module_pcm_dmix = "";
|
||||
#endif
|
||||
|
||||
#ifndef DOC_HIDDEN
|
||||
/* start is pending - this state happens when rate plugin does a delayed commit */
|
||||
#define STATE_RUN_PENDING 1024
|
||||
#endif
|
||||
|
||||
/*
|
||||
*
|
||||
|
|
@ -209,6 +211,7 @@ static void mix_areas(snd_pcm_direct_t *dmix,
|
|||
* if no concurrent access is allowed in the mixing routines, we need to protect
|
||||
* the area via semaphore
|
||||
*/
|
||||
#ifndef DOC_HIDDEN
|
||||
#ifdef NO_CONCURRENT_ACCESS
|
||||
#define dmix_down_sem(dmix) snd_pcm_direct_semaphore_down(dmix, DIRECT_IPC_SEM_CLIENT)
|
||||
#define dmix_up_sem(dmix) snd_pcm_direct_semaphore_up(dmix, DIRECT_IPC_SEM_CLIENT)
|
||||
|
|
@ -216,6 +219,7 @@ static void mix_areas(snd_pcm_direct_t *dmix,
|
|||
#define dmix_down_sem(dmix)
|
||||
#define dmix_up_sem(dmix)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/*
|
||||
* synchronize shm ring buffer with hardware
|
||||
|
|
|
|||
|
|
@ -49,8 +49,10 @@
|
|||
const char *_snd_module_pcm_dshare = "";
|
||||
#endif
|
||||
|
||||
#ifndef DOC_HIDDEN
|
||||
/* start is pending - this state happens when rate plugin does a delayed commit */
|
||||
#define STATE_RUN_PENDING 1024
|
||||
#endif
|
||||
|
||||
static void do_silence(snd_pcm_t *pcm)
|
||||
{
|
||||
|
|
@ -575,7 +577,7 @@ static snd_pcm_fast_ops_t snd_pcm_dshare_fast_ops = {
|
|||
* \param pcmp Returns created PCM handle
|
||||
* \param name Name of PCM
|
||||
* \param ipc_key IPC key for semaphore and shared memory
|
||||
* \param ipc_mode IPC permissions for semaphore and shared memory
|
||||
* \param ipc_perm IPC permissions for semaphore and shared memory
|
||||
* \param params Parameters for slave
|
||||
* \param bindings Channel bindings
|
||||
* \param slowptr Slow but more precise pointer updates
|
||||
|
|
|
|||
|
|
@ -387,6 +387,7 @@ static snd_pcm_fast_ops_t snd_pcm_file_fast_ops = {
|
|||
* \param fname Filename (or NULL if file descriptor is available)
|
||||
* \param fd File descriptor
|
||||
* \param fmt File format ("raw" is supported only)
|
||||
* \param perm File permission
|
||||
* \param slave Slave PCM handle
|
||||
* \param close_slave When set, the slave PCM handle is closed with copy PCM
|
||||
* \retval zero on success otherwise a negative error code
|
||||
|
|
|
|||
|
|
@ -111,7 +111,6 @@ typedef struct {
|
|||
((enum sndrv_pcm_state) (hw)->mmap_status->state)
|
||||
#define FAST_PCM_TSTAMP(hw) \
|
||||
((hw)->mmap_status->tstamp)
|
||||
#endif /* DOC_HIDDEN */
|
||||
|
||||
struct timespec snd_pcm_hw_fast_tstamp(snd_pcm_t *pcm)
|
||||
{
|
||||
|
|
@ -122,6 +121,7 @@ struct timespec snd_pcm_hw_fast_tstamp(snd_pcm_t *pcm)
|
|||
res.tv_nsec *= 1000L;
|
||||
return res;
|
||||
}
|
||||
#endif /* DOC_HIDDEN */
|
||||
|
||||
static int sync_ptr1(snd_pcm_hw_t *hw, unsigned int flags)
|
||||
{
|
||||
|
|
@ -1039,6 +1039,8 @@ static snd_pcm_fast_ops_t snd_pcm_hw_fast_ops = {
|
|||
* \param pcmp Returns created PCM handle
|
||||
* \param name Name of PCM
|
||||
* \param fd File descriptor
|
||||
* \param mmap_emulation Boolean flag for mmap emulation mode
|
||||
* \param sync_ptr_ioctl Boolean flag for sync_ptr ioctl
|
||||
* \retval zero on success otherwise a negative error code
|
||||
* \warning Using of this function might be dangerous in the sense
|
||||
* of compatibility reasons. The prototype might be freely
|
||||
|
|
|
|||
|
|
@ -138,6 +138,7 @@ static inline int32_t iec958_to_s32(snd_pcm_iec958_t *iec, u_int32_t data)
|
|||
return (int32_t)data;
|
||||
}
|
||||
|
||||
#ifndef DOC_HIDDEN
|
||||
static void snd_pcm_iec958_decode(snd_pcm_iec958_t *iec,
|
||||
const snd_pcm_channel_area_t *dst_areas,
|
||||
snd_pcm_uframes_t dst_offset,
|
||||
|
|
@ -218,6 +219,7 @@ static void snd_pcm_iec958_encode(snd_pcm_iec958_t *iec,
|
|||
}
|
||||
}
|
||||
}
|
||||
#endif /* DOC_HIDDEN */
|
||||
|
||||
static int snd_pcm_iec958_hw_refine_cprepare(snd_pcm_t *pcm, snd_pcm_hw_params_t *params)
|
||||
{
|
||||
|
|
@ -434,6 +436,8 @@ static snd_pcm_ops_t snd_pcm_iec958_ops = {
|
|||
* \param sformat Slave (destination) format
|
||||
* \param slave Slave PCM handle
|
||||
* \param close_slave When set, the slave PCM handle is closed with copy PCM
|
||||
* \param status_bits The IEC958 status bits
|
||||
* \param preamble_vals The preamble byte values
|
||||
* \retval zero on success otherwise a negative error code
|
||||
* \warning Using of this function might be dangerous in the sense
|
||||
* of compatibility reasons. The prototype might be freely
|
||||
|
|
|
|||
|
|
@ -1117,7 +1117,9 @@ static int snd_pcm_ladspa_build_plugins(struct list_head *list,
|
|||
* \brief Creates a new LADSPA<->ALSA Plugin
|
||||
* \param pcmp Returns created PCM handle
|
||||
* \param name Name of PCM
|
||||
* \param sformat Slave (destination) format
|
||||
* \param ladspa_path The path for LADSPA plugins
|
||||
* \param ladspa_pplugins The playback configuration
|
||||
* \param ladspa_cplugins The capture configuration
|
||||
* \param slave Slave PCM handle
|
||||
* \param close_slave When set, the slave PCM handle is closed with copy PCM
|
||||
* \retval zero on success otherwise a negative error code
|
||||
|
|
|
|||
|
|
@ -924,7 +924,7 @@ snd_pcm_uframes_t snd_pcm_meter_get_boundary(snd_pcm_t *pcm)
|
|||
/**
|
||||
* \brief Set name of a #SND_PCM_TYPE_METER PCM scope
|
||||
* \param scope PCM meter scope
|
||||
* \param name scope name
|
||||
* \param val scope name
|
||||
*/
|
||||
void snd_pcm_scope_set_name(snd_pcm_scope_t *scope, const char *val)
|
||||
{
|
||||
|
|
@ -1147,6 +1147,7 @@ snd_pcm_scope_ops_t s16_ops = {
|
|||
|
||||
/**
|
||||
* \brief Add a s16 pseudo scope to a #SND_PCM_TYPE_METER PCM
|
||||
* \param pcm The pcm handle
|
||||
* \param name Scope name
|
||||
* \param scopep Pointer to newly created and added scope
|
||||
* \return 0 on success otherwise a negative error code
|
||||
|
|
|
|||
|
|
@ -541,7 +541,8 @@ u_int8_t snd_pcm_format_silence(snd_pcm_format_t format)
|
|||
* \brief Silence a PCM samples buffer
|
||||
* \param format Sample format
|
||||
* \param data Buffer
|
||||
* \return samples Samples count
|
||||
* \param samples Samples count
|
||||
* \return 0 if successful or a negative error code
|
||||
*/
|
||||
int snd_pcm_format_set_silence(snd_pcm_format_t format, void *data, unsigned int samples)
|
||||
{
|
||||
|
|
@ -661,7 +662,8 @@ static int linear24_formats[3*2*2] = {
|
|||
* \param width Nominal bits per sample
|
||||
* \param pwidth Physical bit width of the format
|
||||
* \param unsignd Sign: 0 signed, 1 unsigned
|
||||
* \return big_endian Endian: 0 little endian, 1 big endian
|
||||
* \param big_endian Endian: 0 little endian, 1 big endian
|
||||
* \return The matching format type, or #SND_PCM_FORMAT_UNKNOWN if no match
|
||||
*/
|
||||
snd_pcm_format_t snd_pcm_build_linear_format(int width, int pwidth, int unsignd, int big_endian)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -311,12 +311,14 @@ static void snd_pcm_plug_clear(snd_pcm_t *pcm)
|
|||
}
|
||||
}
|
||||
|
||||
#ifndef DOC_HIDDEN
|
||||
typedef struct {
|
||||
snd_pcm_access_t access;
|
||||
snd_pcm_format_t format;
|
||||
unsigned int channels;
|
||||
unsigned int rate;
|
||||
} snd_pcm_plug_params_t;
|
||||
#endif
|
||||
|
||||
static int snd_pcm_plug_change_rate(snd_pcm_t *pcm, snd_pcm_t **new, snd_pcm_plug_params_t *clt, snd_pcm_plug_params_t *slv)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -620,7 +620,7 @@ static int snd_pcm_rate_hw_free(snd_pcm_t *pcm)
|
|||
return snd_pcm_hw_free(rate->gen.slave);
|
||||
}
|
||||
|
||||
int snd_pcm_rate_channel_info(snd_pcm_t *pcm, snd_pcm_channel_info_t * info)
|
||||
static int snd_pcm_rate_channel_info(snd_pcm_t *pcm, snd_pcm_channel_info_t * info)
|
||||
{
|
||||
return snd_pcm_channel_info_shm(pcm, info, -1);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -143,6 +143,20 @@ static int set_sw_params(snd_pcm_t *pcm,
|
|||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Set up a simple PCM
|
||||
* \param pcm PCM handle
|
||||
* \param rate Sample rate
|
||||
* \param channels Number of channels
|
||||
* \param format PCM format
|
||||
* \param subformat PCM subformat
|
||||
* \param latency Latency type
|
||||
* \param access PCM acceess type
|
||||
* \param xrun_type XRUN type
|
||||
* \return 0 if successful, or a negative error code
|
||||
*
|
||||
* \warning The simple PCM API may be broken in the current release.
|
||||
*/
|
||||
int snd_spcm_init(snd_pcm_t *pcm,
|
||||
unsigned int rate,
|
||||
unsigned int channels,
|
||||
|
|
@ -182,6 +196,22 @@ int snd_spcm_init(snd_pcm_t *pcm,
|
|||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Initialize simple PCMs in the duplex mode
|
||||
* \param playback_pcm PCM handle for playback
|
||||
* \param capture_pcm PCM handle for capture
|
||||
* \param rate Sample rate
|
||||
* \param channels Number of channels
|
||||
* \param format PCM format
|
||||
* \param subformat PCM subformat
|
||||
* \param latency Latency type
|
||||
* \param access PCM acceess type
|
||||
* \param xrun_type XRUN type
|
||||
* \param duplex_type Duplex mode
|
||||
* \return 0 if successful, or a negative error code
|
||||
*
|
||||
* \warning The simple PCM API may be broken in the current release.
|
||||
*/
|
||||
int snd_spcm_init_duplex(snd_pcm_t *playback_pcm,
|
||||
snd_pcm_t *capture_pcm,
|
||||
unsigned int rate,
|
||||
|
|
@ -250,6 +280,16 @@ int snd_spcm_init_duplex(snd_pcm_t *playback_pcm,
|
|||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Get the set up of simple PCM
|
||||
* \param pcm PCM handle
|
||||
* \param rate Pointer to store the current sample rate
|
||||
* \param buffer_size Pointer to store the current buffer size
|
||||
* \param period_size Pointer to store the current period size
|
||||
* \return 0 if successful, or a negative error code
|
||||
*
|
||||
* \warning The simple PCM API may be broken in the current release.
|
||||
*/
|
||||
int snd_spcm_init_get_params(snd_pcm_t *pcm,
|
||||
unsigned int *rate,
|
||||
snd_pcm_uframes_t *buffer_size,
|
||||
|
|
|
|||
|
|
@ -124,6 +124,7 @@ static inline int MULTI_DIV_int(int a, unsigned short b)
|
|||
* TODO: use SIMD operations
|
||||
*/
|
||||
|
||||
#ifndef DOC_HIDDEN
|
||||
#define CONVERT_AREA(TYPE) do { \
|
||||
unsigned int ch, fr; \
|
||||
TYPE *src, *dst; \
|
||||
|
|
@ -174,6 +175,8 @@ static inline int MULTI_DIV_int(int a, unsigned short b)
|
|||
break; \
|
||||
}
|
||||
|
||||
#endif /* DOC_HIDDEN */
|
||||
|
||||
/* 2-channel stereo control */
|
||||
static void softvol_convert_stereo_vol(snd_pcm_softvol_t *svol,
|
||||
const snd_pcm_channel_area_t *dst_areas,
|
||||
|
|
@ -592,7 +595,9 @@ static snd_pcm_ops_t snd_pcm_softvol_ops = {
|
|||
* \param pcmp Returns created PCM handle
|
||||
* \param name Name of PCM
|
||||
* \param sformat Slave format
|
||||
* \param card card index of the control
|
||||
* \param ctl_card card index of the control
|
||||
* \param ctl_id The control element
|
||||
* \param cchannels PCM channels
|
||||
* \param min_dB minimal dB value
|
||||
* \param resolution resolution of control
|
||||
* \param slave Slave PCM handle
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue