Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Clemens Ladisch <clemens@ladisch.de>
To: Adam Goode <agoode@chromium.org>, alsa-devel@alsa-project.org
Subject: Re: Support for getting "manufacturer" from snd_seq_client_info and/or snd_ctl_card_info
Date: Sun, 11 May 2014 09:50:16 +0200	[thread overview]
Message-ID: <536F2BB8.8060002@ladisch.de> (raw)
In-Reply-To: <CAOf41NnbBTYrfN10GUcxzdHmKZJj0YT=DC3ntfjuhpb=fa+o=A@mail.gmail.com>

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

  reply	other threads:[~2014-05-11  7:50 UTC|newest]

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

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=536F2BB8.8060002@ladisch.de \
    --to=clemens@ladisch.de \
    --cc=agoode@chromium.org \
    --cc=alsa-devel@alsa-project.org \
    /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