From: Greg Kroah-Hartman Date: Sat, 25 Jun 2022 13:58:49 +0000 (+0200) Subject: 4.19-stable patches X-Git-Tag: v5.10.126~35 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=fb3046ef5307555a7e454aef61bc07a62ffc3b66;p=thirdparty%2Fkernel%2Fstable-queue.git 4.19-stable patches added patches: alsa-hda-conexant-fix-missing-beep-setup.patch alsa-hda-realtek-add-quirk-for-clevo-pd70pnt.patch alsa-hda-via-fix-missing-beep-setup.patch random-schedule-mix_interrupt_randomness-less-often.patch --- diff --git a/queue-4.19/alsa-hda-conexant-fix-missing-beep-setup.patch b/queue-4.19/alsa-hda-conexant-fix-missing-beep-setup.patch new file mode 100644 index 00000000000..9a7eb1780ad --- /dev/null +++ b/queue-4.19/alsa-hda-conexant-fix-missing-beep-setup.patch @@ -0,0 +1,44 @@ +From 5faa0bc69102f3a4c605581564c367be5eb94dfa Mon Sep 17 00:00:00 2001 +From: Takashi Iwai +Date: Mon, 20 Jun 2022 12:40:07 +0200 +Subject: ALSA: hda/conexant: Fix missing beep setup + +From: Takashi Iwai + +commit 5faa0bc69102f3a4c605581564c367be5eb94dfa upstream. + +Currently the Conexant codec driver sets up the beep NID after calling +snd_hda_gen_parse_auto_config(). It turned out that this results in +the insufficient setup for the beep control, as the generic parser +handles the fake path in snd_hda_gen_parse_auto_config() only if the +beep_nid is set up beforehand. + +For dealing with the beep widget properly, call cx_auto_parse_beep() +before snd_hda_gen_parse_auto_config() call. + +Fixes: 51e19ca5f755 ("ALSA: hda/conexant - Clean up beep code") +Cc: +Link: https://bugzilla.kernel.org/show_bug.cgi?id=216152 +Link: https://lore.kernel.org/r/20220620104008.1994-1-tiwai@suse.de +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman +--- + sound/pci/hda/patch_conexant.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/sound/pci/hda/patch_conexant.c ++++ b/sound/pci/hda/patch_conexant.c +@@ -1061,11 +1061,11 @@ static int patch_conexant_auto(struct hd + if (err < 0) + goto error; + +- err = snd_hda_gen_parse_auto_config(codec, &spec->gen.autocfg); ++ err = cx_auto_parse_beep(codec); + if (err < 0) + goto error; + +- err = cx_auto_parse_beep(codec); ++ err = snd_hda_gen_parse_auto_config(codec, &spec->gen.autocfg); + if (err < 0) + goto error; + diff --git a/queue-4.19/alsa-hda-realtek-add-quirk-for-clevo-pd70pnt.patch b/queue-4.19/alsa-hda-realtek-add-quirk-for-clevo-pd70pnt.patch new file mode 100644 index 00000000000..965839e43a5 --- /dev/null +++ b/queue-4.19/alsa-hda-realtek-add-quirk-for-clevo-pd70pnt.patch @@ -0,0 +1,30 @@ +From d49951219b0249d3eff49e4f02e0de82357bc8a0 Mon Sep 17 00:00:00 2001 +From: Tim Crawford +Date: Fri, 17 Jun 2022 07:30:28 -0600 +Subject: ALSA: hda/realtek: Add quirk for Clevo PD70PNT + +From: Tim Crawford + +commit d49951219b0249d3eff49e4f02e0de82357bc8a0 upstream. + +Fixes speaker output and headset detection on Clevo PD70PNT. + +Signed-off-by: Tim Crawford +Cc: +Link: https://lore.kernel.org/r/20220617133028.50568-1-tcrawford@system76.com +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman +--- + sound/pci/hda/patch_realtek.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/sound/pci/hda/patch_realtek.c ++++ b/sound/pci/hda/patch_realtek.c +@@ -2567,6 +2567,7 @@ static const struct snd_pci_quirk alc882 + SND_PCI_QUIRK(0x1558, 0x67e1, "Clevo PB71[DE][CDF]", ALC1220_FIXUP_CLEVO_PB51ED_PINS), + SND_PCI_QUIRK(0x1558, 0x67e5, "Clevo PC70D[PRS](?:-D|-G)?", ALC1220_FIXUP_CLEVO_PB51ED_PINS), + SND_PCI_QUIRK(0x1558, 0x67f1, "Clevo PC70H[PRS]", ALC1220_FIXUP_CLEVO_PB51ED_PINS), ++ SND_PCI_QUIRK(0x1558, 0x67f5, "Clevo PD70PN[NRT]", ALC1220_FIXUP_CLEVO_PB51ED_PINS), + SND_PCI_QUIRK(0x1558, 0x70d1, "Clevo PC70[ER][CDF]", ALC1220_FIXUP_CLEVO_PB51ED_PINS), + SND_PCI_QUIRK(0x1558, 0x7714, "Clevo X170SM", ALC1220_FIXUP_CLEVO_PB51ED_PINS), + SND_PCI_QUIRK(0x1558, 0x7715, "Clevo X170KM-G", ALC1220_FIXUP_CLEVO_PB51ED), diff --git a/queue-4.19/alsa-hda-via-fix-missing-beep-setup.patch b/queue-4.19/alsa-hda-via-fix-missing-beep-setup.patch new file mode 100644 index 00000000000..14ac4506ebd --- /dev/null +++ b/queue-4.19/alsa-hda-via-fix-missing-beep-setup.patch @@ -0,0 +1,41 @@ +From c7807b27d510e5aa53c8a120cfc02c33c24ebb5f Mon Sep 17 00:00:00 2001 +From: Takashi Iwai +Date: Mon, 20 Jun 2022 12:40:08 +0200 +Subject: ALSA: hda/via: Fix missing beep setup + +From: Takashi Iwai + +commit c7807b27d510e5aa53c8a120cfc02c33c24ebb5f upstream. + +Like the previous fix for Conexant codec, the beep_nid has to be set +up before calling snd_hda_gen_parse_auto_config(); otherwise it'd miss +the path setup. + +Fix the call order for addressing the missing beep setup. + +Fixes: 0e8f9862493a ("ALSA: hda/via - Simplify control management") +Cc: +Link: https://bugzilla.kernel.org/show_bug.cgi?id=216152 +Link: https://lore.kernel.org/r/20220620104008.1994-2-tiwai@suse.de +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman +--- + sound/pci/hda/patch_via.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/sound/pci/hda/patch_via.c ++++ b/sound/pci/hda/patch_via.c +@@ -533,11 +533,11 @@ static int via_parse_auto_config(struct + if (err < 0) + return err; + +- err = snd_hda_gen_parse_auto_config(codec, &spec->gen.autocfg); ++ err = auto_parse_beep(codec); + if (err < 0) + return err; + +- err = auto_parse_beep(codec); ++ err = snd_hda_gen_parse_auto_config(codec, &spec->gen.autocfg); + if (err < 0) + return err; + diff --git a/queue-4.19/random-schedule-mix_interrupt_randomness-less-often.patch b/queue-4.19/random-schedule-mix_interrupt_randomness-less-often.patch new file mode 100644 index 00000000000..c6857af9fe9 --- /dev/null +++ b/queue-4.19/random-schedule-mix_interrupt_randomness-less-often.patch @@ -0,0 +1,56 @@ +From 534d2eaf1970274150596fdd2bf552721e65d6b2 Mon Sep 17 00:00:00 2001 +From: "Jason A. Donenfeld" +Date: Thu, 16 Jun 2022 02:03:12 +0200 +Subject: random: schedule mix_interrupt_randomness() less often + +From: Jason A. Donenfeld + +commit 534d2eaf1970274150596fdd2bf552721e65d6b2 upstream. + +It used to be that mix_interrupt_randomness() would credit 1 bit each +time it ran, and so add_interrupt_randomness() would schedule mix() to +run every 64 interrupts, a fairly arbitrary number, but nonetheless +considered to be a decent enough conservative estimate. + +Since e3e33fc2ea7f ("random: do not use input pool from hard IRQs"), +mix() is now able to credit multiple bits, depending on the number of +calls to add(). This was done for reasons separate from this commit, but +it has the nice side effect of enabling this patch to schedule mix() +less often. + +Currently the rules are: +a) Credit 1 bit for every 64 calls to add(). +b) Schedule mix() once a second that add() is called. +c) Schedule mix() once every 64 calls to add(). + +Rules (a) and (c) no longer need to be coupled. It's still important to +have _some_ value in (c), so that we don't "over-saturate" the fast +pool, but the once per second we get from rule (b) is a plenty enough +baseline. So, by increasing the 64 in rule (c) to something larger, we +avoid calling queue_work_on() as frequently during irq storms. + +This commit changes that 64 in rule (c) to be 1024, which means we +schedule mix() 16 times less often. And it does *not* need to change the +64 in rule (a). + +Fixes: 58340f8e952b ("random: defer fast pool mixing to worker") +Cc: stable@vger.kernel.org +Cc: Dominik Brodowski +Acked-by: Sebastian Andrzej Siewior +Signed-off-by: Jason A. Donenfeld +Signed-off-by: Greg Kroah-Hartman +--- + drivers/char/random.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/char/random.c ++++ b/drivers/char/random.c +@@ -996,7 +996,7 @@ void add_interrupt_randomness(int irq) + if (new_count & MIX_INFLIGHT) + return; + +- if (new_count < 64 && !time_is_before_jiffies(fast_pool->last + HZ)) ++ if (new_count < 1024 && !time_is_before_jiffies(fast_pool->last + HZ)) + return; + + if (unlikely(!fast_pool->mix.func)) diff --git a/queue-4.19/series b/queue-4.19/series index a2a5948449c..1b56df21f7e 100644 --- a/queue-4.19/series +++ b/queue-4.19/series @@ -1 +1,5 @@ vt-drop-old-font-ioctls.patch +random-schedule-mix_interrupt_randomness-less-often.patch +alsa-hda-via-fix-missing-beep-setup.patch +alsa-hda-conexant-fix-missing-beep-setup.patch +alsa-hda-realtek-add-quirk-for-clevo-pd70pnt.patch