384KHz Audio Enablement in XMOS MCA Reference Design Topic is solved

Sub forums for various specialist XMOS applications. e.g. USB audio, motor control and robotics.
amninder
Member++
Posts: 30
Joined: Mon Dec 15, 2014 9:03 pm

384KHz Audio Enablement in XMOS MCA Reference Design

Post by amninder »

I am using XMOS MCA kit and want to enable 384kHz audio which is not enabled by default.
What steps do I need to do on the firmware side to enable it?
Is there any special drivers I need on the host side(Windows PC) to use the 384Khz Audio feature?
I already installed the Thesycon UAC2.0 Drivers.


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

Post by infiniteimprobability »

Try setting MAX FREQ in customdefines.h. See docs below..


https://www.xmos.com/support/boards?com ... 442&page=3
amninder
Member++
Posts: 30
Joined: Mon Dec 15, 2014 9:03 pm

Post by amninder »

I could not find this setting "MAX FREQ" in customdefines.h (see attached) for the multi channel audio kit reference firmware at $firmware\sw_usb_audio\app_usb_aud_skc_u16_audio8\src\core.

However, I find this setting in the devicedefines.h file at $firmware\sc_usb_audio\module_usb_audio. Shall I change it in the devicedefines.h file and expect it to work?

Also, in the devicedefines.h file, I see the following parameters for sampling rate restrictions:
Do, I need to change any of them for 384Khz support?

/* Apply sample-rate restrictions to full-speed operation */
#if (NUM_USB_CHAN_OUT_FS > 0) && (NUM_USB_CHAN_IN_FS > 0)
#if(MAX_FREQ > 48000)
#define MAX_FREQ_FS 48000
#else
#define MAX_FREQ_FS MAX_FREQ
#endif
#else
#if (MAX_FREQ > 96000)
#define MAX_FREQ_FS 96000
#else
#define MAX_FREQ_FS MAX_FREQ
#endif
#endif
Attachments
devicedefines.h
MAX FREQ setting available
(32.21 KiB) Downloaded 305 times
devicedefines.h
MAX FREQ setting available
(32.21 KiB) Downloaded 305 times
customdefines.h
No setting for MAX FREQ in customdefines.h of the reference firmware for Multi-Channel Audio kit.
(2.13 KiB) Downloaded 336 times
customdefines.h
No setting for MAX FREQ in customdefines.h of the reference firmware for Multi-Channel Audio kit.
(2.13 KiB) Downloaded 336 times
User avatar
Ross
XCore Expert
Posts: 962
Joined: Thu Dec 10, 2009 9:20 pm
Location: Bristol, UK

Post by Ross »

just add

#define MAX_FREQ 384000

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

Post by infiniteimprobability »

The multi-channel audio ref design hardware doesn't support 384KHz however, so beware!
amninder
Member++
Posts: 30
Joined: Mon Dec 15, 2014 9:03 pm

Post by amninder »

@ infiniteimprobability,

Actually, I made the changes in the customdefines.h file in the firmware and gave it a shot. On, windows PC, I could no see the 384K Rate listed in the Sound Properties for XMOS device even I have the UAC2.0 installed. However, On a MAC PC . it lists the 384K , 24B rate as in attached file but I didn't get a change to play and measure the output to see if LRCK is actually = 384K.
On a Windows PC, I then tried to test it indirectly using foobar by playing DSD128 (DoP) as it is based on 352K PCM. So, in the foobar when I set it for DSD128 playback , I could measure the output of XMOS at 352K but the USB ports on my PC hangs after a second of playing and I have to reboot it.This measurement of 352K makes me think that the XMOS HW can support it and there needs to be fixed something on the firmware or the host PC side.
Anyways, I am going to try playback and measuring LRCK for 384K with MAC.
Attachments
foobarErrorOnUsbHang.png
Error shown on foobar when PC hangs while trying to play DSD128 over PCM
(115.77 KiB) Not downloaded yet
foobarErrorOnUsbHang.png
Error shown on foobar when PC hangs while trying to play DSD128 over PCM
(115.77 KiB) Not downloaded yet
384K_on_MAC.png
384K Rate listed in MAC PC
(57.33 KiB) Not downloaded yet
384K_on_MAC.png
384K Rate listed in MAC PC
(57.33 KiB) Not downloaded yet
User avatar
Ross
XCore Expert
Posts: 962
Joined: Thu Dec 10, 2009 9:20 pm
Location: Bristol, UK

Post by Ross »

384 is only supported in windows via ASIO.
amninder
Member++
Posts: 30
Joined: Mon Dec 15, 2014 9:03 pm

Post by amninder »

Is there a link or documents that explains how to test 384K on Windows using ASIO ?
I have used foobar earlier to verify the DoP on Windows PC but not sure what is the procedure/settings to play PCM audio at 384K using foobar or whether it supports this feature or not.
User avatar
Ross
XCore Expert
Posts: 962
Joined: Thu Dec 10, 2009 9:20 pm
Location: Bristol, UK

Post by Ross »

XMOS doesn't provide any guides for any players. You can find some instructions here: http://www.asus.com/microsite/essence/u ... -ASIO.html
amninder
Member++
Posts: 30
Joined: Mon Dec 15, 2014 9:03 pm

Post by amninder »

With the above mentioned change in custom defines, I tried to test the 384K audio playback on a mac PC as it natively supports sampling rates upto 384K.

What I found is that 384K @ 16bit resolution just works fine when I listened the output from my device and it also looks fine from audio analyzer output (attached file 384_16b_Tone) .

However, when I changed the bit depth on mac to 24Bit, I heard cracking sound from my device and on looking at the audio analyzer output the tone looks out of shape with some digital pulses over-riding.(attached file 384_24b_tone). You have any reasoning for that?

Is there any specific setting required in firmware for 384K @ 24 bit ? Could it be the buffer size in the XMOS , that holds audio data from USB to convert it to I2S, that might be the issue ?
Attachments
384_24b_Tone.PNG
Audio Analyzer output for 384K , 24Bit. Looks distorted
(39.5 KiB) Not downloaded yet
384_24b_Tone.PNG
Audio Analyzer output for 384K , 24Bit. Looks distorted
(39.5 KiB) Not downloaded yet
384_16b_Tone.PNG
Audio Analyzer output for 384K, 16 bit.Looks as expected
(33.83 KiB) Not downloaded yet
384_16b_Tone.PNG
Audio Analyzer output for 384K, 16 bit.Looks as expected
(33.83 KiB) Not downloaded yet
Post Reply