mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-10-28 05:40:23 -04:00
The Advanced Linux Sound Architecture (ALSA) - library
snd_pcm_avail_delay() is expected to report avail and delay values in atomic fashion. However the function does two separate syscalls and it cannot guarantee the avail value is the same as was used to calculate the delay. This is a problem as the reported delay is always relative to avail frames value. If application (like e.g. alsa_conformance_test) uses snd_pcm_avail_delay() to estimate the effective play position, it can observe bogus delay values (and effective play position going backwards) if snd_pcm_avail_delay() is called during a DMA burst where hw_ptr moves quickly. This commit adds a loop similar to that used in snd_pcm_hw_htimestamp() to wait until we get a stable avail reading, and only then extract the delay. This will avoid bogus values if function is called during DMA bursts. Closes: https://github.com/alsa-project/alsa-lib/pull/469 Closes: https://github.com/alsa-project/alsa-lib/issues/468 Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Signed-off-by: Jaroslav Kysela <perex@perex.cz> |
||
|---|---|---|
| .github/workflows | ||
| aserver | ||
| doc | ||
| include | ||
| m4 | ||
| modules | ||
| src | ||
| test | ||
| utils | ||
| .gitignore | ||
| acinclude.m4 | ||
| ChangeLog | ||
| configure.ac | ||
| COPYING | ||
| gitcompile | ||
| INSTALL | ||
| Makefile.am | ||
| MEMORY-LEAK | ||
| NOTES | ||
| README.md | ||
| TODO | ||
alsa-lib
Advanced Linux Sound Architecture (ALSA) project
The alsa-lib is a library to interface with ALSA in the Linux kernel and virtual devices using a plugin system.
The up-to-date reference generated from sources can be accessed here:
http://www.alsa-project.org/alsa-doc/alsa-lib/
You may give a look for more information about the ALSA project to URL http://www.alsa-project.org.
Submitting patches
The preferred way to submit patches is by sending them by email to the alsa-devel mailing list. Sending mail to the list requires subscription, subscribe here: https://mailman.alsa-project.org/mailman/listinfo/alsa-devel
Add Takashi Iwai <tiwai@suse.de> and/or Jaroslav Kysela <perex@perex.cz> to
Cc so that your patch won't be missed.
Patches are also accepted as GitHub pull requests.