diff options
| author | 2006-03-04 01:17:46 +0000 | |
|---|---|---|
| committer | 2006-03-04 01:17:46 +0000 | |
| commit | 96aaa4ca65d7ff51089ebb87dbb3303737735e9d (patch) | |
| tree | b8aadb65c7e80d0c7d32db62cf091d0e9a652c08 /src/iso.c | |
| parent | Fix raw1394_iso_xmit_write() to work with recent kernel change to raw1394 (diff) | |
Added a new callback response for iso_xmit handlers: RAW1394_ISO_AGAIN.
This would be returned when the callback doesn't have enough data to
create a complete packet. This can occur when the xmit buffers are
bigger than the buffers supplying the data. It is not nescessarily an
error, because there are enough packets in the xmit buffer. This
response could give the data supplyer more time to fill the intermediate
buffer without losing any packets.
Signed-off-by: Pieter Palmers <pieterp@joow.be>
Signed-off-by: Dan Dennedy <dan@dennedy.org>
git-svn-id: svn://svn.linux1394.org/libraw1394/trunk@161 53a565d1-3bb7-0310-b661-cf11e63c67ab
Diffstat (limited to 'src/iso.c')
| -rw-r--r-- | src/iso.c | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -320,6 +320,14 @@ static int _raw1394_iso_xmit_queue_packets(raw1394handle_t handle) if(ioctl(handle->fd, RAW1394_IOC_ISO_QUEUE_ACTIVITY, 0)) goto out_produce; break; + } else if(disp == RAW1394_ISO_AGAIN) { + /* the last packet was not ready, decrement counter */ + packets.n_packets--; + + /* queue an event so that we don't hang in the next read() */ + if(ioctl(handle->fd, RAW1394_IOC_ISO_QUEUE_ACTIVITY, 0)) + goto out_produce; + break; } else if(disp == RAW1394_ISO_STOP) { stop_sync = 1; break; |
