USB Device Class Definition for Audio Devices
Release 1.0 March 18, 1998 71
established in Section 4.3.2.3, “Mixer Unit Descriptor.” (ICN=u, OCN=v) If the request specifies an
unknown ICN or OCN to that Unit, the control pipe must indicate a stall. For the Get Mixer Unit request,
it is legal to address a non-programmable Mixer Control.
A special case arises when the Input Channel Number and Output Channel Number are both set to 0xFF.
Then a single Get Mixer Unit Control request can be used to retrieve an attribute setting of all the
programmable Mixer Controls within the Unit. The ordering of the parameters in the parameter block
obeys the same rules as established for the bit ordering in the bmControls field of the Mixer Unit
Descriptor. The previous description is referred to as the second form of the Get Mixer Unit Control
request.
Another special case arises when the Input Channel Number and Output Channel Number are both set to
0x00. Then a single Get Mixer Unit Control request can be used to retrieve an attribute setting of all the
Mixer Controls (both programmable and non-programmable) within the Unit. The ordering of the
parameters in the parameter block obeys the same rules as established for the bit ordering in the
bmControls field of the Mixer Unit Descriptor. The parameter block now contains a setting for every
Mixer in the Mixer Unit. The above description is referred to as the third form of the Get Mixer Unit
Control request.
For a description of the parameter block for the Get Mixer Unit Control request, see Section 5.2.2.2.3,
“Mixer Control.”
5.2.2.2.3 Mixer Control
A Mixer Unit consists of a number of Mixer Controls, either programmable or fixed. A Mixer Control can
support all possible Control attributes (CUR, MIN, MAX, and RES). The settings for the CUR, MIN, and
MAX attributes can range from +127.9961 dB (0x7FFF) down to -127.9961 dB (0x8001) in steps of 1/256
dB or 0.00390625 dB (0x0001). The range for the CUR attribute is extended by code 0x8000, representing
silence, i.e., -¥ dB. The settings for the RES attribute can only take positive values and range from 1/256
dB (0x0001) to +127.9961 dB (0x7FFF). The Mixer Control honors the request to the best of its abilities.
It may round the wMixer attribute value to its closest available setting. It will report this rounded setting
when queried during a Get Mixer Unit Control request.
In the first form of the Mixer Unit Control request, a particular Mixer Control within a Mixer Unit is
addressed through the Unit ID, Input Channel Number, and Output Channel Number fields of the Set/Get
Mixer Unit Control request.
Table 5-8: First Form of the Mixer Control Parameter Block
wLength 2
USB Device Class Definition for Audio Devices
Release 1.0 March 18, 1998 72
Offset Field Size Value Description
0 wMixer 2 Number The setting for the attribute of the
addressed Mixer Control:
0x7FFF: 127.9961 dB
…
0x0100: 1.0000 dB
…
0x0002: 0.0078 dB
0x0001: 0.0039 dB
0x0000: 0.0000 dB
0xFFFF: -0.0039 dB
0xFFFE: -0.0078 dB
…
0xFE00: -1.0000 dB
…
0x8002: -127.9922 dB
0x8001: -127.9961 dB
0x8000 -¥ dB (CUR
attribute only)
In the second form, the Input and Output Channel Number fields are both set to 0xFF. The parameter
block contains a list of settings for an attribute of all programmable Mixer Controls in the Mixer Unit.
Table 5-9: Second Form of the Mixer Control Parameter Block
wLength (Number of programmable Controls: NrPr)*2
Offset Field Size Value Description
0 wMixer(1) 2 Number The setting for the attribute of the first
programmable Mixer Control.
… … … … …
(NrPr-1)*2 wMixer(NrPr) 2 Number The setting for the attribute of the last
programmable Mixer Control.
In the third form, the Input and Output Channel Number fields are both set to 0x00. The parameter block
contains a list of settings for an attribute of all the Mixer Controls in the Mixer Unit.
Table 5-10: Third Form of the Mixer Control Parameter Block
wLength (Number of Controls: NrCo)*2
Offset Field Size Value Description
0 wMixer(1) 2 Number The setting for the attribute of the first
Mixer Control.
… … … … …
(NrCo-1)*2 wMixer(NrCo) 2 Number The mixer setting for the attribute of the
last Mixer Control.
USB Device Class Definition for Audio Devices
Release 1.0 March 18, 1998 73
5.2.2.3 Selector Unit Control Requests
The following paragraphs describe the Set and Get Selector Unit Control requests.
5.2.2.3.1 Set Selector Unit Control Request
This request is used to set an attribute of a Selector Control inside a Selector Unit of the audio function.
Table 5-11: Set Selector Unit Control Request Values
bmRequest
Type
bRequest wValue wIndex wLength Data
00100001B SET_CUR
SET_MIN
SET_MAX
SET_RES
Zero Selector Unit ID
and
Interface
Length of
parameter
block
Parameter
block
The bRequest field indicates which attribute the request is manipulating. The MIN, MAX, and RES
attributes are usually not supported for the Set request.
The wValue field is not used and must be set to zero (Because the Selector Unit only contains a single
Control, there is no need for a Control Selector).
For a description of the parameter block for the Set Selector Unit Control request, see Section 5.2.2.3.3,
“Selector Control.”
5.2.2.3.2 Get Selector Unit Control Request
This request returns the attribute setting of the Selector Control inside a Selector Unit of the audio
function.
Table 5-12: Get Selector Unit Control Request Values
bmRequest
Type
bRequest wValue wIndex wLength Data
10100001B GET_CUR
GET_MIN
GET_MAX
GET_RES
Zero Selector Unit ID
and
Interface
Length of
parameter
block
Parameter
block
The bRequest field indicates which attribute the request is reading. The RES attribute is usually not
supported and should return one if implemented.
The wValue field is not used and must be set to zero.
For a description of the parameter block for the Get Selector Unit Control request, see Section 5.2.2.3.3,
“Selector Control.”
5.2.2.3.3 Selector Control
A Selector Unit represents a multi-channel source selector, capable of selecting between a number of
identically configured audio channel clusters. The valid range for the CUR, MIN, and MAX attributes is
from one up to the number of Input Pins of the Selector Unit. This value can be found in the bNrInPins
field of the Selector Unit descriptor. The RES attribute can only have a value of one. The Selector Control
honors the request to the best of its abilities. It may round the bSelector attribute value to its closest
USB Device Class Definition for Audio Devices
Release 1.0 March 18, 1998 74
available setting. It will report this rounded setting when queried during a Get Selector Unit Control
request.
Table 5-13: Selector Control Parameter Block
wLength 1
Offset Field Size Value Description
0 bSelector 1 Number The setting for the attribute of the
Selector Control.
5.2.2.4 Feature Unit Control Requests
The following paragraphs describe the Set and Get Feature Unit Control requests. These Feature Unit
Control requests can have two forms. The first form must be supported while the second form can be
optionally implemented.
5.2.2.4.1 Set Feature Unit Control Request
This request is used to set an attribute of an audio Control inside a Feature Unit of the audio function.
Table 5-14: Set Feature Unit Control Request Values
bmRequest
Type
bRequest wValue wIndex wLength Data
00100001B SET_CUR
SET_MIN
SET_MAX
SET_RES
CS and CN Feature Unit ID
and
Interface
Length of
parameter
block
Parameter
block
The bRequest field indicates which attribute the request is manipulating. The MIN, MAX, and RES
attributes are usually not supported for the Set request. Further details on which attributes are supported
for which Controls can be found in Section 5.2.2.4.3, “Feature Unit Controls.”
The wValue field specifies the Control Selector (CS) in the high byte and the Channel Number (CN) in
the low byte. The Control Selector indicates which type of Control this request is manipulating. (Volume,
Mute, etc.) The Channel Number (CN) indicates which logical channel of the cluster is to be influenced.
If the request specifies an unknown or unsupported CS or CN to that Unit, the control pipe must indicate a
stall.
A special case arises when the Channel Number is set to 0xFF. Then a single Set Feature Unit Control
request can be used to set an attribute of all available Controls of a certain type (indicated by the CS)
within the Unit. The number of parameters passed in the parameter block must exactly match the number
of available Controls in the Unit (as indicated by the number of bits set in the bmaProps() array for a
certain Control). If this is not the case, the control pipe must indicate a stall. The first parameter in the
parameter block is assigned to the attribute of the first available Control, i.e. the one with the lowest
Channel Number (including Channel Number 0, the master channel). The above description is referred to
as the second form of the Set Feature Unit Control request.
For a description of the parameter blocks for the different Controls that can be addressed through the Set
Feature Unit Control request, see Section 5.2.2.4.3, “Feature Unit Controls.”
USB Device Class Definition for Audio Devices
Release 1.0 March 18, 1998 75
5.2.2.4.2 Get Feature Unit Control Request
This request returns the attribute setting of a specific audio Control inside a Feature Unit of the audio
function.
Table 5-15: Get Feature Unit Control Request Values
bmRequest
Type
bRequest wValue wIndex wLength Data
10100001B GET_CUR
GET_MIN
GET_MAX
GET_RES
CS and CN Feature Unit ID
and
Interface
Length of
parameter
block
Parameter
block
The bRequest field indicates which attribute the request is reading.
The wValue field specifies the Control Selector (CS) in the high byte and the Channel Number (CN) in
the low byte. The Control Selector indicates which type of Control this request is addressing. (Volume,
Mute, etc.) The Channel Number (CN) indicates which logical channel of the cluster is to be addressed. If
the request specifies an unknown or unsupported CS or CN to that Unit, the control pipe must indicate a
stall.
A special case arises when the Channel Number is set to 0xFF. Then a single Get Feature Unit Control
request can be used to retrieve the settings of an attribute of all available Controls of a certain type
(indicated by the CS) within the Unit. The first parameter returned in the parameter block corresponds to
the attribute of the first available Control, i.e. the one with the lowest Channel Number (including
Channel Number 0, the master channel). The above description is referred to as the second form of the
Get Feature Unit Control request.
For a description of the parameter blocks for the different Controls that can be addressed through the Get
Feature Unit Control request, see Section 5.2.2.4.3, “Feature Unit Controls.”
5.2.2.4.3 Feature Unit Controls
The following paragraphs present a detailed description of all possible Controls a Feature Unit can
incorporate. For each Control, the layout of the parameter block together with the appropriate Control
Selector is listed for all forms of the Get/Set Feature Unit Control request. The Control Selector codes are
defined in Section A.10.2, “Feature Unit Control Selectors.”
5.2.2.4.3.1 Mute Control
The Mute Control is one of the building blocks of a Feature Unit. A Mute Control can have only the
current setting attribute (CUR). The position of a Mute Control CUR attribute can be either TRUE or
FALSE.
In the first form of the request, a particular Mute Control within a Feature Unit is addressed through the
Unit ID and Channel Number fields of the Set/Get Feature Unit Control request. The valid range for the
Channel Number field is from zero (the ‘master’ channel) up to the number of logical channels in the
audio channel cluster.
Table 5-16: First Form of the Mute Control Parameter Block
Control Selector MUTE_CONTROL
wLength 1
最終更新:2011年05月02日 03:34