Received: by 2002:a05:6358:16cd:b0:dc:6189:e246 with SMTP id r13csp423762rwl; Fri, 4 Nov 2022 01:58:53 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7NWFtlXlwEyfCjLvV1/DLsTYHeOmL/0OpXDtKjFpP8rkdQreN88uVq22xLzQwwgH28ZtNt X-Received: by 2002:a17:902:9a8a:b0:188:4bb9:70a3 with SMTP id w10-20020a1709029a8a00b001884bb970a3mr10956903plp.20.1667552333721; Fri, 04 Nov 2022 01:58:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667552333; cv=none; d=google.com; s=arc-20160816; b=A9dRLYuc395I29SoK0iRDLyc3Nwi6ks/3iOhjKL2I2K8yzm9CpSSeTOg8Bw5PonpLJ FuJYuMCezcU8Cax+tr5+er8VbRMUXHWuNyGYC4/XN+aAp2+OoWaQguQoCf/pGlGXGGO4 VT8o/QTGJzaQ5VWAs2yG9vZJ6Jq7E/+uSMJ0mH0Jh/bWnsZlM5MtlEKL/yIiTRZJIbt/ 5LziMZ2tli9XBHLJhEiDUP1+HyEMU2m3MH3AjW+4a2W1Mq1Fed9Ihx5MTEPwyj3hyaJs yNn58AWbkdUzQjRkRlb3v43IyGJKrKvMNDOp65wTFs3jnsy3g8R5TN7OAobGZyopCm5/ G8VA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:references:in-reply-to :subject:cc:to:from:message-id:date:dkim-signature:dkim-signature; bh=NAHPqz+JQ+byLy9st95AQKWD4OGH/5xZSKGvNLc2mPQ=; b=zN4DXhmsczaTFqwQ43B7ZORoDqsrZmmV7brh2j9+K7mFPhK/1tqhjCXASJEJHDVUyx R4qMsqPoS3ydxks1yXldSnEWqCdH3mTbtrJobgkpWu7oKnNvg1rYhhwVq1yjWj6xxKwG FL7eLS80m9/kEnlUDTWk9juLcvFQWcA5eD8vkFTQIZrjvncSrIBHpPSn3+Xvn8QaalJg L4nOL7NKqeApIWI788AOqSjJck1H9ZUdnI1PAPtJI+iB4n10/22F3uWR8Vz8I8rUgSsw kPj2Sm+cCflRrBYQ/42Ao3z5hZy1ote3YKIt6zTylzMLMgb9TJS11gTIiCz8Lzf8E16J HW8A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=jobQ07YB; dkim=neutral (no key) header.i=@suse.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h125-20020a625383000000b00562b0b92756si3729376pfb.297.2022.11.04.01.58.42; Fri, 04 Nov 2022 01:58:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=jobQ07YB; dkim=neutral (no key) header.i=@suse.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229608AbiKDIG3 (ORCPT + 96 others); Fri, 4 Nov 2022 04:06:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42752 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229496AbiKDIG1 (ORCPT ); Fri, 4 Nov 2022 04:06:27 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 663CB2409D for ; Fri, 4 Nov 2022 01:06:26 -0700 (PDT) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 27D2E1F74A; Fri, 4 Nov 2022 08:06:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1667549185; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=NAHPqz+JQ+byLy9st95AQKWD4OGH/5xZSKGvNLc2mPQ=; b=jobQ07YBlp8o1TuEKPf0S/jnKshiutGuIibFhTMYImlw9g4mrXsw3x7MLxfDrfygUP0PkQ Xv6Krg9wcP3UaolJ/fz6pVcKzFPIKPCJIH6LqFumTZY4XuAderPv7MQVDOXjt+/VIJbDYH dWrG7ZDjfNTUe9zRB/8Ck7PzFlqHyiA= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1667549185; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=NAHPqz+JQ+byLy9st95AQKWD4OGH/5xZSKGvNLc2mPQ=; b=U9PwoIxRiXolSQKXnwESJ2Sfsd9AwoTZhVWrIz9de56NkH1d+2204n2LFQcn1lz+rwutFH 43o0KkYa8jtNBIAw== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 045DB13216; Fri, 4 Nov 2022 08:06:25 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id ERJFAAHIZGMYUwAAMHmgww (envelope-from ); Fri, 04 Nov 2022 08:06:25 +0000 Date: Fri, 04 Nov 2022 09:06:24 +0100 Message-ID: <871qqjkutb.wl-tiwai@suse.de> From: Takashi Iwai To: aichao Cc: perex@perex.cz, tiwai@suse.com, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] ALSA: usb-audio: fix Hamedal C20 usb camero disconnect issue In-Reply-To: <20221104073518.120807-1-aichao@kylinos.cn> References: <20221104073518.120807-1-aichao@kylinos.cn> User-Agent: Wanderlust/2.15.9 (Almost Unreal) Emacs/27.2 Mule/6.0 MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 04 Nov 2022 08:35:18 +0100, aichao wrote: > > 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 OK, this is more understandable than the previous one. But it doesn't look like a proper workaround, and we need to figure out the culprit more deeply. The interface is anyway reset once when the parameter is changed / re-setup. Doesn't it hit the same problem? Or it's about clearing the interface and keep it for long time? In anyway, please give lsusb -v output of the device. BTW, is aichao your full name? The sign-off must be with the real full name, and it's a legal requirement. thanks, Takashi > --- > 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 >