
Takashi Iwai wrote:
Clemens Ladisch wrote:
Takashi Iwai wrote:
Clemens Ladisch wrote:
I'm working on a fix that adds proper power management for input ports, but this requires the driver to be reorganized a little ...
Doesn't a simple patch like below work?
+static int substream_open(struct snd_rawmidi_substream *substream, int open) {
- if (open && umidi->opened++ == 0) {
err = usb_autopm_get_interface(umidi->iface);
static int snd_usbmidi_input_open(struct snd_rawmidi_substream *substream) {
- return substream_open(substream, 1);
No, because the input URBs are submitted before the userspace device is opened.
Ah, right. What's the reason of submitting input urbs for the all time from the beginning? For loopback?
For not needing to count open input ports.
If it has to be running, the easiest fix would be the patch like below. This will turn off the autopm essentially, but better than breakage.
@@ -2074,6 +2077,8 @@ static void snd_usbmidi_input_start_ep(struct snd_usb_midi_in_endpoint* ep)
- ep->autopm_reference =
usb_autopm_get_interface(ep->umidi->iface) >= 0;
usb_autopm_get_interface() cannot be called from the USB probe callback.
Regards, Clemens