Age | Commit message (Collapse) | Author |
|
This enables the capabilities of any given PCM to be queried.
Created with input from Priyesh Bisla and Gabriel Beddingfield.
|
|
|
|
|
|
|
|
Default start threshold was set to the same value (half of the buffer size)
for playback and capture in pcm_open(). The normal default value for capture
should be 1 frame.
|
|
- Otherwise, read will be tried even after pcm_start is failed.
This leads into blocking inside the read ioctl forever.
pcm_start can fail, for example in full-speed USB audio device,
in some H/W, due to the lack of bandwidth in USB bus,
|
|
Add a flag which can be passed to pcm_open (called PCM_NORESTART).
When set on a playback stream, calls to pcm_write will not
automatically attempt to restart an ALSA device in the case of an
underflow. Instead, it will propagate the first EPIPE error up to the
application to allow it to handle the underflow situation. Subsequent
calls to pcm_write will attempt to start the pipeline.
|
|
When starting the stream we're doing the same as a start()
|
|
pcm: Constify write buffers
|
|
Mark the write buffers as const - they won't be modified and this is
friendlier to applications.
|
|
The following code:
while (pcm->boundary * 2 <= LONG_MAX - pcm->buffer_size)
pcm->boundary *= 2;
Creates an infinite loop on systems where LONG_MAX != INT_MAX
(e.g. 64-bit systems). pcm->boundary is an unsigned int, and so
INT_MAX is the proper value to use.
|
|
Commit ee9ba87d modified the stop threshold for capture and
playback and caused pcm samples to be dropped during capture.
Restore initial stop threshold for capture and leave new value
for playback.
|
|
pcm_get_htimestamp() should return an error if stream state is not
running or draining as the time stamp returned by the driver is not
valid in other states.
Change-Id: Icdfe9554b26f57119d7a8d762a6ea6e8e3eaf370
|
|
The changes made for mmap mode broke the underrun detection by
pushing the stop_threshold beyong the buffer size.
This caused the hw_ptr to go past the app_ptr and
pcm_get_htimestamp() to report wrong values in case of underrun.
Change-Id: Ic671fdd09f3afb8a301a391b48788fd9bc99322d
|
|
Add mmap playback and no period IRQ support to pcm core.
|
|
Add the ability to explicitly set start, stop and silence thresholds during
tinyalsa's pcm_open. Setting any of these values to 0 in your pcm_config
structure will cause the system to use its old defaults.
|
|
pcm_get_htimestamp() returns the number of available frames
in the kernel driver buffers as well as the corresponding
high resolution time stamp.
|
|
This is essential for streams such as loopback devices that
do not transfer data.
|
|
|
|
|
|
|
|
|
|
|