Thank you for your donation!


Cloudsmith graciously provides open-source package management and distribution for our project.


Trying to get a new DAC and RPi 2B working using I2S
#1
I have been running Moode for a few years now on a RPi 2B with a TDA1387 (single chip) HAT DAC, using the Generic I2S Moode driver.

I purchased a new DAC Kit that also uses I2S input, but simply cannot get it to work properly. Using the same Generic I2S driver the new DAC outputs extremely loud static noise overpowering the music which can only be heard softly in the background. The DAC is connected to the RPi pins as follows:
BCLK to GPIO Pin 12
DATA to GPIO Pin 40
LRCLK to GPIO Pin 35
GND to GPIO Pin 9

The DAC input format requirements are - 32bit I2S (3 signal wire) with LRCLK at 64*44.1kHz and BCLK = 2.82MHz. I also tried the ProtoDAC TDA1387 X8 driver, but still the same problem.

Any suggestions on how to get my new DAC working or which drivers / Moode settings to use? Or is the RPi 2B too old and outdated?
Reply
#2
What make and model is the DAC and is it connected to the Pi via the standard 40-pin header?
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#3
Not a known commercial DAC, but more info here:
https://www.diyaudio.com/community/threa...ts.400326/

Connected to the RPi with 4 ribbon cables.
Reply
#4
(02-06-2024, 12:09 PM)Tillerman Wrote: Not a known commercial DAC, but more info here:
https://www.diyaudio.com/community/threa...ts.400326/

Connected to the RPi with 4 ribbon cables.

I'd suggest posting in the diyAudio thread and ask:

1. What I2S driver should be used
2. Verify that the connections are correct

In Moode Audio Config screen leave ALSA output mode set to "Default". This will ensure that bit depth will be automatically zero-padded by ALSA to 32 if in fact the DAC only accepts 32-bit.
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#5
Thanks Tim.

Could you perhaps explain which RPi settings or output parameters are set by the Moode drivers? That could help me match existing Moode drivers to the specs of my new DAC maybe.
Reply
#6
The I2S drivers are part of the Linux kernel and not really a moOde managed component.

The two basic driver types are Passive/Slave mode and Master mode.

Passive/Slave mode drivers accept the incoming I2S data from the Pi and pass it on the audio device as-is. Master mode drivers request I2S data from the Pi as directed by the audio device itself and then re-clock it using the audio devices on-board clock module.

In Moode Audio Config the Passive/Slave mode drivers are explicitly named:
Generic-1 I2S (hifiberry-dac)
Generic-2 I2S (i2s-dac)

But other named I2S devices also use these passive mode drivers for example "Hifiberry DAC", "Mamboberry DAC" etc. Master mode drivers are typically made by the audio device manufacturer for example the drivers for Allo Boss, Audiophonics ES9028/38 DAC, HifiBerry DAC+ and DAC+ Pro etc.

The maker or users of the Abbado II DAC should be able to tell you which Raspberry Pi 2S driver they are using.
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#7
Ah, thanks. Makes more sense now.

But if passive/slave mode drivers simply pass the incoming I2S data to the audio device as-is, why are there different drivers then? What is the difference between the Generic-1 I2S and the Generic-2 I2S drivers?
Reply
#8
Technically the files are not the actual device driver but whats called a device tree overlay (dtoverlay) file. It's basically a setup file thats used to specify to the Linux kernel the audio CODEC, supported sample rates, whether I2C comms is used, clock switching, etc.

Generic 1 loads the device tree overlay named hifiberry-dac which specifies audio CODEC pcm5102a
https://github.com/raspberrypi/linux/blo...verlay.dts

Generic 2 loads the device tree overlay named i2s-dac which specifies audio CODEC pcm1794a
https://github.com/raspberrypi/linux/blo...verlay.dts

Kernel overlay readme
https://github.com/raspberrypi/linux/blo...ays/README

You can search the Raspberry Pi Linux sources for the audio CODEC sources and other related files.
https://github.com/raspberrypi/linux/

*** In any case the maker of the DAC should be able to tell you specifically what Linux I2S overlay should be used.
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#9
Thank you very much Tim! This is most helpful.
Reply


Forum Jump: