Hello,
I've built a custom board with xu316-1024-qf60b, self powered, 2 audio Clocks 24Mhz and 22Mhz (enables by 2 gpios) and an SPI flash (old 25p40)
Working under sw usb audio 7.2.0 sdk:
Dfu
I2S ouput ( Async master mode)
JTAG without xlink
In linux Ive tested in master mode, input and output should work with no device( slave) connected :
i2S on tile 0 and xud on tile 1
Speaker-test is working well in output mode
I'm unable to get I2S input working (while i2S output is OK) arecord test is stalled.
What could explain the different behaviour between I2S input and output ?
Thanks
Custom Design XU316-1024-QF60B
-
- New User
- Posts: 2
- Joined: Mon Aug 26, 2024 12:24 pm
-
Verified
- XCore Legend
- Posts: 1119
- Joined: Thu Dec 10, 2009 9:20 pm
- Location: Bristol, UK
Mod edit: moved to USB Audio
Technical Director @ XMOS. Opinions expressed are my own
-
Verified
- XCore Legend
- Posts: 1143
- Joined: Thu May 27, 2010 10:08 am
We have to distinguish between the I2S data in/out and the clock roles of I2S. I2S data pins will always have the same job - they will drive I2S data regardless of clock role.What could explain the different behaviour between I2S input and output ?
The clock role is different from the data - When XMOS is master (
Code: Select all
CODEC_MASTER=0
Code: Select all
CODEC_MASTER=1
Code: Select all
CODEC_MASTER=1
If the external I2S master isn't driving then audio hub in sw_usb_audio won't loop and you'll get the problem you are seeing - no audio data/clocks are being pushed so it won't record or play properly. Also note that MCLK needs to be supplied too - we use that to calculate the feedback for the host as part of Asynch mode (where the device owns the audio clock).
Engineer at XMOS
-
- New User
- Posts: 2
- Joined: Mon Aug 26, 2024 12:24 pm
Hi
Thanks for taking time to reply.
From my understanding when codec master=1 :
I'm providing the mclk
Xmos chip will provide bclk +lrclk
With oscilloscope I'm seeing clock on defined pin (bclk + lrclk) and data (dac mode)
When switching to adc mode
I should see the same clock signals ( from xmos to device)
Am i right?
Thanks
Stephane
Thanks for taking time to reply.
From my understanding when codec master=1 :
I'm providing the mclk
Xmos chip will provide bclk +lrclk
With oscilloscope I'm seeing clock on defined pin (bclk + lrclk) and data (dac mode)
When switching to adc mode
I should see the same clock signals ( from xmos to device)
Am i right?
Thanks
Stephane
-
Verified
- XCore Legend
- Posts: 1143
- Joined: Thu May 27, 2010 10:08 am
No - CODEC_MASTER=1 is as saying XMOS is the I2S slave.From my understanding when codec master=1 :
I'm providing the mclk
Xmos chip will provide bclk +lrclk
So the xcore will expect to see LRCLK/BCLK driven from the DAC/ADC when CODEC_MASTER=1
In our latest ref designs in the XU316 MC board we still provide the MCLK to the DAC/ADC even for CODEC_MASTER=1. However this can be disabled if you want your own local clock source.
If setting CODEC_MASTER=0 (default) then xmos drives all clocks (although you can still have a external MCLK input if you wish but you need to disable the xmos PLL driving it).
Engineer at XMOS