From 3e2b395e10c9c88980c9f35bcb34af24f623d172 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Sat, 25 Jun 2022 15:58:56 +0200 Subject: [PATCH] 5.4-stable patches added patches: alsa-hda-conexant-fix-missing-beep-setup.patch alsa-hda-realtek-add-quirk-for-clevo-pd70pnt.patch alsa-hda-realtek-alc897-headset-mic-no-sound.patch alsa-hda-via-fix-missing-beep-setup.patch random-schedule-mix_interrupt_randomness-less-often.patch --- ...-hda-conexant-fix-missing-beep-setup.patch | 44 +++++++++++++++ ...-realtek-add-quirk-for-clevo-pd70pnt.patch | 30 ++++++++++ ...-realtek-alc897-headset-mic-no-sound.patch | 54 ++++++++++++++++++ .../alsa-hda-via-fix-missing-beep-setup.patch | 41 ++++++++++++++ ...-mix_interrupt_randomness-less-often.patch | 56 +++++++++++++++++++ queue-5.4/series | 5 ++ 6 files changed, 230 insertions(+) create mode 100644 queue-5.4/alsa-hda-conexant-fix-missing-beep-setup.patch create mode 100644 queue-5.4/alsa-hda-realtek-add-quirk-for-clevo-pd70pnt.patch create mode 100644 queue-5.4/alsa-hda-realtek-alc897-headset-mic-no-sound.patch create mode 100644 queue-5.4/alsa-hda-via-fix-missing-beep-setup.patch create mode 100644 queue-5.4/random-schedule-mix_interrupt_randomness-less-often.patch diff --git a/queue-5.4/alsa-hda-conexant-fix-missing-beep-setup.patch b/queue-5.4/alsa-hda-conexant-fix-missing-beep-setup.patch new file mode 100644 index 00000000000..7305592d7bf --- /dev/null +++ b/queue-5.4/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 +@@ -1048,11 +1048,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-5.4/alsa-hda-realtek-add-quirk-for-clevo-pd70pnt.patch b/queue-5.4/alsa-hda-realtek-add-quirk-for-clevo-pd70pnt.patch new file mode 100644 index 00000000000..309aa9661ad --- /dev/null +++ b/queue-5.4/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 +@@ -2585,6 +2585,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-5.4/alsa-hda-realtek-alc897-headset-mic-no-sound.patch b/queue-5.4/alsa-hda-realtek-alc897-headset-mic-no-sound.patch new file mode 100644 index 00000000000..8e6bf1845f0 --- /dev/null +++ b/queue-5.4/alsa-hda-realtek-alc897-headset-mic-no-sound.patch @@ -0,0 +1,54 @@ +From fe6900bd8156467365bd5b976df64928fdebfeb0 Mon Sep 17 00:00:00 2001 +From: Kailang Yang +Date: Mon, 13 Jun 2022 14:57:19 +0800 +Subject: ALSA: hda/realtek - ALC897 headset MIC no sound + +From: Kailang Yang + +commit fe6900bd8156467365bd5b976df64928fdebfeb0 upstream. + +There is not have Headset Mic verb table in BIOS default. +So, it will have recording issue from headset MIC. +Add the verb table value without jack detect. It will turn on Headset Mic. + +Signed-off-by: Kailang Yang +Cc: +Link: https://lore.kernel.org/r/719133a27d8844a890002cb817001dfa@realtek.com +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman +--- + sound/pci/hda/patch_realtek.c | 9 +++++++++ + 1 file changed, 9 insertions(+) + +--- a/sound/pci/hda/patch_realtek.c ++++ b/sound/pci/hda/patch_realtek.c +@@ -9805,6 +9805,7 @@ enum { + ALC668_FIXUP_MIC_DET_COEF, + ALC897_FIXUP_LENOVO_HEADSET_MIC, + ALC897_FIXUP_HEADSET_MIC_PIN, ++ ALC897_FIXUP_HP_HSMIC_VERB, + }; + + static const struct hda_fixup alc662_fixups[] = { +@@ -10224,6 +10225,13 @@ static const struct hda_fixup alc662_fix + .chained = true, + .chain_id = ALC897_FIXUP_LENOVO_HEADSET_MIC + }, ++ [ALC897_FIXUP_HP_HSMIC_VERB] = { ++ .type = HDA_FIXUP_PINS, ++ .v.pins = (const struct hda_pintbl[]) { ++ { 0x19, 0x01a1913c }, /* use as headset mic, without its own jack detect */ ++ { } ++ }, ++ }, + }; + + static const struct snd_pci_quirk alc662_fixup_tbl[] = { +@@ -10249,6 +10257,7 @@ static const struct snd_pci_quirk alc662 + SND_PCI_QUIRK(0x1028, 0x0698, "Dell", ALC668_FIXUP_DELL_MIC_NO_PRESENCE), + SND_PCI_QUIRK(0x1028, 0x069f, "Dell", ALC668_FIXUP_DELL_MIC_NO_PRESENCE), + SND_PCI_QUIRK(0x103c, 0x1632, "HP RP5800", ALC662_FIXUP_HP_RP5800), ++ SND_PCI_QUIRK(0x103c, 0x8719, "HP", ALC897_FIXUP_HP_HSMIC_VERB), + SND_PCI_QUIRK(0x103c, 0x873e, "HP", ALC671_FIXUP_HP_HEADSET_MIC2), + SND_PCI_QUIRK(0x103c, 0x885f, "HP 288 Pro G8", ALC671_FIXUP_HP_HEADSET_MIC2), + SND_PCI_QUIRK(0x1043, 0x1080, "Asus UX501VW", ALC668_FIXUP_HEADSET_MODE), diff --git a/queue-5.4/alsa-hda-via-fix-missing-beep-setup.patch b/queue-5.4/alsa-hda-via-fix-missing-beep-setup.patch new file mode 100644 index 00000000000..ea4eafd6fdd --- /dev/null +++ b/queue-5.4/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 +@@ -520,11 +520,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-5.4/random-schedule-mix_interrupt_randomness-less-often.patch b/queue-5.4/random-schedule-mix_interrupt_randomness-less-often.patch new file mode 100644 index 00000000000..c6857af9fe9 --- /dev/null +++ b/queue-5.4/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-5.4/series b/queue-5.4/series index a2a5948449c..340ce194d8f 100644 --- a/queue-5.4/series +++ b/queue-5.4/series @@ -1 +1,6 @@ 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-alc897-headset-mic-no-sound.patch +alsa-hda-realtek-add-quirk-for-clevo-pd70pnt.patch -- 2.47.3