Specifying the order of sound devices

Scott James Remnant scott at ubuntu.com
Mon Apr 10 18:28:04 BST 2006


On Mon, 2006-04-10 at 18:18 +0100, Matthew Garrett wrote:

> On Mon, Apr 10, 2006 at 06:09:59PM +0100, Scott James Remnant wrote:
> 
> > Then that's a kernel patch.  We could create a pseudo-driver that
> > supports the alias list of both the prism54 and prism54softmac drivers,
> > and depends on them both.
> 
> Ok, that would probably work, though it's a fair amount of work (there's 
> some degree of shared symbol names and misery and argh). Then we still 
> have the ata_piix/ahci issue, which upstream are unlikely to accept 
> this sort of fix for ("Work around hardware bugs in userspace", and so 
> on)
> 
It does seem to make sense, though; given the problem:

* two drivers, fullmac and softmac.
* no way to tell from general device information which to use.
* softmac supports all devices.
* fullmac is preferred for those it can support.
* fullmac fails to bind to those it can't support.

That automatically suggests to me the following pseudo-code:

  if (fullmac_bind (device) < 0)
          softmac_bind (device);

As we can't tell the result of a driver's binding attempt from
user-space, it would appear to be necessary for this to be done in the
kernel.


User-space solutions are appropriate where we have enough information
there to make a decision one way or the other; and if we're going to
make the decision there, then we make sure we prevent the decision from
being made in the kernel space.

Our approach has always been to ensure there is no cross-over of
vendor/device ids between drivers, so there's only ever one possibility;
or where there are two possibilities pick one and prevent the other from
getting loaded.


This approach doesn't work where the vendor/device ids are the same for
devices which need different drivers, and the only way to tell whether
you can use a driver or not is to talk to the hardware itself.  We can
only do this kind of thing in kernel space, because that's the only
place we can talk to the hardware.

Scott
-- 
Scott James Remnant
scott at ubuntu.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 191 bytes
Desc: This is a digitally signed message part
Url : https://lists.ubuntu.com/archives/sounder/attachments/20060410/d06bc6cb/attachment.pgp


More information about the sounder mailing list