PHLAK Posted September 17 Posted September 17 (edited) I've been using a few Rock Pi S devices as snapcast clients and after updating them to Armbian 24.8.2 audio does not work anymore. This seems similar to this old post (fix PR). Also, this PR may be a relevant to the issue. https://paste.armbian.com/aziwayelen $ snapclient --host [REDACTED] 2024-09-17 09-28-10.435 [Error] (Snapclient) PCM device "default" not found 2024-09-17 09-28-10.436 [Info] (Snapclient) Version 0.26.0 2024-09-17 09-28-10.437 [Info] (Connection) Resolving host IP for: [REDACTED] 2024-09-17 09-28-10.440 [Info] (Connection) Connecting 2024-09-17 09-28-10.442 [Notice] (Connection) Connected to 192.168.0.100 2024-09-17 09-28-10.442 [Info] (Connection) My MAC: "42:00:00:00:80:30", socket: 8 2024-09-17 09-28-10.518 [Info] (Controller) ServerSettings - buffer: 1000, latency: 0, volume: 75, muted: 0 2024-09-17 09-28-10.519 [Info] (Controller) Codec: flac, sampleformat: 48000:16:2 2024-09-17 09-28-10.520 [Info] (Player) Player name: alsa, device: default, description: <none>, idx: -1, sharing mode: unspecified, parameters: <none> 2024-09-17 09-28-10.520 [Info] (Player) Mixer mode: software, parameters: <none> 2024-09-17 09-28-10.520 [Info] (Player) Sampleformat: 48000:16:2, stream: 48000:16:2 2024-09-17 09-28-10.520 [Info] (Alsa) Using default buffer_time: 80 ms, default fragments: 4 ALSA lib confmisc.c:855:(parse_card) cannot find card '0' ALSA lib conf.c:5180:(_snd_config_evaluate) function snd_func_card_inum returned error: No such file or directory ALSA lib confmisc.c:422:(snd_func_concat) error evaluating strings ALSA lib conf.c:5180:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory ALSA lib confmisc.c:1334:(snd_func_refer) error evaluating name ALSA lib conf.c:5180:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory ALSA lib conf.c:5703:(snd_config_expand) Evaluate error: No such file or directory ALSA lib pcm.c:2666:(snd_pcm_open_noupdate) Unknown PCM default 2024-09-17 09-28-10.528 [Error] (Alsa) Exception: Can't open default, error: No such file or directory, code: -2 2024-09-17 09-28-10.530 [Fatal] (Snapclient) Exception: Can't open default, error: No such file or directory 2024-09-17 09-28-10.530 [Notice] (Snapclient) Snapclient terminated. $ aplay -l aplay: device_list:274: no soundcards found... When following the instructions on the official wiki to enable the audio jack I get a `Permission denied` error echoing a value to the `/sys/class/gpio/export` (but not gpio15). $ sudo echo 15 > /sys/class/gpio/export -bash: /sys/class/gpio/export: Permission denied $ sudo cat /sys/class/gpio/export cat: /sys/class/gpio/export: Permission denied $ ls -Al /sys/class/gpio/ total 0 --w------- 1 root root 4096 Sep 17 09:16 export lrwxrwxrwx 1 root root 0 Sep 17 09:16 gpio15 -> ../../devices/platform/pinctrl/ff220000.gpio/gpiochip0/gpio/gpio15 lrwxrwxrwx 1 root root 0 Dec 31 1969 gpiochip0 -> ../../devices/platform/pinctrl/ff220000.gpio/gpio/gpiochip0 lrwxrwxrwx 1 root root 0 Dec 31 1969 gpiochip128 -> ../../devices/platform/pinctrl/ff260000.gpio/gpio/gpiochip128 lrwxrwxrwx 1 root root 0 Dec 31 1969 gpiochip32 -> ../../devices/platform/pinctrl/ff230000.gpio/gpio/gpiochip32 lrwxrwxrwx 1 root root 0 Dec 31 1969 gpiochip64 -> ../../devices/platform/pinctrl/ff240000.gpio/gpio/gpiochip64 lrwxrwxrwx 1 root root 0 Dec 31 1969 gpiochip96 -> ../../devices/platform/pinctrl/ff250000.gpio/gpio/gpiochip96 --w------- 1 root root 4096 Sep 17 09:36 unexport Edited September 18 by PHLAK 0 Quote
Solution PHLAK Posted September 25 Author Solution Posted September 25 I was able to fix this by updating to the 6.7 kernel via `armbian-config`. 0 Quote
PHLAK Posted November 22 Author Posted November 22 (edited) Looks like this is broken again in Armbian 24.8.3 with kernel v6.11.0 and, even worse, when attempting to install another kerenl via `armbian-config` it says there are no other kernels available. $ uname -a Linux snapclient-kitchen 6.11.0-edge-rockchip64 #1 SMP PREEMPT Sun Sep 15 14:57:56 UTC 2024 aarch64 GNU/Linux Edited November 22 by PHLAK 0 Quote
Igor Posted November 23 Posted November 23 12 hours ago, PHLAK said: like this is broken again in Armbian 24.8.3 with kernel v6.11.0 This is highly expected. We don't even try to support EDGE kernels at end user level. This kernel is EOL and will be replaced with a v6.12.y in next year Q1 release. But we can't secure you that this problem will be fixed as support budget is negative (we have some support for other boards from Radxa) and we, nobody in the team, can't afford to spent days or weeks resolving this. However, you are welcome to spent at least time and join debugging this - problems is as yours as it is ours. The reasons why we keep build framework in a good state is that you can help resolving problems https://github.com/armbian/build We are and will always be too small to face this mountain of problems that are generated by everyone, compensated by no-one. Not by us, but all community that is poking kernels, and hardware dealers that are flooding this market. 0 Quote
PHLAK Posted November 23 Author Posted November 23 Thanks @Igor, I think I was on the edge kernel due to my attempts to fix this issue when it first occurred so I downgraded back to the current (v6.6.60) kernel. $ uname -a Linux snapclient-kitchen 6.6.60-current-rockchip64 #1 SMP PREEMPT Fri Nov 8 15:28:28 UTC 2024 aarch64 GNU/Linux Unfortunately the issue is still present. $ aplay -l aplay: device_list:274: no soundcards found... $ sudo echo 15 > /sys/class/gpio/export -bash: /sys/class/gpio/export: Permission denied $ sudo cat /sys/class/gpio/export cat: /sys/class/gpio/export: Permission denied 0 Quote
PHLAK Posted November 23 Author Posted November 23 (edited) Also, I totally understand the issue of support in open source projects. I maintain open source software of my own and respect the time and effort it takes. That being said I'm willing to help debug this regression. However, I have no idea how to get started other than what I mentioned in my original post (e.g. PR #6886 possibly being related to the issue). If you have any suggestions or documentation I can follow to get started debugging this I'm happy to help. Edited November 23 by PHLAK 0 Quote
Igor Posted November 23 Posted November 23 22 minutes ago, PHLAK said: PR #6886 possibly being related to the issue That was quick fix to secure compiling. Checking all functions on all devices for each kernel upgrade is impossible, so I don't even try. Automated testing is primitive and only catches fatal problems, while now not even that as its currently broken. And this device is not a part of this. I only have one of such device, probably from pre-production series. Try to use a device-tree from a kernel that works - on 6.6 and 6.11. Then lets diff the code. 0 Quote
eselarm Posted November 23 Posted November 23 (edited) I see you use or need some GPIO in order to have audio device enabled. In newer kernel versions GPIO numbering will be sort of random and AFAIK this sysfs method will disappear. So I think for future, extra code is needed to find the correct GPIO and then also treat it like a character device. So open, close etc. See libgpiod for more info. Edited November 23 by eselarm 0 Quote
PHLAK Posted November 23 Author Posted November 23 5 minutes ago, Igor said: Try to use a device-tree from a kernel that works - on 6.6 and 6.11. Then lets diff the code. I get what that means in principle but how do I do this in practice? Also, to clarify, the problem occurred after upgrading to the 6.6 kernel (and Armbian v24.8.2) and was working before that on the stable kernel. I was able to work around the issue (at least temporarily) by upgrading to the 6.7-edge or 6.8-edge kernels but it is broken again on the 6.11-edge kernel. 3 minutes ago, eselarm said: In newer kernel versions GPIO numbering will be sort of random and AFAIK this sysfs method will disappear. So I think for future, extra code is needed to find the correct GPIO and then also threat is like a character device. So open close etc. See libgpiod for more info. This is good to know, I'll look into libgpiod. Is there any more direction about that you might be able to give? 0 Quote
eselarm Posted November 23 Posted November 23 I have been reading various info mostly last 2 years on RPi forum, maybe scan https://forums.raspberrypi.com/search.php?keywords=libgpiod Many people don't want change so most is about keeping it the old way. I saw a warning in dmesg for 6.12.0-current-rockchip-rk3588 on my NanoPi-R6C. I don't use it there for own code, but do on a NanoPi-NEO to toggle an ON/OFF power-switch. Works still there for 6.6.44, but might be that some small C-program is needed in future, haven't looked at it further yet. 0 Quote
brentr Posted November 25 Posted November 25 @eselarm I'm seeing that both the 6.6 and 6.12 kernels have broken RK3308 audio support. In both, with the Auto Hat installed, ls /dev/snd shows only the seq and time device nodes. With older kernels I see: # ls /dev/snd by-path controlC0 pcmC0D0c pcmC0D0p seq timer Does this agree with what you are seeing? Do you also see these device nodes when running the 6.7 and 6.8 kernels? If so, could you send me the output of $uname -a for those working kernels. Sound support for the RK3308 is provided via a fairly large patch. It's gotten broken before. Finding the last working version will be _very_ helpful. What's really odd here is that 6.6 doesn't work and 6.7 does and, then, 6.11 fails?! I'll make some time in the coming weeks to look into this. 0 Quote
brentr Posted November 25 Posted November 25 Opened Jira issue for tracking this: https://armbian.atlassian.net/issues/AR-2542 1 Quote
brentr Posted November 25 Posted November 25 Well, there's really no mystery here after all. The relevant audio patches were disabled because they had been allegedly mainlined. Did anyone test after making these wholesale changes? Looks like the support got disabled then put back and disabled again. Version 6.9 might be the last one that worked. 0 Quote
brentr Posted November 25 Posted November 25 Confirmed that the 6.9 kernel still supports RK3308 audio It is still buildable within the current Armbian -- with proper configuration. Investigating how best to publish this. 0 Quote
PHLAK Posted November 25 Author Posted November 25 I currently only have the 6.8.11 kernel running but here's the output for that. $ uname -a Linux snapclient-living-room 6.8.11-edge-rockchip64 #1 SMP PREEMPT Sat May 25 14:28:41 UTC 2024 aarch64 GNU/Linux $ ls /dev/snd/ by-path controlC0 pcmC0D0c pcmC0D0p seq timer I'll see about getting the output for other kernel versions later. 0 Quote
PHLAK Posted November 25 Author Posted November 25 $ uname -a Linux snapclient-kitchen 6.6.60-current-rockchip64 #1 SMP PREEMPT Fri Nov 8 15:28:28 UTC 2024 aarch64 GNU/Linux $ ls /dev/snd/ seq timer 0 Quote
brentr Posted November 25 Posted November 25 The 6.8.11-edge kernel looks good. Can you get audio from that? 0 Quote
PHLAK Posted November 25 Author Posted November 25 (edited) Not sure if this is intentional but I am no longer seeing edge kernels when selecting "Install alternative kernels" via `armbian-config`. However, I was able to install the `linux-image-edge-rockchip64` package manually. Unfortunately audio still seems to be broken. $ uname -a Linux snapclient-kitchen 6.11.0-edge-rockchip64 #1 SMP PREEMPT Sun Sep 15 14:57:56 UTC 2024 aarch64 GNU/Linux $ ls /dev/snd/ seq timer $ aplay -l aplay: device_list:274: no soundcards found... $ sudo echo 15 > /sys/class/gpio/export -bash: /sys/class/gpio/export: Permission denied Edited November 25 by PHLAK 0 Quote
PHLAK Posted November 25 Author Posted November 25 (edited) Oh, you said 6.8.11 (not 6.11). I don't see that kernel available in the repos anymore. $ sudo apt search linux-image | grep rockchip64 linux-image-current-rockchip64/bookworm,now 24.11.1 arm64 [installed] Armbian Linux current kernel image 6.6.60-current-rockchip64 linux-image-edge-rockchip64/bookworm,now 24.8.3 arm64 [installed] Armbian Linux edge kernel image 6.11.0-edge-rockchip64 Also, yes, the 6.8.11 kernel seems to be working (on another device that I haven't updated in a while). Edited November 25 by PHLAK 0 Quote
Igor Posted November 27 Posted November 27 On 11/25/2024 at 10:03 PM, PHLAK said: Not sure if this is intentional but I am no longer seeing edge kernels when selecting "Install alternative kernels" via `armbian-config`. This was moved under a switch to prevent users for switching into kernels that are not meant for end-users. https://github.com/armbian/build/blob/main/config/boards/rock-5b.conf#L7 And this https://github.com/armbian/configng/blob/main/tools/modules/system/switch_kernels.sh is the logic for anyone that might to change / improve this. 1 Quote
brentr Posted November 28 Posted November 28 There is an audio fix for the RockPI S going into the 6.6 "current" kernel. Try reinstalling "current" after the next time it updates (in a few days) Kernels later >6.10 switched to the mainline support for this audio chip. It sort of works, but the audio level controls do not. 0 Quote
PHLAK Posted November 28 Author Posted November 28 Awesome! I will be on the look out for that update. Thank you so much! 0 Quote
jock Posted November 28 Posted November 28 You're welcome in supporting the armbian project if you want and if you can. 😉 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.