SOLVED - No Sound from I2S PCM5102 DAC

Creating a bug report/issue

Required Information

  • DietPi version
    G_DIETPI_VERSION_CORE=8
    G_DIETPI_VERSION_SUB=20
    G_DIETPI_VERSION_RC=1
    G_GITBRANCH=‘master’
    G_GITOWNER=‘MichaIng’
    G_LIVE_PATCH_STATUS[0]=‘not applied’

  • Distro version
    bookworm 0

  • Kernel version
    Linux DietPi 6.1.21-v8+ #1642 SMP PREEMPT Mon Apr 3 17:24:16 BST 2023 aarch64 GNU/Linux

  • Architecture
    arm64

  • SBC model
    RPi Zero 2 W (aarch64)

  • Power supply used
    5V 1A Official raspbery Pi Charger

  • SD card used | (EG: SanDisk ultra)

Additional Information (if applicable)

  • Software title
    I2S DAC based on PCM5102A

  • Was the software title installed freshly or updated/migrated?
    Recenyly Installed

  • Can this issue be replicated on a fresh installation of DietPi?

← If you sent a “dietpi-bugreport”, please paste the ID here →

  • Bug report ID | echo $G_HW_UUID

Steps to reproduce

  1. I have Connected a PCM5102 DAC to RPI 2 Zero as per How to connect a PCM5102 I2S DAC to your Raspberry Pi – Himbeer's Blog

  2. In dietpi-config - Audio Options - I have chosen HiFiBerry DAC . Also enabled Software Coversion Options

  3. aplay -l provides below output:
    **** List of PLAYBACK Hardware Devices ****
    card 0: sndrpihifiberry [snd_rpi_hifiberry_dac], device 0: HifiBerry DAC HiFi pcm5102a-hifi-0 [HifiBerry DAC HiFi pcm5102a-hifi-0]
    Subdevices: 1/1
    Subdevice #0: subdevice #0

  4. alsamixer shows “This sound device does not have any controls”. I assume this is beacuse by default there is no softvolume for I2S DACs.

  5. cat /etc/asound.conf has below output:
    pcm.!default {
    type plug
    slave.pcm {
    type hw
    card 0
    device 0
    }
    }

ctl.!default {
type hw
card 0
}

I could also see dtoverlay=hifiberry-dac in /boot/config.txt

Tried speaker Test,
Tried aplay /usr/share/sounds/alsa/Front_Center.wav

No Sound Output
The DAC is connected to a 2.1 active computer speaker

I have tried a USB Dac on the same diet pi device and it worked but i2s DAC doesnt work. Tried with 3 different PCM5102 DAC’s ( i got these off aliexpress)

Expected behaviour

Sound / Audio output when playing Music

Actual behaviour

No Sound / Audio Output at all

Extra details

Its been a little frustating as i was not aware whats wrong ! I have tried 3 DACs and same issue. Definitely think Something wrong with default sound settings in Diet PI OS, because the USB DAC is working when connected to Diet PI running on RPI 2Zero ! Just no sound from i2s dac based on PCM5102.

This is the DAC i am using:

I though DAC might be faulty and bought 3 DACs as above. No Sound Output whichever DAC i connect ! All are PCM5102 DACs and I have selected HifiBerry DAC in Audio options and even enabled Software Conversions. Still No Sound.

Would be obiliged if someone could please help !

usually @MichaIng could assist with sound issues.

1 Like

@MichaIng could you please help me with this issue

Does this work on official RPi OS when using the same overlay? The jumpers are set correctly? audio - How to make PCM5102 DAC work on Raspberry Pi ZeroW? - Raspberry Pi Stack Exchange

Apart of that, when checking some guides, it should be all correct. I remember one case where a DAC overlay was broken with the Linux 6.1 update. I hope it is not the case here. But if so, it might have been fixed in the meantime and you “just” need to migrate to the new Bookworm firmware packages. This however is not trivial: I’ll test this myself the next week and can hopefully provide a script then.

1 Like

Thank you @MichaIng ! I will test this on Raspberry pi OS and let you know ! I also suspect this may be a problem with pin headers as I haven’t soldered them but l rather using a breadboard ! I will try again today and report back the findings.

1 Like

@MichaIng

It worked on my raspberry pi zero 2W connected to a cheap pcm5102a dac ! All I had to do was to solder the male headers on to the dac and connect to Pi ! Previously the headers were pushed on to the dac with help of breadboard ! Though dac was getting power it was unable to play music ! Lesson learned solder the headers for a strong :muscle: connection always ! Just had to wait for my new soldering station to arrive and it did a wonderful job of soldering perfectly ‘

I was wondering to make my DietPi system as a Bluetooth Music Receiver ! Should I prefer BlueAlsa (for low weight system resources) or can I use a pule audio with all its awesome modules ? Just concerned pulse audio might be heavy as RPI Zero 2W has only 512 MB RAM .

2 Likes

Perfect. Generally BlueAlsa should work fine. We have an old feature request to add this to the dietpi-config audio options, but I have no Bluetooth audio device and lack of time to implement it: DietPi-Config | Add native Bluetooth audio (bluealsa) support · Issue #3456 · MichaIng/DietPi · GitHub

You can use PulseAudio, but just note that dietpi-config audio options configure ALSA exclusively and also dietpi-software audio players are configured to use ALSA devices directly, though often the “default” device, which is AFAIK hooked by PulseAudio. If it was an RPi Zero (1), system resources might be an argument, but I think the RPi Zero 2 W won’t have significant issues with it.

1 Like