aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/brcm2708/patches-4.14/950-0161-ASoC-bcm2835-fix-hw_params-error-when-device-is-in-p.patch
diff options
context:
space:
mode:
authorÁlvaro Fernández Rojas <noltari@gmail.com>2019-08-02 18:55:55 +0200
committerÁlvaro Fernández Rojas <noltari@gmail.com>2019-08-02 18:55:55 +0200
commit00813d4dd976cc823fa089840ff2f4a10dd6cd0c (patch)
tree8f2c74a928c9ea0eceb64809d9039db824ae6663 /target/linux/brcm2708/patches-4.14/950-0161-ASoC-bcm2835-fix-hw_params-error-when-device-is-in-p.patch
parent19226502bf6393706defe7f049c587b32c9b4f33 (diff)
downloadupstream-00813d4dd976cc823fa089840ff2f4a10dd6cd0c.tar.gz
upstream-00813d4dd976cc823fa089840ff2f4a10dd6cd0c.tar.bz2
upstream-00813d4dd976cc823fa089840ff2f4a10dd6cd0c.zip
brcm2708: remove linux 4.14 support
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Diffstat (limited to 'target/linux/brcm2708/patches-4.14/950-0161-ASoC-bcm2835-fix-hw_params-error-when-device-is-in-p.patch')
-rw-r--r--target/linux/brcm2708/patches-4.14/950-0161-ASoC-bcm2835-fix-hw_params-error-when-device-is-in-p.patch69
1 files changed, 0 insertions, 69 deletions
diff --git a/target/linux/brcm2708/patches-4.14/950-0161-ASoC-bcm2835-fix-hw_params-error-when-device-is-in-p.patch b/target/linux/brcm2708/patches-4.14/950-0161-ASoC-bcm2835-fix-hw_params-error-when-device-is-in-p.patch
deleted file mode 100644
index e94199288b..0000000000
--- a/target/linux/brcm2708/patches-4.14/950-0161-ASoC-bcm2835-fix-hw_params-error-when-device-is-in-p.patch
+++ /dev/null
@@ -1,69 +0,0 @@
-From 0f409e6c30a04eb85792a6883e81ad2af118c7bd Mon Sep 17 00:00:00 2001
-From: Matthias Reichl <github@hias.horus.com>
-Date: Thu, 18 Jan 2018 12:36:44 +0100
-Subject: [PATCH 161/454] ASoC: bcm2835: fix hw_params error when device is in
- prepared state (#2345)
-
-commit 8d5737a5f53902a916ee1e1cb248c9b8b883b2ea upstream.
-
-If bcm2835 is configured as bitclock master calling hw_params()
-after prepare() fails with EBUSY. This also makes it impossible to
-use bcm2835 in full duplex mode.
-
-The error is caused by the split clock setup: clk_set_rate
-is called in hw_params, clk_prepare_enable in prepare. As hw_params
-doesn't check if the clock was already enabled clk_set_rate
-fails with EBUSY.
-
-Fix this by moving clock startup from prepare to hw_params and
-let hw_params properly deal with an already set up or enabled
-clock.
-
-Signed-off-by: Matthias Reichl <hias@horus.com>
----
- sound/soc/bcm/bcm2835-i2s.c | 20 ++++++++++++++------
- 1 file changed, 14 insertions(+), 6 deletions(-)
-
---- a/sound/soc/bcm/bcm2835-i2s.c
-+++ b/sound/soc/bcm/bcm2835-i2s.c
-@@ -130,6 +130,7 @@ struct bcm2835_i2s_dev {
- struct regmap *i2s_regmap;
- struct clk *clk;
- bool clk_prepared;
-+ int clk_rate;
- };
-
- static void bcm2835_i2s_start_clock(struct bcm2835_i2s_dev *dev)
-@@ -419,10 +420,19 @@ static int bcm2835_i2s_hw_params(struct
- }
-
- /* Clock should only be set up here if CPU is clock master */
-- if (bit_clock_master) {
-- ret = clk_set_rate(dev->clk, bclk_rate);
-- if (ret)
-- return ret;
-+ if (bit_clock_master &&
-+ (!dev->clk_prepared || dev->clk_rate != bclk_rate)) {
-+ if (dev->clk_prepared)
-+ bcm2835_i2s_stop_clock(dev);
-+
-+ if (dev->clk_rate != bclk_rate) {
-+ ret = clk_set_rate(dev->clk, bclk_rate);
-+ if (ret)
-+ return ret;
-+ dev->clk_rate = bclk_rate;
-+ }
-+
-+ bcm2835_i2s_start_clock(dev);
- }
-
- /* Setup the frame format */
-@@ -618,8 +628,6 @@ static int bcm2835_i2s_prepare(struct sn
- struct bcm2835_i2s_dev *dev = snd_soc_dai_get_drvdata(dai);
- uint32_t cs_reg;
-
-- bcm2835_i2s_start_clock(dev);
--
- /*
- * Clear both FIFOs if the one that should be started
- * is not empty at the moment. This should only happen