- 2025 * March Update DietPi 9.11.2
Wrote the most recent DietPi_OdroidC4-ARMv8-Bookworm.img.xz to my drive using BalenaEtcher and was detected and booted from Petitboot. It timed out and dropped to shell but ‘exit’ let it continue and install. It did all the usual install tasks and I added mate desktop.
It boots and runs fine. NO sound even though it appears to detect it. I did install alsa during setup. I also dont see any panfrost named packages installed but there are msgs from it in dmesg so its installed 
I tried Armbian the other day and it did get the sound right. I just wish they would switch their build to use the same image setup that DietPi now uses because once I wrote their image to my drive it was unreadable and would not boot. Same image to SD worked but it is SO SLOW compared to usb3/ssd!
Thank you @MichaIng for your Hardkernel/amlogic support!
Trying to figure out if the reason sound isnt working is due to missing packages I found a script https://stackoverflow.com/questions/26592963/how-to-compare-installed-linux-packages-between-two-machines
So I made a copy of the packages installed on dietpi 9.11.2 and on the latest armbian. Ran the perl script and got this report.
pkg_compare_raw.txt (27.7 KB)
I will look through it for alsa/pipewire sound packages and see if installing any of those helps and update this thread if I have any luck 
Did you select the respective onboard sound option via dietpi-config
? The ALSA mixer needs to be configured in a somewhat complicated way, which is done by our script.
Using another sound engine of course also works. But our intention is to have it functional with plain ALSA.
Yes, in dietpi-config its set to odroidc4_hdmi1.
I just performed the upgrade from 11.2>12.1 and went through config again which reset all the sound card settings. Opened sound settings and there is no test speakers option. I ran speaker-test -c2 and it tries but still no sound. I didnt see anything in dmesg etiher. With speaker-test running justboom shows for alsa output info:
access: rw_interleaved
format: s16_le
subformat: std
channels: 2
rate: 48000 (48000/1)
period_size: 65536
buffer_size: 262144
Not sure if its related but in monitor preferences it shows as unknown. So I am unclear how alsa output gets routed to hdmi device.
I’ll test on Odroid N2, which works almost the same. Maybe something changed in recent kernel.
I tried it on my Odroid N2+, which uses the exact same HDMI audio set, and it works fine:
root@OdroidN2:~# speaker-test -c2
speaker-test 1.2.8
Playback device is default
Stream parameters are 48000Hz, S16_LE, 2 channels
Using 16 octaves of pink noise
Rate set to 48000Hz (requested 48000Hz)
Buffer size range from 4 to 262144
Period size range from 2 to 131072
Using max buffer size 262144
Periods = 4
was set period_size = 65536
was set buffer_size = 262144
0 - Front Left
1 - Front Right
Time per period = 5.472946
0 - Front Left
1 - Front Right
Time per period = 5.478437
However, there is one different: On Odroid N2 we additionally set the volume via:
amixer -c 0 set 'ACODEC' '85%'
Not sure why this is not the case on C4. Can you try this, in case also check whether there is a working volume handle in alsamixer
?
I upgraded to 9.13.2 and no improvement. I did also switch to a 4k tv and that solved my sound issues on debian 12 but didnt help dietpi. Still no audio output 
That amixer command fails on acodec so I guess its different on c4 than n2?
Can you check alsamixer
whether you see another volume control that makes a difference?
I split the audio topic into a new thread.
On 9.14 using a 4k element tv I do have sound. Alsamixer shows 8 tdmout_b and a do-tohdmitx
Sound does seem to be working fine using firefox and freetube. I have not gotten it work on Debian though. DietPi works well!!
P.S. Mate does not appear to have a test speaker option..
1 Like
Interesting. I wonder what changed since DietPi v9.13 since there was no kernel upgrade, was it?
I think it was either support via hardkernel for their hdmi out of the amlogic chips or the linux kernel’s support for hdmi.
I switched tv’s and that helped with DietPi but now debian fails.
On Amlogic there is ONLY hdmi out but the kernel if not detecting the tv DEFAULTs to DVI which isnt present.
Something with the HDMI standard maybe as real monitors with hdmi generally work but tv’s over hdmi seem to cause problems.
You mention problems with the alsa setup for amlogic so it sounds like you have beat your head on it as well!
Yeah, for some reason setting up audio for the two recent Amlogic Odroids with the mainline kernel driver was/is pretty complex, with a lot of alsamixer
settings that need to be configured precisely for audio to work. Took a while until I found out, starting with what ALSA obtains as defaults, to functional HDMI and analogue output:
'odroidn2_hdmi')
# Enable HDMI output
G_EXEC amixer -c 0 set 'TOHDMITX' 'on'
# Use I2S B as source for HDMI output (I2S A does not work)
G_EXEC amixer -c 0 set 'TOHDMITX I2S SRC' 'I2S B'
# Use ALSA device 0 as input for I2S B
G_EXEC amixer -c 0 set 'TDMOUT_B SRC SEL' 'IN 0'
# Enable I2S B (SRC 2) on device 0 (_A)
G_EXEC amixer -c 0 set 'FRDDR_A SRC 2 EN' 'on'
# Set output channels for device 0 (_A)
G_EXEC amixer -c 0 set 'FRDDR_A SINK 1 SEL' 'OUT 0'
G_EXEC amixer -c 0 set 'FRDDR_A SINK 2 SEL' 'OUT 1'
G_EXEC amixer -c 0 set 'FRDDR_A SINK 3 SEL' 'OUT 2'
# Set master volume to 85 %
G_EXEC amixer -c 0 set 'ACODEC' '85%'
;;
'odroidn2_3.5mm')
# Enable 3.5mm output
G_EXEC amixer -c 0 set 'TOACODEC OUT EN' 'on'
# Use I2S B as source for 3.5mm output (I2S A does not work)
G_EXEC amixer -c 0 set 'TOACODEC SRC' 'I2S B'
# Use ALSA device 0 as input for I2S B
G_EXEC amixer -c 0 set 'TDMOUT_B SRC SEL' 'IN 0'
# Enable I2S B (SRC 2) on device 0 (_A)
G_EXEC amixer -c 0 set 'FRDDR_A SRC 2 EN' 'on'
# Set output channels for device 0 (_A)
G_EXEC amixer -c 0 set 'FRDDR_A SINK 1 SEL' 'OUT 0'
G_EXEC amixer -c 0 set 'FRDDR_A SINK 2 SEL' 'OUT 1'
G_EXEC amixer -c 0 set 'FRDDR_A SINK 3 SEL' 'OUT 2'
# Set master volume to 85 %
G_EXEC amixer -c 0 set 'ACODEC' '85%'
;;
'odroidc4_hdmi')
# Enable HDMI output
G_EXEC amixer -c 0 set 'TOHDMITX' 'on'
# Use I2S B as source for HDMI output (I2S A does not work)
G_EXEC amixer -c 0 set 'TOHDMITX I2S SRC' 'I2S B'
# Use ALSA device 0 as input for I2S B
G_EXEC amixer -c 0 set 'TDMOUT_B SRC SEL' 'IN 0'
# Enable I2S B (SRC 2) on device 0 (_A)
G_EXEC amixer -c 0 set 'FRDDR_A SRC 2 EN' 'on'
# Set output channels for device 0 (_A)
G_EXEC amixer -c 0 set 'FRDDR_A SINK 1 SEL' 'OUT 0'
G_EXEC amixer -c 0 set 'FRDDR_A SINK 2 SEL' 'OUT 1'
G_EXEC amixer -c 0 set 'FRDDR_A SINK 3 SEL' 'OUT 2'
;;
As you can see, at least it was nearly identical for N2 and C4, aside of the ACODEC
setting which does not exist on C4.
I mean give this to a mortal user … And I am pretty sure that PulseAudio and PipeWire won’t work either OOTB, with such a number of underlying ALSA settings not configured correctly. I mean that they are even exposed instead of just having them configured correctly based on hardware and hidden from userland, like nearly every other sound card/driver does.
1 Like