3.3.4.14 USB_HOST_AUDIO_V1_FeatureUnitChannelVolumeRangeGet Function

C

USB_HOST_AUDIO_V1_RESULT USB_HOST_AUDIO_V1_FeatureUnitChannelVolumeRangeGet(
    USB_HOST_AUDIO_V1_OBJ audioObj, 
    USB_HOST_AUDIO_V1_CONTROL_ENTITY_OBJ entityObject, 
    USB_HOST_AUDIO_V1_REQUEST_HANDLE * requestHandle, 
    uint8_t channelNumber, 
    void * data, 
    size_t size
);

Description

This function schedules a control request to the Audio Device feature unit to get the range supported by the volume control on the specified channel.

Prior to calling this function the user should call the USB_HOST_AUDIO_V1_FeatureUnitChannelVolumeSubRangeNumbersGet function to know how many sub-ranges are supported.

Users should calculate the 'size' parameter of this function, as follows:

size = Size of
        number of ranges + nSubRanges * (Size (MIN) + Size (MAX) + Size of (RES))

If the request was scheduled successfully, the requestHandle parameter will contain a request handle that uniquely identifies this request. If the request could not be scheduled successfully, requestHandle will contain USB_HOST_AUDIO_V1_REQUEST_HANDLE_INVALID.

When the control request completes, the Audio v1.0 Client Driver will call the callback function that was set using the USB_HOST_AUDIO_V1_EntityRequestCallbackSet function. The context parameter specified here will be returned in the callback.

Parameters

Parameters Description
audioObj USB Host Audio v1.0 Device object
entityObject Audio control entity object
requestHandle Output parameter that will contain the handle to this request
channelNumber Channel number to which the volume control is addressed
data Pointer to the buffer containing data to be written to the device
size Amount of data to write (in bytes)

Returns

  • USB_HOST_AUDIO_V1_RESULT_SUCCESS - The request was scheduled successfully. requestHandle will contain a valid request handle.
  • USB_HOST_AUDIO_V1_RESULT_BUSY - The control request mechanism is currently busy. Retry the request.
  • USB_HOST_AUDIO_V1_RESULT_FAILURE - An unknown failure occurred. requestHandle will contain USB_HOST_AUDIO_V1_0_REQUEST_HANDLE_INVALID.
  • USB_HOST_AUDIO_V1_RESULT_PARAMETER_INVALID - The data pointer or requestHandle pointer is NULL.

Remarks

None.