Die, SPDIF ! Design of the Ethernet DAC - diyAudio
Go Back   Home > Forums > Source & Line > Digital Source

Digital Source Digital Players and Recorders: CD , SACD , Tape, Memory Card, etc.

Please consider donating to help us continue to serve you.

Ads on/off / Custom Title / More PMs / More album space / Advanced printing & mass image saving
Reply
 
Thread Tools Search this Thread
Old 28th August 2006, 07:16 AM   #1
peufeu is offline peufeu  France
diyAudio Member
 
Join Date: Mar 2001
Location: Lyon, France
Default Die, SPDIF ! Design of the Ethernet DAC

Hello,

Sorry for the rather eye-catchy subject !

As many of you, I've been thinking for a long time about how to build the best music system.
And I've finally decided to get down to doing it. So, let's pool some brains.

I write this post to get your ideas and critics, so please express.
I will ask you to be constructive and refrain from flaming.

So, starting at the source this first post will be about designing a good DAC for a computer. This includes the following questions :

Let's start from the beginning.
*************************************************
0. The Source

The source shall be future proof (able to read current and future formats without replacing). Only a computer fits this definition. It is made of cheap and easy to replace parts ; a HD-DVD or Blu-Ray drive can be added when needed and it can play legal music downloads in 24/96 FLAC from magnatune.com. CD is obsolete as a media for information storage anyway. I want HDD backups and playlists.

*************************************************
1. How to get rid of jitter ? Where is the master clock ?

The master clock should be on the same board carrying the DAC chips, with the shortest path between clock and DAC(s). The source (computer) and everything else should be slaved to it. Better eliminate problems rather than trying to solve them. Of course the implementation must be good enough (see next episode)...

Physically the DAC will be one box. There will probably be several boards inside (digital, analog, etc). Power supply will probably be external to keep noise down.

A computer can play DVDs and will be able to play any future audio/video formats (HD-DVD, Blu-Ray) while being slaved to the master clock in the DAC, so there is no problem for video playback either.

There shall be two clocks, one for 44.1k based sample rates and one for 48k based sample rates, with appropriate selections via software.

*************************************************
2. How many channels ?

A stereo system for 24b/192k needs about 10 Mbps.
If we want to be future proof, let's provision for a craziest multichannel system with active digital XO :
- 3 front channels, 4 way
- 4 subwoofers
- 2 rear channels, 2 way

By putting all channels 24/192 except the woofers and LF channels in each speaker we get about 70 Mbits/s.

Hm, so let's design for between 2 and 20 channels.

I think I'll start with 6 or 8 x 24/192 channels to be able to do digital crossover for 4 way speakers and various other experiments. There should be an expansion connector... also a cheap multichannel codec can be used for the subwoofers while good quality dacs like PCM1704 can be used for the rest.

Calculating the number of channels was to know the required bandwidth. SPDIF/ADAT are, or course, out : not flexible enough, stereo only, too much jitter.

I will also include a stereo ADC for analog sources : tuner, vinyl.

*************************************************
3. Where to do the digital crossovers and filtering / upsampling ? In the PC or in the DAC box ?

Doing them in the PC will allow use of standard, proven software like BruteFIR.
It will be a phenomenal time saving but, due to available bandwidth, will pretty much limit the max sample rate to 192 kHz. I think this is enough. A DSP might be added to the DAC box to oversample to the DAC chips native frequencies if a DSP expert is found or I can learn how to do it. I don't think it is a good idea to do the room correction/crossover in a DSP chip : it already works well with a PC. Don't reinvent the wheel.

*************************************************
4. Connection from the DAC box to the computer.

From our bandwidth requirements, we have :
- Custom PCI FPGA board : Out, PCI is obsolete.
- Firewire
- USB2
- Ethernet

The connection should also allow the computer to tell the DAC which sample clock to use, and the DAC to query audio data from the computer, effectively slaving it to its clock.

