Subject: Re: USB feedback wanted
To: Lennart Augustsson <firstname.lastname@example.org>
From: Chris G. Demetriou <email@example.com>
Date: 06/30/1998 18:15:22
> 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
There's a difference between "not caring" and "caring."
It should be possible to have a generic configuration that attaches
everything everywhere, and to let the users of such a configuration
sort out the mess. People who don't care shouldn't have to cope with
On the other hand, it should be possible for a user who cares to nail
down the relevant details as best they can, so that if they happen to
add a new device at a 'bad' place, or if one of their devices powers
on non-responsive, something "close to right" continues to happen.
USB gives at least location as a mechanism for doing that, although
it's apparently not a particularly great mechanism.
> 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).
One useful thing would be if strings could be locators. Then you
could do things like check for serial number matches on devices that
support them. ("need the functionality, buy a device which doesn't
suck.") However, that's not currently possible, and wouldn't be
trivial to implement in config.
> I don't think USB is well suited for this situation, unfortunately.
As noted, it at least gives the opportunity to use location, in the
form of hub interconnections. Location combined with other
information can be powerful.
It seems silly to discard location information a priori when it's the
only (currently-usable) information that's available!
> 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?
You cannot use the existence of a problem with another chunk of code
to rationalize the problem in your code. Yes, there's a problem with
other code. It's a bug there, that will cause people who have a
serious need for the functionality there. If you can avoid
propagating the problem, you should.
Indeed, (ISA) PnP would appear to be a harder case than the one you
have; there isn't even location information which can be leveraged for
(ISA) PnP's use, only string-based information. (Even in that,
there's not a defined type/whatever for serial numbers, is there?)
In the long run, it would probably be best if config allowed for
string-value locators. Those could supplant, or be used in addition
to other bus/device/location-dependent (i.e. numerical and
topological) locators, depending on the device.