Skip to contentSkip to conversation

snd_seq_port_info_get_client & snd_seq_client_info_get_name

DISCUSSION holborn 2 participants 2 messages Jan 15, 2004 – Jan 16, 2004

lore
Share & tools
lore

holborn

author
#0 lore raw

Hi!

Tath's a question/request ...

'snd_seq_port_info_get_client' returns always the same value? for hardware
or software devices even if are not started in the same order? or if the number of devices is different?

I don't checkit ... but if it's not the same number, maybe could be a good thing add some extra info in 'snd_seq_client_info_get_name', card number?

because if you have two same cards, client_info is the same for both, and port can be different each time you restart, if Plug&Play USB cards works (I don't know ... ),

Of course, i suggest that, only if the client return value is always different.

Thanks

Josep

-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004 Premiere Conference on Open Tools Development and Integration See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn

#1 lore raw
Quoted 1 line · holborn

'snd_seq_port_info_get_client' returns always the same value?

Clients 0..63 are ALSA system clients, with fixed numbers (0=system broadcast/timer, 62=dummy, 63=OSS emulation).

Clients 64..127 are devices on sound cards. There are 8 numbers per
card: 64..71 = card 0, 72..79 = card 1, etc.

Clients 128..191 are applications. An application gets the next free number.

Quoted 2 lines

for hardware or software devices even if are not started in the same order? or if the number of devices is different?

Hardware devices retain their number as long as the card number stays the same.

Software devices can have a more or less random number; you have to identify them by name, or let the user select it.

Quoted 3 lines

I don't checkit ... but if it's not the same number, maybe could be a good thing add some extra info in 'snd_seq_client_info_get_name', card number?

The name of rawmidi sequencer ports already contains the card number.

Quoted 2 lines

because if you have two same cards, client_info is the same for both,

PCI cards are initialized in some fixed order.

Quoted 2 lines

and port can be different each time you restart, if Plug&Play USB cards works (I don't know ... ),

Two _identical_ USB devices cannot be distinguished by the current driver, but it's possible if they have different product IDs.

HTH
Clemens

-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004 Premiere Conference on Open Tools Development and Integration See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn