From: Greg Kroah-Hartman Date: Mon, 6 Sep 2021 08:07:42 +0000 (+0200) Subject: 5.10-stable patches X-Git-Tag: v5.10.63~20 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=51099222df04b2ab21bf7f068cbf3f8b07318e17;p=thirdparty%2Fkernel%2Fstable-queue.git 5.10-stable patches added patches: alsa-hda-realtek-quirk-for-hp-spectre-x360-14-amp-setup.patch alsa-hda-realtek-workaround-for-conflicting-ssid-on-asus-rog-strix-g17.patch alsa-pcm-fix-divide-error-in-snd_pcm_lib_ioctl.patch --- diff --git a/queue-5.10/alsa-hda-realtek-quirk-for-hp-spectre-x360-14-amp-setup.patch b/queue-5.10/alsa-hda-realtek-quirk-for-hp-spectre-x360-14-amp-setup.patch new file mode 100644 index 00000000000..722ce7e699c --- /dev/null +++ b/queue-5.10/alsa-hda-realtek-quirk-for-hp-spectre-x360-14-amp-setup.patch @@ -0,0 +1,32 @@ +From 93ab3eafb0b3551c54175cb38afed3b82356a047 Mon Sep 17 00:00:00 2001 +From: Johnathon Clark +Date: Mon, 23 Aug 2021 17:21:10 +0100 +Subject: ALSA: hda/realtek: Quirk for HP Spectre x360 14 amp setup + +From: Johnathon Clark + +commit 93ab3eafb0b3551c54175cb38afed3b82356a047 upstream. + +This patch extends support for the HP Spectre x360 14 +amp enable quirk to support a model of the device with +an additional subdevice ID. + +Signed-off-by: Johnathon Clark +Link: https://lore.kernel.org/r/20210823162110.8870-1-john.clark@cantab.net +Cc: +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 +@@ -8364,6 +8364,7 @@ static const struct snd_pci_quirk alc269 + SND_PCI_QUIRK(0x103c, 0x87f2, "HP ProBook 640 G8 Notebook PC", ALC236_FIXUP_HP_GPIO_LED), + SND_PCI_QUIRK(0x103c, 0x87f4, "HP", ALC287_FIXUP_HP_GPIO_LED), + SND_PCI_QUIRK(0x103c, 0x87f5, "HP", ALC287_FIXUP_HP_GPIO_LED), ++ SND_PCI_QUIRK(0x103c, 0x87f6, "HP Spectre x360 14", ALC245_FIXUP_HP_X360_AMP), + SND_PCI_QUIRK(0x103c, 0x87f7, "HP Spectre x360 14", ALC245_FIXUP_HP_X360_AMP), + SND_PCI_QUIRK(0x103c, 0x8805, "HP ProBook 650 G8 Notebook PC", ALC236_FIXUP_HP_GPIO_LED), + SND_PCI_QUIRK(0x103c, 0x880d, "HP EliteBook 830 G8 Notebook PC", ALC285_FIXUP_HP_GPIO_LED), diff --git a/queue-5.10/alsa-hda-realtek-workaround-for-conflicting-ssid-on-asus-rog-strix-g17.patch b/queue-5.10/alsa-hda-realtek-workaround-for-conflicting-ssid-on-asus-rog-strix-g17.patch new file mode 100644 index 00000000000..c42d346f4fa --- /dev/null +++ b/queue-5.10/alsa-hda-realtek-workaround-for-conflicting-ssid-on-asus-rog-strix-g17.patch @@ -0,0 +1,48 @@ +From 13d9c6b998aaa76fd098133277a28a21f2cc2264 Mon Sep 17 00:00:00 2001 +From: Takashi Iwai +Date: Fri, 20 Aug 2021 16:32:14 +0200 +Subject: ALSA: hda/realtek: Workaround for conflicting SSID on ASUS ROG Strix G17 + +From: Takashi Iwai + +commit 13d9c6b998aaa76fd098133277a28a21f2cc2264 upstream. + +ASUS ROG Strix G17 has the very same PCI and codec SSID (1043:103f) as +ASUS TX300, and unfortunately, the existing quirk for TX300 is broken +on ASUS ROG. Actually the device works without the quirk, so we'll +need to clear the quirk before applying for this device. +Since ASUS ROG has a different codec (ALC294 - while TX300 has +ALC282), this patch adds a workaround for the device, just clearing +the codec->fixup_id by checking the codec vendor_id. + +It's a bit ugly to add such a workaround there, but it seems to be the +simplest way. + +BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=214101 +Cc: +Link: https://lore.kernel.org/r/20210820143214.3654-1-tiwai@suse.de +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman +--- + sound/pci/hda/patch_realtek.c | 10 ++++++++++ + 1 file changed, 10 insertions(+) + +--- a/sound/pci/hda/patch_realtek.c ++++ b/sound/pci/hda/patch_realtek.c +@@ -9441,6 +9441,16 @@ static int patch_alc269(struct hda_codec + + snd_hda_pick_fixup(codec, alc269_fixup_models, + alc269_fixup_tbl, alc269_fixups); ++ /* FIXME: both TX300 and ROG Strix G17 have the same SSID, and ++ * the quirk breaks the latter (bko#214101). ++ * Clear the wrong entry. ++ */ ++ if (codec->fixup_id == ALC282_FIXUP_ASUS_TX300 && ++ codec->core.vendor_id == 0x10ec0294) { ++ codec_dbg(codec, "Clear wrong fixup for ASUS ROG Strix G17\n"); ++ codec->fixup_id = HDA_FIXUP_ID_NOT_SET; ++ } ++ + snd_hda_pick_pin_fixup(codec, alc269_pin_fixup_tbl, alc269_fixups, true); + snd_hda_pick_pin_fixup(codec, alc269_fallback_pin_fixup_tbl, alc269_fixups, false); + snd_hda_pick_fixup(codec, NULL, alc269_fixup_vendor_tbl, diff --git a/queue-5.10/alsa-pcm-fix-divide-error-in-snd_pcm_lib_ioctl.patch b/queue-5.10/alsa-pcm-fix-divide-error-in-snd_pcm_lib_ioctl.patch new file mode 100644 index 00000000000..ceeae309bf5 --- /dev/null +++ b/queue-5.10/alsa-pcm-fix-divide-error-in-snd_pcm_lib_ioctl.patch @@ -0,0 +1,35 @@ +From f3eef46f0518a2b32ca1244015820c35a22cfe4a Mon Sep 17 00:00:00 2001 +From: Zubin Mithra +Date: Fri, 27 Aug 2021 08:37:35 -0700 +Subject: ALSA: pcm: fix divide error in snd_pcm_lib_ioctl + +From: Zubin Mithra + +commit f3eef46f0518a2b32ca1244015820c35a22cfe4a upstream. + +Syzkaller reported a divide error in snd_pcm_lib_ioctl. fifo_size +is of type snd_pcm_uframes_t(unsigned long). If frame_size +is 0x100000000, the error occurs. + +Fixes: a9960e6a293e ("ALSA: pcm: fix fifo_size frame calculation") +Signed-off-by: Zubin Mithra +Reviewed-by: Guenter Roeck +Cc: +Link: https://lore.kernel.org/r/20210827153735.789452-1-zsm@chromium.org +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman +--- + sound/core/pcm_lib.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/sound/core/pcm_lib.c ++++ b/sound/core/pcm_lib.c +@@ -1746,7 +1746,7 @@ static int snd_pcm_lib_ioctl_fifo_size(s + channels = params_channels(params); + frame_size = snd_pcm_format_size(format, channels); + if (frame_size > 0) +- params->fifo_size /= (unsigned)frame_size; ++ params->fifo_size /= frame_size; + } + return 0; + } diff --git a/queue-5.10/series b/queue-5.10/series index 139c4c5190a..da329fa1f19 100644 --- a/queue-5.10/series +++ b/queue-5.10/series @@ -19,3 +19,6 @@ ceph-fix-possible-null-pointer-dereference-in-ceph_m.patch perf-x86-amd-ibs-work-around-erratum-1197.patch perf-x86-amd-power-assign-pmu.module.patch cryptoloop-add-a-deprecation-warning.patch +alsa-hda-realtek-quirk-for-hp-spectre-x360-14-amp-setup.patch +alsa-hda-realtek-workaround-for-conflicting-ssid-on-asus-rog-strix-g17.patch +alsa-pcm-fix-divide-error-in-snd_pcm_lib_ioctl.patch