No sound card detected for Opi zero 2w

You mean the Zero 3 device tree, right? This is not an overlay, but a whole different device tree.

Crazy that the Zero 3 device tree still works better on the Zero 2W than the Zero 2W device tree, for many aspects. It is only some GPIO features which do not work, even onboard WiFi does (based on some older posts I reviewed). The Zero 2W device tree on the other hand has some issues with WiFi and Bluetooth, when enabling the modules in the wrong order, or disabling and re-enabling one within the same session etc. It could be beneficial if someone with enough knowledge would rebuild the Zero 2W device tree from scratch based on the Zero 3 one, leaving everything untouched which does already work well :smile:.

Let’s see whether this makes the analogue audio jack on the HAT work as well.

1 Like

Ah yes, the whole device tree.

By the way, the android image for banana pi m4 zero is better on Opi zero 2w than their own android image… The only things that don’t work are, again, WiFi and Bluetooth (and possibly some things from the expansion board).

I’d test the expansion board but I have a broken connector.

Yeah, that Zero 2W device tree seems to be some crippled mess, hence the idea to rewrite it from scratch.

With the Zero 3 device tree, WiFi and Bluetooth do work on Zero 2W, don’t they? The chips are different, hence I also thought it wouldn’t, but on the GitHub issue someone reported it does. Drivers and firmware are there, so as long as there is no conflicting device tree node/attribute, there is indeed no reason it wouldn’t.

EDIT: Ah, it is the same WiFi chip, the “20U5622” module from the Zero 2W uses the “AW859A” chip, which is used on Zero 3 as well. The Zero 3 even seems to (does, just checked the PCB) use the same module, but on their wiki, they list the chip instead.

Yes, just checked and the WiFi works too!

EDIT. It just shows itself as connected (and maybe it is) but no data seems to be able to be transferred). This only connects when there is ethernet connected. Otherwise it refuses to go up. Similar to the 2w dtb.

1 Like

Hi both

Yesterday i try the New image for zero2w Version 9.5.1, no sound at all

Tonight y try the same Version but with the zero3 image and tell you

Have a good day

There are no new images yet, and there were no related commits on Armbian side, so the issue is still the same: No sound with Zero 2W device tree, but it works when switching to the Zero 3 device tree: No sound card detected for Opi zero 2w - #19 by MichaIng

Hello Micha

It’s ok with the opi zero 3 tree , the HDMI have sound !!!

With your help can we rebuild the dtb file to expand to the jack output
i try with the alsamixer but how to do mith :wink:

too late tonight , to be continued

I’m very happy to have sound on HDMi under Dietpi :wink: :wink:

This morning i re-read your link from Armbian and remember that i see in alsa mixer the Dacl and Dacr put to “off”

With this


Perhaps a solution for the jack 3,5 mm

I try tonight

2 Likes

Yesss i’ve sound on the jack 3.5 mm connector with the activation of the dacr and dacl

I use a wav file to test it
root@DietPi:/home/dietpi# aplay -D hw:0,0 ‘VIVALDI - Concerto Pour Basson En do Majeur.wav’
Lecture WAVE ‘VIVALDI - Concerto Pour Basson En do Majeur.wav’ : Signed 16 bit Little Endian, Fréquence 44100 Hz, Stéréo

Now i try to play mp3 with LMS , next step :wink:

Hello Micha

Good news with a modified /etc/asound.conf like this

pcm.device{
        format S16_LE
        rate 44100
        type hw
        card 0
        device 0
}

pcm.!default {
        type plug
        slave.pcm "device"
}

ctl.!default {
        type hw
        card 0
}

I can ear sound in the jack 3.5mm connector with LMS and Squeezelite
I tested mp3 from radio , flac from my nas, wav from my sd card

one step more :wink: :wink:

Hello everyone

For Micha, you said different tree, you are right
Some part are just “disabled” in the 2w tree


