[alsa-devel] Where do amidi MIDI port names come from ?

Clemens Ladisch clemens at ladisch.de
Mon Jan 22 16:29:24 CET 2018


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


More information about the Alsa-devel mailing list