ALSA: firewire-lib: schedule hardware IRQ according to the size of PCM period
authorTakashi Sakamoto <o-takashi@sakamocchi.jp>
Thu, 17 Oct 2019 15:54:22 +0000 (00:54 +0900)
committerTakashi Iwai <tiwai@suse.de>
Fri, 18 Oct 2019 02:35:53 +0000 (04:35 +0200)
commite229853d505d7ab77e9b68b0ac91d19f48fe6d80
treee6c898c120d037f328d5b562b04b2870388d556b
parent4de3eb062e2daf04646d23417a39b8843df4508b
ALSA: firewire-lib: schedule hardware IRQ according to the size of PCM period

ALSA IEC 61883-1/6 packet streaming engine controls 1394 OHCI controller
to generate hardware IRQ for fixed number of isochronous packets (=16)
since its first commit.

This commit allow the engine to generate it for variable period according
to the number of event to handle. For outgoing stream, internal
calculator is used to check the accumulated events. For incoming stream,
the number of data block in the packet of stream is used to check the
accumulated events. When it's unavailable, fixed number of packet
roughly calculated in advance is used instead of event counting.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Link: https://lore.kernel.org/r/20191017155424.885-11-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/firewire/amdtp-stream.c
sound/firewire/amdtp-stream.h