Linux-Based Low-Latency Multichannel Audio System - diyAudio
Go Back   Home > Forums > Source & Line > PC Based
Home Forums Rules Articles diyAudio Store Gallery Wiki Blogs Register Donations FAQ Calendar Search Today's Posts Mark Forums Read

PC Based Computer music servers, crossovers, and equalization

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 11th February 2016, 04:53 PM   #1
henrix is offline henrix  Germany
diyAudio Member
 
Join Date: Feb 2016
Location: Kiel
Default Linux-Based Low-Latency Multichannel Audio System

Hi there,

Together with my professor, I've developed a multichannel audio system based on the AD1938 audio codec by Analog Devices and the BeagleBone Green (TI AM335X SoC).
The audio system offers 2 stereo inputs and 4 stereo outputs.
The whole project is based on open source software.
To demonstrate the possibilities of the audio system, I've created a surround delay effect with the open source C++ library DSPatch by Marcus Tomlinson.
Moreover I've created an automatic test based on GNU octave to evaluate the audio system characteristis, such as latency, THD+N, DNR, crosstalk and frequency-response.
Click the image to open in full size.
The full article is published here.
Everybody who's interested and has some questions or feedback, feel free to contact me.
  Reply With Quote
Old 11th February 2016, 06:18 PM   #2
diyAudio Member
 
Join Date: Mar 2007
Location: California
Quote:
Originally Posted by henrix View Post
Hi there,

Together with my professor, I've developed a multichannel audio system based on the AD1938 audio codec by Analog Devices and the BeagleBone Green (TI AM335X SoC).
The audio system offers 2 stereo inputs and 4 stereo outputs.
The whole project is based on open source software.
To demonstrate the possibilities of the audio system, I've created a surround delay effect with the open source C++ library DSPatch by Marcus Tomlinson.
Moreover I've created an automatic test based on GNU octave to evaluate the audio system characteristis, such as latency, THD+N, DNR, crosstalk and frequency-response.
Click the image to open in full size.
The full article is published here.
Everybody who's interested and has some questions or feedback, feel free to contact me.
This is interesting. Thanks for posting about it.

I did not see any information about the "low latency" that you claim. When you say "low" what is that?

What are the capabilities of the crossover? Is it IIR, FIR, or can both types be used at the same time? Can you please describe the maximum capabilities for each type (IIR, FIR)?

Thanks, I am looking forward to your responses.

-Charlie
__________________
Visit my Audio Web Page <<--CLICK TO LEARN MORE-->> Get my LADSPA plugins
  Reply With Quote
Old 11th February 2016, 06:31 PM   #3
diyAudio Member
 
Join Date: Jan 2013
Location: Oregon City, Oregon
We're also interested in which "open source" software you used. Many of us are exploring the use of single-board systems in our audio systems to be used as servers, crossovers, etc. I'm experimenting with an OrangePi Plus, so far successfully, also using all open source software (MPD, Ecasound, Sox)
  Reply With Quote
Old 11th February 2016, 10:13 PM   #4
ctag is offline ctag  Germany
diyAudio Member
 
Join Date: Feb 2016
Location: Kiel
The idea of the project is to create an open source audio platform offering a multi-channel driver platform and corresponding hardware. It provides the audio drivers for the Beagle Bone and the design of the codec schematic/PCB (done with KiCad and to be released shortly). The demo app we created uses DSPatch to illustrate some capabilities. It allows one to focus on the DSP code design (if developer) or just to use it as a multi-channel application e.g. as a home-cinema CODEC (simply user).

One could implement own FIR/IIR filters e.g. for a audio crossover application. The processing power of a Beagle Bone is somewhat limited, however, the RAM is certainly big enough to store large FIR impulse responses. We think of re-adapting the drivers for other platforms, e.g. the Beagle Bone X15 once released or any other multi-core board which has a reasonably sized community and TDM audio hardware support in the SoC. Any suggestions are highly appreciated towards that extent. Another interesting application would be phase correction for multiple audio speakers (we have not taken a stab at that).

If we talk about low latency, we refer to round trip time when feeding analog in and immediately returning it to the output at the smallest buffer size possible. Of course that time would vary by adapting buffer sizes needed by whatever filters / audio apps one would create with this. For us the application as a "real-time" multi-channel audio efx box was interesting or a synth app, which has low enough latency to be played by a musician. 10ms are probably good enough for that. Attached a graph of the roundtrip experiment with the smallest possible buffer size of 34 frames at <4ms, we were able to achieve.
Attached Images
File Type: png rtt-AD1938-68-frames-latency.png (21.4 KB, 281 views)
  Reply With Quote
Old 12th February 2016, 12:42 AM   #5
diyAudio Member
 
Join Date: Mar 2007
Location: California
I took a look at the AD1938 datasheet and was wondering why this particular codec was chosen for your project. I immediately see two somewhat common shortcomings in the DAC specifications - the maximum output voltage from the DACs is rather low, and the THD and noise floor is not all that impressive:

Full-Scale Output Voltage: 0.8775 (2.482) V rms (V p-p)

Total Harmonic Distortion + Noise @ 0 dBFS:
Single-Ended Version: Two channels running −92 dB typical
Single-Ended Version: Eight channels running −86 dB typical, −70 max

