From 88a8516a2128a6d078a106ead48092240e8a138f Mon Sep 17 00:00:00 2001 From: Oliver Neukum Date: Fri, 11 Mar 2011 14:51:12 +0100 Subject: ALSA: usbaudio: implement USB autosuspend Devices are autosuspended if no pcm nor midi channel is open Mixer devices may be opened. This way they are active when in use to play or record sound, but can be suspended while users have a mixer application running. [Small clean-ups using static inline by tiwai] Signed-off-by: Oliver Neukum Signed-off-by: Takashi Iwai --- sound/usb/usbaudio.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'sound/usb/usbaudio.h') diff --git a/sound/usb/usbaudio.h b/sound/usb/usbaudio.h index 6e66fffe87f..32f2a97f2f1 100644 --- a/sound/usb/usbaudio.h +++ b/sound/usb/usbaudio.h @@ -34,10 +34,14 @@ struct snd_usb_audio { int index; struct usb_device *dev; struct snd_card *card; + struct usb_interface *pm_intf; u32 usb_id; - int shutdown; struct mutex shutdown_mutex; + unsigned int shutdown:1; + unsigned int probing:1; + unsigned int autosuspended:1; unsigned int txfr_quirk:1; /* Subframe boundaries on transfers */ + int num_interfaces; int num_suspended_intf; -- cgit v1.2.3-18-g5258