USB Audio 2.0 with XMOS explorer kit and I2S Codec

Sub forums for various specialist XMOS applications. e.g. USB audio, motor control and robotics.
Post Reply
sgtpepper335
Member
Posts: 9
Joined: Sat Mar 24, 2018 12:40 pm

USB Audio 2.0 with XMOS explorer kit and I2S Codec

Post by sgtpepper335 »

Hello everyone,

I started developping a 6-channels in 2-channels out USB audio system with the XMOS explorer kit. The reason why I didn't use the xCORE-200 Multichannel board is because I already developped a PCB with a Cirrus Logic CS42448 I2S CODEC with all the hardware needed to make it work (analog filters, regulation, clock oscillator...).

In order to achieve this, I used the USB Audio Guide provided by XMOS and used the USB Audio XK-216-MC application.

I'm new to XMOS so I just tried to understand the structure of the application and I added some code to implement the I²C configuration of my CODEC in the audiohw.xc, I also changed the XN file to fit with my system.

I used the Thesycon USB Audio Driver to test the system in Windows 10, when I plug the card the driver detects the card with the correct number of Inputs/Outputs but if I try recording some sound, It doesn't work.
The I2C configuration works but, if I use a software like Audacity to start recording, the record doesn't start.

I attached some of the files of my really poorly customized program.

Do you have an idea of what I am missing ?

Thank you.
Attachments
XCORE-200-EXPLORER_custom2.xn
(4.56 KiB) Downloaded 551 times
XCORE-200-EXPLORER_custom2.xn
(4.56 KiB) Downloaded 551 times
cs42448.h
(2.35 KiB) Downloaded 535 times
cs42448.h
(2.35 KiB) Downloaded 535 times
audiohw.xc
(13.92 KiB) Downloaded 554 times
audiohw.xc
(13.92 KiB) Downloaded 554 times


User avatar
infiniteimprobability
XCore Legend
Posts: 1126
Joined: Thu May 27, 2010 10:08 am
Contact:

Post by infiniteimprobability »

Can you give a bit more info?
Does playback work?

What do you see when you probe the I2S clocks (they should free run always).

Can you run the debugger and report where the code is when you try to record? (use either xrun --dump-state or the GUI and take a screenshot)

Please can you define doesn't work - does the device come off the bus when you try to record? Does it respond to sample rate changes? Has it locked up?

Does it work if you remove the prints? If so check - http://www.xcore.com/viewtopic.php?t=4088 and use xscope printing which is far less intrusive
sgtpepper335
Member
Posts: 9
Joined: Sat Mar 24, 2018 12:40 pm

Post by sgtpepper335 »

Hello infiniteimprobability :)

The I2S clocks are fine, I checked the values and it's OK. The CODEC is working because the I2S ADC serial bus are getting out data...
It doesn't work neither in Input and output neither.

I'll try to run the debugger as you suggest !

PS: I already succefully used the explorer kit with my PCB and the I2S loopback demo.
Post Reply