diff options
| author | 2002-12-16 05:11:45 +0000 | |
|---|---|---|
| committer | 2002-12-16 05:11:45 +0000 | |
| commit | e01decd75c1455c9fb018494d73ee77928f12ba6 (patch) | |
| tree | 00a3937aac6ece03bddec9c76ea7a098b2f24062 /src/iso.c | |
| parent | fix cplusplus extern C block (diff) | |
rawiso updates:
- changed return type of rawiso xmit/recv handlers from int to
enum raw1394_iso_disposition
- added an ioctl (RAW1394_ISO_QUEUE_ACTIVITY) to force an ISO_ACTIVITY
event into the queue. This is needed for handling RAW1394_ISO_DEFER,
to kick us out of the next read() instead of sleeping forever.
- removed references to "8-byte" isochronous header - this is an
OHCI-specific implementation detail
git-svn-id: svn://svn.linux1394.org/libraw1394/trunk@95 53a565d1-3bb7-0310-b661-cf11e63c67ab
Diffstat (limited to 'src/iso.c')
| -rw-r--r-- | src/iso.c | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -160,7 +160,7 @@ static int do_iso_init(raw1394handle_t handle, * raw1394_iso_xmit_init - initialize isochronous transmission * @handler: handler function for queueing packets * @buf_packets: number of isochronous packets to buffer - * @max_packet_size: largest packet you need to handle, in bytes (not including the 8-byte isochronous header) + * @max_packet_size: largest packet you need to handle, in bytes (not including the isochronous header) * @channel: isochronous channel on which to transmit * @speed: speed at which to transmit * @irq_interval: maximum latency of wake-ups, in packets (-1 if you don't care) @@ -186,7 +186,7 @@ int raw1394_iso_xmit_init(raw1394handle_t handle, * raw1394_iso_recv_init - initialize isochronous reception * @handler: handler function for receiving packets * @buf_packets: number of isochronous packets to buffer - * @max_packet_size: largest packet you need to handle, in bytes (not including the 8-byte isochronous header) + * @max_packet_size: largest packet you need to handle, in bytes (not including the isochronous header) * @channel: isochronous channel to receive * @speed: speed at which to receive * @irq_interval: maximum latency of wake-ups, in packets (-1 if you don't care) @@ -275,6 +275,9 @@ static int _raw1394_iso_xmit_queue_packets(raw1394handle_t handle) packets_done++; if(disp == RAW1394_ISO_DEFER) { + /* queue an event so that we don't hang in the next read() */ + if(ioctl(handle->fd, RAW1394_ISO_QUEUE_ACTIVITY, 0)) + return -1; break; } else if(disp == RAW1394_ISO_ERROR) { retval = -1; @@ -377,6 +380,9 @@ static int _raw1394_iso_recv_packets(raw1394handle_t handle) packets_done++; if(disp == RAW1394_ISO_DEFER) { + /* queue an event so that we don't hang in the next read() */ + if(ioctl(handle->fd, RAW1394_ISO_QUEUE_ACTIVITY, 0)) + return -1; break; } else if(disp == RAW1394_ISO_ERROR) { retval = -1; |
