]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
6.1-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 29 Jul 2024 12:06:57 +0000 (14:06 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 29 Jul 2024 12:06:57 +0000 (14:06 +0200)
added patches:
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

queue-6.1/alsa-usb-audio-add-a-quirk-for-sonix-hd-usb-camera.patch [new file with mode: 0644]
queue-6.1/alsa-usb-audio-fix-microphone-sound-on-hd-webcam.patch [new file with mode: 0644]
queue-6.1/alsa-usb-audio-move-hd-webcam-quirk-to-the-right-place.patch [new file with mode: 0644]
queue-6.1/series

diff --git a/queue-6.1/alsa-usb-audio-add-a-quirk-for-sonix-hd-usb-camera.patch b/queue-6.1/alsa-usb-audio-add-a-quirk-for-sonix-hd-usb-camera.patch
new file mode 100644 (file)
index 0000000..d7eee6e
--- /dev/null
@@ -0,0 +1,43 @@
+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
+@@ -2083,6 +2083,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.1/alsa-usb-audio-fix-microphone-sound-on-hd-webcam.patch b/queue-6.1/alsa-usb-audio-fix-microphone-sound-on-hd-webcam.patch
new file mode 100644 (file)
index 0000000..0687fd2
--- /dev/null
@@ -0,0 +1,136 @@
+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
+@@ -2183,6 +2183,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.1/alsa-usb-audio-move-hd-webcam-quirk-to-the-right-place.patch b/queue-6.1/alsa-usb-audio-move-hd-webcam-quirk-to-the-right-place.patch
new file mode 100644 (file)
index 0000000..d1517ca
--- /dev/null
@@ -0,0 +1,42 @@
+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
+@@ -2125,6 +2125,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 */
+@@ -2183,8 +2185,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 */
index 5a4f21d4392135586f62887b874a3836790dd512..62f8aed13dedc78073d61162e83ecb29b5d61bdc 100644 (file)
@@ -314,3 +314,6 @@ jbd2-make-jbd2_journal_get_max_txn_bufs-internal.patch
 media-uvcvideo-fix-integer-overflow-calculating-timestamp.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-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