USB Audio TDM Implementation Issue - No Audio

Discussions about USB Audio on XMOS devices
alwalker
Experienced Member
Posts: 102
Joined: Sun Apr 08, 2018 11:19 pm

USB Audio TDM Implementation Issue - No Audio

Post by alwalker »

I used sw_usb_audio v9.0.0 to build the 2ASi8o8xxxxxx_tdm8 configuration and am running it on an Explorer Kit board.
 
  • USB Audio Class 2
    Asynchronous Slave
    8 Input Channels
    8 Output Channels
    TDM Operation
I have the following inputs to the Explorer Kit as shown on the PicoScope logic analyser:

D0: MCLK IN (24.576 MHz) on X0D13 (1F0)
D1: BCLK IN (12.288 MHz) on X0D23 (1H0)
D2 FSYNC IN (48 kHz with Sync Length of 32 bits) on X0D22 (1G0)
D3 TDM IN (Data in slots 0 & 1 on X0D24 (1I0)

PicoScope TDM.png

The XMOS device appears ok in the audio devices list in Apple Logic Pro, and I can select from the eight input channels as I would expect.
Logic Pro Audio Devices.png
Logic Pro Input Channels.png

The only problem is that I’m not getting any audio into Logic Pro, any ideas please?

Kind regards,

Al
You do not have the required permissions to view the files attached to this post.
alwalker
Experienced Member
Posts: 102
Joined: Sun Apr 08, 2018 11:19 pm

Post by alwalker »

As there is no board support for the Explorer Kit in sw_usb_audio, I used hardware connections from the XK_Audio_216_MC_AB board (no longer available, so I can’t use one for my development work targeting XC-200), so in theory at least the software implementation for 2ASi8o8xxxxxx_tdm8 should work on an Explorer Kit as the clocks are generated externally:

Tile 0

Explorer Kit
MCLK IN X0D13
FSYNC IN X0D22
BCLK IN X0D23
TDM IN X0D24
TDM OUT X0D36

XK_Audio_216_MC_AB
MCLK_XCORE X0D13
LRCLK X0D22
SCLK X0D23
xSDIO1 X0D24
xDAC_SD1 X0D36


Tile 1

Explorer Kit
MCLK_XCORE1 X1D35

XK_Audio_216_MC_AB
MCLK X1D35

So I think this is all I need for the 2ASi8o8xxxxxx_tdm8 to work, but obviously I'm missing something...

And the ability to insert tabs would be nice :o)
alwalker
Experienced Member
Posts: 102
Joined: Sun Apr 08, 2018 11:19 pm

Post by alwalker »

I haven't had any response from XMOS engineers to this post, hopefully this isn't a policy of only answering queries on xmos.ai/XU316. If this is the case then it's rather disappointing, but I would be happy for my concerns to be proven unjustified.

I'd also like to suggest that as the XK_Audio_216_MC_AB board is no longer available, that lib_board_support is updated to include a board support package for Explorer Kit with a reference design for an external CS2100 circuit to provide solutions for XC-200 USB audio. I would be very happy to test such a solution for XMOS as this is exactly what I'm trying to do.

What is the expectation for what the 2ASi8o8xxxxxx_tdm8 build requires in terms of clock and data connections please?
alwalker
Experienced Member
Posts: 102
Joined: Sun Apr 08, 2018 11:19 pm

Post by alwalker »

Whilst Adobe Audition can see the XMOS USB interface and I can set it as the clock source, when I hit record the time counter greys out and recording does not start. After I stop Record the option to have the XMOS USB audio interface is reported as not working and the facility to have it as the clock source is no longer available. Recording is ok if I use another input source such as the internal microphone.


250613 Adobe Audition Before Record.png
250613 Adobe Audition After Record.png
You do not have the required permissions to view the files attached to this post.
User avatar
Ross
Verified
XCore Legend
Posts: 1185
Joined: Thu Dec 10, 2009 9:20 pm
Location: Bristol, UK

Post by Ross »

You're driving in TDM data from an external source?

Have you checked there's nothing contending on the ports you've chosen?

Have you has simple I2S with the on board codec working on this board before jumping to TDM?
Technical Director @ XMOS. Opinions expressed are my own
User avatar
Ross
Verified
XCore Legend
Posts: 1185
Joined: Thu Dec 10, 2009 9:20 pm
Location: Bristol, UK

Post by Ross »

Use

Code: Select all

	for tabs etc
Technical Director @ XMOS. Opinions expressed are my own
alwalker
Experienced Member
Posts: 102
Joined: Sun Apr 08, 2018 11:19 pm

Post by alwalker »

Hi Ross,

Thanks for the replies, very much appreciated!

No, I haven't tried an I2S implementation on the grounds that I2S and TDM are both time-division multiplexed formats with the same number of clocks etc, and as such I wouldn't expect TDM to be any harder or there to be any differences in the anticipated operation.

In this application, all the clocks (MCLK, BCLK, FSYNC) are provided externally. Another Explorer kit running third-party software controls the CS2100 for the MCLK source and then provides BCLK and FSYNC. The output of the CS2100 feeds a Texas LMK1C1104PW clock buffer IC which distributes MCLK individually to Tiles 0 and 1 on both Explorer Kits.

When I remove the series impedance resistors for the MCLK signals feeding Tile 0 and Tile 1 on the Explorer Kit providing the USB audio interface (with no other clocks provided), I find:

X0D13: High (3V3)
X1D35: Low (0V)

So there is likely a contention with X0D13. I note from this thread that there is a build option to make the codec the MCLK source (or basically make MCLK an input on the XMOS device):

https://www.xcore.com/viewtopic.php?t=8910

2SMi10o10xxxxxx_tdm8 -DCODEC_MASTER=1

Should I do similar with 2ASi8o8xxxxxx_tdm8 please, even though as it's a TDM slave implementation I wouldn't expect it to be a source for any of the clocks?

If so, it would be helpful if the directions of clock signals were documented for each build configuration, along with the required options to change MCLK source etc.

Kind regards,

Al
User avatar
Ross
Verified
XCore Legend
Posts: 1185
Joined: Thu Dec 10, 2009 9:20 pm
Location: Bristol, UK

Post by Ross »

CODEC_MASTER sets if the xcore or codec (or other external hw) is operating as I2S slave or master.

It's documented in the lib_xua documentation here: https://github.com/xmos/lib_xua/release ... v5.0.0.pdf

The clock direction (from xcore perspective) is documented in the build config naming (i.e. the setting of this define):

2S*M*i10o10xxxxxx_tdm8 -DCODEC_MASTER=1

the *M* denotes 'master', see "5.3 configuration naming" in https://github.com/xmos/sw_usb_audio/re ... v9.0.0.pdf

The assumption re TDM/I2S is bad. TDM will involve faster signals and is not a 'standard' like I2S - there are many 'flavours'. Starting from scratch, i2s is almost always easier to get working. The board you have also has an I2S CODEC and is a known working configuration. My normal engineering practice is start with something as close as you can to working then modify from there. You have a lot of variables at play at the moment!
Technical Director @ XMOS. Opinions expressed are my own
User avatar
Ross
Verified
XCore Legend
Posts: 1185
Joined: Thu Dec 10, 2009 9:20 pm
Location: Bristol, UK

Post by Ross »

just looking at the board hardware manual, x0d13 is connected to an i2c bus
Technical Director @ XMOS. Opinions expressed are my own