Integrate libsane and sane into Solaris [PSARC/2008/170 FastTrack timeout 03/11/2008]
Lei Chen
Raymond.Chen at sun.com
Sun Mar 16 21:02:06 PDT 2008
Bill Sommerfeld wrote:
> The whole "scanner as removable media" thing was a total distraction/red
> herring.
>
> Project team (or Darren?): is there a portable way with libsane to reset
> a scanner to its power-on-default or factory-default configuration? Or
> does this require scanner-model-specific knowledge?
>
The reset-to-default behavior depends on the hardware's capability. Some
scanners support reset operation. Upon device close/open, a reset
command will be sent to the device. For those that don't support
hardware reset, the backend will call its own init_options() or similar
function to set default parameters for a device upon sane_init(),
sane_open() or sane_start()[1], then write such parameters to device to
acquire data. Some backend may even use all the methods to set initial
state of a scanner. Application can change the parameter values by
calling sane_control_option(). So, whenever a user starts to acquire
image data from a scanner, the scanner's state is reset.
Thanks,
Lei Chen
[1] http://www.sane-project.org/html/doc013.html
> I think the pragmatic answer is to not make claims about device
> allocation as part of the spec for this case.
>
> Perhaps we could use some future project to extend device allocation to
> cope with devices accessed through libusb/ugen and similar frameworks
> rather than kernel drivers with device-class-specific drivers, and
> another one to unify the logindevperm mechanism with device allocation.
>
> Neither of those seems to be this case.
>
> - Bill
>
>
>
>
>
>
>
>
More information about the opensolaris-arc
mailing list