Re: Modifying USB Audio gadget driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Dec 3, 2014 at 6:06 PM, Felipe Balbi <balbi@xxxxxx> wrote:
> Hi,
>
> (no top-posting, please)
>
> On Wed, Dec 03, 2014 at 05:24:22PM -0600, Priya S wrote:
>> Great! That fixes it. Thanks.
>>
>> Windows is not able to install the driver though. These are the USB
>> descriptors that I see from the host-side:
>>
>> Device Descriptor:
>> bcdUSB:             0x0200
>> bDeviceClass:         0x00
>
> this means that the class is defined at the interface level.
>
>> bDeviceSubClass:      0x00
>> bDeviceProtocol:      0x00
>> bMaxPacketSize0:      0x40 (64)
>> idVendor:           0x1D6B
>> idProduct:          0x0101
>> bcdDevice:          0x0316
>> iManufacturer:        0x01
>> 0x0409: "Linux 3.2.0 with musb-hdrc"
>
> this is one old kernel. You really wanna ask for support from whoever
> gave you this kernel instead. Considering you're using MUSB and TI has
> an old 3.2-based SDK, if you got this from TI, get in touch with your
> FAE and/or use TI's support forum instead.
>
> The community cannot support you with such an old kernel. However, if
> you're willing to move your development to v3.18-rc7 (or at least
> v3.17.4) then I'll be happy to help you out.
>
>> iProduct:             0x02
>> 0x0409: "Linux USB Audio Gadget"
>> iSerialNumber:        0x00
>> bNumConfigurations:   0x01
>>
>> ConnectionStatus: DeviceConnected
>> Current Config Value: 0x01
>> Device Bus Speed:     High
>> Device Address:       0x1B
>> Open Pipes:              0
>>
>> Configuration Descriptor:
>> wTotalLength:       0x0095
>> bNumInterfaces:       0x03
>> bConfigurationValue:  0x01
>> iConfiguration:       0x00
>> bmAttributes:         0xC0 (Bus Powered Self Powered )
>> MaxPower:             0x01 (2 Ma)
>>
>> Interface Descriptor:
>> bInterfaceNumber:     0x00
>> bAlternateSetting:    0x00
>> bNumEndpoints:        0x00
>> bInterfaceClass:      0x01 (Audio)
>
> and here it is. The class is defined here. Does this work with Linux ?
> Windows is pretty stupid when it comes to binding drivers to USB
> devices. It just can't handle bDeviceClass set to "Defined at
> interface".
>
>> bInterfaceSubClass:   0x01 (Audio Control)
>> bInterfaceProtocol:   0x00
>> iInterface:           0x00
>>
>> Audio Control Interface Header Descriptor:
>> bLength:              0x0A
>> bDescriptorType:      0x24
>> bDescriptorSubtype:   0x01
>> bcdADC:             0x0100
>> wTotalLength:       0x0028
>> bInCollection:        0x02
>> baInterfaceNr[1]:     0x01
>> baInterfaceNr[2]:     0x02
>>
>> Audio Control Input Terminal Descriptor:
>> bLength:              0x0C
>> bDescriptorType:      0x24
>> bDescriptorSubtype:   0x02
>> bTerminalID:          0x02
>> wTerminalType:      0x0201 (Microphone)
>> bAssocTerminal:       0x00
>> bNrChannels:          0x02
>> wChannelConfig:     0x0003
>> iChannelNames:        0x00
>> iTerminal:            0x07
>>
>> Audio Control Output Terminal Descriptor:
>> bLength:              0x09
>> bDescriptorType:      0x24
>> bDescriptorSubtype:   0x03
>> bTerminalID:          0x01
>> wTerminalType:      0x0301 (Speaker)
>> bAssocTerminal:       0x03
>> bSoruceID:            0x03
>> iTerminal:            0x09
>>
>> Interface Descriptor:
>> bInterfaceNumber:     0x01
>> bAlternateSetting:    0x00
>> bNumEndpoints:        0x00
>> bInterfaceClass:      0x01 (Audio)
>> bInterfaceSubClass:   0x02 (Audio Streaming)
>> bInterfaceProtocol:   0x00
>> iInterface:           0x0B
>> 0x0409: "Playback Inactive"
>>
>> Interface Descriptor:
>> bInterfaceNumber:     0x01
>> bAlternateSetting:    0x01
>> bNumEndpoints:        0x01
>> bInterfaceClass:      0x01 (Audio)
>> bInterfaceSubClass:   0x02 (Audio Streaming)
>> bInterfaceProtocol:   0x00
>> iInterface:           0x0C
>> 0x0409: "Playback Active"
>>
>> Audio Streaming Class Specific Interface Descriptor:
>> bLength:              0x07
>> bDescriptorType:      0x24
>> bDescriptorSubtype:   0x01
>> bTerminalLink:        0x01
>> bDelay:               0x01
>> wFormatTag:         0x0001 (PCM)
>>
>> Audio Streaming Format Type Descriptor:
>> bLength:              0x0B
>> bDescriptorType:      0x24
>> bDescriptorSubtype:   0x02
>> bFormatType:          0x01
>> bNrChannels:          0x00
>> bSubframeSize:        0x02
>> bBitResolution:       0x10
>> bSamFreqType:         0x01
>> tSamFreq[1]:      0x00BB80 (48000 Hz)
>>
>> Endpoint Descriptor:
>> bEndpointAddress:     0x01  OUT
>> Transfer Type: Isochronous
>> wMaxPacketSize:     0x00C8 (200)
>> bInterval:            0x04
>>
>> Audio Streaming Class Specific Audio Data Endpoint Descriptor:
>> bLength:              0x07
>> bDescriptorType:      0x25
>> bDescriptorSubtype:   0x01
>> bmAttributes:         0x00
>> bLockDelayUnits:      0x00
>> wLockDelay:         0x0000
>>
>> Interface Descriptor:
>> bInterfaceNumber:     0x02
>> bAlternateSetting:    0x00
>> bNumEndpoints:        0x00
>> bInterfaceClass:      0x01 (Audio)
>> bInterfaceSubClass:   0x02 (Audio Streaming)
>> bInterfaceProtocol:   0x00
>> iInterface:           0x0D
>> 0x0409: "Capture Inactive"
>>
>> Interface Descriptor:
>> bInterfaceNumber:     0x02
>> bAlternateSetting:    0x01
>> bNumEndpoints:        0x01
>> bInterfaceClass:      0x01 (Audio)
>> bInterfaceSubClass:   0x02 (Audio Streaming)
>> bInterfaceProtocol:   0x00
>> iInterface:           0x0E
>> 0x0409: "Capture Active"
>>
>> Audio Streaming Class Specific Interface Descriptor:
>> bLength:              0x07
>> bDescriptorType:      0x24
>> bDescriptorSubtype:   0x01
>> bTerminalLink:        0x02
>> bDelay:               0x01
>> wFormatTag:         0x0001 (PCM)
>>
>> Audio Streaming Format Type Descriptor:
>> bLength:              0x0B
>> bDescriptorType:      0x24
>> bDescriptorSubtype:   0x02
>> bFormatType:          0x01
>> bNrChannels:          0x00
>> bSubframeSize:        0x02
>> bBitResolution:       0x10
>> bSamFreqType:         0x01
>> tSamFreq[1]:      0x00BB80 (48000 Hz)
>>
>> Endpoint Descriptor:
>> bEndpointAddress:     0x81  IN
>> Transfer Type: Isochronous
>> wMaxPacketSize:     0x00C8 (200)
>> bInterval:            0x04
>>
>> Audio Streaming Class Specific Audio Data Endpoint Descriptor:
>> bLength:              0x07
>> bDescriptorType:      0x25
>> bDescriptorSubtype:   0x01
>> bmAttributes:         0x00
>> bLockDelayUnits:      0x00
>> wLockDelay:         0x0000
>>
>> What could I possibly be missing?
>
> this could be just a windows brain-fart. Perhaps google around or ask
> for support from whoever gave you a 3.2 kernel ?
>
> cheers
>
> --
> balbi

