No sound card detected for Opi zero 2w

Hello everyone

I use a fresh Dietpi image for my orangepi zero 2w with lms and chromium as autostart

Everything is ok for the screen but no sound on the board

The command aplay -L return “no soundcard found”

A have the additional board with jack, ethernet, usb and button via the 24 pin connector and the screen connected via HDMI

I put in config.txt a line
Dtparam audio = on, without succes

If someone have an idea

Best regards

Did you turn on the sound card with dietpi-config -> audio options?

Hello

Yes i did it but i’ve just “default” as choice and the command aplay in the terminal just said “no soundcard found”

1 Like

ping @MichaIng Maybe you can have a look to the sound option problem

Hello
With lsmod there i’s no SND modules loaded

If you have an idea :smiling_face:

This file should not exist on the Orange Pi, as it is a Raspberry Pi only file, and this dtparam=audio=on has no effect on any other hardware.

So you use a HAT which adds an audio jack? Please check the documentation of this HAT, whether it requires certain interfaces to be active on certain pins. I2C, SPI etc are mostly disabled by default, AFAIK, at least there are overlays to enable them.

Hello Micha
I would use à I2S Dac pcm5102 or 5122 with pin configurable according to the i2s pin of the h618
But i d’ont see an overlay for that
Have you one

My config to test is Dietpi with lms squeezelite with radio, external drive mounted with samba and wifi

I have an other config in the same way with a rpi4b

Thanks for your answer

Perhaps this link for testing
I try later

Hello after some test, it’s not working with this overlay in the link posted earlier

To be continued :blush:

1 Like

Hello all
For Micha , y try a sudo modprobe snd-aloop and snd-dummy
the files are in /lib/modules/6.6.31-current-sunxi64/kernel/sound/drivers
in fact i 've two card selectable now in the dietpi-config menu

have you an idea to enable the audio analog output present on the extension board
and the top a i2s3 acces via .ko files

thanks a lot for your response

How did you try to apply this custom overlay? Our boot scripts work different than the ones from Xunlong, so the way described in this repo cannot work. Also the overlay is for a different, much older vendor kernel.

Just loading drivers without related device tree node won’t work. The idea to enable it via overlay was right already. But it needs to be done correctly, and the related node needs to be known. The correct driver/kernel module will then be loaded automatically.

Thanks for your answer Micha

So the correct way is to write an overlay as sun50i-h618-i2s.dtbo and a tree as a i2s.dts as in this link Opi_Zero_3_I2S3_6.1/sun50i-h616-i2s3_v2.dts at ebfc78dd6f6464b2c39d57f3c681559695edf172 · elkoni/Opi_Zero_3_I2S3_6.1 · GitHub

Need to learn much more , i have a great work to do with

Generally, custom overlays can be applied like this:

mkdir -p /boot/overlay-user
wget 'https://raw.githubusercontent.com/elkoni/Opi_Zero_3_I2S3_5.4/main/sun50i-h616-i2s3.dtbo' -O /boot/overlay-user/i2s3.dtbo
G_CONFIG_INJECT 'user_overlays=' 'user_overlays=i2s3' /boot/dietpiEnv.txt

I.e. use the /boot/overlay-user directory and apply the name of the file without .dtbo ending to the user_overlays setting in /boot/dietpiEnv.txt.

Thanks a lot Micha
I try later this week and tell you
Have a good day

Here is a PR at Armbian to add onboard audio support. I checked again hardware info, and analogue audio is directly tied to one of the GPIO pins. If your expansion port is using this, then it should enable our 3.5mm jack as well. I will do a test kernel build later today, with this PR included: Sound Allwinner H616 H618 SOCs by stephengraf · Pull Request #6694 · armbian/build · GitHub

1 Like

Hello Micha

I go further in my research with the zero 2w with the official opi os the hdmi and 3.5mm jack work perfectly on the expansion board

I try under Dietpi to add te I2S3 overlay without succès with your link

have you info about kernel build from your last post

I dream to use Dietpi with the expansion board first and with my I2S dac after
i 've just finish to solder the 40 pin to test it :wink:

Have a good day

I’m doing a kernel build with this feature added: Armbian · MichaIng/DietPi@6c04c86 · GitHub

Once this has finished, please try this:

sed -i '/^user_overlays=/d' /boot/dietpiEnv.txt
cd /tmp
wget https://dietpi.com/downloads/binaries/testing/linux-{image,dtb}-current-sunxi64.deb
dpkg -i linux-{image,dtb}-current-sunxi64.deb
rm linux-{image,dtb}-current-sunxi64.deb
reboot

Let’s see whether this works OOTB.

1 Like

Hello Micha

I’ve tested your last command without effect on the soundcard detection under my Dietpi config

I install the image for opizero3 desktop from your Armbian link
Miracle i have sound come from the hdmi of the expansion board

i go further in my test

Okay, the PR was also tested on Zero 3. While both use the same kernel, the Zero 2W device tree is a different one. Can you test the following on the DietPi system with the new kernel:

G_CONFIG_INJECT 'fdtfile=' 'fdtfile=allwinner/sun50i-h618-orangepi-zero3.dtb' /boot/dietpiEnv.txt

It should match the Armbian image you tested.

I pushed this kernel to our APT repo in the meantime, so in case you use the older kernel:

apt update
apt upgrade

or upgrade to DietPi v9.5 which was just released.

I just tested the overlay. Indeed the onboard HDMI audio works now. There is a warning about “one stream supported” but it just works.