All of lore.kernel.org
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: alsa-devel@lists.sourceforge.net
Subject: atomicity in linked streams
Date: Mon, 21 Jul 2003 19:55:52 +0200	[thread overview]
Message-ID: <s5hel0jix1z.wl@alsa2.suse.de> (raw)

Hi,

so far, some pcm operator callbacks are assumed to be atomic.
but looking at the code, this restriction seems coming only from the
rwlock of linked streams.

there are some hardwares which need (idally) the non-atomic operations
for prepare and trigger.  they usually require the ack as the command
completion.  and we implemented it in the busy loop or by ignoring the
ack.

i think the stream-link lock can be replaced with rw_semaphore, so
that prepare and trigger callbacks can be non-atomic.  the only
critical part is, as far as i see, that  snd_pcm_stop() may be called
from interrupt handler when  xrun/suspend happens.  this cannot handle
the semaphore, of course.

i have still no concrete idea how to solve this...  any suggestions?


btw, if the trigger can take too long time, we should implement this
into two seprate parts: the trigger and the post-trigger.  the trigger
would be issued and return immediately, and the post-trigger would
take care of the completion of commands.


Takashi


-------------------------------------------------------
This SF.net email is sponsored by: VM Ware
With VMware you can run multiple operating systems on a single machine.
WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines at the
same time. Free trial click here: http://www.vmware.com/wl/offer/345/0

             reply	other threads:[~2003-07-21 17:55 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-07-21 17:55 Takashi Iwai [this message]
  -- strict thread matches above, loose matches on Subject: below --
2003-07-22  2:19 atomicity in linked streams Eliot Blennerhassett
2003-07-23  8:48 ` Takashi Iwai

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=s5hel0jix1z.wl@alsa2.suse.de \
    --to=tiwai@suse.de \
    --cc=alsa-devel@lists.sourceforge.net \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.