From: Greg Kroah-Hartman Date: Mon, 29 Jul 2024 12:07:16 +0000 (+0200) Subject: 6.6-stable patches X-Git-Tag: v6.1.103~64 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=4622bd98b417a6b10a933f5f9ecd882e7ba241b3;p=thirdparty%2Fkernel%2Fstable-queue.git 6.6-stable patches added patches: alsa-ump-don-t-update-fb-name-for-static-blocks.patch alsa-ump-force-1-group-for-midi1-fbs.patch alsa-usb-audio-add-a-quirk-for-sonix-hd-usb-camera.patch alsa-usb-audio-fix-microphone-sound-on-hd-webcam.patch alsa-usb-audio-move-hd-webcam-quirk-to-the-right-place.patch --- diff --git a/queue-6.6/alsa-ump-don-t-update-fb-name-for-static-blocks.patch b/queue-6.6/alsa-ump-don-t-update-fb-name-for-static-blocks.patch new file mode 100644 index 00000000000..9a6abdb3a6f --- /dev/null +++ b/queue-6.6/alsa-ump-don-t-update-fb-name-for-static-blocks.patch @@ -0,0 +1,43 @@ +From 9a4ab167cfb1dea1df0c0c948205a62c7eb3b85b Mon Sep 17 00:00:00 2001 +From: Takashi Iwai +Date: Mon, 22 Jul 2024 15:59:28 +0200 +Subject: ALSA: ump: Don't update FB name for static blocks + +From: Takashi Iwai + +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: +Link: https://patch.msgid.link/20240722135929.8612-1-tiwai@suse.de +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman +--- + sound/core/ump.c | 7 +++++++ + 1 file changed, 7 insertions(+) + +diff --git a/sound/core/ump.c b/sound/core/ump.c +index 3f61220c23b4..b325fcfa77d0 100644 +--- a/sound/core/ump.c ++++ b/sound/core/ump.c +@@ -806,6 +806,13 @@ static int ump_handle_fb_name_msg(struct snd_ump_endpoint *ump, + 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 */ +-- +2.45.2 + diff --git a/queue-6.6/alsa-ump-force-1-group-for-midi1-fbs.patch b/queue-6.6/alsa-ump-force-1-group-for-midi1-fbs.patch new file mode 100644 index 00000000000..0d2c567f66e --- /dev/null +++ b/queue-6.6/alsa-ump-force-1-group-for-midi1-fbs.patch @@ -0,0 +1,42 @@ +From ac29d8ae05b770ed3f52d7a60908ab9b126f69d7 Mon Sep 17 00:00:00 2001 +From: Takashi Iwai +Date: Mon, 22 Jul 2024 16:06:06 +0200 +Subject: ALSA: ump: Force 1 Group for MIDI1 FBs + +From: Takashi Iwai + +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: +Link: https://patch.msgid.link/20240722140610.10845-1-tiwai@suse.de +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman +--- + sound/core/ump.c | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/sound/core/ump.c b/sound/core/ump.c +index b325fcfa77d0..0f0d7e895c5a 100644 +--- a/sound/core/ump.c ++++ b/sound/core/ump.c +@@ -733,6 +733,12 @@ static void fill_fb_info(struct snd_ump_endpoint *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 */ +-- +2.45.2 + diff --git a/queue-6.6/alsa-usb-audio-add-a-quirk-for-sonix-hd-usb-camera.patch b/queue-6.6/alsa-usb-audio-add-a-quirk-for-sonix-hd-usb-camera.patch new file mode 100644 index 00000000000..02e5017fef0 --- /dev/null +++ b/queue-6.6/alsa-usb-audio-add-a-quirk-for-sonix-hd-usb-camera.patch @@ -0,0 +1,43 @@ +From 21451dfd853e7d8e6e3fbd7ef1fbdb2f2ead12f5 Mon Sep 17 00:00:00 2001 +From: wangdicheng +Date: Mon, 22 Jul 2024 16:48:22 +0800 +Subject: ALSA: usb-audio: Add a quirk for Sonix HD USB Camera + +From: wangdicheng + +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 +Cc: +Link: https://patch.msgid.link/20240722084822.31620-1-wangdich9700@163.com +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman +--- + sound/usb/quirks.c | 2 ++ + 1 file changed, 2 insertions(+) + +--- a/sound/usb/quirks.c ++++ b/sound/usb/quirks.c +@@ -2085,6 +2085,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 */ diff --git a/queue-6.6/alsa-usb-audio-fix-microphone-sound-on-hd-webcam.patch b/queue-6.6/alsa-usb-audio-fix-microphone-sound-on-hd-webcam.patch new file mode 100644 index 00000000000..cb5078213a5 --- /dev/null +++ b/queue-6.6/alsa-usb-audio-fix-microphone-sound-on-hd-webcam.patch @@ -0,0 +1,136 @@ +From 74dba240881820b46b9b1c62ef4de3bfff47fbd4 Mon Sep 17 00:00:00 2001 +From: wangdicheng +Date: Fri, 19 Jul 2024 10:09:06 +0800 +Subject: ALSA: usb-audio: Fix microphone sound on HD webcam. + +From: wangdicheng + +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 +Cc: +Link: https://patch.msgid.link/20240719020906.8078-1-wangdich9700@163.com +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman +--- + 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 +@@ -2185,6 +2185,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 */ diff --git a/queue-6.6/alsa-usb-audio-move-hd-webcam-quirk-to-the-right-place.patch b/queue-6.6/alsa-usb-audio-move-hd-webcam-quirk-to-the-right-place.patch new file mode 100644 index 00000000000..42bf9f3f9d2 --- /dev/null +++ b/queue-6.6/alsa-usb-audio-move-hd-webcam-quirk-to-the-right-place.patch @@ -0,0 +1,42 @@ +From 7010d9464f7ca3ee2d75095ea2e642a9009a41ff Mon Sep 17 00:00:00 2001 +From: Takashi Iwai +Date: Mon, 22 Jul 2024 10:06:04 +0200 +Subject: ALSA: usb-audio: Move HD Webcam quirk to the right place + +From: Takashi Iwai + +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: +Link: https://patch.msgid.link/20240722080605.23481-1-tiwai@suse.de +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman +--- + sound/usb/quirks.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/sound/usb/quirks.c ++++ b/sound/usb/quirks.c +@@ -2127,6 +2127,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 */ +@@ -2185,8 +2187,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 */ diff --git a/queue-6.6/series b/queue-6.6/series index f3737131556..baefefd1330 100644 --- a/queue-6.6/series +++ b/queue-6.6/series @@ -415,3 +415,8 @@ media-uvcvideo-fix-integer-overflow-calculating-timestamp.patch media-ivsc-csi-don-t-count-privacy-on-as-error.patch kvm-vmx-split-out-the-non-virtualization-part-of-vmx_interrupt_blocked.patch kvm-nvmx-request-immediate-exit-iff-pending-nested-event-needs-injection.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