kopia lustrzana https://gitlab.com/sane-project/backends
				
				
				
			rename ext* to adftpu*
							rodzic
							
								
									15bdce9211
								
							
						
					
					
						commit
						53c87a381e
					
				|  | @ -410,10 +410,10 @@ create_mode_list (pixma_sane_t * ss, SANE_Bool tpu) | |||
|  * ext = 0: min = 75 dpi; max = cfg->xdpi | ||||
|  * ext = 1: use settings for ADF/TPU | ||||
|  *          overrides hires | ||||
|  *          cfg->ext_min_dpi and cfg->ext_max_dpi not set: min = 75 dpi; max = cfg->xdpi | ||||
|  *          only cfg->ext_min_dpi set: min = cfg->ext_min_dpi; max = cfg->xdpi | ||||
|  *          only cfg->ext_max_dpi set: min = 75 dpi; max = cfg->ext_max_dpi | ||||
|  *          both cfg->ext_min_dpi and cfg->ext_max_dpi set: min = cfg->ext_min_dpi; cfg->ext_max_dpi | ||||
|  *          cfg->adftpu_min_dpi and cfg->adftpu_max_dpi not set: min = 75 dpi; max = cfg->xdpi | ||||
|  *          only cfg->adftpu_min_dpi set: min = cfg->adftpu_min_dpi; max = cfg->xdpi | ||||
|  *          only cfg->adftpu_max_dpi set: min = 75 dpi; max = cfg->adftpu_max_dpi | ||||
|  *          both cfg->adftpu_min_dpi and cfg->adftpu_max_dpi set: min = cfg->adftpu_min_dpi; cfg->adftpu_max_dpi | ||||
|  * hires = 0: normal usage | ||||
|  * hires = 1: min = 150 dpi; max = use calculation from ext */ | ||||
| static void | ||||
|  | @ -428,14 +428,14 @@ create_dpi_list (pixma_sane_t * ss, SANE_Bool ext, SANE_Bool hires) | |||
|   /* set j for min. dpi
 | ||||
|    *  75 dpi: j = 0 | ||||
|    * 150 dpi: j = 1 \ | ||||
|    * 300 dpi: j = 2 |--> from cfg->ext_min_dpi for ADF/TPU | ||||
|    * 300 dpi: j = 2 |--> from cfg->adftpu_min_dpi for ADF/TPU | ||||
|    * ...            / | ||||
|    * */ | ||||
|   j = (hires ? 1 : 0); | ||||
|   if (ext && cfg->ext_min_dpi) | ||||
|   if (ext && cfg->adftpu_min_dpi) | ||||
|     { | ||||
|       j = -1; | ||||
|       min_dpi = cfg->ext_min_dpi / 75; | ||||
|       min_dpi = cfg->adftpu_min_dpi / 75; | ||||
|       do | ||||
|         { | ||||
|           j++; | ||||
|  | @ -446,15 +446,15 @@ create_dpi_list (pixma_sane_t * ss, SANE_Bool ext, SANE_Bool hires) | |||
| 
 | ||||
|   /* create dpi_list
 | ||||
|    * use j for min. dpi | ||||
|    * max. dpi is cfg->xdpi or cfg->ext_max_dpi for ADF/TPU */ | ||||
|    * max. dpi is cfg->xdpi or cfg->adftpu_max_dpi for ADF/TPU */ | ||||
|   i = 0; | ||||
|   do | ||||
|     { | ||||
|       i++; j++; | ||||
|       ss->dpi_list[i] = 75 * (1 << (j - 1));    /* 75 x 2^(j-1) */ | ||||
|     } | ||||
|   while ((unsigned) ss->dpi_list[i] != ((ext && cfg->ext_max_dpi) ? cfg->ext_max_dpi | ||||
|                                                                   : cfg->xdpi)); | ||||
|   while ((unsigned) ss->dpi_list[i] != ((ext && cfg->adftpu_max_dpi) ? cfg->adftpu_max_dpi | ||||
|                                                                        : cfg->xdpi)); | ||||
|   ss->dpi_list[0] = i; | ||||
| } | ||||
| 
 | ||||
|  |  | |||
|  | @ -347,10 +347,10 @@ struct pixma_config_t | |||
|   const pixma_scan_ops_t *ops;	  /**< Subdriver ops */ | ||||
|   unsigned xdpi;	     /**< Maximum horizontal resolution[DPI] */ | ||||
|   unsigned ydpi;	     /**< Maximum vertical resolution[DPI] */ | ||||
|   unsigned ext_min_dpi;    /**< Maximum horizontal resolution[DPI] for tpu/adf
 | ||||
|                              *  only needed if ADF/TPU has another min. dpi value than 75 dpi */ | ||||
|   unsigned ext_max_dpi;    /**< Maximum vertical resolution[DPI] for tpu/adf
 | ||||
|                              *  only needed if ADF/TPU has another max. dpi value than xdpi */ | ||||
|   unsigned adftpu_min_dpi;    /**< Maximum horizontal resolution[DPI] for adf/tpu
 | ||||
|                                  *  only needed if ADF/TPU has another min. dpi value than 75 dpi */ | ||||
|   unsigned adftpu_max_dpi;    /**< Maximum vertical resolution[DPI] for adf/tpu
 | ||||
|                                  *  only needed if ADF/TPU has another max. dpi value than xdpi */ | ||||
|   unsigned width;	     /**< Maximum width of scannable area in pixels at 75DPI */ | ||||
|   unsigned height;	   /**< Maximum height of scannable area in pixels at 75DPI */ | ||||
|   unsigned cap;		     /**< Capability bitfield \see PIXMA_CAP_* */ | ||||
|  |  | |||
|  | @ -1004,10 +1004,10 @@ pixma_check_scan_param (pixma_t * s, pixma_scan_param_t * sp) | |||
|     return PIXMA_EINVAL; | ||||
| 
 | ||||
|   /* flatbed: use s->cfg->xdpi
 | ||||
|    * TPU/ADF: use s->cfg->ext_max_dpi, if configured with dpi value */ | ||||
|    * TPU/ADF: use s->cfg->adftpu_max_dpi, if configured with dpi value */ | ||||
|   cfg_xdpi = ((sp->source == PIXMA_SOURCE_FLATBED | ||||
|                || s->cfg->ext_max_dpi == 0) ? s->cfg->xdpi | ||||
|                                             : s->cfg->ext_max_dpi); | ||||
|                || s->cfg->adftpu_max_dpi == 0) ? s->cfg->xdpi | ||||
|                                                : s->cfg->adftpu_max_dpi); | ||||
| 
 | ||||
|   if (pixma_check_dpi (sp->xdpi, cfg_xdpi) < 0 || | ||||
|       pixma_check_dpi (sp->ydpi, s->cfg->ydpi) < 0) | ||||
|  |  | |||
|  | @ -744,7 +744,7 @@ static const pixma_scan_ops_t pixma_iclass_ops = { | |||
|             1,                        /* iface */		\ | ||||
|             &pixma_iclass_ops,        /* ops */		\ | ||||
|             dpi, dpi,                 /* xdpi, ydpi */	\ | ||||
|             0, 0,                     /* ext_min_dpi & ext_max_dpi not used in this subdriver */ \ | ||||
|             0, 0,                     /* adftpu_min_dpi & adftpu_max_dpi not used in this subdriver */ \ | ||||
|             w, h,                     /* width, height */	\ | ||||
|             PIXMA_CAP_GRAY|PIXMA_CAP_EVENTS|cap             \ | ||||
| } | ||||
|  |  | |||
|  | @ -1595,14 +1595,14 @@ static const pixma_scan_ops_t pixma_mp150_ops = { | |||
|   mp150_get_status | ||||
| }; | ||||
| 
 | ||||
| #define DEVICE(name, model, pid, dpi, ext_min_dpi, ext_max_dpi, w, h, cap) { \ | ||||
| #define DEVICE(name, model, pid, dpi, adftpu_min_dpi, adftpu_max_dpi, w, h, cap) { \ | ||||
|         name,              /* name */               \ | ||||
|         model,             /* model */              \ | ||||
|         CANON_VID, pid,    /* vid pid */            \ | ||||
|         0,                 /* iface */              \ | ||||
|         &pixma_mp150_ops,  /* ops */                \ | ||||
|         dpi, 2*(dpi),      /* xdpi, ydpi */         \ | ||||
|         ext_min_dpi, ext_max_dpi,   /* ext_min_dpi, ext_max_dpi */ \ | ||||
|         adftpu_min_dpi, adftpu_max_dpi,         /* adftpu_min_dpi, adftpu_max_dpi */ \ | ||||
|         w, h,              /* width, height */      \ | ||||
|         PIXMA_CAP_EASY_RGB|                         \ | ||||
|         PIXMA_CAP_GRAY|    /* CIS with native grayscale and CCD with software grayscale */ \ | ||||
|  |  | |||
|  | @ -793,7 +793,7 @@ static const pixma_scan_ops_t pixma_mp730_ops = { | |||
|   mp730_get_status | ||||
| }; | ||||
| 
 | ||||
