]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
5.15-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 24 Nov 2023 12:33:17 +0000 (12:33 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 24 Nov 2023 12:33:17 +0000 (12:33 +0000)
added patches:
alsa-hda-realtek-add-dell-alc295-to-pin-fall-back-table.patch
alsa-hda-realtek-enable-internal-speaker-of-asus-k6500zc.patch
alsa-info-fix-potential-deadlock-at-disconnection.patch

queue-5.15/alsa-hda-realtek-add-dell-alc295-to-pin-fall-back-table.patch [new file with mode: 0644]
queue-5.15/alsa-hda-realtek-enable-internal-speaker-of-asus-k6500zc.patch [new file with mode: 0644]
queue-5.15/alsa-info-fix-potential-deadlock-at-disconnection.patch [new file with mode: 0644]
queue-5.15/series

diff --git a/queue-5.15/alsa-hda-realtek-add-dell-alc295-to-pin-fall-back-table.patch b/queue-5.15/alsa-hda-realtek-add-dell-alc295-to-pin-fall-back-table.patch
new file mode 100644 (file)
index 0000000..ca28425
--- /dev/null
@@ -0,0 +1,61 @@
+From 4b21a669ca21ed8f24ef4530b2918be5730114de Mon Sep 17 00:00:00 2001
+From: Kailang Yang <kailang@realtek.com>
+Date: Fri, 10 Nov 2023 15:16:06 +0800
+Subject: ALSA: hda/realtek - Add Dell ALC295 to pin fall back table
+
+From: Kailang Yang <kailang@realtek.com>
+
+commit 4b21a669ca21ed8f24ef4530b2918be5730114de upstream.
+
+Add ALC295 to pin fall back table.
+Remove 5 pin quirks for Dell ALC295.
+ALC295 was only support MIC2 for external MIC function.
+ALC295 assigned model "ALC269_FIXUP_DELL1_MIC_NO_PRESENCE" for pin
+fall back table.
+It was assigned wrong model. So, let's remove it.
+
+Fixes: fbc571290d9f ("ALSA: hda/realtek - Fixed Headphone Mic can't record on Dell platform")
+Signed-off-by: Kailang Yang <kailang@realtek.com>
+Cc: <stable@vger.kernel.org>
+Link: https://lore.kernel.org/r/7c1998e873834df98d59bd7e0d08c72e@realtek.com
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ sound/pci/hda/patch_realtek.c |   19 +++----------------
+ 1 file changed, 3 insertions(+), 16 deletions(-)
+
+--- a/sound/pci/hda/patch_realtek.c
++++ b/sound/pci/hda/patch_realtek.c
+@@ -9963,22 +9963,6 @@ static const struct snd_hda_pin_quirk al
+               {0x12, 0x90a60130},
+               {0x17, 0x90170110},
+               {0x21, 0x03211020}),
+-      SND_HDA_PIN_QUIRK(0x10ec0295, 0x1028, "Dell", ALC269_FIXUP_DELL4_MIC_NO_PRESENCE,
+-              {0x14, 0x90170110},
+-              {0x21, 0x04211020}),
+-      SND_HDA_PIN_QUIRK(0x10ec0295, 0x1028, "Dell", ALC269_FIXUP_DELL4_MIC_NO_PRESENCE,
+-              {0x14, 0x90170110},
+-              {0x21, 0x04211030}),
+-      SND_HDA_PIN_QUIRK(0x10ec0295, 0x1028, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE,
+-              ALC295_STANDARD_PINS,
+-              {0x17, 0x21014020},
+-              {0x18, 0x21a19030}),
+-      SND_HDA_PIN_QUIRK(0x10ec0295, 0x1028, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE,
+-              ALC295_STANDARD_PINS,
+-              {0x17, 0x21014040},
+-              {0x18, 0x21a19050}),
+-      SND_HDA_PIN_QUIRK(0x10ec0295, 0x1028, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE,
+-              ALC295_STANDARD_PINS),
+       SND_HDA_PIN_QUIRK(0x10ec0298, 0x1028, "Dell", ALC298_FIXUP_DELL1_MIC_NO_PRESENCE,
+               ALC298_STANDARD_PINS,
+               {0x17, 0x90170110}),
+@@ -10022,6 +10006,9 @@ static const struct snd_hda_pin_quirk al
+       SND_HDA_PIN_QUIRK(0x10ec0289, 0x1028, "Dell", ALC269_FIXUP_DELL4_MIC_NO_PRESENCE,
+               {0x19, 0x40000000},
+               {0x1b, 0x40000000}),
++      SND_HDA_PIN_QUIRK(0x10ec0295, 0x1028, "Dell", ALC269_FIXUP_DELL4_MIC_NO_PRESENCE,
++              {0x19, 0x40000000},
++              {0x1b, 0x40000000}),
+       SND_HDA_PIN_QUIRK(0x10ec0256, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
+               {0x19, 0x40000000},
+               {0x1a, 0x40000000}),
diff --git a/queue-5.15/alsa-hda-realtek-enable-internal-speaker-of-asus-k6500zc.patch b/queue-5.15/alsa-hda-realtek-enable-internal-speaker-of-asus-k6500zc.patch
new file mode 100644 (file)
index 0000000..305d8e3
--- /dev/null
@@ -0,0 +1,31 @@
+From 713f040cd22285fcc506f40a0d259566e6758c3c Mon Sep 17 00:00:00 2001
+From: Chandradeep Dey <codesigning@chandradeepdey.com>
+Date: Sat, 11 Nov 2023 19:25:49 +0100
+Subject: ALSA: hda/realtek - Enable internal speaker of ASUS K6500ZC
+
+From: Chandradeep Dey <codesigning@chandradeepdey.com>
+
+commit 713f040cd22285fcc506f40a0d259566e6758c3c upstream.
+
+Apply the already existing quirk chain ALC294_FIXUP_ASUS_SPK to enable
+the internal speaker of ASUS K6500ZC.
+
+Signed-off-by: Chandradeep Dey <codesigning@chandradeepdey.com>
+Cc: <stable@vger.kernel.org>
+Link: https://lore.kernel.org/r/NizcVHQ--3-9@chandradeepdey.com
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ 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
+@@ -9113,6 +9113,7 @@ static const struct snd_pci_quirk alc269
+       SND_PCI_QUIRK(0x1043, 0x10a1, "ASUS UX391UA", ALC294_FIXUP_ASUS_SPK),
+       SND_PCI_QUIRK(0x1043, 0x10c0, "ASUS X540SA", ALC256_FIXUP_ASUS_MIC),
+       SND_PCI_QUIRK(0x1043, 0x10d0, "ASUS X540LA/X540LJ", ALC255_FIXUP_ASUS_MIC_NO_PRESENCE),
++      SND_PCI_QUIRK(0x1043, 0x10d3, "ASUS K6500ZC", ALC294_FIXUP_ASUS_SPK),
+       SND_PCI_QUIRK(0x1043, 0x115d, "Asus 1015E", ALC269_FIXUP_LIMIT_INT_MIC_BOOST),
+       SND_PCI_QUIRK(0x1043, 0x11c0, "ASUS X556UR", ALC255_FIXUP_ASUS_MIC_NO_PRESENCE),
+       SND_PCI_QUIRK(0x1043, 0x125e, "ASUS Q524UQK", ALC255_FIXUP_ASUS_MIC_NO_PRESENCE),
diff --git a/queue-5.15/alsa-info-fix-potential-deadlock-at-disconnection.patch b/queue-5.15/alsa-info-fix-potential-deadlock-at-disconnection.patch
new file mode 100644 (file)
index 0000000..3306cfe
--- /dev/null
@@ -0,0 +1,121 @@
+From c7a60651953359f98dbf24b43e1bf561e1573ed4 Mon Sep 17 00:00:00 2001
+From: Takashi Iwai <tiwai@suse.de>
+Date: Thu, 9 Nov 2023 15:19:54 +0100
+Subject: ALSA: info: Fix potential deadlock at disconnection
+
+From: Takashi Iwai <tiwai@suse.de>
+
+commit c7a60651953359f98dbf24b43e1bf561e1573ed4 upstream.
+
+As reported recently, ALSA core info helper may cause a deadlock at
+the forced device disconnection during the procfs operation.
+
+The proc_remove() (that is called from the snd_card_disconnect()
+helper) has a synchronization of the pending procfs accesses via
+wait_for_completion().  Meanwhile, ALSA procfs helper takes the global
+mutex_lock(&info_mutex) at both the proc_open callback and
+snd_card_info_disconnect() helper.  Since the proc_open can't finish
+due to the mutex lock, wait_for_completion() never returns, either,
+hence it deadlocks.
+
+       TASK#1                          TASK#2
+       proc_reg_open()
+         takes use_pde()
+       snd_info_text_entry_open()
+                                       snd_card_disconnect()
+                                       snd_info_card_disconnect()
+                                         takes mutex_lock(&info_mutex)
+                                       proc_remove()
+                                       wait_for_completion(unused_pde)
+                                         ... waiting task#1 closes
+       mutex_lock(&info_mutex)
+               => DEADLOCK
+
+This patch is a workaround for avoiding the deadlock scenario above.
+
+The basic strategy is to move proc_remove() call outside the mutex
+lock.  proc_remove() can work gracefully without extra locking, and it
+can delete the tree recursively alone.  So, we call proc_remove() at
+snd_info_card_disconnection() at first, then delete the rest resources
+recursively within the info_mutex lock.
+
+After the change, the function snd_info_disconnect() doesn't do
+disconnection by itself any longer, but it merely clears the procfs
+pointer.  So rename the function to snd_info_clear_entries() for
+avoiding confusion.
+
+The similar change is applied to snd_info_free_entry(), too.  Since
+the proc_remove() is called only conditionally with the non-NULL
+entry->p, it's skipped after the snd_info_clear_entries() call.
+
+Reported-by: Shinhyung Kang <s47.kang@samsung.com>
+Closes: https://lore.kernel.org/r/664457955.21699345385931.JavaMail.epsvc@epcpadp4
+Reviewed-by: Jaroslav Kysela <perex@perex.cz>
+Cc: <stable@vger.kernel.org>
+Link: https://lore.kernel.org/r/20231109141954.4283-1-tiwai@suse.de
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ sound/core/info.c |   21 +++++++++++++--------
+ 1 file changed, 13 insertions(+), 8 deletions(-)
+
+--- a/sound/core/info.c
++++ b/sound/core/info.c
+@@ -56,7 +56,7 @@ struct snd_info_private_data {
+ };
+ static int snd_info_version_init(void);
+-static void snd_info_disconnect(struct snd_info_entry *entry);
++static void snd_info_clear_entries(struct snd_info_entry *entry);
+ /*
+@@ -569,11 +569,16 @@ void snd_info_card_disconnect(struct snd
+ {
+       if (!card)
+               return;
+-      mutex_lock(&info_mutex);
++
+       proc_remove(card->proc_root_link);
+-      card->proc_root_link = NULL;
+       if (card->proc_root)
+-              snd_info_disconnect(card->proc_root);
++              proc_remove(card->proc_root->p);
++
++      mutex_lock(&info_mutex);
++      if (card->proc_root)
++              snd_info_clear_entries(card->proc_root);
++      card->proc_root_link = NULL;
++      card->proc_root = NULL;
+       mutex_unlock(&info_mutex);
+ }
+@@ -745,15 +750,14 @@ struct snd_info_entry *snd_info_create_c
+ }
+ EXPORT_SYMBOL(snd_info_create_card_entry);
+-static void snd_info_disconnect(struct snd_info_entry *entry)
++static void snd_info_clear_entries(struct snd_info_entry *entry)
+ {
+       struct snd_info_entry *p;
+       if (!entry->p)
+               return;
+       list_for_each_entry(p, &entry->children, list)
+-              snd_info_disconnect(p);
+-      proc_remove(entry->p);
++              snd_info_clear_entries(p);
+       entry->p = NULL;
+ }
+@@ -770,8 +774,9 @@ void snd_info_free_entry(struct snd_info
+       if (!entry)
+               return;
+       if (entry->p) {
++              proc_remove(entry->p);
+               mutex_lock(&info_mutex);
+-              snd_info_disconnect(entry);
++              snd_info_clear_entries(entry);
+               mutex_unlock(&info_mutex);
+       }
index 9b4c088e512cc1acaf778027f098d458005a4440..1c616ead4dfc4001acbb106f2bddca27176dad73 100644 (file)
@@ -237,6 +237,9 @@ parisc-prevent-booting-64-bit-kernels-on-pa1.x-machines.patch
 parisc-pgtable-do-not-drop-upper-5-address-bits-of-physical-address.patch
 parisc-power-fix-power-soft-off-when-running-on-qemu.patch
 xhci-enable-rpm-on-controllers-that-support-low-power-states.patch
+alsa-info-fix-potential-deadlock-at-disconnection.patch
+alsa-hda-realtek-add-dell-alc295-to-pin-fall-back-table.patch
+alsa-hda-realtek-enable-internal-speaker-of-asus-k6500zc.patch
 serial-meson-use-platform_get_irq-to-get-the-interru.patch
 tty-serial-meson-fix-hard-lockup-on-crtscts-mode.patch
 regmap-ensure-range-selector-registers-are-updated-a.patch