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>
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
"on")
audio1 Enable or disable audio over HDMI1 (default
"on")
+ noaudio Disable all HDMI audio (default "off")
Name: vga666
};
};
+ fragment@14 {
+ target = <&audio>;
+ __overlay__ {
+ brcm,disable-hdmi;
+ };
+ };
+
__overrides__ {
- audio = <0>,"!13";
+ audio = <0>,"!13", <0>,"=14";
+ noaudio = <0>,"=13", <0>,"!14";
};
};
};
};
+ fragment@19 {
+ target = <&audio>;
+ __overlay__ {
+ brcm,disable-hdmi;
+ };
+ };
+
__overrides__ {
audio = <0>,"!17";
audio1 = <0>,"!18";
+ noaudio = <0>,"=17", <0>,"=18", <0>,"!19";
};
};
}
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 {