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/power.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 sound/usb/power.h (limited to 'sound/usb/power.h') 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 @@ +#ifndef __USBAUDIO_POWER_H +#define __USBAUDIO_POWER_H + +#ifdef CONFIG_PM +int snd_usb_autoresume(struct snd_usb_audio *chip); +void snd_usb_autosuspend(struct snd_usb_audio *chip); +#else +static inline int snd_usb_autoresume(struct snd_usb_audio *chip) +{ + return 0; +} +static inline void snd_usb_autosuspend(struct snd_usb_audio *chip) +{ +} +#endif + +#endif /* __USBAUDIO_POWER_H */ -- cgit v1.2.3