XK-AUDIO-316-MC-AB with Linux

Technical discussions around xCORE processors (e.g. xcore-200 & xcore.ai).
ratin3@gmail.com
Member++
Posts: 17
Joined: Fri Nov 15, 2024 2:40 am

XK-AUDIO-316-MC-AB with Linux

Post by ratin3@gmail.com »

Hi Folks,
Introducing myself from here in sunny San Diego, California. I recently got a hold of couple of XK-AUDIO-316-MC-AB boards and started experimenting with them. Currently I have one hooked up to a Xilinx Zynq based system running Linux on quad core ARM processor thru USB, alsa packages are included, kernel version 4.19.0-xilinx-v2019.2.
I have the sample executable app_usb_aud_xk_316_mc_2AMi8o8xxxxxx_tdm8.xe running on the XMOS and verified any kind of playback of audio from an Windows system gets routed to the XK-AUDIO-316-MC-AB. However this is not happening for linux when I use aplay. I verified XMOS device is seen properly:
[/sys/bus/usb/devices] # lsusb
<snip>
Bus 003 Device 029: ID 20b1:0016 XMOS XMOS xCORE.ai MC (UAC2.0)
<snip>

and proper class 2 driver is loaded too:
/: Bus 03.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 480M
|__ Port 1: Dev 2, If 0, Class=, Driver=hub/7p, 480M
|__ Port 1: Dev 8, If 0, Class=, Driver=hub/4p, 480M
|__ Port 3: Dev 29, If 2, Class=, Driver=snd-usb-audio, 480M
|__ Port 3: Dev 29, If 0, Class=, Driver=snd-usb-audio, 480M
|__ Port 3: Dev 29, If 3, Class=, Driver=, 480M
|__ Port 3: Dev 29, If 1,

[/sys/bus/usb/devices] # aplay -L
null
Discard all samples (playback) or generate zero samples (capture)
default:CARD=monitor
DisplayPort monitor,
Default Audio Device
sysdefault:CARD=monitor
DisplayPort monitor,
Default Audio Device
default:CARD=MCUAC20
XMOS xCORE.ai MC (UAC2.0), USB Audio
Default Audio Device
sysdefault:CARD=MCUAC20
XMOS xCORE.ai MC (UAC2.0), USB Audio
Default Audio Device
front:CARD=MCUAC20,DEV=0
XMOS xCORE.ai MC (UAC2.0), USB Audio
Front output / input
surround21:CARD=MCUAC20,DEV=0
XMOS xCORE.ai MC (UAC2.0), USB Audio
2.1 Surround output to Front and Subwoofer speakers
surround40:CARD=MCUAC20,DEV=0
XMOS xCORE.ai MC (UAC2.0), USB Audio
4.0 Surround output to Front and Rear speakers
surround41:CARD=MCUAC20,DEV=0
XMOS xCORE.ai MC (UAC2.0), USB Audio
4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=MCUAC20,DEV=0
XMOS xCORE.ai MC (UAC2.0), USB Audio
5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=MCUAC20,DEV=0
XMOS xCORE.ai MC (UAC2.0), USB Audio
5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=MCUAC20,DEV=0
XMOS xCORE.ai MC (UAC2.0), USB Audio
7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
iec958:CARD=MCUAC20,DEV=0
XMOS xCORE.ai MC (UAC2.0), USB Audio
IEC958 (S/PDIF) Digital Audio Output

speaker-test -w --device=sysdefault:CARD=MCUAC20 /home/wavfiles/CantinaBand60.wav
speaker-test -w --device=iec958:CARD=MCUAC20,DEV=0 /home/wavfiles/CantinaBand60.wav

but nothing thru the speaker attached to aout1/2.
Wondering if anybody have any sugestions
Thanks,
Ratin
User avatar
Ross
Verified
XCore Legend
Posts: 1214
Joined: Thu Dec 10, 2009 9:20 pm
Location: Bristol, UK

Post by Ross »

We have no open issues regarding Linux AFAIK.

Possibly try reducing channel count or even UAC 1.0 mode?
Technical Director @ XMOS. Opinions expressed are my own
ratin3@gmail.com
Member++
Posts: 17
Joined: Fri Nov 15, 2024 2:40 am

Post by ratin3@gmail.com »

Hi Sorry I don't know how to force UAC 1.0 mode. Can you elaborate on that? I am also noticing sometime sink devices are not enumerated i.e. aplay -L does not list xmos devices. Seems to be intermittent.
User avatar
Ross
Verified
XCore Legend
Posts: 1214
Joined: Thu Dec 10, 2009 9:20 pm
Location: Bristol, UK

Post by Ross »

Build your project with the define AUDIO_CLASS set to 1 (normally 2)
Technical Director @ XMOS. Opinions expressed are my own
User avatar
fabriceo
Respected Member
Posts: 257
Joined: Mon Jan 08, 2018 4:14 pm

Post by fabriceo »

whats about a possible difference between the player expectation for "CantinaBand60.wav" vs the alternate settings in you descriptor ?
I mean, try using a plughw filter to just confirm that this is not an issue with this type of strict verification which are done by default in Alsa.