Subject: Re: USB feedback wanted
To: None <firstname.lastname@example.org>
From: Lennart Augustsson <email@example.com>
Date: 06/30/1998 20:31:19
> > I don't use any locators. I'm not sure how thay can be used for USB.
> > Each USB device is can be queried for a descriptor which contains
> > a lot of information like vendor and product id, device class/subclass,
> > revision etc. I guess these could be locators, but I don't
> > see the point. It seems to work well without any locators.
> What if I have multiple ostensibly "identical" (but not
> interchangeable) devices plugged into the bus... How do I nail down
> the configuration so that the mapping from device-driver minor numbers
> to physical devices remains the same? even if I temporarily
> plug/unplug yet another device?
> Think of a monophonic speaker. Assume I have two plugged in as my
> `left' and `right' stereo channels. if I just let the mapping
> "float", what happens if I add a third speaker, and it happens to come
> "before" the other two in the autoconfig order? does the new one
> become "left", the old "left" become "right" and the old "right" get
> nothing at all?
This is a very good question and I don't know how to do it
with USB. Assuming that your speakers really are identical
I can see no way to guarantee the mapping to minor numbers.
Unless you want to use the physical position of where the device is
plugged into the USB tree. But that is not very appealing since
physical positions is what USB is supposed to take you away
from. If your speakers are not identical the difference may
be in some device specific descriptor that it would be very
difficult to make a general locator for.
Something that could have been helpful here is the device serial
number (which is supposedly unique given a vendor&product), but
few devices actually seem to have implemented a serial number
(since it is optional).
I don't think USB is well suited for this situation, unfortunately.
Don't we have the same problem already? What if I have two identical
PnP sound cards? How do I decide which is /dev/audio0 and /dev/audio1?