From: Takashi Iwai <tiwai@suse.de>
To: Jerome Forissier <jerome@taodyne.com>
Cc: alsa-devel@alsa-project.org
Subject: Re: [PATCH 0/2] Fix thread safety issues
Date: Wed, 30 Jan 2013 17:03:59 +0100 [thread overview]
Message-ID: <s5hfw1i64k0.wl%tiwai@suse.de> (raw)
In-Reply-To: <1359559337-15533-1-git-send-email-jerome@taodyne.com>
At Wed, 30 Jan 2013 16:22:15 +0100,
Jerome Forissier wrote:
>
> 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.
The fix for snd_pcm_direct_parse_open_conf() looks good. I'm going to
apply this now.
snd_device_name_hint() should use snd_config_update_r() and pass the
local config space to others instead of snd_config.
thanks,
Takashi
>
> 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
>
> _______________________________________________
> Alsa-devel mailing list
> Alsa-devel@alsa-project.org
> http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
>
next prev parent reply other threads:[~2013-01-30 16:04 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
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 ` Takashi Iwai [this message]
2013-01-30 18:13 ` [PATCH 0/2] Fix thread safety issues 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=s5hfw1i64k0.wl%tiwai@suse.de \
--to=tiwai@suse.de \
--cc=alsa-devel@alsa-project.org \
--cc=jerome@taodyne.com \
/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).