Compute Module 4 and PCM5122 (Innomaker DAC)

I have a problem, I can’t get it to work.
Compute Module 4 and PCM5122 (Innomaker DAC)

in config.txt
dtoverlay=allo-boss-dac-pcm512x-audio
I’m getting an error.

“Failed to open “alsa”(alsa); Failed to open ALSA device “volumio”: No such device”

What’s next?

Hey @SanKen,

I would begin with providing details:

Exact VolumioOS version you installed.

Login to your system with ssh and then

uname -a

cat /proc/cpuinfo | grep "Model" && cat /proc/cpuinfo | grep "Revision"

Post link from your debug log:

Answers depends on your responses.

Kind Regards,

Sorry for the lack of core information.

Mainboard CM4-IO-BASE-A
Volumio 3.785 from eMMC
Linux volumio 6.6.62-v7l+ #1816 SMP Mon Nov 18 15:33:33 GMT 2024 armv7l GNU/Linux
Model : Raspberry Pi Compute Module 4 Rev 1.1
Revision : b03141

http://logs.volumio.org/volumio/NKFaUis.html

Please help. Thank you.

it looks like the DAC is not initialized properly

Dec 19 12:52:50 volumio kernel: snd-allo-boss-dac soc:sound: snd_soc_register_card() failed: -517
Dec 19 12:52:50 volumio kernel: snd-allo-boss-dac soc:sound: snd_soc_register_card() failed: -517

Hey @SanKen,

Let’s take a closer look.

Disable all plugins partaking in the audio output like multiroom, play here, etc. We need direct DAC to Alsa relation.

  • Setup your VolumiOS to use different audio output like HDMI.
  • Verify with ssh session that the dtoveraly in /boot/config.txt has been removed or commented out. If not, delete line with dtoverlay=allo-boss-dac-pcm512x-audio.
  • Shutdown your Volumio, remove power for at least 10s.
  • Power up and login with ssh session and do the following:

sudo dtoverlay -v -D allo-boss-dac-pcm512x-audio

Above will produce only dry-run.dtbo file in dry-run. Compress the dry-run.dtbo file with zip and attach it to your reply.

sudo dtoverlay -v allo-boss-dac-pcm512x-audio

Above will attempt to register DAC. We need system messages, hence:

dmesg > dmesg.txt

Compress the dmesg.txt file with zip and attach it to your reply.

Kind Regards,

dry_run.zip (711 Bytes)
dmesg.zip (9.4 KB)

It looks like there are some different GPIO pins in the CM4 settings and the RP4 itself
when connecting another ES9038 dac i-sabre works normally.
Only this innomaker works normally on Rp4

Hey @SanKen,

This is quite important to confirm:

SBC DAC/HAT Carier Overlay Status
Raspberry Pi4B Innomaker Rasp Pi Hifi DAC Hat Pcm5122 Audio - allo-boss-dac-pcm512x-audio OK
Compute Module 4 Innomaker Rasp Pi Hifi DAC Hat Pcm5122 Audio CM4-IO-BASE-A allo-boss-dac-pcm512x-audio FAIL

In what combination and what ES9038 dac i-sabre exactly works?

Kind Regards,

Like this

Hey @SanKen,

This is what I though:

  • The i-sabre-q2m-overlay is not referencing brcm,pins, only relies on i2s-controller.
  • The allo-boss-dac-pcm512x-audio-overlay relies on i2s-controller and also uses mute-gpios gpio 6 initial pull-up.

This is important, that you confirm status from my previous post, that the combination is in fact captured properly. Should this be the case, then a custom overlay for CM4 will be required whereas DAC kernel module works as designed.

Kind Regards,

So the problem is with CM4 or the mainboard?
Is there a chance of solving this?

Hey @SanKen,

The CM4 will very likely require alternative gpio mode when matted with CM4-IO-BASE-A base board. And yes, it can be “fixed” with a custom overlay.

Please prepare your VolumioOS on CM4 and configure as you normally would for Innomaker Rasp Pi Hifi DAC Hat Pcm5122 Audio.

Download and unzip attached overlay.
Copy or upload to /boot/overlays location
Check that the overlay is in /boot/overlays/allo-boss-dac-pcm512x-audio-cm4.dtbo

Edit /boot/config.txt and reference the new overlay:
change

dtoverlay=allo-boss-dac-pcm512x-audio

to

dtoverlay=allo-boss-dac-pcm512x-audio-cm4

Power down for 10s and boot normally. Test DAC functions. Report back for further instructions.

allo-boss-dac-pcm512x-audio-cm4.zip (846 Bytes)

Kind Regards,

Nothing has changed, still the same error.
dmesg.zip (9.2 KB)

Hey @SanKen,

I didn’t expect this to work first time.

Please post content of:

/boot/config.txt
/boot/userconfig.txt

Result of:
sudo i2cdetect -y 1

Kind Regards,

### DO NOT EDIT THIS FILE ###
### APPLY CUSTOM PARAMETERS TO userconfig.txt ###
initramfs volumio.initrd
gpu_mem=128
gpu_mem_256=32
gpu_mem_512=32
gpu_mem_1024=128
max_usb_current=1
[pi5]
usb_max_current_enable=1
[all]
include volumioconfig.txt
include userconfig.txt

#### Volumio i2s setting below: do not alter ####
dtoverlay=allo-boss-dac-pcm512x-audio-cm4

userconfig.txt is empty (default)

i2cdetect

volumio@volumio:~$ sudo i2cdetect -y 1
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --

@SanKen,

I need to dig into the CM4 tech specs with alternative pin handlers. This is going to to take some time. Taking the festive period upon us - I don’t think I will have time to research before mid of next week.

The carrier board CM4-IO-BASE-A you have - is it revision 1 or 4?

@Darmur
Is it something you can chip in?

Kind Regards,

CM4-IO-BASE-A V4
Could you tell me what the problem is?
Does CM4 and allo-boss in a different combination(mainboard) work or does CM4 alone have this problem?

Hey @SanKen,

GPIO Pinout

  • CM4: 200-pin high-density connectors with more GPIOs, requiring careful mapping and configuration.
  • Other RPi Devices: Standard 40-pin GPIO header with predefined pin functions.

Peripherals

  • CM4:
    • Supports 6 I²C buses, 6 UARTs, and 2 SD card interfaces.
    • Requires manual configuration of alternate GPIO functions for peripherals.
  • Other RPi Devices:
    • Fewer exposed peripherals (e.g., 2 I²C buses on Pi 4B).
    • Predefined default configurations.

Use Case

  • CM4: Industrial and embedded applications where flexibility and custom carrier boards are required.
  • Other RPi Devices: General-purpose computing and hobbyist projects.

In case you missed it:

CM4 Requires manual configuration of alternate GPIO functions for peripherals.

Kind Regards,

I do have a CM4-IO-BASE-A, but I don’t have that HAT

with other HATs I don’t have any problem with the “default” overlays

Would sharing which pins the DAC is using make it easier to change the overlays?

Hey @SanKen,

All technical details are relevant.

@Darmur has mention - he does not have access to the DAC, neither do I. As such, you will need to test what works and what does not.

If there is any logic in the device tree attached should get us further. Follow the same instructions as before, however extra diagnostic step is needed:

sudo i2cdetect -y 6

allo-boss-dac-pcm512x-audio-cm4.zip (979 Bytes)

Kind Regards,