Open Source DSP XOs - Page 13 - diyAudio
Go Back   Home > Forums > Source & Line > Digital Line Level

Digital Line Level DACs, Digital Crossovers, Equalizers, 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 5th February 2012, 08:50 AM   #121
rsdio is offline rsdio  United States
diyAudio Member
 
Join Date: Feb 2008
Location: Seattle
Can we get a comprehensive summary of the overall goals here?

I made a quick review of the dozen pages of this thread, and although I did not read every word I see lots of discussion of processors, but very little about external I/O. Certainly a lot of mention of I2S, which can be external - but only with some difficulty. There was at least one reference to a desire for the DSP XO to run untethered from a computer. There was also mention that this thread is "about" an ARM-based DSP XO. I was still left with what seem to be some huge questions.

Will analog input be required? optional?

Will digital input be pushing the sample clock (SPDIF, HDMI) or pulling the clock (USB, FW, EN, ?I2S)? ... or will there be options for both kinds?

Is the primary design expected to have analog outputs? This would more easily allow the ideal low-jitter clock near the DAC chip or chips.

Will digital outputs be a necessary option? I suppose this is a less critical question, since any design allowing on-board DAC circuits would also allow digital-only conversion to standard digital audio outputs.

Related to the last two questions: Is the primary output expected to be mainly digital or mainly analog?

Basically, I would enjoy seeing a design document of some kind, or a FAQ, or at least a review. Does abraxalito basically own this thread, and therefore the final determination of the design goals?

For me, the critical question with digital audio is always clocking, and thus working without a computer (untethered) means that the clocking will suffer (unless perhaps the DSP XO uses USB Audio Class to talk to media sources without a computer).

I suppose it's also possible for FireWire Audio Devices to talk peer-to-peer without a computer acting as a host, but I have not purchased the FireWire specifications to see whether peer-to-peer audio can be implemented. On this last note, there are standalone DSP solutions such as the Universal Audio UAD-2 Satellite (DUO and QUAD) FireWire DSP Accelerators, but they probably do not count as open source in the slightest. But their form factor is certainly attractive if all of the protocols can do what they need.

Anyway, I'll stop here and give folks a chance to respond to my basic questions.

EDIT: I suppose Word Clock would be a way to allow digital inputs that are technically "push clock" to be slaves, provided that the media source is capable of slaving to Word Clock input.

Last edited by rsdio; 5th February 2012 at 08:53 AM.
  Reply With Quote
Old 5th February 2012, 09:18 AM   #122
diyAudio Member
 
abraxalito's Avatar
 
Join Date: Sep 2007
Location: Hangzhou - Marco Polo's 'most beautiful city'. 700yrs is a long time though...
Blog Entries: 100
Send a message via MSN to abraxalito Send a message via Yahoo to abraxalito Send a message via Skype™ to abraxalito
Quote:
Originally Posted by rsdio View Post
Can we get a comprehensive summary of the overall goals here?
See the first post in the thread. I see the thread as a gathering place for interested people to share tips, experiences, code and schematics of using ARM Cortex (M0,3 & 4) SoCs to implement high-end digital crossovers. The initial idea was to use LTSpice as a way of modelling filter designs but so far there's been not a lot of interest there.

Quote:
Will analog input be required? optional?
I can't see why this wouldn't be just a matter for the individual designer?

Quote:
Will digital input be pushing the sample clock (SPDIF, HDMI) or pulling the clock (USB, FW, EN, ?I2S)? ... or will there be options for both kinds?
Seems you're labouring under the assumption that there's a specific project behind this thread - at present there is not. But I am working on a sub-module design for a DAC using an ARM Cortex processor. At present I'm uncertain whether to share that design on this thread or on another. Feedback anyone?

Quote:
Is the primary design expected to have analog outputs? This would more easily allow the ideal low-jitter clock near the DAC chip or chips.
There is no such 'primary design'.

Quote:
Basically, I would enjoy seeing a design document of some kind, or a FAQ, or at least a review. Does abraxalito basically own this thread, and therefore the final determination of the design goals?
I don't know what 'own the thread' would mean here. I'm just the initiator of the thread.

Quote:
For me, the critical question with digital audio is always clocking, and thus working without a computer (untethered) means that the clocking will suffer (unless perhaps the DSP XO uses USB Audio Class to talk to media sources without a computer).
In my experience the critical question with digital audio is noise control. Discussion of PCs is tangential to the thread.
__________________
When you design something for other people you don't have as much motivation to make it beyond excellent - Woz
  Reply With Quote
Old 5th February 2012, 12:52 PM   #123
diyAudio Member
 
s3tup's Avatar
 
Join Date: Dec 2004
Location: Israel
How about implementing a motherboard with DSPs on board + additional analog/digital cards which could be put into the motherboard at 90 angle? Just like PC, but with DAC cards.

You can use WM8804/5 transmitters instead of DACs if you want.
You can use different type DACs for different outputs - NOS TDA1543s, DS PCM1798/4, and many others. You can simply swap them given you have 256fs masterclock and proper i2s format configured for all dacs.

You can easily fall-back to simple SPDIF dacs by making additional SPDIF receiver board pin-compartable with DAC boards, and sticking SPDIF+DAC together.

Ah, and in case your DSP motherboard gets upgraded to FIR-capable CPU, or downgraded to the tiny TAS3108 - you have all your DACs salvaged and reused.

Last edited by s3tup; 5th February 2012 at 12:57 PM.
  Reply With Quote
Old 5th February 2012, 01:09 PM   #124
diyAudio Member
 
abraxalito's Avatar
 
Join Date: Sep 2007
Location: Hangzhou - Marco Polo's 'most beautiful city'. 700yrs is a long time though...
Blog Entries: 100
Send a message via MSN to abraxalito Send a message via Yahoo to abraxalito Send a message via Skype™ to abraxalito
All suggestions warmly welcomed I have considered this one and wondered why there's a need for the motherboard - I rather like the idea of brotherboards, without the need for a mother to plug them into. The disadvantage of the motherboard approach is knowing in advance what the maximum number of output channels is to be.

Suppose someone wants to build the ultimate digitally crossed over 7.1 system. Its entirely possible they might want in excess of 20 channels, necessitating at least 10 stereo slots being made available, This would be a bit of a bummer for those with more modest requirements. So why not just stack boards?

My initial design idea for a DAC is to have an SPDIF input, two NXP Cortex M0 or M3 CPUs and a stereo DAC (optional headphone amp, not yet decided) with on-board analog volume. This could be a fairly modest sized board - say no more than double credit-card sized. It might be possible to partition the DAC design to give two or four output channels (not yet decided). The idea is to have the board drive whatever poweramp you have (balanced input of course) without the need for any pre.

The aim for all this is high end sound, which to me means low power (for low noise). For my money S-D type DACs don't give high-end sound for all their impressive datasheet figures. So initially I'll likely begin with relatively cheap multibit (16bits) DACs.
__________________
When you design something for other people you don't have as much motivation to make it beyond excellent - Woz
  Reply With Quote
Old 5th February 2012, 01:34 PM   #125
diyAudio Member
 
s3tup's Avatar
 
Join Date: Dec 2004
Location: Israel
Brotherboards imply height-limit if stacked in arduino-style... All these fancy caps won't fit, as well as TO220 regs and transistors

Quote:
Originally Posted by abraxalito View Post
So initially I'll likely begin with relatively cheap multibit (16bits) DACs.
Could you please list some of them? All i know are TDA1541, some big AD and PCM58/63s, which ain't that cheap nor easily obtainable, nor take a little of board space (with their DFs). They are fine for standalone hifi DACs, but a bit pricey and bulky for multiway solutions.

In addition, someone from russian board have run comparision of ultimate classic passive filter + class A amplification (Zen9 or Power Follower) + a good DAC against a ESI 1010 card with FIR crossovers, and FIR solution have easily outperformed the classical approach. He used a Troels Cyclop drivers set with their crossovers.


FIRs are far better than regular biquad solutions, but they require lots of horsepower from CPUs.


For the volume control - i'd suggest going with ladder-type relay attenuators. They are "digital" in volume settings and "analog" in attenuation. These should be put in the amplifiers to eliminate additional buffer stage required on their outputs.
  Reply With Quote
Old 5th February 2012, 02:00 PM   #126
diyAudio Member
 
abraxalito's Avatar
 
