Skip to content

Commit 1b151e9

Browse files
mripardpopcornmix
authored andcommitted
drm/vc4: hdmi: Add an audio support flag
The BCM2711 audio support doesn't work yet, so let's add a boolean to indicate whether or not it's supported, and only register a sound card if that boolean is set. Signed-off-by: Maxime Ripard <maxime@cerno.tech>
1 parent a7a164d commit 1b151e9

2 files changed

Lines changed: 7 additions & 0 deletions

File tree

‎drivers/gpu/drm/vc4/vc4_hdmi.c‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -929,6 +929,9 @@ static int vc4_hdmi_audio_init(struct vc4_hdmi *vc4_hdmi)
929929
int ret;
930930
int len;
931931

932+
if (!vc4_hdmi->variant->audio_available)
933+
return 0;
934+
932935
if (!of_find_property(dev->of_node, "dmas", &len) ||
933936
len == 0) {
934937
dev_warn(dev,
@@ -1429,6 +1432,7 @@ static int vc4_hdmi_dev_remove(struct platform_device *pdev)
14291432
}
14301433

14311434
static const struct vc4_hdmi_variant bcm2835_variant = {
1435+
.audio_available = true,
14321436
.registers = vc4_hdmi_fields,
14331437
.num_registers = ARRAY_SIZE(vc4_hdmi_fields),
14341438

‎drivers/gpu/drm/vc4/vc4_hdmi.h‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@ struct vc4_hdmi_variant {
3232
*/
3333
unsigned int id;
3434

35+
/* Set to true when the audio support is available */
36+
bool audio_available;
37+
3538
/* List of the registers available on that variant */
3639
const struct vc4_hdmi_register *registers;
3740

0 commit comments

Comments
 (0)