diff options
author | Oliver Neukum <oneukum@suse.de> | 2011-03-11 08:51:12 -0500 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2011-03-11 08:59:29 -0500 |
commit | 88a8516a2128a6d078a106ead48092240e8a138f (patch) | |
tree | dc839c85a9b2fc2e17759c5a42368cb8300e42bc /sound/usb/usbaudio.h | |
parent | edf7de31c25ce72f163bf7d1fc0d2711869d073c (diff) |
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 { | |||
34 | int index; | 34 | int index; |
35 | struct usb_device *dev; | 35 | struct usb_device *dev; |
36 | struct snd_card *card; | 36 | struct snd_card *card; |
37 | struct usb_interface *pm_intf; | ||
37 | u32 usb_id; | 38 | u32 usb_id; |
38 | int shutdown; | ||
39 | struct mutex shutdown_mutex; | 39 | struct mutex shutdown_mutex; |
40 | unsigned int shutdown:1; | ||
41 | unsigned int probing:1; | ||
42 | unsigned int autosuspended:1; | ||
40 | unsigned int txfr_quirk:1; /* Subframe boundaries on transfers */ | 43 | unsigned int txfr_quirk:1; /* Subframe boundaries on transfers */ |
44 | |||
41 | int num_interfaces; | 45 | int num_interfaces; |
42 | int num_suspended_intf; | 46 | int num_suspended_intf; |
43 | 47 | ||