Join Date: Sep 2007
Location: Hangzhou - Marco Polo's 'most beautiful city'. 700yrs is a long time though...
Blog Entries: 100
Send a message via MSN to abraxalito Send a message via Yahoo to abraxalito Send a message via Skype™ to abraxalito
Quote:
Originally Posted by s3tup View Post
Brotherboards imply height-limit if stacked in arduino-style... All these fancy caps won't fit, as well as TO220 regs and transistors
Good points - I'm not using any coupling capacitors and there's nothing particularly power-hungry on the board so the regs are very unlikely to get hot. It would be kinda nice if my DAC board could find application in portable too

Quote:
Could you please list some of them? All i know are TDA1541, some big AD and PCM58/63s, which ain't that cheap nor easily obtainable, nor take a little of board space (with their DFs). They are fine for standalone hifi DACs, but a bit pricey and bulky for multiway solutions.
Glad to help out with more details - the DACs I have in my prototype designs are TDA1387 and TDA1545A. These I've chosen because they offer a really good bang for the buck. They're SO8 packages so not exactly real estate hogs. They have no DF on-board - that function is handled by the M0/M3 if required, according to the DIYer's wish.

Quote:
FIRs are far better than regular biquad solutions, but they require lots of horsepower from CPUs.
I've implemented a clone of the SAA7220 on one Cortex M0, it runs at something like 5% of the power budget of that older chip.

Quote:
For the volume control - i'd suggest going with ladder-type relay attenuators. They are "digital" in volume settings and "analog" in attenuation. These should be put in the amplifiers to eliminate additional buffer stage required on their outputs.
I've been playng with AD605 for this function - whilst it doesn't have ultra-low THD it sounds fine to my ears.
__________________
When you design something for other people you don't have as much motivation to make it beyond excellent - Woz
  Reply With Quote
Old 5th February 2012, 02:09 PM   #127
diyAudio Member
 
steph_tsf's Avatar
 
Join Date: Mar 2008
Quote:
Originally Posted by rsdio View Post
Can we get a comprehensive summary of the overall goals here?
From Analog Devices, there is the ADAU1702 (48 pin, 25 MHz, built-in Stereo ADC and 4-channel DAC) at 3.57 dollar. There are digital pins for connecting more DACs and/or a SPDIF input. You would always use the ADAU1702 as digital crossover engine, if there was not an issue regarding the development tool and licencing cost. Look miniDSP, the way they lock the software, preventing you from letting you run your own software.

From Freescale, one should not forget the Elektor DSP56374 board featuring all the necessary I2S lanes on the expansion header. However, the DSP56374 is phased out, and is not recommended for new designs. Elektor provides a valuable advice about a few possible development tools, requiring no licensing.

Within Freescale, there is also the DSP56725 (80 pin, 250 MHz, dualcore) at 6.05 dollar. I don't know if the DSP56374 development tools can accept a DSP56725 as target, dualcore.

This being said, a few recently introduced Flash 32-bit Cs costing 5 dollars, operating around 100 MHz, come now equipped with one or more I2S lanes for interfacing audio ADCs, DACs, CODECs and ASRCs. They are low power, minimizing EMI issues.

On one hand you have the recently introduced PIC32MX1 and PIC32MX2, featuring the MIPS M4K core running at 40 MHz and up to two I2S lanes. The BDTi report says "the multiplier can complete one 3216-bit multiply or MAC operation in a single cycle. A 3232-bit multiply or MAC completes in two cycles". There are other reports from other people saying the PIC32 needs more than two cycles for completing a 32x32 MAC. A possible issue is the C language interface, making me think that trivial audio DSP filters like IIRs and FIRs need to be programmed bare metal, in assembly language.

The recently introduced Microchip PIC32 MX1/ MX2 Starter kit (DM320013) hosts a PIC32MX220F032 with 32KB of Flash, 8KB RAM and a WM8731 24-bit Audio Codec. Actually, you may consider the DM320013 as the very first "open source DSP XO". Input your audio on pin 19 or pin 20 of the WM8731, split it in lowpass/highpass using your own software, and output the two resulting channels in analog on pin 12 and pin 13 of the WM8731. A piece of cake, a ready-to-run solution ? Now look the DM320013 schematic : Line_in and Line_out of the WM8731 are not exploited by the DM320013 PCB. And look the audio playback sample code provided by Microchip : instead of providing source code in assembly, they have followed the "C", "Driver", and "Modular" approach. And their bit-banging SPI implementation is using NOP loops. If you get tempted testing the PIC32, be warned you need to blast everything down to a simple and healthy bare metal assembly code, then grow from it, adding bells and whistles. You may get some help from Lucio Di Jasio Book "Exploring the PIC32" written in 2008 (quite old now). Also, there are a few interesting posts, about the PIC32 assembly code, on Microchip's website.

