Composite USB-CDC and Audio Class

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Composite USB-CDC and Audio Class

ソリューションへジャンプ
3,849件の閲覧回数
mjbcswitzerland
Specialist V

Hi All

 

I am attempting to make a USB device composite with CDC and Audio class.

The audio calls and CDC configurations work on their own and the CDC works in the composite but the interfaces in the audio class don't - the host says that they are somehow incorrectly configured (the host does however sent a Setinterface to each of them).

 

The configuration descriptor defines the CDC interfaces first (as interface association descriptor  with CDC control as interface 0 and CDC data as interface 1), followed by 3 audio interfaces (audio control = 2, loud speaker = 3, microphone = 4).

 

The only thing that I am aware of that should influence the audio configuration when the interfaces are changes is in the audio control interface's function header where two audio interfaces and their first and last interface numbers are specified:
- Audio alone these are 1 and 2.

- With CDC before it (with its two interfaces) 3 and 4 are specified instead.

 

Has anyone done this or know the details as to what can go wrong?

 

Regards

 

Mark

ラベル(1)
0 件の賞賛
返信
1 解決策
2,904件の閲覧回数
mjbcswitzerland
Specialist V

Update:

Solved with an interface association descriptor wrapped around the audio interfaces.

Regards

Mark

元の投稿で解決策を見る

0 件の賞賛
返信
3 返答(返信)
2,905件の閲覧回数
mjbcswitzerland
Specialist V

Update:

Solved with an interface association descriptor wrapped around the audio interfaces.

Regards

Mark

0 件の賞賛
返信
2,907件の閲覧回数
michaelhuslig
Contributor IV

Hi Mark,

I am trying something similar and getting the same error:  "This device cannot start. (Code 10) The I/O device is configured incorrectly or the configuration parameters to the driver are incorrect."


  I am 'basically' trying to add the audio components from the current sdk example dev_composite_hid_audio_unified to the dev_composite_cdc_vcom_cdc_vcom example.  In other words, adding the audio to a dual cdc/vcom implementation on a custom board.  I tried adding the IAD:

    /* Interface Association Descriptor for audio */
    USB_IAD_DESC_SIZE, /* Size of this descriptor in bytes */
    USB_DESCRIPTOR_TYPE_INTERFACE_ASSOCIATION,    /* INTERFACE_ASSOCIATION Descriptor Type  */
    0x04,    /* The first interface number associated with this function (4 previous interfaces for vcom*2) */
    0x03,    /* The number of contiguous interfaces associated with this function */
    USB_AUDIO_CLASS,    /* The function belongs to the Audio Class  */
    USB_SUBCLASS_AUDIOCONTROL,
    0x00,    /* The function uses the No class specific protocol required Protocol  */
    0x02,    /* The Function string descriptor index */

but it doesn't help.  As far as I can tell, I have adjusted all the parameters, indexes, counts, etc. that need to be changed.  I am out of ideas.

Mike H.

0 件の賞賛
返信
2,906件の閲覧回数
michaelhuslig
Contributor IV

I got it to work by switching the order of the audio and cdc descriptors in the configuration descriptor.  I had used the correct parameters as far as I knew.  I also switched the audio and HID descriptors in the original audio_unified clone, changing the endpoint and interface indices as needed, and that also caused the windows error.  So the real cause is still up in the air.

Mike H.

0 件の賞賛
返信