Linux Kernel
3.7.1
|
#include <firewire-cdev.h>
Data Fields | |
__u64 | closure |
__u32 | type |
__u32 | cycle |
__u32 | header_length |
__u32 | header [0] |
struct fw_cdev_event_iso_interrupt - Sent when an iso packet was completed : See set by FW_CDEV_CREATE_ISO_CONTEXT ioctl : See always FW_CDEV_EVENT_ISO_INTERRUPT : Cycle counter of the last completed packet : Total length of following headers, in bytes : Stripped headers, if any
This event is sent when the controller has completed an &fw_cdev_iso_packet with the FW_CDEV_ISO_INTERRUPT bit set, when explicitly requested with FW_CDEV_IOC_FLUSH_ISO, or when there have been so many completed packets without the interrupt bit set that the kernel's internal buffer for is about to overflow. (In the last case, kernels with ABI version < 5 drop header data up to the next interrupt packet.)
Isochronous transmit events (context type FW_CDEV_ISO_CONTEXT_TRANSMIT):
In version 3 and some implementations of version 2 of the ABI, &header_length is a multiple of 4 and &header contains timestamps of all packets up until the interrupt packet. The format of the timestamps is as described below for isochronous reception. In version 1 of the ABI, &header_length was 0.
Isochronous receive events (context type FW_CDEV_ISO_CONTEXT_RECEIVE):
The headers stripped of all packets up until and including the interrupt packet are returned in the field. The amount of header data per packet is as specified at iso context creation by &fw_cdev_create_iso_context.header_size.
Hence, _interrupt.header_length / _context.header_size is the number of packets received in this interrupt event. The client can now iterate through the mmap()'ed DMA buffer according to this number of packets and to the buffer sizes as the client specified in &fw_cdev_queue_iso.
Since version 2 of this ABI, the portion for each packet in _interrupt.header consists of the 1394 isochronous packet header, followed by a timestamp quadlet if &fw_cdev_create_iso_context.header_size > 4, followed by quadlets from the packet payload if &fw_cdev_create_iso_context.header_size > 8.
Format of 1394 iso packet header: 16 bits data_length, 2 bits tag, 6 bits channel, 4 bits tcode, 4 bits sy, in big endian byte order. data_length is the actual received size of the packet without the four 1394 iso packet header bytes.
Format of timestamp: 16 bits invalid, 3 bits cycleSeconds, 13 bits cycleCount, in big endian byte order.
In version 1 of the ABI, no timestamp quadlet was inserted; instead, payload data followed directly after the 1394 is header if header_size > 4. Behaviour of ver. 1 of this ABI is no longer available since ABI ver. 2.
Definition at line 257 of file firewire-cdev.h.
__u64 closure |
Definition at line 258 of file firewire-cdev.h.
__u32 cycle |
Definition at line 260 of file firewire-cdev.h.
Definition at line 262 of file firewire-cdev.h.
__u32 header_length |
Definition at line 261 of file firewire-cdev.h.
Definition at line 259 of file firewire-cdev.h.