-
Notifications
You must be signed in to change notification settings - Fork 5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
staging: bcm2835-audio: Add missing MODULE_ALIAS #3681
staging: bcm2835-audio: Add missing MODULE_ALIAS #3681
Conversation
Commit 8353fe6 ("Revert "staging: bcm2835-audio: Drop DT dependency"") reverts the upstream change and makes bcm2835-audio use device tree again, however, it also removes the MODULE_ALIAS for the platform device. This MODULE_ALIAS is needed, because VCHIQ registers bcm2835-audio as a child platform device since commit 25c7597 ("staging: vchiq_arm: Register a platform device for audio"), and this mechanism is adopted also in the downstream kernel. This commit puts back that MODULE_ALIAS to make bcm2835-audio autoprobing work again. The rest of VCHIQ children have their MODULE_ALIASes in place. Fixes: 8353fe6 ("Revert "staging: bcm2835-audio: Drop DT dependency"") Signed-off-by: Maxim Mikityanskiy <[email protected]>
@pelwell any objections? |
I don't object to the alias being added again, but I'd like to understand why the driver is being loaded and probed in our builds via the DT MODALIAS ("MODALIAS=of:Nbcm2835_audioT(null)Cbrcm,bcm2835-audio") and not in @gentoo-root's. I've tested rpi-5.7.y in 32-bit and 64-bit configurations, and both work as expected. |
That's weird. If it's the matter of configuration, then it may be more correct to change (def)config, rather than add the upstream modalias. Let's try to figure out what's the difference between our setups. I'm on 64-bit rpi-5.7.y, bcmrpi3_defconfig plus a few extra options that should not be relevant:
If I remember correctly, it worked for me long ago on 5.0.y, but back then there weren't those upstream commits that make audio a platform device, so it makes sense. I guess Now if I add some debugging to
I see that
If you could get similar udev logs, that would be wonderful. It would help us find out what events udev reacts to on your system and compare to mine. It might also happen that you have some hacks in udev rules and scripts like this. I don't have any udev rules from Raspbian on my system — only the standard set shipped with udev. Choosing between such modprobe hack and the proper modalias in the kernel, the latter looks more correct. |
This is the result on my system. Note that I extended the platform_uevent logging to also display the name of the calling process when the device is
What you see is the initial platform alias, then 11 OF aliases, apparently triggered as the result of Adding the platform alias doesn't change where the probe occurs for me, but it is clearly the right thing to do in general. |
kernel: brcmfmac: Prefer a ccode from OTP over nvram file kernel: staging: bcm2835-audio: Add missing MODULE_ALIAS See: raspberrypi/linux#3681 kernel: IRS1125 sensor driver updates See: raspberrypi/linux#3544 kernel: Revert downstream SPI patches See: raspberrypi/linux#3687 kernel: PCI: brcmstb: Add DT property to control L1SS firmware: hdmi: Set HD_CTL_WHOLSMP and HD_CTL_CHALIGN_SET See: https://forum.kodi.tv/showthread.php?tid=354589 firmware: arm_ldconfig: Honour the kernel8 text offset See: #1415 firmware: jpeghw: Skip repeated 0xFF padding bytes between markers See: RPi-Distro/vlc#8 filesystem: Add support for SD cards with GPT partition table
kernel: brcmfmac: Prefer a ccode from OTP over nvram file kernel: staging: bcm2835-audio: Add missing MODULE_ALIAS See: raspberrypi/linux#3681 kernel: IRS1125 sensor driver updates See: raspberrypi/linux#3544 kernel: Revert downstream SPI patches See: raspberrypi/linux#3687 kernel: PCI: brcmstb: Add DT property to control L1SS firmware: hdmi: Set HD_CTL_WHOLSMP and HD_CTL_CHALIGN_SET See: https://forum.kodi.tv/showthread.php?tid=354589 firmware: arm_ldconfig: Honour the kernel8 text offset See: raspberrypi/firmware#1415 firmware: jpeghw: Skip repeated 0xFF padding bytes between markers See: RPi-Distro/vlc#8 filesystem: Add support for SD cards with GPT partition table
After changes introduced by #3448, bcm2835-audio doesn't have modalias
platform:bcm2835_audio
anymore, but it's added as a platform device child of VCHIQ. It leads to a situation wheresnd_bcm2825
module is not probed on boot, even withdtparam=audio=on
. The issue is fixed by this commit.