aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/bcm27xx/patches-4.19/950-0342-ASoC-tlv320aic32x4-Break-out-clock-setting-into-sepa.patch
diff options
context:
space:
mode:
authorAdrian Schmutzler <freifunk@adrianschmutzler.de>2020-02-08 21:58:55 +0100
committerAdrian Schmutzler <freifunk@adrianschmutzler.de>2020-02-14 14:10:51 +0100
commit7d7aa2fd924c27829ec25f825481554dd81bce97 (patch)
tree658b87b89331670266163e522ea5fb52535633cb /target/linux/bcm27xx/patches-4.19/950-0342-ASoC-tlv320aic32x4-Break-out-clock-setting-into-sepa.patch
parente7bfda2c243e66a75ff966ba04c28b1590b5d24c (diff)
downloadupstream-7d7aa2fd924c27829ec25f825481554dd81bce97.tar.gz
upstream-7d7aa2fd924c27829ec25f825481554dd81bce97.tar.bz2
upstream-7d7aa2fd924c27829ec25f825481554dd81bce97.zip
brcm2708: rename target to bcm27xx
This change makes the names of Broadcom targets consistent by using the common notation based on SoC/CPU ID (which is used internally anyway), bcmXXXX instead of brcmXXXX. This is even used for target TITLE in make menuconfig already, only the short target name used brcm so far. Despite, since subtargets range from bcm2708 to bcm2711, it seems appropriate to use bcm27xx instead of bcm2708 (again, as already done for BOARDNAME). This also renames the packages brcm2708-userland and brcm2708-gpu-fw. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de> Acked-by: Álvaro Fernández Rojas <noltari@gmail.com>
Diffstat (limited to 'target/linux/bcm27xx/patches-4.19/950-0342-ASoC-tlv320aic32x4-Break-out-clock-setting-into-sepa.patch')
-rw-r--r--target/linux/bcm27xx/patches-4.19/950-0342-ASoC-tlv320aic32x4-Break-out-clock-setting-into-sepa.patch64
1 files changed, 64 insertions, 0 deletions
diff --git a/target/linux/bcm27xx/patches-4.19/950-0342-ASoC-tlv320aic32x4-Break-out-clock-setting-into-sepa.patch b/target/linux/bcm27xx/patches-4.19/950-0342-ASoC-tlv320aic32x4-Break-out-clock-setting-into-sepa.patch
new file mode 100644
index 0000000000..3a63be1784
--- /dev/null
+++ b/target/linux/bcm27xx/patches-4.19/950-0342-ASoC-tlv320aic32x4-Break-out-clock-setting-into-sepa.patch
@@ -0,0 +1,64 @@
+From 95b3311cbcd29e07af1ee96b6b37c9089567bcff Mon Sep 17 00:00:00 2001
+From: Annaliese McDermond <nh6z@nh6z.net>
+Date: Mon, 18 Mar 2019 20:37:44 -0700
+Subject: [PATCH] ASoC: tlv320aic32x4: Break out clock setting into
+ separate function
+
+commit bf31cbfbe25001036e1e096b1c260bf871766ea5 upstream.
+
+Break the clock setting logic out from the main hw_params. It's
+rather large and unweildy and makes for a large function. This
+also better enables some of the following changes to the clock
+tree access in the driver.
+
+Signed-off-by: Annaliese McDermond <nh6z@nh6z.net>
+Signed-off-by: Mark Brown <broonie@kernel.org>
+---
+ sound/soc/codecs/tlv320aic32x4.c | 26 ++++++++++++++++++--------
+ 1 file changed, 18 insertions(+), 8 deletions(-)
+
+--- a/sound/soc/codecs/tlv320aic32x4.c
++++ b/sound/soc/codecs/tlv320aic32x4.c
+@@ -698,17 +698,13 @@ static int aic32x4_set_dai_fmt(struct sn
+ return 0;
+ }
+
+-static int aic32x4_hw_params(struct snd_pcm_substream *substream,
+- struct snd_pcm_hw_params *params,
+- struct snd_soc_dai *dai)
++static int aic32x4_setup_clocks(struct snd_soc_component *component,
++ unsigned int sample_rate,
++ unsigned int parent_rate)
+ {
+- struct snd_soc_component *component = dai->component;
+- struct aic32x4_priv *aic32x4 = snd_soc_component_get_drvdata(component);
+- u8 iface1_reg = 0;
+- u8 dacsetup_reg = 0;
+ int i;
+
+- i = aic32x4_get_divs(aic32x4->sysclk, params_rate(params));
++ i = aic32x4_get_divs(parent_rate, sample_rate);
+ if (i < 0) {
+ printk(KERN_ERR "aic32x4: sampling rate not supported\n");
+ return i;
+@@ -765,6 +761,20 @@ static int aic32x4_hw_params(struct snd_
+ snd_soc_component_update_bits(component, AIC32X4_BCLKN,
+ AIC32X4_BCLK_MASK, aic32x4_divs[i].blck_N);
+
++ return 0;
++}
++
++static int aic32x4_hw_params(struct snd_pcm_substream *substream,
++ struct snd_pcm_hw_params *params,
++ struct snd_soc_dai *dai)
++{
++ struct snd_soc_component *component = dai->component;
++ struct aic32x4_priv *aic32x4 = snd_soc_component_get_drvdata(component);
++ u8 iface1_reg = 0;
++ u8 dacsetup_reg = 0;
++
++ aic32x4_setup_clocks(component, params_rate(params), aic32x4->sysclk);
++
+ switch (params_width(params)) {
+ case 16:
+ iface1_reg |= (AIC32X4_WORD_LEN_16BITS <<