USB audio LRCK == sample rate?

Technical questions regarding the XTC tools and programming with XMOS.
misterten
Member++
Posts: 19
Joined: Mon Aug 08, 2011 10:06 am

USB audio LRCK == sample rate?

Post by misterten »

Hi,

I had the idea to measure if the XMOS chip is giving data out in the right sample rate. (I am doing the measurements on the USB Audio 2.0 hardware dev.)

So, what I was thinking of is that I could measure it by measuring the LRCK. Is this right? But, when playing files with higher than 44.1kHz the LRCK remains at 44.1kHz.

Is because of Windows? Or because of Winamp? Or the trial driver of TheSycon? Or LRCK != sample rate?

Oh, ehm, latest Winamp installed today (5.621, 32 bit on 64 bit Win7 OS).

thanks!
Last edited by misterten on Mon Sep 26, 2011 9:04 am, edited 1 time in total.


User avatar
Bianco
XCore Expert
Posts: 754
Joined: Thu Dec 10, 2009 6:56 pm

Post by Bianco »

Yes you can measure the sample rate by measuring the LRCLK.
If you play a file with a higher sample rate, this rate is likely converted to 44.1KHz.
misterten
Member++
Posts: 19
Joined: Mon Aug 08, 2011 10:06 am

Post by misterten »

Really?? ;)

Why should it be converted? Isn't it kind of absurd sampling a high res file down when I just want high res? :o

Where in the chain could it be converted? XMOS, OS or driver - Winamp should be able to play it? I'd like to fix it.
User avatar
Bianco
XCore Expert
Posts: 754
Joined: Thu Dec 10, 2009 6:56 pm

Post by Bianco »

The audio ref design supports up to 192KHz, so you might be right that it indeed should automatically change.
This requires reconfiguring the audio codec chip. I don't know if that happens on the fly or that the sample rate is hardcoded and you need to recompile. I don't own this kit and i haven't looked at the code at all so take my previous statement with a grane of salt.
misterten
Member++
Posts: 19
Joined: Mon Aug 08, 2011 10:06 am

Post by misterten »

I got it! It's Windows 7!! (When using Winamp?)

Under Control Panel, Sound, XMOS 'speakers' properties, advanced, standard format was set to 16 bit, 44.1kHz.

I set it to 24 bit, 192kHz. BUT: Everything's upsampled now. :?

I'll test foobar. But I guess I should need ASIO drivers which aren't present for the XMOS.

Anyway, I am able to get 192kHz out of the XMOS and it wasn't the chip's faut. :)

Greets
User avatar
Bianco
XCore Expert
Posts: 754
Joined: Thu Dec 10, 2009 6:56 pm

Post by Bianco »

great :-)
foobar is my favorite player :)
misterten
Member++
Posts: 19
Joined: Mon Aug 08, 2011 10:06 am

Post by misterten »

Hey, foobar is pretty cool. :)

But: Without regard to player software, Windows resamples everything to just one rate given in advanced sound properties. Poor. :roll:

Don't know if the full paid driver of theSycon would make a change but I'll use Linux anyway.
MaxFlashrom
Experienced Member
Posts: 82
Joined: Fri Nov 05, 2010 2:59 pm

Post by MaxFlashrom »

misterten wrote:Hey, foobar is pretty cool. :)

But: Without regard to player software, Windows resamples everything to just one rate given in advanced sound properties. Poor. :roll:

Don't know if the full paid driver of theSycon would make a change but I'll use Linux anyway.
Thesycon's evaluation driver includes an ASIO interface which can be used with Foobar and its ASIO plugin.
On Win7 you should be able to play direct to the XMOS board through WASAPI, without using ASIO. Win7 applications can acquire exclusive access to the underlying hardware, usinging WASAPI Exclusive Mode, cutting out any OS up/down sampling

See this Foobar plugin, for instance.
http://www.foobar2000.org/components/vi ... out_wasapi

Any media player that supports WASAPI exclusive mode should work fine.
Max.