USB Audio 2.0 Reference Design 32bit/192kHz support?

Sub forums for various specialist XMOS applications. e.g. USB audio, motor control and robotics.
User avatar
Ross
XCore Expert
Posts: 962
Joined: Thu Dec 10, 2009 9:20 pm
Location: Bristol, UK

Post by Ross »

Take a look at the following lines in the descriptors:

Code: Select all

    0x04,         					/* 4  bSubslotSize (Number of bytes per subslot) */
    24,         					/* 5  bBitResolution (Number of bits used per subslot) */ 
You will be wanting to keep bSubSlotSize at 4 bytes but change bBitResolution to 32


dizengoff
Junior Member
Posts: 5
Joined: Thu Aug 02, 2012 11:08 pm

Post by dizengoff »

Does switching the code to support 32 bit data alter the amount of I/O the system can process?
lubaka121
Newbie
Posts: 1
Joined: Tue Jan 08, 2013 2:41 pm

Post by lubaka121 »

Ross wrote:Take a look at the following lines in the descriptors:

Code: Select all

    0x04,         					/* 4  bSubslotSize (Number of bytes per subslot) */
    24,         					/* 5  bBitResolution (Number of bits used per subslot) */ 
You will be wanting to keep bSubSlotSize at 4 bytes but change bBitResolution to 32
Hi,

I've changed bBitResolution to 32, but when using I2S there are 29 bits instead of 32. The three least significant bits stood in low state, no matter what I want to transmit. Can anyone kindly give me some clue, where is the problem?

Thanks,

Luben
User avatar
Ross
XCore Expert
Posts: 962
Joined: Thu Dec 10, 2009 9:20 pm
Location: Bristol, UK

Post by Ross »

dizengoff wrote:Does switching the code to support 32 bit data alter the amount of I/O the system can process?
No, all samples go through the system as 32bits anyway (its a 32bit machine so its efficient to do it like this, rather than unpacking 24bit samples all over the place)
User avatar
Ross
XCore Expert
Posts: 962
Joined: Thu Dec 10, 2009 9:20 pm
Location: Bristol, UK

Post by Ross »

lubaka121 wrote:
Hi,

I've changed bBitResolution to 32, but when using I2S there are 29 bits instead of 32. The three least significant bits stood in low state, no matter what I want to transmit. Can anyone kindly give me some clue, where is the problem?

Thanks,

Luben
Hi, the issue is probably the volume control - when I wrote it I assumed 24bits max so ignored the bottom result of the macc operation.

Anyway, you can fix it in decouple.xc by removing the volume control or adding the commented line below.
{h, l} = macs(mult, sample, 0, 0);
sample = h << 3;
sample |= (l >> 29) & 0x7; // Note, this step is not required if we assume sample depth is 24 (rather than 32)
I've added this change in for the next release.
CanyChen
New User
Posts: 2
Joined: Wed Apr 03, 2013 4:57 am

Post by CanyChen »

Ross wrote:
lubaka121 wrote:
Hi,

I've changed bBitResolution to 32, but when using I2S there are 29 bits instead of 32. The three least significant bits stood in low state, no matter what I want to transmit. Can anyone kindly give me some clue, where is the problem?

Thanks,

Luben
Hi, the issue is probably the volume control - when I wrote it I assumed 24bits max so ignored the bottom result of the macc operation.

Anyway, you can fix it in decouple.xc by removing the volume control or adding the commented line below.
{h, l} = macs(mult, sample, 0, 0);
sample = h << 3;
sample |= (l >> 29) & 0x7; // Note, this step is not required if we assume sample depth is 24 (rather than 32)
I've added this change in for the next release.
I add this change,but when I play 384khz32bit audio file,I drag the volume progress bar of xmos usb DAC volume control on PC. Then, the output analog audio mixed with noise.(I use ES9018 DAC)
And other Sampling Rate,there is no such phenomenon。
User avatar
Ross
XCore Expert
Posts: 962
Joined: Thu Dec 10, 2009 9:20 pm
Location: Bristol, UK

Post by Ross »

CanyChen wrote:
I add this change,but when I play 384khz32bit audio file,I drag the volume progress bar of xmos usb DAC volume control on PC. Then, the output analog audio mixed with noise.(I use ES9018 DAC)
And other Sampling Rate,there is no such phenomenon。
Does the same test work for 24bit audio (i.e volume control on a 384kHz stream)?
CanyChen
New User
Posts: 2
Joined: Wed Apr 03, 2013 4:57 am

Post by CanyChen »

Ross wrote:
CanyChen wrote:
I add this change,but when I play 384khz32bit audio file,I drag the volume progress bar of xmos usb DAC volume control on PC. Then, the output analog audio mixed with noise.(I use ES9018 DAC)
And other Sampling Rate,there is no such phenomenon。
Does the same test work for 24bit audio (i.e volume control on a 384kHz stream)?
Yes, there is such phenomenon only on 384khz audio file.
morpheous87
Newbie
Posts: 1
Joined: Sat Jan 04, 2014 11:01 pm

Post by morpheous87 »

Is there some topic with clues how to program right justified ouput on startKit?
Post Reply