Re: Linking ALSA sequencer kernel clients to their device

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel



[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux