initial support for video devices and printer ports
David Zeuthen
david at fubar.dk
Wed Sep 1 12:29:10 PDT 2004
On Wed, 2004-09-01 at 20:38 +0200, Kay Sievers wrote:
> On Wed, 2004-09-01 at 14:30 -0400, Bill Nottingham wrote:
> > Kristof Vansant (de_lupus at pandora.be) said:
> > > On Wed, 2004-09-01 at 00:59, Kay Sievers wrote:
> > > > Shouldn't a printer be a subdevice of the "printer_port" and not merged
> > > > into it?
> > > >
> > > It is possible to have a parallel scanner and printer on one parallel
> > > port if I'm not mistaking.
> >
> > Not to mention parallel port disks. :)
>
> Yeah, on top of that :)
> I just read a small part of the IEEE1284 (parallel port) spec. It is
> possible to connect 20 devices to _one_ port by daisy-chaining and
> multiplexing the devices. All in line with the spec! And all devices are
> adressable.
> At least two of the five possible devices in a daisy-chain will appear
> sometimes in a HAL environment.
> So we should do childs for it, if we find a device?
>
Interesting. One of the things I want to put in hal is to add a method
Rescan() that can be invoked on the org.freedesktop.Hal.Device interface
for a given device object. The semantics of this operation will differ,
depending on the capabilities of the device object. We'll also restrict
access so only certain well defined (e.g. the image for the process must
be /usr/bin/blah or something) processes can invoke it.
One thing I want to use this for is to invoke a poll for media on
storage devices with removable media that is set not to be polled like
floppies and other legacy devices. (note: sadly, this is not as trivial
as just a 'blockdev --rereadpt /dev/sda' as this won't work media
without partition tables).
Perhaps what we need is simply a hal device object that represent the
parallel port together with some code to probe (probably just asking the
kernel about it) that is invoked on Rescan(). Then we simply add
children representing printers, scanners etc. as appropriate as hotplug
events occur for the class devices. For devices with userspace drivers
(scanners?) we also need to have some code to probe for that. As the
parallel port isn't plug and play some UI on the desktop will have to
have a button that says 'detect printer' (this probably already exist)
or something. This may perhaps also be used on serial port to detect
modems or mice or something :-)
An interesting question is whether we should do the probe on startup as
it may be time consuming. Bill can probably give us some advice here :-)
Cheers,
David
_______________________________________________
hal mailing list
hal at freedesktop.org
http://freedesktop.org/mailman/listinfo/hal
More information about the Hal
mailing list