From: Takashi Iwai <tiwai@suse.de>
To: Stas Sergeev <stsp@aknet.ru>
Cc: ALSA devel <alsa-devel@alsa-project.org>
Subject: Re: snd_pcsp locking mess
Date: Tue, 21 Oct 2008 09:16:43 +0200 [thread overview]
Message-ID: <s5htzb68lk4.wl%tiwai@suse.de> (raw)
In-Reply-To: <48FD7FE1.8000909@aknet.ru>
At Tue, 21 Oct 2008 11:08:17 +0400,
Stas Sergeev wrote:
>
> Hi.
>
> Takashi Iwai wrote:
> > The PCM status is changed immediately after calling trigger(async)
> > callback XRUN or SETUP. That is, you can start the stream again soon
> > after snd_pcm_stop(). In the case of async operation, the hardware
> > may be likely still running, but the PCM core doesn't know about it
> > and allows you to restart the stream. So it's racy, at least from the
> > PCM core viewpoint.
> OK but how does _my patch_ affects this?
No, your patch does essentially NOTHING by itself.
However...
> Before, the trigger() callback was called
> both synchronously and asynchronously. My
> patch only provides the callback to make
> it possible to separate the sync and async
> parts. It doesn't do anything more. It
> doesn't change anything at all. So how
> could exactly that patch introduce the race
> you mentioned? There was already an async
> invocation of trigger() callback. I wanted
> to add just a callback under different name
> for that. What could my patch possibly
> change? How does it _introduce_ the race?
Because the async trigger itself can be racy easily, there is no merit
to add a common callback until we have a proper handling of delayed
triggers in the PCM core side.
Takashi
prev parent reply other threads:[~2008-10-21 7:17 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20080518172258.D0DFB108060@picon.linux-foundation.org>
2008-05-18 18:20 ` snd_pcsp locking mess Stas Sergeev
2008-05-19 5:50 ` Takashi Iwai
2008-05-19 17:01 ` Stas Sergeev
2008-05-21 12:33 ` Takashi Iwai
2008-05-22 20:28 ` Stas Sergeev
2008-05-23 10:51 ` Takashi Iwai
2008-05-27 13:46 ` Stas Sergeev
2008-05-27 13:47 ` Stas Sergeev
2008-05-27 15:50 ` Takashi Iwai
2008-05-27 17:40 ` Stas Sergeev
2008-05-28 10:13 ` Takashi Iwai
2008-05-28 20:08 ` Stas Sergeev
2008-05-29 6:03 ` Takashi Iwai
2008-05-29 17:07 ` Stas Sergeev
2008-06-02 9:36 ` Takashi Iwai
2008-08-21 8:06 ` Stas Sergeev
2008-08-21 9:06 ` Takashi Iwai
2008-08-21 10:25 ` Stas Sergeev
2008-10-20 13:05 ` Takashi Iwai
2008-10-20 21:51 ` Stas Sergeev
2008-10-21 6:27 ` Takashi Iwai
2008-10-21 7:08 ` Stas Sergeev
2008-10-21 7:16 ` Takashi Iwai [this message]
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=s5htzb68lk4.wl%tiwai@suse.de \
--to=tiwai@suse.de \
--cc=alsa-devel@alsa-project.org \
--cc=stsp@aknet.ru \
/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