Digital volume control

Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.
mhelin said:
Usually a DSP is used for control in digital domain. For volume control maybe the DSPIC controller from Microchip would be nice as it could do the job and you could use the same chip for remote controller. In addition you'll need S/PDIF reciever and transmitter chips (see www.cirrus.com).

Deserialize, multiply, dither and serialize in a 30MHz PIC.Even trickier with greater than 16 bit data. And a bit of rc stuff thrown in. Hope you're not worried about latency.
 
rfbrw said:


Deserialize, multiply, dither and serialize in a 30MHz PIC.Even trickier with greater than 16 bit data. And a bit of rc stuff thrown in. Hope you're not worried about latency.
Can't be that hard - I've written DSP code on an ancient Motorola DSP that does far more stuff with an even lower instruction rate.

Here's what you need...

deserialize - handled by a dsPIC's codec interface.
multiply - 1 or 2 multiplies per instruction, depending on 16 or 32 bit data (assuming a 16 bit scale factor). Multiply by 2 for 2 channels.
dither - 2 multiplies, a couple of shifts and a few adds to update a LCG generator, generate a triangle PDF and sum it into the signal. You can use the same dither data for both channels.
serialize - again, handled by hardware.

With a 30MHz core clock, manipulating a 44KHz (or even 96KHz) audio stream still gives you plenty of spare clock cycles.
 
gmarsh said:

Can't be that hard - I've written DSP code on an ancient Motorola DSP that does far more stuff with an even lower instruction rate.

Here's what you need...

deserialize - handled by a dsPIC's codec interface.
multiply - 1 or 2 multiplies per instruction, depending on 16 or 32 bit data (assuming a 16 bit scale factor). Multiply by 2 for 2 channels.
dither - 2 multiplies, a couple of shifts and a few adds to update a LCG generator, generate a triangle PDF and sum it into the signal. You can use the same dither data for both channels.
serialize - again, handled by hardware.

With a 30MHz core clock, manipulating a 44KHz (or even 96KHz) audio stream still gives you plenty of spare clock cycles.

It isn't hard, just that if the dspics do that 1 instruction cycle = 4 clock cycles thing, it might prove a little slow.
 
digital volume pot

re. digital volume control

look at the dallas semi ds1802.
ihave a hand full but havent tried them yet
they can be used without a cpu just a couple of pushbuttons
so no clock noise to deal with.
look on their site they have a report of some testing done with audio precision gear that looks pretty respectable.
 
TI's SRC4193 would be the simplest solution. It is a stereo asynchronous sample rate converter, but has a built-in digital volume control (0dB to -127.5dB, 0.5dB steps). It needs a microcontroler for controling. I'm not sure, but I think that the input/output sampling ratio can be set to 1:1 (44.1kHz input, 44.1kHz output).
 
Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.