From: Jerome Forissier <jerome@taodyne.com>
To: alsa-devel@alsa-project.org
Cc: Jerome Forissier <jerome@taodyne.com>
Subject: [PATCH 0/2] Fix thread safety issues
Date: Wed, 30 Jan 2013 16:22:15 +0100 [thread overview]
Message-ID: <1359559337-15533-1-git-send-email-jerome@taodyne.com> (raw)
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
next reply other threads:[~2013-01-30 15:22 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-30 15:22 Jerome Forissier [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1359559337-15533-1-git-send-email-jerome@taodyne.com \
--to=jerome@taodyne.com \
--cc=alsa-devel@alsa-project.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).