* [PATCH] usbmidi.c: Call usb_autopm functions from rawmidi open/close callbacks
@ 2008-03-18 14:05 Karsten Wiese
2008-03-18 14:16 ` Clemens Ladisch
0 siblings, 1 reply; 2+ messages in thread
From: Karsten Wiese @ 2008-03-18 14:05 UTC (permalink / raw)
To: alsa-devel
Lets "usb auto suspend" work for devices that set their
usb_driver::supports_autosuspend to 1.
Has no effect for other devices.
Signed-off-by: Karsten Wiese <fzu@wemgehoertderstaat.de>
---
sound/usb/usbmidi.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/sound/usb/usbmidi.c b/sound/usb/usbmidi.c
index 6c616c7..842486f 100644
--- a/sound/usb/usbmidi.c
+++ b/sound/usb/usbmidi.c
@@ -860,11 +860,14 @@ static int snd_usbmidi_output_open(struct snd_rawmidi_substream *substream)
}
substream->runtime->private_data = port;
port->state = STATE_UNKNOWN;
+ usb_autopm_get_interface(umidi->iface);
return 0;
}
static int snd_usbmidi_output_close(struct snd_rawmidi_substream *substream)
{
+ struct snd_usb_midi* umidi = substream->rmidi->private_data;
+ usb_autopm_put_interface(umidi->iface);
return 0;
}
--
1.5.3.3
-------------------------------------------------------
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] usbmidi.c: Call usb_autopm functions from rawmidi open/close callbacks
2008-03-18 14:05 [PATCH] usbmidi.c: Call usb_autopm functions from rawmidi open/close callbacks Karsten Wiese
@ 2008-03-18 14:16 ` Clemens Ladisch
0 siblings, 0 replies; 2+ messages in thread
From: Clemens Ladisch @ 2008-03-18 14:16 UTC (permalink / raw)
To: Karsten Wiese; +Cc: alsa-devel
Karsten Wiese wrote:
> Lets "usb auto suspend" work for devices that set their
> usb_driver::supports_autosuspend to 1.
... as long as there are no MIDI input ports.
I'm planning to apply these patches:
http://thread.gmane.org/gmane.linux.usb.general/1002/focus=1414
Regards,
Clemens
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-03-18 14:16 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-03-18 14:05 [PATCH] usbmidi.c: Call usb_autopm functions from rawmidi open/close callbacks Karsten Wiese
2008-03-18 14:16 ` Clemens Ladisch
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.