Jaa


Isochronous Synchronization Options for IEEE 1394 Devices

The IEEE 1394 driver stack supports certain types of synchronization and filtering during REQUEST_ISOCH_LISTEN and REQUEST_ISOCH_TALK operations.

A driver can initiate filtering by setting the DESCRIPTOR_SYNCH_ON_SY or DESCRIPTOR_SYNCH_ON_TAG flag in the fulFlags member of a buffer's ISOCH_DESCRIPTOR structure. Beginning with the data that is destined for that buffer, the bus driver removes all packets from the data stream that do not have Sy or Tag values that match the Sy or Tag values indicated in the isoch descriptor. This filtering continues with the buffers that follow, even if neither one of the DESCRIPTOR_SYNCH_ON_SY and DESCRIPTOR_SYNCH_ON_TAG flags are set in the isoch descriptors of those buffers.

If, in addition to setting the DESCRIPTOR_SYNCH_ON_SY or DESCRIPTOR_SYNCH_ON_TAG flags, the client driver also sets the DESCRIPTOR_USE_SY_TAG_IN_FIRST flag, the bus driver will use the Sy or Tag value that is provided by the client driver in the isoch descriptor to synchronize the data flow. In this case, the bus driver discards all data packets until it receives one whose Sy or Tag value matches the value that is indicated in the isoch descriptor. Upon finding a match, the bus driver ceases discarding packets and resumes forwarding all packets to the client driver.

If the host controller supports it, a client driver can use cycle times to synchronize an isochronous data stream. A "cycle time" in this context is defined by the CYCLE_TIME structure. It includes a second count, CL_SecondCount, that wraps every 128 seconds, a cycle count, CL_CycleCount, that indicates the number of isochronous cycles that have elapsed within the current second, and a clock-ticks count, CL_CycleOffset, that indicates the number of IEEE 1394 bus clock ticks that have elapsed within the current cycle.

A client can either initiate a synchronization operation in a particular buffer, or it can synchronize the entire data stream on a certain cycle time.

To initiate a synchronization operation in a particular buffer, the client driver must set the DESCRIPTOR_SYNCH_ON_TIME flag in the fulFlags member of an isoch descriptor for that buffer. It must also initialize the CycleTime member of the descriptor with the cycle time that will be used to synchronize the data stream. After the bus driver examines the isoch descriptor, it will initiate the synchronization operation using the indicated cycle time. The bus driver discards all packets that do not have the indicated cycle time, and resumes delivering packets once it finds a packet with the correct cycle time.

To synchronize the entire data stream on a certain cycle time, client drivers must configure a channel, so that all requests that are initiated on the channel will automatically synchronize the data stream using the indicated cycle time. This provides an alternative to triggering the synchronization based on the cycle time settings of a particular isoch descriptor. To configure a channel in this manner, the client driver must take two steps:

  1. When the client allocates a resource handle for the channel with a REQUEST_ISOCH_ALLOCATE_RESOURCES request, it must set the RESOURCE_SYNCH_ON_TIME flag in the fulFlags member of the IRB.

  2. When the client requests a listen or talk operation on a channel, it specifies the cycle time that will be used to synchronize the data stream in the StartTime member of the IRB. For more information about listen and talk requests, see REQUEST_ISOCH_LISTEN and REQUEST_ISOCH_TALK.

To determine if the host controller supports synchronization on cycle times, the client driver should send a REQUEST_GET_LOCAL_HOST_INFO request to the bus driver, with the nLevel member of the IRB set to 2. The bus driver returns a GET_LOCAL_HOST_INFO2 structure in response to this request. If the bus driver sets the HOST_INFO_SUPPORTS_START_ON_CYCLE flag in the HostCapabilities member of GET_LOCAL_HOST_INFO2, this indicates that the host controller supports the synchronization of isochronous operations using cycle times.