From: Clemens Ladisch <clemens@ladisch.de>
To: Martin Koegler <martin.koegler@chello.at>, alsa-devel@alsa-project.org
Subject: Re: Linking ALSA sequencer kernel clients to their device
Date: Thu, 11 Feb 2016 10:17:03 +0100 [thread overview]
Message-ID: <56BC518F.7060902@ladisch.de> (raw)
In-Reply-To: <20160211075035.GA23857@mail.zuhause>
Martin Koegler wrote:
> In my domain, people use multiple identical USB-MIDI keyboards - each
> is assigned a different functions. They expect to kept this mapping
> across reboots.
>
> The sound card number are dynamic, therefore they can change after
> reboots. The only stable device ID is the sysfs path of the used USB
> port.
>
> This means, that I need to associate a kernel sequencer client number
> with a sysfs device.
>
> rawmidi devices expose the card number via IOCTLs, which allows to
> find the corresponding device in sysfs.
>
> The sequencer provides no identifing data. Chromium works around this
> issue by scanning rawmidi as well as sequencer devices and matching
> them by using assumtions, how the kernel register sequencer devices.
This information wouldn't be wrong in the commit message.
> So I thought about exposing the missing information via sysfs:
The ioctl API (and the library API on top of it) already exists. Why
do you want to introduce another kind of API that cannot be used for
virtual devices?
Just add the card number to snd_seq_client_info. (For kernel drivers;
user clients might have the PID here while we're at it.)
Regards,
Clemens
next prev parent reply other threads:[~2016-02-11 9:17 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-11 7:50 Linking ALSA sequencer kernel clients to their device Martin Koegler
2016-02-11 9:17 ` Clemens Ladisch [this message]
2016-02-12 8:07 ` Martin Koegler
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=56BC518F.7060902@ladisch.de \
--to=clemens@ladisch.de \
--cc=alsa-devel@alsa-project.org \
--cc=martin.koegler@chello.at \
/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 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.