diff options
author | Álvaro Fernández Rojas <noltari@gmail.com> | 2021-02-18 18:04:33 +0100 |
---|---|---|
committer | Álvaro Fernández Rojas <noltari@gmail.com> | 2021-02-18 23:42:32 +0100 |
commit | f07e572f6447465d8938679533d604e402b0f066 (patch) | |
tree | cb333bd2a67e59e7c07659514850a0fd55fc825e /target/linux/bcm27xx/patches-5.4/950-0763-snd_bcm2835-disable-HDMI-audio-when-vc4-is-used-3640.patch | |
parent | 5d3a6fd970619dfc55f8259035c3027d7613a2a6 (diff) | |
download | upstream-f07e572f6447465d8938679533d604e402b0f066.tar.gz upstream-f07e572f6447465d8938679533d604e402b0f066.tar.bz2 upstream-f07e572f6447465d8938679533d604e402b0f066.zip |
bcm27xx: import latest patches from the RPi foundation
bcm2708: boot tested on RPi B+ v1.2
bcm2709: boot tested on RPi 3B v1.2 and RPi 4B v1.1 4G
bcm2710: boot tested on RPi 3B v1.2
bcm2711: boot tested on RPi 4B v1.1 4G
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Diffstat (limited to 'target/linux/bcm27xx/patches-5.4/950-0763-snd_bcm2835-disable-HDMI-audio-when-vc4-is-used-3640.patch')
-rw-r--r-- | target/linux/bcm27xx/patches-5.4/950-0763-snd_bcm2835-disable-HDMI-audio-when-vc4-is-used-3640.patch | 92 |
1 files changed, 92 insertions, 0 deletions
diff --git a/target/linux/bcm27xx/patches-5.4/950-0763-snd_bcm2835-disable-HDMI-audio-when-vc4-is-used-3640.patch b/target/linux/bcm27xx/patches-5.4/950-0763-snd_bcm2835-disable-HDMI-audio-when-vc4-is-used-3640.patch new file mode 100644 index 0000000000..ed45410294 --- /dev/null +++ b/target/linux/bcm27xx/patches-5.4/950-0763-snd_bcm2835-disable-HDMI-audio-when-vc4-is-used-3640.patch @@ -0,0 +1,92 @@ +From 744543757bef8621f7791e28ecb894b2627cb449 Mon Sep 17 00:00:00 2001 +From: Hristo Venev <hristo@venev.name> +Date: Fri, 5 Jun 2020 09:22:49 +0000 +Subject: [PATCH] snd_bcm2835: disable HDMI audio when vc4 is used + (#3640) + +Things don't work too well when both the vc4 driver and the firmware +driver are trying to control the same audio output: + +[ 763.569406] bcm2835_audio bcm2835_audio: vchi message timeout, msg=5 + +Hence, when the vc4 HDMI driver is used, let it control audio. This is done +by introducing a new device tree property to the audio node, and +extending the vc4-kms-v3d overlays to set it appropriately. + +Signed-off-by: Hristo Venev <hristo@venev.name> +--- + arch/arm/boot/dts/overlays/README | 2 ++ + arch/arm/boot/dts/overlays/vc4-kms-v3d-overlay.dts | 10 +++++++++- + arch/arm/boot/dts/overlays/vc4-kms-v3d-pi4-overlay.dts | 8 ++++++++ + drivers/staging/vc04_services/bcm2835-audio/bcm2835.c | 4 +++- + 4 files changed, 22 insertions(+), 2 deletions(-) + +--- a/arch/arm/boot/dts/overlays/README ++++ b/arch/arm/boot/dts/overlays/README +@@ -2745,6 +2745,7 @@ Params: cma-256 CMA is 2 + cma-size CMA size in bytes, 4MB aligned + cma-default Use upstream's default value + audio Enable or disable audio over HDMI (default "on") ++ noaudio Disable all HDMI audio (default "off") + + + Name: vc4-kms-v3d-pi4 +@@ -2761,6 +2762,7 @@ Params: cma-256 CMA is 2 + "on") + audio1 Enable or disable audio over HDMI1 (default + "on") ++ noaudio Disable all HDMI audio (default "off") + + + Name: vga666 +--- a/arch/arm/boot/dts/overlays/vc4-kms-v3d-overlay.dts ++++ b/arch/arm/boot/dts/overlays/vc4-kms-v3d-overlay.dts +@@ -108,7 +108,15 @@ + }; + }; + ++ fragment@14 { ++ target = <&audio>; ++ __overlay__ { ++ brcm,disable-hdmi; ++ }; ++ }; ++ + __overrides__ { +- audio = <0>,"!13"; ++ audio = <0>,"!13", <0>,"=14"; ++ noaudio = <0>,"=13", <0>,"!14"; + }; + }; +--- a/arch/arm/boot/dts/overlays/vc4-kms-v3d-pi4-overlay.dts ++++ b/arch/arm/boot/dts/overlays/vc4-kms-v3d-pi4-overlay.dts +@@ -138,8 +138,16 @@ + }; + }; + ++ fragment@19 { ++ target = <&audio>; ++ __overlay__ { ++ brcm,disable-hdmi; ++ }; ++ }; ++ + __overrides__ { + audio = <0>,"!17"; + audio1 = <0>,"!18"; ++ noaudio = <0>,"=17", <0>,"=18", <0>,"!19"; + }; + }; +--- a/drivers/staging/vc04_services/bcm2835-audio/bcm2835.c ++++ b/drivers/staging/vc04_services/bcm2835-audio/bcm2835.c +@@ -381,7 +381,9 @@ static int snd_bcm2835_alsa_probe(struct + } + + if (!enable_compat_alsa) { +- set_hdmi_enables(dev); ++ if (!of_property_read_bool(dev->of_node, "brcm,disable-hdmi")) ++ set_hdmi_enables(dev); ++ + // In this mode, always enable analog output + enable_headphones = true; + } else { |