Age | Commit message (Collapse) | Author |
|
|
|
Chmap mixer support
|
|
For mixer controls with same name and different device number, there
is no clarity in tinymix output. Print device number along with
mixer control name to distinguish between mixer controls with
same name.
|
|
Mixer control such as "Playback channel map" can be registered by
multiple pcm device nodes and is distinguished by device in
snd_ctl_elem_id. Add support to get the control handle associated
with mixer ctl name and device number.
Also, introduce API to get the device number associated with specific
mixer_ctl handle.
|
|
Support pcm drain ops
|
|
Signed-off-by: Guodong Hu <quic_guodhu@quicinc.com>
|
|
tinyplay: fix playback of 24-bit and 8-bit pcm
|
|
The bits-to-format function returned bool, which happened to work
for PCM_FORMAT_S16_LE (0) and PCM_FORMAT_S32_LE (1). However, all
other formats were incorrectly mapped to PCM_FORMAT_S32_LE. Return
enum pcm_format instead.
|
|
pcm: Propagate error message to the bad_pcm in case of failure
|
|
Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com>
|
|
mmap support in tinycap
|
|
Added mmap (-M option) support to tinycap utility. This is necessary for some hardware to work (e.g. Plugable HDMI capture card with USB ID 1bcf:2c99).
|
|
match the boundary type with kernel driver
|
|
1. Remove calculation of boundary and retrieve boundary from ALSA
kernel. Also fix type when getting available and advance appl_ptr.
2. Fix avail in pcm_mmap_transfer getting overflow.
3. Fix typo.
|
|
Fixed bug with main analysis loop
|
|
|
|
include time.h before asound.h
|
|
Include time.h before asound.h to avoid the following build failure on
musl that was already fixed a long time with
https://github.com/tinyalsa/tinyalsa/commit/c8333f8c7a4e4b9549abeef7530b2cd20a18e537
but reappeared on version 2.0.0:
In file included from ../src/pcm_hw.c:42:
/home/peko/autobuild/instance-1/output-1/host/i586-buildroot-linux-musl/sysroot/usr/include/sound/asound.h:444:18: error: field 'trigger_tstamp' has incomplete type
444 | struct timespec trigger_tstamp; /* time when stream was started/stopped/paused */
| ^~~~~~~~~~~~~~
Fixes:
- http://autobuild.buildroot.org/results/a75e23dc585bd071f4d65face5489ed6ac22edbe
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
|
Fix a type issue and a mixer control issue.
|
|
|
|
Since the variables are snd_pcm_uframes_t and snd_pcm_uframes_t is
unsigned long, using unsigned int causes problem when running on a
64-bit binary.
Also fix the branch name of googletest.
|
|
fix strncpy potential bug
|
|
|
|
fix strncpy warnings
|
|
|
|
mixer: fix index underflow when index=0
|
|
In mixer_get_ctl_by_name_and_index(), the post-fix decrement
means that the index will be decremented after the comparison, but
before the return, leading to an unsigned integer underflow.
This causes a crash on platforms with -fsanitize=integer enabled.
Fix this by avoiding decrementing index until after the return.
Change-Id: I25a17ced4185bdebd500285bd30b342b16b4ac12
|
|
meson: add attributes.h and plugin.h public headers
|
|
|
|
update NOTICE file and format license header
|
|
|
|
fix the remaining bytes bug (#209) and refactoring tinyplay
|
|
fix the zero fd closing problem
|
|
The pcm_hw_close refused to close the zero fd. Add "equal to"
condition and modify the type of fd to int to close the zero fd.
|
|
|
|
tinyalsa: Add sample pcm/mixer plugin and sample sndcardparser
|
|
|
|
|
|
|
|
force pcm_open to open device with the non-blocking flag
|
|
When a client opens a PCM device whose substreams are all occupied
without the non-blocking flag, the open function would be blocked in
the kernel until the previous opened ones are closed. This would
cause deadlock if they try to hold the same lock. Most of the ALSA
PCM drivers on embedded systems are implemented with the ALSA SOC
framework. Each PCM device has only one substream. This problem would
happen frequently. To force pcm_open to open PCM devices with
non-blocking flag is beneficial to resolve this problem. It returns
the control to clients to try again later.
The reason why we don't call pcm_open with PCM_NONBLOCK is that the
PCM_NONBLOCK also affects the read and write behaviors.
I also add a test case to test whether the pcm_open would be blocked.
|
|
Fix compatible issue and refine null parameters checking
|
|
There are some drivers assigning wrong ranges of mixer control's values.
Let ALSA drivers to check whether values are in ranges.
|
|
|
|
|
|
fix a variable name in tests
|
|
|
|
floating-point PCM support
|
|
This change also fixes overwriting the appl_ptr and avail_min when calling
the pcm_state function.
|
|
|