Author Topic: Digitally controlled analog (audio) mixer  (Read 1411 times)

0 Members and 1 Guest are viewing this topic.

Offline SaimounTopic starter

  • Frequent Contributor
  • **
  • Posts: 570
  • Country: dk
Digitally controlled analog (audio) mixer
« on: October 01, 2024, 04:16:20 pm »
Hey everybody :)

Imagine a traditional analog audio mixer, but without EQ, compressor and all the other stuff, just inputs, their volume control, and outputs that can be any combination of the inputs.
Would it be possible to create such a circuit, dealing with analog signals but digitally controlled?

I found this chip called AD75019, which is a 16 x 16 matrix mixer containing 256 analog switches. Looks great on paper, but there is no way to have access to the inside nodes. See this circuit:


(circuit here: https://tinyurl.com/2cefdkkm )

It works fine when mixing multiple inputs into one output (many to one), but when duplicating one input into multiple outputs (one to many) it divides the voltage. If I move the 100k resistors on the right side of the matrix, i.e. next to the output opamps, then the "one to many" works, but "many to one" does not (shorting the opamps' output to each other).
The only solution I could find would be to add resistors inside the matrix, so that each input opamp has 16 resistors in parallel. This is possible if using 16 chips with only 16 analog switches each, but that's a lot of ICs, hard to find, and would be very expensive.

Any ideas?

Thanks!
 

Offline PGPG

  • Frequent Contributor
  • **
  • Posts: 275
  • Country: pl
Re: Digitally controlled analog (audio) mixer
« Reply #1 on: October 01, 2024, 04:43:45 pm »
You need 6 100k resistors (3 at each input of output amplifier) and switches before these resistors.
First what come to my mind as digitally controlled switch is CD4066.
« Last Edit: October 01, 2024, 04:45:56 pm by PGPG »
 
The following users thanked this post: Saimoun

Online BrianHG

  • Super Contributor
  • ***
  • Posts: 8121
  • Country: ca
Re: Digitally controlled analog (audio) mixer
« Reply #2 on: October 01, 2024, 04:47:37 pm »
Whats wrong with an I2C digitally controlled potentiometer?

Google: digitally I2C controlled potentiometers

Or, us a voltage output dac to drive a 4 quadrant multiplying mixer.  Though, this guy is usually expensive.

Or, an opamp with voltage controlled gain.

« Last Edit: October 01, 2024, 04:49:43 pm by BrianHG »
 
The following users thanked this post: Saimoun, pcprogrammer

Offline rteodor

  • Regular Contributor
  • *
  • Posts: 174
  • Country: ro
Re: Digitally controlled analog (audio) mixer
« Reply #3 on: October 01, 2024, 05:03:56 pm »
Just throwing my 2c: maybe use non-inverting topo as the output buffers ?

And out of curiosity, how many inputs, outputs and "mixing lanes" are we talking about ?
 
The following users thanked this post: magic, Saimoun

Offline pcprogrammer

  • Super Contributor
  • ***
  • Posts: 4388
  • Country: nl
Re: Digitally controlled analog (audio) mixer
« Reply #4 on: October 01, 2024, 05:37:26 pm »
Any multiplying DAC could be used to control the volume, just like a digital potentiometer, but that does not take care of the combining of the inputs to the outputs.

A 4051 analog multiplexer/demultiplexer could be used for this. Allows for 8 channels to be mixed to 1 channel. With proper resistors for the mixing of the inputs and a high impedance input at the output stage should work even when routing one input to multiple outputs.

The AD75019 seems to provide the same but for 16 inputs to 16 outputs (Yes I know it is bidirectional, but for the purpose of the mixer from in to out is all that is needed) it allows for a smaller PCB.

Make sure to use coupling capacitors in the audio paths to avoid DC shift of the signals.

Edit: The problem with your setup is that the output buffers see the 100k mixing resistors as input resistor and when more then one output is connected you get parallel networks that modify the output stage gain. So using non inverting buffers (opamp voltage follower) would solve that problem.
« Last Edit: October 01, 2024, 05:46:14 pm by pcprogrammer »
 
The following users thanked this post: Saimoun

Offline SaimounTopic starter

  • Frequent Contributor
  • **
  • Posts: 570
  • Country: dk
Re: Digitally controlled analog (audio) mixer
« Reply #5 on: October 01, 2024, 08:28:33 pm »
Thanks for all the replies.

You need 6 100k resistors (3 at each input of output amplifier) and switches before these resistors.
Sorry I don't get it, three 100k resistors in series? To make 300k? But that will change the gain on the output opamps, and using the same input for multitple output will still have the same issue, wouldn't it?

Google: digitally I2C controlled potentiometers
That's a great idea - you meant to control the volumes at the inputs and outputs, right? Do you have any recommendations? And what about the mixing and multiplexing of the input signals?

And out of curiosity, how many inputs, outputs and "mixing lanes" are we talking about ?
Well I was thinking 16x16 (16 inputs and 16 outputs) since that's the size of the AD75019.

And good points about the suggestions - 4051 would work but for a 16x16 I would need 2 for each output, so 32 chips total. That might be both pricey but also take a lot of space :D


As for using non-inverting topo as the output buffers, that's a great idea but because of the high impedance input of the output opamps the voltage gets divided when mixing to inputs (so we're in the opposite situation: now one-to-many works, but many-to-one does not). See this circuit:


( -> circuit here: https://tinyurl.com/28m3cgvo )
« Last Edit: October 01, 2024, 08:44:51 pm by Saimoun »
 

Online BrianHG

  • Super Contributor
  • ***
  • Posts: 8121
  • Country: ca
Re: Digitally controlled analog (audio) mixer
« Reply #6 on: October 01, 2024, 09:04:23 pm »
MCP4351

All pot outputs buffered through opamps are mixed together, then an optional final volume and buffer opamp.

TLO74 should be fine for audio.

Your volume settings controls the mixing levels.
« Last Edit: October 01, 2024, 09:23:21 pm by BrianHG »
 

Online BrianHG

  • Super Contributor
  • ***
  • Posts: 8121
  • Country: ca
Re: Digitally controlled analog (audio) mixer
« Reply #7 on: October 01, 2024, 10:14:48 pm »
If you want greater than 0-5v support, like +/-18v support, try this part:
https://www.microchip.com/en-us/product/MCP41HV51
 
 

Online The Soulman

  • Super Contributor
  • ***
  • Posts: 1037
  • Country: nl
  • The sky is the limit!
Re: Digitally controlled analog (audio) mixer
« Reply #8 on: October 01, 2024, 10:34:09 pm »
 

Online BrianHG

  • Super Contributor
  • ***
  • Posts: 8121
  • Country: ca
Re: Digitally controlled analog (audio) mixer
« Reply #9 on: October 01, 2024, 11:57:02 pm »
 

Offline rteodor

  • Regular Contributor
  • *
  • Posts: 174
  • Country: ro
Re: Digitally controlled analog (audio) mixer
« Reply #10 on: October 02, 2024, 05:53:43 am »
Well I was thinking 16x16 (16 inputs and 16 outputs) since that's the size of the AD75019.

[...] (so we're in the opposite situation: now one-to-many works, but many-to-one does not). [...]

How so ? 10k and 1M is about 1% loss of amplitude. But there is another problem with current schematic: there will be a loss of amplitude with each additional input connected to the same mixing channel/lane. Without taking into account opamps output impedance, all 16 inputs mixing into one lane mean there would be 15 * (10k ||). That's 10k with 666 ohms. This is drops the amplitude in 16 steps down to about 4%. To say that this would be a bad mixer is an understatement.

I think it would be simpler to use "inverting summing amplifier" a.k.a "virtual earth mixer". Hopefully this image link and article could clarify it:

Source: Summing Amplifier or Op Amp Adder Circuit: https://circuitdigest.com/tutorial/inverting-operational-amplifier-op-amp


« Last Edit: October 02, 2024, 05:55:43 am by rteodor »
 

Offline pcprogrammer

  • Super Contributor
  • ***
  • Posts: 4388
  • Country: nl
Re: Digitally controlled analog (audio) mixer
« Reply #11 on: October 02, 2024, 06:03:43 am »
And good points about the suggestions - 4051 would work but for a 16x16 I would need 2 for each output, so 32 chips total. That might be both pricey but also take a lot of space :D

The AD75019 ain't cheap either, so it is more about board space, and most likely less noise with the single chip solution due to shorter and less tracks on the input side.

As for using non-inverting topo as the output buffers, that's a great idea but because of the high impedance input of the output opamps the voltage gets divided when mixing to inputs (so we're in the opposite situation: now one-to-many works, but many-to-one does not). See this circuit:

Move the mixing resistors to the other side of the switches. Yes this multiplies the number of resistors but solves the problem to some extend. This way the mixer is driven by low impedance outputs, instead of higher impedance outputs driving multiple high impedance inputs. With small SMD resistors it only takes a little bit more space on the PCB.

And don't forget coupling capacitors to remove any DC offset from the signals, otherwise it might fail in real life.

Offline PGPG

  • Frequent Contributor
  • **
  • Posts: 275
  • Country: pl
Re: Digitally controlled analog (audio) mixer
« Reply #12 on: October 02, 2024, 07:34:38 am »
Sorry I don't get it, three 100k resistors in series?

No.

"3 at each input of output amplifier".
How to say it more clearly?
Each of 2 output amps has its (-) input. You connect 3 100k resistors to this (-) input. Each resistor has one end connected to this point. The other (not connected with (-) input) ends of these 3 resistors are 3 inputs to the output amplifier.

"and switches before these resistors."
You locate analog switches before these resistors that means between pre-amplifier outputs and these resistors.
 

Offline SaimounTopic starter

  • Frequent Contributor
  • **
  • Posts: 570
  • Country: dk
Re: Digitally controlled analog (audio) mixer
« Reply #13 on: October 02, 2024, 08:50:49 am »
Hi all, thanks for the replies again. I'll try to reply to everybody here, please feel free to let me know if I missed one of your comments.


How so ? 10k and 1M is about 1% loss of amplitude.
Look at the picture in my last post - on the top right the output is 3V instead of 6V (5+1). It's not because of the 10k/1M, it's because the input opamps feed into each other. If I increase the 10k to 100k they feed less, but then there is less current going into the opamps on the right, so we're still at 3V.

I think it would be simpler to use "inverting summing amplifier" a.k.a "virtual earth mixer".
Thanks for the suggestion, but if you look at my first post, this is what I had in the first place, then people here suggested a non-inverting configuration. And yes moving to inverting solves the many-to-one problem, but then the one-to-many does not work.



Move the mixing resistors to the other side of the switches. Yes this multiplies the number of resistors but solves the problem to some extend.
As explained in my first post, that does not work because in this case the output of the opamps on the left get shorted. It would work if we could place one resistor on each "node" but that means the resistors have to be "inside" the 16x16 matrix, which is not possible with the AD75019. It would be possible with the 32 CD4051 chips.



Each of 2 output amps has its (-) input. You connect 3 100k resistors to this (-) input. Each resistor has one end connected to this point. The other (not connected with (-) input) ends of these 3 resistors are 3 inputs to the output amplifier.
Ok, so in parallel then? so 3 resistors connected in parallel to (-) of each of the two output opamps, that makes 6 resistors total, so far I'm following.
Then the other end is "3 inputs to the output amplifier" - I think I understand, you mean these are connected to the output of each the 3 input opamps (the opamps on the left), correct? Yes that would work but would require placing resistors on each node, i.e. "inside" the matrix as I've just explained above - which is not possible with AD75019.



All pot outputs buffered through opamps are mixed together, then an optional final volume and buffer opamp.
That's an interesting idea, then we could ditch the matrix altogether, just using the pots to control which inputs goes where. But that would mean one 16 volume control for each output, so 256 in total. So 256 opamps and also 256 digitally controlled pots, which would take a huge amount of space on the PCB.

And thanks for the AD5124 suggestion (4x I2C controlled pots). About $4 / unit though (so $1 / pot), so just to have volume control on inputs and outputs, that would already be 32 pots, i.e. $32. For the option above, that would be $256.




So, clarifying the current situation: (not judging in any way, and I appreciate all your help very much, I'm just making sure we know where we are  ;D )
  • We do not have any solution using the AD75019 (16x16 switches), we've tried:
    • moving the resistors on one side of the matrix
    • on the other side
    • using inverting and non-inverting topo
    • In all those cases, either the one-to-many or the many-to-one configuration does not work
    • If someone has a working solution with this chip I'm all ears 8)
  • Using 32x CD4051 chips would work, but that's a lot of board space (+ could have noise issues as pcprogrammer noted)
  • Using no switches and only digitally controlled pots (or VCAs?) would also work, but that would require 256 pots - large space and expensive
 

Online BrianHG

  • Super Contributor
  • ***
  • Posts: 8121
  • Country: ca
Re: Digitally controlled analog (audio) mixer
« Reply #14 on: October 02, 2024, 02:33:14 pm »
If your goal was a cross matrix 16 ins to any 16 outs, your cheapest solution would be all digital.

You can get 24bit per channel, 192khz sampling, 8 channel adc/dac audio codecs for around 5$ and you would only need 2 for 16 ins and 16 outs.  For a better studio quality SNR, you would go for 8x 2 channel units.

For absolute minimum delay, we are talking a few microseconds, use a cheap FPGA like an Altera MAX10 or bottom end Xilinx or Lattice ECP5 series.

The volume mixer code should only be around 2 pages of verilog, (another page for the I2S audio data bus and another for the PLL setup), but you will get you 256 x 16bit volume controls with 24bit audio data, 32 bit summed mixed audio out stream with software controlled clipping/limiting to feed each 24bit dac.  You will also have the ability of inverting channel volume, even bass and treble controls if you want to.  Full EQ if you can tolerate a few additional microseconds depending on the finite quality you are looking for, however, anything you do here will exceed you analog solution in sound quality and noise by a huge mile.
« Last Edit: October 02, 2024, 03:00:15 pm by BrianHG »
 

Offline PGPG

  • Frequent Contributor
  • **
  • Posts: 275
  • Country: pl
Re: Digitally controlled analog (audio) mixer
« Reply #15 on: October 02, 2024, 03:13:26 pm »
Each of 2 output amps has its (-) input. You connect 3 100k resistors to this (-) input. Each resistor has one end connected to this point. The other (not connected with (-) input) ends of these 3 resistors are 3 inputs to the output amplifier.
Ok, so in parallel then?

I would never name resistor being connected parallel if only one their ends are connected together?

Yes that would work but would require placing resistors on each node, i.e. "inside" the matrix as I've just explained above - which is not possible with AD75019.

Why you mix here AD75019?
Your first question was:

Hey everybody :)

Imagine a traditional analog audio mixer, but without EQ, compressor and all the other stuff, just inputs, their volume control, and outputs that can be any combination of the inputs.
Would it be possible to create such a circuit, dealing with analog signals but digitally controlled?

And I am writing only about it and not about using this or that IC to switch analog signals.
 

Offline rteodor

  • Regular Contributor
  • *
  • Posts: 174
  • Country: ro
Re: Digitally controlled analog (audio) mixer
« Reply #16 on: October 02, 2024, 03:56:40 pm »
I think it would be simpler to use "inverting summing amplifier" a.k.a "virtual earth mixer".
Thanks for the suggestion, but if you look at my first post, this is what I had in the first place, then people here suggested a non-inverting configuration. And yes moving to inverting solves the many-to-one problem, but then the one-to-many does not work.

What I had in mid was something like this:
(maybe you can use then AD75019 to select the output - the part in the middle)
2389677-0
« Last Edit: October 02, 2024, 04:00:08 pm by rteodor »
 

Online BrianHG

  • Super Contributor
  • ***
  • Posts: 8121
  • Country: ca
Re: Digitally controlled analog (audio) mixer
« Reply #17 on: October 02, 2024, 04:33:37 pm »
All pot outputs buffered through opamps are mixed together, then an optional final volume and buffer opamp.
That's an interesting idea, then we could ditch the matrix altogether, just using the pots to control which inputs goes where. But that would mean one 16 volume control for each output, so 256 in total. So 256 opamps and also 256 digitally controlled pots, which would take a huge amount of space on the PCB.

And thanks for the AD5124 suggestion (4x I2C controlled pots). About $4 / unit though (so $1 / pot), so just to have volume control on inputs and outputs, that would already be 32 pots, i.e. $32. For the option above, that would be $256.
Just use the equivalent MCP4351.  at $1.36 each. Need 64 of them = $87.04.
Opamp voltage inverter with an output with enough current to drive the top of all pots in parallel = 16 of them.  or 4 quad opamps
Opamps to drive the output ports into a negative input mixer = 16 of them, or 4 quad opamps.

This project is doable within around 150$ USD.

An all digital FPGA solution would be around 75$-150$ USD and that 150$ one would kill the analog one in precision, channel separation, mute and channel isolation, and total SNR by a gigantic margin, like an order of magnitude or more.  (Correction, the 75$ one will be an order of magnitude better than the 150$ analog solution, the 150$ FPGA version approaches 2 orders of magnitude better.)

Note to deal with the MCP4351 and the analog false ground, I would literally power that IC with +2.7v for Vcc and -2.7v for GND.  The level translate for the digital I2C bus giving us a solid GND for the audio path to operate on.  For the opamps, I would use +/-5v unless they have really poor drive as they approach their rails.

Note the MCP4351 uses SPI instead of I2C, so no extra stupid I2C addressing for 64 chips, you just serial link the in to out and control them all from 3 wire bus, plus a global reset signal.
« Last Edit: October 02, 2024, 08:22:58 pm by BrianHG »
 
The following users thanked this post: pcprogrammer

Offline pcprogrammer

  • Super Contributor
  • ***
  • Posts: 4388
  • Country: nl
Re: Digitally controlled analog (audio) mixer
« Reply #18 on: October 02, 2024, 04:39:32 pm »
Thinking about your matrix problem, the 4051 is not the right choice after all. They select a single input to be connected to the output, so it does not allow for mixing unless you use loads of them creating redundant switches.

The 4066 would indeed be better but with only 4 switches per package you would need 64 of them to get the same setup as the AD75019, but it does allow the resistors to be in the right place. Even in sop-14 SMD package it would take quite a bit of PCB space and needs lots of trace routing, plus 256 outputs of a digital system to control the switches.

Technically speaking the AD75019 does not short the outputs of the opamps together due to the on resistance of the switches. But with a typical value of 150 Ohm it is a bit low, and makes it a problem as you stated yourself.

The digital solution BrianHG mentioned does sound good.  :-+

You could look into PCM1808 for the inputs and PCM5102 for the outputs.

Online BrianHG

  • Super Contributor
  • ***
  • Posts: 8121
  • Country: ca
Re: Digitally controlled analog (audio) mixer
« Reply #19 on: October 02, 2024, 04:46:41 pm »
The digital solution BrianHG mentioned does sound good.  :-+

I already codded it and placed it on github,...

Changing my code below to 16 channels and 32bit audio with 16bit volume controls would be childs play.
https://github.com/BrianHGinc/YM2149_PSG_system/blob/master/BHG_audio_filter_mixer.sv
Reworking the DC-filter, bass and treble controls each independent input instead of for each output would take some modifications.  But if you only need global bass and treble for each of the 16 outputs, then no modifications necessary.
« Last Edit: October 02, 2024, 06:51:14 pm by BrianHG »
 

Online BrianHG

  • Super Contributor
  • ***
  • Posts: 8121
  • Country: ca
Re: Digitally controlled analog (audio) mixer
« Reply #20 on: October 02, 2024, 05:12:07 pm »
You could look into PCM1808 for the inputs and PCM5102 for the outputs.
Hmmm, for price and board space, try this guy: https://www.ti.com/lit/ds/symlink/pcm3168a.pdf?ts=1727848428458

6 independent ADCs, differential input if you want studio balanced inputs.  (96khz, 24bit each)
8 independent DACs, differential again.  (192khz, 24 bit each)

Only around 6$ each, so you will need 3 of them, 18$ total.
With this guy, expect the 107db snr / channel with a perfect lossless digital mixer.
I would set my input analog gain for 2x overhead and analog output amp to 2x, still giving you a 1:1 in to out, but, you now have an extra 6db or 2x analog grace/extended zone where no clipping will occur.

My github code will need to run at 32x the sampling frequency to mix 18 channels, so, 192khz x 32 = a core clock of 6.144Mhz.  (That would be running 16 of my mixers in parallel eating up 16x 32bit DPS blocks in an FPGA)  You may also run my code 16x faster and use only 1 DSP block, IE a smaller FPGA, but you need to run the FPGA at 98.304MHz.  Still an easy thing as the slowest FPGAs will get you beyond 150MHz without breaking a sweat.

I would also add a logarithmic LUT since you want a volumetric volume control, not a linear volume control.  But, I guess you may encode that table anywhere you like and just use a simple 16bit linear gain volume as my example code has it's volume as 7bit linear plus invert sign volume.  (I didn't need too much quality for old 8 bit computer audio...)
« Last Edit: October 02, 2024, 05:49:12 pm by BrianHG »
 

Offline donlisms

  • Frequent Contributor
  • **
  • Posts: 302
  • Country: us
Re: Digitally controlled analog (audio) mixer
« Reply #21 on: October 02, 2024, 07:31:22 pm »
(As a point of potential historical curiosity… SSM2163, no longer made.)
 
The following users thanked this post: BrianHG

Online BrianHG

  • Super Contributor
  • ***
  • Posts: 8121
  • Country: ca
Re: Digitally controlled analog (audio) mixer
« Reply #22 on: October 02, 2024, 08:28:20 pm »
1 big plus about going digital FPGA,you can do 'Zero-crossing' detection before changing each volume step to eliminate stepping sound when attenuating large steps.
 

Offline SaimounTopic starter

  • Frequent Contributor
  • **
  • Posts: 570
  • Country: dk
Re: Digitally controlled analog (audio) mixer
« Reply #23 on: October 03, 2024, 11:39:29 am »
@PGPG: true, but the AD75019 is a nice compact and inexpensive (per switch) chip so if we could find a solution that work with it great ;)

@rteodor: thanks, that's an interesting suggestion indeed! So for a 16x16 we would need 32 CD4066 ICs, correct?

@pcprogrammer: Ohhh very good point about the 4051! I did not notice that. Then yes I guess the 4066 or similar would work - maybe with rteodor's solution.

@BrianHG: I have literally no experience with FPGA but I'd actually love to try it! I think you pretty much answered the why you can find analog mixers, and digital mixers, but never a "digitally controlled analog mixer" :D
Just wondering, why would using an FPGA instead of a traditional MCU be better? Most ADC / DAC work with the I2S protocol, so a simple MCU could get the digital data, mix it as it pleases, and then output it again?

As for the choice of DAC, I remember looking at the PCM1681 before which was quite affordable for 8 channels, then we only need 2. And for the ADC we could use the PCMD3180.
Or use Cirrus chips for better performance.

1 big plus about going digital FPGA,you can do 'Zero-crossing' detection before changing each volume step to eliminate stepping sound when attenuating large steps.
I am not sure what that means?
 

Online BrianHG

  • Super Contributor
  • ***
  • Posts: 8121
  • Country: ca
Re: Digitally controlled analog (audio) mixer
« Reply #24 on: October 03, 2024, 01:43:35 pm »
@BrianHG: I have literally no experience with FPGA but I'd actually love to try it! I think you pretty much answered the why you can find analog mixers, and digital mixers, but never a "digitally controlled analog mixer" :D
Just wondering, why would using an FPGA instead of a traditional MCU be better? Most ADC / DAC work with the I2S protocol, so a simple MCU could get the digital data, mix it as it pleases, and then output it again?

As for the choice of DAC, I remember looking at the PCM1681 before which was quite affordable for 8 channels, then we only need 2. And for the ADC we could use the PCMD3180.
Or use Cirrus chips for better performance.

1 big plus about going digital FPGA,you can do 'Zero-crossing' detection before changing each volume step to eliminate stepping sound when attenuating large steps.
I am not sure what that means?

The reason for not using an MCU/CPU is that they have an input and output buffer, processing cycles and re-clock timing on those audio buffers no matter how small they may be, this furthers you away from the effect of a real-time analog device.

The FPGA you would have running in real time.  No buffers, all audio data coming in in parallel and going out in parallel while the FPGA code will have no software cycles in the line.  You are literally coding a 32 bit multiplier and adder running with the ADC and DAC clock.  This means (we'll use 96khz for the 6 channel cheap chip I chose) 1 sample to load the las one, 1 sample to multiply and sum all the 16x16 matrix, 1 sample to shift out the results.

This means 3 sample delay at 96Khz going through the FPGA, IE, the same delay as an 'analog' 32khz bandwidth pre-amp.

You wont trim your timing through 256 volume control settings and 16adc & 16 dac channels with this streamline timing on any MCU unless you find and or do some special coding of your own.

(Not that for the ADC/DAC, they also have an internal pipeline delay making things a little slower, but with all ADC/DAC filters and processing turned off, you will get something like an additional 8+8 pipeline on to out delay.)

I'm saying your fixed audio pipeline delay will be something like less than 1/4000th of a second after all considerations going with an FPGA solution.  Nothing anyone could hear. 

With an MCU, you may be talking as short as 1/200th of a second with 2x256 word audio buffers, or, maybe slower with some soft of OS involved.  (Which is why many PC audio Codecs have an internal analog mixer for piping auxiliary audio input to the line out when necessary.)

-- Zero crossing --
Unlike a slow mechanical hand manipulated volume control, digital volume controls are instant fast.  Say your source audio has a 20hz bass note and the source audio is currently at it's peak +1.3v point in the sine wave.  Going from a volume setting of 0% to 100% (or eve going from a volume of 0% to 100%) at this point will result in a flat output changing into an instant vertical spike, full power at the change of volume.  You hear these as a pop or click in the sound when moving a volume control at instant speeds.  A zero crossing detector just waits for the input audio signal to cross 0v in the sine wave before allowing transition to a new volume level to prevent this kind of stepping sound.  This is not needed if you will always be smoothly fading the volume control settings.

The 6 channel chip I recommended is cheap and fast.  All you need are 3 of them, all the audio ins come in on one side of each chip and all the audio outs go out the other side with around 16 digital IO to control each.  I would make a separate audio board with the audio codecs and get wire those 3 in parallel except what needs to be separate through a ribbon flex cable or IDC header.  Make you FPGA or MCU board separate.  This way, you may choose a different processor board or even an FPGA development board to drive your analog module.

Whatever you were going to use to control your volume settings, keep on using that and have that device talk to the FPGA, IE send volume settings to the FPGA through your choice of RS232 UART, I2C, SPI, parallel 8 bit with address/data clock, anything you like as an FPGA will eat anything you throw at it.  (For simple things, I like to use RS232 since I can use any PC software environment to talk to my FPGA projects with a little USB/TTL RS232 adapter cable.)
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf