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-prev] [day] [month] [year] [list]
Message-ID: <874jvfkxbr.wl-tiwai@suse.de>
Date:   Fri, 04 Nov 2022 08:12:08 +0100
From:   Takashi Iwai <tiwai@...e.de>
To:     aichao <aichao@...inos.cn>
Cc:     perex@...ex.cz, tiwai@...e.com, alsa-devel@...a-project.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] ALSA: usb-audio: fix usb camero disconnect issue

On Fri, 04 Nov 2022 02:32:36 +0100,
aichao wrote:
> 
> When 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.

What do you mean...?  snd_usb_endpoint_close() never disconnects the
device by itself.

Please elaborate the problem.


Takashi

> 
> Signed-off-by: aichao <aichao@...inos.cn>
> ---
>  sound/usb/pcm.c | 5 -----
>  1 file changed, 5 deletions(-)
> 
> diff --git a/sound/usb/pcm.c b/sound/usb/pcm.c
> index 5dc9266180e3..2ae4a55cbaa8 100644
> --- a/sound/usb/pcm.c
> +++ b/sound/usb/pcm.c
> @@ -517,7 +517,6 @@ static int snd_usb_hw_params(struct snd_pcm_substream *substream,
>  		if (snd_usb_endpoint_compatible(chip, subs->data_endpoint,
>  						fmt, hw_params))
>  			goto unlock;
> -		close_endpoints(chip, subs);
>  	}
>  
>  	subs->data_endpoint = snd_usb_endpoint_open(chip, fmt, hw_params, false);
> @@ -546,9 +545,6 @@ static int snd_usb_hw_params(struct snd_pcm_substream *substream,
>  	ret = configure_endpoints(chip, subs);
>  
>   unlock:
> -	if (ret < 0)
> -		close_endpoints(chip, subs);
> -
>  	snd_usb_unlock_shutdown(chip);
>   stop_pipeline:
>  	if (ret < 0)
> @@ -574,7 +570,6 @@ static int snd_usb_hw_free(struct snd_pcm_substream *substream)
>  	if (!snd_usb_lock_shutdown(chip)) {
>  		if (stop_endpoints(subs))
>  			sync_pending_stops(subs);
> -		close_endpoints(chip, subs);
>  		snd_usb_unlock_shutdown(chip);
>  	}
>  
> -- 
> 2.25.1
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