After some modification i recompile a zero2w.dtb file
sun50i-h618-orangepi-zero2w.zip.txt (8,5 Ko)
Just change the txt extension as .zip and extract the dtb file

For me it works as expected with my extension board, i have now two soundcard under dietpi-config with the zero2w tree

Hello Micha and others

I continue to work , i find away to integrate some part of i2s3 in the dtb file
staticaly and i obtain this under


Ahub3 with status “okay” but how to create a sound card ahub3 now !!

To be continued

Hello everyone
Hello Micha

I suceed with i2s0 intégration
the pin in the tree is the same as the rpi’s hat40


The cmdline “aplay-l”

after activate the card 1 with dietpi-config
put for my pcm5102a somme connection with the hat
PI0 → I2S SCK–>pin29
PI1 → I2S BCK–>pin12
PI2 → I2S LCK–>pin35
PI3 → I2S DATA–>pin40
3.3V → to VIN power of DAC board–>pin1
GND → to GND power of DAC board-->pin6

So i 've sound with my orangepi zero 2w with a new dtb file
sun50i-h618-orangepi-zero2w-with-Audiocodec-HDMI-i2s0.zip.txt (9,1 Ko)
Just remove the txt extension
This dtb include sound on jack 3.5mm, HDMI and i2S0 via the hat

Hope it helps others

2 Likes

hi, how to modify that dtb for orange pi zero 3 i2s3?

Hi leftwing
Wich kernel dou you use ?

6.6.43-current-sunxi64

You need to adapt the i2s3.dts file from Opi_Zero_3_I2S3_6.1/sun50i-h616-i2s3.dts at ebfc78dd6f6464b2c39d57f3c681559695edf172 · elkoni/Opi_Zero_3_I2S3_6.1 · GitHub, there is also directly the dtbo file if you would try
After you extract your dtb file and make a backup
To combine the two file use the command fdtoverlay like this
fdtoverlay --input sun50i-h616-zero3.dtb --output sun50i-h616-zero3.dtb sun50i-h616-i2s0.dtbo
and after copy it to your sd card
To test it dont forget to put active by the status"okay" your i2s3 part in the dtb file

To see your device tree use
find /proc/device-tree/ -name status -exec echo -ne '\n{}: ’ ; -exec cat {} ;

To see your pins active use
cat /sys/kernel/debug/pinctrl/300b000.pinctrl/pinmux-pins

Good luck and tell us

ill report back, thanks for the explanation.

not working,

/proc/device-tree/soc/ahub3_mach/status: okay
/proc/device-tree/soc/mmc@4022000/status: disabled
/proc/device-tree/soc/ethernet@5030000/status: disabled
/proc/device-tree/soc/hdmi@6000000/status: okay
/proc/device-tree/soc/ahub_dam_plat@5097000/status: okay
/proc/device-tree/soc/i2c@5002800/status: disabled
/proc/device-tree/soc/addr-mgt/status: okay
/proc/device-tree/soc/ahub3_plat/status: okay

Capture2
sun50i-h618-orangepi-zero3.zip.txt (7.4 KB)

hi
Thanks for your zero3.dtb file to have a look
In the section symbols {} it does appear Ahub3 parts

Something like this
ahub3_mach = “/soc/ahub3_mach”;
ahub3_plat = “/soc/ahub3_plat”;
ahub_daudio3_pins_d = “/soc/pinctrl@300b000/ahub_daudio3_sleep”;
ahub_daudio3_pins_c = “/soc/pinctrl@300b000/ahub_daudio3@2”;
ahub_daudio3_pins_b = “/soc/pinctrl@300b000/ahub_daudio3@1”;
ahub_daudio3_pins_a = “/soc/pinctrl@300b000/ahub_daudio3@0”;

Can I simply replace this file on top of the dtb in my Armbian /boot/dtb/allwinner? Or do you recommend the second file you created with all outputs working. The name if different and I don’t know how to replace it. Just rename and overwrite?