aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/bcm27xx/patches-5.10/950-0469-Hifiberry-DAC-ADC-Pro-fix-for-the-PLL-when-changing-.patch
diff options
context:
space:
mode:
authorÁlvaro Fernández Rojas <noltari@gmail.com>2021-08-21 10:54:34 +0200
committerÁlvaro Fernández Rojas <noltari@gmail.com>2021-08-21 19:07:07 +0200
commit8299d1f057439f94c6a4412e2e5c5082b82a30c9 (patch)
tree1bf678d61f11f7394493be464c7876e496f7faed /target/linux/bcm27xx/patches-5.10/950-0469-Hifiberry-DAC-ADC-Pro-fix-for-the-PLL-when-changing-.patch
parent33b6885975ce376ff075362b7f0890326043111b (diff)
downloadupstream-8299d1f057439f94c6a4412e2e5c5082b82a30c9.tar.gz
upstream-8299d1f057439f94c6a4412e2e5c5082b82a30c9.tar.bz2
upstream-8299d1f057439f94c6a4412e2e5c5082b82a30c9.zip
bcm27xx: add kernel 5.10 support
Rebased RPi foundation patches on linux 5.10.59, removed applied and reverted patches, wireless patches and defconfig patches. bcm2708: boot tested on RPi B+ v1.2 bcm2709: boot tested on RPi 4B v1.1 4G 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.10/950-0469-Hifiberry-DAC-ADC-Pro-fix-for-the-PLL-when-changing-.patch')
-rw-r--r--target/linux/bcm27xx/patches-5.10/950-0469-Hifiberry-DAC-ADC-Pro-fix-for-the-PLL-when-changing-.patch56
1 files changed, 56 insertions, 0 deletions
diff --git a/target/linux/bcm27xx/patches-5.10/950-0469-Hifiberry-DAC-ADC-Pro-fix-for-the-PLL-when-changing-.patch b/target/linux/bcm27xx/patches-5.10/950-0469-Hifiberry-DAC-ADC-Pro-fix-for-the-PLL-when-changing-.patch
new file mode 100644
index 0000000000..e3b7e30b2e
--- /dev/null
+++ b/target/linux/bcm27xx/patches-5.10/950-0469-Hifiberry-DAC-ADC-Pro-fix-for-the-PLL-when-changing-.patch
@@ -0,0 +1,56 @@
+From efe6cdae919bf4beffbef1e5691f2766182e0803 Mon Sep 17 00:00:00 2001
+From: Joerg Schambacher <joerg@i2audio.com>
+Date: Mon, 1 Feb 2021 16:53:46 +0100
+Subject: [PATCH] Hifiberry DAC+ADC Pro fix for the PLL when changing
+ sample rates
+
+Adds 2 msecs delay when switching between oscillators to allow
+correct PLL settling.
+Thanks to Clive Messer for the support!
+
+Signed-off-by: Joerg Schambacher <joerg@hifiberry.com>
+---
+ sound/soc/bcm/hifiberry_dacplusadcpro.c | 14 ++++----------
+ 1 file changed, 4 insertions(+), 10 deletions(-)
+
+--- a/sound/soc/bcm/hifiberry_dacplusadcpro.c
++++ b/sound/soc/bcm/hifiberry_dacplusadcpro.c
+@@ -190,6 +190,7 @@ static void snd_rpi_hifiberry_dacplusadc
+ PCM512x_GPIO_CONTROL_1, 0x24, 0x04);
+ break;
+ }
++ usleep_range(2000, 2100);
+ }
+
+ static void snd_rpi_hifiberry_dacplusadcpro_clk_gpio(struct snd_soc_component *component)
+@@ -207,13 +208,6 @@ static bool snd_rpi_hifiberry_dacplusadc
+ return (!(sck & 0x40));
+ }
+
+-static bool snd_rpi_hifiberry_dacplusadcpro_is_sclk_sleep(
+- struct snd_soc_component *component)
+-{
+- msleep(2);
+- return snd_rpi_hifiberry_dacplusadcpro_is_sclk(component);
+-}
+-
+ static bool snd_rpi_hifiberry_dacplusadcpro_is_pro_card(struct snd_soc_component *component)
+ {
+ bool isClk44EN, isClk48En, isNoClk;
+@@ -221,13 +215,13 @@ static bool snd_rpi_hifiberry_dacplusadc
+ snd_rpi_hifiberry_dacplusadcpro_clk_gpio(component);
+
+ snd_rpi_hifiberry_dacplusadcpro_select_clk(component, HIFIBERRY_DACPRO_CLK44EN);
+- isClk44EN = snd_rpi_hifiberry_dacplusadcpro_is_sclk_sleep(component);
++ isClk44EN = snd_rpi_hifiberry_dacplusadcpro_is_sclk(component);
+
+ snd_rpi_hifiberry_dacplusadcpro_select_clk(component, HIFIBERRY_DACPRO_NOCLOCK);
+- isNoClk = snd_rpi_hifiberry_dacplusadcpro_is_sclk_sleep(component);
++ isNoClk = snd_rpi_hifiberry_dacplusadcpro_is_sclk(component);
+
+ snd_rpi_hifiberry_dacplusadcpro_select_clk(component, HIFIBERRY_DACPRO_CLK48EN);
+- isClk48En = snd_rpi_hifiberry_dacplusadcpro_is_sclk_sleep(component);
++ isClk48En = snd_rpi_hifiberry_dacplusadcpro_is_sclk(component);
+
+ return (isClk44EN && isClk48En && !isNoClk);
+ }