Thank you for the suggestions. Unfortunately, I'm not able to update
the kernel because I'm working with some legacy code. I'm a relative
newbie when it comes to developing/modifying USB drivers, but the
following configuration seems to work with a Windows host for me:

Device Descriptor:
bcdUSB:             0x0200
bDeviceClass:         0x00
bDeviceSubClass:      0x00
bDeviceProtocol:      0x00
bMaxPacketSize0:      0x40 (64)
idVendor:           0x1D6B
idProduct:          0x0101
bcdDevice:          0x0316
iManufacturer:        0x01
0x0409: "Linux 3.2.0 with musb-hdrc"
iProduct:             0x02
0x0409: "Linux USB Audio Gadget"
iSerialNumber:        0x00
bNumConfigurations:   0x01

ConnectionStatus: DeviceConnected
Current Config Value: 0x01
Device Bus Speed:     High
Device Address:       0x11
Open Pipes:              0

Configuration Descriptor:
wTotalLength:       0x00E7
bNumInterfaces:       0x03
bConfigurationValue:  0x01
iConfiguration:       0x00
bmAttributes:         0xC0 (Bus Powered Self Powered )
MaxPower:             0x01 (2 Ma)

Interface Descriptor:
bInterfaceNumber:     0x00
bAlternateSetting:    0x00
bNumEndpoints:        0x00
bInterfaceClass:      0x01 (Audio)
bInterfaceSubClass:   0x01 (Audio Control)
bInterfaceProtocol:   0x00
iInterface:           0x00

