From 211d4441ddb496b85d24bd699ae86436694570ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20Poussineau?= Date: Thu, 2 Jan 2025 18:22:41 +0100 Subject: [PATCH] Fix detection of Bluetooth MIDI devices This relaxes constraints on MIDI hardware, added in edd6bb10033864c107d84ea085495c995a6e8bc4 My Bluetooth MIDI device has type 0x10002, ie SND_SEQ_PORT_TYPE_MIDI_GENERIC | SND_SEQ_PORT_TYPE_HARDWARE, which doesn't contain the SND_SEQ_PORT_TYPE_PORT flag. Resolves: #19747 --- src/framework/midi/internal/platform/lin/alsamidiinport.cpp | 2 +- src/framework/midi/internal/platform/lin/alsamidioutport.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/framework/midi/internal/platform/lin/alsamidiinport.cpp b/src/framework/midi/internal/platform/lin/alsamidiinport.cpp index 1e9fcc72a7a1b..8df2dbaccdf15 100644 --- a/src/framework/midi/internal/platform/lin/alsamidiinport.cpp +++ b/src/framework/midi/internal/platform/lin/alsamidiinport.cpp @@ -77,7 +77,7 @@ MidiDeviceList AlsaMidiInPort::availableDevices() const int streams = SND_SEQ_OPEN_INPUT; const unsigned int cap = SND_SEQ_PORT_CAP_SUBS_READ | SND_SEQ_PORT_CAP_READ; - const unsigned int type_hw = SND_SEQ_PORT_TYPE_PORT | SND_SEQ_PORT_TYPE_HARDWARE; + const unsigned int type_hw = SND_SEQ_PORT_TYPE_HARDWARE; const unsigned int type_sw = SND_SEQ_PORT_TYPE_PORT | SND_SEQ_PORT_TYPE_SOFTWARE; MidiDeviceList ret; diff --git a/src/framework/midi/internal/platform/lin/alsamidioutport.cpp b/src/framework/midi/internal/platform/lin/alsamidioutport.cpp index 90e2496a719bb..3ddddf0e021f1 100644 --- a/src/framework/midi/internal/platform/lin/alsamidioutport.cpp +++ b/src/framework/midi/internal/platform/lin/alsamidioutport.cpp @@ -76,7 +76,7 @@ std::vector AlsaMidiOutPort::availableDevices() const int streams = SND_SEQ_OPEN_OUTPUT; const unsigned int cap = SND_SEQ_PORT_CAP_SUBS_WRITE | SND_SEQ_PORT_CAP_WRITE; - const unsigned int type_hw = SND_SEQ_PORT_TYPE_PORT | SND_SEQ_PORT_TYPE_HARDWARE; + const unsigned int type_hw = SND_SEQ_PORT_TYPE_HARDWARE; const unsigned int type_sw = SND_SEQ_PORT_TYPE_PORT | SND_SEQ_PORT_TYPE_SOFTWARE; std::vector ret;