alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] Fix thread safety issues
@ 2013-01-30 15:22 Jerome Forissier
  2013-01-30 15:22 ` [PATCH 1/2] Make snd_device_name_hint() thread-safe by locking a mutex Jerome Forissier
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Jerome Forissier @ 2013-01-30 15:22 UTC (permalink / raw)
  To: alsa-devel; +Cc: Jerome Forissier

This is a set of two patches to fix thread safety issues I found when running
a video application over ALSA. The application uses LibVLC to play several
videos simultaneously. LibVLC calls snd_pcm_open() and snd_device_name_hint()
from multiple threads, without locking--which is allowed according to
http://www.alsa-project.org/main/index.php/SMP_Design.

Without these patches, I would get random error messages like:

ALSA lib confmisc.c:768:(parse_card) cannot find card '$CARD'
ALSA lib conf.c:4184:(_snd_config_evaluate) function snd_func_card_driver returned error: No such device
ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings
ALSA lib conf.c:4184:(_snd_config_evaluate) function snd_func_concat returned error: No such device
ALSA lib confmisc.c:1251:(snd_func_refer) error evaluating name
ALSA lib conf.c:4184:(_snd_config_evaluate) function snd_func_refer returned error: No such device
ALSA lib conf.c:4663:(snd_config_expand) Evaluate error: No such device

Jerome Forissier (2):
  Make snd_device_name_hint() thread-safe by locking a mutex
  snd_pcm_direct_parse_open_conf(): use thread-safe getgrnam_r()

 src/control/namehint.c | 31 +++++++++++++++++++++++++++++++
 src/pcm/pcm_direct.c   | 15 +++++++++++----
 2 files changed, 42 insertions(+), 4 deletions(-)

-- 
1.8.1.2

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2013-01-31 11:38 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-30 15:22 [PATCH 0/2] Fix thread safety issues Jerome Forissier
2013-01-30 15:22 ` [PATCH 1/2] Make snd_device_name_hint() thread-safe by locking a mutex Jerome Forissier
2013-01-30 15:22 ` [PATCH 2/2] snd_pcm_direct_parse_open_conf(): use thread-safe getgrnam_r() Jerome Forissier
2013-01-30 16:03 ` [PATCH 0/2] Fix thread safety issues Takashi Iwai
2013-01-30 18:13   ` Jérôme Forissier
2013-01-31  8:54     ` Takashi Iwai
2013-01-31  9:48       ` Jérôme Forissier
2013-01-31 10:09         ` Takashi Iwai
2013-01-31 11:38           ` Jaroslav Kysela

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).