[alsa-devel] [PATCH] Provide card number / PID via sequencer client info

Takashi Iwai tiwai at suse.de
Tue Feb 16 09:41:41 CET 2016


On Tue, 16 Feb 2016 09:03:34 +0100,
Martin Koegler wrote:
> 
> On Mon, Feb 15, 2016 at 11:34:09PM +0100, Takashi Iwai wrote:
> > > On Mon, Feb 15, 2016 at 08:08:12PM +0100, Takashi Iwai wrote:
> > > > On Mon, 15 Feb 2016 19:32:43 +0100,
> > > > Martin Koegler wrote:
> > > > > 
> > > > > On Mon, Feb 15, 2016 at 11:30:15AM +0100, Takashi Iwai wrote:
> > > > > > The idea looks good.  One remaining question is whether only providing
> > > > > > the card number or pid is sufficient for all cases.
> > > > > 
> > > > > I only care about the kernel client. 
> > > > 
> > > > Well, the question is whether only card number is enough.  What if
> > > > cards provide multiple rawmidi devices?
> > > 
> > > Aren't they currently ports?
> > > seq_midi.c creates just one sequencer device per card number.
> > 
> > Look at cards with synth support, e.g. emu10k1 or OPL3/OPL4.
> 
> Should I export the client_index parameter of snd_seq_create_kernel_client too?

Well, I'd rather ask what are the requirements -- in wide ranges.

As you already noticed, multiple rawmidi devices and rawmidi
subdevices are mapped into a single client with various ports.  But we
have no exact mapping information there, too.  So, if you want to have
an exact mapping between sequencer and rawmidi, wouldn't you need the
similar information in snd_seq_port_info, too?

And, as mentioned, some cards provide indeed multiple clients.  How do
you identify which client is for what?  So far, it's identified only
from the name string and the type bits of each port.  Isn't it enough?
If not, what have to be provided?


Takashi


More information about the Alsa-devel mailing list