Audio Control Interface Header Descriptor:
bLength:              0x0A
bDescriptorType:      0x24
bDescriptorSubtype:   0x01
bcdADC:             0x0100
wTotalLength:       0x0065
bInCollection:        0x02
baInterfaceNr[1]:     0x01
baInterfaceNr[2]:     0x02

Audio Control Input Terminal Descriptor:
bLength:              0x0C
bDescriptorType:      0x24
bDescriptorSubtype:   0x02
bTerminalID:          0x01
wTerminalType:      0x0201 (Microphone)
bAssocTerminal:       0x00
bNrChannels:          0x02
wChannelConfig:     0x0003
iChannelNames:        0x00
iTerminal:            0x00

Audio Control Feature Unit Descriptor:
bLength:              0x0A
bDescriptorType:      0x24
bDescriptorSubtype:   0x06
bUnitID:              0x02
bSourceID:            0x01
bControlSize:         0x01
bmaControls[0]:
03
bmaControls[1]:
00
bmaControls[2]:
00
iFeature:             0x00

Audio Control Input Terminal Descriptor:
bLength:              0x0C
bDescriptorType:      0x24
bDescriptorSubtype:   0x02
bTerminalID:          0x03
wTerminalType:      0x0402 (Headset)
bAssocTerminal:       0x09
bNrChannels:          0x02
wChannelConfig:     0x0003
iChannelNames:        0x00
iTerminal:            0x00

Audio Control Feature Unit Descriptor:
bLength:              0x0A
bDescriptorType:      0x24
bDescriptorSubtype:   0x06
bUnitID:              0x04
bSourceID:            0x03
bControlSize:         0x01
bmaControls[0]:
03
bmaControls[1]:
00
bmaControls[2]:
00
iFeature:             0x00

Audio Control Selector Unit Descriptor:
bLength:              0x06
bDescriptorType:      0x24
bDescriptorSubtype:   0x05
bUnitID:              0x05
bNrInPins:            0x01
baSourceID[1]:        0x04
iSelector:            0x09

Audio Control Output Terminal Descriptor:
bLength:              0x09
bDescriptorType:      0x24
bDescriptorSubtype:   0x03
bTerminalID:          0x06
wTerminalType:      0x0101 (USB streaming)
bAssocTerminal:       0x00
bSoruceID:            0x05
iTerminal:            0x00

Audio Control Input Terminal Descriptor:
bLength:              0x0C
bDescriptorType:      0x24
bDescriptorSubtype:   0x02
bTerminalID:          0x07
wTerminalType:      0x0101 (USB streaming)
bAssocTerminal:       0x00
bNrChannels:          0x02
wChannelConfig:     0x0003
iChannelNames:        0x00
iTerminal:            0x00

Audio Control Feature Unit Descriptor:
bLength:              0x0A
bDescriptorType:      0x24
bDescriptorSubtype:   0x06
bUnitID:              0x08
bSourceID:            0x0A
bControlSize:         0x01
bmaControls[0]:
01
bmaControls[1]:
02
bmaControls[2]:
02
iFeature:             0x00

