Re: assign USB Audio to interface 1 and 2

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Doron Holan [MS] (doronh_at_nospam.microsoft.com)
Date: 11/15/04


Date: Mon, 15 Nov 2004 08:40:06 -0800

actually, there is special code in the generic parent that knows about audio
devices. if the audio device conforms to the usb audio spec, the other
functions should be split it out from it

d

-- 
Please do not send e-mail directly to this alias. this alias is for 
newsgroup purposes only.
This posting is provided "AS IS" with no warranties, and confers no rights.
"Y. LAMY" <Y. LAMY@discussions.microsoft.com> wrote in message 
news:E74ACB82-CCD6-4944-A9A4-948F23142421@microsoft.com...
> the support of multifunction devices with several interfaces per function 
> is
> a quite recent addition to the USB specification. Until now, multifunction
> devices supports only one interface per function.
>
> If your audio device is on interfaces 0 and 1, the audio class driver is
> loaded for your device and other functions are ignored.
>
> to implement it the way you want, you must use an Interface association
> descriptor.
> see
> http://www.microsoft.com/whdc/system/bus/USB/IAD.mspx
> for more details.
>
> Y. LAMY @ PHILOG
>
> "yamamoto" wrote:
>
>> Dear All
>>
>> We are developping a USB Composite Device.
>> Our USB Device had audio interfaces and a vendor-specfic-interface.
>>
>> When I assigned audio interfaces( control and streaming ) to interface0 
>> and
>> 1,
>> Device Manager said no problem.( refer to cf.A )
>>
>> But When I assigned audio interfaces to interface1 and 2,
>> Device Manager said a usb audio device had [Yellow !].
>> ( refer to cf.B )
>>
>> I want to assign the vendor-specfic-interface-descriptor to interface0.
>>
>> What Should I do to assign Audio interface descriptor from interface0 ?
>>
>> Best Regards.
>>
>> Yamamoto
>> /////////////////
>> // cf.A
>>
>>           ===>Device Descriptor<===
>> bLength:                           0x12
>> bDescriptorType:                   0x01
>> bcdUSB:                          0x0200
>> bDeviceClass:                      0x00  -> This is an Interface Class
>> Defined Device
>> bDeviceSubClass:                   0x00
>> bDeviceProtocol:                   0x00
>> bMaxPacketSize0:                   0x40 = (64) Bytes
>> idVendor:                        0x1262idProduct:
>> 0x2581
>> bcdDevice:                       0x0100
>> iManufacturer:                     0x01
>>      English (United States)  "MVision"
>> iProduct:                          0x02
>>      English (United States)  "Mv-Compose"
>> iSerialNumber:                     0x03
>>      English (United States)  "1.00"
>> bNumConfigurations:                0x01
>>
>>           ===>Configuration Descriptor<===
>> bLength:                           0x09
>> bDescriptorType:                   0x02
>> wTotalLength:                    0x0074  -> Validated
>> bNumInterfaces:                    0x03
>> bConfigurationValue:               0x01
>> iConfiguration:                    0x00
>> bmAttributes:                      0x80  -> Bus Powered
>> MaxPower:                          0x32 = 100 mA
>>
>>           ===>Interface Descriptor<===
>> bLength:                           0x09
>> bDescriptorType:                   0x04
>> bInterfaceNumber:                  0x00
>> bAlternateSetting:                 0x00
>> bNumEndpoints:                     0x00
>> bInterfaceClass:                   0x01  -> Audio Interface Class
>> bInterfaceSubClass:                0x01  -> Audio Control Interface 
>> SubClass
>> bInterfaceProtocol:                0x00
>> CAUTION:  This may be an invalid bInterfaceProtocol
>> iInterface:                        0x00
>>
>>           ===>Audio Control Interface Header Descriptor<===
>> bLength:                           0x09
>> bDescriptorType:                   0x24
>> bDescriptorSubtype:                0x01
>> bcdADC:                          0x0100
>> wTotalLength:                    0x001E
>> bInCollection:                     0x01
>> baInterfaceNr[1]:                  0x01
>>
>>           ===>Audio Control Input Terminal Descriptor<===
>> bLength:                           0x0C
>> bDescriptorType:                   0x24
>> bDescriptorSubtype:                0x02
>> bTerminalID:                       0x01
>> wTerminalType:                   0x0201 (Microphone)
>> bAssocTerminal:                    0x00
>> bNrChannels:                       0x01
>> wChannelConfig:                  0x0000
>> iChannelNames:                     0x00
>> iTerminal:                         0x00
>>
>>           ===>Audio Control Output Terminal Descriptor<===
>> bLength:                           0x09
>> bDescriptorType:                   0x24
>> bDescriptorSubtype:                0x03
>> bTerminalID:                       0x02
>> wTerminalType:                   0x0101 (USB streaming)
>> bAssocTerminal:                    0x00
>> bSourceID:                         0x01
>> iTerminal:                         0x00
>>
>>           ===>Interface Descriptor<===
>> bLength:                           0x09
>> bDescriptorType:                   0x04
>> bInterfaceNumber:                  0x01
>> bAlternateSetting:                 0x00
>> bNumEndpoints:                     0x00
>> bInterfaceClass:                   0x01  -> Audio Interface Class
>> bInterfaceSubClass:                0x02  -> Audio Streaming Interface
>> SubClass
>> bInterfaceProtocol:                0x00
>> CAUTION:  This may be an invalid bInterfaceProtocol
>> iInterface:                        0x00
>>
>>           ===>Interface Descriptor<===
>> bLength:                           0x09
>> bDescriptorType:                   0x04
>> bInterfaceNumber:                  0x01
>> bAlternateSetting:                 0x01
>> bNumEndpoints:                     0x01
>> bInterfaceClass:                   0x01  -> Audio Interface Class
>> bInterfaceSubClass:                0x02  -> Audio Streaming Interface
>> SubClass
>> bInterfaceProtocol:                0x00
>> CAUTION:  This may be an invalid bInterfaceProtocol
>> iInterface:                        0x00
>>
>>           ===>Audio Streaming Class Specific Interface Descriptor<===
>> bLength:                           0x07
>> bDescriptorType:                   0x24
>> bDescriptorSubtype:                0x01
>> bTerminalLink:                     0x02
>> bDelay:                            0x00
>> wFormatTag:                      0x0001 (PCM)
>>
>>           ===>Audio Streaming Format Type Descriptor<===
>> bLength:                           0x0B
>> bDescriptorType:                   0x24
>> bDescriptorSubtype:                0x02
>> bFormatType:                       0x01
>> bNrChannels:                       0x01
>> bSubframeSize:                     0x02
>> bBitResolution:                    0x10
>> bSamFreqType:                      0x01
>> tSamFreq[1]:                   0x00BB80 (48000 Hz)
>>
>>           ===>Endpoint Descriptor<===
>> bLength:                           0x09
>> bDescriptorType:                   0x05
>> bEndpointAddress:                  0x82  -> Direction: IN - EndpointID: 2
>> bmAttributes:                      0x01  -> Isochronous Transfer Type
>>                    Synchronization Type = No Synchronization
>>                              Usage Type = Data Endpoint
>> wMaxPacketSize:                  0x00C0 = 1 transactions per microframe,
>> 0xC0 max bytes
>> wInterval:                       0x0004
>> bSyncAddress:                      0x00
>>
>>           ===>Audio Streaming Class Specific Audio Data Endpoint
>> Descriptor<===
>> bLength:                           0x07
>> bDescriptorType:                   0x25
>> bDescriptorSubtype:                0x01
>> bmAttributes:                      0x00
>> bLockDelayUnits:                   0x00
>> wLockDelay:                      0x0000
>>
>>           ===>Interface Descriptor<===
>> bLength:                           0x09
>> bDescriptorType:                   0x04
>> bInterfaceNumber:                  0x02
>> bAlternateSetting:                 0x00
>> bNumEndpoints:                     0x01
>> bInterfaceClass:                   0xFF  -> pre-release Video Interface
>> Class
>> bInterfaceSubClass:                0x00
>> *!*CAUTION:    This appears to be an invalid bInterfaceSubClass
>> bInterfaceProtocol:                0x00
>> iInterface:                        0x00
>> *!*ERROR:  0xFF is the prerelease USB Video Class ID
>>
>>           ===>Endpoint Descriptor<===
>> bLength:                           0x07
>> bDescriptorType:                   0x05
>> bEndpointAddress:                  0x83  -> Direction: IN - EndpointID: 3
>> bmAttributes:                      0x02  -> Bulk Transfer Type
>> wMaxPacketSize:                  0x0100 = 0x100 max bytes
>> bInterval:                         0x01
>>
>> /////////////////
>> // cf.B
>>
>>           ===>Device Descriptor<===
>> bLength:                           0x12
>> bDescriptorType:                   0x01
>> bcdUSB:                          0x0200
>> bDeviceClass:                      0x00  -> This is an Interface Class
>> Defined Device
>> bDeviceSubClass:                   0x00
>> bDeviceProtocol:                   0x00
>> bMaxPacketSize0:                   0x40 = (64) Bytes
>> idVendor:                        0x1262idProduct:
>> 0x2581
>> bcdDevice:                       0x0100
>> iManufacturer:                     0x01
>>      English (United States)  "MVision"
>> iProduct:                          0x02
>>      English (United States)  "Mv-Compose"
>> iSerialNumber:                     0x03
>>      English (United States)  "1.00"
>> bNumConfigurations:                0x01
>>
>>           ===>Configuration Descriptor<===
>> bLength:                           0x09
>> bDescriptorType:                   0x02
>> wTotalLength:                    0x0074  -> Validated
>> bNumInterfaces:                    0x03
>> bConfigurationValue:               0x01
>> iConfiguration:                    0x00
>> bmAttributes:                      0x80  -> Bus Powered
>> MaxPower:                          0x32 = 100 mA
>>
>>           ===>Interface Descriptor<===
>> bLength:                           0x09
>> bDescriptorType:                   0x04
>> bInterfaceNumber:                  0x00
>> bAlternateSetting:                 0x00
>> bNumEndpoints:                     0x01
>> bInterfaceClass:                   0xFF  -> pre-release Video Interface
>> Class
>> bInterfaceSubClass:                0x00
>> *!*CAUTION:    This appears to be an invalid bInterfaceSubClass
>> bInterfaceProtocol:                0x00
>> iInterface:                        0x00
>> *!*ERROR:  0xFF is the prerelease USB Video Class ID
>>
>>           ===>Endpoint Descriptor<===
>> bLength:                           0x07
>> bDescriptorType:                   0x05
>> bEndpointAddress:                  0x83  -> Direction: IN - EndpointID: 3
>> bmAttributes:                      0x02  -> Bulk Transfer Type
>> wMaxPacketSize:                  0x0100 = 0x100 max bytes
>> bInterval:                         0x01
>>
>>           ===>Interface Descriptor<===
>> bLength:                           0x09
>> bDescriptorType:                   0x04
>> bInterfaceNumber:                  0x01
>> bAlternateSetting:                 0x00
>> bNumEndpoints:                     0x00
>> bInterfaceClass:                   0x01  -> Audio Interface Class
>> bInterfaceSubClass:                0x01  -> Audio Control Interface 
>> SubClass
>> bInterfaceProtocol:                0x00
>> CAUTION:  This may be an invalid bInterfaceProtocol
>> iInterface:                        0x00
>>
>>           ===>Audio Control Interface Header Descriptor<===
>> bLength:                           0x09
>> bDescriptorType:                   0x24
>> bDescriptorSubtype:                0x01
>> bcdADC:                          0x0100
>> wTotalLength:                    0x001E
>> bInCollection:                     0x01
>> baInterfaceNr[1]:                  0x01
>>
>>           ===>Audio Control Input Terminal Descriptor<===
>> bLength:                           0x0C
>> bDescriptorType:                   0x24
>> bDescriptorSubtype:                0x02
>> bTerminalID:                       0x01
>> wTerminalType:                   0x0201 (Microphone)
>> bAssocTerminal:                    0x00
>> bNrChannels:                       0x01
>> wChannelConfig:                  0x0000
>> iChannelNames:                     0x00
>> iTerminal:                         0x00
>>
>>           ===>Audio Control Output Terminal Descriptor<===
>> bLength:                           0x09
>> bDescriptorType:                   0x24
>> bDescriptorSubtype:                0x03
>> bTerminalID:                       0x02
>> wTerminalType:                   0x0101 (USB streaming)
>> bAssocTerminal:                    0x00
>> bSourceID:                         0x01
>> iTerminal:                         0x00
>>
>>           ===>Interface Descriptor<===
>> bLength:                           0x09
>> bDescriptorType:                   0x04
>> bInterfaceNumber:                  0x02
>> bAlternateSetting:                 0x00
>> bNumEndpoints:                     0x00
>> bInterfaceClass:                   0x01  -> Audio Interface Class
>> bInterfaceSubClass:                0x02  -> Audio Streaming Interface
>> SubClass
>> bInterfaceProtocol:                0x00
>> CAUTION:  This may be an invalid bInterfaceProtocol
>> iInterface:                        0x00
>>
>>           ===>Interface Descriptor<===
>> bLength:                           0x09
>> bDescriptorType:                   0x04
>> bInterfaceNumber:                  0x02
>> bAlternateSetting:                 0x01
>> bNumEndpoints:                     0x01
>> bInterfaceClass:                   0x01  -> Audio Interface Class
>> bInterfaceSubClass:                0x02  -> Audio Streaming Interface
>> SubClass
>> bInterfaceProtocol:                0x00
>> CAUTION:  This may be an invalid bInterfaceProtocol
>> iInterface:                        0x00
>>
>>           ===>Audio Streaming Class Specific Interface Descriptor<===
>> bLength:                           0x07
>> bDescriptorType:                   0x24
>> bDescriptorSubtype:                0x01
>> bTerminalLink:                     0x02
>> bDelay:                            0x00
>> wFormatTag:                      0x0001 (PCM)
>>
>>           ===>Audio Streaming Format Type Descriptor<===
>> bLength:                           0x0B
>> bDescriptorType:                   0x24
>> bDescriptorSubtype:                0x02
>> bFormatType:                       0x01
>> bNrChannels:                       0x01
>> bSubframeSize:                     0x02
>> bBitResolution:                    0x10
>> bSamFreqType:                      0x01
>> tSamFreq[1]:                   0x00BB80 (48000 Hz)
>>
>>           ===>Endpoint Descriptor<===
>> bLength:                           0x09
>> bDescriptorType:                   0x05
>> bEndpointAddress:                  0x82  -> Direction: IN - EndpointID: 2
>> bmAttributes:                      0x01  -> Isochronous Transfer Type
>>                    Synchronization Type = No Synchronization
>>                              Usage Type = Data Endpoint
>> wMaxPacketSize:                  0x00C0 = 1 transactions per microframe,
>> 0xC0 max bytes
>> wInterval:                       0x0004
>> bSyncAddress:                      0x00
>>
>>           ===>Audio Streaming Class Specific Audio Data Endpoint
>> Descriptor<===
>> bLength:                           0x07
>> bDescriptorType:                   0x25
>> bDescriptorSubtype:                0x01
>> bmAttributes:                      0x00
>> bLockDelayUnits:                   0x00
>> wLockDelay:                      0x0000
>>
>> 


Relevant Pages

  • Re: Old laptop as audio "analyzer"
    ... > with the very cool and free "Rightmark Audio Analyzer" ... > the internal sound on this laptop is absolute garbage. ... Laptops are one reason why USB and Firewire interfaces are so popular. ...
    (rec.audio.pro)
  • Re: Audio-over-ethernet and digital clocking
    ... how things are clocked when you send audio over ethernet in real time? ... in my composers' world of using slave computers to play back samples. ... Most computer interfaces have external clock options. ...
    (rec.audio.pro)
  • Re: Bypassing sound card -- worth it for streaming radio?
    ... computer-to-stereo interfaces that bypass ... the computer's audio card by taking the ... 128Kbps through the USB port somehow, ...
    (rec.audio.tech)
  • Re: Playing Audio CD
    ... interfaces or methods I have to use? ... You can capture from the CD-Audio input, but this audio stream has already ... There is no loss if the CD-ROM is set for digital audio extraction which is ... However you can't get true track ...
    (microsoft.public.win32.programmer.directx.audio)
  • Re: soundcard/DAC 411
    ... Is it new enough to have a USB 1.1 port? ... Many stereo USB audio ... interfaces use USB 1.1. ... you may be able to use a Firewire ...
    (rec.audio.pro)