mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2026-02-05 04:06:34 -05:00
The Advanced Linux Sound Architecture (ALSA) - library
I noticed that some plugin codes have no proper PCM state checks and it results in expected outcomes. For example, when snd_pcm_drain() is called for a dmix PCM after calling snd_pcm_drop(), it stalls unexpectedly. It's just because its drain callback doesn't expect the SND_PCM_SETUP state. We can fix such a bug in each place one by one, but a safer way would be to filter out all such cases commonly in the PCM API functions themselves. This patch adds the PCM state sanity checks to major API functions so that they return -EBADFD when called in the unexpected PCM states. As well as for the thread-safety extension, it'd be a question of the performance; again at this time, the hw PCM is considered as an exception, and it has pcm->own_state_check flag set, which means that the common PCM state checks are skipped. Signed-off-by: Takashi Iwai <tiwai@suse.de> |
||
|---|---|---|
| alsalisp | ||
| aserver | ||
| doc | ||
| include | ||
| m4 | ||
| modules | ||
| src | ||
| test | ||
| utils | ||
| .gitignore | ||
| acinclude.m4 | ||
| ChangeLog | ||
| configure.ac | ||
| COPYING | ||
| gitcompile | ||
| INSTALL | ||
| Makefile.am | ||
| MEMORY-LEAK | ||
| NOTES | ||
| TODO | ||