Audio over LAN

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

It appears the AVR parts really do not have any support for ethernet except in the 32 bit parts. However, I'm wondering if it is feasible to pass audio over the LAN using an AVR board at each end of the link. The application I am thinking of would send 10-15 seconds of audio a few (< 10) times per day. I would use a Codec to process the audio at each end so the AVR would not have to deal with that task.

I'm believe that using UDP and just having the remote end constantly listen on a specific port would be good enough. I think trying to use RTP would be difficult. In my application if the transmission gets corrupted, well, that's just the way it is.

Has anyone attempted something like this? If so, what were the results?

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

What codec were you thinking of? (just curious). UDP is a good choice I think.

Imagecraft compiler user

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

Bob, I would probably use something like the Wolfson WM8510.

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

You would have to have an ethernet module with I2S/PCM audio interface. There is little point to use AVR for passing audio between ethernet chip and WM8510. You can use the AVR to control WM8510 and the ethernet chip, but the audio would have to flow directly between those chips, not through AVR.

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

Quote:
You would have to have an ethernet module with I2S/PCM audio interface.......
That is correct. The AVR would only be used for control purposes. It would probably be best to find another micro that had the ethernet and the I2S or PWM interface built in. If there is such a thing.

Any suggestions?

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

I hope I don't get shot for saying this, but there are PICs with ethernet hardware built in. You still need the magjack etc.

Also, if going to another platform doesn't make sense, a gentleman recrommended me an ethernet "card" to use with AVRs in this post: https://www.avrfreaks.net/index.p...

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

We made a board with a mega128 and a CS8900 ethernet chip, and I can send UDP datagrams fast enough to get almost full utilization. We have also hung xport modules on mega1280 uarts at 230kbps. Its slower but way easier. Ought to be able to get 460kbps no prob.

Imagecraft compiler user

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

I guess I'll have to do further research to find the best way to approach this. Maybe I'll start out using xport modules like Bob said. Once I get it working I can try and move from there to a processor with built in ethernet. This is just something I wanted to play with to see if it could be done.

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

Looks like the best way to go will be a combination of the WM8510, a dsPIC33FJ64GP206A, and a ENC28J60. The dsPIC has a built in codec interface and a SPI port. The SPI port can feed the ENC28J60 ethernet controller.

I couldn't find a processor that had a codec interface and ethernet built in.

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

This is probably going horribly offtopic, but try the Stellaris LM3S9B9X series.

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

What about a NXP Cortex-M3 micro such as the LPC2362. It has Ethernet and a DAC on board and enough horsepower to to the codec on software.

Otherwise there are modules like this one:
http://www.chip45.com/AVR-ATmega...

How do you want to power the stuff (POE) ?

Markus

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

Quote:
How do you want to power the stuff (POE) ?
The boards at both ends will be powered with wall warts and onboard regulators.

I think I'll stick with the Microchip solution since I already have all the development tools and 1000s of hours of experience with their parts.

I've thought about the NXP parts and TI parts in the past. But I always end up telling myself I really don't want to go through the grief of learning a new environment and making the investments needed to do that.

AVR, Microchip, TI, and 8051 already clutter my brain as it is.

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

bphillips wrote:
Quote:
How do you want to power the stuff (POE) ?
The boards at both ends will be powered with wall warts and onboard regulators.

I think I'll stick with the Microchip solution since I already have all the development tools and 1000s of hours of experience with their parts.


That's an excellent reason in my book.

Markus

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

Fooey. My Old Pappy used to tell me "If the only tool you have is a hammer, every problem looks like a nail". I know I can do 10 bits at about 12KHz on a mega with a big ram and fast clock. And the only diff between 2 mega1280s talking to each other over a 232 or 422 or ethernet is the size of the packet and the duration of the data burst. The transmitter can fill a buffer while transmitting the other buffer, and the receiver can fill a buffer while speaking the other buffer. so thus and therefore, I claim this job can be done with a pair of mega1280 boards and a long twisted pair.

