diff options
author | Oliver Neukum <oneukum@suse.de> | 2011-03-11 14:51:12 +0100 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2011-03-11 14:59:29 +0100 |
commit | 88a8516a2128a6d078a106ead48092240e8a138f (patch) | |
tree | dc839c85a9b2fc2e17759c5a42368cb8300e42bc /sound/usb/usbaudio.h | |
parent | ALSA: usbaudio: fix suspend/resume (diff) | |
download | linux-88a8516a2128a6d078a106ead48092240e8a138f.tar.xz linux-88a8516a2128a6d078a106ead48092240e8a138f.zip |
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 <oneukum@suse.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/usb/usbaudio.h')
-rw-r--r-- | sound/usb/usbaudio.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sound/usb/usbaudio.h b/sound/usb/usbaudio.h index 6e66fffe87f5..32f2a97f2f14 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; |