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] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 30 Jul 2018 15:07:54 +0200
From:   Takashi Iwai <tiwai@...e.de>
To:     Jorge Sanjuan <jorge.sanjuan@...ethink.co.uk>
Cc:     alsa-devel@...a-project.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 3/4] ALSA: usb-audio: Add UAC3 Power Domains to suspend/resume

On Mon, 30 Jul 2018 11:23:35 +0200,
Jorge Sanjuan wrote:
> 
> Set the UAC3 Power Domain state for an Audio Streaming interface
> to D2 state before suspending the device (usb_driver callback).
> This lets the device know there is no intention to use any of the
> Units in the Audio Function and that the host is not going to
> even listen for wake-up events (interrupts) on the units.
> 
> When the usb_driver gets resumed, the state D0 (fully powered) will
> be set. This ties up the UAC3 Power Domains to the runtime PM.
> 
> Signed-off-by: Jorge Sanjuan <jorge.sanjuan@...ethink.co.uk>
> ---
>  sound/usb/card.c |  9 +++++++++
>  sound/usb/pcm.c  | 48 ++++++++++++++++++++++++++++++++++++++++++++++++
>  sound/usb/pcm.h  |  2 ++
>  3 files changed, 59 insertions(+)
> 
> diff --git a/sound/usb/card.c b/sound/usb/card.c
> index a1ed798a1c6b..9c2a15b805c3 100644
> --- a/sound/usb/card.c
> +++ b/sound/usb/card.c
> @@ -808,6 +808,7 @@ static int usb_audio_suspend(struct usb_interface *intf, pm_message_t message)
>  		snd_power_change_state(chip->card, SNDRV_CTL_POWER_D3hot);
>  	if (!chip->num_suspended_intf++) {
>  		list_for_each_entry(as, &chip->pcm_list, list) {
> +			snd_usb_pcm_suspend(as);
>  			snd_pcm_suspend_all(as->pcm);

The order of the call is doubtful.  Supposing that
snd_usb_pcm_suspend() makes the stream in D2 state, it should be done
after actually stopping the stream.  That is, it should be done after
snd_pcm_suspend_all().


thanks,

Takashi

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