summaryrefslogtreecommitdiff
path: root/sound/firewire/amdtp-stream.h
diff options
context:
space:
mode:
authorTakashi Sakamoto <o-takashi@sakamocchi.jp>2021-06-10 06:17:32 +0300
committerTakashi Iwai <tiwai@suse.de>2021-06-10 10:50:31 +0300
commit7ba5ca32fe6e8d2e153fb5602997336517b34743 (patch)
treede246e4fd9237e6932eff763f9e76a742db9c410 /sound/firewire/amdtp-stream.h
parent47271b1b98c980e915c0332eb5e8b2f273b2cd78 (diff)
downloadlinux-7ba5ca32fe6e8d2e153fb5602997336517b34743.tar.xz
ALSA: firewire-lib: operate for period elapse event in process context
All of drivers in ALSA firewire stack processes two chances to process isochronous packets in any isochronous context; in software IRQ context for 1394 OHCI, and in process context of ALSA PCM application. In the process context, callbacks of .pointer and .ack are utilized. The callbacks are done by ALSA PCM core under acquiring lock of PCM substream, In design of ALSA PCM core, call of snd_pcm_period_elapsed() is used for drivers to awaken user processes from waiting for available frames. The function voluntarily acquires lock of PCM substream, therefore it is not called in the process context since it causes dead lock. As a workaround to avoid the dead lock, all of drivers in ALSA firewire stack uses workqueue to delegate the call. A variant of snd_pcm_period_elapsed() without lock acquisition can obsolete the workqueue. An extra care is needed for the callback of .pointer since it's called from snd_pcm_period_elapsed(). The isochronous context in Linux FireWire subsystem is safe mostly for nested call except in software IRQ context. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Link: https://lore.kernel.org/r/20210610031733.56297-3-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/firewire/amdtp-stream.h')
0 files changed, 0 insertions, 0 deletions