All of lore.kernel.org
 help / color / mirror / Atom feed
* Echoaudio, suspend/resume question on rawmidi device
@ 2010-01-03 20:55 Giuliano Pochini
  0 siblings, 0 replies; only message in thread
From: Giuliano Pochini @ 2010-01-03 20:55 UTC (permalink / raw)
  To: Alsa-devel

I have some patches that add PM support to all echoaudio drivers. It seems
to work fine, but it has been tested on two cards only and the rawmidi
device hasn't been tested at all. I can't test it because
suspend-to-anything does not work on my pmac. I want to be sure at least it
cannot deadlock.

 * On suspend:

Rawmidi input is interrupt-driven. The driver tells the card to stop
accepting data.

Rawmidi output is timer-driven. The driver uses a timer to check if the
card's output buffer has room for more data to send. Do del_timer_sync()
and wait until all buffered data is sent, which may take 20ms (64 bytes at
31250bps).

 * On resume:

Input: Re-enable midi in.

Output: Restart the timer.


Do you see any race condition or weak points in this scheme, especially in
the midi-out part ? Is del_timer_sync() safe ?


-- 
Giuliano.

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2010-01-03 20:56 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-03 20:55 Echoaudio, suspend/resume question on rawmidi device Giuliano Pochini

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.