Imagecraft compiler user

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

Of course the task can be done with AVR's on each end. That is not contested. But bphillips found he has plenty of experience with other manufacturers and that 8bit AVRs don't have a compelling advantage for this application warranting the investment in the platform. I can understand that.

After some thought, I would be tempted to use a linux wall-wart for such a task. Just add USB speakers and configure a linux network enabled sound library such as pulse audio and you are up and running in a day or two. No hardware development required at all ! And at $100 a piece you'll need quite some numbers to offset the development costs.

Markus

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

Markus, I like the Linux idea. Do you have any recommendations on boards that have the space available to install pulse audio?

One other question, how would I get the microphone input into the Linux embedded system?

I see the Beagleboard has stereo in and out built in. But it doesn't have ethernet on board. Other boards I looked at had ethernet but no audio capabilities.

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

The sheevaplug devices look good, among other things they come with a verrion of ubuntu preinstalled. Installing pulseaudio is probably as easy as 'apt-get install libpulse'.
To get the sound into the system I would use a USB sound card or USB microphone.

One thing: You should be able to test the whole setup on one or several PC's. Linux inside Virtualbox should do just fine for a proof of concepts setup.

Some references:
Sheevaplug: http://en.wikipedia.org/wiki/SheevaPlug
Pulseaudio-over-network: http://pulseaudio.org/wiki/FAQ#HowcanIusePulseAudiotostreammusicfrommymainPCtomyLANwithmultiplePCswithspeakers

Markus

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

The Sheevaplug looks interesting. Although I don't care a lot for Debian (I have several at work that I maintain) it is workable. Redhat is my preferred linux distro. Sheeva says it supports several linux distros but they don't give a lot of info on how to install the others.

I have a Fedora firewall here at home and another Fedora box sitting on the shelf. So I could give the PulseAudio a test using those boxes. If all works well I could then look to move it to embedded linux boards or something like Sheevaplug. As you said earlier, that would mean little to no development time.

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

The apple wireless router does it all for you.

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

Yes, wireless routers, like the Asus Series, can work too. But you are more limited because of much less flash and CPU power and must assemble more yourself based on OpenWRT.

Personally I like the debian/ubuntu distributions. The main reason is the apk package installation and update mechanism. At work we have mostly SuSE SLES10. Works, but am not fond of it.

Yes, a proof of concept on whatever machines you have, irrespective of the distribution, should work just fine. As long as you don't install the graphical stuff (kde/gnome) the 512M of flash storage should be plenty.

There are plenty of sound/audio over network systems on linux also, pulseaudio. For example I'm using squeezeboxes with a squeeze server, there is a software implementation also (softsqueeze), run music in my household. You can synchronize clients and they will play all the same sound/music.

You describe short sound bytes as workload, if your latency requirements are not too strict this could work well also.

Markus

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

Hi All,
We are presently working on WM8510 Audio codec for a voice process project. Our requirement is to feed the input voice data from some source to Audio codec MICP & MICN (pin no 2, 3) and receive the same voice data as output in SPKOUTP & SPKOUTN (pin no 22,25).

In order to achieve that we physically loop backed the ADCDAT & DACDAT (pin no 12 , 13) of AUDIO CODEC WM8510 and we also set the register 06 (Clock Gen Ctrl) MS bit to 1 to make audio codec in master mode. But the result was negative and we got only some noise signal at the output side.

Our voice data flow is mentioned below.

Input voice data >> WM8510 2&3 pins >> Internally reached ADC DAT pin >> Physically looped to DAC DAT pin >> especting same voice data at pin 22 & 25.

We wish to know, In the master mode, do this WM8510 Audiocodec got any internal looping feature?? do we really require a physical loop between ADC and DAC pin to receive the voice data in the output side.??

Awaiting for your valuable reply.
BR,
Paul

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

Do you realize you are responding to a six year old post?
 

Greg Muth

Portland, OR, US

Xplained/Pro/Mini Boards mostly

 

Make Xmega Great Again!