All of lore.kernel.org
 help / color / mirror / Atom feed
* Where do amidi MIDI port names come from ?
@ 2018-01-22 14:48 Happy
  2018-01-22 15:29 ` Clemens Ladisch
  0 siblings, 1 reply; 2+ messages in thread
From: Happy @ 2018-01-22 14:48 UTC (permalink / raw)
  To: alsa-devel


Does someone know where (USB) MIDI port names in Linux come from ? 

For example a MIDISport 4x4 shows "Midiman" at lsusb (the same for each
one if there is more than one device. This comes from the idVendor,
idProduct in the device descriptor)

But "MIDISPORT 4x4 Anniv MIDI 1 to 4" by amidi -l for the device.
Thus wonder where amidi (ALSA) gets the product/portname from.

There are other examples where the SUB device ID is not known by
Linux but the port name does have the vendor/product name

Microsoft argues that some MIDI devices do not report a name
But since Linux does not have a driver for each device
I highly doubt so.  (have not come across one)

Microsoft chose to use the name from the device driver in their
UWP MIDI implementation which has apparantly been not a good idea
It has resulted in multiple duplicate device/port names for
different devices.

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

* Re: Where do amidi MIDI port names come from ?
  2018-01-22 14:48 Where do amidi MIDI port names come from ? Happy
@ 2018-01-22 15:29 ` Clemens Ladisch
  0 siblings, 0 replies; 2+ messages in thread
From: Clemens Ladisch @ 2018-01-22 15:29 UTC (permalink / raw)
  To: alsa-devel

Happy wrote:
> For example a MIDISport 4x4 shows "Midiman" at lsusb (the same for each
> one if there is more than one device. This comes from the idVendor,
> idProduct in the device descriptor)

The name shown for these items does not come from the device; lsusb has
an internal database that maps the idVendor/idProduct values to names.

> But "MIDISPORT 4x4 Anniv MIDI 1 to 4" by amidi -l for the device.
> Thus wonder where amidi (ALSA) gets the product/portname from.

The snd-usb-audio driver gets these names from the device descriptors
(iManufacturer/iProduct).  Some devices do not have these, so the
entries in quirks-table.h can override them.  There are no devices that
specify port names (AFAIK), so the driver has a hardcoded list for some
devices in the port_info array in midi.c, and uses 1/2/... for the rest.


Regards,
Clemens

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

end of thread, other threads:[~2018-01-22 15:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-01-22 14:48 Where do amidi MIDI port names come from ? Happy
2018-01-22 15:29 ` Clemens Ladisch

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.