Age | Commit message (Collapse) | Author |
|
When starting the stream we're doing the same as a start()
|
|
pcm: Constify write buffers
|
|
Topic/params - add parameters to select card, etc.
|
|
Mark the write buffers as const - they won't be modified and this is
friendlier to applications.
|
|
Command-line arguments are added for:
tinyplay and tinycap:
-D n -- card number
-p n -- period size
-n n -- number of periods per buffer
tinymix:
-D n -- card number
Signed-off-by: Gabriel M. Beddingfield <gabrbedd@ti.com>
|
|
In several places, argv is incremented and *argv is dereferenced
without checking to see if it is valid to do so. This could lead to a
buffer overrun if the user provides invalid parameters.
This patch generally changes this:
if (strcmp(*argv, "-r") == 0) {
argv++;
rate = atoi(*argv);
}
argv++;
To this:
if (strcmp(*argv, "-r") == 0) {
argv++;
if (*argv)
rate = atoi(*argv);
}
if (*argv)
argv++;
Signed-off-by: Gabriel M. Beddingfield <gabrbedd@ti.com>
|
|
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
|
|
Use existing routines to read BYTE controls. Somewhat inefficient
since an ioctl is done for every byte, some caching in intermediate
fields would be beneficial.
|
|
Comment on buffer size was wrong. Argument to bytes_to_frames
is bytes, not frames
|
|
Add mmap playback and no period IRQ support to pcm core.
|
|
|
|
Change-Id: I8f04a5dec575bf20459968fb1f181071ae856ed0
|
|
Change-Id: Ia7a34033262316e2b8034782af5f59e013dd77f3
|
|
Fixes tinyplay and tinycap after a recent change to allow
threasholds to be set in the pcm module.
|
|
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.
|
|
Add a extern "C" controlled by an #ifdef __cplusplus directive so that this
header can be included from C++ code without having to explicitly control the
linkage.
|
|
|
|
Otherwise we just list a device with zero controls which isn't the most
obvious failure mode.
|
|
Android.mk: Disable prelinking by default
|
|
include: Add a local asound.h to allow build with current public releases
|
|
pcm_get_htimestamp() returns the number of available frames
in the kernel driver buffers as well as the corresponding
high resolution time stamp.
|
|
Support building out of the box on Android releases that don't have this
library in their prelink map.
|
|
Bionic does not ship a copy of asound.h and it should do no harm to have
a local copy here.
|
|
|
|
This adds a utility to capture audio with a specified number of
parameters. Capturing continues until a signal is received
(ctrl-c).
Contains some contributions from Chris Kelly <c-kelly@ti.com>
|
|
This is essential for streams such as loopback devices that
do not transfer data.
|
|
|
|
Remove the use of the errno variable and instead return errors
directly where appropriate.
|
|
|
|
|
|
|
|
- re-add function to set enum type by string
- implement setting of mixer values in tinymix
- fix bug: read current mixer values before writing
|
|
- simplify interface for setting/getting enum values
- implement enum string get function
- update tinymix to deal with enums
- rename set/get_int functions because of supported types
|
|
- support get/set of multiple values
- add parameter checking to functions
- add api function to get control type
- add tinymix utility to list mixer controls
|
|
- Add to Android.mk
- Add "all" rule to Makefile
- Remove redundant old play code from tinyplay.c
- Add error checking to tinyplay
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|