]> git.karo-electronics.de Git - karo-tx-linux.git/commit
ALSA: usb-audio: Fix missing autopm for MIDI input
authorTakashi Iwai <tiwai@suse.de>
Mon, 3 Dec 2012 10:30:50 +0000 (11:30 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 11 Jan 2013 17:18:21 +0000 (09:18 -0800)
commit8be35acfe0265662971b77b09bced6cf28781325
treefc48a2cf49e1e2994808240f2c9f85b6c795f2f4
parent08588e3a7dc15d729b145a6d589af5f1ca8fa7ba
ALSA: usb-audio: Fix missing autopm for MIDI input

commit f5f165418cabf2218eb466c0e94693b8b1aee88b upstream.

The commit [88a8516a: ALSA: usbaudio: implement USB autosuspend] added
the support of autopm for USB MIDI output, but it didn't take the MIDI
input into account.

This patch adds the following for fixing the autopm:
- Manage the URB start at the first MIDI input stream open, instead of
  the time of instance creation
- Move autopm code to the common substream_open()
- Make snd_usbmidi_input_start/_stop() more robust and add the running
  state check

Reviewd-by: Clemens Ladisch <clemens@ladisch.de>
Tested-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
sound/usb/midi.c