Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* Support for getting "manufacturer" from snd_seq_client_info and/or snd_ctl_card_info
@ 2014-05-11  1:18 Adam Goode
  2014-05-11  7:50 ` Clemens Ladisch
  0 siblings, 1 reply; 9+ messages in thread
From: Adam Goode @ 2014-05-11  1:18 UTC (permalink / raw)
  To: alsa-devel

Hi,

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.

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. This would likely require a new ioctl,
since there is only 64 bytes reserved in the current struct. I am guessing
this is not too likely to be accepted. (I would want to also add the same
manufacturer field to the snd_ctl_card_info.)

The next best solution would be to add a card field to snd_seq_client_info,
which could be optionally populated with the card that is associated to the
client.

A completely different solution would be to add all this info to sysfs
which is easier to extend dynamically and won't require any ioctl changes
at all. (I kind of like this solution the best, but it would be a change
from the ioctl-based mechanisms done so far.)

Ultimately, if I am stuck guessing and parsing, that will work as long as
the underlying implementation doesn't change. But I would rather have a
more reliable solution going forward.

Any thoughts?


Thanks,

Adam Goode

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

end of thread, other threads:[~2014-05-21  3:24 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-11  1:18 Support for getting "manufacturer" from snd_seq_client_info and/or snd_ctl_card_info Adam Goode
2014-05-11  7:50 ` Clemens Ladisch
2014-05-12 19:29   ` Adam Goode
2014-05-13  9:24     ` Clemens Ladisch
2014-05-13 15:00       ` Takashi Iwai
2014-05-15 23:47         ` Adam Goode
2014-05-16  5:42           ` Takashi Iwai
2014-05-16  7:26           ` Clemens Ladisch
2014-05-21  3:23             ` Adam Goode

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