| /* TODO: implement ext_min_dpi & ext_max_dpi for grayscale & lineart */ | ||||
| /* TODO: implement adftpu_min_dpi & adftpu_max_dpi for grayscale & lineart */ | ||||
| #define DEVICE(name, model, pid, dpi, w, h, cap) {           \ | ||||
|               name,              /* name */           \ | ||||
|               model,             /* model */		      \ | ||||
|  | @ -801,7 +801,7 @@ static const pixma_scan_ops_t pixma_mp730_ops = { | |||
|               1,                 /* iface */		      \ | ||||
|               &pixma_mp730_ops,  /* ops */            \ | ||||
|               dpi, dpi,          /* xdpi, ydpi */	    \ | ||||
|               0, 0,              /* ext_min_dpi & ext_max_dpi not used in this subdriver */ \ | ||||
|               0, 0,              /* adftpu_min_dpi & adftpu_max_dpi not used in this subdriver */ \ | ||||
|               w, h,              /* width, height */	\ | ||||
|         PIXMA_CAP_GRAY|PIXMA_CAP_EVENTS|cap           \ | ||||
| } | ||||
|  |  | |||
|  | @ -956,7 +956,7 @@ static const pixma_scan_ops_t pixma_mp750_ops = { | |||
| 	0,                     /* iface */		\ | ||||
| 	&pixma_mp750_ops,      /* ops */		\ | ||||
| 	dpi, 2*(dpi),          /* xdpi, ydpi */		\ | ||||
|         0, 0,                  /* ext_min_dpi & ext_max_dpi not used in this subdriver */ \ | ||||
|         0, 0,                  /* adftpu_min_dpi & adftpu_max_dpi not used in this subdriver */ \ | ||||
| 	637, 877,              /* width, height */	\ | ||||
|         PIXMA_CAP_GRAY|PIXMA_CAP_EVENTS|cap             \ | ||||
| } | ||||
|  |  | |||
|  | @ -2184,14 +2184,14 @@ static const pixma_scan_ops_t pixma_mp810_ops = | |||
|   mp810_get_status | ||||
| }; | ||||
| 
 | ||||
| #define DEVICE(name, model, pid, dpi, ext_min_dpi, ext_max_dpi, w, h, cap) { \ | ||||
| #define DEVICE(name, model, pid, dpi, adftpu_min_dpi, adftpu_max_dpi, w, h, cap) { \ | ||||
|         name,              /* name */               \ | ||||
|         model,             /* model */              \ | ||||
|         CANON_VID, pid,    /* vid pid */            \ | ||||
|         0,                 /* iface */              \ | ||||
|         &pixma_mp810_ops,  /* ops */                \ | ||||
|         dpi, 2*(dpi),      /* xdpi, ydpi */         \ | ||||
|         ext_min_dpi, ext_max_dpi,  /* ext_min_dpi, ext_max_dpi */ \ | ||||
|         adftpu_min_dpi, adftpu_max_dpi,  /* adftpu_min_dpi, adftpu_max_dpi */ \ | ||||
|         w, h,              /* width, height */      \ | ||||
|         PIXMA_CAP_EASY_RGB|                         \ | ||||
|         PIXMA_CAP_GRAY|    /* all scanners with software grayscale */ \ | ||||
|  |  | |||
		Ładowanie…
	
		Reference in New Issue
	
	 Rolf Bensch
						Rolf Bensch