Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Fields
fw_cdev_iso_packet Struct Reference

#include <firewire-cdev.h>

Data Fields

__u32 control
 
__u32 header [0]
 

Detailed Description

struct fw_cdev_iso_packet - Isochronous packet : Contains the header length (8 uppermost bits), the sy field (4 bits), the tag field (2 bits), a sync flag or a skip flag (1 bit), an interrupt flag (1 bit), and the payload length (16 lowermost bits) : Header and payload in case of a transmit context.

&struct fw_cdev_iso_packet is used to describe isochronous packet queues. Use the FW_CDEV_ISO_ macros to fill in . The array is empty in case of receive contexts.

Context type FW_CDEV_ISO_CONTEXT_TRANSMIT:

.HEADER_LENGTH must be a multiple of 4. It specifies the numbers of bytes in that will be prepended to the packet's payload. These bytes are copied into the kernel and will not be accessed after the ioctl has returned.

The .SY and TAG fields are copied to the iso packet header. These fields are specified by IEEE 1394a and IEC 61883-1.

The .SKIP flag specifies that no packet is to be sent in a frame. When using this, all other fields except .INTERRUPT must be zero.

When a packet with the .INTERRUPT flag set has been completed, an &fw_cdev_event_iso_interrupt event will be sent.

Context type FW_CDEV_ISO_CONTEXT_RECEIVE:

.HEADER_LENGTH must be a multiple of the context's header_size. If the HEADER_LENGTH is larger than the context's header_size, multiple packets are queued for this entry.

The .SY and TAG fields are ignored.

If the .SYNC flag is set, the context drops all packets until a packet with a sy field is received which matches &fw_cdev_start_iso.sync.

.PAYLOAD_LENGTH defines how many payload bytes can be received for one packet (in addition to payload quadlets that have been defined as headers and are stripped and returned in the &fw_cdev_event_iso_interrupt structure). If more bytes are received, the additional bytes are dropped. If less bytes are received, the remaining bytes in this part of the payload buffer will not be written to, not even by the next packet. I.e., packets received in consecutive frames will not necessarily be consecutive in memory. If an entry has queued multiple packets, the PAYLOAD_LENGTH is divided equally among them.

When a packet with the .INTERRUPT flag set has been completed, an &fw_cdev_event_iso_interrupt event will be sent. An entry that has queued multiple receive packets is completed when its last packet is completed.

Context type FW_CDEV_ISO_CONTEXT_RECEIVE_MULTICHANNEL:

Here, &fw_cdev_iso_packet would be more aptly named _iso_buffer_chunk since it specifies a chunk of the mmap()'ed buffer, while the number and alignment of packets to be placed into the buffer chunk is not known beforehand.

.PAYLOAD_LENGTH is the size of the buffer chunk and specifies room for header, payload, padding, and trailer bytes of one or more packets. It must be a multiple of 4.

.HEADER_LENGTH, TAG and SY are ignored. SYNC is treated as described for single-channel reception.

When a buffer chunk with the .INTERRUPT flag set has been filled entirely, an &fw_cdev_event_iso_interrupt_mc event will be sent.

Definition at line 798 of file firewire-cdev.h.

Field Documentation

__u32 control

Definition at line 799 of file firewire-cdev.h.

Definition at line 800 of file firewire-cdev.h.


The documentation for this struct was generated from the following file: