• Clemens Ladisch's avatar
    ALSA: usb-audio: disable autopm for MIDI devices · 166662b8
    Clemens Ladisch authored
    commit cbc200bc upstream.
    
    Commit 88a8516a (ALSA: usbaudio: implement USB autosuspend)
    introduced autopm for all USB audio/MIDI devices.  However, many MIDI
    devices, such as synthesizers, do not merely transmit MIDI messages but
    use their MIDI inputs to control other functions.  With autopm, these
    devices would get powered down as soon as the last MIDI port device is
    closed on the host.
    
    Even some plain MIDI interfaces could get broken: they automatically
    send Active Sensing messages while powered up, but as soon as these
    messages cease, the receiving device would interpret this as an
    accidental disconnection.
    
    Commit f5f16541 (ALSA: usb-audio: Fix missing autopm for MIDI input)
    introduced another regression: some devices (e.g. the Roland GAIA SH-01)
    are self-powered but do a reset whenever the USB interface's power state
    changes.
    
    To work around all this, just disable autopm for all USB MIDI devices.
    
    Reported-by: Laurens Holst
    Signed-off-by: default avatarClemens Ladisch <clemens@ladisch.de>
    Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    166662b8
midi.c 63 KB