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/power.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/power.h')
-rw-r--r-- | sound/usb/power.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/sound/usb/power.h b/sound/usb/power.h new file mode 100644 index 000000000000..48ee51dcb71e --- /dev/null +++ b/sound/usb/power.h | |||
@@ -0,0 +1,17 @@ | |||
1 | #ifndef __USBAUDIO_POWER_H | ||
2 | #define __USBAUDIO_POWER_H | ||
3 | |||
4 | #ifdef CONFIG_PM | ||
5 | int snd_usb_autoresume(struct snd_usb_audio *chip); | ||
6 | void snd_usb_autosuspend(struct snd_usb_audio *chip); | ||
7 | #else | ||
8 | static inline int snd_usb_autoresume(struct snd_usb_audio *chip) | ||
9 | { | ||
10 | return 0; | ||
11 | } | ||
12 | static inline void snd_usb_autosuspend(struct snd_usb_audio *chip) | ||
13 | { | ||
14 | } | ||
15 | #endif | ||
16 | |||
17 | #endif /* __USBAUDIO_POWER_H */ | ||