[alsa-devel] Support for getting "manufacturer" from snd_seq_client_info and/or snd_ctl_card_info
Clemens Ladisch
clemens at ladisch.de
Sun May 11 09:50:16 CEST 2014
Adam Goode wrote:
> I am doing a bit of work on the Alsa Web MIDI implementation in Chrome:
> https://code.google.com/p/chromium/issues/detail?id=344410
>
> Web MIDI likes to know the "manufacturer" field as part of its API:
> http://webaudio.github.io/web-midi-api/#attributes-3
>
> The current implementation in Chrome uses rawmidi, and then tries to parse
> out the manufacturer from the longname of the card. This works reasonably
> well, but is brittle and results in a lot of code.
>
> I am working on a seq implementation for Chrome, to replace the rawmidi
> implementation. I can retain the manufacturer extraction hack on the card,
> but seq requires yet another hack to guess the card for a particular seq
> client.
Did you test this with anything besides USB devices?
And software clients do not have a card.
> Any suggestions on how to extract the manufacturer more easily? The best
> solution would be to add a manufacturer (or vendor) field to the
> snd_seq_client_info ioctl struct.
Old clients would not know to set this field.
The Core MIDI documentation says:
| kMIDIPropertyManufacturer
| Drivers *should* set this property on their devices.
| Creators of virtual endpoints *may* set this property on their endpoints.
So what happens on OS X if this is not set?
> A completely different solution would be to add all this info to sysfs
USB devices already have this information in sysfs.
How about an easy solution: just use "Linux".
(IIRC this is what Microsoft's MME/WDM bridge driver does.)
Regards,
Clemens
More information about the Alsa-devel
mailing list