From e229853d505d7ab77e9b68b0ac91d19f48fe6d80 Mon Sep 17 00:00:00 2001 From: Takashi Sakamoto Date: Fri, 18 Oct 2019 00:54:22 +0900 Subject: 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 Link: https://lore.kernel.org/r/20191017155424.885-11-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai --- sound/firewire/amdtp-stream.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'sound/firewire/amdtp-stream.h') diff --git a/sound/firewire/amdtp-stream.h b/sound/firewire/amdtp-stream.h index 8d541727e437..344818e936df 100644 --- a/sound/firewire/amdtp-stream.h +++ b/sound/firewire/amdtp-stream.h @@ -145,6 +145,9 @@ struct amdtp_stream { int syt_override; } rx; } ctx_data; + unsigned int event_count; + unsigned int events_per_period; + unsigned int idle_irq_interval; /* For CIP headers. */ unsigned int source_node_id_field; -- cgit v1.2.3