From 00b091fab8205afbef4f44f61b4ef0da9d6d5178 Mon Sep 17 00:00:00 2001 From: Albert Graef Date: Sat, 22 Jul 2023 19:38:37 +0200 Subject: [PATCH] Fix up the first rawmidi port alias. This lacked a proper device prefix and thus wouldn't show in qjackctl, so that the Jack MIDI connections view came up empty. Added the system: prefix so that they will now be displayed correctly. --- linux/alsa/alsa_rawmidi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/linux/alsa/alsa_rawmidi.c b/linux/alsa/alsa_rawmidi.c index 9a9386ce2..5d0053518 100644 --- a/linux/alsa/alsa_rawmidi.c +++ b/linux/alsa/alsa_rawmidi.c @@ -500,11 +500,11 @@ int midi_port_open(alsa_rawmidi_t *midi, midi_port_t *port) /* Some devices (emu10k1) have subdevs with the same name, * and we need to generate unique port name for jack */ - strncpy(name, port->name, sizeof(name)); + snprintf(name, sizeof(name), "system:%s", port->name); if (midi_port_open_jack(midi, port, type, name)) { int num; num = port->id.id[3] ? port->id.id[3] : port->id.id[1]; - snprintf(name, sizeof(name), "%s %d", port->name, num); + snprintf(name, sizeof(name), "system:%s %d", port->name, num); if (midi_port_open_jack(midi, port, type, name)) return 2; }