| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
|
|
|
|
|
|
|
| |
Correct the dlsym_name string for nested macros. See Fixes:.
Fixes: https://github.com/alsa-project/alsa-lib/issues/316
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
|
|
|
|
|
| |
Fixes: https://github.com/alsa-project/alsa-lib/issues/318
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
|
|
|
|
| |
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
|
|
|
|
|
|
|
|
|
| |
The silence size cannot exceed the silence threshold. Move the check
from the manual condition to the common code. This may happen for
small ring buffers (where the 1/10th second is too large).
Suggested-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
|
|
|
|
|
|
|
| |
There really isn't much of a point to clutter the files with this.
Signed-off-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
|
|
|
|
|
| |
Signed-off-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
|
|
|
|
|
|
|
|
| |
Add possibility to return -EINTR instead waiting for the event. The
applications may want to handle -EINTR condition themselves.
BugLink: https://github.com/alsa-project/alsa-lib/issues/228
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
|
|
|
|
|
|
|
|
| |
Add possibility to return -EINTR instead waiting for the event. The
applications may want to handle -EINTR condition themselves.
BugLink: https://github.com/alsa-project/alsa-lib/issues/228
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The snd_pcm_wait() function is called also internally from
the various plugins to wait for the drain with -1 and from i/o
routines in pcm.c.
Define two special negative timeout values to distinguish the
drain and i/o wait and calculate the maximal timeout according
the wait place.
Fixes: https://github.com/alsa-project/alsa-lib/issues/228
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
|
|
|
|
| |
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
|
|
|
|
|
|
|
|
|
|
| |
The application may not require to touch the playback
sample stream for the drain operation at all. In this case,
the application is responsible to setup a silencing mechanism
for the playback or another graceful stop (like using the
rewind operation).
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
|
|
|
|
|
|
|
|
|
| |
Handle the driver informing us that it is not necessary to set up
silencing upon playback draining. This will be the case for drivers
which are guaranteed to not read any samples beyond the application
pointer.
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
|
|
|
|
|
|
|
| |
# Add silence in drain (-1 = auto /default/, 0 = off, > 0 milliseconds)
[drain_silence INT]
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Some applications may not alignt transfers to the period size
and also the driver developers may not follow the consequeces of the
access beyond valid samples in the playback DMA buffer.
To avoid clicks, fill a little silence at the end of the playback
ring buffer when snd_pcm_drain() is called.
Related: https://lore.kernel.org/alsa-devel/20230420113324.877164-2-oswald.buddenhagen@gmx.de/
Related: https://lore.kernel.org/alsa-devel/20230405201219.2197789-2-oswald.buddenhagen@gmx.de/
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
|
|
|
|
|
|
| |
Fixes: https://github.com/alsa-project/alsa-lib/pull/301/
Signed-off-by: Maxython <mixython@gmail.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
|
|
|
|
|
| |
BugLink: https://lore.kernel.org/alsa-devel/167734349294.22.1388671545195719262@mailman-web.alsa-project.org/
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
|
|
|
|
|
|
|
|
|
|
|
|
| |
- rename devname -> pcmdev, it conflicts *BSD <stdlib.h> function
- replace <values.h> -> <limits.h> and fix K&R style related warning
- use config.h to determine include <malloc.h>
- add OpenBSD support and fix printf() warning
- fix warning
Fixes: https://github.com/alsa-project/alsa-lib/pull/298
Signed-off-by: SASANO Takayoshi <uaa@uaa.org.uk>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
|
|
|
|
|
|
| |
Fixes: https://github.com/alsa-project/alsa-lib/pull/298
Signed-off-by: SASANO Takayoshi <uaa@uaa.org.uk>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
|
|
|
|
|
|
|
|
|
|
|
| |
NetBSD and OpenBSD has no libdl
FreeBSD and DragonFlyBSD has libdl but dummy
These OSes are no need to use -ldl to use dlopen()
Fixes: https://github.com/alsa-project/alsa-lib/pull/290
Signed-off-by: SASANO Takayoshi <uaa@uaa.org.uk>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
|
|
|
|
|
|
|
|
|
|
| |
The isse was introduced in commit 7f2d6c3
Fixes: 7f2d6c3a ("pcm: hw: change rate range syntax")
Fixes: https://github.com/alsa-project/alsa-lib/issues/271
Fixes: https://github.com/alsa-project/alsa-lib/pull/293
Signed-off-by: Gunnar Dibbern <gunnar.dibbern@lht.dlh.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
|
|
|
|
|
|
|
|
|
|
| |
snd_soc_tplg_dapm_widget has ignore_suspend field, but there is no way
to set value for it, because we don't parse topology field for it.
Fix this by adding parsing code.
Fixes: https://github.com/alsa-project/alsa-lib/pull/230
Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
|
|
|
|
|
|
|
|
|
| |
Previous patch added build support for ignore_suspend, however it should
be also possible to decompile binary back to human readable form and not
lose data.
Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
|
|
|
|
|
|
|
|
|
|
|
|
| |
XXX_VOICE_WAKEUP also known as 'ignore_suspend' is already processed by
kernel in soc-topology, but there is no way of setting it via topology
file like it's the case for other flags. Fix this by adding it to pcm,
dai and link parsing mechanism.
Signed-off-by: Piotr Maziarz <piotrx.maziarz@intel.com>
Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
|
|
|
|
|
|
|
|
|
|
| |
Clang 16 makes -Wimplicit-function-declaration an error by default
and it's easier to just explicitly include <stdlib.h> rather
than hope the ALSA headers always have it.
Fixes: https://github.com/alsa-project/alsa-lib/pull/278
Signed-off-by: Sam James <sam@gentoo.org>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
|
|
|
|
|
| |
Fixes: c083417b ("ucm: simplify and fix the previous patch (geti)")
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
|
|
|
|
|
|
|
|
|
|
|
| |
Use macro to maintain only one code. The status may be 0 or 1 - handle
both values correctly.
Also, fix the possible memory leak in snd_use_case_geti() - string
str should be freed even when the error is returned.
Fixes: 436cd5b6 ("ucm: add existence checks to geti calls")
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Right now in snd_use_case_geti you cannot tell if the item being queried
exists or not when being checked. This also means the only way to check
for the existence of something in the client of the library is to
iterate over the list of mods/devs even if we know exactly the name we
are looking for. We have functions that do exactly this internally so
lets return this information in a logical fashion through geti.
Also clean up some trailing white space nearby.
Signed-off-by: Curtis Malainey <cujomalainey@chromium.org>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
|
|
|
|
| |
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Wrap last_commit_ptr using boundary. Was just wrapped to 0, which is
correct only if the buffer size, and hence the boundary, is an integer
multiple of the period size.
Fixes: 467d69c5bc1 ("Fix CPU hog with combination of rate plugin")
Fixes: 29041c52207 ("fix infinite draining of the rate plugin in SND_PCM_NONBLOCK mode")
Link: https://lore.kernel.org/alsa-devel/20221230164814.901457-1-consult.awy@gmail.com/
Signed-off-by: Alan Young <consult.awy@gmail.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
|
|
|
|
|
| |
Link: https://lore.kernel.org/alsa-devel/f9a7ad6a256d4ad7a31642dcf875d436@axis.com/
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
|
|
|
|
| |
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
|
|
|
|
| |
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
|
|
|
|
|
|
|
|
|
|
| |
This code was commited by mistake. It was used for testing
of ALSA_PCM_OLD_HW/SW_PARAMS_API.
BugLink: https://github.com/thesofproject/sof/issues/6667
Related-to: 78b20e3c ("test: latency - use snd_pcm_format_physical_width()")
Reported-by: Jaska Uimonen <jaska.uimonen@linux.intel.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
|
|
|
|
| |
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
|
|
|
|
| |
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
|
|
|
|
| |
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
|
|
|
|
| |
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
|
|
|
|
| |
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
|
|
|
|
|
|
| |
- do full reset in snd_use_case_mgr_reload
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
|
|
|
|
|
|
|
| |
- remove first capture pos line
- measure the snd_pcm_start() call, too
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add '-x' and '-X' tests and '-U' - I/O update mode based
on the system timing.
It may be required to check the position updates for the specific hardware.
Print the real time / stream time differences.
Also include code to make valgrind happy (including the wrong memory
llocation for the stream buffer).
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
|
|
|
|
|
|
|
| |
The fast_ops callback invocation must always pass the fast_op_arg
as the pcm argument. Plugins expect that.
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
|
|
|
|
|
|
|
| |
We need to allocate frames using the physical size not
the sample bit size.
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
|
|
|
|
|
|
|
|
| |
Use the symver function attribute for newer gccs (version 11+).
The symver function attribute was introduced probably earlier
(gcc-10). We can fix that on demand later.
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
|
|
|
|
|
|
| |
Make the header file more readable and error prone.
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
|
|
|
|
|
|
|
|
|
|
| |
The previous fix in aa4f56c3 was not correct. The root of the cause is
implementation in snd_pcm_may_wait_for_avail_min() inline function
where the improper pcm argument is passed to the fast_ops function.
Fixes: aa4f56c3 ("pcm: rate - fix the crash in snd_pcm_rate_may_wait_for_avail_min()")
Fixes: d9dbb57b ("pcm: rate - rewrite the may_wait_for_avail_min callback for the rate plugin")
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The pcm argument passed to the conversion function in
snd_pcm_plugin_may_wait_for_avail_min_conv() should be
pcm->fast_op_arg.
Test command: arecord -Dplughw:x -r12000 -c2 -fS16_LE -M temp.wav
Fixes: d9dbb57b ("pcm: rate - rewrite the may_wait_for_avail_min callback for the rate plugin")
BugLink: https://lore.kernel.org/alsa-devel/1667793912-18957-1-git-send-email-shengjiu.wang@nxp.com/
Fixes: https://github.com/alsa-project/alsa-lib/issues/282
Reported-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
|
|
|
|
|
| |
Reported-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
|
|
|
|
| |
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
|