From: Greg Kroah-Hartman Date: Tue, 3 Dec 2024 10:30:50 +0000 (+0100) Subject: 6.12-stable patches X-Git-Tag: v4.19.325~44 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=47314edcc9624329e85d41692f0b0ce5e04ccda6;p=thirdparty%2Fkernel%2Fstable-queue.git 6.12-stable patches added patches: alsa-hda-realtek-apply-quirk-for-medion-e15433.patch alsa-hda-realtek-enable-speaker-pins-for-medion-e15443-platform.patch alsa-hda-realtek-fix-internal-speaker-and-mic-boost-of-infinix-y4-max.patch alsa-hda-realtek-fix-mute-micmute-leds-don-t-work-for-elitebook-x-g1i.patch alsa-hda-realtek-set-pcbeep-to-default-value-for-alc274.patch alsa-hda-realtek-update-alc225-depop-procedure.patch alsa-pcm-add-sanity-null-check-for-the-default-mmap-fault-handler.patch alsa-rawmidi-fix-kvfree-call-in-spinlock.patch alsa-ump-fix-evaluation-of-midi-1.0-fb-info.patch --- diff --git a/queue-6.12/alsa-hda-realtek-apply-quirk-for-medion-e15433.patch b/queue-6.12/alsa-hda-realtek-apply-quirk-for-medion-e15433.patch new file mode 100644 index 00000000000..b68994598f8 --- /dev/null +++ b/queue-6.12/alsa-hda-realtek-apply-quirk-for-medion-e15433.patch @@ -0,0 +1,31 @@ +From ca0f79f0286046f6a91c099dc941cf7afae198d6 Mon Sep 17 00:00:00 2001 +From: Takashi Iwai +Date: Thu, 28 Nov 2024 08:26:45 +0100 +Subject: ALSA: hda/realtek: Apply quirk for Medion E15433 + +From: Takashi Iwai + +commit ca0f79f0286046f6a91c099dc941cf7afae198d6 upstream. + +Medion E15433 laptop wich ALC269VC (SSID 2782:1705) needs the same +workaround for the missing speaker as another model. + +Link: https://bugzilla.suse.com/show_bug.cgi?id=1233298 +Cc: +Link: https://patch.msgid.link/20241128072646.15659-1-tiwai@suse.de +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 +@@ -11034,6 +11034,7 @@ static const struct snd_pci_quirk alc269 + SND_PCI_QUIRK(0x2782, 0x0228, "Infinix ZERO BOOK 13", ALC269VB_FIXUP_INFINIX_ZERO_BOOK_13), + SND_PCI_QUIRK(0x2782, 0x0232, "CHUWI CoreBook XPro", ALC269VB_FIXUP_CHUWI_COREBOOK_XPRO), + SND_PCI_QUIRK(0x2782, 0x1701, "Infinix Y4 Max", ALC269VC_FIXUP_INFINIX_Y4_MAX), ++ SND_PCI_QUIRK(0x2782, 0x1705, "MEDION E15433", ALC269VC_FIXUP_INFINIX_Y4_MAX), + SND_PCI_QUIRK(0x2782, 0x1707, "Vaio VJFE-ADL", ALC298_FIXUP_SPK_VOLUME), + SND_PCI_QUIRK(0x2782, 0x4900, "MEDION E15443", ALC233_FIXUP_MEDION_MTL_SPK), + SND_PCI_QUIRK(0x8086, 0x2074, "Intel NUC 8", ALC233_FIXUP_INTEL_NUC8_DMIC), diff --git a/queue-6.12/alsa-hda-realtek-enable-speaker-pins-for-medion-e15443-platform.patch b/queue-6.12/alsa-hda-realtek-enable-speaker-pins-for-medion-e15443-platform.patch new file mode 100644 index 00000000000..660607f1952 --- /dev/null +++ b/queue-6.12/alsa-hda-realtek-enable-speaker-pins-for-medion-e15443-platform.patch @@ -0,0 +1,53 @@ +From 31917b7bd892de730ab67b215c62aeeea778112e Mon Sep 17 00:00:00 2001 +From: Kailang Yang +Date: Thu, 21 Nov 2024 16:10:42 +0800 +Subject: ALSA: hda/realtek: Enable speaker pins for Medion E15443 platform + +From: Kailang Yang + +commit 31917b7bd892de730ab67b215c62aeeea778112e upstream. + +Speaker has no sound for Medion E15443. +Added another speaker pins for Medion E15443 platform. + +Signed-off-by: Kailang Yang +Cc: +Link: https://lore.kernel.org/eac4f3aca2ab45e59ccd207a90ee60e9@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 +@@ -7773,6 +7773,7 @@ enum { + ALC287_FIXUP_LENOVO_SSID_17AA3820, + ALC245_FIXUP_CLEVO_NOISY_MIC, + ALC269_FIXUP_VAIO_VJFH52_MIC_NO_PRESENCE, ++ ALC233_FIXUP_MEDION_MTL_SPK, + }; + + /* A special fixup for Lenovo C940 and Yoga Duet 7; +@@ -10147,6 +10148,13 @@ static const struct hda_fixup alc269_fix + .chained = true, + .chain_id = ALC269_FIXUP_LIMIT_INT_MIC_BOOST + }, ++ [ALC233_FIXUP_MEDION_MTL_SPK] = { ++ .type = HDA_FIXUP_PINS, ++ .v.pins = (const struct hda_pintbl[]) { ++ { 0x1b, 0x90170110 }, ++ { } ++ }, ++ }, + }; + + static const struct snd_pci_quirk alc269_fixup_tbl[] = { +@@ -11013,6 +11021,7 @@ static const struct snd_pci_quirk alc269 + SND_PCI_QUIRK(0x2782, 0x0228, "Infinix ZERO BOOK 13", ALC269VB_FIXUP_INFINIX_ZERO_BOOK_13), + SND_PCI_QUIRK(0x2782, 0x0232, "CHUWI CoreBook XPro", ALC269VB_FIXUP_CHUWI_COREBOOK_XPRO), + SND_PCI_QUIRK(0x2782, 0x1707, "Vaio VJFE-ADL", ALC298_FIXUP_SPK_VOLUME), ++ SND_PCI_QUIRK(0x2782, 0x4900, "MEDION E15443", ALC233_FIXUP_MEDION_MTL_SPK), + SND_PCI_QUIRK(0x8086, 0x2074, "Intel NUC 8", ALC233_FIXUP_INTEL_NUC8_DMIC), + SND_PCI_QUIRK(0x8086, 0x2080, "Intel NUC 8 Rugged", ALC256_FIXUP_INTEL_NUC8_RUGGED), + SND_PCI_QUIRK(0x8086, 0x2081, "Intel NUC 10", ALC256_FIXUP_INTEL_NUC10), diff --git a/queue-6.12/alsa-hda-realtek-fix-internal-speaker-and-mic-boost-of-infinix-y4-max.patch b/queue-6.12/alsa-hda-realtek-fix-internal-speaker-and-mic-boost-of-infinix-y4-max.patch new file mode 100644 index 00000000000..afcc6617679 --- /dev/null +++ b/queue-6.12/alsa-hda-realtek-fix-internal-speaker-and-mic-boost-of-infinix-y4-max.patch @@ -0,0 +1,59 @@ +From 5ebe792a5139f1ce6e4aed22bef12e7e2660df96 Mon Sep 17 00:00:00 2001 +From: Dinesh Kumar +Date: Mon, 25 Nov 2024 14:58:42 +0530 +Subject: ALSA: hda/realtek: Fix Internal Speaker and Mic boost of Infinix Y4 Max + +From: Dinesh Kumar + +commit 5ebe792a5139f1ce6e4aed22bef12e7e2660df96 upstream. + +Internal Speaker of Infinix Y4 Max remains muted due to incorrect +Pin configuration, and the Internal Mic records high noise. This patch +corrects the Pin configuration for the Internal Speaker and limits +the Internal Mic boost. +HW Probe for device: https://linux-hardware.org/?probe=6d4386c347 +Test: Internal Speaker works fine, Mic has low noise. + +Signed-off-by: Dinesh Kumar +Cc: +Link: https://patch.msgid.link/20241125092842.13208-1-desikumar81@gmail.com +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman +--- + sound/pci/hda/patch_realtek.c | 11 +++++++++++ + 1 file changed, 11 insertions(+) + +--- a/sound/pci/hda/patch_realtek.c ++++ b/sound/pci/hda/patch_realtek.c +@@ -7548,6 +7548,7 @@ enum { + ALC269_FIXUP_THINKPAD_ACPI, + ALC269_FIXUP_DMIC_THINKPAD_ACPI, + ALC269VB_FIXUP_INFINIX_ZERO_BOOK_13, ++ ALC269VC_FIXUP_INFINIX_Y4_MAX, + ALC269VB_FIXUP_CHUWI_COREBOOK_XPRO, + ALC255_FIXUP_ACER_MIC_NO_PRESENCE, + ALC255_FIXUP_ASUS_MIC_NO_PRESENCE, +@@ -8005,6 +8006,15 @@ static const struct hda_fixup alc269_fix + .chained = true, + .chain_id = ALC269_FIXUP_LIMIT_INT_MIC_BOOST + }, ++ [ALC269VC_FIXUP_INFINIX_Y4_MAX] = { ++ .type = HDA_FIXUP_PINS, ++ .v.pins = (const struct hda_pintbl[]) { ++ { 0x1b, 0x90170150 }, /* use as internal speaker */ ++ { } ++ }, ++ .chained = true, ++ .chain_id = ALC269_FIXUP_LIMIT_INT_MIC_BOOST ++ }, + [ALC269VB_FIXUP_CHUWI_COREBOOK_XPRO] = { + .type = HDA_FIXUP_PINS, + .v.pins = (const struct hda_pintbl[]) { +@@ -11022,6 +11032,7 @@ static const struct snd_pci_quirk alc269 + SND_PCI_QUIRK(0x2782, 0x0214, "VAIO VJFE-CL", ALC269_FIXUP_LIMIT_INT_MIC_BOOST), + SND_PCI_QUIRK(0x2782, 0x0228, "Infinix ZERO BOOK 13", ALC269VB_FIXUP_INFINIX_ZERO_BOOK_13), + SND_PCI_QUIRK(0x2782, 0x0232, "CHUWI CoreBook XPro", ALC269VB_FIXUP_CHUWI_COREBOOK_XPRO), ++ SND_PCI_QUIRK(0x2782, 0x1701, "Infinix Y4 Max", ALC269VC_FIXUP_INFINIX_Y4_MAX), + SND_PCI_QUIRK(0x2782, 0x1707, "Vaio VJFE-ADL", ALC298_FIXUP_SPK_VOLUME), + SND_PCI_QUIRK(0x2782, 0x4900, "MEDION E15443", ALC233_FIXUP_MEDION_MTL_SPK), + SND_PCI_QUIRK(0x8086, 0x2074, "Intel NUC 8", ALC233_FIXUP_INTEL_NUC8_DMIC), diff --git a/queue-6.12/alsa-hda-realtek-fix-mute-micmute-leds-don-t-work-for-elitebook-x-g1i.patch b/queue-6.12/alsa-hda-realtek-fix-mute-micmute-leds-don-t-work-for-elitebook-x-g1i.patch new file mode 100644 index 00000000000..1ae3d4b10c5 --- /dev/null +++ b/queue-6.12/alsa-hda-realtek-fix-mute-micmute-leds-don-t-work-for-elitebook-x-g1i.patch @@ -0,0 +1,31 @@ +From 7ba81e4c3aa0ca25f06dc4456e7d36fa8e76385f Mon Sep 17 00:00:00 2001 +From: Dirk Su +Date: Tue, 26 Nov 2024 14:05:24 +0800 +Subject: ALSA: hda/realtek: fix mute/micmute LEDs don't work for EliteBook X G1i + +From: Dirk Su + +commit 7ba81e4c3aa0ca25f06dc4456e7d36fa8e76385f upstream. + +HP EliteBook X G1i needs ALC285_FIXUP_HP_GPIO_LED quirk to +make mic-mute/audio-mute working. + +Signed-off-by: Dirk Su +Cc: +Link: https://patch.msgid.link/20241126060531.22759-1-dirk.su@canonical.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 +@@ -10592,6 +10592,7 @@ static const struct snd_pci_quirk alc269 + SND_PCI_QUIRK(0x103c, 0x8cdf, "HP SnowWhite", ALC287_FIXUP_CS35L41_I2C_2_HP_GPIO_LED), + SND_PCI_QUIRK(0x103c, 0x8ce0, "HP SnowWhite", ALC287_FIXUP_CS35L41_I2C_2_HP_GPIO_LED), + SND_PCI_QUIRK(0x103c, 0x8cf5, "HP ZBook Studio 16", ALC245_FIXUP_CS35L41_SPI_4_HP_GPIO_LED), ++ SND_PCI_QUIRK(0x103c, 0x8d84, "HP EliteBook X G1i", ALC285_FIXUP_HP_GPIO_LED), + SND_PCI_QUIRK(0x1043, 0x103e, "ASUS X540SA", ALC256_FIXUP_ASUS_MIC), + SND_PCI_QUIRK(0x1043, 0x103f, "ASUS TX300", ALC282_FIXUP_ASUS_TX300), + SND_PCI_QUIRK(0x1043, 0x106d, "Asus K53BE", ALC269_FIXUP_LIMIT_INT_MIC_BOOST), diff --git a/queue-6.12/alsa-hda-realtek-set-pcbeep-to-default-value-for-alc274.patch b/queue-6.12/alsa-hda-realtek-set-pcbeep-to-default-value-for-alc274.patch new file mode 100644 index 00000000000..c55bfb0bc8d --- /dev/null +++ b/queue-6.12/alsa-hda-realtek-set-pcbeep-to-default-value-for-alc274.patch @@ -0,0 +1,32 @@ +From 155699ccab7c78cbba69798242b68bc8ac66d5d2 Mon Sep 17 00:00:00 2001 +From: Kailang Yang +Date: Thu, 21 Nov 2024 16:16:26 +0800 +Subject: ALSA: hda/realtek: Set PCBeep to default value for ALC274 + +From: Kailang Yang + +commit 155699ccab7c78cbba69798242b68bc8ac66d5d2 upstream. + +BIOS Enable PC beep path cause pop noise via speaker during boot time. +Set to default value from driver will solve the issue. + +Signed-off-by: Kailang Yang +Cc: +Link: https://lore.kernel.org/2721bb57e20a44c3826c473e933f9105@realtek.com +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman +--- + sound/pci/hda/patch_realtek.c | 2 ++ + 1 file changed, 2 insertions(+) + +--- a/sound/pci/hda/patch_realtek.c ++++ b/sound/pci/hda/patch_realtek.c +@@ -473,6 +473,8 @@ static void alc_fill_eapd_coef(struct hd + break; + case 0x10ec0234: + case 0x10ec0274: ++ alc_write_coef_idx(codec, 0x6e, 0x0c25); ++ fallthrough; + case 0x10ec0294: + case 0x10ec0700: + case 0x10ec0701: diff --git a/queue-6.12/alsa-hda-realtek-update-alc225-depop-procedure.patch b/queue-6.12/alsa-hda-realtek-update-alc225-depop-procedure.patch new file mode 100644 index 00000000000..d7e476dae8d --- /dev/null +++ b/queue-6.12/alsa-hda-realtek-update-alc225-depop-procedure.patch @@ -0,0 +1,147 @@ +From 1fd50509fe14a9adc9329e0454b986157a4c155a Mon Sep 17 00:00:00 2001 +From: Kailang Yang +Date: Thu, 14 Nov 2024 15:08:07 +0800 +Subject: ALSA: hda/realtek: Update ALC225 depop procedure + +From: Kailang Yang + +commit 1fd50509fe14a9adc9329e0454b986157a4c155a upstream. + +Old procedure has a chance to meet Headphone no output. + +Fixes: da911b1f5e98 ("ALSA: hda/realtek - update ALC225 depop optimize") +Signed-off-by: Kailang Yang +Cc: +Link: https://lore.kernel.org/5a27b016ba9d42b4a4e6dadce50a3ba4@realtek.com +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman +--- + sound/pci/hda/patch_realtek.c | 95 +++++++++++++++++++----------------------- + 1 file changed, 43 insertions(+), 52 deletions(-) + +--- a/sound/pci/hda/patch_realtek.c ++++ b/sound/pci/hda/patch_realtek.c +@@ -3768,33 +3768,28 @@ static void alc225_init(struct hda_codec + hp1_pin_sense = snd_hda_jack_detect(codec, hp_pin); + hp2_pin_sense = snd_hda_jack_detect(codec, 0x16); + +- if (hp1_pin_sense || hp2_pin_sense) ++ if (hp1_pin_sense || hp2_pin_sense) { + msleep(2); ++ alc_update_coefex_idx(codec, 0x57, 0x04, 0x0007, 0x1); /* Low power */ + +- alc_update_coefex_idx(codec, 0x57, 0x04, 0x0007, 0x1); /* Low power */ ++ if (hp1_pin_sense) ++ snd_hda_codec_write(codec, hp_pin, 0, ++ AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT); ++ if (hp2_pin_sense) ++ snd_hda_codec_write(codec, 0x16, 0, ++ AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT); ++ msleep(75); ++ ++ if (hp1_pin_sense) ++ snd_hda_codec_write(codec, hp_pin, 0, ++ AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE); ++ if (hp2_pin_sense) ++ snd_hda_codec_write(codec, 0x16, 0, ++ AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE); + +- if (hp1_pin_sense || spec->ultra_low_power) +- snd_hda_codec_write(codec, hp_pin, 0, +- AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE); +- if (hp2_pin_sense) +- snd_hda_codec_write(codec, 0x16, 0, +- AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE); +- +- if (hp1_pin_sense || hp2_pin_sense || spec->ultra_low_power) +- msleep(85); +- +- if (hp1_pin_sense || spec->ultra_low_power) +- snd_hda_codec_write(codec, hp_pin, 0, +- AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT); +- if (hp2_pin_sense) +- snd_hda_codec_write(codec, 0x16, 0, +- AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT); +- +- if (hp1_pin_sense || hp2_pin_sense || spec->ultra_low_power) +- msleep(100); +- +- alc_update_coef_idx(codec, 0x4a, 3 << 10, 0); +- alc_update_coefex_idx(codec, 0x57, 0x04, 0x0007, 0x4); /* Hight power */ ++ msleep(75); ++ alc_update_coefex_idx(codec, 0x57, 0x04, 0x0007, 0x4); /* Hight power */ ++ } + } + + static void alc225_shutup(struct hda_codec *codec) +@@ -3806,36 +3801,35 @@ static void alc225_shutup(struct hda_cod + if (!hp_pin) + hp_pin = 0x21; + +- alc_disable_headset_jack_key(codec); +- /* 3k pull low control for Headset jack. */ +- alc_update_coef_idx(codec, 0x4a, 0, 3 << 10); +- + hp1_pin_sense = snd_hda_jack_detect(codec, hp_pin); + hp2_pin_sense = snd_hda_jack_detect(codec, 0x16); + +- if (hp1_pin_sense || hp2_pin_sense) ++ if (hp1_pin_sense || hp2_pin_sense) { ++ alc_disable_headset_jack_key(codec); ++ /* 3k pull low control for Headset jack. */ ++ alc_update_coef_idx(codec, 0x4a, 0, 3 << 10); + msleep(2); + +- if (hp1_pin_sense || spec->ultra_low_power) +- snd_hda_codec_write(codec, hp_pin, 0, +- AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE); +- if (hp2_pin_sense) +- snd_hda_codec_write(codec, 0x16, 0, +- AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE); +- +- if (hp1_pin_sense || hp2_pin_sense || spec->ultra_low_power) +- msleep(85); +- +- if (hp1_pin_sense || spec->ultra_low_power) +- snd_hda_codec_write(codec, hp_pin, 0, +- AC_VERB_SET_PIN_WIDGET_CONTROL, 0x0); +- if (hp2_pin_sense) +- snd_hda_codec_write(codec, 0x16, 0, +- AC_VERB_SET_PIN_WIDGET_CONTROL, 0x0); +- +- if (hp1_pin_sense || hp2_pin_sense || spec->ultra_low_power) +- msleep(100); +- ++ if (hp1_pin_sense) ++ snd_hda_codec_write(codec, hp_pin, 0, ++ AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE); ++ if (hp2_pin_sense) ++ snd_hda_codec_write(codec, 0x16, 0, ++ AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE); ++ ++ msleep(75); ++ ++ if (hp1_pin_sense) ++ snd_hda_codec_write(codec, hp_pin, 0, ++ AC_VERB_SET_PIN_WIDGET_CONTROL, 0x0); ++ if (hp2_pin_sense) ++ snd_hda_codec_write(codec, 0x16, 0, ++ AC_VERB_SET_PIN_WIDGET_CONTROL, 0x0); ++ ++ msleep(75); ++ alc_update_coef_idx(codec, 0x4a, 3 << 10, 0); ++ alc_enable_headset_jack_key(codec); ++ } + alc_auto_setup_eapd(codec, false); + alc_shutup_pins(codec); + if (spec->ultra_low_power) { +@@ -3846,9 +3840,6 @@ static void alc225_shutup(struct hda_cod + alc_update_coef_idx(codec, 0x4a, 3<<4, 2<<4); + msleep(30); + } +- +- alc_update_coef_idx(codec, 0x4a, 3 << 10, 0); +- alc_enable_headset_jack_key(codec); + } + + static void alc_default_init(struct hda_codec *codec) diff --git a/queue-6.12/alsa-pcm-add-sanity-null-check-for-the-default-mmap-fault-handler.patch b/queue-6.12/alsa-pcm-add-sanity-null-check-for-the-default-mmap-fault-handler.patch new file mode 100644 index 00000000000..da833f44ef3 --- /dev/null +++ b/queue-6.12/alsa-pcm-add-sanity-null-check-for-the-default-mmap-fault-handler.patch @@ -0,0 +1,38 @@ +From d2913a07d9037fe7aed4b7e680684163eaed6bc4 Mon Sep 17 00:00:00 2001 +From: Takashi Iwai +Date: Wed, 20 Nov 2024 15:11:02 +0100 +Subject: ALSA: pcm: Add sanity NULL check for the default mmap fault handler + +From: Takashi Iwai + +commit d2913a07d9037fe7aed4b7e680684163eaed6bc4 upstream. + +A driver might allow the mmap access before initializing its +runtime->dma_area properly. Add a proper NULL check before passing to +virt_to_page() for avoiding a panic. + +Reported-by: syzbot+4bf62a7b1d0f4fdb7ae2@syzkaller.appspotmail.com +Cc: +Link: https://patch.msgid.link/20241120141104.7060-1-tiwai@suse.de +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman +--- + sound/core/pcm_native.c | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +--- a/sound/core/pcm_native.c ++++ b/sound/core/pcm_native.c +@@ -3793,9 +3793,11 @@ static vm_fault_t snd_pcm_mmap_data_faul + return VM_FAULT_SIGBUS; + if (substream->ops->page) + page = substream->ops->page(substream, offset); +- else if (!snd_pcm_get_dma_buf(substream)) ++ else if (!snd_pcm_get_dma_buf(substream)) { ++ if (WARN_ON_ONCE(!runtime->dma_area)) ++ return VM_FAULT_SIGBUS; + page = virt_to_page(runtime->dma_area + offset); +- else ++ } else + page = snd_sgbuf_get_page(snd_pcm_get_dma_buf(substream), offset); + if (!page) + return VM_FAULT_SIGBUS; diff --git a/queue-6.12/alsa-rawmidi-fix-kvfree-call-in-spinlock.patch b/queue-6.12/alsa-rawmidi-fix-kvfree-call-in-spinlock.patch new file mode 100644 index 00000000000..b917379179b --- /dev/null +++ b/queue-6.12/alsa-rawmidi-fix-kvfree-call-in-spinlock.patch @@ -0,0 +1,50 @@ +From 20c0c49720dc4e205d4c1d64add56a5043c5ec5f Mon Sep 17 00:00:00 2001 +From: Takashi Iwai +Date: Mon, 25 Nov 2024 15:20:25 +0100 +Subject: ALSA: rawmidi: Fix kvfree() call in spinlock + +From: Takashi Iwai + +commit 20c0c49720dc4e205d4c1d64add56a5043c5ec5f upstream. + +At the conversion of locking with guard(), I overlooked that kvfree() +must not be called inside the spinlock unlike kfree(), and this was +caught by syzkaller now. + +This patch reverts the conversion partially for restoring the kvfree() +call outside the spinlock. It's not trivial to use guard() in this +context, unfortunately. + +Fixes: 84bb065b316e ("ALSA: rawmidi: Use guard() for locking") +Reported-by: syzbot+351f8764833934c68836@syzkaller.appspotmail.com +Reported-by: Eric Dumazet +Closes: https://lore.kernel.org/6744737b.050a0220.1cc393.007e.GAE@google.com +Cc: +Link: https://patch.msgid.link/20241125142041.16578-1-tiwai@suse.de +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman +--- + sound/core/rawmidi.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +--- a/sound/core/rawmidi.c ++++ b/sound/core/rawmidi.c +@@ -724,8 +724,9 @@ static int resize_runtime_buffer(struct + newbuf = kvzalloc(params->buffer_size, GFP_KERNEL); + if (!newbuf) + return -ENOMEM; +- guard(spinlock_irq)(&substream->lock); ++ spin_lock_irq(&substream->lock); + if (runtime->buffer_ref) { ++ spin_unlock_irq(&substream->lock); + kvfree(newbuf); + return -EBUSY; + } +@@ -733,6 +734,7 @@ static int resize_runtime_buffer(struct + runtime->buffer = newbuf; + runtime->buffer_size = params->buffer_size; + __reset_runtime_ptrs(runtime, is_input); ++ spin_unlock_irq(&substream->lock); + kvfree(oldbuf); + } + runtime->avail_min = params->avail_min; diff --git a/queue-6.12/alsa-ump-fix-evaluation-of-midi-1.0-fb-info.patch b/queue-6.12/alsa-ump-fix-evaluation-of-midi-1.0-fb-info.patch new file mode 100644 index 00000000000..789689c393d --- /dev/null +++ b/queue-6.12/alsa-ump-fix-evaluation-of-midi-1.0-fb-info.patch @@ -0,0 +1,42 @@ +From 7be34f6feedd60e418de1c2c48e661d70416635f Mon Sep 17 00:00:00 2001 +From: Takashi Iwai +Date: Wed, 27 Nov 2024 08:00:58 +0100 +Subject: ALSA: ump: Fix evaluation of MIDI 1.0 FB info + +From: Takashi Iwai + +commit 7be34f6feedd60e418de1c2c48e661d70416635f upstream. + +The m1.0 field of UMP Function Block info specifies whether the given +FB is a MIDI 1.0 port or not. When implementing the UMP support on +Linux, I somehow interpreted as if it were bit flags, but the field is +actually an enumeration from 0 to 2, where 2 means MIDI 1.0 *and* low +speed. + +This patch corrects the interpretation and sets the right bit flags +depending on the m1.0 field of FB Info. This effectively fixes the +missing detection of MIDI 1.0 FB when m1.0 is 2. + +Fixes: 37e0e14128e0 ("ALSA: ump: Support UMP Endpoint and Function Block parsing") +Cc: +Link: https://patch.msgid.link/20241127070059.8099-1-tiwai@suse.de +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman +--- + sound/core/ump.c | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +--- a/sound/core/ump.c ++++ b/sound/core/ump.c +@@ -788,7 +788,10 @@ static void fill_fb_info(struct snd_ump_ + info->ui_hint = buf->fb_info.ui_hint; + info->first_group = buf->fb_info.first_group; + info->num_groups = buf->fb_info.num_groups; +- info->flags = buf->fb_info.midi_10; ++ if (buf->fb_info.midi_10 < 2) ++ info->flags = buf->fb_info.midi_10; ++ else ++ info->flags = SNDRV_UMP_BLOCK_IS_MIDI1 | SNDRV_UMP_BLOCK_IS_LOWSPEED; + info->active = buf->fb_info.active; + info->midi_ci_version = buf->fb_info.midi_ci_version; + info->sysex8_streams = buf->fb_info.sysex8_streams; diff --git a/queue-6.12/series b/queue-6.12/series index cc375afaf5c..c7628c3d110 100644 --- a/queue-6.12/series +++ b/queue-6.12/series @@ -738,3 +738,12 @@ soc-fsl-rcpm-fix-missing-of_node_put-in-copy_ippdexpcr1_setting.patch media-v4l2-core-v4l2-dv-timings-check-cvt-gtf-result.patch x86-mm-carve-out-invlpg-inline-asm-for-use-by-others.patch x86-microcode-amd-flush-patch-buffer-mapping-after-application.patch +alsa-rawmidi-fix-kvfree-call-in-spinlock.patch +alsa-ump-fix-evaluation-of-midi-1.0-fb-info.patch +alsa-pcm-add-sanity-null-check-for-the-default-mmap-fault-handler.patch +alsa-hda-realtek-update-alc225-depop-procedure.patch +alsa-hda-realtek-enable-speaker-pins-for-medion-e15443-platform.patch +alsa-hda-realtek-set-pcbeep-to-default-value-for-alc274.patch +alsa-hda-realtek-fix-internal-speaker-and-mic-boost-of-infinix-y4-max.patch +alsa-hda-realtek-fix-mute-micmute-leds-don-t-work-for-elitebook-x-g1i.patch +alsa-hda-realtek-apply-quirk-for-medion-e15433.patch