[sane-devel] gt68xx (pre-)backend updated

Sergey Vlasov vsu@mivlgu.murom.ru
Mon, 15 Apr 2002 21:30:10 +0400


On 15 Apr 2002 19:06:35 +0200
Irvin Probst <irvin@irvinig.org> wrote:

> On Mon, 2002-04-15 at 18:35, Sergey Vlasov wrote:
> >
> > It is possible that the GT6801 support was broken by this; changing the
> > first #if 0 to #if 1 in gt68xx_scanner_calibrate() (gt68xx_high.c)
> > should restore the old behavior (without the autoconfiguration).
> 
> Hi,
> With a gt6801 and #if 0 the image is blue, it seems that red and green
> channels disapeared somewhere near /dev/null :)
> I've no time to try to fix it right now, maybe this week end.

Please send the debug output with SANE_DEBUG_GT68XX=5.

Also you may try changing around R, G, B fields in
gt68xx_generic_set_afe() (if this helps, a separate version will be
needed for gt6801). Possibly the order here is BGR and not RGB.

Also, maybe you will need something like this in gt86xx_generic_set_afe():

=====================
SANE_Status
gt68xx_generic_set_afe (GT68xx_Device *dev, GT68xx_AFE_Parameters *params)
{
  GT68xx_Packet req;

  memset (req, 0, sizeof (req));
  req[0] = 0x22;
  req[1] = 0x01;
  req[2] = 0x3f - params->r_offset;
  req[3] = params->r_pga;
  req[4] = 0x3f - params->g_offset;
  req[5] = params->g_pga;
  req[6] = 0x3f - params->b_offset;
  req[7] = params->b_pga;

  return gt68xx_device_req (dev, req, req);
}
=====================

(again, the proper combination must be moved to gt6801.c - but first it
must be found).