usbmidi.c: Call usb_autopm functions from rawmidi open/close callbacks
PATCH 1/1 usbmidi.c: Call usb_autopm functions from rawmidi open/close callbacks
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 <[email protected]>
--- sound/usb/usbmidi.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)
sound/usb/usbmidi.c +3 -0
@@ -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 ; }
Signature · 4 lines
1.5.3.3 -------------------------------------------------------
Quoted 2 lines · Karsten Wiese
Lets "usb auto suspend" work for devices that set their
usb_driver::supports_autosuspendto 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