Please suggest hardware for simple DSP

Go To Last Post
17 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I need to design a system which will do the following:

1. Receive SPDIF audio (other formats optional).

2. Do simple DSP (tone control) on the received data.

3. Send the filtered data to an external storage device.

[edit] by external I mean not built into the chip itself. :oops:

Not tied to any specific hardware at the moment. Any and all recommendations and suggestions appreciated. :D

If you think education is expensive, try ignorance.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The main consideration is the audio quality. If 16-bits is good enough I'd use a dsPIC. Here is something I found:

http://koonlab.com/UltimateSource.html

There is a very cheap 24-bit audio DSP, but I've forgotten the details.

Leon

Leon Heller G1HSM

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

You could do this with an AVR if it doesnt have to run real time. I bet you could do it in 1/2 or 1/4 time if the filter was 2 pole IIR.

Imagecraft compiler user

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanks both for the replies. :D

Everything needs to be done in real time, :( and the quality needs to be great.

I was considering using specific chips for this purpose. I'm sure there are devices out there that will read SPDIF and other digital audio formats, or at least have a library for doing this so I don't have to reinvent the wheel.

As for the DSP, I'm sure I could do it using one the 320 series from Texas Instruments, but that seems a bit like overkill for such a simple application. Think of it as an active speaker with recording facility.

If you think education is expensive, try ignorance.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Here is the cheap 24-bit one I mentioned:

http://www.wavefrontsemi.com/index.php?id=11,13,0,0,1,0

It only has 1k of memory, but that's adequate for many audio applications. A free assembler is available.

XMOS is another option:

xmos.com

They are being used for high-end audio products and have some DSP support, like a MAC and bit-reversal instructions.

Leon

Leon Heller G1HSM

Last Edited: Tue. Jan 6, 2009 - 06:03 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Wow! Thanks, Leon. Looks like just the thing. :D I'll be sure to check it out. :)

If you think education is expensive, try ignorance.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

if all you care about is basic tone control do you really need a DSP?

You should be able to run a basic (short-ish) convolution filter and the serial audio I/O and the file storage code in an ARM.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Refresh my memory on spdif format.... I'll guess pairs of LR 16 bit samples taken at 44.1khz packed in frames of 2^N samples? so 192K bytes per sec?

Imagecraft compiler user

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

It's been a while since I worked on anything with SPDIF. But I think SPDIF can carry up to 192khz sample rate.

I'm very sure it handles 24bit depth.
I'm also very sure it can carry 5.1 channels of audio.

I'd assume for a "speaker with audio recording" that it's just going to be a single channel of audio, at no more than 24/96?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

@emuler , i have n clue about DSP's but maybe there are some hints here

Maybe this link is usefull
http://www.dspguide.com/pdfbook.htm

Atmel (didn't know they made DSP's)
http://www.atmel.com/dyn/resourc...

Freescale
http://www.freescale.com/files/d...

/Bingo

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Just pin down the specs... 1 ch or 2? 16 bit 44.1khz the bare minimum? Now I guess there is some sort of eq or tone control.... one section? two? three? You want a notch or symmetrical bell shaped curves? Fixed Q ok or you want to vary the width of the curve (parametric eq)? +-12db of boost and cut ok? What if you want 3 section sweep frequency eq with variable Q, and I can give you 1 section with fixed Q realtime using a 16mhz avr? I guess we could get a 2 section eq if we used a 32mhz xmega.

Imagecraft compiler user

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanks everyone for the comments, suggestions and links. :D

I took a look at the WaveFront DSPs and they are certainly very impressive. It can do a 20 channel 8 band equalizer, way more than I need. I'll need a Mega, though, to load the instructions into it at startup.

Sorry about the specifications mess. :P This is just at the conceptual stage and as usual there is a lot of dithering going on. :oops:

OK. I'll tackle the active speaker part first. The recorder can come later as a separate addon.

1. Single channel audio. Minimum: CD audio - 44.1 KHz, 16 bit. Maximum: 193 KHz, 24 bit (but we can look at that later if necessary; proof of concept comes first and can be done with CD audio).

2. Single, fixed -6dB/octave low pass filter covering the entire range. Will probably need special case considerations for the extreme ends of the audio spectrum. That (20 channel) 8 band equalizer is looking good as a means of fine-tailoring the response to that of the speaker used. :D But I only need to do one channel for one speaker.

These speakers will be fairly large (none of that tiny (and tinny) laptop/ desktop speakers crap :P ) so a separate circuit + power supply + power amplifier in each speaker is not a problem. They'll probably run off the same digital audio, with switches on each speaker to select the channel (L or R). An RF link is also planned for later revisions to do away with the mess of (expensive) wiring.

If you think education is expensive, try ignorance.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I'm stumped with the first order lopass idea. A treble control is a 6db/oct lopass... a fairly subtle filter... Is this for a subwoofer? Crossovers use 4th order filters.... 24db/oct, but you can do it with a couple of 50 cent opamps. So far I dont see much digital signal processing in the project, unless its just to pick off the center channel data from an optical cable or something. I've spent a couple hours here whacking on a single section eq with filter freq, boost and cut selectable with keystrokes in steps. I figure that at 44 samples/ms, if I can filter a buffer full of 128 16 bit samples every 3ms, thats just about real time.

Imagecraft compiler user

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:

I'm stumped with the first order lopass idea.

Those are the drive requirements for a new experimental digital speaker design. The low pass filtering needs to be done digitally to compensate for the response of the speaker - the efficiency rises with increasing frequency - and I don't want to introduce an analog stage for that into the digital signal path.

If you think education is expensive, try ignorance.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:

I figure that at 44 samples/ms, if I can filter a buffer full of 128 16 bit samples every 3ms, thats just about real time.

Can you explain that a bit better, please? To be real time you would have to accept 44 samples every ms, maintain a rolling buffer (discarding the oldest sample), processing the buffer and putting out 44 processed samples every ms. Am I missing something? 44.1 kHz in, 44.1 kHz out, some processing in between.

Can you estimate the propagation delay through the filter? For about 128 samples, 3ms plus computing?

My head is starting to hurt. :(

If you think education is expensive, try ignorance.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thats just a ballpark guesstimate. If the first cut at it takes 30ms, I'd say give it up, but if its within a factor of 2 of realtime, then start optimizing. I guess the budget could be 1ms worth of inputting, 1ms worth of processing, 1ms worth of outputting, or something similar. I think a 6db/oct lopass filter is the absolute simplest filter there is. One multiply and one add. Whats the input come from? toslink opto connector? Is there a word sync? A frame sync? Guess I need to read up on that stuff huh?

Imagecraft compiler user

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

This looks promising too: tlv320aic3254
http://focus.ti.com/docs/prod/fo...
and this:
http://focus.ti.com/docs/prod/fo...

If you think education is expensive, try ignorance.