diff options
author | Jay Fenlason <fenlason@redhat.com> | 2009-11-04 16:53:24 -0500 |
---|---|---|
committer | Stefan Richter <stefanr@s5r6.in-berlin.de> | 2009-11-22 20:55:34 +0100 |
commit | 1fb09ead370c8a35d82ae53b20afdb20ea0f0243 (patch) | |
tree | a0d78bcc08fde62512a2995f8f27c7482a391e79 | |
parent | e98abe588afa43af73c4f4fac1914e879215dead (diff) | |
download | libraw1394-1fb09ead370c8a35d82ae53b20afdb20ea0f0243.tar.gz |
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 <fenlason@redhat.com>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> (order, comment)
-rw-r--r-- | src/fw-iso.c | 11 |
1 files 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; |