kopia lustrzana https://gitlab.com/sane-project/backends
fujitsu backend v82
- improved front-side endorser vpd detection - send scanner_control_ric during sane_read of each side - add fi-6770A and fi-6670A USB ID'smerge-requests/1/head
rodzic
ab53b7e884
commit
8eaa9c65e4
23
ChangeLog
23
ChangeLog
|
@ -1,8 +1,15 @@
|
|||
2008-10-31 Louis Lagendijk <llagendijk-guest at users.alioth.debian.org>
|
||||
* backend/pixma_bjnp.c corrected small typo
|
||||
2008-10-31 m. allan noah <kitno455 a t gmail d o t com>
|
||||
* backend/fujitsu.[ch], backend/fujitsu-scsi.h,
|
||||
backend/fujitsu.conf.in, doc/descriptions/fujitsu.desc: backend v82
|
||||
- improved front-side endorser vpd detection
|
||||
- send scanner_control_ric during sane_read of each side
|
||||
- add fi-6770A and fi-6670A USB ID's
|
||||
|
||||
2008-10-31 Louis Lagendijk <llagendijk-guest at users.alioth.debian.org>
|
||||
* backend/pixma_bjnp.c
|
||||
2008-10-31 Louis Lagendijk <llagendijk-guest at users.alioth.debian.org>
|
||||
* backend/pixma_bjnp.c: corrected small typo
|
||||
|
||||
2008-10-31 Louis Lagendijk <llagendijk-guest at users.alioth.debian.org>
|
||||
* backend/pixma_bjnp.c:
|
||||
Added retry to select() calls when they get interrupted by a
|
||||
signal. This solves problems in xsane after a first scan completed.
|
||||
There is still an issue that scanner closes tcp connection after
|
||||
|
@ -20,10 +27,10 @@
|
|||
Tweaks for TPU scan at 4800 dpi, and MP810 at 2400 dpi (now works).
|
||||
Updated docs around that.
|
||||
|
||||
2008-10-25 Louis Lagendijk <llagendijk-guest at users.alioth.debian.org>
|
||||
* Added configuration file support for pixma backend
|
||||
2008-10-25 Louis Lagendijk <llagendijk-guest at users.alioth.debian.org>
|
||||
* Added configuration file support for pixma backend
|
||||
Currently used only for configuration of network scanners.
|
||||
|
||||
|
||||
2008-10-22 Nicolas Martin <nicols-guest at users.alioth.debian.org>
|
||||
* backend/pixma.c, backend/pixma_io_sanei.c, backend/pixma_mp150.c:
|
||||
TPU scanning in 48 bits mode now works fine on MP970, with Xsane or
|
||||
|
@ -38,7 +45,7 @@
|
|||
- Re-enable includes in pixma_bjnp.c as they are needed on Freebsd
|
||||
- Replaced getaddrinfo by gethostbyname in pixma_bjnp.c as this is
|
||||
supported on OS/2 as well
|
||||
`
|
||||
|
||||
2008-10-21 m. allan noah <kitno455 a t gmail d o t com>
|
||||
* doc/descriptions/fujitsu.desc: backend v81, fix fi-6240 usb id
|
||||
|
||||
|
|
|
@ -146,13 +146,14 @@ putnbyte (unsigned char *pnt, unsigned int value, unsigned int nbytes)
|
|||
#define get_IN_color_offset(in) getnbyte (in+0x2A, 2) /* offset between colors */
|
||||
|
||||
/* these only in some scanners */
|
||||
#define get_IN_long_color(in) getbitfield(in+0x2C, 1, 0)
|
||||
#define get_IN_long_gray(in) getbitfield(in+0x2C, 1, 1)
|
||||
#define get_IN_long_color(in) getbitfield(in+0x2C, 1, 0)
|
||||
|
||||
#define get_IN_duplex_3091(in) getbitfield(in+0x2D, 1, 0)
|
||||
#define get_IN_bg_front(in) getbitfield(in+0x2D, 1, 2)
|
||||
#define get_IN_bg_back(in) getbitfield(in+0x2D, 1, 3)
|
||||
#define get_IN_emulation(in) getbitfield(in+0x2D, 1, 6)
|
||||
#define get_IN_vrs_cga(in) getbitfield(in+0x2D, 1, 5)
|
||||
#define get_IN_bg_back(in) getbitfield(in+0x2D, 1, 3)
|
||||
#define get_IN_bg_front(in) getbitfield(in+0x2D, 1, 2)
|
||||
#define get_IN_has_back(in) getbitfield(in+0x2D, 1, 0)
|
||||
|
||||
#define get_IN_duplex_offset(in) getnbyte (in+0x2E, 2)
|
||||
|
||||
|
@ -202,7 +203,8 @@ putnbyte (unsigned char *pnt, unsigned int value, unsigned int nbytes)
|
|||
#define get_IN_operator_panel(in) getbitfield(in+0x20, 1, 1)
|
||||
#define get_IN_endorser_f(in) getbitfield(in+0x20, 1, 0)
|
||||
|
||||
#define get_IN_unused(in) getbitfield(in+0x21, 0x0f, 4)
|
||||
#define get_IN_mp_stacker(in) getbitfield(in+0x21, 1, 7)
|
||||
#define get_IN_unused(in) getbitfield(in+0x21, 0x07, 4)
|
||||
#define get_IN_adbits(in) getbitfield(in+0x21, 0x0f, 0)
|
||||
|
||||
#define get_IN_buffer_bytes(in) getnbyte(in + 0x22, 4)
|
||||
|
@ -267,6 +269,8 @@ putnbyte (unsigned char *pnt, unsigned int value, unsigned int nbytes)
|
|||
#define get_IN_ipc_diffusion(in) getbitfield(in+0x59, 1, 6)
|
||||
#define get_IN_ipc_ipc3(in) getbitfield(in+0x59, 1, 5)
|
||||
#define get_IN_ipc_rotation(in) getbitfield(in+0x59, 1, 4)
|
||||
#define get_IN_ipc_hybrid_clip_deskew(in) getbitfield(in+0x59, 1, 3)
|
||||
#define get_IN_ipc_ipc2_byte67(in) getbitfield(in+0x59, 1, 0)
|
||||
|
||||
#define get_IN_compression_MH(in) getbitfield(in+0x5a, 1, 7)
|
||||
#define get_IN_compression_MR(in) getbitfield(in+0x5a, 1, 6)
|
||||
|
@ -276,18 +280,50 @@ putnbyte (unsigned char *pnt, unsigned int value, unsigned int nbytes)
|
|||
#define get_IN_compression_JPG_EXT(in) getbitfield(in+0x5a, 1, 2)
|
||||
#define get_IN_compression_JPG_INDEP(in) getbitfield(in+0x5a, 1, 1)
|
||||
|
||||
#define get_IN_endorser_mechanical(in) getbitfield(in+0x5c, 1, 7)
|
||||
#define get_IN_endorser_stamp(in) getbitfield(in+0x5c, 1, 6)
|
||||
#define get_IN_endorser_electrical(in) getbitfield(in+0x5c, 1, 5)
|
||||
#define get_IN_endorser_max_id(in) getbitfield(in+0x5c, 0x0f, 0)
|
||||
#define get_IN_compression_JPG_gray(in) getbitfield(in+0x5b, 3, 6)
|
||||
#define IN_comp_JPG_gray_unsup 1
|
||||
#define IN_comp_JPG_gray_color 2
|
||||
#define IN_comp_JPG_gray_gray 3
|
||||
#define get_IN_compression_JPG_YUV_422(in) getbitfield(in+0x5b, 1, 0)
|
||||
|
||||
#define get_IN_endorser_type(in) getbitfield(in+0x5d, 3, 0)
|
||||
#define get_IN_endorser_b_mech(in) getbitfield(in+0x5c, 1, 7)
|
||||
#define get_IN_endorser_b_stamp(in) getbitfield(in+0x5c, 1, 6)
|
||||
#define get_IN_endorser_b_elec(in) getbitfield(in+0x5c, 1, 5)
|
||||
#define get_IN_endorser_max_id(in) getbitfield(in+0x5c, 0x0f, 0)
|
||||
|
||||
#define get_IN_connection(in) getbitfield(in+0x62, 3, 0)
|
||||
#define get_IN_endorser_f_mech(in) getbitfield(in+0x5d, 1, 7)
|
||||
#define get_IN_endorser_f_stamp(in) getbitfield(in+0x5d, 1, 6)
|
||||
#define get_IN_endorser_f_elec(in) getbitfield(in+0x5d, 1, 5)
|
||||
#define get_IN_endorser_f_type(in) getbitfield(in+0x5d, 3, 2)
|
||||
#define get_IN_endorser_b_type(in) getbitfield(in+0x5d, 3, 0)
|
||||
|
||||
#define get_IN_connection(in) getbitfield(in+0x62, 3, 0)
|
||||
|
||||
#define get_IN_endorser_type_ext(in) getbitfield(in+0x63, 1, 4)
|
||||
#define get_IN_endorser_pre_back(in) getbitfield(in+0x63, 1, 3)
|
||||
#define get_IN_endorser_pre_front(in) getbitfield(in+0x63, 1, 2)
|
||||
#define get_IN_endorser_post_back(in) getbitfield(in+0x63, 1, 1)
|
||||
#define get_IN_endorser_post_front(in) getbitfield(in+0x63, 1, 0)
|
||||
|
||||
#define get_IN_x_overscan_size(in) getnbyte(in + 0x64, 2)
|
||||
#define get_IN_y_overscan_size(in) getnbyte(in + 0x66, 2)
|
||||
|
||||
#define get_IN_default_bg_adf_b(in) getbitfield(in+0x68, 1, 3)
|
||||
#define get_IN_default_bg_adf_f(in) getbitfield(in+0x68, 1, 2)
|
||||
#define get_IN_default_bg_fb(in) getbitfield(in+0x68, 1, 1)
|
||||
|
||||
#define get_IN_auto_color(in) getbitfield(in+0x69, 1, 7)
|
||||
#define get_IN_blank_skip(in) getbitfield(in+0x69, 1, 6)
|
||||
#define get_IN_multi_image(in) getbitfield(in+0x69, 1, 5)
|
||||
#define get_IN_f_b_type_indep(in) getbitfield(in+0x69, 1, 4)
|
||||
#define get_IN_f_b_res_indep(in) getbitfield(in+0x69, 1, 3)
|
||||
|
||||
#define get_IN_dropout_spec(in) getbitfield(in+0x6a, 1, 7)
|
||||
#define get_IN_dropout_non(in) getbitfield(in+0x6a, 1, 7)
|
||||
#define get_IN_dropout_white(in) getbitfield(in+0x6a, 1, 7)
|
||||
|
||||
#define get_IN_skew_check(in) getbitfield(in+0x6d, 1, 7)
|
||||
|
||||
/* some scanners need evpd inquiry data manipulated */
|
||||
#define set_IN_page_length(in,val) in[0x04]=val
|
||||
|
||||
|
@ -609,16 +645,31 @@ putnbyte (unsigned char *pnt, unsigned int value, unsigned int nbytes)
|
|||
#define get_GHS_hopper(in) !getbitfield(in+0x03, 1, 7)
|
||||
#define get_GHS_omr(in) getbitfield(in+0x03, 1, 6)
|
||||
#define get_GHS_adf_open(in) getbitfield(in+0x03, 1, 5)
|
||||
#define get_GHS_imp_open(in) getbitfield(in+0x03, 1, 4)
|
||||
#define get_GHS_fb_open(in) getbitfield(in+0x03, 1, 3)
|
||||
#define get_GHS_paper_end(in) getbitfield(in+0x03, 1, 2)
|
||||
#define get_GHS_fb_on(in) getbitfield(in+0x03, 1, 1)
|
||||
|
||||
#define get_GHS_sleep(in) getbitfield(in+0x04, 1, 7)
|
||||
#define get_GHS_clean(in) getbitfield(in+0x04, 1, 6)
|
||||
#define get_GHS_send_sw(in) getbitfield(in+0x04, 1, 2)
|
||||
#define get_GHS_manual_feed(in) getbitfield(in+0x04, 1, 1)
|
||||
#define get_GHS_scan_sw(in) getbitfield(in+0x04, 1, 0)
|
||||
|
||||
#define get_GHS_picalm(in) getbitfield(in+0x05, 1, 7)
|
||||
#define get_GHS_fadalm(in) getbitfield(in+0x05, 1, 6)
|
||||
#define get_GHS_brkalm(in) getbitfield(in+0x05, 1, 5)
|
||||
#define get_GHS_sepalm(in) getbitfield(in+0x05, 1, 4)
|
||||
#define get_GHS_function(in) getbitfield(in+0x05, 0x0f, 0)
|
||||
|
||||
#define get_GHS_ink_empty(in) getbitfield(in+0x06, 1, 7)
|
||||
#define get_GHS_double_feed(in) getbitfield(in+0x06, 1, 0)
|
||||
#define get_GHS_ink_empty(in) getbitfield(in+0x06, 1, 7)
|
||||
#define get_GHS_consume(in) getbitfield(in+0x06, 1, 6)
|
||||
#define get_GHS_overskew(in) getbitfield(in+0x06, 1, 5)
|
||||
#define get_GHS_overthick(in) getbitfield(in+0x06, 1, 4)
|
||||
#define get_GHS_plen(in) getbitfield(in+0x06, 1, 3)
|
||||
#define get_GHS_ink_side(in) getbitfield(in+0x06, 1, 2)
|
||||
#define get_GHS_mf_to(in) getbitfield(in+0x06, 1, 1)
|
||||
#define get_GHS_double_feed(in) getbitfield(in+0x06, 1, 0)
|
||||
|
||||
#define get_GHS_error_code(in) in[0x07]
|
||||
|
||||
|
@ -631,6 +682,7 @@ putnbyte (unsigned char *pnt, unsigned int value, unsigned int nbytes)
|
|||
#define SCANNER_CONTROL_code 0xf1
|
||||
#define SCANNER_CONTROL_len 10
|
||||
|
||||
#define set_SC_ric(icb, val) setbitfield(icb + 1, 1, 4, val)
|
||||
#define set_SC_function(icb, val) setbitfield(icb + 1, 0xf, 0, val)
|
||||
#define SC_function_adf 0x00
|
||||
#define SC_function_fb 0x01
|
||||
|
@ -641,6 +693,12 @@ putnbyte (unsigned char *pnt, unsigned int value, unsigned int nbytes)
|
|||
#define SC_function_lamp_normal 0x06
|
||||
#define SC_function_lamp_saving 0x07
|
||||
#define SC_function_panel 0x08
|
||||
#define SC_function_scan_complete 0x09
|
||||
#define SC_function_eject_complete 0x0a
|
||||
#define SC_function_manual_feed 0x0c
|
||||
|
||||
#define set_SC_ric_dtq(sb, val) sb[2] = val
|
||||
#define set_SC_ric_len(sb, val) putnbyte(sb + 0x06, val, 3)
|
||||
|
||||
/* ==================================================================== */
|
||||
/* window descriptor macros for SET_WINDOW and GET_WINDOW */
|
||||
|
|
|
@ -394,6 +394,10 @@
|
|||
- increase USB timeouts
|
||||
- enable get_pixelsize() to update scan params after set_window()
|
||||
- remove even_scan_line hack
|
||||
v82 2008-10-31, MAN
|
||||
- improved front-side endorser vpd detection
|
||||
- send scanner_control_ric during sane_read of each side
|
||||
- add fi-6770A and fi-6670A USB ID's
|
||||
|
||||
SANE FLOW DIAGRAM
|
||||
|
||||
|
@ -454,7 +458,7 @@
|
|||
#include "fujitsu.h"
|
||||
|
||||
#define DEBUG 1
|
||||
#define BUILD 81
|
||||
#define BUILD 82
|
||||
|
||||
/* values for SANE_DEBUG_FUJITSU env var:
|
||||
- errors 5
|
||||
|
@ -757,9 +761,15 @@ sane_get_devices (const SANE_Device *** device_list, SANE_Bool local_only)
|
|||
DBG (15, "sane_get_devices: looking for 'usb 0x04c5 0x1174'\n");
|
||||
sanei_usb_attach_matching_devices("usb 0x04c5 0x1174", attach_one_usb);
|
||||
|
||||
DBG (15, "sane_get_devices: looking for 'usb 0x04c5 0x1175'\n");
|
||||
sanei_usb_attach_matching_devices("usb 0x04c5 0x1175", attach_one_usb);
|
||||
|
||||
DBG (15, "sane_get_devices: looking for 'usb 0x04c5 0x1176'\n");
|
||||
sanei_usb_attach_matching_devices("usb 0x04c5 0x1176", attach_one_usb);
|
||||
|
||||
DBG (15, "sane_get_devices: looking for 'usb 0x04c5 0x1177'\n");
|
||||
sanei_usb_attach_matching_devices("usb 0x04c5 0x1177", attach_one_usb);
|
||||
|
||||
DBG (15, "sane_get_devices: looking for 'usb 0x04c5 0x1178'\n");
|
||||
sanei_usb_attach_matching_devices("usb 0x04c5 0x1178", attach_one_usb);
|
||||
}
|
||||
|
@ -1084,17 +1094,14 @@ init_inquire (struct fujitsu *s)
|
|||
DBG (15, " color offset: %d lines\n",s->color_raster_offset);
|
||||
|
||||
/* FIXME: we dont store all of these? */
|
||||
DBG (15, " long color scan: %d\n",get_IN_long_color(in));
|
||||
DBG (15, " long gray scan: %d\n",get_IN_long_gray(in));
|
||||
DBG (15, " 3091 duplex: %d\n",get_IN_duplex_3091(in));
|
||||
|
||||
s->has_bg_front = get_IN_bg_front(in);
|
||||
DBG (15, " background front: %d\n",s->has_bg_front);
|
||||
|
||||
s->has_bg_back = get_IN_bg_back(in);
|
||||
DBG (15, " background back: %d\n",s->has_bg_back);
|
||||
DBG (15, " long color scan: %d\n",get_IN_long_color(in));
|
||||
|
||||
DBG (15, " emulation mode: %d\n",get_IN_emulation(in));
|
||||
DBG (15, " VRS CGA: %d\n",get_IN_vrs_cga(in));
|
||||
DBG (15, " background back: %d\n",get_IN_bg_back(in));
|
||||
DBG (15, " background front: %d\n",get_IN_bg_front(in));
|
||||
DBG (15, " back only scan: %d\n",get_IN_has_back(in));
|
||||
|
||||
s->duplex_raster_offset = get_IN_duplex_offset(in);
|
||||
DBG (15, " duplex offset: %d lines\n",s->duplex_raster_offset);
|
||||
|
@ -1321,6 +1328,8 @@ init_vpd (struct fujitsu *s)
|
|||
s->has_endorser_f = get_IN_endorser_f(in);
|
||||
DBG (15, " front endorser: %d\n", s->has_endorser_f);
|
||||
|
||||
DBG (15, " multi-purpose stacker: %d\n", get_IN_mp_stacker(in));
|
||||
|
||||
DBG (15, " unused caps: %d\n", get_IN_unused(in));
|
||||
|
||||
s->adbits = get_IN_adbits(in);
|
||||
|
@ -1509,18 +1518,31 @@ init_vpd (struct fujitsu *s)
|
|||
DBG (15, " compression JPG3: %d\n", s->has_comp_JPG3);
|
||||
|
||||
/* FIXME: we dont store these? */
|
||||
DBG (15, " endorser mech: %d\n", get_IN_endorser_mechanical(in));
|
||||
DBG (15, " endorser stamp: %d\n", get_IN_endorser_stamp(in));
|
||||
DBG (15, " endorser elec: %d\n", get_IN_endorser_electrical(in));
|
||||
DBG (15, " endorser max id: %d\n", get_IN_endorser_max_id(in));
|
||||
DBG (15, " back endorser mech: %d\n", get_IN_endorser_b_mech(in));
|
||||
DBG (15, " back endorser stamp: %d\n", get_IN_endorser_b_stamp(in));
|
||||
DBG (15, " back endorser elec: %d\n", get_IN_endorser_b_elec(in));
|
||||
DBG (15, " endorser max id: %d\n", get_IN_endorser_max_id(in));
|
||||
|
||||
s->endorser_type = get_IN_endorser_type(in);
|
||||
DBG (15, " endorser type: %d\n", s->endorser_type);
|
||||
DBG (15, " front endorser mech: %d\n", get_IN_endorser_f_mech(in));
|
||||
DBG (15, " front endorser stamp: %d\n", get_IN_endorser_f_stamp(in));
|
||||
DBG (15, " front endorser elec: %d\n", get_IN_endorser_f_elec(in));
|
||||
|
||||
s->endorser_type_b = get_IN_endorser_b_type(in);
|
||||
DBG (15, " back endorser type: %d\n", s->endorser_type_b);
|
||||
|
||||
s->endorser_type_f = get_IN_endorser_f_type(in);
|
||||
DBG (15, " back endorser type: %d\n", s->endorser_type_f);
|
||||
|
||||
/*not all scanners go this far*/
|
||||
if (get_IN_page_length (in) > 0x5f) {
|
||||
DBG (15, " connection type: %d\n", get_IN_connection(in));
|
||||
|
||||
DBG (15, " endorser ext: %d\n", get_IN_endorser_type_ext(in));
|
||||
DBG (15, " endorser pr_b: %d\n", get_IN_endorser_pre_back(in));
|
||||
DBG (15, " endorser pr_f: %d\n", get_IN_endorser_pre_front(in));
|
||||
DBG (15, " endorser po_b: %d\n", get_IN_endorser_post_back(in));
|
||||
DBG (15, " endorser po_f: %d\n", get_IN_endorser_post_front(in));
|
||||
|
||||
s->os_x_basic = get_IN_x_overscan_size(in);
|
||||
DBG (15, " horizontal overscan: %d\n", s->os_x_basic);
|
||||
|
||||
|
@ -1545,22 +1567,6 @@ init_vpd (struct fujitsu *s)
|
|||
DBG (5, "init_vpd: with details of your scanner model.\n");
|
||||
}
|
||||
|
||||
/* get EVPD for fb?
|
||||
memset(cmd,0,cmdLen);
|
||||
set_SCSI_opcode(cmd, INQUIRY_code);
|
||||
set_IN_return_size (cmd, inLen);
|
||||
set_IN_evpd (cmd, 1);
|
||||
set_IN_page_code (cmd, 0xf1);
|
||||
|
||||
ret = do_cmd (
|
||||
s, 1, 0,
|
||||
cmd, cmdLen,
|
||||
NULL, 0,
|
||||
in, &inLen
|
||||
);
|
||||
if()
|
||||
*/
|
||||
|
||||
DBG (10, "init_vpd: finish\n");
|
||||
|
||||
return ret;
|
||||
|
@ -1804,17 +1810,33 @@ init_model (struct fujitsu *s)
|
|||
}
|
||||
|
||||
/* endorser type tells string length (among other things) */
|
||||
/*old-style is 40 bytes*/
|
||||
if(s->endorser_type == ET_OLD){
|
||||
s->endorser_string_len = 40;
|
||||
if(s->has_endorser_b){
|
||||
/*old-style is 40 bytes*/
|
||||
if(s->endorser_type_b == ET_OLD){
|
||||
s->endorser_string_len = 40;
|
||||
}
|
||||
/*short new style is 60 bytes*/
|
||||
else if(s->endorser_type_b == ET_30){
|
||||
s->endorser_string_len = 60;
|
||||
}
|
||||
/*long new style is 80 bytes*/
|
||||
else if(s->endorser_type_b == ET_40){
|
||||
s->endorser_string_len = 80;
|
||||
}
|
||||
}
|
||||
/*short new style is 60 bytes*/
|
||||
else if(s->endorser_type == ET_30){
|
||||
s->endorser_string_len = 60;
|
||||
}
|
||||
/*long new style is 80 bytes*/
|
||||
else if(s->endorser_type == ET_40){
|
||||
s->endorser_string_len = 80;
|
||||
else if(s->has_endorser_f){
|
||||
/*old-style is 40 bytes*/
|
||||
if(s->endorser_type_f == ET_OLD){
|
||||
s->endorser_string_len = 40;
|
||||
}
|
||||
/*short new style is 60 bytes*/
|
||||
else if(s->endorser_type_f == ET_30){
|
||||
s->endorser_string_len = 60;
|
||||
}
|
||||
/*long new style is 80 bytes*/
|
||||
else if(s->endorser_type_f == ET_40){
|
||||
s->endorser_string_len = 80;
|
||||
}
|
||||
}
|
||||
|
||||
/* convert to 1200dpi units */
|
||||
|
@ -3517,7 +3539,8 @@ sane_get_option_descriptor (SANE_Handle handle, SANE_Int option)
|
|||
opt->size = sizeof(SANE_Word);
|
||||
|
||||
/*old type cant do this?*/
|
||||
if ((s->has_endorser_f || s->has_endorser_b) && s->endorser_type != ET_OLD){
|
||||
if ((s->has_endorser_f && s->endorser_type_f != ET_OLD)
|
||||
|| (s->has_endorser_b && s->endorser_type_b != ET_OLD)){
|
||||
opt->cap=SANE_CAP_SOFT_SELECT | SANE_CAP_SOFT_DETECT | SANE_CAP_ADVANCED;
|
||||
if(!s->u_endorser)
|
||||
opt->cap |= SANE_CAP_INACTIVE;
|
||||
|
@ -3615,7 +3638,8 @@ sane_get_option_descriptor (SANE_Handle handle, SANE_Int option)
|
|||
opt->unit = SANE_UNIT_NONE;
|
||||
|
||||
/*only newest can do this?*/
|
||||
if ((s->has_endorser_f || s->has_endorser_b) && s->endorser_type == ET_40){
|
||||
if ((s->has_endorser_f && s->endorser_type_f == ET_40)
|
||||
|| (s->has_endorser_b && s->endorser_type_b == ET_40)){
|
||||
opt->cap=SANE_CAP_SOFT_SELECT | SANE_CAP_SOFT_DETECT | SANE_CAP_ADVANCED;
|
||||
if(!s->u_endorser)
|
||||
opt->cap |= SANE_CAP_INACTIVE;
|
||||
|
@ -6018,6 +6042,65 @@ scanner_control (struct fujitsu *s, int function)
|
|||
return ret;
|
||||
}
|
||||
|
||||
static SANE_Status
|
||||
scanner_control_ric (struct fujitsu *s, int bytes, int side)
|
||||
{
|
||||
SANE_Status ret = SANE_STATUS_GOOD;
|
||||
int tries = 0;
|
||||
|
||||
unsigned char cmd[SCANNER_CONTROL_len];
|
||||
size_t cmdLen = SCANNER_CONTROL_len;
|
||||
|
||||
DBG (10, "scanner_control_ric: start\n");
|
||||
|
||||
if(s->has_cmd_scanner_ctl){
|
||||
|
||||
memset(cmd,0,cmdLen);
|
||||
set_SCSI_opcode(cmd, SCANNER_CONTROL_code);
|
||||
|
||||
set_SC_ric(cmd, 1);
|
||||
if (side == SIDE_BACK) {
|
||||
set_SC_ric_dtq(cmd, WD_wid_back);
|
||||
}
|
||||
else{
|
||||
set_SC_ric_dtq(cmd, WD_wid_front);
|
||||
}
|
||||
|
||||
set_SC_ric_len(cmd, bytes);
|
||||
|
||||
DBG (15, "scanner_control_ric: %d %d\n",bytes,side);
|
||||
|
||||
/* extremely long retry period */
|
||||
while(tries++ < 120){
|
||||
|
||||
ret = do_cmd (
|
||||
s, 1, 0,
|
||||
cmd, cmdLen,
|
||||
NULL, 0,
|
||||
NULL, NULL
|
||||
);
|
||||
|
||||
if(ret != SANE_STATUS_DEVICE_BUSY){
|
||||
break;
|
||||
}
|
||||
|
||||
usleep(500000);
|
||||
}
|
||||
|
||||
if(ret == SANE_STATUS_GOOD){
|
||||
DBG (15, "scanner_control_ric: success, tries %d, ret %d\n",tries,ret);
|
||||
}
|
||||
else{
|
||||
DBG (5, "scanner_control_ric: error %d, ret %d\n",tries,ret);
|
||||
ret = SANE_STATUS_GOOD;
|
||||
}
|
||||
}
|
||||
|
||||
DBG (10, "scanner_control_ric: finish\n");
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/*
|
||||
* Creates a temporary file, opens it, and stores file pointer for it.
|
||||
* OR, callocs a buffer to hold the scan data
|
||||
|
@ -6712,6 +6795,16 @@ read_from_JPEGduplex(struct fujitsu *s)
|
|||
return SANE_STATUS_INVAL;
|
||||
}
|
||||
|
||||
/* fi-6770A gets mad if you 'read' too soon on usb, see if it is ready */
|
||||
if(!s->bytes_rx[SIDE_FRONT] && s->connection == CONNECTION_USB){
|
||||
DBG (15, "read: start of usb page, checking RIC\n");
|
||||
ret = scanner_control_ric(s,bytes,SIDE_FRONT);
|
||||
if(ret){
|
||||
DBG(5,"read: ric returning %d\n",ret);
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
inLen = bytes;
|
||||
in = malloc(inLen);
|
||||
if(!in){
|
||||
|
@ -7071,6 +7164,16 @@ read_from_scanner(struct fujitsu *s, int side)
|
|||
return ret;
|
||||
}
|
||||
|
||||
/* fi-6770A gets mad if you 'read' too soon on usb, see if it is ready */
|
||||
if(!s->bytes_rx[side] && s->connection == CONNECTION_USB){
|
||||
DBG (15, "read_from_scanner: start of usb page, checking RIC\n");
|
||||
ret = scanner_control_ric(s,bytes,side);
|
||||
if(ret){
|
||||
DBG(5,"read_from_scanner: ric returning %d\n",ret);
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
inLen = bytes;
|
||||
in = malloc(inLen);
|
||||
if(!in){
|
||||
|
|
|
@ -92,8 +92,14 @@ usb 0x04c5 0x1155
|
|||
#fi-6770
|
||||
usb 0x04c5 0x1174
|
||||
|
||||
#fi-6770A
|
||||
usb 0x04c5 0x1175
|
||||
|
||||
#fi-6670
|
||||
usb 0x04c5 0x1176
|
||||
|
||||
#fi-6750
|
||||
#fi-6670A
|
||||
usb 0x04c5 0x1177
|
||||
|
||||
#fi-6750S
|
||||
usb 0x04c5 0x1178
|
||||
|
|
|
@ -139,8 +139,6 @@ struct fujitsu
|
|||
|
||||
int color_raster_offset; /* offset between r and b scan line and */
|
||||
/* between b and g scan line (0 or 4) */
|
||||
int has_bg_front; /* background color can be changed for f/r */
|
||||
int has_bg_back;
|
||||
|
||||
int duplex_raster_offset; /* offset between front and rear page when */
|
||||
/* when scanning 3091 style duplex */
|
||||
|
@ -269,7 +267,8 @@ struct fujitsu
|
|||
int has_comp_JPG3;
|
||||
|
||||
/*FIXME: more endorser data? */
|
||||
int endorser_type;
|
||||
int endorser_type_f;
|
||||
int endorser_type_b;
|
||||
|
||||
/*FIXME: barcode data? */
|
||||
|
||||
|
@ -730,6 +729,7 @@ static SANE_Status wait_scanner (struct fujitsu *s);
|
|||
static SANE_Status object_position (struct fujitsu *s, int i_load);
|
||||
|
||||
static SANE_Status scanner_control (struct fujitsu *s, int function);
|
||||
static SANE_Status scanner_control_ric (struct fujitsu *s, int bytes, int side);
|
||||
|
||||
static SANE_Status mode_select_df(struct fujitsu *s);
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
|
||||
:backend "fujitsu" ; name of backend
|
||||
:url "http://www.thebility.com/fujitsu/"
|
||||
:version "81" ; version of backend
|
||||
:version "82" ; version of backend
|
||||
:manpage "sane-fujitsu" ; name of manpage (if it exists)
|
||||
:comment "Backend updated for SANE release 1.1.0, see sane-fujitsu manpage"
|
||||
:devicetype :scanner ; start of a list of devices....
|
||||
|
@ -329,20 +329,32 @@
|
|||
:status :complete
|
||||
:comment "big, current"
|
||||
|
||||
:model "fi-6750"
|
||||
:interface "SCSI USB"
|
||||
:model "fi-6750S"
|
||||
:interface "USB"
|
||||
:status :untested
|
||||
:usbid "0x04c5" "0x1178"
|
||||
:comment "Unreleased lighter duty version of fi-6770?"
|
||||
:comment "Simplex, USB only version of fi-6770, might have usb suspend problem?"
|
||||
|
||||
:model "fi-6670"
|
||||
:interface "SCSI USB"
|
||||
:status :good
|
||||
:usbid "0x04c5" "0x1176"
|
||||
:comment "big, current, might have usb power suspend problems?"
|
||||
:comment "big, current, might have usb suspend problem?"
|
||||
|
||||
:model "fi-6670A"
|
||||
:interface "SCSI USB"
|
||||
:status :untested
|
||||
:usbid "0x04c5" "0x1177"
|
||||
:comment "big, current, with VRS CGA board, might have usb suspend problem?"
|
||||
|
||||
:model "fi-6770"
|
||||
:interface "SCSI USB"
|
||||
:status :good
|
||||
:status :untested
|
||||
:usbid "0x04c5" "0x1174"
|
||||
:comment "big, current, might have usb power suspend problems?"
|
||||
:comment "big, current, might have usb suspend problem?"
|
||||
|
||||
:model "fi-6770A"
|
||||
:interface "SCSI USB"
|
||||
:status :basic
|
||||
:usbid "0x04c5" "0x1175"
|
||||
:comment "big, current, with VRS CGA board, might have usb suspend problems?"
|
||||
|
|
Ładowanie…
Reference in New Issue