izmit escort escort ankara adana escort

 FAQ •  Search •  Register •  Login 

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Digital Control over Audio Stream Volume
PostPosted: Wed Mar 08, 2017 11:03 pm 
Offline

Joined: Mon Apr 13, 2015 9:10 pm
Posts: 12
Hi everyone! Hopefully this doesn't fall on empty ears, but here goes!

I'm using the SAM3U for USB audio and I'm planning to use a codec without a control interface. If I wanted to have "internal" controls for automating output gain, how would I do this? Lets say the output from a computer/master is always going to outputting it's max signal (-1 to 1). How would I lower the volume/gain of the USB stream before it hits the DAC? I know in the software world this is pretty easy; you divide the signal by a number to lower the gain.

Now the question is... how do I do this in the microcontroller world? I'm packing my 24 bit USB stream into a 32 bit variable to transfer to the codec right now. Would I be doing the same thing as I do in software; do I just divide this 32 bit variable by my gain variable to lower it?

Thanks!


Top
 Profile  
Reply with quote  
 Post subject: Re: Digital Control over Audio Stream Volume
PostPosted: Thu Mar 09, 2017 3:24 am 
Offline

Joined: Thu Apr 19, 2007 10:15 pm
Posts: 1432
Location: USA
yun wrote:
How would I lower the volume/gain of the USB stream before it hits the DAC?
Are you aware that straightforward division is a really bad idea, e.g. you're going to lose resolution and increase quantization (noise)?

http://www.esstech.com/files/3014/4095/4308/digital-vs-analog-volume-control.pdf

Regards


Top
 Profile  
Reply with quote  
 Post subject: Re: Digital Control over Audio Stream Volume
PostPosted: Thu Mar 09, 2017 5:37 pm 
Offline

Joined: Mon Apr 13, 2015 9:10 pm
Posts: 12
blue_z wrote:
Are you aware that straightforward division is a really bad idea, e.g. you're going to lose resolution and increase quantization (noise)?

http://www.esstech.com/files/3014/4095/4308/digital-vs-analog-volume-control.pdf

Regards


Hi blue_z,

Thanks for the link/advice. I would use a codec with a control interface but unfortunately I will be using the 2 TWI for a different function and thus cannot use a codec with a control interface/finding a way to do digital control.

The link was very helpful. Fortunately, I'm using a 32 bit DAC and hopefully I can work around this issue.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: