RT1024 USB Audio unified 2.0

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

RT1024 USB Audio unified 2.0

1,594件の閲覧回数
asarbs
Contributor II

Hi Forum Team, 

I'm working on RT1024 and try to make USB work "in bought directions" as a speaker and microphone. I have used preset   Audio 2.0 unified (bear metal). Unfortunately I receive only "kUSB_DeviceAudioEventStreamSendResponse" in USB_DeviceInterface0AudioControlCallback function. When I make some debugging  I see that in USB_DeviceAudioStreamEndpointsInit only "USB_DeviceAudioIsochronousIn" is called in. I can't figure out how to setup endpoints to make it work. 

if ((USB_ENDPOINT_ISOCHRONOUS == (epInitStruct.transferType & USB_DESCRIPTOR_ENDPOINT_ATTRIBUTE_TYPE_MASK)) &&
(USB_IN == ((epInitStruct.endpointAddress & USB_DESCRIPTOR_ENDPOINT_ADDRESS_DIRECTION_MASK) >>
USB_DESCRIPTOR_ENDPOINT_ADDRESS_DIRECTION_SHIFT)))
{
epCallback.callbackFn = USB_DeviceAudioIsochronousIn;
}
else
{
epCallback.callbackFn = USB_DeviceAudioIsochronousOut;
}

0 件の賞賛
返信
7 返答(返信)

1,568件の閲覧回数
jingpan
NXP TechSupport
NXP TechSupport

HI @asarbs ,

To enable both input and output audio, you must use two interface descriptor and a interface association descriptor in g_UsbDeviceConfigurationDescriptor[], one interface descriptor for input and one for output.

You can refer to both the dev_audio_generator and dev_audio_speaker examples in SDK.

 

Regards,

Jing

0 件の賞賛
返信

1,547件の閲覧回数
asarbs
Contributor II
Thanks for your replay.
I'm using examples and they work separately, but when I combine them in to one configuration in "kUSB_DeviceAudioEventStreamRecvResponse" I have ep_cb_param->length = 0, so there is no audio data for me.
0 件の賞賛
返信

1,505件の閲覧回数
jingpan
NXP TechSupport
NXP TechSupport

Hi @asarbs ,

Can you share the project? Or you can create a ticket in nxp portal.

 

Regards,

Jing

0 件の賞賛
返信

1,500件の閲覧回数
asarbs
Contributor II
Unfortunately I can't login to ticket portal.
0 件の賞賛
返信

971件の閲覧回数
mttjcksn
Contributor II

Was there any progress on this? I have the same issue.

Using code generated for 'Audio unified' UAC2, ep_cb_param->length is always zero, so no audio is received.
 
Is there a guide for the generated code? i've only found an old guide for the UAC1 code, which is out of date.

There's a lot of uncommented generated code, and some vars are read but never written, so I guess you are supposed to edit it, but it's a long way from user-friendly.
0 件の賞賛
返信

921件の閲覧回数
mttjcksn
Contributor II
I figured it out..

The code generated by the config tool is missing many crucial parts including setting startPlayFlag, audioPlayTransferSize, audioPlayBufferSize, updating feedback data, updating of vars used to calculate remaining space in the play buffer, max packet sizes, etc etc.

All this code is in the examples, but the examples don's use the generated code, so it's difficult to compare the two. In addition, you can't just copy across the code from the examples to the generated code because all the required macros are in a C file, not a header file, so you have to move all of those, or redefine them.

I appreciate the examples, but the code generation is just a mess, and the lack of code comments or guide doesn't help. Not the end of the world, but you really do have to take time to read through the thousands of lines and re-write much of it if you plan to use the generator.

215件の閲覧回数
asarbs
Contributor II
Thanks for replay I have solved this issue months ago.
0 件の賞賛
返信