dr_toggleswitch Posted March 11 Posted March 11 How did you get this kernel version? My device on sunxi64 is on 6.6.72, and apt wants to update it to 6.6.75. 0 Quote
Werner Posted March 11 Posted March 11 root@pihole-v2:~# uname -a Linux pihole-v2 6.12.16-edge-sunxi64 #1 SMP Fri Feb 21 13:01:47 UTC 2025 aarch64 GNU/Linux 0 Quote
mantouboji Posted March 11 Author Posted March 11 I built it from the latest build system from github . For Zero2 and Zero3, it must be freezen in booting stage, stopped when mount something. Maybe other boards are OK? 0 Quote
Solution going Posted March 12 Solution Posted March 12 15 часов назад, mantouboji сказал: boot and stop here, Zero3 Try to set the disabled status for the GPU node. or temporarily disable this patch: patch/kernel/archive/sunxi-6.12/series.conf#L472 1 Quote
going Posted March 12 Posted March 12 1 час назад, Werner сказал: H6 is fine. Is the GPU node enabled for your board? 0 Quote
Werner Posted March 12 Posted March 12 1 hour ago, going said: Is the GPU node enabled for your board? I think so, yes root@pihole-v2:~# dmesg|grep -i gpu [ 5.922915] panfrost 1800000.gpu: clock rate = 432000000 [ 5.922952] panfrost 1800000.gpu: bus_clock rate = 200000000 [ 5.923733] panfrost 1800000.gpu: mali-t720 id 0x720 major 0x1 minor 0x1 status 0x0 [ 5.923762] panfrost 1800000.gpu: features: 00000000,00000408, issues: 00000000,21054400 [ 5.923770] panfrost 1800000.gpu: Features: L2:0x07110206 Shader:0x00000000 Tiler:0x00000809 Mem:0x1 MMU:0x00002821 AS:0xf JS:0x7 [ 5.923779] panfrost 1800000.gpu: shader_present=0x3 l2_present=0x1 [ 5.931337] [drm] Initialized panfrost 1.2.0 for 1800000.gpu on minor 1 0 Quote
Werner Posted March 12 Posted March 12 3 hours ago, going said: or temporarily disable this patch: patch/kernel/archive/sunxi-6.12/series.conf#L472 I tried this and works with zero2 https://paste.armbian.com/enipilazib 0 Quote
going Posted March 12 Posted March 12 2 часа назад, Werner сказал: I tried this and works with zero2 https://paste.armbian.com/enipilazib [ 9.527925] videodev: Linux video capture interface: v2.00 [ 9.539551] panfrost 1800000.gpu: clock rate = 432000000 [ 9.539593] panfrost 1800000.gpu: bus_clock rate = 200000000 [ 9.540215] panfrost 1800000.gpu: mali-g31 id 0x7093 major 0x0 minor 0x0 status 0x0 [ 9.540250] panfrost 1800000.gpu: features: 00000000,000027f7, issues: 00000000,00000400 [ 9.540262] panfrost 1800000.gpu: Features: L2:0x07100206 Shader:0x00000000 Tiler:0x00000209 Mem:0x1 MMU:0x00002821 AS:0xff JS:0x7 [ 9.540274] panfrost 1800000.gpu: shader_present=0x1 l2_present=0x1 [ 9.544584] [drm] Initialized panfrost 1.2.0 for 1800000.gpu on minor 1 Thank you for the information provided! A simple clarification. Does it work on an h616 processor with the patch disabled? For the h618 processor, I was unable to get the GPU to work with or without this patch. It remains to be seen whether this patch plays a positive role for the h6 processor. If there is no positive effect, then I'd better turn it off. 1 Quote
Werner Posted March 12 Posted March 12 1 hour ago, going said: A simple clarification. Does it work on an h616 processor with the patch disabled? Yes. I disabled the patch you mentioned (patch/kernel/archive/sunxi-6.12/series.conf#L472) and built a bookworm minimal edge image with this and successfully booted an Orange Pi Zero 2 H616. 1 hour ago, going said: It remains to be seen whether this patch plays a positive role for the h6 processor. I cannot answer this. I am using my Orange Pi One Plus (H6) headless only. Maybe anyone else can. 0 Quote
going Posted March 12 Posted March 12 1 час назад, Werner сказал: Yes. I disabled the patch you mentioned (patch/kernel/archive/sunxi-6.12/series.conf#L472) and built a bookworm minimal edge image with this and successfully booted an Orange Pi Zero 2 H616. I understood. Thank you. 0 Quote
Stephen Graf Posted March 13 Posted March 13 @going Extra confirmation. Yesterday I cloned the master and built orangepizero3 debian edge images for cinnamon and xfce . Both hung on the initial load of the kernel. I then removed the above mentioned L472 patch and rebuilt the cinnamon image which now works. 0 Quote
going Posted March 13 Posted March 13 1 час назад, Stephen Graf сказал: Extra confirmation. Yesterday I cloned the master and built orangepizero3 debian edge images for cinnamon and xfce . Both hung on the initial load of the kernel. I then removed the above mentioned L472 patch and rebuilt the cinnamon image which now works. This patch is not complete. A solution already seems to exist in this discussion. I will add these changes to this PR#7705 tomorrow. 0 Quote
Stephen Graf Posted March 13 Posted March 13 19 minutes ago, going said: I will add these changes to this PR#7705 tomorrow. Then I will test again tomorrow. 0 Quote
Stephen Graf Posted March 21 Posted March 21 @going Thank you for updating the master with PR#7705. I have been able to build and test a Debian 12 Linux 6.13.7 cinnamon image for an orangepizero3 with the following results: HDMI works as expected. Initial resolution is monitor default (1920x1080) and there are lots of optional settings in the display manager. The monitor name was detected. Sound on HDMI works. Analog sound has a problem. It outputs audio after enabling channels with alsamixer but the audio rate is double or quadruple (cute funny sounds). I saw this problem when I worked on the initial sound patch, but it only occurred intermittently when changing between output sound devices. With the test image I can not get rid of it. Cinnamon did not work well, hanging on numerous occasions. The system did not crash and I was able to reboot from cli. I doubt this has anything to do with the recent patch. I will test again with a Mate desktop. 0 Quote
Stephen Graf Posted March 21 Posted March 21 Using a Mate desktop provides the same results for the HDMI and sound as the Cinnamon tested previously. However the Mate desktop is very stable. 0 Quote
going Posted March 22 Posted March 22 11 часов назад, Stephen Graf сказал: However the Mate desktop is very stable. GNOME also works well. XFCE is lame at scaling the screen. For a 1:1 ratio, the letters are large, as if the resolution is set to be less than the actual 2560х1440. 14 часов назад, Stephen Graf сказал: Analog sound has a problem. It outputs audio after enabling channels with alsamixer but the audio rate is double or quadruple (cute funny sounds). I saw this problem when I worked on the initial sound patch, but it only occurred intermittently when changing between output sound devices. With the test image I can not get rid of it. Violation of the synchronization frequency. The driver is doing something wrong. Is video hardware decoding working on your device? 0 Quote
going Posted March 22 Posted March 22 17 часов назад, Stephen Graf сказал: Analog sound has a problem. It outputs audio after enabling channels with alsamixer but the audio rate is double or quadruple (cute funny sounds). Maybe that's the problem: sound/soc/sunxi/sun4i-i2s.c#L1647 0 Quote
Stephen Graf Posted March 22 Posted March 22 5 hours ago, going said: Is video hardware decoding working on your device? I think so. sysadmin@orangepizero3:~$ lsmod | grep lima lima 65536 0 gpu_sched 49152 2 lima,panfrost drm_shmem_helper 24576 2 lima,panfrost sysadmin@orangepizero3:~$ lsmod | grep gpu_sched gpu_sched 49152 2 lima,panfrost sysadmin@orangepizero3:~$ glxinfo -B name of display: :0 display: :0 screen: 0 direct rendering: Yes Extended renderer info (GLX_MESA_query_renderer): Vendor: Panfrost (0xffffffff) Device: Mali-G31 (Panfrost) (0xffffffff) Version: 22.3.6 Accelerated: yes Video memory: 1975MB Unified memory: yes Preferred profile: core (0x1) Max core profile version: 3.1 Max compat profile version: 3.1 Max GLES1 profile version: 1.1 Max GLES[23] profile version: 3.1 OpenGL vendor string: Panfrost OpenGL renderer string: Mali-G31 (Panfrost) OpenGL core profile version string: 3.1 Mesa 22.3.6 OpenGL core profile shading language version string: 1.40 OpenGL core profile context flags: (none) OpenGL version string: 3.1 Mesa 22.3.6 OpenGL shading language version string: 1.40 OpenGL context flags: (none) OpenGL ES profile version string: OpenGL ES 3.1 Mesa 22.3.6 OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.10 ********* display show gears running.*********** sysadmin@orangepizero3:~$ glxgears Running synchronized to the vertical refresh. The framerate should be approximately the same as the monitor refresh rate. 303 frames in 5.0 seconds = 60.491 FPS 301 frames in 5.0 seconds = 60.000 FPS 301 frames in 5.0 seconds = 60.000 FPS 300 frames in 5.0 seconds = 59.994 FPS ^C ************** Display show G3D **************** sysadmin@orangepizero3:~$ g3dviewer Gtk-Message: 09:52:52.184: Failed to load module "canberra-gtk-module" (g3dviewer:3131): LibG3D-WARNING **: 09:52:52.232: libg3d: plugins: failed to load /usr/lib/aarch64-linux-gnu/libg3d/plugins/import/imp_vrml.so: /usr/lib/aarch64-linux-gnu/libg3d/plugins/import/imp_vrml.so: undefined symbol: yywrap ** (g3dviewer:3131): CRITICAL **: 09:52:53.802: add_objects: assertion 'object->name != NULL' failed screenshot "g3dviewer-screenshot-g3d.ac.png" saved. 0 Quote
Stephen Graf Posted March 22 Posted March 22 3 hours ago, going said: Maybe that's the problem: sound/soc/sunxi/sun4i-i2s.c#L1647 I was hoping that there was a clock rate that needed to be divided by 2 or 4. 0 Quote
going Posted March 22 Posted March 22 32 минуты назад, Stephen Graf сказал: I was hoping that there was a clock rate that needed to be divided by 2 or 4. It seems to me that everything is more complicated. I found this option: https://patchwork.kernel.org/project/linux-clk/patch/20241023075917.186835-6-ryan@testtoast.com/ I'll try to use it. It is marked as not applicable and sent to the archive. 52 минуты назад, Stephen Graf сказал: sysadmin@orangepizero3:~$ lsmod | grep lima lima 65536 0 gpu_sched 49152 2 lima,panfrost drm_shmem_helper 24576 2 lima,panfrost sysadmin@orangepizero3:~$ lsmod | grep gpu_sched gpu_sched 49152 2 lima,panfrost I meant the video codec. [ 11.669847] sunxi_cedrus: module is from the staging directory, the quality is unknown, you have been warned. [ 11.672804] cedrus 1c0e000.video-codec: Device registered as /dev/video0 If you try to watch a movie in a video player. 0 Quote
Stephen Graf Posted March 22 Posted March 22 9 hours ago, going said: if you try to watch a movie in a video player. Yes that works fine. I have to edit this post as the video only works "fine" on a small window with a lower bit rate avi file (H264). Other videos I tested stuttered and got worse as the window size was increased. Most videos would not play in full screen mode (1920x1080), filling only 1/4 of the screen. I watched the system monitor while playing a video and cpu usage was very high 80-100% on all cores. Ok so I did some more investigation. The first quick test I did was with Celluloid and Media Player, the programs that come with Mate. I then installed vlc, because I wanted to see the codec info about the media. It is vlc that is a cpu hog! Both Celluloid and Media Player work well even at full screen. The cpu usage is around 50%. 1 Quote
Stephen Graf Posted March 23 Posted March 23 9 hours ago, going said: Related topic x264-hw-encoding-on-orange-pi-zero-2w @going There might be a clue to the sound problem in the following: sysadmin@orangepizero3:~$ sudo dmesg | grep -iE 'audio|ahub|video|codec|hdmi|drm' [ 0.079206] /soc/hdmi@6000000: Fixed dependency cycle(s) with /soc/tcon-top@6510000 [ 0.079254] /soc/tcon-top@6510000: Fixed dependency cycle(s) with /soc/hdmi@6000000 [ 0.084097] /soc/hdmi@6000000: Fixed dependency cycle(s) with /soc/tcon-top@6510000 [ 0.084454] /soc/hdmi@6000000: Fixed dependency cycle(s) with /soc/tcon-top@6510000 [ 0.084604] /soc/tcon-top@6510000: Fixed dependency cycle(s) with /soc/hdmi@6000000 [ 0.086562] /soc/hdmi@6000000: Fixed dependency cycle(s) with /connector [ 0.086632] /connector: Fixed dependency cycle(s) with /soc/hdmi@6000000 [ 0.912097] sun4i-codec 5096000.codec: Failed to get the module clock [ 0.912123] sun4i-codec 5096000.codec: probe with driver sun4i-codec failed with error -2 [ 1.893626] sun4i-drm display-engine: bound 1100000.mixer (ops 0xffff8000811bd460) [ 1.893826] sun4i-drm display-engine: bound 6510000.tcon-top (ops 0xffff8000811c2200) [ 1.894162] sun4i-drm display-engine: bound 6515000.lcd-controller (ops 0xffff8000811ba228) [ 1.894226] sun8i-dw-hdmi 6000000.hdmi: supply hvcc not found, using dummy regulator [ 1.894461] sun8i-dw-hdmi 6000000.hdmi: Detected HDMI TX controller v2.12a with HDCP (DWC HDMI 2.0 TX PHY) [ 1.894775] sun8i-dw-hdmi 6000000.hdmi: EVENT=plugin [ 1.895002] sun8i-dw-hdmi 6000000.hdmi: registered DesignWare HDMI I2C bus driver [ 1.895247] sun4i-drm display-engine: bound 6000000.hdmi (ops 0xffff8000811bc528) [ 1.895741] [drm] Initialized sun4i-drm 1.0.0 for display-engine on minor 0 [ 1.895777] sun8i-dw-hdmi 6000000.hdmi: read_hpd result: 1 [ 2.082951] sun4i-drm display-engine: [drm] fb0: sun4i-drmdrmfb frame buffer device [ 6.372421] systemd[1]: Starting modprobe@drm.service - Load Kernel Module drm... [ 6.470837] systemd[1]: modprobe@drm.service: Deactivated successfully. [ 6.471579] systemd[1]: Finished modprobe@drm.service - Load Kernel Module drm. [ 7.573250] videodev: Linux video capture interface: v2.00 [ 7.688212] cedrus 1c0e000.video-codec: Device registered as /dev/video0 [ 7.887240] [drm] Initialized panfrost 1.3.0 for 1800000.gpu on minor 1 [ 9.349292] sun8i-dw-hdmi 6000000.hdmi: EVENT=plugout [ 9.349334] sun8i-dw-hdmi 6000000.hdmi: read_hpd result: 2 [ 9.498174] sun8i-dw-hdmi 6000000.hdmi: EVENT=plugin [ 9.498214] sun8i-dw-hdmi 6000000.hdmi: read_hpd result: 1 [ 9.498316] sun8i-dw-hdmi 6000000.hdmi: EVENT=plugin [ 19.333441] hdmi-audio-codec hdmi-audio-codec.5.auto: Only one simultaneous stream supported! [ 19.333474] hdmi-audio-codec hdmi-audio-codec.5.auto: ASoC: error at snd_soc_dai_startup on i2s-hifi: -22 [ 19.333494] ahub_plat-i2s-hifi: ASoC: error at __soc_pcm_open on ahub_plat-i2s-hifi: -22 [ 29.107222] hdmi-audio-codec hdmi-audio-codec.5.auto: Only one simultaneous stream supported! [ 29.107251] hdmi-audio-codec hdmi-audio-codec.5.auto: ASoC: error at snd_soc_dai_startup on i2s-hifi: -22 [ 29.107270] ahub_plat-i2s-hifi: ASoC: error at __soc_pcm_open on ahub_plat-i2s-hifi: -22 [ 941.536296] sun8i-dw-hdmi 6000000.hdmi: EVENT=plugin [ 1049.709728] sun8i-dw-hdmi 6000000.hdmi: EVENT=plugout [ 1049.709779] sun8i-dw-hdmi 6000000.hdmi: read_hpd result: 2 [ 1049.859960] sun8i-dw-hdmi 6000000.hdmi: EVENT=plugin [ 1049.859997] sun8i-dw-hdmi 6000000.hdmi: read_hpd result: 1 [ 1049.860100] sun8i-dw-hdmi 6000000.hdmi: EVENT=plugin [ 1066.819613] sun8i-dw-hdmi 6000000.hdmi: EVENT=plugin [ 1463.903829] sun8i-dw-hdmi 6000000.hdmi: EVENT=plugout [ 1463.903883] sun8i-dw-hdmi 6000000.hdmi: read_hpd result: 2 [ 1464.055245] sun8i-dw-hdmi 6000000.hdmi: EVENT=plugin [ 1464.055282] sun8i-dw-hdmi 6000000.hdmi: read_hpd result: 1 [ 1464.055381] sun8i-dw-hdmi 6000000.hdmi: EVENT=plugin 0 Quote
Stephen Graf Posted March 23 Posted March 23 @going I have an image from when I tested the tcon patch a few weeks ago, v25.02 rolling for Orange Pi Zero3 running Armbian Linux 6.12.13-edge-sunxi64, and the analog audio works properly until I try to use the pulseaudio volume control at which point the audio speeds up. Restarting celluloid clears the problem. The Celluloid volume control works properly and does not cause a problem. Too confusing! Dmesg does not show an error about the codec clock. Can you tell what changed? 0 Quote
going Posted March 23 Posted March 23 22.03.2025 в 21:41, Stephen Graf сказал: I have to edit this post as the video only works "fine" on a small window with a lower bit rate avi file (H264). Other videos I tested stuttered and got worse as the window size was increased. Most videos would not play in full screen mode (1920x1080), filling only 1/4 of the screen. I watched the system monitor while playing a video and cpu usage was very high 80-100% on all cores. Ok so I did some more investigation. The first quick test I did was with Celluloid and Media Player, the programs that come with Mate. I then installed vlc, because I wanted to see the codec info about the media. It is vlc that is a cpu hog! Both Celluloid and Media Player work well even at full screen. The cpu usage is around 50%. This indicates that the hardware decoding is not working properly. 23.03.2025 в 06:56, Stephen Graf сказал: [ 0.912097] sun4i-codec 5096000.codec: Failed to get the module clock [ 0.912123] sun4i-codec 5096000.codec: probe with driver sun4i-codec failed with error -2 It is very strange that this driver is writing a message. There is no compatible sun50i-h616 line in it. That's my doubt. 0 Quote
going Posted March 23 Posted March 23 @Stephen Craig For kernel 6.13, I had to make these changes: Скрытый текст From 258ff3a17a99ea999c2e5b2c38088f1e8e0a3c99 Mon Sep 17 00:00:00 2001 From: The-going <48602507+The-going@users.noreply.github.com> Date: Sun, 16 Mar 2025 20:38:28 +0300 Subject: Fix: error: incompatible pointer type, warning: no previous prototype --- include/sound/soc-dai.h | 2 +- sound/soc/sunxi_v2/snd_sunxi_ahub.h | 7 +++++++ sound/soc/sunxi_v2/snd_sunxi_ahub_dam.h | 5 ++++- sound/soc/sunxi_v2/snd_sunxi_mach.c | 4 ++-- sound/soc/sunxi_v2/snd_sunxi_mach.h | 3 +++ 5 files changed, 17 insertions(+), 4 deletions(-) diff --git a/include/sound/soc-dai.h b/include/sound/soc-dai.h index 2a4da00141bb..91309f090e27 100644 --- a/include/sound/soc-dai.h +++ b/include/sound/soc-dai.h @@ -414,7 +414,7 @@ struct snd_soc_dai_driver { int (*probe)(struct snd_soc_dai *dai); int (*remove)(struct snd_soc_dai *dai); /* compress dai */ - int (*compress_new)(struct snd_soc_pcm_runtime *rtd, int num); + int (*compress_new)(struct snd_soc_pcm_runtime *rtd); /* Optional Callback used at pcm creation*/ int (*pcm_new)(struct snd_soc_pcm_runtime *rtd, struct snd_soc_dai *dai); diff --git a/sound/soc/sunxi_v2/snd_sunxi_ahub.h b/sound/soc/sunxi_v2/snd_sunxi_ahub.h index b3c1cc592844..cd4be46b6ebf 100644 --- a/sound/soc/sunxi_v2/snd_sunxi_ahub.h +++ b/sound/soc/sunxi_v2/snd_sunxi_ahub.h @@ -64,4 +64,11 @@ struct sunxi_ahub_info { unsigned int bclk_freq; }; +int sunxi_loopback_debug_get(struct snd_kcontrol *kcontrol, + struct snd_ctl_elem_value *ucontrol); +int sunxi_loopback_debug_set(struct snd_kcontrol *kcontrol, + struct snd_ctl_elem_value *ucontrol); +int __init sunxi_ahub_dev_init(void); +void __exit sunxi_ahub_dev_exit(void); + #endif /* __SND_SUNXI_AHUB_H */ diff --git a/sound/soc/sunxi_v2/snd_sunxi_ahub_dam.h b/sound/soc/sunxi_v2/snd_sunxi_ahub_dam.h index b7679bf545e9..436742d87e8f 100644 --- a/sound/soc/sunxi_v2/snd_sunxi_ahub_dam.h +++ b/sound/soc/sunxi_v2/snd_sunxi_ahub_dam.h @@ -288,4 +288,7 @@ struct sunxi_ahub_clk_info { extern int snd_soc_sunxi_ahub_mem_get(struct sunxi_ahub_mem_info *mem_info); extern int snd_soc_sunxi_ahub_clk_get(struct sunxi_ahub_clk_info *clk_info); -#endif /* __SND_SUNXI_AHUB_DAM_H */ \ No newline at end of file +int __init sunxi_ahub_dam_dev_init(void); +void __exit sunxi_ahub_dam_dev_exit(void); + +#endif /* __SND_SUNXI_AHUB_DAM_H */ diff --git a/sound/soc/sunxi_v2/snd_sunxi_mach.c b/sound/soc/sunxi_v2/snd_sunxi_mach.c index ea73eced251e..74d276a2da92 100644 --- a/sound/soc/sunxi_v2/snd_sunxi_mach.c +++ b/sound/soc/sunxi_v2/snd_sunxi_mach.c @@ -43,8 +43,8 @@ static int asoc_simple_hw_params(struct snd_pcm_substream *substream, struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); struct asoc_simple_priv *priv = snd_soc_card_get_drvdata(rtd->card); - struct snd_soc_dai_link *dai_link = simple_priv_to_link(priv, rtd->num); - struct simple_dai_props *dai_props = simple_priv_to_props(priv, rtd->num); + struct snd_soc_dai_link *dai_link = simple_priv_to_link(priv, rtd->id); + struct simple_dai_props *dai_props = simple_priv_to_props(priv, rtd->id); struct asoc_simple_dai *dais = priv->dais; unsigned int mclk; unsigned int cpu_pll_clk, codec_pll_clk; diff --git a/sound/soc/sunxi_v2/snd_sunxi_mach.h b/sound/soc/sunxi_v2/snd_sunxi_mach.h index ab429c8841ab..6f9ea8ccf8b5 100644 --- a/sound/soc/sunxi_v2/snd_sunxi_mach.h +++ b/sound/soc/sunxi_v2/snd_sunxi_mach.h @@ -14,4 +14,7 @@ #include "snd_sunxi_mach_utils.h" +int __init sunxi_soundcard_machine_dev_init(void); +void __exit sunxi_soundcard_machine_dev_exit(void); + #endif /* __SND_SUNXI_MACH_H */ -- 2.35.3 0 Quote
Stephen Graf Posted March 24 Posted March 24 @going I am starting to compare the original sound patches from kernel 6.6 to the latest. I came accross a minor point that I suspect does not affect anything, but should be corrected. The patch file: arch/arm64/boot/dts/allwinner/sun50i-h616-orangepi-zero.dtsi has two entries for the audio codec. They are the same so I don't think it affects the final dtb. &codec { allwinner,audio-routing = "Line Out", "LINEOUT"; status = "okay"; }; &de { status = "okay"; }; &codec { allwinner,audio-routing = "Line Out", "LINEOUT"; status = "okay"; }; 0 Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.