約 1,061,253 件
https://w.atwiki.jp/usb_audio/pages/49.html
原文:Audio Device Document 1.0(PDF) USB Device Class Definition for Audio Devices Release 1.0 March 18, 1998 101 wProcessType Value CHORUS_PROCESS 0x05 DYN_RANGE_COMP_PROCESS 0x06 A.8 Audio Class-Specific Endpoint Descriptor Subtypes Table A-8 Audio Class-Specific Endpoint Descriptor Subtypes Descriptor Subtype Value DESCRIPTOR_UNDEFINED 0x00 EP_GENERAL 0x01 A.9 Audio Class-Specific Request Codes Table A-9 Audio Class-Specific Request Codes Class-Specific Request Code Value REQUEST_CODE_UNDEFINED 0x00 SET_ CUR 0x01 GET_ CUR 0x81 SET_ MIN 0x02 GET_ MIN 0x82 SET_ MAX 0x03 GET_ MAX 0x83 SET_ RES 0x04 GET_ RES 0x84 SET_MEM 0x05 GET_ MEM 0x85 GET_STAT 0xFF USB Device Class Definition for Audio Devices Release 1.0 March 18, 1998 102 A.10 Control Selector Codes A.10.1 Terminal Control Selectors Table A-10 Terminal Control Selectors Control Selector Value TE_CONTROL_UNDEFINED 0x00 COPY_PROTECT_CONTROL 0x01 A.10.2 Feature Unit Control Selectors Table A-11 Feature Unit Control Selectors Control Selector Value FU_CONTROL_UNDEFINED 0x00 MUTE_CONTROL 0x01 VOLUME_CONTROL 0x02 BASS_CONTROL 0x03 MID_CONTROL 0x04 TREBLE_CONTROL 0x05 GRAPHIC_EQUALIZER_CONTROL 0x06 AUTOMATIC_GAIN_CONTROL 0x07 DELAY_CONTROL 0x08 BASS_BOOST_CONTROL 0x09 LOUDNESS_CONTROL 0x0A A.10.3 Processing Unit Control Selectors A.10.3.1 Up/Down-mix Processing Unit Control Selectors Table A-12 Up/Down-mix Processing Unit Control Selectors Control Selector Value UD_CONTROL_UNDEFINED 0x00 UD_ENABLE_CONTROL 0x01 UD_MODE_SELECT_CONTROL 0x02 USB Device Class Definition for Audio Devices Release 1.0 March 18, 1998 103 A.10.3.2 Dolby PrologicÔ Processing Unit Control Selectors Table A-13 Dolby Prologic Processing Unit Control Selectors Control Selector Value DP_CONTROL_UNDEFINED 0x00 DP_ENABLE_CONTROL 0x01 DP_MODE_SELECT_CONTROL 0x02 A.10.3.3 3D Stereo Extender Processing Unit Control Selectors Table A-14 3D Stereo Extender Processing Unit Control Selectors Control Selector Value 3D_CONTROL_UNDEFINED 0x00 3D_ENABLE_CONTROL 0x01 SPACIOUSNESS_CONTROL 0x03 A.10.3.4 Reverberation Processing Unit Control Selectors Table A-15 Reverberation Processing Unit Control Selectors Control Selector Value RV_CONTROL_UNDEFINED 0x00 RV_ENABLE_CONTROL 0x01 REVERB_LEVEL_CONTROL 0x02 REVERB_TIME_CONTROL 0x03 REVERB_FEEDBACK_CONTROL 0x04 A.10.3.5 Chorus Processing Unit Control Selectors Table A-16 Chorus Processing Unit Control Selectors Control Selector Value CH_CONTROL_UNDEFINED 0x00 CH_ENABLE_CONTROL 0x01 CHORUS_LEVEL_CONTROL 0x02 CHORUS_RATE_CONTROL 0x03 USB Device Class Definition for Audio Devices Release 1.0 March 18, 1998 104 Control Selector Value CHORUS_DEPTH_CONTROL 0x04 A.10.3.6 Dynamic Range Compressor Processing Unit Control Selectors Table A-17 Dynamic Range Compressor Processing Unit Control Selectors Control Selector Value DR_CONTROL_UNDEFINED 0x00 DR_ENABLE_CONTROL 0x01 COMPRESSION_RATE_CONTROL 0x02 MAXAMPL_CONTROL 0x03 THRESHOLD_CONTROL 0x04 ATTACK_TIME 0x05 RELEASE_TIME 0x06 A.10.4 Extension Unit Control Selectors Table A-18 Extension Unit Control Selectors Control Selector Value XU_CONTROL_UNDEFINED 0x00 XU_ENABLE_CONTROL 0x01 A.10.5 Endpoint Control Selectors Table A-19 Endpoint Control Selectors Control Selector Value EP_CONTROL_UNDEFINED 0x00 SAMPLING_FREQ_CONTROL 0x01 PITCH_CONTROL 0x02 USB Device Class Definition for Audio Devices Release 1.0 March 18, 1998 105 Appendix B. Example 1 USB Microphone (Informative) B.1 Product Description The device described here is a USB Microphone. It is a very simple device that has no Audio Controls incorporated. It delivers a mono audio data stream to the Host over its AudioStreaming interface. The used Audio Data Format is 16-bit 8KHz PCM. The synchronization type is Asynchronous Source. It uses its internal clock as a reference. The following figure presents the internal topology of the microphone. AudioStreaming Interface AudioControl Interface Audio Function Desktop Microphone IT OT USB IN Endpoint Figure B-1 USB Microphone Topology The audio function contains one Input Terminal that represents the actual microphone pick-up element, followed by the Analog-to-Digital Converter (ADC). The digital output stream of the ADC enters the audio function through the single Output Pin of the Input Terminal. Because there is no further processing on the audio stream, the Input Terminal is directly connected to the Input Pin of the Output Terminal. The Output Terminal is the representation within the audio function of the USB IN endpoint that eventually delivers the audio data stream to the Host. The internals of the audio function are presented to the Host through the (mandatory) AudioControl interface whereas the USB IN endpoint resides in the AudioStreaming interface. B.2 Descriptor Hierarchy This USB Microphone device includes the AudioControl interface (interface 0) and a single AudioStreaming interface (interface 1). The AudioStreaming interface features two alternate settings. The first alternate setting (Alternate Setting 0) has zero bandwidth associated with it so that switching to this alternate setting effectively frees all allocated bandwidth on the USB for this device. Zero bandwidth is indicated by the lack of a streaming endpoint. Alternate Setting 1 is the operational part of the interface and it has one isochronous IN endpoint. Figure presents the descriptor hierarchy. 1 - 6 - 11 - 16 - 21 - 26 - 31 - 36 - 41 - 46 - 51 - 56 - 61 - 66 - 71 - 76 - 81 - 86 - 91 - 96 - 101 - 106 - 111 - 116 - 121 - 126 ここを編集
https://w.atwiki.jp/audio-sound/pages/19.html
【audio-technica ATH-CKS1100】情報量の多い丁寧な仕上がり オーディオテクニカ ハイレゾ対応カナルイヤホンaudio-technica SOLID BASS ATH-CKS1100 レビュー記事 【カナル型イヤホン audio-technica ATH-CKS1100 レビュー】個人的にこれはおすすめだ。情報量の多い丁寧に深掘りされた低音、低音に負けずに自然な仕上がりで尖りの少ない中高音。 おすすめ度 ☆☆☆☆☆ 価格帯 20000円~30000円 高域 A 突き抜け感のある気持ちいい音。 中域 B 歪みのない自然な音。 低域 A 重低音までパワフル。 リズム A 熱量を感じる。 遮音性 B 普通。 音漏れ B 普通。 備考 評価は価格帯におけるおおよその相対評価です。 特徴・付属品 この価格帯でここまでのイヤホンを仕上げてきたオーディオテクニカに素直に感嘆する。 ハイレゾ対応で低音重視のモデルという触れ込みだが、世に出回る低音重視のブーミーな感じや重厚さを重視した味付けとは異なり、音を掘り下げて重低音の源泉に近づいているような、湧き上がるような力強さのある味付け。 低音モデルでは低音が音場を支配して中高音の音色を潰したり変化させたり引っ張ったり、天井を知覚してしまったりという弊害が多々見られるが、このオーディオテクニカの低音はそうした我欲に満ちた音ではなく、曲全体に下からエネルギーを与えるマグマのような層となっている。音楽空間全体に地熱を与える、そんな目立たないが力強い下支えする低音だ。 そのおかげで音楽全体が活力溢れる、エネルギッシュなスタイルになっており、とくにロックナンバーとの相性がよい。 たとえばnano.RIPE「ツマビクヒトリ」。 この曲はパーカッションと重厚な音の支えの中を透明感のあるボーカルが流れていくスタイル。 しかも曲のところどころでスピード感が増したり、逆に演奏が鳴り止んで透明感を出したりと味付けの面白みが多い曲だが、それに見事に追随するのは素晴らしい。 低音は弾みと輪郭感があり、しかも籠もることがなくクリア。 そのためともすれば暗くなりがちなこの曲の導入部分などパーカッションが目立つ箇所を躍動感ある活きのいい疾走感に溢れたものにしていて、スピード感とアタック感がきれいに出ている。 重低音は重く静かに唸る感じで曲全体を下方向から熱気を持って支えていて、音場の広さの表現にも貢献している。 そして中高音はこうした低音の情報量に負けない、一貫性のある響きで、透明感がありながらも尖りの少ない暖かみのある音。 低音部のマグマのようなエネルギッシュな味付けと相まって、全体として熱量のあるあたたかさがある活力に満ちた音楽空間を実現していて、パッションに溢れている。 全体としてドンシャリ傾向ではあるが、バランス感覚に優れた味付けと言える。 総評 細かいところではケーブルが着脱式なのだが、なぜかコネクタは独自仕様なのが空気を読めていないなと思えるが、ほとんど文句をつけようのない出来に仕上がっているイヤホンだ。 この価格帯では文句なくおすすめできる製品の一つ。 オーディオテクニカ ハイレゾ対応カナルイヤホンaudio-technica SOLID BASS ATH-CKS1100 audio-sound.hatenablog.jp
https://w.atwiki.jp/usb_audio/pages/42.html
原文:Audio Device Document 1.0(PDF) USB Device Class Definition for Audio Devices Release 1.0 March 18, 1998 66 5.2.1.1 Set Request This request is used to set an attribute of a Control inside an Entity of the audio function. Additionally, the memory space attribute of an Entity itself can be set through this request. Table 5-1 Set Request Values bmRequest Type bRequest wValue wIndex wLength Data 00100001B Entity ID and Interface 00100010B SET_CUR SET_MIN SET_MAX SET_RES SET_MEM See following paragraphs Endpoint Length of parameter block Parameter block The bmRequestType field specifies that this is a SET request (D7=0b0). It is a class-specific request (D6..5=0b01), directed to either the AudioControl interface or an AudioStreaming interface of the audio function (D4..0=0b00001) or the isochronous endpoint of an AudioStreaming interface (D4..0=0b00010). The bRequest field contains a constant, identifying which attribute of the addressed Control or Entity is to be modified. Possible attributes for a Control are its · Current setting attribute (SET_CUR) · Minimum setting attribute (SET_MIN) · Maximum setting attribute (SET_MAX) · Resolution attribute (SET_RES) Possible attributes for an Entity are its · Memory space attribute (SET_MEM) If the addressed Control or Entity does not support modification of a certain attribute, the control pipe must indicate a stall when an attempt is made to modify that attribute. In most cases, only the CUR and MEM attribute will be supported for the Set request. However, this specification does not prevent a designer from making other attributes programmable. For the list of Request constants, refer to Section A.9, “Audio Class-Specific Request Codes.” The wValue field interpretation is qualified by the value in the wIndex field. Depending on what Entity is addressed, the layout of the wValue field changes. The following paragraphs describe the contents of the wValue field for each Entity separately. In most cases, the wValue field contains the Control Selector (CS) in the high byte. It is used to address a particular Control within Entities that can contain multiple Controls. If the Entity only contains a single Control, there is no need to specify a Control Selector and the wValue field can be used to pass additional parameters. The wIndex field specifies the interface or endpoint to be addressed in the low byte and the Entity ID or zero in the high byte. In case an interface is addressed, the virtual Entity ‘interface’ can be addressed by specifying zero in the high byte. The values in wIndex must be appropriate to the recipient. Only existing Entities in the audio function can be addressed and only appropriate interface or endpoint numbers may be used. If the request specifies an unknown or non-Entity ID or an unknown interface or endpoint number, the control pipe must indicate a stall. The actual parameter(s) for the Set request are passed in the data stage of the control transfer. The length of the parameter block is indicated in the wLength field of the request. The layout of the parameter block is qualified by both the bRequest and wIndex fields. Refer to the following sections for a detailed description of the parameter block layout for all possible Entities. USB Device Class Definition for Audio Devices Release 1.0 March 18, 1998 67 5.2.1.2 Get Request This request returns the attribute setting of a specific Control inside an Entity of the audio function. Additionally, the memory space attribute of an Entity itself can be returned through this request. Table 5-2 Get Request Values bmRequest Type bRequest wValue wIndex wLength Data 10100001B Entity ID and Interface 10100010B GET_CUR GET_MIN GET_MAX GET_RES GET_MEM See following paragraphs Endpoint Length of parameter block Parameter block The bmRequestType field specifies that this is a GET request (D7=0b1). It is a class-specific request (D6..5=0b01), directed to either the AudioControl interface or an AudioStreaming interface of the audio function (D4..0=0b00001) or the isochronous endpoint of an AudioStreaming interface (D4..0=0b00010). The bRequest field contains a constant, identifying which attribute of the addressed Control or Entity is to be returned. Possible attributes for a Control are its · Current setting attribute (GET_CUR) · Minimum setting attribute (GET_MIN) · Maximum setting attribute (GET_MAX) · Resolution attribute (GET_RES) Possible attributes for an Entity are its · Memory space attribute (GET_MEM) If the addressed Control or Entity does not support readout of a certain attribute, the control pipe must indicate a stall when an attempt is made to read that attribute. For the list of Request constants, refer to Section A.9, “Audio Class-Specific Request Codes.” The wValue field interpretation is qualified by the value in the wIndex field. Depending on what Entity is addressed, the layout of the wValue field changes. The following paragraphs describe the contents of the wValue field for each Entity separately. In most cases, the wValue field contains the Control Selector (CS) in the high byte. It is used to address a particular Control within Entities that can contain multiple Controls. If the Entity only contains a single Control, there is no need to specify a Control Selector and the wValue field can be used to pass additional parameters. The wIndex field specifies the interface or endpoint to be addressed in the low byte and the Entity ID or zero in the high byte. In case an interface is addressed, the virtual Entity ‘interface’ can be addressed by specifying zero in the high byte. The values in wIndex must be appropriate to the recipient. Only existing Entities in the audio function can be addressed and only appropriate interface or endpoint numbers may be used. If the request specifies an unknown or non-Entity ID or an unknown interface or endpoint number, the control pipe must indicate a stall. The actual parameter(s) for the Get request are returned in the data stage of the control transfer. The length of the parameter block to return is indicated in the wLength field of the request. If the parameter block is longer than what is indicated in the wLength field, only the initial bytes of the parameter block are returned. If the parameter block is shorter than what is indicated in the wLength field, the device indicates the end of the control transfer by sending a short packet when further data is requested. The layout of the parameter block is qualified by both the bRequest and wIndex fields. Refer to the following sections for a detailed description of the parameter block layout for all possible Entities. USB Device Class Definition for Audio Devices Release 1.0 March 18, 1998 68 5.2.2 AudioControl Requests The following sections describe the possible requests that can be used to manipulate the audio Controls an audio function exposes through its Units. The same layout of the parameter blocks is used for both the Set and Get requests. 5.2.2.1 Terminal Control Requests The following paragraphs describe the Set and Get Terminal Control requests. 5.2.2.1.1 Set Terminal Control Request This request is used to set an attribute of a Terminal Control inside a Terminal of the audio function. Table 5-3 Set Terminal Control Request Values bmRequest Type bRequest wValue wIndex wLength Data 00100001B SET_CUR SET_MIN SET_MAX SET_RES CS Terminal 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 specifies the Control Selector (CS) in the high byte and zero in the low byte. The Control Selector indicates which type of Control this request is manipulating. If the request specifies an unknown or unsupported CS to that Terminal, the control pipe must indicate a stall. For a description of the parameter block for the Terminal Controls, see Section 5.2.2.1.3, “Terminal Controls.” 5.2.2.1.2 Get Terminal Control Request This request returns the attribute setting of a specific Terminal Control inside a Terminal of the audio function. Table 5-4 Get Terminal Control Request Values bmRequest Type bRequest wValue wIndex wLength Data 10100001B GET_CUR GET_MIN GET_MAX GET_RES CS Terminal 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 zero in the low byte. The Control Selector indicates which type of Control this request is addressing. If the request specifies an unknown or unsupported CS to that Terminal, the control pipe must indicate a stall. For a description of the parameter block for the Terminal Controls, see Section 5.2.2.1.3, “Terminal Controls.” USB Device Class Definition for Audio Devices Release 1.0 March 18, 1998 69 5.2.2.1.3 Terminal Controls For the time being, this specification defines only one Terminal Control. The following section presents a detailed description. 5.2.2.1.3.1 Copy Protect Control The Copy Protect Control is used to manipulate the Copy Protection Level (CPL) associated with a particular Terminal. Not all Terminals are required to support this Control. Only the Terminals that represent a connection to the audio function where audio streams enter or leave the audio function in a form that enables lossless duplication should consider Copy Protect Control. Input Terminals in this category should only support the Get Terminal Copy Protect Control request whereas Output Terminals in the same category should only support the Set Terminal Copy Protect Control request. A Copy Protect Control only supports the CUR attribute. The settings for the CUR attribute range from 0 to 2. This means · 0 CPL0 Copying is permitted without restriction. The material is either not copyrighted, or the copyright is not asserted. · 1 CPL1 One generation of copies may be made. The material is copyright protected and is the original. · 2 CPL2 The material is copyright protected and no digital copying is permitted. The Copy Protect Control honors the request to the best of its abilities. It may round the bCopyProtect attribute value to its closest available setting. It will report this setting when queried during a Get Control request. Table 5-5 Copy Protect Control Parameter Block Control Selector COPY_PROTECT_CONTROL wLength 1 Offset Field Size Value Description 0 bCopyProtect 1 Number The setting for the CUR attribute of the CopyProtect Control. 0x00 CPL0 0x01 CPL1 0x02 CPL2 5.2.2.2 Mixer Unit Control Requests The following paragraphs describe the Set and Get Mixer Unit Control requests. The Set Mixer Unit Control request can have two forms. The first form must be supported while the second form can be optionally implemented. The Get Mixer Unit Control request can have three forms. The first form must be supported, while the second and third form can be optionally implemented. If the second form of the Set request is implemented, the second form of the Get request must also be implemented. USB Device Class Definition for Audio Devices Release 1.0 March 18, 1998 70 5.2.2.2.1 Set Mixer Unit Control Request This request is used to set an attribute of a Mixer Control inside a Mixer Unit of the audio function. Table 5-6 Set Mixer Unit Control Request Values bmRequest Type bRequest wValue wIndex wLength Data 00100001B SET_CUR SET_MIN SET_MAX SET_RES ICN and OCN Mixer 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. Because the Mixer Unit only contains a single type of Control, there is no need for a Control Selector. Instead, the wValue field specifies the Input Channel Number (ICN) in the high byte and the Output Channel Number (OCN) in the low byte of the Mixer Control to be influenced. The ICN is derived from both the input cluster number and the logical channel number within that cluster, according to the rules 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 or refers to a non-programmable Mixer Control in the Mixer Unit, the control pipe must indicate a stall. A special case arises when the Input Channel Number and Output Channel Number are both set to 0xFF. Then a single Set Mixer Unit Control request can be used to set an attribute of all the programmable Mixer Controls within the Unit. The number of parameters passed in the parameter block must exactly match the number of programmable Mixer Controls in the Unit. If this is not the case, the control pipe must indicate a stall. 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 must contain an attribute setting for every Mixer Control that has its bit set in the bmControls field. The previous description is referred to as the second form of the Set Mixer Unit Control request. For a description of the parameter block for the Set Mixer Unit Control request, see Section 5.2.2.2.3, “Mixer Control.” 5.2.2.2.2 Get Mixer Unit Control Request This request returns the attribute setting of a specific Mixer Control inside a Mixer Unit of the audio function. Table 5-7 Get Mixer Unit Control Request Values bmRequest Type bRequest wValue wIndex wLength Data 10100001B GET_CUR GET_MIN GET_MAX GET_RES ICN and OCN Mixer Unit ID and Interface Length of parameter block Parameter block The bRequest field indicates which attribute the request is reading Because the Mixer Unit only contains a single type of Control, there is no need for a Control Selector. Instead, the wValue field specifies the Input Channel Number (ICN) in the high byte and the Output Channel Number (OCN) in the low byte of the Mixer Control to be retrieved. The ICN is derived from both the input cluster number and the logical channel number within that cluster, according to the rules 1 - 6 - 11 - 16 - 21 - 26 - 31 - 36 - 41 - 46 - 51 - 56 - 61 - 66 - 71 - 76 - 81 - 86 - 91 - 96 - 101 - 106 - 111 - 116 - 121 - 126 ここを編集
https://w.atwiki.jp/usb_audio/pages/56.html
原文:Audio Devices Rev. 2.0 Spec and Adopters Agreement(ZIP) USB Device Class Definition for Audio Devices Release 2.0 May 31, 2006 6 Table of Contents Scope of This Release.............................................................................................................2 Contributors............................................................................................................................2 Revision History.......................................................................................................................2 Table of Contents.....................................................................................................................6 List of Tables...........................................................................................................................9 List of Figures........................................................................................................................12 1 Introduction....................................................................................................................13 1.1 Scope.........................................................................................................................13 1.2 Purpose.....................................................................................................................13 1.3 Related Documents...................................................................................................13 1.4 Terms and Abbreviations...........................................................................................13 2 Management Overview...................................................................................................16 2.1 Overview of Key Differences between ADC v1.0 and v2.0.......................................16 3 Functional Characteristics.............................................................................................18 3.1 Introduction................................................................................................................18 3.2 Audio Interface Collection (AIC)................................................................................19 3.3 Audio Function Class.................................................................................................19 3.4 Audio Function Subclass...........................................................................................19 3.5 Audio Function Protocol............................................................................................19 3.6 Audio Interface Class................................................................................................20 3.7 Audio Interface Subclass...........................................................................................20 3.8 Audio Interface Protocol............................................................................................20 3.9 Audio Function Category...........................................................................................20 3.10 Clock Domains.......................................................................................................21 3.11 Audio Synchronization Types................................................................................21 3.11.1 Asynchronous.................................................................................................21 3.11.2 Synchronous...................................................................................................21 3.11.3 Adaptive..........................................................................................................21 3.12 Inter Channel Synchronization...............................................................................21 3.13 Audio Function Topology.......................................................................................22 3.13.1 Audio Channel Cluster....................................................................................25 3.13.2 Input Terminal.................................................................................................27 3.13.3 Output Terminal..............................................................................................28 3.13.4 Mixer Unit........................................................................................................29 3.13.5 Selector Unit...................................................................................................29 3.13.6 Feature Unit....................................................................................................30 3.13.7 Sampling Rate Converter Unit........................................................................30 3.13.8 Effect Unit.......................................................................................................31 3.13.9 Processing Unit...............................................................................................34 3.13.10 Extension Unit.................................................................................................35 USB Device Class Definition for Audio Devices Release 2.0 May 31, 2006 7 3.13.11 Clock Entities..................................................................................................36 3.14 Encoders and Decoders........................................................................................37 3.15 Copy Protection.....................................................................................................38 3.16 Operational Model..................................................................................................38 3.16.1 AudioControl Interface....................................................................................39 3.16.2 AudioStreaming Interface...............................................................................39 3.16.3 Clock Model....................................................................................................41 3.16.4 Binding between Physical Buttons and Audio Controls.................................41 4 Descriptors.....................................................................................................................43 4.1 Audio Channel Cluster Descriptor.............................................................................43 4.2 Device Descriptor......................................................................................................45 4.3 Device_Qualifier Descriptor.......................................................................................45 4.4 Configuration Descriptor............................................................................................46 4.5 Other_Speed_Configuration Descriptor....................................................................46 4.6 Interface Association Descriptor................................................................................46 4.7 AudioControl Interface Descriptors...........................................................................47 4.7.1 Standard AC Interface Descriptor......................................................................47 4.7.2 Class-Specific AC Interface Descriptor..............................................................48 4.8 AudioControl Endpoint Descriptors...........................................................................73 4.8.1 AC Control Endpoint Descriptors.......................................................................74 4.8.2 AC Interrupt Endpoint Descriptors.....................................................................74 4.9 AudioStreaming Interface Descriptors.......................................................................75 4.9.1 Standard AS Interface Descriptor......................................................................75 4.9.2 Class-Specific AS Interface Descriptor..............................................................75 4.9.3 Class-Specific AS Format Type Descriptor........................................................77 4.9.4 Class-Specific AS Encoder Descriptor...............................................................77 4.9.5 Class-Specific AS Decoder Descriptor..............................................................78 4.10 AudioStreaming Endpoint Descriptors...................................................................85 4.10.1 AS Isochronous Audio Data Endpoint Descriptors.........................................85 4.10.2 AS Isochronous Feedback Endpoint Descriptor.............................................87 5 Requests.........................................................................................................................89 5.1 Standard Requests....................................................................................................89 5.2 Class-Specific Requests............................................................................................89 5.2.1 Control Attributes................................................................................................89 5.2.2 Control Request Layout......................................................................................90 5.2.3 Control Request Parameter Block Layout..........................................................91 5.2.4 Common Controls..............................................................................................94 5.2.5 AudioControl Requests......................................................................................97 5.2.6 AudioStreaming Requests...............................................................................116 5.2.7 Additional Requests.........................................................................................127 6 Interrupts......................................................................................................................129 6.1 Interrupt Data Message...........................................................................................129 6.2 Interrupt Sources.....................................................................................................130 USB Device Class Definition for Audio Devices Release 2.0 May 31, 2006 8 Appendix A. Audio Device Class Codes.....................................................................131 A.1 Audio Function Class Code.....................................................................................131 A.2 Audio Function Subclass Codes.............................................................................131 A.3 Audio Function Protocol Codes...............................................................................131 A.4 Audio Interface Class Code.....................................................................................131 A.5 Audio Interface Subclass Codes.............................................................................131 A.6 Audio Interface Protocol Codes...............................................................................132 A.7 Audio Function Category Codes.............................................................................132 A.8 Audio Class-Specific Descriptor Types...................................................................132 A.9 Audio Class-Specific AC Interface Descriptor Subtypes.........................................133 A.10 Audio Class-Specific AS Interface Descriptor Subtypes.....................................133 A.11 Effect Unit Effect Types.......................................................................................134 A.12 Processing Unit Process Types...........................................................................134 A.13 Audio Class-Specific Endpoint Descriptor Subtypes...........................................134 A.14 Audio Class-Specific Request Codes..................................................................134 A.15 Encoder Type Codes...........................................................................................135 A.16 Decoder Type Codes...........................................................................................135 A.17 Control Selector Codes........................................................................................135 A.17.1 Clock Source Control Selectors....................................................................135 A.17.2 Clock Selector Control Selectors..................................................................136 A.17.3 Clock Multiplier Control Selectors.................................................................136 A.17.4 Terminal Control Selectors...........................................................................136 A.17.5 Mixer Control Selectors................................................................................136 A.17.6 Selector Control Selectors............................................................................137 A.17.7 Feature Unit Control Selectors.....................................................................137 A.17.8 Effect Unit Control Selectors........................................................................138 A.17.9 Processing Unit Control Selectors................................................................140 A.17.10 Extension Unit Control Selectors..................................................................141 A.17.11 AudioStreaming Interface Control Selectors................................................141 A.17.12 Encoder Control Selectors............................................................................142 A.17.13 Decoder Control Selectors...........................................................................142 A.17.14 Endpoint Control Selectors...........................................................................144 USB Device Class Definition for Audio Devices Release 2.0 May 31, 2006 9 List of Tables Table 4-1 Audio Channel Cluster Descriptor.....................................................................44 Table 4-1 Dolby Prologic Cluster Descriptor.....................................................................44 Table 4-2 Left Group Cluster Descriptor............................................................................44 Table 4-3 Standard Interface Association Descriptor.......................................................46 Table 4-4 Standard AC Interface Descriptor......................................................................47 Table 4-5 Class-Specific AC Interface Header Descriptor................................................48 Table 4-6 Clock Source Descriptor.....................................................................................49 Table 4-7 Clock Selector Descriptor...................................................................................50 Table 4-8 Clock Multiplier Descriptor.................................................................................51 Table 4-9 Input Terminal Descriptor...................................................................................53 Table 4-10 Output Terminal Descriptor..............................................................................54 Table 4-11 Mixer Unit Descriptor.........................................................................................57 Table 4-12 Selector Unit Descriptor....................................................................................58 Table 4-13 Feature Unit Descriptor.....................................................................................59 Table 4-14 Sampling Rate Converter Unit Descriptor.......................................................60 Table 4-15 Common Part of the Effect Unit Descriptor....................................................61 Table 4-16 Parametric Equalizer Section Effect Unit Descriptor.....................................62 Table 4-17 Reverberation Effect Unit Descriptor...............................................................63 Table 4-18 Modulation Delay Effect Unit Descriptor.........................................................63 Table 4-19 Dynamic Range Compressor Effect Unit Descriptor......................................64 Table 4-20 Common Part of the Processing Unit Descriptor...........................................66 Table 4-21 Up/Down-mix Processing Unit Descriptor......................................................68 Table 4-22 Dolby Prologic Processing Unit Descriptor....................................................69 Table 4-23 Stereo Extender Processing Unit Descriptor..................................................71 Table 4-24 Extension Unit Descriptor.................................................................................73 Table 4-25 Standard AC Interrupt Endpoint Descriptor....................................................74 Table 4-26 Standard AS Interface Descriptor....................................................................75 Table 4-27 Class-Specific AS Interface Descriptor...........................................................76 Table 4-28 Encoder Descriptor............................................................................................77 Table 4-29 MPEG Decoder Descriptor................................................................................79 Table 4-30 AC-3 Decoder Descriptor..................................................................................81 Table 4-31 WMA Decoder Descriptor..................................................................................83 Table 4-32 DTS Decoder Descriptor...................................................................................84 Table 4-33 Standard AS Isochronous Audio Data Endpoint Descriptor.........................85 Table 4-34 Class-Specific AS Isochronous Audio Data Endpoint Descriptor................87 USB Device Class Definition for Audio Devices Release 2.0 May 31, 2006 10 Table 4-35 Standard AS Isochronous Feedback Endpoint Descriptor...........................87 Table 5-1 Request Layout....................................................................................................90 Table 5-2 1-byte Control CUR Parameter Block................................................................92 Table 5-3 1-byte Control RANGE Parameter Block...........................................................92 Table 5-4 2-byte Control CUR Parameter Block................................................................93 Table 5-5 2-byte Control RANGE Parameter Block...........................................................93 Table 5-6 4-byte Control CUR Parameter Block................................................................93 Table 5-7 4-byte Control RANGE Parameter Block...........................................................94 Table 5-8 Cluster Control CUR Parameter Block..............................................................95 Table 5-9 Error Codes..........................................................................................................96 Table 5-10 Connector Control CUR Parameter Block.....................................................100 Table 5-11 Band Numbers and Center Frequencies (ANSI S1.11-1986 Standard).......104 Table 5-12 Graphic Equalizer Control CUR Parameter Block........................................105 Table 5-13 Graphic Equalizer Control RANGE Parameter Block...................................105 Table 5-14 Valid Alternate Settings Control CUR Parameter Block..............................117 Table 5-15 High/Low Scaling Control CUR Parameter Block.........................................122 Table 5-16 High/Low Scaling Control RANGE Parameter Block...................................122 Table 5-17 High/Low Scaling Control CUR Parameter Block.........................................125 Table 5-18 High/Low Scaling Control RANGE Parameter Block...................................125 Table 5-19 Memory Request Values..................................................................................128 Table 6-1 Interrupt Data Message Format........................................................................130 Table A-1 Audio Function Class Code.............................................................................131 Table A-2 Audio Function Subclass Codes.....................................................................131 Table A-3 Audio Function Protocol Codes......................................................................131 Table A-4 Audio Interface Class Code..............................................................................131 Table A-5 Audio Interface Subclass Codes.....................................................................131 Table A-6 Audio Interface Protocol Codes.......................................................................132 Table A-7 Audio Function Category Codes.....................................................................132 Table A-8 Audio Class-specific Descriptor Types...........................................................132 Table A-9 Audio Class-Specific AC Interface Descriptor Subtypes..............................133 Table A-10 Audio Class-Specific AS Interface Descriptor Subtypes............................133 Table A-11 Effect Unit Effect Types..................................................................................134 Table A-12 Processing Unit Process Types.....................................................................134 Table A-13 Audio Class-Specific Endpoint Descriptor Subtypes..................................134 Table A-14 Audio Class-Specific Request Codes...........................................................134 Table A-15 Encoder Type Codes.......................................................................................135 1 - 6 - 11 - 16 - 21 - 26 - 31 - 36 - 41 - 46 - 51 - 56 - 61 - 66 - 71 - 76 - 81 - 86 - 91 - 96 - 101 - 106 - 111 - 116 - 121 - 126 - 131 - 136 - 141 ここを編集
https://w.atwiki.jp/usb_audio/pages/50.html
原文:Audio Device Document 1.0(PDF) USB Device Class Definition for Audio Devices Release 1.0 March 18, 1998 106 Interface 0 Device Configuration AudioControl I/F Header Microphone IT Standard Descriptors Class-Specific Descriptors USB OUT SU AS I/F Alt. Setting 0 Interface 1 AS I/F Alt. Setting 1 General Type I Format Endpoint Endpoint ID1 ID2 Figure B-2 USB Microphone Descriptor Hierarchy B.3 Descriptors The following sections present all the descriptors that are used to describe the device. B.3.1 Device Descriptor Table B-1 USB Microphone Device Descriptor Offset Field Size Value Description 0 bLength 1 0x12 Size of this descriptor, in bytes. 1 bDescriptorType 1 0x01 DEVICE descriptor. 2 bcdUSB 2 0x0100 1.00 - current revision of USB specification. 4 bDeviceClass 1 0x00 Device defined at Interface level. 5 bDeviceSubClass 1 0x00 Unused. 6 bDeviceProtocol 1 0x00 Unused. 7 bMaxPacketSize0 1 0x08 8 bytes. 8 idVendor 2 0xXXXX Vendor ID. 10 idProduct 2 0xXXXX Product ID. USB Device Class Definition for Audio Devices Release 1.0 March 18, 1998 107 Offset Field Size Value Description 12 bcdDevice 2 0xXXXX Device Release Code. 14 iManufacturer 1 0x01 Index to string descriptor that contains the string Your Name in Unicode. 15 iProduct 1 0x02 Index to string descriptor that contains the string Your Product Name in Unicode. 16 iSerialNumber 1 0x00 Unused. 17 bNumConfigurations 1 0x01 One configuration. B.3.2 Configuration Descriptor Table B-2 USB Microphone Configuration Descriptor Offset Field Size Value Description 0 bLength 1 0x09 Size of this descriptor, in bytes. 1 bDescriptorType 1 0x02 CONFIGURATION descriptor. 2 wTotalLength 2 0x0064 Length of the total configuration block, including this descriptor, in bytes. 4 bNumInterfaces 1 0x02 Two interfaces. 5 bConfigurationValue 1 0x01 ID of this configuration. 6 iConfiguration 1 0x00 Unused. 7 bmAttributes 1 0x80 Bus Powered device, not Self Powered, no Remote wakeup capability. 8 MaxPower 1 0x0A 20 mA Max. power consumption. B.3.3 AudioControl Interface Descriptor The AudioControl interface describes the device structure (audio function topology) and is used to manipulate the Audio Controls. B.3.3.1 Standard AC Interface Descriptor The AudioControl interface has no dedicated endpoints associated with it. It uses the default pipe (endpoint 0) for all communication purposes. Class-specific AudioControl Requests are sent using the default pipe. There is no Status Interrupt endpoint provided. Table B-3 USB Microphone Standard AC Interface Descriptor Offset Field Size Value Description USB Device Class Definition for Audio Devices Release 1.0 March 18, 1998 108 Offset Field Size Value Description 0 bLength 1 0x09 Size of this descriptor, in bytes. 1 bDescriptorType 1 0x04 INTERFACE descriptor. 2 bInterfaceNumber 1 0x00 Index of this interface. 3 bAlternateSetting 1 0x00 Index of this setting. 4 bNumEndpoints 1 0x00 0 endpoints. 5 bInterfaceClass 1 0x01 AUDIO. 6 bInterfaceSubclass 1 0x01 AUDIO_CONTROL. 7 bInterfaceProtocol 1 0x00 Unused. 8 iInterface 1 0x00 Unused. B.3.3.2 Class-specific AC Interface Descriptor The Class-specific AC interface descriptor is always headed by a Header descriptor that contains general information about the AudioControl interface. It contains all the pointers needed to describe the Audio Interface Collection, associated with the described audio function. Table B-4 USB Microphone Class-specific AC Interface Descriptor Offset Field Size Value Description 0 bLength 1 0x09 Size of this descriptor, in bytes. 1 bDescriptorType 1 0x24 CS_INTERFACE. 2 bDescriptorSubtype 1 0x01 HEADER subtype. 3 bcdADC 2 0x0100 Revision of class specification - 1.0 5 wTotalLength 2 0x001E Total size of class specific descriptors. 7 bInCollection 1 0x01 Number of streaming interfaces. 8 baInterfaceNr(1) 1 0x01 AudioStreaming interface 1 belongs to this AudioControl interface. B.3.3.3 Input Terminal Descriptor This descriptor describes the Input Terminal that represents the microphone capsule, followed by the Ato- D converter. The resulting digital audio stream leaves the Input Terminal through the single Output Pin. The audio channel cluster contains a single logical channel (bNrChannels=1) and there is no spatial location associated with this mono channel (wChannelConfig=0x0000). USB Device Class Definition for Audio Devices Release 1.0 March 18, 1998 109 Table B-5 USB Microphone Input Terminal Descriptor Offset Field Size Value Description 0 bLength 1 0x0C Size of this descriptor, in bytes. 1 bDescriptorType 1 0x24 CS_INTERFACE. 2 bDescriptorSubtype 1 0x02 INPUT_TERMINAL subtype. 3 bTerminalID 1 0x01 ID of this Input Terminal. 4 wTerminalType 2 0x0201 Terminal is Microphone. 6 bAssocTerminal 1 0x00 No association. 7 bNrChannels 1 0x01 One channel. 8 wChannelConfig 2 0x0000 Mono sets no position bits. 10 iChannelNames 1 0x00 Unused. 11 iTerminal 1 0x00 Unused. B.3.3.4 Output Terminal Descriptor This descriptor describes the Output Terminal that represents the USB pipe to the Host PC. Its Input Pin is directly connected to the Output Pin of the Input Terminal (bSourceID= Input Terminal ID). Table B-6 USB Microphone Output Terminal Descriptor Offset Field Size Value Description 0 bLength 1 0x09 Size of this descriptor, in bytes. 1 bDescriptorType 1 0x24 CS_INTERFACE. 2 bDescriptorSubtype 1 0x03 OUTPUT_TERMINAL subtype. 3 bTerminalID 1 0x02 ID of this Output Terminal. 4 wTerminalType 2 0x0101 USB Streaming. 6 bAssocTerminal 1 0x00 Unused. 7 bSourceID 1 0x01 From Input Terminal. 8 iTerminal 1 0x00 Unused. B.3.4 AudioStreaming Interface Descriptor The AudioStreaming interface has two possible alternate settings. USB Device Class Definition for Audio Devices Release 1.0 March 18, 1998 110 B.3.4.1 Zero-bandwidth Alternate Setting 0 Alternate setting 0 is a zero-bandwidth setting, used to relinquish the claimed bandwidth on the bus when the microphone is not in use. It is the default setting after power-up. The zero bandwidth is implemented by specifying that this alternate setting of the interface has no endpoints associated with it (bNumEndpoints=0). The collection of descriptors for this alternate setting reduces to the standard interface descriptor. B.3.4.1.1.1 Standard AS Interface Descriptor Table B-7 USB Microphone Standard AS Interface Descriptor (Alt. Set. 0) Offset Field Size Value Description 0 bLength 1 0x09 Size of this descriptor, in bytes. 1 bDescriptorType 1 0x04 INTERFACE descriptor. 2 bInterfaceNumber 1 0x01 Index of this interface. 3 bAlternateSetting 1 0x00 Index of this alternate setting. 4 bNumEndpoints 1 0x00 0 endpoints. 5 bInterfaceClass 1 0x01 AUDIO. 6 bInterfaceSubclass 1 0x02 AUDIO_STREAMING. 7 bInterfaceProtocol 1 0x00 Unused. 8 iInterface 1 0x00 Unused. B.3.4.2 Operational Alternate Setting 1 Alternate setting 1 is the operational setting of the interface. It contains the standard and class-specific interface and endpoint descriptors. B.3.4.2.1.1 Standard AS Interface Descriptor Table B-8 USB Microphone Standard AS Interface Descriptor Offset Field Size Value Description 0 bLength 1 0x09 Size of this descriptor, in bytes. 1 bDescriptorType 1 0x04 INTERFACE descriptor. 2 bInterfaceNumber 1 0x01 Index of this interface. 3 bAlternateSetting 1 0x01 Index of this alternate setting. 4 bNumEndpoints 1 0x01 One endpoint. 5 bInterfaceClass 1 0x01 AUDIO. 1 - 6 - 11 - 16 - 21 - 26 - 31 - 36 - 41 - 46 - 51 - 56 - 61 - 66 - 71 - 76 - 81 - 86 - 91 - 96 - 101 - 106 - 111 - 116 - 121 - 126 ここを編集
https://w.atwiki.jp/usb_audio/pages/37.html
原文:Audio Device Document 1.0(PDF) USB Device Class Definition for Audio Devices Release 1.0 March 18, 1998 41 The bNrInPins field contains the number of Input Pins (p) of the Mixer Unit. This evidently equals the number of audio channel clusters that enter the Mixer Unit. The connectivity of the Input Pins is described via the baSourceID() array, containing p elements. The index i into the array is one-based and directly related to the Input Pin numbers. BaSourceID(i) contains the ID of the Unit or Terminal to which Input Pin i is connected. The cluster descriptors, describing the logical channels entering the Mixer Unit are not repeated here. It is up to the Host software to trace the connections ‘upstream’ to locate the cluster descriptors pertaining to the audio channel clusters. As mentioned before, every input channel can virtually be mixed into all of the output channels. If n is thetotal number of logical input channels, contained in all the audio channel clusters that are entering the Mixer Unit ここに式 and m is the number of logical output channels, then there are n x m mixing Controls in the Mixer Unit, some of which may not be programmable. cite(Note) Both n and m must be limited to 254. Because a Mixer Unit can redefine the spatial locations of the logical output channels, contained in its output cluster, there is a need for a Mixer output cluster descriptor. The bNrChannels, wChannelConfig and iChannelNames characterize the cluster that leaves the Mixer Unit over the single Output Pin (‘downstream’ connection). For a detailed description of the cluster descriptor, see Section 3.7.2.3, “Audio Channel Cluster Format.” The Mixer Unit Descriptor reports which Controls are programmable in the bmControls bitmap field. This bitmap must be interpreted as a two-dimensional bit array that has a row for each logical input channel and a column for each logical output channel. If a bit at position [u, v] is set, this means that the Mixer Unit contains a programmable mixing Control that connects input channel u to output channel v. If bit [u, v] is clear, this indicates that the connection between input channel u and output channel v is non-programmable. Its fixed value can be retrieved through the appropriate request. The valid range for u is from one to n. The valid range for v is from one to m. The bmControls field stores the bit array row after row where the MSb of the first byte corresponds to the connection between input channel 1 and output channel 1. If (n x m) is not an integer multiple of 8, the bit array is padded with zeros until an integer number of bytes is occupied. The number of bytes used to store the bit array, N, can be calculated as follows IF ((n x m) MOD 8) 0 THEN N = ((n x m) DIV 8) + 1 ELSE N = ((n x m) DIV 8) An index to a string descriptor is provided to further describe the Mixer Unit. The following table details the structure of the Mixer Unit descriptor. Table 4-5 Mixer Unit Descriptor Offset Field Size Value Description 0 bLength 1 Number Size of this descriptor, in bytes 10+p+N 1 bDescriptorType 1 Constant CS_INTERFACE descriptor type. 2 bDescriptorSubtype 1 Constant MIXER_UNIT descriptor subtype. USB Device Class Definition for Audio Devices Release 1.0 March 18, 1998 42 Offset Field Size Value Description 3 bUnitID 1 Number Constant uniquely identifying the Unit within the audio function. This value is used in all requests to address this Unit. 4 bNrInPins 1 Number Number of Input Pins of this Unit p 5 baSourceID(1) 1 Number ID of the Unit or Terminal to which the first Input Pin of this Mixer Unit is connected. … … … … … 5+(p-1) baSourceID (p) 1 Number ID of the Unit or Terminal to which the last Input Pin of this Mixer Unit is connected. 5+p bNrChannels 1 Number Number of logical output channels in the Mixer’s output audio channel cluster. 6+p wChannelConfig 2 Bitmap Describes the spatial location of the logical channels. 8+p iChannelNames 1 Index Index of a string descriptor, describing the name of the first logical channel. 9+p bmControls N Number Bit map indicating which mixing Controls are programmable. 9+p+N iMixer 1 Index Index of a string descriptor, describing the Mixer Unit. 4.3.2.4 Selector Unit Descriptor The Selector Unit is uniquely identified by the value in the bUnitID field of the Selector Unit descriptor (SUD). No other Unit or Terminal within the same alternate setting of the AudioControl interface may have the same ID. This value must be passed in the UnitID field of each request that is directed to the Selector Unit. The bNrInPins field contains the number of Input Pins (p) of the Selector Unit. The connectivity of the Input Pins is described via the baSourceID() array that contains p elements. The index i into the array is one-based and directly related to the Input Pin numbers. BaSourceID(i) contains the ID of the Unit or Terminal to which Input Pin i is connected. The cluster descriptors, describing the logical channels that enter the Selector Unit are not repeated here. In order for a Selector Unit to be legally connected, all of the audio channel clusters that enter the Selector Unit must have the same number of channels. However, the spatial locations of these channels may vary from cluster to cluster. Therefore, the Host software should trace all Input Pins to find their ‘upstream’ connection to locate the cluster descriptors for all the Input Pins that enter the Selector Unit. This further implies that the cluster descriptor, associated with the Output Pin of the Selector Unit can change dynamically, depending on the currently selected position of the Selector Unit. An index to a string descriptor is provided to further describe the Selector Unit. The following table details the structure of the Selector Unit descriptor. USB Device Class Definition for Audio Devices Release 1.0 March 18, 1998 43 Table 4-6 Selector Unit Descriptor Offset Field Size Value Description 0 bLength 1 Number Size of this descriptor, in bytes 6+p 1 bDescriptorType 1 Constant CS_INTERFACE descriptor type. 2 bDescriptorSubtype 1 Constant SELECTOR_UNIT descriptor subtype. 3 bUnitID 1 Number Constant uniquely identifying the Unit within the audio function. This value is used in all requests to address this Unit. 4 bNrInPins 1 Number Number of Input Pins of this Unit p 5 baSourceID(1) 1 Number ID of the Unit or Terminal to which the first Input Pin of this Selector Unit is connected. … … … … … 5+(p-1) baSourceID (p) 1 Number ID of the Unit or Terminal to which the last Input Pin of this Selector Unit is connected. 5+p iSelector 1 Index Index of a string descriptor, describing the Selector Unit. 4.3.2.5 Feature Unit Descriptor The Feature Unit is uniquely identified by the value in the bUnitID field of the Feature Unit descriptor (FUD). No other Unit or Terminal within the same alternate setting of the AudioControl interface may have the same ID. This value must be passed in the UnitID field of each request that is directed to the Feature Unit. The bSourceID field is used to describe the connectivity for this Feature Unit. It contains the ID of the Unit or Terminal to which this Feature Unit is connected via its Input Pin. The cluster descriptor, describing the logical channels entering the Feature Unit is not repeated here. It is up to the Host software to trace the connection ‘upstream’ to locate the cluster descriptor pertaining to this audio channel cluster. The bmaControls() array is an array of bit-maps, each indicating the availability of certain audio Controls for a specific logical channel or for the master channel 0. For future expandability, the number of bytes occupied by each element (n) of the bmaControls() array is indicated in the bControlSize field. The number of logical channels in the cluster is denoted by ch. An index to a string descriptor is provided to further describe the Feature Unit. The layout of the Feature Unit descriptor is detailed in the following table. Table 4-7 Feature Unit Descriptor Offset Field Size Value Description 0 bLength 1 Number Size of this descriptor, in bytes 7+(ch+1)*n USB Device Class Definition for Audio Devices Release 1.0 March 18, 1998 44 Offset Field Size Value Description 1 bDescriptorType 1 Constant CS_INTERFACE descriptor type. 2 bDescriptorSubtype 1 Constant FEATURE_UNIT descriptor subtype. 3 bUnitID 1 Number Constant uniquely identifying the Unit within the audio function. This value is used in all requests to address this Unit. 4 bSourceID 1 Constant ID of the Unit or Terminal to which this Feature Unit is connected. 5 bControlSize 1 Number Size in bytes of an element of the bmaControls() array n 6 bmaControls(0) n Bitmap A bit set to 1 indicates that the mentioned Control is supported for master channel 0 D0 MuteD1 VolumeD2 BassD3 MidD4 TrebleD5 Graphic EqualizerD6 Automatic GainD7 DelayD8 Bass BoostD9 LoudnessD10..(n*8-1) Reserved 6+n bmaControls(1) n Bitmap A bit set to 1 indicates that the mentioned Control is supported for logical channel 1. … … … … … 6+(ch*n) bmaControls(ch) n Bitmap A bit set to 1 indicates that the mentioned Control is supported for logical channel ch. 6+(ch+1)*n iFeature 1 Index Index of a string descriptor, describing this Feature Unit. 4.3.2.6 Processing Unit Descriptor The Processing Unit is uniquely identified by the value in the bUnitID field of the Processing Unit descriptor (PUD). No other Unit or Terminal within the same alternate setting of the AudioControl interface may have the same ID. This value must be passed in the UnitID field of each request that is directed to the Processing Unit. The wProcessType field contains a value that fully identifies the Processing Unit. For a list of all supported Processing Unit Types, see Section A.7, “Processing Unit Process Types.” The bNrInPins field contains the number of Input Pins (p) of the Processing Unit. The connectivity of the Input Pins is described via the baSourceID() array that contains p elements. The index i into the array is one-based and directly related to the Input Pin numbers. BaSourceID(i) contains the ID of the Unit or USB Device Class Definition for Audio Devices Release 1.0 March 18, 1998 45 Terminal to which Input Pin i is connected. The cluster descriptors, describing the logical channels entering the Processing Unit are not repeated here. It is up to the Host software to trace the connections ‘upstream’ to locate the cluster descriptors pertaining to the audio channel clusters. Because a Processing Unit can freely redefine the spatial locations of the logical output channels, contained in its output cluster, there is a need for an output cluster descriptor. The bNrChannels, wChannelConfig, and iChannelNames fields characterize the cluster that leaves the Processing Unit over the single Output Pin (‘downstream’ connection). For a detailed description of the cluster descriptor, see Section 3.7.2.3, “Audio Channel Cluster Format.” The bmControls field is a bitmap, indicating the availability of certain audio Controls in the Processing Unit. For future expandability, the number of bytes occupied by the bmControls field is indicated in the bControlSize field. In general, all Controls are optional. However, some Processing Types may define certain Controls as mandatory. In such a case, the appropriate bit in the bmControls field must be set to one. The meaning of the bits in the bmControls field is qualified by the wProcessType field. However, bit D0 always represents the Enable Processing Control for all Processing Unit Types. The Enable Processing Control is used to bypass the entire functionality of the Processing Unit. Default behavior is assumed when set to off. In case of a single Input Pin, logical channels entering the Unit are passed unaltered for those channels that are also present in the output cluster. Logical channels not available in the output cluster are absorbed by the Processing Unit. Logical channels present in the output cluster but unavailable in the input cluster are muted. In case of multiple Input Pins, corresponding logical input channels are equally mixed together before being passed to the output. If the Enable Processing Control is present in a Processing Unit, bit D0 must be set to one. Otherwise, it is set to zero, indicating that the Processing Unit cannot be bypassed. An index to a string descriptor is provided to further describe the Processing Unit. The previous fields are common to all Processing Units. However, depending on the value in the wProcessType field, a process-specific part is added to the descriptor. The following paragraphs describe these process-specific parts. The following table outlines the common part of the Processing Unit descriptor. Table 4-8 Common Part of the Processing Unit Descriptor Offset Field Size Value Description 0 bLength 1 Number Size of this descriptor, in bytes 13+p+n+x 1 bDescriptorType 1 Constant CS_INTERFACE descriptor type. 2 bDescriptorSubtype 1 Constant PROCESSING_UNIT descriptor subtype. 3 bUnitID 1 Number Constant uniquely identifying the Unit within the audio function. This value is used in all requests to address this Unit. 4 wProcessType 2 Constant Constant identifying the type of processing this Unit is performing. 6 bNrInPins 1 Number Number of Input Pins of this Unit p 1 - 6 - 11 - 16 - 21 - 26 - 31 - 36 - 41 - 46 - 51 - 56 - 61 - 66 - 71 - 76 - 81 - 86 - 91 - 96 - 101 - 106 - 111 - 116 - 121 - 126 ここを編集
https://w.atwiki.jp/ktkt531/pages/18.html
audio test aaa
https://w.atwiki.jp/usb_audio/pages/52.html
原文:Audio Device Document 1.0(PDF) USB Device Class Definition for Audio Devices Release 1.0 March 18, 1998 116 Offset Field Size Value Description 5 bDeviceSubClass 1 0x00 Unused. 6 bDeviceProtocol 1 0x00 Unused. 7 bMaxPacketSize0 1 0x08 8 bytes. 8 idVendor 2 0xXXXX Vendor ID. 10 idProduct 2 0xXXXX Product ID. 12 bcdDevice 2 0xXXXX Device Release Code. 14 iManufacturer 1 0x01 Index to string descriptor that contains the string Your Name in Unicode. 15 iProduct 1 0x02 Index to string descriptor that contains the string Your Product Name in Unicode. 16 iSerialNumber 1 0x00 Unused. 17 bNumConfiguration s 1 0x01 One configuration. C.3.2 Configuration Descriptor Table C-2 USB Telephone Configuration Descriptor Offset Field Size Value Description 0 bLength 1 0x09 Size of this descriptor, in bytes. 1 bDescriptorType 1 0x02 CONFIGURATION descriptor. 2 wTotalLength 2 0x00XX Length of the total configuration block, including this descriptor, in bytes. 4 bNumInterfaces 1 0x03 Three interfaces 5 bConfigurationValue 1 0x01 ID of this configuration 6 iConfiguration 1 0x00 Unused. 7 bmAttributes 1 0x60 Self Powered Remote Wakeup capable. 8 MaxPower 1 0x00 Not applicable. C.3.3 AudioControl Interface Descriptor The AudioControl interface describes the device structure and is used to manipulate the Audio Controls. USB Device Class Definition for Audio Devices Release 1.0 March 18, 1998 117 C.3.3.1 Standard AC Interface Descriptor The AudioControl interface has no dedicated endpoints associated with it. It uses the default pipe (endpoint 0) for all communication purposes. Class-specific AudioControl Requests are sent using the default pipe. There is no Status Interrupt endpoint provided. Table C-3 USB Telephone Standard AC Interface Descriptor Offset Field Size Value Description 0 bLength 1 0x09 Size of this descriptor, in bytes. 1 bDescriptorType 1 0x04 INTERFACE descriptor. 2 bInterfaceNumber 1 0x00 Index of this interface. 3 bAlternateSetting 1 0x00 Index of this setting. 4 bNumEndpoints 1 0x00 0 endpoints. 5 bInterfaceClass 1 0x01 AUDIO. 6 bInterfaceSubclass 1 0x01 AUDIO_CONTROL. 7 bInterfaceProtocol 1 0x00 Unused. 8 iInterface 1 0x00 Unused. C.3.3.2 Class-specific Interface Descriptor The Class-specific AC interface descriptor is always headed by a Header descriptor that contains general information about the AudioControl interface. It contains all the pointers needed to describe the Audio Interface Collection, associated with the described audio function. Table C-4 USB Telephone Class-specific Interface Descriptor Offset Field Size Value Description 0 bLength 1 0x0A Size of this descriptor, in bytes. 1 bDescriptorType 1 0x24 CS_INTERFACE. 2 bDescriptorSubtype 1 0x01 HEADER subtype. 3 bcdADC 2 0x0100 Revision of class specification - 1.0 5 wTotalLength 2 0x0064 Total size of class specific descriptors. 7 bInCollection 1 0x02 Number of streaming interfaces 8 baInterfaceNr(1) 1 0x01 AudioStreaming interface 1 belongs to this AudioControl interface. 9 BaInterfaceNr(2) 1 0x02 AudioStreaming interface 2 belongs to this AudioControl interface. USB Device Class Definition for Audio Devices Release 1.0 March 18, 1998 118 C.3.3.3 Input Terminal Descriptor (ID1) This descriptor describes the Input Terminal that represents the analog telephone line input. The audio channel cluster on the single Output Pin contains a single logical channel (bNrChannels=1) and there is no spatial location associated with this mono channel (wChannelConfig=0x0000). This is the input part of a bi-directional Terminal and therefore has an associated Output Terminal (ID4). Table C-5 USB Telephone Input Terminal Descriptor (ID1) Offset Field Size Value Description 0 bLength 1 0x0C Size of this descriptor, in bytes. 1 bDescriptorType 1 0x24 CS_INTERFACE. 2 bDescriptorSubtype 1 0x02 INPUT_TERMINAL subtype. 3 bTerminalID 1 0x01 ID of this Terminal. 4 wTerminalType 2 0x0501 Terminal is Phone Line In. 6 bAssocTerminal 1 0x04 Associated with Phone Line Out Terminal. 7 bNrChannels 1 0x01 One channel. 8 wChannelConfig 2 0x0000 Mono sets no position bits. 10 iChannelNames 1 0x00 Unused. 11 iTerminal 1 0x00 Unused. C.3.3.4 Input Terminal Descriptor (ID2) This descriptor describes the telephone handset input microphone. The audio channel cluster on the single Output Pin contains a single logical channel (bNrChannels=1) and there is no spatial location associated with this mono channel (wChannelConfig=0x0000). This is the input part of a bi-directional Terminal and therefore has an associated Output Terminal (ID5). Table C-6 USB Telephone Input Terminal Descriptor (ID2) Offset Field Size Value Description 0 bLength 1 0x0C Size of this descriptor, in bytes. 1 bDescriptorType 1 0x24 CS_INTERFACE. 2 bDescriptorSubtype 1 0x02 INPUT_TERMINAL subtype. 3 bTerminalID 1 0x02 ID of this Terminal. 4 wTerminalType 2 0x0401 Terminal is Handset In. 6 bAssocTerminal 1 0x05 Associated with Handset Out Terminal. USB Device Class Definition for Audio Devices Release 1.0 March 18, 1998 119 Offset Field Size Value Description 7 bNrChannels 1 0x01 One channel. 8 wChannelConfig 2 0x0000 Mono sets no position bits. 10 iChannelNames 1 0x00 Unused. 11 iTerminal 1 0x04 Unused. C.3.3.5 Input Terminal Descriptor (ID3) This descriptor describes the USB stream from the Host to the telephone set. The audio channel cluster on the single Output Pin contains a single logical channel (bNrChannels=1) and there is no spatial location associated with this mono channel (wChannelConfig=0x0000). This is the input part of a bi-directional Terminal and therefore has an associated Output Terminal (ID6). Table C-7 USB Telephone Input Terminal Descriptor (ID3) Offset Field Size Value Description 0 bLength 1 0x0C Size of this descriptor, in bytes. 1 bDescriptorType 1 0x24 CS_INTERFACE. 2 bDescriptorSubtype 1 0x02 INPUT_TERMINAL subtype. 3 bTerminalID 1 0x03 ID of this Terminal. 4 wTerminalType 2 0x0101 Terminal is USB Streaming In. 6 bAssocTerminal 1 0x06 Associated with USB Streaming out Terminal. 7 bNrChannels 1 0x01 One channel. 8 wChannelConfig 2 0x0000 Mono sets no position bits. 10 iChannelNames 1 0x00 Unused. 11 iTerminal 1 0x05 Unused. C.3.3.6 Output Terminal Descriptor (ID4) This descriptor describes the Output Terminal that represents the analog telephone line output. The audio channel cluster on the single Input Pin contains a single logical channel. This is the output part of a bi-directional Terminal and therefore has an associated Input Terminal (ID1). Table C-8 USB Telephone Output Terminal Descriptor (ID4) Offset Field Size Value Description 0 bLength 1 0x09 Size of this descriptor, in bytes. USB Device Class Definition for Audio Devices Release 1.0 March 18, 1998 120 Offset Field Size Value Description 1 bDescriptorType 1 0x24 CS_INTERFACE. 2 bDescriptorSubtype 1 0x03 OUTPUT_TERMINAL subtype. 3 bTerminalID 1 0x04 ID of this Terminal. 4 wTerminalType 2 0x0501 Terminal is Phone Line Out. 6 bAssocTerminal 1 0x01 Associated with Phone Line In Terminal. 7 bSourceID 1 0x07 From Phone Line Selector Unit. 8 iTerminal 1 0x06 Unused. C.3.3.7 Output Terminal Descriptor (ID5) This descriptor describes the telephone handset output earpiece. The audio channel cluster on the single Input Pin contains a single logical channel. This is the output part of a bi-directional Terminal and therefore has an associated Input Terminal (ID2). Table C-9 USB Telephone Output Terminal Descriptor (ID5) Offset Field Size Value Description 0 bLength 1 0x09 Size of this descriptor, in bytes. 1 bDescriptorType 1 0x24 CS_INTERFACE. 2 bDescriptorSubtype 1 0x03 OUTPUT_TERMINAL subtype. 3 bTerminalID 1 0x05 ID of this Terminal. 4 wTerminalType 2 0x0401 Terminal is Handset Out. 6 bAssocTerminal 1 0x01 Associated with Handset In Terminal. 7 bSourceID 1 0x08 From Handset Selector Unit. 8 iTerminal 1 0x00 Unused. C.3.3.8 Output Terminal Descriptor (ID6) This descriptor describes the USB stream from the telephone set to the Host. The audio channel cluster on the single Input Pin contains a single logical channel. This is the output part of a bi-directional Terminal and therefore has an associated Input Terminal (ID3). Table C-10 USB Telephone Output Terminal Descriptor (ID6) Offset Field Size Value Description 0 bLength 1 0x09 Size of this descriptor, in bytes. 1 - 6 - 11 - 16 - 21 - 26 - 31 - 36 - 41 - 46 - 51 - 56 - 61 - 66 - 71 - 76 - 81 - 86 - 91 - 96 - 101 - 106 - 111 - 116 - 121 - 126 ここを編集
https://w.atwiki.jp/usb_audio/pages/29.html
原文:Audio Device Document 1.0(PDF) USB Device Class Definition for Audio Devices Release 1.0 March 18, 1998 vi 4.4.1 AC Control Endpoint Descriptors.....................................................................57 4.4.2 AC Interrupt Endpoint Descriptors...................................................................58 4.5 AudioStreaming Interface Descriptors....................................................................58 4.5.1 Standard AS Interface Descriptor....................................................................59 4.5.2 Class-Specific AS Interface Descriptor............................................................59 4.5.3 Class-Specific AS Format Type Descriptor .....................................................60 4.5.4 Class-Specific AS Format-Specific Descriptor.................................................60 4.6 AudioStreaming Endpoint Descriptors....................................................................60 4.6.1 AS Isochronous Audio Data Endpoint Descriptors ...........................................61 4.6.2 AS Isochronous Synch Endpoint Descriptor ....................................................63 5 Requests .....................................................................................................................65 5.1 Standard Requests ................................................................................................65 5.2 Class-Specific Requests ........................................................................................65 5.2.1 Request Layout...............................................................................................65 5.2.2 AudioControl Requests ...................................................................................68 5.2.3 AudioStreaming Requests...............................................................................94 5.2.4 Additional Requests ........................................................................................97 Appendix A. Audio Device Class Codes .......................................................................99 A.1 Audio Interface Class Code ...................................................................................99 A.2 Audio Interface Subclass Codes ............................................................................99 A.3 Audio Interface Protocol Codes..............................................................................99 A.4 Audio Class-Specific Descriptor Types...................................................................99 A.5 Audio Class-Specific AC Interface Descriptor Subtypes .......................................100 A.6 Audio Class-Specific AS Interface Descriptor Subtypes .......................................100 A.7 Processing Unit Process Types............................................................................100 A.8 Audio Class-Specific Endpoint Descriptor Subtypes.............................................101 A.9 Audio Class-Specific Request Codes ...................................................................101 A.10 Control Selector Codes........................................................................................102 A.10.1 Terminal Control Selectors ...........................................................................102 A.10.2 Feature Unit Control Selectors ......................................................................102 A.10.3 Processing Unit Control Selectors.................................................................102 A.10.4 Extension Unit Control Selectors...................................................................104 A.10.5 Endpoint Control Selectors ...........................................................................104 Appendix B. Example 1 USB Microphone (Informative)............................................105 B.1 Product Description .............................................................................................105 B.2 Descriptor Hierarchy ............................................................................................105 B.3 Descriptors ..........................................................................................................106 B.3.1 Device Descriptor .........................................................................................106 B.3.2 Configuration Descriptor ...............................................................................107 B.3.3 AudioControl Interface Descriptor .................................................................107 B.3.4 AudioStreaming Interface Descriptor.............................................................109 B.3.5 String Descriptors .........................................................................................112 B.4 Requests .............................................................................................................113 USB Device Class Definition for Audio Devices Release 1.0 March 18, 1998 vii B.4.1 Standard Requests .......................................................................................113 B.4.2 Class-specific Requests................................................................................113 Appendix C. Example 2 USB Telephone (Informative)..............................................114 C.1 Product Description .............................................................................................114 C.2 Descriptor Hierarchy ............................................................................................114 C.3 Descriptors ..........................................................................................................115 C.3.1 Device Descriptor .........................................................................................115 C.3.2 Configuration Descriptor ...............................................................................116 C.3.3 AudioControl Interface Descriptor .................................................................116 C.3.4 AudioStreaming Interface 1 Descriptor..........................................................122 C.3.5 AudioStreaming Interface 2 Descriptor..........................................................125 C.3.6 String Descriptors .........................................................................................128 C.4 Requests .............................................................................................................129 C.4.1 Standard requests.........................................................................................129 C.4.2 Class-specific Requests................................................................................129 USB Device Class Definition for Audio Devices Release 1.0 March 18, 1998 viii List of Tables Table 3-1 Status Word Format.........................................................................................31 Table 3-2 Dolby Prologic Cluster Descriptor ..................................................................34 Table 3-3 Left Group Cluster Descriptor.........................................................................35 Table 4-1 Standard AC Interface Descriptor ...................................................................36 Table 4-2 Class-Specific AC Interface Header Descriptor..............................................37 Table 4-3 Input Terminal Descriptor................................................................................39 Table 4-4 Output Terminal Descriptor.............................................................................40 Table 4-5 Mixer Unit Descriptor .......................................................................................41 Table 4-6 Selector Unit Descriptor ..................................................................................43 Table 4-7 Feature Unit Descriptor....................................................................................43 Table 4-8 Common Part of the Processing Unit Descriptor...........................................45 Table 4-9 Up/Down-mix Processing Unit Descriptor......................................................47 Table 4-10 Dolby Prologic Processing Unit Descriptor..................................................49 Table 4-11 3D-Stereo Extender Processing Unit Descriptor ..........................................50 Table 4-12 Reverberation Processing Unit Descriptor...................................................52 Table 4-13 Chorus Processing Unit Descriptor ..............................................................53 Table 4-14 Dynamic Range Compressor Processing Unit Descriptor...........................54 Table 4-15 Extension Unit Descriptor .............................................................................56 Table 4-16 Associated Interfaces Descriptor ..................................................................57 Table 4-17 Standard AC Interrupt Endpoint Descriptor .................................................58 Table 4-18 Standard AS Interface Descriptor..................................................................59 Table 4-19 Class-Specific AS Interface Descriptor.........................................................60 Table 4-20 Standard AS Isochronous Audio Data Endpoint Descriptor .......................61 Table 4-21 Class-Specific AS Isochronous Audio Data Endpoint Descriptor...............62 Table 4-22 Standard AS Isochronous Synch Endpoint Descriptor ...............................63 Table 5-1 Set Request Values..........................................................................................66 Table 5-2 Get Request Values..........................................................................................67 Table 5-3 Set Terminal Control Request Values.............................................................68 Table 5-4 Get Terminal Control Request Values ............................................................68 Table 5-5 Copy Protect Control Parameter Block...........................................................69 Table 5-6 Set Mixer Unit Control Request Values...........................................................70 Table 5-7 Get Mixer Unit Control Request Values ..........................................................70 Table 5-8 First Form of the Mixer Control Parameter Block ..........................................71 Table 5-9 Second Form of the Mixer Control Parameter Block .....................................72 USB Device Class Definition for Audio Devices Release 1.0 March 18, 1998 ix Table 5-10 Third Form of the Mixer Control Parameter Block .......................................72 Table 5-11 Set Selector Unit Control Request Values....................................................73 Table 5-12 Get Selector Unit Control Request Values....................................................73 Table 5-13 Selector Control Parameter Block.................................................................74 Table 5-14 Set Feature Unit Control Request Values .....................................................74 Table 5-15 Get Feature Unit Control Request Values.....................................................75 Table 5-16 First Form of the Mute Control Parameter Block .........................................75 Table 5-17 Second Form of the Mute Control Parameter Block ....................................76 Table 5-18 First Form of the Volume Control Parameter Block.....................................76 Table 5-19 Second Form of the Volume Control Parameter Block................................77 Table 5-20 First Form of the Bass Control Parameter Block .........................................78 Table 5-21 Second Form of the Bass Control Parameter Block ....................................78 Table 5-22 First Form of the Mid Control Parameter Block............................................79 Table 5-23 Second Form of the Mid Control Parameter Block ......................................79 Table 5-24 First Form of the Treble Control Parameter Block .......................................80 Table 5-25 Second Form of the Treble Control Parameter Block..................................80 Table 5-27 Band Numbers and Center Frequencies (ANSI S1.11-1986 Standard) ........80 Table 5-28 Graphic Equalizer Control Parameter Block.................................................81 Table 5-29 First Form of the Automatic Gain Control Parameter Block........................82 Table 5-30 Second Form of the Automatic Gain Control Parameter Block...................82 Table 5-31 First Form of the Delay Control Parameter Block ........................................83 Table 5-32 Second Form of the Delay Control Parameter Block ...................................83 Table 5-33 First Form of the Bass Boost Control Parameter Block ..............................84 Table 5-34 Second Form of the Bass Boost Control Parameter Block .........................84 Table 5-35 First Form of the Loudness Control Parameter Block .................................85 Table 5-36 Second Form of the Loudness Control Parameter Block............................85 Table 5-37 Set Processing Unit Control Request Values...............................................86 Table 5-38 Get Processing Unit Control Request Values ..............................................86 Table 5-39 Enable Processing Control Parameter Block ...............................................87 Table 5-40 Mode Select Control Parameter Block ..........................................................87 Table 5-41 Spaciousness Control Parameter Block .......................................................88 Table 5-42 Reverb Type Control Parameter Block..........................................................88 Table 5-43 Reverb Level Control Parameter Block.........................................................89 Table 5-44 Spaciousness Control Parameter Block .......................................................89 Table 5-45 Reverb Delay Feedback Control Parameter Block .......................................89 USB Device Class Definition for Audio Devices Release 1.0 March 18, 1998 x Table 5-46 Chorus Level Control Parameter Block ........................................................90 Table 5-47 Chorus Modulation Rate Control Parameter Block......................................90 Table 5-48 Chorus Modulation Depth Control Parameter Block....................................91 Table 5-49 Dynamic Range Compressor Ratio Control Parameter Block .....................91 Table 5-50 Dynamic Range Compressor MaxAmpl Control Parameter Block ..............91 Table 5-51 Dynamic Range Compressor Threshold Control Parameter Block.............92 Table 5-52 Dynamic Range Compressor Attack Time Control Parameter Block ..........92 Table 5-53 Dynamic Range Compressor Release Time Control Parameter Block........93 Table 5-54 Set Extension Unit Control Request Values .................................................93 Table 5-55 Get Extension Unit Control Request Values.................................................94 Table 5-56 Enable Processing Control Parameter Block ...............................................94 Table 5-57 Set Endpoint Control Request Values ..........................................................95 Table 5-58 Get Endpoint Control Request Values..........................................................95 Table 5-59 Sampling Frequency Control Parameter Block ............................................96 Table 5-60 Pitch Control Parameter Block......................................................................96 Table 5-61 Set Memory Request Values..........................................................................97 Table 5-62 Get Memory Request Values .........................................................................97 Table 5-63 Get Status Request Values............................................................................98 Table A-1 Audio Interface Class Code ............................................................................99 Table A-2 Audio Interface Subclass Codes ....................................................................99 Table A-3 Audio Interface Protocol Codes......................................................................99 Table A-4 Audio Class-specific Descriptor Types..........................................................99 Table A-5 Audio Class-Specific AC Interface Descriptor Subtypes.............................100 Table A-6 Audio Class-Specific AS Interface Descriptor Subtypes.............................100 Table A-7 Processing Unit Process Types....................................................................100 Table A-8 Audio Class-Specific Endpoint Descriptor Subtypes..................................101 Table A-9 Audio Class-Specific Request Codes...........................................................101 Table A-10 Terminal Control Selectors .........................................................................102 Table A-11 Feature Unit Control Selectors ...................................................................102 Table A-12 Up/Down-mix Processing Unit Control Selectors......................................102 Table A-13 Dolby Prologic Processing Unit Control Selectors ...................................103 Table A-14 3D Stereo Extender Processing Unit Control Selectors............................103 Table A-15 Reverberation Processing Unit Control Selectors.....................................103 Table A-16 Chorus Processing Unit Control Selectors................................................103 Table A-17 Dynamic Range Compressor Processing Unit Control Selectors ............104 1 - 6 - 11 - 16 - 21 - 26 - 31 - 36 - 41 - 46 - 51 - 56 - 61 - 66 - 71 - 76 - 81 - 86 - 91 - 96 - 101 - 106 - 111 - 116 - 121 - 126 ここを編集
https://w.atwiki.jp/usb_audio/pages/51.html
原文:Audio Device Document 1.0(PDF) USB Device Class Definition for Audio Devices Release 1.0 March 18, 1998 111 Offset Field Size Value Description 6 bInterfaceSubclass 1 0x02 AUDIO_STREAMING. 7 bInterfaceProtocol 1 0x00 Unused. 8 iInterface 1 0x00 Unused. B.3.4.2.1.2 Class-specific AS General Interface Descriptor Table B-9 USB Microphone Class-specific AS General Interface Descriptor Offset Field Size Value Description 0 bLength 1 0x07 Size of this descriptor, in bytes. 1 bDescriptorType 1 0x24 CS_INTERFACE descriptor. 2 bDescriptorSubtype 1 0x01 GENERAL subtype. 3 bTerminalLink 1 0x02 Unit ID of the Output Terminal. 4 bDelay 1 0x01 Interface delay. 5 wFormatTag 2 0x0001 PCM Format. B.3.4.2.1.3 Type I Format Type Descriptor Table B-10 USB Microphone Type I Format Type Descriptor Offset Field Size Value Description 0 bLength 1 0x0B Size of this descriptor, in bytes. 1 bDescriptorType 1 0x24 CS_INTERFACE descriptor. 2 bDescriptorSubtype 1 0x02 FORMAT_TYPE subtype. 3 bFormatType 1 0x01 FORMAT_TYPE_I. 4 bNrChannels 1 0x01 One channel. 5 bSubFrameSize 1 0x02 Two bytes per audio subframe. 6 bBitResolution 1 0x10 16 bits per sample. 7 bSamFreqType 1 0x01 One frequency supported. 8 tSamFreq 3 0x01F40 8000Hz. B.3.4.2.1.4 Standard Endpoint Descriptor USB Device Class Definition for Audio Devices Release 1.0 March 18, 1998 112 Table B-11 USB Microphone Standard Endpoint Descriptor Offset Field Size Value Description 0 bLength 1 0x09 Size of this descriptor, in bytes. 1 bDescriptorType 1 0x05 ENDPOINT descriptor. 2 bEndpointAddress 1 0x81 IN Endpoint 1. 3 bmAttributes 1 0x01 Isochronous, not shared. 4 wMaxPacketSize 2 0x0010 16 bytes per packet. 6 bInterval 1 0x01 One packet per frame. 7 bRefresh 1 0x00 Unused. 8 bSynchAddress 1 0x00 Unused. B.3.4.2.1.5 Class-specific Isochronous Audio Data Endpoint Descriptor Table B-12 USB Microphone Class-specific Isoc. Audio Data Endpoint Descriptor Offset Field Size Value Description 0 bLength 1 0x07 Size of this descriptor, in bytes. 1 bDescriptorType 1 0x25 CS_ENDPOINT descriptor 2 bDescriptorSubtype 1 0x01 GENERAL subtype. 3 bmAttributes 1 0x00 No sampling frequency control, no pitch control, no packet padding. 4 bLockDelayUnits 1 0x00 Unused. 5 wLockDelay 2 0x0000 Unused. B.3.5 String Descriptors There are two string descriptors available. The first string descriptor contains the Manufacturer information and the second one contains Product related information. The following sections present an example of how these descriptors could look like. B.3.5.1 Manufacturer String Descriptor Table B-13 USB Microphone Manufacturer String Descriptor Offset Field Size Value Description 0 bLength 1 0x18 Size of this descriptor, in bytes. 1 bDescriptorType 1 0x03 STRING descriptor. USB Device Class Definition for Audio Devices Release 1.0 March 18, 1998 113 Offset Field Size Value Description 2 bString 1 0x0054 0x0048 0x0045 0x0020 0x0043 0x004F 0x004D 0x0050 0x0041 0x004E 0x0059 “THE COMPANY” B.3.5.2 Product String Descriptor Table B-14 USB Microphone Product String Descriptor Offset Field Size Value Description 0 bLength 1 0x18 Size of this descriptor, in bytes. 1 bDescriptorType 1 0x03 STRING descriptor. 2 bString 1 0x004D 0x0069 0x0063 0x0072 0x006F 0x0070 0x0068 0x006F 0x006E 0x0065 “Microphone” B.4 Requests B.4.1 Standard Requests The microphone supports all necessary standard requests. B.4.2 Class-specific Requests There are no class-specific requests supported. USB Device Class Definition for Audio Devices Release 1.0 March 18, 1998 114 Appendix C. Example 2 USB Telephone (Informative) C.1 Product Description This is a USB Telephone with 16-bit 8KHz input and output. It has a handset and Phone line in and out connectors. Selector Units are used to allow the Host to talk directly to the telephone line or to allow the handset to be used with the Host for an Internet telephone call. This is an analog device. The telephone line and handset signals are analog and all switching is performed in the analog domain. The digital USB audio stream, coming from AudioStreaming interface 1 is converted to the analog domain before entering the audio function through Input Terminal ID3. Likewise, the analog signal coming from Selector Unit ID9 is delivered to Output Terminal ID6 and converted back to the digital domain before it is delivered to AudioStreaming interface 2. AudioStreaming Interface #2 Audio Function Phone Line IT OT USB IN Endpoint IT IT OT OT Phone Line Handset Handset ID1 ID2 ID3 ID9 ID7 ID8 ID4 ID5 ID6 AudioStreaming Interface #1 USB OUT Endpoint Figure C-1 USB Telephone Topology It is a neat device, but telephones that are much more elaborate could be constructed with speakerphone and acoustic echo cancellation incorporated. C.2 Descriptor Hierarchy This USB Telephone device includes an AudioControl interface (0) and two AudioStreaming interfaces (1 2). The AudioStreaming interfaces both feature two alternate settings. The first alternate setting (Alternate Setting 0) has zero bandwidth associated with it so that switching to this alternate setting effectively frees all allocated bandwidth on the USB for this device. Zero bandwidth is indicated by the lack of a streaming endpoint. Alternate Setting 1 is the operational part of the interface and it has one isochronous endpoint. Figure presents the descriptor hierarchy. USB Device Class Definition for Audio Devices Release 1.0 March 18, 1998 115 Interface 0 Device Configuration AudioControl I/F Header Phone Line IT Handset IT Standard Descriptors Class-Specific Descriptors USB OUT EP IT Phone Line OT Handset OT USB IN EP OT Phone Line SU Handset SU USB OUT SU AS I/F Alt. Setting 0 Interface 1 AS I/F Alt. Setting 1 General Type I Format Endpoint Endpoint ID1 ID2 ID3 ID4 ID5 ID6 ID7 ID8 ID9 AS I/F Alt. Setting 0 Interface 2 AS I/F Alt. Setting 1 General Type I Format Endpoint Endpoint Figure C-2 USB Telephone Descriptor Hierarchy C.3 Descriptors The following sections present all the descriptors that are used to describe the device. C.3.1 Device Descriptor Table C-1 USB Telephone Device Descriptor Offset Field Size Value Description 0 bLength 1 0x12 Size of this descriptor, in bytes. 1 bDescriptorType 1 0x01 DEVICE descriptor. 2 bcdUSB 2 0x0100 1.00 - current revision of USB spec. 4 bDeviceClass 1 0x00 Device defined at Interface level. 1 - 6 - 11 - 16 - 21 - 26 - 31 - 36 - 41 - 46 - 51 - 56 - 61 - 66 - 71 - 76 - 81 - 86 - 91 - 96 - 101 - 106 - 111 - 116 - 121 - 126 ここを編集