+++ /dev/null
-From 3b4309546b48fc167aa615a2d881a09c0a97971f Mon Sep 17 00:00:00 2001
-From: Kuan-Wei Chiu <visitorckw@gmail.com>
-Date: Wed, 29 Jan 2025 00:54:15 +0800
-Subject: ALSA: hda: Fix headset detection failure due to unstable sort
-
-From: Kuan-Wei Chiu <visitorckw@gmail.com>
-
-commit 3b4309546b48fc167aa615a2d881a09c0a97971f upstream.
-
-The auto_parser assumed sort() was stable, but the kernel's sort() uses
-heapsort, which has never been stable. After commit 0e02ca29a563
-("lib/sort: optimize heapsort with double-pop variation"), the order of
-equal elements changed, causing the headset to fail to work.
-
-Fix the issue by recording the original order of elements before
-sorting and using it as a tiebreaker for equal elements in the
-comparison function.
-
-Fixes: b9030a005d58 ("ALSA: hda - Use standard sort function in hda_auto_parser.c")
-Reported-by: Austrum <austrum.lab@gmail.com>
-Closes: https://bugzilla.kernel.org/show_bug.cgi?id=219158
-Tested-by: Austrum <austrum.lab@gmail.com>
-Cc: stable@vger.kernel.org
-Signed-off-by: Kuan-Wei Chiu <visitorckw@gmail.com>
-Link: https://patch.msgid.link/20250128165415.643223-1-visitorckw@gmail.com
-Signed-off-by: Takashi Iwai <tiwai@suse.de>
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
----
- sound/pci/hda/hda_auto_parser.c | 8 +++++++-
- sound/pci/hda/hda_auto_parser.h | 1 +
- 2 files changed, 8 insertions(+), 1 deletion(-)
-
---- a/sound/pci/hda/hda_auto_parser.c
-+++ b/sound/pci/hda/hda_auto_parser.c
-@@ -80,7 +80,11 @@ static int compare_input_type(const void
-
- /* In case one has boost and the other one has not,
- pick the one with boost first. */
-- return (int)(b->has_boost_on_pin - a->has_boost_on_pin);
-+ if (a->has_boost_on_pin != b->has_boost_on_pin)
-+ return (int)(b->has_boost_on_pin - a->has_boost_on_pin);
-+
-+ /* Keep the original order */
-+ return a->order - b->order;
- }
-
- /* Reorder the surround channels
-@@ -404,6 +408,8 @@ int snd_hda_parse_pin_defcfg(struct hda_
- reorder_outputs(cfg->speaker_outs, cfg->speaker_pins);
-
- /* sort inputs in the order of AUTO_PIN_* type */
-+ for (i = 0; i < cfg->num_inputs; i++)
-+ cfg->inputs[i].order = i;
- sort(cfg->inputs, cfg->num_inputs, sizeof(cfg->inputs[0]),
- compare_input_type, NULL);
-
---- a/sound/pci/hda/hda_auto_parser.h
-+++ b/sound/pci/hda/hda_auto_parser.h
-@@ -35,6 +35,7 @@ struct auto_pin_cfg_item {
- unsigned int is_headset_mic:1;
- unsigned int is_headphone_mic:1; /* Mic-only in headphone jack */
- unsigned int has_boost_on_pin:1;
-+ int order;
- };
-
- struct auto_pin_cfg;
dm-crypt-don-t-update-io-sector-after-kcryptd_crypt_write_io_submit.patch
dm-crypt-track-tag_offset-in-convert_context.patch
alsa-hda-realtek-enable-headset-mic-on-positivo-c6400.patch
-alsa-hda-fix-headset-detection-failure-due-to-unstable-sort.patch
scsi-qla2xxx-move-fce-trace-buffer-allocation-to-user-control.patch
scsi-storvsc-set-correct-data-length-for-sending-scsi-command-without-payload.patch
kbuild-move-wenum-enum-conversion-to-w-2.patch
intel_th-pci-add-panther-lake-p-u-support.patch
slimbus-messaging-free-transaction-id-in-delayed-interrupt-scenario.patch
eeprom-digsy_mtc-make-gpio-lookup-table-match-the-device.patch
+mtd-rawnand-cadence-fix-unchecked-dereference.patch
+++ /dev/null
-From 3b4309546b48fc167aa615a2d881a09c0a97971f Mon Sep 17 00:00:00 2001
-From: Kuan-Wei Chiu <visitorckw@gmail.com>
-Date: Wed, 29 Jan 2025 00:54:15 +0800
-Subject: ALSA: hda: Fix headset detection failure due to unstable sort
-
-From: Kuan-Wei Chiu <visitorckw@gmail.com>
-
-commit 3b4309546b48fc167aa615a2d881a09c0a97971f upstream.
-
-The auto_parser assumed sort() was stable, but the kernel's sort() uses
-heapsort, which has never been stable. After commit 0e02ca29a563
-("lib/sort: optimize heapsort with double-pop variation"), the order of
-equal elements changed, causing the headset to fail to work.
-
-Fix the issue by recording the original order of elements before
-sorting and using it as a tiebreaker for equal elements in the
-comparison function.
-
-Fixes: b9030a005d58 ("ALSA: hda - Use standard sort function in hda_auto_parser.c")
-Reported-by: Austrum <austrum.lab@gmail.com>
-Closes: https://bugzilla.kernel.org/show_bug.cgi?id=219158
-Tested-by: Austrum <austrum.lab@gmail.com>
-Cc: stable@vger.kernel.org
-Signed-off-by: Kuan-Wei Chiu <visitorckw@gmail.com>
-Link: https://patch.msgid.link/20250128165415.643223-1-visitorckw@gmail.com
-Signed-off-by: Takashi Iwai <tiwai@suse.de>
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
----
- sound/pci/hda/hda_auto_parser.c | 8 +++++++-
- sound/pci/hda/hda_auto_parser.h | 1 +
- 2 files changed, 8 insertions(+), 1 deletion(-)
-
---- a/sound/pci/hda/hda_auto_parser.c
-+++ b/sound/pci/hda/hda_auto_parser.c
-@@ -80,7 +80,11 @@ static int compare_input_type(const void
-
- /* In case one has boost and the other one has not,
- pick the one with boost first. */
-- return (int)(b->has_boost_on_pin - a->has_boost_on_pin);
-+ if (a->has_boost_on_pin != b->has_boost_on_pin)
-+ return (int)(b->has_boost_on_pin - a->has_boost_on_pin);
-+
-+ /* Keep the original order */
-+ return a->order - b->order;
- }
-
- /* Reorder the surround channels
-@@ -404,6 +408,8 @@ int snd_hda_parse_pin_defcfg(struct hda_
- reorder_outputs(cfg->speaker_outs, cfg->speaker_pins);
-
- /* sort inputs in the order of AUTO_PIN_* type */
-+ for (i = 0; i < cfg->num_inputs; i++)
-+ cfg->inputs[i].order = i;
- sort(cfg->inputs, cfg->num_inputs, sizeof(cfg->inputs[0]),
- compare_input_type, NULL);
-
---- a/sound/pci/hda/hda_auto_parser.h
-+++ b/sound/pci/hda/hda_auto_parser.h
-@@ -35,6 +35,7 @@ struct auto_pin_cfg_item {
- unsigned int is_headset_mic:1;
- unsigned int is_headphone_mic:1; /* Mic-only in headphone jack */
- unsigned int has_boost_on_pin:1;
-+ int order;
- };
-
- struct auto_pin_cfg;
mips-math-emu-fix-emulation-of-the-prefx-instruction.patch
revert-media-uvcvideo-require-entities-to-have-a-non-zero-unique-id.patch
alsa-hda-realtek-enable-headset-mic-on-positivo-c6400.patch
-alsa-hda-fix-headset-detection-failure-due-to-unstable-sort.patch
pci-endpoint-finish-virtual-ep-removal-in-pci_epf_remove_vepf.patch
nvme-pci-add-tuxedo-infinityflex-to-samsung-sleep-quirk.patch
nvme-pci-add-tuxedo-ibp-gen9-to-samsung-sleep-quirk.patch
bus-mhi-host-pci_generic-use-pci_try_reset_function-to-avoid-deadlock.patch
eeprom-digsy_mtc-make-gpio-lookup-table-match-the-device.patch
drivers-virt-acrn-hsm-use-kzalloc-to-avoid-info-leak-in-pmcmd_ioctl.patch
+media-uvcvideo-avoid-invalid-memory-access.patch
+media-uvcvideo-avoid-returning-invalid-controls.patch
+md-select-block_legacy_autoload.patch
+mtd-rawnand-cadence-fix-unchecked-dereference.patch
+++ /dev/null
-From 3b4309546b48fc167aa615a2d881a09c0a97971f Mon Sep 17 00:00:00 2001
-From: Kuan-Wei Chiu <visitorckw@gmail.com>
-Date: Wed, 29 Jan 2025 00:54:15 +0800
-Subject: ALSA: hda: Fix headset detection failure due to unstable sort
-
-From: Kuan-Wei Chiu <visitorckw@gmail.com>
-
-commit 3b4309546b48fc167aa615a2d881a09c0a97971f upstream.
-
-The auto_parser assumed sort() was stable, but the kernel's sort() uses
-heapsort, which has never been stable. After commit 0e02ca29a563
-("lib/sort: optimize heapsort with double-pop variation"), the order of
-equal elements changed, causing the headset to fail to work.
-
-Fix the issue by recording the original order of elements before
-sorting and using it as a tiebreaker for equal elements in the
-comparison function.
-
-Fixes: b9030a005d58 ("ALSA: hda - Use standard sort function in hda_auto_parser.c")
-Reported-by: Austrum <austrum.lab@gmail.com>
-Closes: https://bugzilla.kernel.org/show_bug.cgi?id=219158
-Tested-by: Austrum <austrum.lab@gmail.com>
-Cc: stable@vger.kernel.org
-Signed-off-by: Kuan-Wei Chiu <visitorckw@gmail.com>
-Link: https://patch.msgid.link/20250128165415.643223-1-visitorckw@gmail.com
-Signed-off-by: Takashi Iwai <tiwai@suse.de>
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
----
- sound/pci/hda/hda_auto_parser.c | 8 +++++++-
- sound/pci/hda/hda_auto_parser.h | 1 +
- 2 files changed, 8 insertions(+), 1 deletion(-)
-
---- a/sound/pci/hda/hda_auto_parser.c
-+++ b/sound/pci/hda/hda_auto_parser.c
-@@ -80,7 +80,11 @@ static int compare_input_type(const void
-
- /* In case one has boost and the other one has not,
- pick the one with boost first. */
-- return (int)(b->has_boost_on_pin - a->has_boost_on_pin);
-+ if (a->has_boost_on_pin != b->has_boost_on_pin)
-+ return (int)(b->has_boost_on_pin - a->has_boost_on_pin);
-+
-+ /* Keep the original order */
-+ return a->order - b->order;
- }
-
- /* Reorder the surround channels
-@@ -404,6 +408,8 @@ int snd_hda_parse_pin_defcfg(struct hda_
- reorder_outputs(cfg->speaker_outs, cfg->speaker_pins);
-
- /* sort inputs in the order of AUTO_PIN_* type */
-+ for (i = 0; i < cfg->num_inputs; i++)
-+ cfg->inputs[i].order = i;
- sort(cfg->inputs, cfg->num_inputs, sizeof(cfg->inputs[0]),
- compare_input_type, NULL);
-
---- a/sound/pci/hda/hda_auto_parser.h
-+++ b/sound/pci/hda/hda_auto_parser.h
-@@ -35,6 +35,7 @@ struct auto_pin_cfg_item {
- unsigned int is_headset_mic:1;
- unsigned int is_headphone_mic:1; /* Mic-only in headphone jack */
- unsigned int has_boost_on_pin:1;
-+ int order;
- };
-
- struct auto_pin_cfg;
serial-sh-sci-drop-__initdata-macro-for-port_cfg.patch
serial-sh-sci-do-not-probe-the-serial-port-if-its-slot-in-sci_ports-is-in-use.patch
powerpc-pseries-eeh-fix-get-pe-state-translation.patch
-alsa-hda-fix-headset-detection-failure-due-to-unstable-sort.patch
kbuild-move-wenum-enum-conversion-to-w-2.patch
soc-qcom-smem_state-fix-missing-of_node_put-in-error-path.patch
media-ov5640-fix-get_light_freq-on-auto.patch