DACBerry 400 Soundcard

  • Hello LibreELEC Team,

    I hope I didn't overlook topics according the DACBerry 400 and even posted at the right place. English isn't my native language so please forgive any mistake.

    I have a Raspberry Pi 400 with 4GB RAM. I bought it last November and without thinking twice i bought the DACBerry 400 with it. There is no support at all and even the praised support for LibreELEC, OSMC, RaspiOS etc is meh. Meanwhile they added the source code of their driver on github. Look here

    Can you please add driver support for this sound card? I am not able to compile it myself. I made it once in February with the Kernel source from Raspi OS. I was able to add the TI codec via menuconfig and so on. I think it was for kernel 5.10.103-v8+. My setting was a RaspiOS Bullseye lite version with Kodi GBM build. The build that came with Bullseye. My kernel is aarch64 and userland arm.

    I have no clue how to add modules for LibreELEC. I cloned the 10.0.2 source from github, but no menuconfig in the make file. No clue how to patch the kernel, even if I read tons of articles. I don't even know how to get kernel 5.10.95... i tried branch rpi-5.10.y. Then I tried to download this package cause i read it here.

    I'm not sure which sources to use. I'm a total noob to Linux and Github. I have some basic knowledge of programming from the early 2000s :) perhaps, it's not enough.

  • Just contact the manufacturer and ask them to PR the driver in the official RPi kernel source https://github.com/raspberrypi/linux then we can enable it when it's been added.

    We won't be adding any out-of-tree drivers as they've been causing a lot of pain in the past (they need constant maintenance and tend to break on every other kernel update - and we do lots of them on a regular basis).

    so long,

    Hias

  • The manufacturer said that he is in contact with the ppl of the official RPi kernel source. I have no clue if hes even trying or lying. He said so much the last half year.

    The codec seems to be in the device tree...

    Device Drivers

    • Sound card support (SOUND [=y])
      • Advanced Linux Sound Architecture (SND[=m])
        • ALSA for SoC audio support (SND_SOC [=m])
          • CODEC drivers
            • Texas Instruments TLV320AIC3x CODECs

    If I load the sources from Github using git checkout 10.0.2 I am able to make menuconfig after compiling the kernel (which worked after several tries and tweaking). But there is always something missing, so that linux-b0272c695e99a8dcc3a01298db56361333f1fdcf/sound/soc/codecs/snd-soc-tlv320aic3x.ko will not appear.

    Is it possible to activate the codec by default? Then I might be able to compile the driver. Or am I doing something wrong?

  • Biosy.Baris - you will want to edit the linux.arm.conf file:

    and change the commented line CONFIG_SND_SOC_TLV320AIC3X_I2C to CONFIG_SND_SOC_TLV320AIC3X_I2C=m

    you can check this in the right module by doing a diff between the .config in http://build.yyy/build/linux-yyy/ and the file below.

    Code
    $ git grep TLV320
    projects/RPi/devices/RPi/linux/linux.arm.conf:CONFIG_SND_SOC_TLV320AIC32X4=m
    projects/RPi/devices/RPi/linux/linux.arm.conf:CONFIG_SND_SOC_TLV320AIC32X4_I2C=m
    projects/RPi/devices/RPi/linux/linux.arm.conf:# CONFIG_SND_SOC_TLV320AIC32X4_SPI is not set
    projects/RPi/devices/RPi/linux/linux.arm.conf:# CONFIG_SND_SOC_TLV320AIC3X_I2C is not set
    projects/RPi/devices/RPi/linux/linux.arm.conf:# CONFIG_SND_SOC_TLV320AIC3X_SPI is not set
    projects/RPi/devices/RPi/linux/linux.arm.conf:# CONFIG_SND_SOC_TLV320ADCX140 is not set
  • It's a bit more involved:

    in LE10 you need to change CONFIG_SND_SOC_TLV320AIC3X in projects/RPi/devices/RPi4/linux/linux.aarch64.conf to 'm', in LE10 you need to set CONFIG_SND_SOC_TLV320AIC3X_I2C to m

    But the soundcard also needs a soundcard driver (dacberry400.ko) in addition to the device tree overlay.

    The source code for the driver is in the src directory, but as the provided Makefile is a bit of a mess you'd need to adapt it before you can add a separate driver package for it to LE and include it in the LE build (see packages/linux-drivers/ for various out-of-tree driver packages).

    Certainly doable, but a bit of a PITA.

    As you payed good money to the manufacturer I'd prod him a bit more to get the sound card driver included in the official RPi kernel - or try to get a refund and buy a card with better support.

    so long,

    Hias

  • Hi,

    more or less good news. The manufacturer said: dacberry400 driver available in raspberry pi OS from kernel version 5.10.61. You need to run only dacberry400 script to enable it.

    GitHub - osaelectronics/DACBerry-400
    Contribute to osaelectronics/DACBerry-400 development by creating an account on GitHub.
    github.com

    I'm kind of a noob when it comes to linux and raspi, but i was able to upgrade RasPiOS lite and the sound driver still working.

    Is that enough to integrate the driver to LibreELEC? If yes, please add. Thanks in advance