Getting Max Volume out of xCore-200 Audio Platform Topic is solved

Sub forums for various specialist XMOS applications. e.g. USB audio, motor control and robotics.
GRSteeves
New User
Posts: 3
Joined: Tue Dec 13, 2016 11:13 pm

Getting Max Volume out of xCore-200 Audio Platform

Postby GRSteeves » Mon Feb 12, 2018 7:27 pm

Hello,
I am using the xCore-200 Multichannel Audio Platform eval board and the reference design firmware to do USB 2.0 Audio to TDM8 conversion.
Overall the functionality is good, but I'm noticing that the input channel volume is too low for my application. I do not need dynamic volume control, I would prefer to just hard code a default level that is louder than it is now.
I have tried modifying the max_volume and min_volume values from their defaults in devicedefines.h, but when I do so the volume control sliders in Windows Sound Panel get stuck at one value and won't let me adjust, so i think Windows is not happy.
Couple of questions:
1.) The default value of MAX_VOLUME is 0x0000 (0db), per the source code comment. Is that also the maximum value, or can it go higher than 0dB? If so, what is the max value?
2.) Is there any other means to increase the volume of the input channels in the code?

For what it's worth, I currently have the mixer disabled. Not sure if enabling it will help in this situation.

Thanks!
-Greg
View Solution
User avatar
infiniteimprobability
XCore Legend
Posts: 1037
Joined: Thu May 27, 2010 10:08 am

Postby infiniteimprobability » Thu Feb 15, 2018 1:00 pm

1.) The default value of MAX_VOLUME is 0x0000 (0db), per the source code comment. Is that also the maximum value, or can it go higher than 0dB? If so, what is the max value?
2.) Is there any other means to increase the volume of the input channels in the code?


The design transports PCM from one interface to another. With gain = 0dB it will pass the sample unmodified (gain = 1).

There is a volume control which is presented as a feature unit using USB Audio Class. The gain block is really an attenuator:

Code: Select all

                    asm volatile("ldw %0, %1[%2]":"=r"(mult):"r"(p_multOut),"r"(i));
                    {h, l} = macs(mult, sample, 0, 0);
                    h <<= 3;


You could put a gain block in there but then you'd run the risk of clipping. Make sure it's a saturated gain block though as clipping is much nicer than overflow.. It should be possible to modify the descriptors and endpoint 0 handler to support positive gain.
GRSteeves
New User
Posts: 3
Joined: Tue Dec 13, 2016 11:13 pm

Postby GRSteeves » Thu Feb 22, 2018 2:08 pm

Thanks for confirming 0dB is gain = 1. We will investigate whether adding gain block makes sense in our application. Thank you.

Who is online

Users browsing this forum: No registered users and 7 guests