These two specifications are important for DSP system that will implement a loudspeaker crossover system. If high sensitivity drivers are used, e.g. a horn tweeter with a compression driver, the noise floor will likely be noticeable and obtrusive. Also, the max output voltage is low enough that it may not be able to drive some consumer amplifiers to full power and/or offers little "headroom" for peaks. Since music is dynamic in nature and peaks can be 10dB or more above the average level, this is a very significant problem that seems to be very common among consumer DACs. There are only a couple that have a more liberal 2Vrms output capability.

If the noise level was much lower, you (or the user) could add a gain stage to each channel but this will also boost the noise signal by the gain factor, and may contribute its own noise signal. I found this was a problem, for instance with the ADAU1701, which is a popular DSP chip that is found in some DIY friendly crossover platforms.

Do you have solutions for the above problems?

I think your concept is nice, and it makes a nice project for a upper-level student. If you choose a different DSP processor with improved specifications it would really be something fantastic.
__________________
Visit my Audio Web Page <<--CLICK TO LEARN MORE-->> Get my LADSPA plugins
  Reply With Quote
Old 12th February 2016, 08:02 AM   #6
ctag is offline ctag  Germany
diyAudio Member
 
Join Date: Feb 2016
Location: Kiel
I fully admit that the codec is not to be considered high end HIFI. We had a look at other ones, but didn't find any reasonable priced multi-channel alternative at the cost point of approx $10. Our decision points were:
  • Multichannel codec, reasonably priced, reasonable performance
  • Ideally Linux driver base available, to shorten development cycle, we had only 3 months for everything, including learning curve
  • Audio quality good enough to fit "live" musician demands + hobby studio, not highest demand HIFI
  • Compromise of overall cost vs. audio quality
  • One codec, instead of separate ADCs DACs due to cost plus simplicity of driver development
  • Battery voltage supply, unipolar analog design, overall input voltage <=5V (probably compromising head-room)
In retrospect we have learned a lot through this project and certainly may do some things differently We had a look at several Cirrus Codecs which seemed promising but then no basic driver support, or BGA package (hard to solder as a DIYer) etc. For high end HIFI one would probably anyways choose separate ADC/DAC e.g. like in the reference design of XMOS here xCORE-200 Multichannel Audio Platform. Interestingly, they use relatively cheap OpAmps, and in fact our design strangely performed best also with rather cheap OpAmps (we are still puzzled why).

Again, we did not have an audio crossover application in our minds in the first place, real-time musician efx / synth was more our focus.

The cost of the PCB + components in the minimal power supply configuration is around 65, when buying individual components e.g. at Mouser.

Appreciate your comments
Robert
  Reply With Quote
Old 12th February 2016, 09:28 AM   #7
phofman is offline phofman  Czech Republic
diyAudio Member
 
Join Date: Apr 2005
Location: Pilsen
Quote:
Originally Posted by ctag View Post
Interestingly, they use relatively cheap OpAmps, and in fact our design strangely performed best also with rather cheap OpAmps (we are still puzzled why).
Perhaps price is not the right criterium of performance :-)

I very appreciate your endeavour, IMO pretty advanced for bachelor thesis. I am looking forward to the open source materials should you decide to release them.
  Reply With Quote
Old 13th February 2016, 09:02 PM   #8
ctag is offline ctag  Germany
diyAudio Member
 
Join Date: Feb 2016
Location: Kiel
We have now published the PCB + schematics at https://github.com/ctag-fh-kiel/ctag-face-2-4
  Reply With Quote
Old 8th September 2016, 07:13 PM   #9
diyAudio Member
 
Join Date: Sep 2016
Hi ctag,

I'm leading the development of a sound therapy system and found your AD1938 based design very interesting.

WE basically need 10 DAC channels but 8 will be sufficient at this stage and it seems like your design may very much be our solution.

The plan is to run two channels streaming audio at high bit-rate either from a webserver, Bluetooth or from internal storage and the other 6 channels can run on lower bit rate (44.1kHz or evan lower). For those 6 channels we're planning to use SuperCollider implementing 6 different (simple) synthesizers that has to be well synchronized (latency is not an issue as long as they both have the same).

The control of both will be done either through the network or through

I have few questions and I'll appreciate your insights.

1. Do you think that the BeagleBone Black have enough power to run those streams?
2. Do you have instructions on how to implement your solution on BeagleBone-X15?
3. What's the best way to install SuperCollider on the BBB with all of its dependencies?
4. Since price is less of an issue at this point, can you point me to other multi-channel solutions that may be supported by BeagleBone (through USB, I guess)?

Thank you for your help.
  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
low latency for embedded processing neebster Digital Line Level 6 6th December 2016 09:17 AM
Setting up a PC-based multichannel DSP system ra7 PC Based 137 12th June 2016 06:26 PM
My Home and Remote Linux Based System Mando Rob PC Based 6 12th June 2015 12:51 AM
PC based audio system questions joonze PC Based 7 2nd May 2012 09:48 PM
Low latency room correction + xover in mini-itx fb Digital Source 8 22nd May 2008 10:50 AM


New To Site? Need Help?

All times are GMT. The time now is 06:33 PM.


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

Content Relevant URLs by vBSEO 3.3.2
Wiki