how to use USB Configurator to make a USB audio + Generic HID composite device?

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
shihchinlee
Employee
Employee
5 sign-ins First reply posted 5 questions asked

I have a PSoC 6 design which needs to have USB audio and Generic HID functions. How do I combine them to make a composite device. I tried interface association descriptor,  but windows couldn't enumerate any of them. my design.cyusbdev is below.

 

<?xml version="1.0"?>
<!--This file should not be modified. It was automatically generated by USB Configurator 2.40.0.6118-->
<Configuration app="USBCFG" major="2" minor="40" lastSavedWithToolName="USB Configurator" formatVersion="1">
<Node type="root">
<Node type="device">
<Field name="bcdUSB" value="0x200"/>
<Field name="bDeviceClass" value="0xEF"/>
<Field name="bDeviceSubClass" value="0x02"/>
<Field name="bDeviceProtocol" value="0x01"/>
<Field name="bMaxPacketSize0Enum" value="64"/>
<Field name="idVendor" value="0x4B4"/>
<Field name="idProduct" value="0xE17D"/>
<Field name="bcdDevice" value="0x0100"/>
<Field name="iManufacturer" value="Infineon Technologies"/>
<Field name="iProduct" value="USB008"/>
<Field name="iSerialNumber" value="Silicon Generated Serial Number"/>
<Node type="configuration">
<Field name="iConfiguration" value="0x01"/>
<Field name="Self Powered" value="Disable"/>
<Field name="Remote Wakeup" value="Disable"/>
<Field name="bMaxPower" value="100"/>
<Node type="iassosiation">
<Field name="bInterfaceCount" value="4"/>
<Field name="bFunctionClass" value="0x01"/>
<Field name="bFunctionSubClass" value="0"/>
<Field name="bFunctionProtocol" value="0x20"/>
<Field name="iFunction" value="0"/>
</Node>
<Node type="interface.audio.1">
<Node type="alternate.ac.1">
<Field name="bInterfaceProtocol" value="0"/>
<Field name="iInterface" value="PSoC 6 USB Audio Device"/>
<Node type="alternate.ac.h">
<Field name="bInCollection" value="2"/>
<Field name="baInterfaceNr" value="0x01; 0x02;"/>
</Node>
<Node type="alternate.ac.featureunit">
<Field name="bUnitID" value="2"/>
<Field name="bSourceID" value="1"/>
<Field name="bControlSize" value="1"/>
<Field name="bmaControls" value="0x03"/>
<Field name="iFeature" value=""/>
</Node>
<Node type="alternate.ac.interm">
<Field name="bTerminalID" value="1"/>
<Field name="wTerminalType" value="0x101"/>
<Field name="bAssocTerminal" value="0"/>
<Field name="bNrChannels" value="2"/>
<Field name="wChannelConfig" value="3"/>
<Field name="iChannelNames" value=""/>
<Field name="iTerminal" value="USB Streaming"/>
</Node>
<Node type="alternate.ac.outterm">
<Field name="bTerminalID" value="3"/>
<Field name="wTerminalType" value="0x301"/>
<Field name="bAssocTerminal" value="0"/>
<Field name="bSourceID" value="2"/>
<Field name="iTerminal" value="Speaker"/>
</Node>
<Node type="alternate.ac.interm">
<Field name="bTerminalID" value="4"/>
<Field name="wTerminalType" value="0x201"/>
<Field name="bAssocTerminal" value="0"/>
<Field name="bNrChannels" value="2"/>
<Field name="wChannelConfig" value="3"/>
<Field name="iChannelNames" value=""/>
<Field name="iTerminal" value="Microphone"/>
</Node>
<Node type="alternate.ac.outterm">
<Field name="bTerminalID" value="5"/>
<Field name="wTerminalType" value="0x101"/>
<Field name="bAssocTerminal" value="0"/>
<Field name="bSourceID" value="4"/>
<Field name="iTerminal" value="USB Straming"/>
</Node>
<Node type="endpoint.ac.1">
<Field name="endpointNum" value="EP6"/>
<Field name="direction" value="IN"/>
<Field name="Transfer Type" value="Interrupt"/>
<Field name="Synchronization Type" value="No Synchronization"/>
<Field name="Usage Type" value="Data endpoint"/>
<Field name="wMaxPacketSize" value="2"/>
<Field name="bInterval" value="30"/>
<Field name="bRefresh" value="0"/>
<Field name="bSynchAddress" value="0"/>
</Node>
</Node>
</Node>
<Node type="interface.audio.1">
<Node type="alternate.as.1">
<Field name="bInterfaceProtocol" value="0"/>
<Field name="iInterface" value="Speaker"/>
</Node>
<Node type="alternate.as.1">
<Field name="bInterfaceProtocol" value="0"/>
<Field name="iInterface" value="Active 24 bit"/>
<Node type="alternate.as.gen">
<Field name="bTerminalLink" value="1"/>
<Field name="bDelay" value="1"/>
<Field name="wFormatTag" value="1"/>
</Node>
<Node type="alternate.as.fmttypei">
<Field name="bNrChannels" value="2"/>
<Field name="bSubframeSize" value="3"/>
<Field name="bBitResolution" value="24"/>
<Field name="bSamFreqType" value="2"/>
<Field name="tSamFreq" value="44100; 48000;"/>
<Field name="tLowerSamFreq" value="0"/>
<Field name="tUpperSamFreq" value="0"/>
</Node>
<Node type="endpoint.as.1">
<Field name="endpointNum" value="EP1"/>
<Field name="direction" value="OUT"/>
<Field name="Transfer Type" value="Isochronous"/>
<Field name="Synchronization Type" value="Asynchronous"/>
<Field name="Usage Type" value="Data endpoint"/>
<Field name="wMaxPacketSize" value="294"/>
<Field name="bInterval" value="1"/>
<Field name="bRefresh" value="0"/>
<Field name="bSynchAddress" value="0x83"/>
<Node type="endpoint.asendpoint.1">
<Field name="Sampling Frequency" value="1"/>
<Field name="Pitch" value="0"/>
<Field name="wMaxPacketSize" value="0"/>
<Field name="bLockDelayUnits" value="0"/>
<Field name="wLockDelay" value="0"/>
</Node>
</Node>
<Node type="endpoint.as.1">
<Field name="endpointNum" value="EP3"/>
<Field name="direction" value="IN"/>
<Field name="Transfer Type" value="Isochronous"/>
<Field name="Synchronization Type" value="No Synchronization"/>
<Field name="Usage Type" value="Feedback endpoint"/>
<Field name="wMaxPacketSize" value="3"/>
<Field name="bInterval" value="4"/>
<Field name="bRefresh" value="3"/>
<Field name="bSynchAddress" value="0"/>
</Node>
</Node>
</Node>
<Node type="interface.audio.1">
<Node type="alternate.as.1">
<Field name="bInterfaceProtocol" value="0"/>
<Field name="iInterface" value="Microphone"/>
</Node>
<Node type="alternate.as.1">
<Field name="bInterfaceProtocol" value="0"/>
<Field name="iInterface" value="Active 24 bit"/>
<Node type="alternate.as.gen">
<Field name="bTerminalLink" value="5"/>
<Field name="bDelay" value="1"/>
<Field name="wFormatTag" value="1"/>
</Node>
<Node type="alternate.as.fmttypei">
<Field name="bNrChannels" value="2"/>
<Field name="bSubframeSize" value="3"/>
<Field name="bBitResolution" value="24"/>
<Field name="bSamFreqType" value="2"/>
<Field name="tSamFreq" value="44100; 48000;"/>
<Field name="tLowerSamFreq" value="0"/>
<Field name="tUpperSamFreq" value="0"/>
</Node>
<Node type="endpoint.as.1">
<Field name="endpointNum" value="EP2"/>
<Field name="direction" value="IN"/>
<Field name="Transfer Type" value="Isochronous"/>
<Field name="Synchronization Type" value="Asynchronous"/>
<Field name="Usage Type" value="Data endpoint"/>
<Field name="wMaxPacketSize" value="294"/>
<Field name="bInterval" value="1"/>
<Field name="bRefresh" value="0"/>
<Field name="bSynchAddress" value="0"/>
<Node type="endpoint.asendpoint.1">
<Field name="Sampling Frequency" value="1"/>
<Field name="Pitch" value="0"/>
<Field name="wMaxPacketSize" value="0"/>
<Field name="bLockDelayUnits" value="0"/>
<Field name="wLockDelay" value="0"/>
</Node>
</Node>
</Node>
</Node>
<Node type="interface">
<Node type="alternate.hid">
<Field name="bInterfaceSubClass" value="0"/>
<Field name="bInterfaceProtocol" value="0"/>
<Field name="iInterface" value="PlaylistControl"/>
<Node type="hid">
<Field name="bCountryCode" value="0x00"/>
<Field name="Report" value="0x05;0x0C;0x09;0x01;0xA1;0x01;0x15;0x00;0x25;0x01;0x75;0x01;0x95;0x07;0x09;0xCD;0x09;0xB5;0x09;0xB6;0x09;0xB7;0x09;0xE2;0x09;0xE9;0x09;0xEA;0x81;0x02;0x95;0x01;0x81;0x01;0xC0;"/>
</Node>
<Node type="endpoint">
<Field name="endpointNum" value="EP4"/>
<Field name="direction" value="IN"/>
<Field name="Transfer Type" value="Interrupt"/>
<Field name="Synchronization Type" value="No Synchronization"/>
<Field name="Usage Type" value="Data endpoint"/>
<Field name="wMaxPacketSize" value="2"/>
<Field name="bInterval" value="40"/>
</Node>
</Node>
</Node>
<Node type="interface">
<Node type="alternate.hid">
<Field name="bInterfaceSubClass" value="0"/>
<Field name="bInterfaceProtocol" value="0"/>
<Field name="iInterface" value=""/>
<Node type="hid">
<Field name="bCountryCode" value="0x00"/>
<Field name="Report" value="0x06;0xFF;0x00;0x09;0x01;0xA1;0x01;0x19;0x00;0x29;0x40;0x15;0x00;0x26;0x00;0xFF;0x75;0x08;0x95;0x40;0x91;0x00;0x19;0x00;0x29;0x40;0x15;0x00;0x26;0x00;0xFF;0x75;0x08;0x95;0x40;0x81;0x00;0xC0;"/>
</Node>
<Node type="endpoint">
<Field name="endpointNum" value="EP7"/>
<Field name="direction" value="IN"/>
<Field name="Transfer Type" value="Interrupt"/>
<Field name="Synchronization Type" value="No Synchronization"/>
<Field name="Usage Type" value="Data endpoint"/>
<Field name="wMaxPacketSize" value="64"/>
<Field name="bInterval" value="10"/>
</Node>
<Node type="endpoint">
<Field name="endpointNum" value="EP8"/>
<Field name="direction" value="OUT"/>
<Field name="Transfer Type" value="Interrupt"/>
<Field name="Synchronization Type" value="No Synchronization"/>
<Field name="Usage Type" value="Data endpoint"/>
<Field name="wMaxPacketSize" value="64"/>
<Field name="bInterval" value="10"/>
</Node>
</Node>
</Node>
</Node>
</Node>
</Node>
</Configuration>

