New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Provide sample code for usb audio device class #58
Comments
Thanks for the feedback. |
Hi, When looking at the issue here : #9 , it looked like there were already a demo code available. Even if the code is not complete, maybe the template can be shared ? Regards, |
Sure, you can use the template. |
Hi, I meant that there were no template availbale, only some part of it. Some defines used in the official documentation are only provided in the issue #9 but there's nothing that we can use as a template to at least have the usbx usage part. The problem is that using the codes snippets from the demo example, I can get the USB audio device enumerated on the computer and I see that there are some URB transfers to the device (using wireshark). Unfortunately, the ux_device_class_audio_stream_frame_done callback is never called. There's a lack of documentation on the expected behavior of the audio class (what is the usage of the callbacks). Regards, |
Audio support needs isochronous transfer support (currently needed for UAC and UVC, but not other classes), so if device controller driver is not ready for this transfer mode, the transfer done callback will never happen. The instance activate/deactivate/change are actually related to control transfer which is the default supported transfer mode for all devices and classes. So the situation could be: your DCD driver is ready for device enumeration (control transfer ready) but there is still issue to be solved to let isochronous transfer run. |
Hi, Thanks for this clarification. I'll check the DCD driver. Regards |
Hi, DCD driver (stm32) to allow isochronous transfers, but after playing around with the test project I'm working on, I've only been able to see some transfers (not working as expected thus) after calling ux_device_class_audio_reception_start, but I don't know if this is the normal usage. Regards, |
No, that's called once before writing frames. |
The ux_device_class_audio_reception_start function is not called anywhere in the usbx code. Reading the code of this functions shows that it's not related to writing frame (I'm trying to receive audio frame from the host). Is there any DCD driver for an other platform which work with isochronous transfers (in the examples projects), so that I can check how it should be handled. Regards, Jerome |
@jbruneaux31 which chip/eval-board do you use? |
Hi, I'm using the STM32F429ZI on the NUCLEO-F429ZI evaluation board. Regards |
Hi, We are working to provide USBX device audio application running on STM32H7 platform as a reference application that can be ported to STM32F4. Regards ST Team. |
Hi Thanks. Hope you can put a link here to the sample when ready. Regards |
sounds great! |
Closing. |
Hi @jbruneaux31, This is a sample example showing support of Audio Class that can be accessed from ST github . Regards ST Team. |
Hi,
Can you please provide sample code for USB audio device class ?
I've seen the partial example here :
https://docs.microsoft.com/fr-fr/azure/rtos/usbx/usbx-device-stack-supplemental-2#usb-device-audio-class
But there's still a lot of missing bits to have a functional example. The API documentation is quite short.
Regards,
The text was updated successfully, but these errors were encountered: