DSD help on xCore-200 Multichannel Audio Platform dev kit Topic is solved

Technical discussions around xCORE processors (e.g. General Purpose (L/G), xCORE-USB, xCORE-Analog, xCORE-XA).
User avatar
mattb
Member
Posts: 13
Joined: Wed Aug 28, 2019 11:45 pm

DSD help on xCore-200 Multichannel Audio Platform dev kit

Postby mattb » Thu Oct 31, 2019 6:15 am

Hello,

We're developing a USB audio solution based on the XE216 and are having issues with the reference firmware (v 6.15.2) properly decoding DSD. So I went back to the xCore-200 Multichannel Audio Platform dev kit, and tried it on there and it has the same issues. I thought I would post here to see if anyone had thoughts.

I made a custom build config in the makefile as follows:

Code: Select all

# Audio Class 2, No Input, 2 Output, No MIDI, No SPDIF, DSD
XCC_FLAGS_2i0o2xxxxxd = $(BUILD_FLAGS) -DNUM_USB_CHAN_IN=0 -DI2S_CHANS_ADC=0 -DNUM_USB_CHAN_OUT=2 -DI2S_CHANS_DAC=2 -DSPDIF_TX=0 -DDSD_CHANS_DAC=2
INCLUDE_ONLY_IN_2i0o2xxxxxd =
I then ran DSD through our regular playback setup that we've done forever with the older XS1-U6A series (a DSD64 file, with foobar setup properly (ASIO component, SACD component, ASIOProxy, etc)). And the DSD lines that we observe on the pins of the DAC are not proper. The BCLK is proper (2.8MHz), but the two data lines have lots of gaps in them, and are not in sync with every BCLK pulse. This is not what we observe on the old XS1-U6A series, where the DATAL and DATAR have info for every BCLK.

Attached is a pic of the scope of the BCLK (top) and one of the data lines (bottom) going into the DAC on the dev kit.
waveforms.jpg
As you can see, the data line has huge gaps in it, when it should be constantly going like with the BCLK.

Anyone have any ideas where to look? Has DSD worked on the XMOS dev kit out of the box for anyone out there?

Thanks for any info!
You do not have the required permissions to view the files attached to this post.
View Solution
User avatar
mattb
Member
Posts: 13
Joined: Wed Aug 28, 2019 11:45 pm

Postby mattb » Thu Oct 31, 2019 6:28 am

I forgot to mention that I am not getting any actual audio out of the dev kit jacks when playing a DSD file, just a hissing sound, so it's not just a theoretical issue. I think the DAC is seriously unhappy with those waveforms.

- Matt
User avatar
mon2
XCore Legend
Posts: 1758
Joined: Thu Jun 10, 2010 11:43 am

Postby mon2 » Thu Oct 31, 2019 9:48 am

Hi. Review the details of the external hardware that worked on your older design and compare the same details on the non working hardware and applied firmware. Are you using 100% the same external adc and dacs as the XMOS official kit design? You must mask out the code run that may be looking for non existent hardware. In past reviews for oems, we found that the XMOS IP will retry 2000 times on i2c bus for hardware before timing out in the code blocking routines. This caused the USB communication to break and other faults. This may be your issue as well which will explain the delays in the data packets.

As a start, run xmos appnote AN00129 for the hid mouse that operates in USB high speed in a square pattern on the screen. Confirm this IP is stable on XMOS official kit first. Then test on your custom board - stable if ran for hours?

Summary is that the IP may be searching for phantom hardware over i2c bus as the i2c bus master and wasting time with (blocking) retries in the process which will break time sensitive IP.

AN00129_-USB-HID-Class_2.0.2rc1.pdf
You do not have the required permissions to view the files attached to this post.
User avatar
mattb
Member
Posts: 13
Joined: Wed Aug 28, 2019 11:45 pm

Postby mattb » Thu Oct 31, 2019 4:06 pm

@mon2:

Was your response meant for this post? I'm not doing anything with the USB HID, I'm doing the USB audio stuff and DSD specifically (PCM is fine).

Also, my tests were running solely on the XMOS official dev kit using the XMOS official reference firmware (just adding a custom build config which I mentioned above).
mon2 wrote:
Thu Oct 31, 2019 9:48 am
Hi. Review the details of the external hardware that worked on your older design and compare the same details on the non working hardware and applied firmware. Are you using 100% the same external adc and dacs as the XMOS official kit design? You must mask out the code run that may be looking for non existent hardware. In past reviews for oems, we found that the XMOS IP will retry 2000 times on i2c bus for hardware before timing out in the code blocking routines. This caused the USB communication to break and other faults. This may be your issue as well which will explain the delays in the data packets.

As a start, run xmos appnote AN00129 for the hid mouse that operates in USB high speed in a square pattern on the screen. Confirm this IP is stable on XMOS official kit first. Then test on your custom board - stable if ran for hours?

Summary is that the IP may be searching for phantom hardware over i2c bus as the i2c bus master and wasting time with (blocking) retries in the process which will break time sensitive IP.


AN00129_-USB-HID-Class_2.0.2rc1.pdf
User avatar
mattb
Member
Posts: 13
Joined: Wed Aug 28, 2019 11:45 pm

Postby mattb » Fri Nov 01, 2019 4:40 am

Just a bit more bit of info....I was able to try this on both foobar and JRiver setup for DSD. Interesting, I put some debug statements in the audio.xc file (the deliver() function), and when playing from foobar, the XMOS considers it DoP, but from JRiver it considers it Native.

Regardless, either player, I get the same behavior where both data lines are not synched with the BCLK. I did a few more detailed measurements, and I end up with 32 bits of data, followed by 256 bits (8 x 32) of blank. It repeats this 1 frame on, 8 frames off all the time. And for that one 32-bit frame that is correct, everything looks good...the data transitions on the falling edge of the BCLK like it's supposed to, so it seems like it's being decoded correctly. And a reminder, this is happening on the XMOS dev kit with the XMOS reference firmware.

And one final test, I went back to our old projects that run on the older XS1-U6A series, and they play DSD no problem though the same foobar and JRiver setups...the data is constantly flowing, there is no 8 frame gaps.

Thanks for any help!
User avatar
mon2
XCore Legend
Posts: 1758
Joined: Thu Jun 10, 2010 11:43 am

Postby mon2 » Fri Nov 01, 2019 10:57 am

Hi. Please review this thread:

viewtopic.php?f=8&t=6767
User avatar
mattb
Member
Posts: 13
Joined: Wed Aug 28, 2019 11:45 pm

Postby mattb » Fri Nov 01, 2019 5:00 pm

Thank you mon2, that fixed it. I wish the forum would allow to search for 3 character strings (i.e. "DSD"), I probably would have found that post and saved us all a lot of time :)

But I really appreciate the help!

Who is online

Users browsing this forum: No registered users and 4 guests