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-0286-Add-HDMI1-facility-to-the-driver.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-0286-Add-HDMI1-facility-to-the-driver.patch')
-rw-r--r-- | target/linux/bcm27xx/patches-5.4/950-0286-Add-HDMI1-facility-to-the-driver.patch | 85 |
1 files changed, 85 insertions, 0 deletions
diff --git a/target/linux/bcm27xx/patches-5.4/950-0286-Add-HDMI1-facility-to-the-driver.patch b/target/linux/bcm27xx/patches-5.4/950-0286-Add-HDMI1-facility-to-the-driver.patch new file mode 100644 index 0000000000..b18d1458fd --- /dev/null +++ b/target/linux/bcm27xx/patches-5.4/950-0286-Add-HDMI1-facility-to-the-driver.patch @@ -0,0 +1,85 @@ +From fb8e73c19c2e153444b34e8d9804371095e92fe0 Mon Sep 17 00:00:00 2001 +From: James Hughes <james.hughes@raspberrypi.org> +Date: Tue, 16 Jul 2019 12:18:21 +0100 +Subject: [PATCH] Add HDMI1 facility to the driver. + +For generic ALSA, all you need is the bcm2835.h change, but +have also added structures for IEC958 HDMI. Not sure how to +test those. +--- + .../vc04_services/bcm2835-audio/bcm2835.c | 29 ++++++++++++++++--- + .../vc04_services/bcm2835-audio/bcm2835.h | 4 ++- + 2 files changed, 28 insertions(+), 5 deletions(-) + +--- a/drivers/staging/vc04_services/bcm2835-audio/bcm2835.c ++++ b/drivers/staging/vc04_services/bcm2835-audio/bcm2835.c +@@ -79,7 +79,11 @@ static int bcm2835_audio_alsa_newpcm(str + if (err) + return err; + +- err = snd_bcm2835_new_pcm(chip, "bcm2835 IEC958/HDMI", 1, 0, 1, true); ++ err = snd_bcm2835_new_pcm(chip, "bcm2835 IEC958/HDMI", 1, AUDIO_DEST_HDMI0, 1, true); ++ if (err) ++ return err; ++ ++ err = snd_bcm2835_new_pcm(chip, "bcm2835 IEC958/HDMI1", 2, AUDIO_DEST_HDMI1, 1, true); + if (err) + return err; + +@@ -106,7 +110,7 @@ static struct bcm2835_audio_driver bcm28 + .newctl = snd_bcm2835_new_ctl, + }; + +-static struct bcm2835_audio_driver bcm2835_audio_hdmi = { ++static struct bcm2835_audio_driver bcm2835_audio_hdmi0 = { + .driver = { + .name = "bcm2835_hdmi", + .owner = THIS_MODULE, +@@ -116,7 +120,20 @@ static struct bcm2835_audio_driver bcm28 + .minchannels = 1, + .newpcm = bcm2835_audio_simple_newpcm, + .newctl = snd_bcm2835_new_hdmi_ctl, +- .route = AUDIO_DEST_HDMI ++ .route = AUDIO_DEST_HDMI0 ++}; ++ ++static struct bcm2835_audio_driver bcm2835_audio_hdmi1 = { ++ .driver = { ++ .name = "bcm2835_hdmi", ++ .owner = THIS_MODULE, ++ }, ++ .shortname = "bcm2835 HDMI 1", ++ .longname = "bcm2835 HDMI 1", ++ .minchannels = 1, ++ .newpcm = bcm2835_audio_simple_newpcm, ++ .newctl = snd_bcm2835_new_hdmi_ctl, ++ .route = AUDIO_DEST_HDMI1 + }; + + static struct bcm2835_audio_driver bcm2835_audio_headphones = { +@@ -143,7 +160,11 @@ static struct bcm2835_audio_drivers chil + .is_enabled = &enable_compat_alsa, + }, + { +- .audio_driver = &bcm2835_audio_hdmi, ++ .audio_driver = &bcm2835_audio_hdmi0, ++ .is_enabled = &enable_hdmi, ++ }, ++ { ++ .audio_driver = &bcm2835_audio_hdmi1, + .is_enabled = &enable_hdmi, + }, + { +--- a/drivers/staging/vc04_services/bcm2835-audio/bcm2835.h ++++ b/drivers/staging/vc04_services/bcm2835-audio/bcm2835.h +@@ -33,7 +33,9 @@ enum { + enum snd_bcm2835_route { + AUDIO_DEST_AUTO = 0, + AUDIO_DEST_HEADPHONES = 1, +- AUDIO_DEST_HDMI = 2, ++ AUDIO_DEST_HDMI = 2, // for backwards compatibility. ++ AUDIO_DEST_HDMI0 = 2, ++ AUDIO_DEST_HDMI1 = 3, + AUDIO_DEST_MAX, + }; + |