Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: aichao <aichao@kylinos.cn>
Cc: linux-kernel@vger.kernel.org, alsa-devel@alsa-project.org,
	tiwai@suse.com
Subject: Re: [PATCH] ALSA: usb-audio: fix Hamedal C20 usb camero disconnect issue
Date: Fri, 04 Nov 2022 09:06:24 +0100	[thread overview]
Message-ID: <871qqjkutb.wl-tiwai@suse.de> (raw)
In-Reply-To: <20221104073518.120807-1-aichao@kylinos.cn>

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 <aichao@kylinos.cn>

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
> 

      reply	other threads:[~2022-11-04  8:07 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-04  7:35 [PATCH] ALSA: usb-audio: fix Hamedal C20 usb camero disconnect issue aichao
2022-11-04  8:06 ` Takashi Iwai [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=871qqjkutb.wl-tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=aichao@kylinos.cn \
    --cc=alsa-devel@alsa-project.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tiwai@suse.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox