From: Greg Kroah-Hartman Date: Sat, 10 Nov 2018 18:44:27 +0000 (-0800) Subject: 3.18-stable patches X-Git-Tag: v4.19.2~78 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=7b58076b127480631a966e5a3e24dfee4787c772;p=thirdparty%2Fkernel%2Fstable-queue.git 3.18-stable patches 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 --- 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 index 00000000000..84ec205a382 --- /dev/null +++ b/queue-3.18/alsa-ca0106-disable-izd-on-sb0570-dac-to-fix-audio-pops.patch @@ -0,0 +1,51 @@ +From ac237c28d5ac1b241d58b1b7b4b9fa10efb22fb5 Mon Sep 17 00:00:00 2001 +From: Alex Stanoev +Date: Sun, 28 Oct 2018 16:55:12 +0000 +Subject: ALSA: ca0106: Disable IZD on SB0570 DAC to fix audio pops + +From: Alex Stanoev + +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 +Cc: +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman + +--- + 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 */ diff --git a/queue-3.18/series b/queue-3.18/series index 85ee4d60334..887c41cdf0d 100644 --- a/queue-3.18/series +++ b/queue-3.18/series @@ -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 index 00000000000..a64239f4fcb --- /dev/null +++ b/queue-3.18/x86-corruption-check-fix-panic-in-memory_corruption_check-when-boot-option-without-value-is-provided.patch @@ -0,0 +1,87 @@ +From ccde460b9ae5c2bd5e4742af0a7f623c2daad566 Mon Sep 17 00:00:00 2001 +From: He Zhe +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 + +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 +Cc: Linus Torvalds +Cc: Peter Zijlstra +Cc: Thomas Gleixner +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 +Signed-off-by: Greg Kroah-Hartman + +--- + 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')