]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.4-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 28 Aug 2017 07:01:35 +0000 (09:01 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 28 Aug 2017 07:01:35 +0000 (09:01 +0200)
added patches:
asoc-rsnd-add-missing-initialization-of-adg-req_rate.patch
asoc-rsnd-avoid-pointless-loop-in-rsnd_mod_interrupt.patch
asoc-rsnd-don-t-call-update-callback-if-it-was-null.patch
asoc-rsnd-ssi-24bit-data-needs-right-aligned-settings.patch

queue-4.4/asoc-rsnd-add-missing-initialization-of-adg-req_rate.patch [new file with mode: 0644]
queue-4.4/asoc-rsnd-avoid-pointless-loop-in-rsnd_mod_interrupt.patch [new file with mode: 0644]
queue-4.4/asoc-rsnd-don-t-call-update-callback-if-it-was-null.patch [new file with mode: 0644]
queue-4.4/asoc-rsnd-ssi-24bit-data-needs-right-aligned-settings.patch [new file with mode: 0644]
queue-4.4/series

diff --git a/queue-4.4/asoc-rsnd-add-missing-initialization-of-adg-req_rate.patch b/queue-4.4/asoc-rsnd-add-missing-initialization-of-adg-req_rate.patch
new file mode 100644 (file)
index 0000000..88423bf
--- /dev/null
@@ -0,0 +1,42 @@
+From 8b27418f300cafbdbbb8cfa9c29d398ed34d6723 Mon Sep 17 00:00:00 2001
+From: Geert Uytterhoeven <geert+renesas@glider.be>
+Date: Wed, 28 Oct 2015 16:03:48 +0100
+Subject: ASoC: rsnd: Add missing initialization of ADG req_rate
+
+From: Geert Uytterhoeven <geert+renesas@glider.be>
+
+commit 8b27418f300cafbdbbb8cfa9c29d398ed34d6723 upstream.
+
+If the "clock-frequency" DT property is not found, req_rate is used
+uninitialized, and the "audio_clkout" clock will be created with an
+arbitrary clock rate.
+
+This uninitialized kernel stack data may leak to userspace through
+/sys/kernel/debug/clk/clk_summary, cfr. the value in the "rate" column:
+
+       clock     enable_cnt  prepare_cnt        rate   accuracy   phase
+    --------------------------------------------------------------------
+     audio_clkout         0            0  4001836240          0 0
+
+Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
+Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
+Signed-off-by: Mark Brown <broonie@kernel.org>
+Signed-off-by: Thong Ho <thong.ho.px@rvc.renesas.com>
+Signed-off-by: Nhan Nguyen <nhan.nguyen.yb@renesas.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ sound/soc/sh/rcar/adg.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/sound/soc/sh/rcar/adg.c
++++ b/sound/soc/sh/rcar/adg.c
+@@ -437,7 +437,7 @@ static void rsnd_adg_get_clkout(struct r
+       struct device *dev = rsnd_priv_to_dev(priv);
+       struct device_node *np = dev->of_node;
+       u32 ckr, rbgx, rbga, rbgb;
+-      u32 rate, req_rate, div;
++      u32 rate, req_rate = 0, div;
+       uint32_t count = 0;
+       unsigned long req_48kHz_rate, req_441kHz_rate;
+       int i;
diff --git a/queue-4.4/asoc-rsnd-avoid-pointless-loop-in-rsnd_mod_interrupt.patch b/queue-4.4/asoc-rsnd-avoid-pointless-loop-in-rsnd_mod_interrupt.patch
new file mode 100644 (file)
index 0000000..3843316
--- /dev/null
@@ -0,0 +1,60 @@
+From 2daf71ad8da6cb57f919c9c876ee7e42530371df Mon Sep 17 00:00:00 2001
+From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
+Date: Mon, 26 Oct 2015 08:41:53 +0000
+Subject: ASoC: rsnd: avoid pointless loop in rsnd_mod_interrupt()
+
+From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
+
+commit 2daf71ad8da6cb57f919c9c876ee7e42530371df upstream.
+
+Current Renesas sound driver doesn't have 1:1 relationship between
+stream <-> mod because it is supporting MIX. Because of this reason
+rsnd_mod_interrupt() is searching correspond mod by for loop.
+But this loop is not needed, because each mod has own type.
+This patch avoid pointless loop by using mod->type.
+
+This patch is good for SSI-parent support, because stream might have
+2 SSI as SSI-parent/child. SSI interrupt handler will be called twice
+if stream has SSI-parent without this patch.
+
+Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
+Signed-off-by: Mark Brown <broonie@kernel.org>
+Signed-off-by: Thong Ho <thong.ho.px@rvc.renesas.com>
+Signed-off-by: Nhan Nguyen <nhan.nguyen.yb@renesas.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+
+---
+ sound/soc/sh/rcar/core.c |   19 ++++++++-----------
+ 1 file changed, 8 insertions(+), 11 deletions(-)
+
+--- a/sound/soc/sh/rcar/core.c
++++ b/sound/soc/sh/rcar/core.c
+@@ -192,19 +192,16 @@ void rsnd_mod_interrupt(struct rsnd_mod
+       struct rsnd_priv *priv = rsnd_mod_to_priv(mod);
+       struct rsnd_dai_stream *io;
+       struct rsnd_dai *rdai;
+-      int i, j;
++      int i;
+-      for_each_rsnd_dai(rdai, priv, j) {
++      for_each_rsnd_dai(rdai, priv, i) {
++              io = &rdai->playback;
++              if (mod == io->mod[mod->type])
++                      callback(mod, io);
+-              for (i = 0; i < RSND_MOD_MAX; i++) {
+-                      io = &rdai->playback;
+-                      if (mod == io->mod[i])
+-                              callback(mod, io);
+-
+-                      io = &rdai->capture;
+-                      if (mod == io->mod[i])
+-                              callback(mod, io);
+-              }
++              io = &rdai->capture;
++              if (mod == io->mod[mod->type])
++                      callback(mod, io);
+       }
+ }
diff --git a/queue-4.4/asoc-rsnd-don-t-call-update-callback-if-it-was-null.patch b/queue-4.4/asoc-rsnd-don-t-call-update-callback-if-it-was-null.patch
new file mode 100644 (file)
index 0000000..5b67466
--- /dev/null
@@ -0,0 +1,30 @@
+From d7289565483c65094d0473555625a4acd89567d3 Mon Sep 17 00:00:00 2001
+From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
+Date: Thu, 25 Feb 2016 05:51:12 +0000
+Subject: ASoC: rsnd: don't call update callback if it was NULL
+
+From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
+
+commit d7289565483c65094d0473555625a4acd89567d3 upstream.
+
+Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
+Signed-off-by: Mark Brown <broonie@kernel.org>
+Signed-off-by: Thong Ho <thong.ho.px@rvc.renesas.com>
+Signed-off-by: Nhan Nguyen <nhan.nguyen.yb@renesas.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ sound/soc/sh/rcar/core.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/sound/soc/sh/rcar/core.c
++++ b/sound/soc/sh/rcar/core.c
+@@ -1016,7 +1016,7 @@ static int rsnd_kctrl_put(struct snd_kco
+               }
+       }
+-      if (change)
++      if (change && cfg->update)
+               cfg->update(cfg->io, mod);
+       return change;
diff --git a/queue-4.4/asoc-rsnd-ssi-24bit-data-needs-right-aligned-settings.patch b/queue-4.4/asoc-rsnd-ssi-24bit-data-needs-right-aligned-settings.patch
new file mode 100644 (file)
index 0000000..23b4645
--- /dev/null
@@ -0,0 +1,42 @@
+From f46a93b820eb3707faf238cd769a004e2504515f Mon Sep 17 00:00:00 2001
+From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
+Date: Tue, 17 Nov 2015 08:28:11 +0000
+Subject: ASoC: rsnd: ssi: 24bit data needs right-aligned settings
+
+From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
+
+commit f46a93b820eb3707faf238cd769a004e2504515f upstream.
+
+Data left/right aligned is controlled by PDTA bit on SSICR.
+But default is left-aligned. Thus 24bit sound will be very small sound
+without this patch.
+
+Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
+Signed-off-by: Mark Brown <broonie@kernel.org>
+Signed-off-by: Thong Ho <thong.ho.px@rvc.renesas.com>
+Signed-off-by: Nhan Nguyen <nhan.nguyen.yb@renesas.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ sound/soc/sh/rcar/ssi.c |    3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+--- a/sound/soc/sh/rcar/ssi.c
++++ b/sound/soc/sh/rcar/ssi.c
+@@ -39,6 +39,7 @@
+ #define       SCKP            (1 << 13)       /* Serial Bit Clock Polarity */
+ #define       SWSP            (1 << 12)       /* Serial WS Polarity */
+ #define       SDTA            (1 << 10)       /* Serial Data Alignment */
++#define       PDTA            (1 <<  9)       /* Parallel Data Alignment */
+ #define       DEL             (1 <<  8)       /* Serial Data Delay */
+ #define       CKDV(v)         (v <<  4)       /* Serial Clock Division Ratio */
+ #define       TRMD            (1 <<  1)       /* Transmit/Receive Mode Select */
+@@ -286,7 +287,7 @@ static int rsnd_ssi_init(struct rsnd_mod
+       struct snd_pcm_runtime *runtime = rsnd_io_to_runtime(io);
+       u32 cr;
+-      cr = FORCE;
++      cr = FORCE | PDTA;
+       /*
+        * always use 32bit system word for easy clock calculation.
index ec4c8f68a4c7d2a4871c8d202056b0db0f176c35..ebbaa5930f379118ebcbc447807a256b935068a9 100644 (file)
@@ -43,3 +43,7 @@ iio-hid-sensor-trigger-fix-the-race-with-user-space-powering-up-sensors.patch
 staging-rtl8188eu-add-rnx-n150nub-support.patch
 asoc-simple-card-don-t-fail-if-sysclk-setting-is-not-supported.patch
 asoc-rsnd-disable-src.out-only-when-stop-timing.patch
+asoc-rsnd-avoid-pointless-loop-in-rsnd_mod_interrupt.patch
+asoc-rsnd-add-missing-initialization-of-adg-req_rate.patch
+asoc-rsnd-ssi-24bit-data-needs-right-aligned-settings.patch
+asoc-rsnd-don-t-call-update-callback-if-it-was-null.patch