lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:   Fri,  4 Nov 2022 15:35:18 +0800
From:   aichao <aichao@...inos.cn>
To:     perex@...ex.cz, tiwai@...e.com, alsa-devel@...a-project.org
Cc:     linux-kernel@...r.kernel.org, aichao <aichao@...inos.cn>
Subject: [PATCH] ALSA: usb-audio: fix Hamedal C20 usb camero disconnect issue

For Hamedal C20, the current rate is different from the runtime rate,
snd_usb_endpoint stop and close endpoint to resetting rate.
if snd_usb_endpoint close the endpoint, sometimes usb will
 disconnect the device.

Signed-off-by: aichao <aichao@...inos.cn>
---
 sound/usb/endpoint.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/sound/usb/endpoint.c b/sound/usb/endpoint.c
index 533919a28856..c19e420b1780 100644
--- a/sound/usb/endpoint.c
+++ b/sound/usb/endpoint.c
@@ -825,7 +825,9 @@ void snd_usb_endpoint_close(struct snd_usb_audio *chip,
 	usb_audio_dbg(chip, "Closing EP 0x%x (count %d)\n",
 		      ep->ep_num, ep->opened);
 
-	if (!--ep->iface_ref->opened)
+	if (!--ep->iface_ref->opened
+		&& (le16_to_cpu(chip->dev->descriptor.idVendor) != 0x0525)
+		&& (le16_to_cpu(chip->dev->descriptor.idProduct) != 0xa4ad))
 		endpoint_set_interface(chip, ep, false);
 
 	if (!--ep->opened) {
-- 
2.25.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