--- /dev/null
+From c1839501fe3e67d98635f159dba8b170d08f6521 Mon Sep 17 00:00:00 2001
+From: Takashi Sakamoto <o-takashi@sakamocchi.jp>
+Date: Fri, 26 Jul 2024 00:56:40 +0900
+Subject: ALSA: firewire-lib: fix wrong value as length of header for CIP_NO_HEADER case
+
+From: Takashi Sakamoto <o-takashi@sakamocchi.jp>
+
+commit c1839501fe3e67d98635f159dba8b170d08f6521 upstream.
+
+In a commit 1d717123bb1a ("ALSA: firewire-lib: Avoid
+-Wflex-array-member-not-at-end warning"), DEFINE_FLEX() macro was used to
+handle variable length of array for header field in struct fw_iso_packet
+structure. The usage of macro has a side effect that the designated
+initializer assigns the count of array to the given field. Therefore
+CIP_HEADER_QUADLETS (=2) is assigned to struct fw_iso_packet.header,
+while the original designated initializer assigns zero to all fields.
+
+With CIP_NO_HEADER flag, the change causes invalid length of header in
+isochronous packet for 1394 OHCI IT context. This bug affects all of
+devices supported by ALSA fireface driver; RME Fireface 400, 800, UCX, UFX,
+and 802.
+
+This commit fixes the bug by replacing it with the alternative version of
+macro which corresponds no initializer.
+
+Cc: stable@vger.kernel.org
+Fixes: 1d717123bb1a ("ALSA: firewire-lib: Avoid -Wflex-array-member-not-at-end warning")
+Reported-by: Edmund Raile <edmund.raile@proton.me>
+Closes: https://lore.kernel.org/r/rrufondjeynlkx2lniot26ablsltnynfaq2gnqvbiso7ds32il@qk4r6xps7jh2/
+Reviewed-by: Takashi Iwai <tiwai@suse.de>
+Link: https://lore.kernel.org/r/20240725155640.128442-1-o-takashi@sakamocchi.jp
+Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ sound/firewire/amdtp-stream.c | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+diff --git a/sound/firewire/amdtp-stream.c b/sound/firewire/amdtp-stream.c
+index d35d0a420ee0..1a163bbcabd7 100644
+--- a/sound/firewire/amdtp-stream.c
++++ b/sound/firewire/amdtp-stream.c
+@@ -1180,8 +1180,7 @@ static void process_rx_packets(struct fw_iso_context *context, u32 tstamp, size_
+ (void)fw_card_read_cycle_time(fw_parent_device(s->unit)->card, &curr_cycle_time);
+
+ for (i = 0; i < packets; ++i) {
+- DEFINE_FLEX(struct fw_iso_packet, template, header,
+- header_length, CIP_HEADER_QUADLETS);
++ DEFINE_RAW_FLEX(struct fw_iso_packet, template, header, CIP_HEADER_QUADLETS);
+ bool sched_irq = false;
+
+ build_it_pkt_header(s, desc->cycle, template, pkt_header_length,
+--
+2.45.2
+
--- /dev/null
+From e6e18021ddd0dc5af487fb86b6d7c964e062d692 Mon Sep 17 00:00:00 2001
+From: "Luke D. Jones" <luke@ljones.dev>
+Date: Tue, 23 Jul 2024 13:12:24 +1200
+Subject: ALSA: hda/realtek: cs35l41: Fixup remaining asus strix models
+
+From: Luke D. Jones <luke@ljones.dev>
+
+commit e6e18021ddd0dc5af487fb86b6d7c964e062d692 upstream.
+
+Adjust quirks for 0x3a20, 0x3a30, 0x3a50 to match the 0x3a60. This
+set has now been confirmed to work with this patch.
+
+Signed-off-by: Luke D. Jones <luke@ljones.dev>
+Fixes: 811dd426a9b1 ("ALSA: hda/realtek: Add quirks for Asus ROG 2024 laptops using CS35L41")
+Cc: <stable@vger.kernel.org>
+Link: https://patch.msgid.link/20240723011224.115579-1-luke@ljones.dev
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ sound/pci/hda/patch_realtek.c | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+--- a/sound/pci/hda/patch_realtek.c
++++ b/sound/pci/hda/patch_realtek.c
+@@ -10360,10 +10360,10 @@ static const struct snd_pci_quirk alc269
+ SND_PCI_QUIRK(0x1043, 0x1f62, "ASUS UX7602ZM", ALC245_FIXUP_CS35L41_SPI_2),
+ SND_PCI_QUIRK(0x1043, 0x1f92, "ASUS ROG Flow X16", ALC289_FIXUP_ASUS_GA401),
+ SND_PCI_QUIRK(0x1043, 0x3030, "ASUS ZN270IE", ALC256_FIXUP_ASUS_AIO_GPIO2),
+- SND_PCI_QUIRK(0x1043, 0x3a20, "ASUS G614JZR", ALC245_FIXUP_CS35L41_SPI_2),
+- SND_PCI_QUIRK(0x1043, 0x3a30, "ASUS G814JVR/JIR", ALC245_FIXUP_CS35L41_SPI_2),
++ SND_PCI_QUIRK(0x1043, 0x3a20, "ASUS G614JZR", ALC285_FIXUP_ASUS_SPI_REAR_SPEAKERS),
++ SND_PCI_QUIRK(0x1043, 0x3a30, "ASUS G814JVR/JIR", ALC285_FIXUP_ASUS_SPI_REAR_SPEAKERS),
+ SND_PCI_QUIRK(0x1043, 0x3a40, "ASUS G814JZR", ALC285_FIXUP_ASUS_SPI_REAR_SPEAKERS),
+- SND_PCI_QUIRK(0x1043, 0x3a50, "ASUS G834JYR/JZR", ALC245_FIXUP_CS35L41_SPI_2),
++ SND_PCI_QUIRK(0x1043, 0x3a50, "ASUS G834JYR/JZR", ALC285_FIXUP_ASUS_SPI_REAR_SPEAKERS),
+ SND_PCI_QUIRK(0x1043, 0x3a60, "ASUS G634JYR/JZR", ALC285_FIXUP_ASUS_SPI_REAR_SPEAKERS),
+ SND_PCI_QUIRK(0x1043, 0x831a, "ASUS P901", ALC269_FIXUP_STEREO_DMIC),
+ SND_PCI_QUIRK(0x1043, 0x834a, "ASUS S101", ALC269_FIXUP_STEREO_DMIC),
--- /dev/null
+From 9a4ab167cfb1dea1df0c0c948205a62c7eb3b85b Mon Sep 17 00:00:00 2001
+From: Takashi Iwai <tiwai@suse.de>
+Date: Mon, 22 Jul 2024 15:59:28 +0200
+Subject: ALSA: ump: Don't update FB name for static blocks
+
+From: Takashi Iwai <tiwai@suse.de>
+
+commit 9a4ab167cfb1dea1df0c0c948205a62c7eb3b85b upstream.
+
+When a device tries to update the FB name string even if its Endpoint
+is declared as static, we should skip it, just already done for the FB
+info update reply.
+
+Fixes: 37e0e14128e0 ("ALSA: ump: Support UMP Endpoint and Function Block parsing")
+Cc: <stable@vger.kernel.org>
+Link: https://patch.msgid.link/20240722135929.8612-1-tiwai@suse.de
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ sound/core/ump.c | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+--- a/sound/core/ump.c
++++ b/sound/core/ump.c
+@@ -806,6 +806,13 @@ static int ump_handle_fb_name_msg(struct
+ if (!fb)
+ return -ENODEV;
+
++ if (ump->parsed &&
++ (ump->info.flags & SNDRV_UMP_EP_INFO_STATIC_BLOCKS)) {
++ ump_dbg(ump, "Skipping static FB name update (blk#%d)\n",
++ fb->info.block_id);
++ return 0;
++ }
++
+ ret = ump_append_string(ump, fb->info.name, sizeof(fb->info.name),
+ buf->raw, 3);
+ /* notify the FB name update to sequencer, too */
--- /dev/null
+From ac29d8ae05b770ed3f52d7a60908ab9b126f69d7 Mon Sep 17 00:00:00 2001
+From: Takashi Iwai <tiwai@suse.de>
+Date: Mon, 22 Jul 2024 16:06:06 +0200
+Subject: ALSA: ump: Force 1 Group for MIDI1 FBs
+
+From: Takashi Iwai <tiwai@suse.de>
+
+commit ac29d8ae05b770ed3f52d7a60908ab9b126f69d7 upstream.
+
+When a Function Block declares it being a legacy MIDI1 device, it has
+to be only with a single UMP Group. Correct the attribute when a
+device declares it wrongly.
+
+Fixes: 37e0e14128e0 ("ALSA: ump: Support UMP Endpoint and Function Block parsing")
+Cc: <stable@vger.kernel.org>
+Link: https://patch.msgid.link/20240722140610.10845-1-tiwai@suse.de
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ sound/core/ump.c | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+--- a/sound/core/ump.c
++++ b/sound/core/ump.c
+@@ -733,6 +733,12 @@ static void fill_fb_info(struct snd_ump_
+ info->block_id, info->direction, info->active,
+ info->first_group, info->num_groups, info->midi_ci_version,
+ info->sysex8_streams, info->flags);
++
++ if ((info->flags & SNDRV_UMP_BLOCK_IS_MIDI1) && info->num_groups != 1) {
++ info->num_groups = 1;
++ ump_dbg(ump, "FB %d: corrected groups to 1 for MIDI1\n",
++ info->block_id);
++ }
+ }
+
+ /* check whether the FB info gets updated by the current message */
--- /dev/null
+From 21451dfd853e7d8e6e3fbd7ef1fbdb2f2ead12f5 Mon Sep 17 00:00:00 2001
+From: wangdicheng <wangdicheng@kylinos.cn>
+Date: Mon, 22 Jul 2024 16:48:22 +0800
+Subject: ALSA: usb-audio: Add a quirk for Sonix HD USB Camera
+
+From: wangdicheng <wangdicheng@kylinos.cn>
+
+commit 21451dfd853e7d8e6e3fbd7ef1fbdb2f2ead12f5 upstream.
+
+Sonix HD USB Camera does not support reading the sample rate which leads
+to many lines of "cannot get freq at ep 0x84".
+This patch adds the USB ID to quirks.c and avoids those error messages.
+
+(snip)
+[1.789698] usb 3-3: new high-speed USB device number 2 using xhci_hcd
+[1.984121] usb 3-3: New USB device found, idVendor=0c45, idProduct=6340, bcdDevice= 0.00
+[1.984124] usb 3-3: New USB device strings: Mfr=2, Product=1, SerialNumber=0
+[1.984127] usb 3-3: Product: USB 2.0 Camera
+[1.984128] usb 3-3: Manufacturer: Sonix Technology Co., Ltd.
+[5.440957] usb 3-3: 3:1: cannot get freq at ep 0x84
+[12.130679] usb 3-3: 3:1: cannot get freq at ep 0x84
+[12.175065] usb 3-3: 3:1: cannot get freq at ep 0x84
+
+Signed-off-by: wangdicheng <wangdicheng@kylinos.cn>
+Cc: <stable@vger.kernel.org>
+Link: https://patch.msgid.link/20240722084822.31620-1-wangdich9700@163.com
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ sound/usb/quirks.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+--- a/sound/usb/quirks.c
++++ b/sound/usb/quirks.c
+@@ -2125,6 +2125,8 @@ static const struct usb_audio_quirk_flag
+ QUIRK_FLAG_CTL_MSG_DELAY_1M),
+ DEVICE_FLG(0x0b0e, 0x0349, /* Jabra 550a */
+ QUIRK_FLAG_CTL_MSG_DELAY_1M),
++ DEVICE_FLG(0x0c45, 0x6340, /* Sonix HD USB Camera */
++ QUIRK_FLAG_GET_SAMPLE_RATE),
+ DEVICE_FLG(0x0ecb, 0x205c, /* JBL Quantum610 Wireless */
+ QUIRK_FLAG_FIXED_RATE),
+ DEVICE_FLG(0x0ecb, 0x2069, /* JBL Quantum810 Wireless */
--- /dev/null
+From 74dba240881820b46b9b1c62ef4de3bfff47fbd4 Mon Sep 17 00:00:00 2001
+From: wangdicheng <wangdicheng@kylinos.cn>
+Date: Fri, 19 Jul 2024 10:09:06 +0800
+Subject: ALSA: usb-audio: Fix microphone sound on HD webcam.
+
+From: wangdicheng <wangdicheng@kylinos.cn>
+
+commit 74dba240881820b46b9b1c62ef4de3bfff47fbd4 upstream.
+
+I own an external usb Webcam, HD webcam, which had low mic volume and
+inconsistent sound quality. Video works as expected.
+
+(snip)
+[ 95.473820][ 1] [ T73] usb 5-2.2: new high-speed USB device number 7 using xhci_hcd
+[ 95.773974][ 1] [ T73] usb 5-2.2: New USB device found, idVendor=1bcf, idProduct=2281, bcdDevice= 0.05
+[ 95.783445][ 1] [ T73] usb 5-2.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
+[ 95.791872][ 1] [ T73] usb 5-2.2: Product: HD webcam
+[ 95.797001][ 1] [ T73] usb 5-2.2: Manufacturer: Sunplus IT Co
+[ 95.802996][ 1] [ T73] usb 5-2.2: SerialNumber: 20200513
+[ 96.092610][ 2] [ T3680] usb 5-2.2: Warning! Unlikely big volume range (=4096), cval->res is probably wrong.
+[ 96.102436][ 2] [ T3680] usb 5-2.2: [5] FU [Mic Capture Volume] ch = 1, val = 0/4096/1
+
+Set up quirk cval->res to 16 for 256 levels,
+Set GET_SAMPLE_RATE quirk flag to stop trying to get the sample rate.
+Confirmed that happened anyway later due to the backoff mechanism,
+After 3 failures.
+
+All audio stream on device interfaces share the same values,
+apart from wMaxPacketSize and tSamFreq :
+
+ bLength 9
+ bDescriptorType 4
+ bInterfaceNumber 3
+ bAlternateSetting 4
+ bNumEndpoints 1
+ bInterfaceClass 1 Audio
+
+Interface Descriptor:
+ bLength 9
+ bDescriptorType 4
+ bInterfaceNumber 3
+ bAlternateSetting 4
+ bNumEndpoints 1
+ bInterfaceClass 1 Audio
+ bInterfaceSubClass 2 Streaming
+ bInterfaceProtocol 0
+ iInterface 0
+ AudioStreaming Interface Descriptor:
+ bLength 7
+ bDescriptorType 36
+ bDescriptorSubtype 1 (AS_GENERAL)
+ bTerminalLink 3
+ bDelay 1 frames
+ wFormatTag 0x0001 PCM
+ AudioStreaming Interface Descriptor:
+ bLength 11
+ bDescriptorType 36
+ bDescriptorSubtype 2 (FORMAT_TYPE)
+ bFormatType 1 (FORMAT_TYPE_I)
+ bNrChannels 1
+ bSubframeSize 2
+ bBitResolution 16
+ bSamFreqType 1 Discrete
+ tSamFreq[ 0] 48000
+ Endpoint Descriptor:
+ bLength 9
+ bDescriptorType 5
+ bEndpointAddress 0x86 EP 6 IN
+ bmAttributes 5
+ Transfer Type Isochronous
+ Synch Type Asynchronous
+ Usage Type Data
+ wMaxPacketSize 0x0064 1x 100 bytes
+ bInterval 4
+ bRefresh 0
+ bSynchAddress 0
+ AudioStreaming Endpoint Descriptor:
+ bLength 7
+ bDescriptorType 37
+ bDescriptorSubtype 1 (EP_GENERAL)
+ bmAttributes 0x01
+ Sampling Frequency
+ bLockDelayUnits 0 Undefined
+ wLockDelay 0x0000
+(snip)
+
+Testing patch provides consistent good sound recording quality and volume range.
+
+(snip)
+[ 95.473820][ 1] [ T73] usb 5-2.2: new high-speed USB device number 7 using xhci_hcd
+[ 95.773974][ 1] [ T73] usb 5-2.2: New USB device found, idVendor=1bcf, idProduct=2281, bcdDevice= 0.05
+[ 95.783445][ 1] [ T73] usb 5-2.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
+[ 95.791872][ 1] [ T73] usb 5-2.2: Product: HD webcam
+[ 95.797001][ 1] [ T73] usb 5-2.2: Manufacturer: Sunplus IT Co
+[ 95.802996][ 1] [ T73] usb 5-2.2: SerialNumber: 20200513
+[ 96.110630][ 3] [ T3680] usbcore: registered new interface driver snd-usb-audio
+[ 96.114329][ 7] [ T3677] usb 5-2.2: Found UVC 1.00 device HD webcam (1bcf:2281)
+[ 96.167555][ 7] [ T3677] usbcore: registered new interface driver uvcvideo
+
+Signed-off-by: wangdicheng <wangdicheng@kylinos.cn>
+Cc: <stable@vger.kernel.org>
+Link: https://patch.msgid.link/20240719020906.8078-1-wangdich9700@163.com
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ sound/usb/mixer.c | 7 +++++++
+ sound/usb/quirks.c | 2 ++
+ 2 files changed, 9 insertions(+)
+
+--- a/sound/usb/mixer.c
++++ b/sound/usb/mixer.c
+@@ -1211,6 +1211,13 @@ static void volume_control_quirks(struct
+ cval->res = 16;
+ }
+ break;
++ case USB_ID(0x1bcf, 0x2281): /* HD Webcam */
++ if (!strcmp(kctl->id.name, "Mic Capture Volume")) {
++ usb_audio_info(chip,
++ "set resolution quirk: cval->res = 16\n");
++ cval->res = 16;
++ }
++ break;
+ }
+ }
+
+--- a/sound/usb/quirks.c
++++ b/sound/usb/quirks.c
+@@ -2225,6 +2225,8 @@ static const struct usb_audio_quirk_flag
+ QUIRK_FLAG_ALIGN_TRANSFER),
+ DEVICE_FLG(0x534d, 0x2109, /* MacroSilicon MS2109 */
+ QUIRK_FLAG_ALIGN_TRANSFER),
++ DEVICE_FLG(0x1bcf, 0x2281, /* HD Webcam */
++ QUIRK_FLAG_GET_SAMPLE_RATE),
+
+ /* Vendor matches */
+ VENDOR_FLG(0x045e, /* MS Lifecam */
--- /dev/null
+From 7010d9464f7ca3ee2d75095ea2e642a9009a41ff Mon Sep 17 00:00:00 2001
+From: Takashi Iwai <tiwai@suse.de>
+Date: Mon, 22 Jul 2024 10:06:04 +0200
+Subject: ALSA: usb-audio: Move HD Webcam quirk to the right place
+
+From: Takashi Iwai <tiwai@suse.de>
+
+commit 7010d9464f7ca3ee2d75095ea2e642a9009a41ff upstream.
+
+The quirk_flags_table[] is sorted in the USB ID order, while the last
+fix was put at a wrong position. Adjust the entry at the right
+position.
+
+Fixes: 74dba2408818 ("ALSA: usb-audio: Fix microphone sound on HD webcam.")
+Cc: <stable@vger.kernel.org>
+Link: https://patch.msgid.link/20240722080605.23481-1-tiwai@suse.de
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ sound/usb/quirks.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/sound/usb/quirks.c
++++ b/sound/usb/quirks.c
+@@ -2167,6 +2167,8 @@ static const struct usb_audio_quirk_flag
+ QUIRK_FLAG_GET_SAMPLE_RATE),
+ DEVICE_FLG(0x19f7, 0x0035, /* RODE NT-USB+ */
+ QUIRK_FLAG_GET_SAMPLE_RATE),
++ DEVICE_FLG(0x1bcf, 0x2281, /* HD Webcam */
++ QUIRK_FLAG_GET_SAMPLE_RATE),
+ DEVICE_FLG(0x1bcf, 0x2283, /* NexiGo N930AF FHD Webcam */
+ QUIRK_FLAG_GET_SAMPLE_RATE),
+ DEVICE_FLG(0x2040, 0x7200, /* Hauppauge HVR-950Q */
+@@ -2225,8 +2227,6 @@ static const struct usb_audio_quirk_flag
+ QUIRK_FLAG_ALIGN_TRANSFER),
+ DEVICE_FLG(0x534d, 0x2109, /* MacroSilicon MS2109 */
+ QUIRK_FLAG_ALIGN_TRANSFER),
+- DEVICE_FLG(0x1bcf, 0x2281, /* HD Webcam */
+- QUIRK_FLAG_GET_SAMPLE_RATE),
+
+ /* Vendor matches */
+ VENDOR_FLG(0x045e, /* MS Lifecam */
kvm-nvmx-request-immediate-exit-iff-pending-nested-event-needs-injection.patch
kvm-nvmx-check-for-pending-posted-interrupts-when-looking-for-nested-events.patch
kvm-nvmx-fold-requested-virtual-interrupt-check-into-has_nested_events.patch
+alsa-hda-realtek-cs35l41-fixup-remaining-asus-strix-models.patch
+alsa-firewire-lib-fix-wrong-value-as-length-of-header-for-cip_no_header-case.patch
+alsa-ump-don-t-update-fb-name-for-static-blocks.patch
+alsa-ump-force-1-group-for-midi1-fbs.patch
+alsa-usb-audio-fix-microphone-sound-on-hd-webcam.patch
+alsa-usb-audio-move-hd-webcam-quirk-to-the-right-place.patch
+alsa-usb-audio-add-a-quirk-for-sonix-hd-usb-camera.patch