Age | Commit message (Collapse) | Author |
|
pcm_mmap_transfer() will be rewritten. Put together
functions related to mmap transfer.
Signed-off-by: Ricardo Biehl Pasquali <pasqualirb@gmail.com>
|
|
Use pcm_avail_update(), check avail for timestamp
coherence.
Signed-off-by: Ricardo Biehl Pasquali <pasqualirb@gmail.com>
|
|
pcm_get_htimestamp() will be rewritten. Place it after
pcm_avail_update(), which will be used in the rewrite.
Signed-off-by: Ricardo Biehl Pasquali <pasqualirb@gmail.com>
|
|
Instead of sending appl_ptr and avail_min to the kernel,
get them. This is the behavior of alsa-lib.
Signed-off-by: Ricardo Biehl Pasquali <pasqualirb@gmail.com>
|
|
When hardware pointer update is requested and status
structure is mmaped, call HWSYNC ioctl.
Signed-off-by: Ricardo Biehl Pasquali <pasqualirb@gmail.com>
|
|
Hardware pointer should not be updated in available
calculation.
Signed-off-by: Ricardo Biehl Pasquali <pasqualirb@gmail.com>
|
|
It's not necessary to send appl_ptr or avail_min to the
kernel here.
In prepare action, called later in pcm_open(), appl_ptr
becomes zero.
avail_min is already defined in software parameters.
Signed-off-by: Ricardo Biehl Pasquali <pasqualirb@gmail.com>
|
|
appl_ptr becomes zero in prepare action. avail_min is the
same as when it was set in software parameters.
Signed-off-by: Ricardo Biehl Pasquali <pasqualirb@gmail.com>
|
|
It is not needed.
As the pcm structure is opaque to user it can be safely
removed.
Signed-off-by: Ricardo Biehl Pasquali <pasqualirb@gmail.com>
|
|
Prepare is done in pcm_open().
Signed-off-by: Ricardo Biehl Pasquali <pasqualirb@gmail.com>
|
|
Start is done by kernel when start_threshold or more frames
are requested.
Signed-off-by: Ricardo Biehl Pasquali <pasqualirb@gmail.com>
|
|
Signed-off-by: Ricardo Biehl Pasquali <pasqualirb@gmail.com>
|
|
The state cannot be assumed as RUNNING after a write
because start_threshold may not have elapsed.
Signed-off-by: Ricardo Biehl Pasquali <pasqualirb@gmail.com>
|
|
Signed-off-by: Ricardo Biehl Pasquali <pasqualirb@gmail.com>
|
|
This eliminates the need for prepare in transfer functions
and pcm_start().
Signed-off-by: Ricardo Biehl Pasquali <pasqualirb@gmail.com>
|
|
|
|
|
|
When pcm device is linked to other pcm device,
the start call may be triggered by other pcm device.
Handle this condition by checing pcm state before start call.
Signed-off-by: Miguel Gaio <mgaio35@gmail.com>
|
|
It is valid to get null sync_ptr on dma mmap coherent architecture.
In this case pcm_sync_ptr() is a nop.
Signed-off-by: Miguel Gaio <mgaio35@gmail.com>
|
|
As per comment, on success, pcm_writei returns the number of frames written.
Fix the case of pcm not running.
Signed-off-by: Miguel GAIO <mgaio35@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
This function parses a PCM name similar to the ALSA library.
This is done so that the differences between alsa-lib and tinyalsa
are a little more transparent to the user.
|
|
The link function is necessary for time sychronization between multiple PCMs.
|
|
|
|
pcm_readi and pcm_writei now use a frame count to specify the
buffer length instead of using a byte count.
|
|
Added these functions to replace pcm_read and pcm_write, which don't return the number of frames actually transferred.
On GCC-like compilers, pcm_read and pcm_write have been marked as deprecated
On doxygen documentation, they have been marked as deprecated as well.
|
|
Added functions:
- pcm_get_channels
- pcm_get_rate
- pcm_get_format
These were added since they're required for iterating samples and frames.
|
|
pcm_get_file_descriptor
pcm_get_error
pcm_get_buffer_size
pcm_frames_to_bytes
pcm_bytes_to_frames
pcm_get_subdevice
|
|
|
|
Added const specifier to the struct pcm_config argument.
Changed the way default values of the config structure are set and accessed.
They're accessed through the pointer from the argument list and set through the pointer in the pcm structure.
|
|
Functions changed are:
- pcm_params_get_mask
- pcm_params_get_min
- pcm_params_get_max
- param_get_mask
- param_get_min
- param_get_max
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
If users want to use only pcm.c or mixer.c
they can. It's not necessary to include
tinyalsa/asoundlib.h because mixer.c doesn't
use pcm.h and pcm.c doesn't use mixer.h.
|
|
|
|
|