Audio Control Output Terminal Descriptor:
bLength:              0x09
bDescriptorType:      0x24
bDescriptorSubtype:   0x03
bTerminalID:          0x09
wTerminalType:      0x0402 (Headset)
bAssocTerminal:       0x03
bSoruceID:            0x08
iTerminal:            0x00

Audio Control Mixer Unit Descriptor:
bLength:              0x0D
bDescriptorType:      0x24
bDescriptorSubtype:   0x04
bUnitID:              0x0A
bNrInPins:            0x02
baSourceID[1]:        0x07
baSourceID[2]:        0x02
bNrChannels:          0x02
wChannelConfig:     0x0003
iChannelNames:        0x00
bmControls:
00
iMixer:               0x00

Interface Descriptor:
bInterfaceNumber:     0x01
bAlternateSetting:    0x00
bNumEndpoints:        0x00
bInterfaceClass:      0x01 (Audio)
bInterfaceSubClass:   0x02 (Audio Streaming)
bInterfaceProtocol:   0x00
iInterface:           0x00

Interface Descriptor:
bInterfaceNumber:     0x01
bAlternateSetting:    0x01
bNumEndpoints:        0x01
bInterfaceClass:      0x01 (Audio)
bInterfaceSubClass:   0x02 (Audio Streaming)
bInterfaceProtocol:   0x00
iInterface:           0x00

Audio Streaming Class Specific Interface Descriptor:
bLength:              0x07
bDescriptorType:      0x24
bDescriptorSubtype:   0x01
bTerminalLink:        0x06
bDelay:               0x01
wFormatTag:         0x0001 (PCM)

Audio Streaming Format Type Descriptor:
bLength:              0x0B
bDescriptorType:      0x24
bDescriptorSubtype:   0x02
bFormatType:          0x01
bNrChannels:          0x02
bSubframeSize:        0x02
bBitResolution:       0x10
bSamFreqType:         0x01
tSamFreq[1]:      0x00BB80 (48000 Hz)

Endpoint Descriptor:
bEndpointAddress:     0x01  OUT
Transfer Type: Isochronous
wMaxPacketSize:     0x00C8 (200)
bInterval:            0x04

Audio Streaming Class Specific Audio Data Endpoint Descriptor:
bLength:              0x07
bDescriptorType:      0x25
bDescriptorSubtype:   0x01
bmAttributes:         0x01
bLockDelayUnits:      0x00
wLockDelay:         0x0000

Interface Descriptor:
bInterfaceNumber:     0x02
bAlternateSetting:    0x00
bNumEndpoints:        0x00
bInterfaceClass:      0x01 (Audio)
bInterfaceSubClass:   0x02 (Audio Streaming)
bInterfaceProtocol:   0x00
iInterface:           0x00

Interface Descriptor:
bInterfaceNumber:     0x02
bAlternateSetting:    0x01
bNumEndpoints:        0x01
bInterfaceClass:      0x01 (Audio)
bInterfaceSubClass:   0x02 (Audio Streaming)
bInterfaceProtocol:   0x00
iInterface:           0x00

Audio Streaming Class Specific Interface Descriptor:
bLength:              0x07
bDescriptorType:      0x24
bDescriptorSubtype:   0x01
bTerminalLink:        0x07
bDelay:               0x01
wFormatTag:         0x0001 (PCM)

Audio Streaming Format Type Descriptor:
bLength:              0x0B
bDescriptorType:      0x24
bDescriptorSubtype:   0x02
bFormatType:          0x01
bNrChannels:          0x02
bSubframeSize:        0x02
bBitResolution:       0x10
bSamFreqType:         0x01
tSamFreq[1]:      0x00BB80 (48000 Hz)

Endpoint Descriptor:
bEndpointAddress:     0x81  IN
Transfer Type: Isochronous
wMaxPacketSize:     0x00C8 (200)
bInterval:            0x04

Audio Streaming Class Specific Audio Data Endpoint Descriptor:
bLength:              0x07
bDescriptorType:      0x25
bDescriptorSubtype:   0x01
bmAttributes:         0x01
bLockDelayUnits:      0x01
wLockDelay:         0x0004

The host recognizes my device as a headset.

Regards,
Priya
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux