Any known difference between config for ALSA and CoreAudio? [solved]

Discussions about USB Audio on XMOS devices
grumpi
Junior Member
Posts: 5
Joined: Sat Mar 01, 2025 5:49 pm

Any known difference between config for ALSA and CoreAudio? [solved]

Post by grumpi »

Hey,
I would like my project to support USB-Audio. It is based on the FFVA example from the sln_voice repository. (The USB configuration/code differ only in the sense that I included an additional CDC interface).
When connected to my Mac-book, I can access both the speaker and mics of my board via USB, and everything works fine.
But when I try to connect my board to a linux system I can't get the microphone working with ALSA. The speaker is working fine, though.
The microphone (capture stream) gets detected by ALSA and no errors are shown. But when I want to record via arecord I only get silence. Ich checked the mute state in alsamixer, but the FFVA example usb code doesn't include a hardware mixer control, is there a default state?

Does anyone know about a specific configuration that is needed for ALSA, or did anyone run into a similar issue when trying to get the FFVA example running with linux?

Thanks for any ideas or suggestions!
Last edited by grumpi on Tue Mar 04, 2025 4:53 pm, edited 1 time in total.
MichaelB
Verified
Junior Member
Posts: 5
Joined: Wed Feb 21, 2018 4:25 pm

Post by MichaelB »

In answer to your question, I do not know of a specific configuration needed for FFVA to work with ALSA. You might try using Audacity or sox instead of arecord just to see what happens. It would also be useful to see the USB descriptors returned by the device.
grumpi
Junior Member
Posts: 5
Joined: Sat Mar 01, 2025 5:49 pm

Post by grumpi »

Thanks for your reply! I just figured out what was going on. In the end it wasn't configuration related at all. I had a bug in my firmware which blocked the microphone pipeline when there was no reference signal for AEC coming via USB. It seems that CoreAudio at least opens both directions endpoints while ALSA only opens the connection endpoint used for recording. So on the mac the pipeline did not get blocked but on Linux it was waiting for a reference signal.
Last edited by grumpi on Tue Mar 04, 2025 4:54 pm, edited 1 time in total.