Linux Sound subsystem development
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Paul Davis <paul@linuxaudiosystems.com>
Cc: linux-sound@vger.kernel.org
Subject: Re: ALSA USB MIDI port names are poorly constructed and truncate iJACK names
Date: Tue, 22 Apr 2025 16:46:32 +0200	[thread overview]
Message-ID: <878qnss187.wl-tiwai@suse.de> (raw)
In-Reply-To: <CAFa_cKmEDQWcJatbYWi6A58Zg4Ma9_6Nr3k5LhqwyxC-P_kXtw@mail.gmail.com>

On Tue, 22 Apr 2025 16:31:50 +0200,
Paul Davis wrote:
> 
> 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.

So you're suggesting to remove the substring matched with iProduct at
copying from iJack name?  That'll make sense and go ahead.


thanks,

Takashi

  reply	other threads:[~2025-04-22 14:51 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=878qnss187.wl-tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=linux-sound@vger.kernel.org \
    --cc=paul@linuxaudiosystems.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox