]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
3.18-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 10 Nov 2018 18:44:27 +0000 (10:44 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 10 Nov 2018 18:44:27 +0000 (10:44 -0800)
added patches:
alsa-ca0106-disable-izd-on-sb0570-dac-to-fix-audio-pops.patch
x86-corruption-check-fix-panic-in-memory_corruption_check-when-boot-option-without-value-is-provided.patch

queue-3.18/alsa-ca0106-disable-izd-on-sb0570-dac-to-fix-audio-pops.patch [new file with mode: 0644]
queue-3.18/series
queue-3.18/x86-corruption-check-fix-panic-in-memory_corruption_check-when-boot-option-without-value-is-provided.patch [new file with mode: 0644]

diff --git a/queue-3.18/alsa-ca0106-disable-izd-on-sb0570-dac-to-fix-audio-pops.patch b/queue-3.18/alsa-ca0106-disable-izd-on-sb0570-dac-to-fix-audio-pops.patch
new file mode 100644 (file)
index 0000000..84ec205
--- /dev/null
@@ -0,0 +1,51 @@
+From ac237c28d5ac1b241d58b1b7b4b9fa10efb22fb5 Mon Sep 17 00:00:00 2001
+From: Alex Stanoev <alex@astanoev.com>
+Date: Sun, 28 Oct 2018 16:55:12 +0000
+Subject: ALSA: ca0106: Disable IZD on SB0570 DAC to fix audio pops
+
+From: Alex Stanoev <alex@astanoev.com>
+
+commit ac237c28d5ac1b241d58b1b7b4b9fa10efb22fb5 upstream.
+
+The Creative Audigy SE (SB0570) card currently exhibits an audible pop
+whenever playback is stopped or resumed, or during silent periods of an
+audio stream. Initialise the IZD bit to the 0 to eliminate these pops.
+
+The Infinite Zero Detection (IZD) feature on the DAC causes the output
+to be shunted to Vcap after 2048 samples of silence. This discharges the
+AC coupling capacitor through the output and causes the aforementioned
+pop/click noise.
+
+The behaviour of the IZD bit is described on page 15 of the WM8768GEDS
+datasheet: "With IZD=1, applying MUTE for 1024 consecutive input samples
+will cause all outputs to be connected directly to VCAP. This also
+happens if 2048 consecutive zero input samples are applied to all 6
+channels, and IZD=0. It will be removed as soon as any channel receives
+a non-zero input". I believe the second sentence might be referring to
+IZD=1 instead of IZD=0 given the observed behaviour of the card.
+
+This change should make the DAC initialisation consistent with
+Creative's Windows driver, as this popping persists when initialising
+the card in Linux and soft rebooting into Windows, but is not present on
+a cold boot to Windows.
+
+Signed-off-by: Alex Stanoev <alex@astanoev.com>
+Cc: <stable@vger.kernel.org>
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ sound/pci/ca0106/ca0106.h |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/sound/pci/ca0106/ca0106.h
++++ b/sound/pci/ca0106/ca0106.h
+@@ -582,7 +582,7 @@
+ #define SPI_PL_BIT_R_R                (2<<7)  /* right channel = right */
+ #define SPI_PL_BIT_R_C                (3<<7)  /* right channel = (L+R)/2 */
+ #define SPI_IZD_REG           2
+-#define SPI_IZD_BIT           (1<<4)  /* infinite zero detect */
++#define SPI_IZD_BIT           (0<<4)  /* infinite zero detect */
+ #define SPI_FMT_REG           3
+ #define SPI_FMT_BIT_RJ                (0<<0)  /* right justified mode */
index 85ee4d60334d19bfa6b88233d42bd858b095ca3c..887c41cdf0d9a6f30f9efd7188b2494f296dcdad 100644 (file)
@@ -2,3 +2,5 @@ bcache-fix-miss-key-refill-end-in-writeback.patch
 jffs2-free-jffs2_sb_info-through-jffs2_kill_sb.patch
 pcmcia-implement-clkrun-protocol-disabling-for-ricoh-bridges.patch
 acpica-aml-interpreter-add-region-addresses-in-global-list-during-initialization.patch
+alsa-ca0106-disable-izd-on-sb0570-dac-to-fix-audio-pops.patch
+x86-corruption-check-fix-panic-in-memory_corruption_check-when-boot-option-without-value-is-provided.patch
diff --git a/queue-3.18/x86-corruption-check-fix-panic-in-memory_corruption_check-when-boot-option-without-value-is-provided.patch b/queue-3.18/x86-corruption-check-fix-panic-in-memory_corruption_check-when-boot-option-without-value-is-provided.patch
new file mode 100644 (file)
index 0000000..a64239f
--- /dev/null
@@ -0,0 +1,87 @@
+From ccde460b9ae5c2bd5e4742af0a7f623c2daad566 Mon Sep 17 00:00:00 2001
+From: He Zhe <zhe.he@windriver.com>
+Date: Tue, 14 Aug 2018 23:33:42 +0800
+Subject: x86/corruption-check: Fix panic in memory_corruption_check() when boot option without value is provided
+
+From: He Zhe <zhe.he@windriver.com>
+
+commit ccde460b9ae5c2bd5e4742af0a7f623c2daad566 upstream.
+
+memory_corruption_check[{_period|_size}]()'s handlers do not check input
+argument before passing it to kstrtoul() or simple_strtoull(). The argument
+would be a NULL pointer if each of the kernel parameters, without its
+value, is set in command line and thus cause the following panic.
+
+PANIC: early exception 0xe3 IP 10:ffffffff73587c22 error 0 cr2 0x0
+[    0.000000] CPU: 0 PID: 0 Comm: swapper Not tainted 4.18-rc8+ #2
+[    0.000000] RIP: 0010:kstrtoull+0x2/0x10
+...
+[    0.000000] Call Trace
+[    0.000000]  ? set_corruption_check+0x21/0x49
+[    0.000000]  ? do_early_param+0x4d/0x82
+[    0.000000]  ? parse_args+0x212/0x330
+[    0.000000]  ? rdinit_setup+0x26/0x26
+[    0.000000]  ? parse_early_options+0x20/0x23
+[    0.000000]  ? rdinit_setup+0x26/0x26
+[    0.000000]  ? parse_early_param+0x2d/0x39
+[    0.000000]  ? setup_arch+0x2f7/0xbf4
+[    0.000000]  ? start_kernel+0x5e/0x4c2
+[    0.000000]  ? load_ucode_bsp+0x113/0x12f
+[    0.000000]  ? secondary_startup_64+0xa5/0xb0
+
+This patch adds checks to prevent the panic.
+
+Signed-off-by: He Zhe <zhe.he@windriver.com>
+Cc: Linus Torvalds <torvalds@linux-foundation.org>
+Cc: Peter Zijlstra <peterz@infradead.org>
+Cc: Thomas Gleixner <tglx@linutronix.de>
+Cc: gregkh@linuxfoundation.org
+Cc: kstewart@linuxfoundation.org
+Cc: pombredanne@nexb.com
+Cc: stable@vger.kernel.org
+Link: http://lkml.kernel.org/r/1534260823-87917-1-git-send-email-zhe.he@windriver.com
+Signed-off-by: Ingo Molnar <mingo@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/x86/kernel/check.c |   15 +++++++++++++++
+ 1 file changed, 15 insertions(+)
+
+--- a/arch/x86/kernel/check.c
++++ b/arch/x86/kernel/check.c
+@@ -30,6 +30,11 @@ static __init int set_corruption_check(c
+       ssize_t ret;
+       unsigned long val;
++      if (!arg) {
++              pr_err("memory_corruption_check config string not provided\n");
++              return -EINVAL;
++      }
++
+       ret = kstrtoul(arg, 10, &val);
+       if (ret)
+               return ret;
+@@ -44,6 +49,11 @@ static __init int set_corruption_check_p
+       ssize_t ret;
+       unsigned long val;
++      if (!arg) {
++              pr_err("memory_corruption_check_period config string not provided\n");
++              return -EINVAL;
++      }
++
+       ret = kstrtoul(arg, 10, &val);
+       if (ret)
+               return ret;
+@@ -58,6 +68,11 @@ static __init int set_corruption_check_s
+       char *end;
+       unsigned size;
++      if (!arg) {
++              pr_err("memory_corruption_check_size config string not provided\n");
++              return -EINVAL;
++      }
++
+       size = memparse(arg, &end);
+       if (*end == '\0')