0 Likes
1 Solution
Aashita_R
Moderator
Moderator
Moderator
50 likes received 100 solutions authored 250 replies posted

Hi @shihchinlee ,

I see that you have created a similar thread already here : how to configure a USB descriptor to enable the USB audio and a generic HID simultaneously?  . To answer your query, you cannot use Interface association descriptor in case of implementing two different functionalities composite device like Audio + HID in your case. This is because this descriptor describes two or more interfaces that are associated with a single device function. The interface association descriptor (IAD) informs the host that the interfaces are linked together. Please refer page no 27 of our application note USB 101 to get better insights on the same.

In case of Audio + HID composite device, you need two separate interfaces in the device descriptor and configure them accordingly. I hope the above information helps you to get started. Please add here in case of any further query.

Best Regards,

Aashita

 

View solution in original post

0 Likes
3 Replies
Aashita_R
Moderator
Moderator
Moderator
50 likes received 100 solutions authored 250 replies posted

Hi @shihchinlee ,

I see that you have created a similar thread already here : how to configure a USB descriptor to enable the USB audio and a generic HID simultaneously?  . To answer your query, you cannot use Interface association descriptor in case of implementing two different functionalities composite device like Audio + HID in your case. This is because this descriptor describes two or more interfaces that are associated with a single device function. The interface association descriptor (IAD) informs the host that the interfaces are linked together. Please refer page no 27 of our application note USB 101 to get better insights on the same.

In case of Audio + HID composite device, you need two separate interfaces in the device descriptor and configure them accordingly. I hope the above information helps you to get started. Please add here in case of any further query.

Best Regards,

Aashita

 

0 Likes

Aashita,

Attached is my descriptor file created by USB Configurator 2.40.

Hardware : CY8CKIT-062S2-43012 + CY8CKIT-062-TFT

Software : ModusToolbox v2.4.0

Project : USB_Audio_Device_FreeRTOS

 

Windows couldn’t enumerate any class after I downloaded the code. Can you help?

 

Thanks,

SC

0 Likes

Dear @shihchinlee ,

I am also interested in composite USB Audio  + HID device, did you have any working example now ?

Regards

Radim

0 Likes