Linux Sound subsystem development
 help / color / mirror / Atom feed
* ALSA USB MIDI port names are poorly constructed and truncate iJACK names
@ 2025-04-22 14:31 Paul Davis
  2025-04-22 14:46 ` Takashi Iwai
  0 siblings, 1 reply; 9+ messages in thread
From: Paul Davis @ 2025-04-22 14:31 UTC (permalink / raw)
  To: linux-sound

ALSA's USB MIDI support appears to construct MIDI port names by
concatenating the iProduct name and the iJACK name. The problem with
this is that there is a fixed length to the port name in ALSA, and for
an increasing number of devices, this behavior truncates critical
information from the end of the iJACK name.

For example, culled from lsusb output:

Bus 005 Device 098: ID 1235:0145 Focusrite-Novation Launchkey MK4 49
  iProduct                2 Launchkey MK4 49
    iConfiguration          4 Launchkey MK4 49
      iInterface              5 Launchkey MK4 49 MIDI
      iInterface              6 Launchkey MK4 49 MIDI Int
        iJack                   7 Launchkey MK4 49 MIDI In
        iJack                   8 Launchkey MK4 49 MIDI Out
        iJack                   9 Launchkey MK4 49 DAW In

gives these port names:

44:0    Launchkey MK4 49                 Launchkey MK4 49 Launchkey MK4
 44:1    Launchkey MK4 49                 Launchkey MK4 49 Launchkey MK4

which is useless since it fails to include the "DAW" and "MIDI Out"
parts of the iJACK names.

The correct fix, I think is to only prepend the iProduct name if that
name is not present at the start of the iJACK name. This will cover
devices where the manufacturer does *not* include the device name in
the iJACK name, but will fix this situation for devices where they do
(Novation and Arturia and many others do this).

If agreed, I can construct a patch for this.

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2025-04-29 18:35 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-22 14:31 ALSA USB MIDI port names are poorly constructed and truncate iJACK names Paul Davis
2025-04-22 14:46 ` Takashi Iwai
2025-04-22 17:31   ` Paul Davis
2025-04-23  6:45     ` Takashi Iwai
2025-04-25 14:39       ` Paul Davis
2025-04-25 15:10         ` Takashi Iwai
2025-04-28 20:36           ` Paul Davis
2025-04-29 18:35             ` Takashi Iwai
2025-04-28 21:15           ` Paul Davis

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox