Go Back   Home > Forums > >
Home Forums Rules Articles diyAudio Store Blogs Gallery Wiki Register Donations FAQ Calendar Search Today's Posts Mark Forums Read

Digital Line Level DACs, Digital Crossovers, Equalizers, etc.

ADAU1701 Raspberry I2S Driver
ADAU1701 Raspberry I2S Driver
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 25th May 2018, 03:49 PM   #1
MKSounds is offline MKSounds  Germany
diyAudio Member
 
Join Date: May 2017
Exclamation ADAU1701 Raspberry I2S Driver

Hi,

in my current project I'm using an ADAU1701 DSP board from Sure Electronics (~20$) in combination with the digital IS audio output of a Raspberry Pi 2b.
I searched if there is any existing driver which fits the special requirements, but didn't find something.
Therefore I modified some existing device tree overlays and changed them to match the special conditions of the ADAU1701.

The ADAU must run as clock slave at it's IS inputs, which wouldn't be an issue, if the Raspberry could produce the MCLK for the ADAU as well. In fact that's not possible, the Raspberry runs as clock slave. The ADAU is configured as clock master and its output bitclock and LR-clock is feed back to the input of the serial interface. As well, the clock outputs of the dsp source the clock pins of the raspberry.

I wrote a brief installation guide on my homepage: Installation Guide ADAU1701 Driver.
The files are available on Github: ADAU1701 I2S Driver Github Repo.

The installation is quite simple. No compiling is necessary.

The driver works good in combination with Raspbian. The resampling of audio material which isn't sampled at 48 kHz can be done with a short ALSA config file (due to oscillator used on the dsp - 12.288 MHz). The resampling is absolutely necessary, because the whole dsp program is compiled with a fixed sample rate and moreover the adau1701 doesn't have an ASRC. That's why a change of the sample rate during operation is not possible (like DACs configured as clock slaves or with GPIO pin to change the necessary oscillator would be able to e.g. the whole HifiBerry devices)!

I also documented the integration in the current Volumio version (2.389). The installation is nearly as easy as in Raspbian.
What makes Volumio interesting, is the opportunity to use AirPlay to stream audio content to the Pi. In combination with the possible mobile hotspot of Volumio, Airplay could be a much better mobile streaming solution as bluetooth is right now.

That's where the problem begins. The current version of Airplay (vers. 1) transmits the audio at 44,1 kHz/16 bit.
In consequence, audio must be resampled to use it with the dsp. But the Shairport-sync module is sending the audio data directly to the hardware to ensure the time stamp which is necessary for multi-room applications (as I understood so far).

I'm currently working on that issue, but my knowledge of audio linking on lower software levels is not that good. It would be nice if someone with more expertise could help.
Also people who test and give feedback would be great.

PS: I attached two pictures.
- The testing setup: Raspi 2b, Sure ADAU1701 DSP and programmer board (USBi like)
- A working screenshot of the Sigma Studio test project

Best regards,
Markus.
Attached Images
File Type: jpg IMG_3137.jpg (647.8 KB, 249 views)
File Type: png testsetup.PNG (57.0 KB, 240 views)
  Reply With Quote
Old 30th May 2018, 10:01 PM   #2
ojg is offline ojg
diyAudio Member
 
Join Date: May 2003
Location: Norway
ADAU1701 Raspberry I2S Driver
This is great!

And I think this driver is not just for ADAU1701 but would work with any other SigmaDSP or standard I2S DAC for that matter?
  Reply With Quote
Old 4th June 2018, 01:06 PM   #3
MKSounds is offline MKSounds  Germany
diyAudio Member
 
Join Date: May 2017
Quote:
Originally Posted by ojg View Post
And I think this driver is not just for ADAU1701 but would work with any other SigmaDSP or standard I2S DAC for that matter?
The configuration should also work for other SigmaDSPs (e.g. ADAU145x), which run as clock master on the I2S bus.
Mostly a DAC works as a clock slave, so this driver won't work for that case.
  Reply With Quote
Old 14th June 2018, 10:32 PM   #4
jmansion is offline jmansion  United Kingdom
diyAudio Member
 
Join Date: Mar 2006
Location: Sandy, Bedfordshire
Quote:
Originally Posted by MKSounds View Post
The ADAU must run as clock slave at it's IS inputs, which wouldn't be an issue, if the Raspberry could produce the MCLK for the ADAU as well. In fact that's not possible, the Raspberry runs as clock slave.
I find this interesting. If one used (say) a decent XMOS USB interface instead and took MCLK from that, one could presumably run at 96kHz with the ADAU as
slave and then run some (slave) I2S DACs off the same MCLK and the jitter is then confined to the MCLK generator - is that right?

Which reduces the problem to:
- find a great stereo (USB?) to I2S with low jitter MCLK
- slave DACs
- software resampling to a fixed frequency that matches the program loaded to ADAU

It seems flexible since much of the problem is moved to software domain, and the transport is digital to output and just one clock to get right?

Is that oversimplifying?
  Reply With Quote
Old 17th June 2018, 01:55 PM   #5
MKSounds is offline MKSounds  Germany
diyAudio Member
 
Join Date: May 2017
Quote:
Originally Posted by jmansion View Post
I find this interesting. If one used (say) a decent XMOS USB interface instead and took MCLK from that, one could presumably run at 96kHz with the ADAU as
slave and then run some (slave) I2S DACs off the same MCLK and the jitter is then confined to the MCLK generator - is that right?
That's correct. It's just a standard IS transmission.
You could also use the onboard DACs of the ADAU1701.

Quote:
Originally Posted by jmansion View Post
It seems flexible since much of the problem is moved to software domain, and the transport is digital to output and just one clock to get right?
That's right, but doesn't have something to do with this topic
This thread is about the connection of the Raspberry to the ADAU1701.
For I2S communication issues of the ADAU1701 take a look at it's datasheet.
  Reply With Quote

Reply


ADAU1701 Raspberry I2S DriverHide 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

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
New? Sure Electronics ADAU1701 Module easp Digital Line Level 159 9th October 2018 11:38 AM
Arduino-based ADAU1701 Neil Davis Digital Line Level 19 8th October 2018 09:23 PM
ADAU1701 DSP with RaspberryPi, how to I2S? JoeCraig PC Based 1 2nd August 2018 02:42 PM
ADAU1701 DIY articles at Audiodevelopers Neil Davis Digital Line Level 4 28th November 2017 02:41 PM
ADAU1701 & Sigmastudio Red_arrow Digital Line Level 4 20th July 2009 05:34 PM


New To Site? Need Help?

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


Search Engine Optimisation provided by DragonByte SEO (Pro) - vBulletin Mods & Addons Copyright © 2018 DragonByte Technologies Ltd.
Resources saved on this page: MySQL 14.29%
vBulletin Optimisation provided by vB Optimise (Pro) - vBulletin Mods & Addons Copyright © 2018 DragonByte Technologies Ltd.
Copyright ©1999-2018 diyAudio
Wiki