I prefer Ethernet because it's the most mature one, the easiest to program and it can be 100m. long so the PC can be in another room. I wish there were boards with Gigabit Ethernet, but, oh well.

USB is too short (5m max) and eats system resources.

Firewire is nice but isn't very mature. Maybe someone can comment on this ? Also, Firewire audio puts the clock in the component which is elected as bus master. I don't fully understand how the protocol works.

Connection includes drivers. The PC will, of course, run Linux, so I will have to write a kernel driver which will masquerade this DAC as a sound card and take care of all communication :
- data transmission
- clock management
- setting volume from the computer
- displaying the song title on the DAC LCD front panel (LOL)
- etc

Linux already has support for ethernet audio (like making the soundcard on a computer virtually appear on another) so I think this should be doable without too much headache.

Also, for Ethernet boards, I think the DAC will act like a TCP server, receiving audio data as a simple TCP stream. These boards have HTTP servers in the firmware (uclinux rules) so the controls (volume, sample rate etc) could be simple HTTP requests.

In this case, the first version of the "driver" can be a simple userspace application, talking to the DAC via ethernet / TCP/IP and offering some Jack ports to the audio player. Hell, it could even be written in Python. No need to hack the kernel, and you get full debugger support with no hassle. And you can test your DAC with a web browser (upload a WAV file... lol.) or even SSH into it...

*************************************************
5. Implementation.

I will design the electronics around the DACs, clock, and analog output stage / volume control. However this needs to be fed data in a format like I2S. I will not design a board carrying a CPU, Ethernet transceiver et al, this is too much work.

So, I'm hunting readymade boards with the following characteristcs :

- Computer connection (Ethernet 100Mbps or better, 1Gbps, real USB2 or Firewire)
- A nice CPU with enough power and DMA to lug aroung the data, or a FPGA which can synthetize a CPU core
- Included communication stack (like a TCP/IP stack)
- Enough RAM and output pins
- Easy to program (Ideally uclinux)
- Bonus if it includes a DSP or a FPGA
- Price should be acceptable (ie. not 1500 euro + tax like the DICEII Firewire dev board)

So, said board will receive the data from the computer, buffer it and send it to the DAC. It will probably output the samples in parallel format with DMA access, so a converter will be needed to make them I2S. This will either be a FPGA or other programmable component.

Examples :

http://www.acmesystems.it/?id=4 (cheap)
http://www.acmesystems.it/?id=120 (cheap)
http://www.cesys.com/index.php?langu...&menuparams=50 (unknown price)
http://www.traquair.com/products/mic...13compact.html (unknown price)


*************************************************

Now, I'm waiting for your comments (and especially suggestions for the CPU board !)

If anyone wants to embark on the project, you're welcome.
  Reply With Quote
Old 28th August 2006, 12:08 PM   #2
diyAudio Member
 
BlackCatSound's Avatar
 
Join Date: Oct 2004
Isn't this just a Squeezebox?
  Reply With Quote
Old 28th August 2006, 12:37 PM   #3
ojg is offline ojg
diyAudio Member
 
Join Date: May 2003
Location: Norway
Have you looked at http://www.gumstix.com/?

The FOX FPGA board looks like a good fit though.
  Reply With Quote
Old 28th August 2006, 12:46 PM   #4
mazurek is offline mazurek  United States
diyAudio Member
 
Join Date: Aug 2005
I figure after all this talk of DAC's and the Squeezebox transporter, the easiest thing to do to ensure the best possible signal is to get a pro computer dac and use balanced output to transport the signal where-ever you need in the house.

I have a friend that did this, he installed softsqueeze on his computer, then is using pda / laptops / cell phone to control the playlists. All the amps are in his basement. You should check out the slimdevices forums, they tolerate a lot of diy type discussion.
  Reply With Quote
Old 28th August 2006, 03:47 PM   #5
peufeu is offline peufeu  France
diyAudio Member
 
