From 1fb09ead370c8a35d82ae53b20afdb20ea0f0243 Mon Sep 17 00:00:00 2001 From: Jay Fenlason Date: Wed, 4 Nov 2009 16:53:24 -0500 Subject: [PATCH] Fix default isochronous IRQ interval on firewire-core libraw1394 takes a negative IRQ interval to mean "every 256 packets" with the juju backend, which doesn't work well if you don't queue that many. Use buf_packets / 4 like the ieee1394 version. Signed-off-by: Jay Fenlason Signed-off-by: Stefan Richter (order, comment) --- src/fw-iso.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/fw-iso.c b/src/fw-iso.c index e49ad3d..edf2fd7 100644 --- a/src/fw-iso.c +++ b/src/fw-iso.c @@ -391,11 +391,14 @@ iso_init(fw_handle_t handle, int type, return -1; } - handle->iso.type = type; + /* set irq_interval from < 1 to default values like ieee1394 rawiso */ if (irq_interval < 0) - handle->iso.irq_interval = 256; - else - handle->iso.irq_interval = irq_interval; + irq_interval = buf_packets / 4; + if (irq_interval == 0) + irq_interval = 1; + + handle->iso.type = type; + handle->iso.irq_interval = irq_interval; handle->iso.xmit_handler = xmit_handler; handle->iso.recv_handler = recv_handler; handle->iso.buf_packets = buf_packets;