rpi: enable headphones only for 'default' sound card
authorHugo Villeneuve <hugo@hugovil.com>
Sat, 13 Dec 2025 22:54:47 +0000 (17:54 -0500)
committerHugo Villeneuve <hugo@hugovil.com>
Fri, 23 Jan 2026 16:44:47 +0000 (11:44 -0500)
Signed-off-by: Hugo Villeneuve <hugo@hugovil.com>
raspberrypi/recipes-bsp/bootfiles/rpi-cmdline.bbappend

index e3f29a9..b4ff474 100644 (file)
@@ -1,4 +1,6 @@
-CMDLINE_HEADPHONES ?= "snd_bcm2835.enable_headphones=1"
+ENABLE_HEADPHONES := "${@bb.utils.contains('SOUND_CARD', 'default', '1', '0', d)}"
+
+CMDLINE_HEADPHONES ?= "snd_bcm2835.enable_headphones=${ENABLE_HEADPHONES}"
 
 # Remove root=..., which will be set with our custom boot.scr script:
 CMDLINE_ROOTFS = "${CMDLINE_ROOT_FSTYPE} rootwait"