Join Date: Mar 2001
Location: Lyon, France
Quote:
Isn't this just a Squeezebox?
Not really. Squeezebox goes through the network to grab MP3 and other files on a PC offering a file sharing. My box will be a lot dumber ; it will just wait for the PC to send audio data ; but will be able to do multichannel, active crossover, etc ; it's just a soundcard at the end of a wire.

And I dont want to browse through my music collection using a crummy two button interface.

Quote:
Have you looked at http://www.gumstix.com/?
Yes, I couldn't find real documentation on their site. Any info ?
  Reply With Quote
Old 28th August 2006, 04:01 PM   #6
diyAudio Member
 
Join Date: Oct 2001
Location: .
Surely one of the 5 or so methods of moving multichannel audio should suffice?
  Reply With Quote
Old 28th August 2006, 04:09 PM   #7
peufeu is offline peufeu  France
diyAudio Member
 
Join Date: Mar 2001
Location: Lyon, France
Of course, I'm looking for a board with a computer interface at one end and a DIY hacker interface (ie. pins) on the other end and some fast silicon brain in-between (ie. uc, FPGA...)

Another candidate, this time true USB2 :

http://www.knjn.com/ShopBoards_USB2.html

This one smells good.
  Reply With Quote
Old 28th August 2006, 04:15 PM   #8
diyAudio Member
 
Join Date: Nov 2002
Location: HK
How about no PC, just a card and a harddisk. Plays several format, has playlist and interface with your TV.
Has I2S, you can use whatever dac you like.
And most of all, it sounds excellent, and cheap.
Sorry, only 2-channel. Maybe you can squeeze multi-channel out the EM8511 but you'll need the datasheet.

Music server with TDA1541 (I2S direct)
  Reply With Quote
Old 28th August 2006, 05:24 PM   #9
peufeu is offline peufeu  France
diyAudio Member
 
Join Date: Mar 2001
Location: Lyon, France
I'd rather have my device as dumb as possible and program all the intelligence in the PC, especially when the PC can use existing software that works, like :
- BruteFIR for crossover and room correction,
- linux infrared remote control,
- amarok media player,
- playing DVDs and video files
- listening to internet radio
- having a decent visual ilterface

Besides, the Tivx looks like it generates the DAC clocks from a cheap oscillator / PLL which is quite a compromise...

Also, I DON'T OWN A TV

Hehe, getting closer :

http://www.opalkelly.com/products/xem3001/

Quote:
Our FrontPanel software fully supports the XEM3001 for basic configuration and incredibly flexible virtual control panel interfacing. And the FrontPanel programmer's interface lets you communicate with the XEM3001 using your own software and our drivers -- after configuration, the USB interface becomes a high-speed bidirectional communications pipe between the PC and your FPGA design allowing you to transfer asynchronous and synchronous data using our HDL modules and API. Since the API is available in C++, Python, and Java programming languages, software/hardware integration has never been so easy.
Python ? They said Python ?
  Reply With Quote
Old 28th August 2006, 06:44 PM   #10
jkeny is offline jkeny  Ireland
Banned
 
Join Date: Feb 2007
Location: Dublin
Is this of use?:
http://www.medallionsystem.com/produ...ons/index.html
  Reply With Quote

Reply


Hide this!Advertise here!
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
dddac1543 mk2 ** modular design ** USB & SPDIF input ** dddac Digital Source 69 21st July 2011 08:18 AM
Need FPGA experts to review design of Ethernet DAC v2 peufeu Digital Source 2 29th July 2007 05:42 PM
DAC design | First step: SPDIF receiver webzeb Digital Source 9 6th February 2006 10:11 PM
HQ USB to SPDIF Circuit Design??? fastcat95 Digital Source 10 6th July 2005 12:55 AM


New To Site? Need Help?

All times are GMT. The time now is 05:47 AM.


vBulletin Optimisation provided by vB Optimise (Pro) - vBulletin Mods & Addons Copyright © 2014 DragonByte Technologies Ltd.
Copyright 1999-2014 diyAudio

Content Relevant URLs by vBSEO 3.3.2