This being said, nothing prevents you from creating a PCB hosting a Wolfson WM8580 Codec or a Wolfson WM8581 Codec (always as master with its own quartz), providing a SPDIF_in, a stereo Line_in, and up to eight Line_out. For making a stereo 3-way or 4-way crossover. You would connect such PCB, acting as master, on any C featuring up to four I2S lanes and one SPI lane. The local MCLK doesn't need to reach the C. Such sub-assembly is definitely required, seeing how Microchip wasted the WM8731 resources in their PIC32 MX1/ MX2 Starter kit (DM320013).

Imagine you have such WM8580 or WM8581 sub-assembly lying around.

For a stereo 2-way crossover, you could use the Microchip Microstick II (DM330013-2) small development kit, hosting a PIC32MX220F032B chip. Such chip outputs two I2S lanes, and you can implement a SPI using bit-banging operating at Fs within the audio DSP interrupt service, without NOP loops.

On the other hand you have the ARM Cortex-M4 core implemented by vendors like Freescale (K10 K20 ... : one I2S lane), STM (STM32 F4 : two I2S lanes), Infineon (XMC4000 : six I2S lanes).

T.I. also has Cortex-M4 Cs, with their LM4F family, but currently they only feature SPI, and no I2S lanes. I guess T.I. is now evaluating the option consisting on providing McASP (coming from the C6000 world) on top of SPI for promoting their own Multichannel Audio Codecs using TDM or TDMCA.

Currently I am not listing the NXP LPC4300 (also basing on a Cortex-M4 core) because it is not a Flash C, and because the I2S lanes need to be done using the M0 coprocessor tightly coupled to few SGPIO sequencers. This looks overcomplicated now that the Infineon XMC4000 family is in the pipeline.

The Microchip PIC32 MX1/ MX2 Starter kit (DM320013) looks ideal because of delivering one I2S lane, and incorporating a WM8731 Codec.
The first thing to do is to verify that the I2S lane can operate at the required bitrates and word lenghts for audiophile use.
For such purpose, one could create and share a bare metal assembly application, a "PIC32 Audio DSP engine" from where many motivated people could learn and grow.
If the "PIC32 Audio DSP engine" works well, a small PCB equipped with a WM8580 or WM8581 Codec need to be created, that would be reused on different C platforms, especially the Infineon XMC4000.
Then, when the XMC4000 becomes available, no doubt there will be a low cost development kit available from Infineon. If Microchip doesn't feature I2S on their PIC32MX5 and PIC32MX6 families, it will be time to switch on the ARM Cortex-M4 platform, and connect the WM8580 or WM8581 board on it.

So, in summary :

1 - Buy a Microchip PIC32 MX1/ MX2 Starter kit (DM320013)
2 - Write a trivial PIC32 Audio DSP application in assembly using the onboard WM8731
3 - Develop a proper WM8580 or WM8581 Board, four I2S lanes and one SPI
4 - Buy a Microchip Microstick II (DM330013-2) small development kit, program it for outputting two I2S lanes, write a stereo 2-way crossover application, connect the WM8580 or WM8581 Board, and you are done !
5 - Switch to the Infineon XMC4000 as soon as it comes available
6 - Or stay with Microchip if they manage to upgrade their bigger PIC32 chips, providing up to four I2S lanes
7 - Re-use the WM8580 or WM8581 Board and you get a stereo 3-way or 4-way crossover
8 - Add bells and whistles like a DIR9001 ASRC and a high quality analog output volume controller

Budget : approx. 100 dollars.

Last edited by steph_tsf; 5th February 2012 at 02:22 PM.
  Reply With Quote
Old 5th February 2012, 11:31 PM   #128
diyAudio Member
 
