Sarpi / Raspberry (RPi 3) - sound issue under 5.4.18-v7-arm
omxplayer sound works.
RetroArch emulator sound no longer works (worked on 5.4.16 and everything earlier). The problem may be somehow related to the module snd_bcm2835. In 5.4.16 and earlier, this module was always loaded automatically. With 5.4.18, module is not loaded at boot. I can modprobe it manually after boot, but there are errors appearing in dmesg when I do that, and even though it appears as loaded in lsmod, I get no sound in my RetroArch game emulator. More details below, of differences I see in 5.4.16 vs 5.4.18. Don't have a clue yet of root cause. Code:
[root@rpi2 ~]# uname -a Code:
[root@rpi2 ~]# uname -a |
Quote:
RetroArch is 3rd party software and the bane of my Slackware ARM experience. I once had a guy bother me on and off for over a year about this software, telling me that SARPi was broken, etc. Only to find, after RetroArch was updated, things magically started to work again, little by little. :D Allow me try and put it in simple terms. Here's the situation... Your touchscreen, for example, started working because the drivers and firmware have now been included in kernel 5.4.x source and that's attributed to the RPi guys who maintain it. Likewise with omxplayer and pretty much everything else that now works which didn't before. Why doesn't every thing just work as expected? Because kernel 5.4.x isn't the current working kernel version that's being developed and shipped with Raspbian. It may become that, but time will surely tell. In this environment it's expected that some things will NOT work as expected, not the other way around. Work is somewhat slower than it will be on the current working kernel, but that will change if kernel 5.4.x becomes the working kernel. While under development the kernel 5.4.x version will gradually include updates, patches and fixes, to solve these niggles that you are experiencing. Be aware that it may take some time to be fully realised. But for RetroArch problems I'm not going to spend time looking into it. I've been there before where I've put my sanity at risk by trying to fathom what's causing these issues and got nowhere fast. RetroArch will most probably work eventually. Or at least that's what has happened in the past. Just give it time. Allow everyone and every thing the time to catch up with kernel 5.4.x and things will start to fall into place. ;) |
@Exaga thanks, and I agree that 55 times out of 100 any post that starts with "I have a problem" and contains "*RetroArch*" can be safely ignored as being an esoteric issue not relevant to normal users.
In this case the problem is not RetroArch. What is broken is ALSA sound. The snd-bcm2835.ko is the RPi module used by ALSA to output sound to the RPi hardware. The simple ALSA test utility # speaker-test will output white noise test audio under Sarpi 5.4.16 but outputs no audio at all under Sarpi 5.4.18. Additionally, after running the speaker-test utility, you can also see that cat /proc/asound/modules shows the ALSA driver is loaded 0 snd_bcm2835 under Sarpi 5.4.16, but shows <blank> under 5.4.18. I already looked at kernel source changes between 5.4.16 and 5.4.18 related to snd_bcm2835/bcm2835-audio and saw no changes. Didn't find any relevant changes in firmware or overlays either. Probably the best approach as you recommend is to wait for the kernel or other rpi folks to fix the issue. No doubt if ALSA is broken it will be noticed and fixed in short order. |
Quote:
The ALSA module working in 5.4.16 and not in 5.4.18 doesn't make sense. Unless I have monumentally messed something up! :D |
@Exaga thanks, I'm seeing the following on 5.4.16 vs 5.4.18, same as documented in my initial post. Same on both of my RPi's (model 3 B+). The only thing I change in going from 5.4.16 to 5.4.18 is upgrading the 4 packages:
kernel-modules-sarpi3-5.4.18-armv7-1_slackcurrent_08Feb20_sp1.txz kernel_sarpi3-5.4.18-armv7-1_slackcurrent_08Feb20_sp1.txz sarpi3-boot-firmware-armv7-1_slackcurrent_08Feb20_sp1.txz sarpi3-hacks-3.0-armv7-1_slackcurrent_08Feb20_sp1.txz and rebooting. # rmmod snd_bcm2835; modprobe snd_bcm2835; dmesg 5.4.16: Code:
[Thu Feb 13 07:21:09 2020] snd_bcm2835: module is from the staging directory, the quality is unknown, you have been warned. Code:
[Thu Feb 13 07:22:11 2020] snd_bcm2835: module is from the staging directory, the quality is unknown, you have been warned. |
Quote:
|
@Exaga thanks, nothing urgent, can use 5.4.16 if I need sound.
|
Quote:
RPi4 dmesg: Code:
[ 3.432091] mc: Linux media interface: v0.10 Code:
[ 4.487990] mc: Linux media interface: v0.10 Code:
[ 1409.917250] snd_bcm2835: module is from the staging directory, the quality is unknown, you have been warned. Code:
sgtl5000@0a { I'll do a full rebuild and then test with the DTBs I build and the default DTBs from the RPi github repo. Then work from there to see if I can work out what's causing this issue. It is VERY strange indeed. |
@Exaga thanks for your deep dive on this. After looking at lots of things with no luck, device tree being somehow involved is also my best guess (Failed to get DT property 'brcm,pwm-channels' suggests that might be the case).
As described below I noticed that in 5.4.18 DT the audio block containing the "brcm,pwm-channels" data is inside of a "mailbox" block. My best shot in the dark guess while understanding little is that maybe this different structure in 5.4.18 prevents the snd_bcm2835 module from finding that info and causing it to not work. Details below - Ran the following on my 2 RPi 3's, one running 5.4.16 and the other 5.4.18 after a fresh reboot on each: RPi1: dtc -I fs /sys/firmware/devicetree/base > dtc-5.4.18.stdout.txt 2> dtc-5.4.18.stderr.txt Rpi2: dtc -I fs /sys/firmware/devicetree/base > dtc-5.4.16.stdout.txt 2> dtc-5.4.16.stderr.txt And I see the following differences related to audio: dtc stdout: Code:
5.4.16: Code:
5.4.16: dtc stderr: Code:
5.4.16: |
Quote:
I will keep you posted. |
Fixed for my RPi 3B+ machines under Sarpi 5.4.22-v7-arm !
Fixed by: waiting for this next kernel release :) Thanks to whoever fixed this, cheers. |
Quote:
|
All times are GMT -5. The time now is 01:12 PM. |