U-Boot and kernel 5.14

The board device-tree describes (not configures) the hardware. Configuration of the audio card device is done using amixer in userspace. Thus I will repeat one final time for luck and using capitals in the hope you get the hint … YOU DO NOT SET AUDIO ROUTING IN THE BOARD DTS FILE. I’ve already linked the amixer commands used for routing. In English we have a saying “You can lead a horse to water, but you cannot make it drink”

Hi Christian, I Understand and I’m grateful for your tips, I tried what you said before and works well but I’m not an expert on this area, I’m just an enthusiast so my intention is not argue your knoledge. I’m asking because I was viewin the DTS file to make some overlays and I see this:

	audio-routing = "TDMOUT_B IN 0", "FRDDR_A OUT 1",
			"TDMOUT_B IN 1", "FRDDR_B OUT 1",
			"TDMOUT_B IN 2", "FRDDR_C OUT 1",
			"TDM_B Playback", "TDMOUT_B OUT",
			"TDMOUT_C IN 0", "FRDDR_A OUT 2",
			"TDMOUT_C IN 1", "FRDDR_B OUT 2",
			"TDMOUT_C IN 2", "FRDDR_C OUT 2",
			"TDM_C Playback", "TDMOUT_C OUT",
			"TDMIN_A IN 4", "TDM_B Loopback",
			"TDMIN_B IN 4", "TDM_B Loopback",
			"TDMIN_C IN 4", "TDM_B Loopback",
			"TDMIN_A IN 5", "TDM_C Loopback",
			"TDMIN_B IN 5", "TDM_C Loopback",
			"TDMIN_C IN 5", "TDM_C Loopback",
			"TODDR_A IN 0", "TDMIN_A OUT",
			"TODDR_B IN 0", "TDMIN_A OUT",
			"TODDR_C IN 0", "TDMIN_A OUT",
			"TODDR_A IN 1", "TDMIN_B OUT",
			"TODDR_B IN 1", "TDMIN_B OUT",
			"TODDR_C IN 1", "TDMIN_B OUT",
			"TODDR_A IN 2", "TDMIN_C OUT",
			"TODDR_B IN 2", "TDMIN_C OUT",
			"TODDR_C IN 2", "TDMIN_C OUT",
			"Lineout", "ACODEC LOLP",
			"Lineout", "ACODEC LORP";

If you say can’t be done from DTS file it’s ok, as I said, I’m not an expert on this, but the strange thing is that I use the same root file system with the kernel 4.9 from Sinovoip and works without any audio routing using amixer commands.

He said this SHOULD not be done…as audio routing is software and dts is for describing hardware

But i wonder why this key is implemented…but maybe this key does not exist in mainline driver

The audio-routing nodes are simply mapping the source/sink relationships. The one important thing to note from the dts is the output device:

This tells you TDM_B is being used, so in userspace to get HDMI audio output:

amixer sset ‘FRDDR_A SINK 1 SEL’ ‘OUT 1’
amixer sset ‘FRDDR_A SRC 1 EN’ on
amixer sset ‘TDMOUT_B SRC SEL’ ‘IN 0’
amixer sset ‘TOHDMITX’ on
amixer sset ‘TOHDMITX I2S SRC’ ‘I2S B’

This might help (or confuse) your understanding of the hardware:

axg-audio-routing

NB: The vendor driver (AUGE) and mainline driver (AXG) both exist to run on the same hardware so there is derivative and similar naming of things in the upstream driver code, but there is really no code in common between them and you will not be able to reuse 4.9 kernel overlays on upstream kernels.

I find out that the IRQ 39 error is related to ethernet driver (meson8b-dwmac). This error is present in the kernel 5.14.y and 5.15.y. With the kernel 5.10, IRQ 40 is used and don’t throw any errors related to ethernet so I guess is something to do with the (meson8b-dwmac) driver. I edited the driver’s source code and I can’t see any thing about the IRQ used. The boot log is attached to this post for if anyone can helpme with this issue.

boot log k5.10 debian 11.txt (27,6 KB) boot log k5.15.4 debian 11.txt (29,6 KB)

Add ^ those items to the M5 dts and recompile. Does it make any difference?

Hi Christian, I tried adding those lines that you said but it doesn’t make any difference. I don’t know why works well for kernel 5.10.y without any IRQ error but with the Kernel 5.15.y throws the IRQ error. As you can see in the logs, the Kernel 5.10.y use IRQ 40 and the Kernel 5.15.y use IRQ 39, both with the same dtbo for BPI-M5.

In my own images it’s using IRQ38, so the IRQ number itself is probably not relevant.

@jhortwo I think you will need to do git bisect to find the breaking commit. Once you figure out when the issue starts, the fix is normally rather obvious.

I guess is something to do with the ethernet driver because when I disable the driver before build the kernel, the message doesn’t show up.

Hello! Does anybody have anything working on this subject? Can I get a 5.x kernel for BPI-M5 somewhere? Or at least 4.18 or higher. It would help me a lot. I wish to use podman and I think the file system overlay is failing because the old kernel.

Thanks!

https://www.armbian.com/download/?tx_maker=sinovoip

2 Likes