XU316 Voice and USB audio class 2.0

Discussions about USB Audio on XMOS devices
stuartiannaylor
Newbie
Posts: 1
Joined: Thu Jan 09, 2025 2:46 pm

XU316 Voice and USB audio class 2.0

Post by stuartiannaylor »

Hi wonder if someone can help as was wondering if the current product solf by Seeed could have the USB audio class libs enabled rather than the I2S.
So created an issue on github to ask https://github.com/respeaker/ReSpeaker_Lite/issues/3

I was just thinking it would also be great to get this board on any platform with the usb class 2,0 audio driver.
"Is it possible to provide firmware for https://www.seeedstudio.com/ReSpeaker-Lite-p-5928.html with the usb examples shown in https://github.com/xmos/sw_usb_audio.
So the xmos can be usb plug&play for various platforms..."

The reply has confused me as I have limited knowledge and there doesn't seem yo be a full schematic of how the codec and mics are connected, but pretty sure the DFU usb is useless for usb audio...
"Hi @StuartIanNaylor, the examples you named are for making XU316 a USB audio interface, but not a far-field microphone array. And we have already provided USB firmware for ReSpeaker Lite too, please try this firmware, it should meet your need."

Being a xmos noob, a quick glance at https://github.com/xmos/sw_usb_audio?tab=readme-ov-file and xmos docs would seem to indicate this is very possible and not exclusive of https://github.com/xmos/fwk_voice/tree/main/modules.
Is that correct but maybe how the codec and layout of the Seeed solution just isn't possible?

If any of you guys who are more knowledgeable than me, would you comment or even post the info on github if possible?

Stuart

Really to be honest I didn't want to start learning programming the XMOS but having the usb audio available to capture and create datasets for use with was my intention, but my microcontroller C is beginners level.
I had my fingers crossed it could just be firmware, but I would be surprised the DFU firmware does "please try this firmware, it should meet your need."
User avatar
upav
Verified
Member
Posts: 11
Joined: Wed May 22, 2024 3:30 pm

Post by upav »

Hi Stuart,

From a quick look, it seems like you and the repo maintainer didn't quite understand each other.
The software on that board indeed doesn't use sw_usb_audio as it's an RTOS-based audio pipeline. I would think that the source code they use comes from this repo.

Lucky for you, you don't have to deal with configuring/modifying/building the firmware yourself, they've pre-built the binaries for you in the link they've sent in the github issue.
Again, so you don't have to deal with xmos tools and connecting debuggers, the firmware swap is done over DFU rather than JTAG.
I believe this readme goes through how to use dfu-utils with the usb binary to update the firmware from i2s to usb.

So if you're only interested in switching from i2s to usb without modifying the source code, I would suggest going through the instructions they have in the repo and using the binary they've pre-built for you,
everything else will require a lot more effort.

P.S. Saying that, I've never used the Seeed board so I don't really know how it works, I just had a quick look thru what their product is and their github repo.
Let me know if it works :)

Cheers,
Pavel
xmos software engineer
stuartiannaylor
Newbie
Posts: 1
Joined: Thu Jan 09, 2025 2:46 pm

Post by stuartiannaylor »

Dunno Pavel,

I thought all those libs where rtos libs as the examples are for a XU316 dev board. https://github.com/xmos/lib_xua?tab=readme-ov-file
Its OK as was more interested in created a Keyword Model in tensorflow and connect up to create a dataset of actual device capture .
I think the same as yes the DFU will allow me to flash new firmware, but adding the USB Audio drivers would require xmos programming knowledge to create that firmware.
Shame really Seeed don't support USB Audio than the current I2S and esp32 focus.
Hey ho, thanks for the reply.
Last edited by stuartiannaylor on Thu Jan 09, 2025 5:16 pm, edited 1 time in total.