USB Audio Default Frequency

Sub forums for various specialist XMOS applications. e.g. USB audio, motor control and robotics.
Post Reply
User avatar
jjlm98
Member++
Posts: 31
Joined: Tue Aug 26, 2014 11:00 pm

USB Audio Default Frequency

Post by jjlm98 »

Hi there - is there a way to reliably control the default frequency that is used by the OS when a reference design is plugged in over USB? Is this done through the DEFAULT_FREQ define in the firmware?

On Windows 7 systems, I typically see the board default to MIN_FREQ (as seen through the Sound -> Properties -> Advanced menu); on Mac, I typically see the board default to MAX_FREQ (as seen through the Audio Devices menu). In neither case do I see the board default to DEFAULT_FREQ, but I might be misinterpreting the parameter's purpose.


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

Post by infiniteimprobability »

I'm pretty sure this is not controllable by the device. The host reads the capabilities of the device (either through descriptor or via get range on UAC2) and then makes a choice what to set the device to. The device is not allowed to specify the sample rate.

The define is there for init so that the hardware can come up in a know state before initial configuration by the host.

So the behaviour you are seeing is a result of the host OS driver choosing a sample rate from the list provided by the device.
User avatar
jjlm98
Member++
Posts: 31
Joined: Tue Aug 26, 2014 11:00 pm

Post by jjlm98 »

Thank you for the follow-up; that certainly makes sense.
TARS
Junior Member
Posts: 5
Joined: Fri Mar 20, 2015 4:06 pm

Post by TARS »

Does the same apply for number of inputs & outputs? Is this set by

/* Number of IS2 chans to DAC..*/
#ifndef I2S_CHANS_DAC
#define I2S_CHANS_DAC (4)
#endif

/* Number of I2S chans from ADC */
#ifndef I2S_CHANS_ADC
#define I2S_CHANS_ADC (4)
#endif

Or is this set up by the windows driver?
User avatar
Ross
XCore Expert
Posts: 962
Joined: Thu Dec 10, 2009 9:20 pm
Location: Bristol, UK

Post by Ross »

This is set by the device.

Please keep threads on topic - this question is deserving of a new thread.
Post Reply