Hardware Dev Center

REQUEST_ISOCH_ALLOCATE_RESOURCES control code

The REQUEST_ISOCH_ALLOCATE_RESOURCES request allocates a resource handle for transactions over a given isochronous channel. The device driver uses the resource handle to attach and detach data buffers for isochronous transactions on that channel.

The relevant members of the IRB for this request are:


typedef struct _IRB {
  ULONG FunctionNumber;
    .
    .
    .
  union {
    struct {
      ULONG    fulSpeed;
      ULONG    fulFlags;
      ULONG    nChannel;
      ULONG    nMaxBytesPerFrame;
      ULONG    nNumberOfBuffers;
      ULONG    nMaxBufferSize;
      ULONG    nQuadletsToStrip;
      HANDLE    hResource;
      ULARGE_INTEGER    ChannelMask
    } IsochAllocateResources;
    .
    .
    .
  } u;
} IRB;

IRB Input

FunctionNumber

REQUEST_ISOCH_ALLOCATE_RESOURCES

u.IsochAllocateResources.fulSpeed

Specifies the connection speed to use for communication on the channel. The possible speed values are SPEED_FLAGS_xxx, where xxx is the (approximate) transfer rate in megabits per second. Existing hardware supports transfer rates of 100, 200, and 400 Mb/sec.

Transfer RateDescription

SPEED_FLAGS_100

100 Mb/s

SPEED_FLAGS_200

200 Mb/s

SPEED_FLAGS_400

400 Mb/s

 

Note  In Windows 7 and later versions of Windows, you can specify new values higher speed and greater sized payloads. For more information, see New Flags for Speed and Payload Size and IEEE 1394 IOCTL Changes in Device Driver Interface (DDI) Changes in Windows 7.
u.IsochAllocateResources.fulFlags

Specifies how the bus driver should use any buffers attached to the resource handle. Many of the flags specify how the bus driver should configure the IEEE host controller for DMA from or to attached buffers.

FlagDescription

RESOURCE_USED_IN_LISTENING

Attached buffers are used to read data from an isochronous channel. Set this if the resource handle will be used in a REQUEST_ISOCH_LISTEN request.

RESOURCE_USED_IN_TALKING

Attached buffers are used to write data to an isochronous channel. Set this if the resource handle will be used in a REQUEST_ISOCH_TALK request.

RESOURCE_STRIP_ADDITIONAL_QUADLETS

The bus driver configures the host controller to strip additional quadlets from incoming isochronous packets. The number of quadlets to be stripped is specified in nQuadletsToStrip.

RESOURCE_SYNCH_ON_TIME

The bus driver configures the host controller to synchronize the beginning of the isochronous transaction to the CYCLE_TIME specified in the StartTime member of the request's IRB. See REQUEST_ISOCH_LISTEN or REQUEST_ISOCH_TALK.

RESOURCE_USE_PACKET_BASED

Used to switch to packet-based transfer, rather than the default. The default is stream-based transfer, unless the host controller only supports packet-based DMA.

RESOURCE_USE_MULTICHANNEL

The driver owning this resource listens on multiple channels.

RESOURCE_VARIABLE_ISOCH_PAYLOAD

The driver owning this resource transfers frames of variable size.

 

u.IsochAllocateResources.nChannel

Specifies the isochronous channel for all transactions involving the resource handle allocated by this request.

u.IsochAllocateResources.nMaxBytesPerFrame

Specifies the expected maximum isochronous frame size while transmitting and receiving on the channel.

u.IsochAllocateResources.nNumberOfBuffers

Specifies one more than the maximum expected number of buffers that are attached to the resource handle at any given time.

u.IsochAllocateResources.nMaxBufferSize

Specifies the maximum size of the buffers that are attached to the resource handle.

u.IsochAllocateResources.nQuadletsToStrip

Specifies the number of quadlets to strip from the beginning of every packet in an incoming isochronous stream. This parameter is ignored unless the device driver sets the RESOURCE_STRIP_ADDITIONAL_QUADLETS flag in u.IsochAllocateResources.fulFlags.

u.IsochAllocateResources.ChannelMask

Specifies a set of isochronous channels, if RESOURCE_USE_MULTICHANNEL is set, that are used for all transactions involving the resource handle allocated by this request.

IRB Output

u.IsochAllocateResources.hResource

Specifies the resource handle the device driver uses to attach or detach data buffers for isochronous transactions on the channel specified in nChannel.

I/O Status Block

The bus driver sets Irp->IoStatus.Status to STATUS_SUCCESS, if it processes the request successfully, or to the appropriate error code.

Operation

Not all RESOURCE_XXX flags are supported. Some require hardware support from the IEEE 1394 host controller. The device driver can use the REQUEST_GET_LOCAL_HOST_INFO request, with nLevel = GET_HOST_CAPABILITIES, to determine which RESOURCE_XXX flags are supported. The bus driver returns a pointer to a GET_LOCAL_HOST_INFO2 structure, whose HostCapabilities member contains flags that determine which flags the host controller supports. The following table lists which RESOURCE_XXX flags require hardware support, and the corresponding HostCapabilities flag the driver should check.

RESOURCE_XXX flagsHostCapabilities flag

RESOURCE_STRIP_ADDITIONAL_QUADLETS

HOST_INFO_SUPPORTS_ISOCH_STRIPPING

RESOURCE_SYNCH_ON_TIME

HOST_INFO_SUPPORTS_START_ON_CYCLE

RESOURCE_USE_PACKET_BASED

HOST_INFO_PACKET_BASED

 

The default method of transmission for isochronous reads is stream-based, in which data is read until it fills the buffer and then the bus driver begins filling the next buffer. If the RESOURCE_USE_PACKET_BASED flag is set, the bus driver uses a packet-based method of storing data, in which each packet is put in its own buffer and no attempt is made to fill each buffer. A particular host controller may only support packet-based or stream-based reads. Drivers should use the REQUEST_GET_LOCAL_HOST_INFO request to determine what the host controller supports.

Not all host controllers automatically strip off the packet header. Use the REQUEST_GET_LOCAL_HOST_INFO request to determine if the host controller automatically strips them off. This request also determines if the host controller can be configured to strip quadlets from the beginning of each packet. Many host controllers can be configured to automatically strip off the packet header by setting the RESOURCE_STRIP_ADDITIONAL_QUADLETS flag and setting nQuadletsToStrip to 1.

Set the RESOURCE_SYNCH_ON_TIME to synchronize the beginning of I/O to the StartTime member of the REQUEST_ISOCH_LISTEN or REQUEST_ISOCH_TALK request. Use the REQUEST_GET_LOCAL_HOST_INFO request to determine if the host controller supports synchronization on an isochronous cycle time. Additional synchronization options can be set with each buffer attached.See the ISOCH_DESCRIPTOR member of the REQUEST_ISOCH_ATTACH_BUFFERS for details.

A multichannel resource must be stream-based and drivers can use only multichannel resources to read, not write, data. Therefore, if the RESOURCE_USE_MULTICHANNEL flag is set, the RESOURCE_USE_PACKET_BASED and RESOURCE_USED_IN_LISTENING flags must also be set. If the RESOURCE_USE_MULTICHANNEL flag is set, the bus driver ignores the u.IsochAllocateResources.nChannel member and assigns the channels defined in u.IsochAllocateResources.ChannelMask to the resource.

See Also

IOCTL_IEEE1394_API_REQUEST

Requirements

Header

1394.h (include 1394.h)

IRQL

PASSIVE_LEVEL

 

 

Send comments about this topic to Microsoft

Show:
© 2015 Microsoft