[LAD] Finding ALSA sequencer client/port numbers

David Robillard d at drobilla.net
Fri Apr 22 22:06:54 UTC 2011


On Fri, 2011-04-22 at 21:10 +0000, Fons Adriaensen wrote:
> On Fri, Apr 22, 2011 at 04:51:53PM -0400, Paul Davis wrote:
> > On Fri, Apr 22, 2011 at 4:45 PM, Fons Adriaensen <fons at linuxaudio.org> wrote:
> > > Hello all,
> > >
> > > after reading ASLA docs for some hours I've not found an
> > > answer to the following:
> > >
> > > Given the ALSA sequencer client and port _names_, find the
> > > numbers required to set up a connection (a 'subscription'
> > > in ALSA lingo).
> > 
> > ALSA MIDI ports have names?
> 
> They do. For example: 
> 
> fons at zita1:~> aconnect -i
> 
> client 0: 'System' [type=kernel]
>     0 'Timer           '
>     1 'Announce        '
> client 14: 'Midi Through' [type=kernel]
>     0 'Midi Through Port-0'
> client 20: 'TerraTec EWS88MT' [type=kernel]
>     0 'TerraTec EWS88MT MIDI'
> client 24: 'MPU-401 UART' [type=kernel]
>     0 'MPU-401 UART MIDI'
> 
> 
> So given e.g.  'TerraTec EWS88MT','TerraTec EWS88MT MIDI'
> how do I find 20,0 (from within an application) ?
> 
> Or in other words, what is ALSA's get_port_by_name() ?

Alsa sequencer names aren't unique or intended for use as identifiers,
you probably don't want to do this if it's at all possible to avoid...

-dr




More information about the Linux-audio-dev mailing list