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!
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.
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:
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?
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.