Join Date: Jun 2009
Quote:
Originally Posted by steph_tsf View Post
Wolfson WM8580 Codec or a Wolfson WM8581 Codec
I would tend to favor the WM8850 for Wolfson, though Cirrus's CS425xx parts are probably a stronger choice. In addition to a few dB better performance figures given a choice between sample rate conversion (WM8850) or PLL clock recovery (CS425xx) I tend to favor PLLs. The time blurring from SRC interpolation filters is in band while the PFD spurs from a PLL are usually well out of band and hence not too hard to attenuate in the PLL loop filter. That's not to say the PLL in the CS425xx is anything exceptional---performance-wise it's nothing special---but it is certainly cost effective and simple.

The MiniDSP 2x4 is based on an ADAU1701 and the 2x8 is probably using a CS42428. To my knowledge MiniDSP hasn't confirmed the latter but if it's not that part it's probably something functionally equivalent. So if one wants easy DSP XO one can probably just by a MiniDSP kit and be happy. DIYing an equivalent offers more control, much more time consumed (some of us would call it entertainment), and the ability to trade off lower cost versus higher performance. But let us be realistic; the cost savings or subjective improvements DIY offers are modest compared to an off the shelf solution. So the reason to DIY an XO is mostly because one wants to, not because one needs to.

I certainly agree a CS425xx---CS42516 or CS42526 in my case---is an easier and lower cost solution than routing MCLK around. However, I happen to want to fool around with DAC antialias filtering in ways which CS425xx parts do not exactly support. Do I want to do that tinkering enough to incur the additional complexity? Not sure yet. An LPC4300 talking with a CS42516 would be a pretty nice little system.

Quote:
Originally Posted by abraxalito View Post
I've been playng with AD605 for this function - whilst it doesn't have ultra-low THD it sounds fine to my ears.
Even pretty good drivers distort more than the AD605's -65dB. I generally try for more like a total of -80dB max through all the electronics so that playback fidelity's limited only on the drivers. But that's more because it's easy to do than because it's required. A typical -50 or -55dB driver is likely to thoroughly mask the AD605's spectra.

Last edited by twest820; 5th February 2012 at 11:39 PM.
  Reply With Quote
Old 6th February 2012, 07:10 AM   #129
diyAudio Member
 
steph_tsf's Avatar
 
Join Date: Mar 2008
Indeed the CS42516 or CS42526 are 64-pin Codecs, currently Mouser has them in stock for 5.19 eur, and they feature differential audio ports. They need external audio opamps.

The Wolfson WM8580 or WM8581 are 48-pin Codecs, currently the Mouser stock is zero, price is 5.91 eur, and they only feature single-ended audio ports. They don't need external audio opamps if the power amplifier is nearby.

Attach a 12.288 quartz (or oscillator), and the job is done. The Codecs will use the 12.288 quartz clock when the input is the ADC, and the Codecs will lock on and regenerate the SPDIF clock when the input is SPDIF.

What would be the cost for a credit-card sized board hosting the CS42526 and all audio opamps, featuring four "user" connectors :
- analog audio inputs and outputs (single-ended)
- SPDIF inputs (with power for provision for Optical receivers)
- C interface (5V power supply, I2S lanes, SPI or I2C control bus)
- ASRC daughterboard connector
  Reply With Quote
Old 6th February 2012, 10:55 AM   #130
diyAudio Member
 
s3tup's Avatar
 
Join Date: Dec 2004
Location: Israel
WM858X are LQFPs. not that diy-frienly. Diyers tend to like soic/ssop things with less pins per device... Is there any codecs with ssop/soic package? These uC are at least LQFPs too, not to mention BGAs et cetera.

Here is my estimate costs per single DAC board, 2 channels:
PCM1794 - $46
PCM1798 - $29
WM8740 - $26
PCM1798 cheapified - $22
WM8804/5 - $9.5

Cheapified PCM1798 looks competitive, with NE5532 opamps per datasheet scheme. And it is full-blown DS DAC, with external I/V stage with all it's benefits.
But with additional several $$ you get propertly designed PCM1798 with THS differential opamp and NE5534 summing circuit.
  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
Volume / Source selector - open source project ? AuroraB Analog Line Level 22 22nd September 2012 02:21 PM
Violet DSP Evolution - an Open Baffle Project cuibono Multi-Way 211 18th May 2010 02:26 AM
Open call for suggestions on Open Source DIY Audio Design gfergy Everything Else 1 15th April 2007 07:33 AM
Open Source, Open Architecture! zenmasterbrian Digital Source 185 23rd February 2007 10:35 PM


New To Site? Need Help?

All times are GMT. The time now is 01:12 PM.


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