Age | Commit message (Collapse) | Author |
|
Update the mixer framework to support plugins. Add ability for physical
card to have either kernel registered mixer controls or plugin
registered mixer control or both. Split mixer controls into two groups,
one for kernel registered (hw_grp) and the other for plugin registered
(virtual_grp).
Signed-off-by: Rohit kumar <rohitkr@codeaurora.org>
Signed-off-by: Bhalchandra Gajare <gajare@codeaurora.org>
|
|
Update the pcm framework to support plugins. Resolve the pcm device node
to be either kernel device or virtual device and setup function pointers
accordingly. Implement framework functionality for pcm_plugin.c for ease
of plugin development. Plugin itself is compiled as shared object (.so)
and dynamically linked from pcm_plugin.c.
Signed-off-by: Bhalchandra Gajare <gajare@codeaurora.org>
Signed-off-by: Rohit kumar <rohitkr@codeaurora.org>
|
|
Using MMAP APIs, this parameter wake up application
when 'avail_min' samples are availables.
When audio processing expects exactly a full period size samples,
the default parameter to 1 burns CPU until the full period available.
Fix SW params.avail parameter to period size value.
Signed-off-by: Miguel GAIO <mgaio35@gmail.com>
|
|
pcm: Allow to wait if capture is not running
|
|
Signed-off-by: Lucas Tanure <tanure@linux.com>
|
|
This allows starting capture from another thread.
See the commit 932a81519572 ("ALSA: pcm: Comment why read
blocks when PCM is not running") in Linux kernel.
Signed-off-by: Ricardo Biehl Pasquali <pasqualirb@gmail.com>
|
|
Easier Version Specification
|
|
SUBFORMAT is always zero.
SAMPLE_BITS and FRAME_BITS are refined by ALSA based on the
already set FORMAT and CHANNELS.
Signed-off-by: Ricardo Biehl Pasquali <pasqualirb@gmail.com>
|
|
Changed order of operations to preserve the precision during the division.
|
|
|
|
Signed-off-by: Ricardo Biehl Pasquali <pasqualirb@gmail.com>
|
|
Signed-off-by: Ricardo Biehl Pasquali <pasqualirb@gmail.com>
|
|
Signed-off-by: Ricardo Biehl Pasquali <pasqualirb@gmail.com>
|
|
Group read/write transfer into pcm_rw_transfer().
Create pcm_generic_transfer() for read/write and mmap
transfer modes. This recovers from xrun and suspended.
Signed-off-by: Ricardo Biehl Pasquali <pasqualirb@gmail.com>
|
|
A generic transfer function will be created. Put together
functions related to it.
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>
|
|
Make pcm_mmap_transfer() compatible with read/write IO.
start_threshold check was not valid for capture.
pcm->running checks were removed.
NOIRQ fallback was removed. Clocks of sound devices may
differ from the system, leading to desynchronization.
Signed-off-by: Ricardo Biehl Pasquali <pasqualirb@gmail.com>
|
|
Signed-off-by: Ricardo Biehl Pasquali <pasqualirb@gmail.com>
|
|
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>
|
|
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|