Shared functions by all SPL2 drivers.
More...
- Copyright
- GNU General Public License 2 or later
- Author
- Jürgen Borleis
- Warning
- Use as experimental
◆ spl2_driver_module_init()
int spl2_driver_module_init |
( |
struct caps_drv * |
drvi, |
|
|
void * |
d |
|
) |
| |
◆ spl2_driver_module_exit()
int spl2_driver_module_exit |
( |
struct caps_drv * |
drvi, |
|
|
void * |
d |
|
) |
| |
- Note
- Called before termination to clean up memory use
◆ par_threads_autodetection()
static unsigned par_threads_autodetection |
( |
unsigned |
tcnt | ) |
|
|
static |
Autodetect the amount of available CPU cores and adapt the user's setting on demand
- Parameters
-
[in] | tcnt | Thread count from the user's setting (can be '0' for autodetection) |
- Returns
- Amount of additional threads to process bands in parallel
It returns always an amount of additional threads. Additional means relative to the main worker thread. This is implementation specific regarding to the index worker helper.
For a single core CPU it behaves differently: for this case always one additional thread is used.
- Todo:
- move to libcapsdriver!
◆ drv_spl2_par_threads_get()
unsigned drv_spl2_par_threads_get |
( |
struct caps_drv * |
drvi | ) |
|
Get the amount of additional thread to be used to process indepenent bands
- Parameters
-
[in] | drvi | The printer instance info |
- Return values
-
Positive | Amount of additional threads to use for processing (can be 0) |
Since it makes no sense to run more threads than CPU cores are available, limit the number of threads to use here. The calculation is:
- one thread for the main worker's loop
- n additional threads up to the available CPU cores
- Note
- If 'threads' is set to '0', an autodetection is done
-
If 'threads' isn't set at all, the amount of additional threads is '1'
-
If 'threads' has an invalid setting, the amount of additional threads is '1'
@TODO in libcapsdriver! Generisch. Mit Doku, wie es pro Drucker zu überschreiben ist.
◆ spl2_driver_runtime_adaptions()
int spl2_driver_runtime_adaptions |
( |
struct caps_drv * |
drvi, |
|
|
void * |
d |
|
) |
| |
◆ spl2_driver_handle_nls()
static void spl2_driver_handle_nls |
( |
void |
| ) |
|
|
static |
◆ main()
int main |
( |
int |
argc, |
|
|
char * |
argv[] |
|
) |
| |
◆ spl2_driver_page_setup()
int spl2_driver_page_setup |
( |
struct caps_drv * |
drvi, |
|
|
void * |
d |
|
) |
| |
◆ spl2_driver_job_finish()
int spl2_driver_job_finish |
( |
struct caps_drv * |
drvi, |
|
|
void * |
d |
|
) |
| |
◆ spl2_driver_job_setup()
int spl2_driver_job_setup |
( |
struct caps_drv * |
drvi, |
|
|
void * |
d |
|
) |
| |
◆ spl2_driver_page_print()
int spl2_driver_page_print |
( |
struct caps_drv * |
drvi, |
|
|
void * |
d |
|
) |
| |
◆ spl2_driver_device_monitor()
int spl2_driver_device_monitor |
( |
struct caps_drv * |
drvi, |
|
|
void * |
d |
|
) |
| |
◆ supported_printers
Initial value:= {
{ .printer_name = NULL, },
}
@ CAPS_SPL2_ML_1640
Definition: samsung-spl2-series.h:92
@ CAPS_SPL2_ML_2240
Definition: samsung-spl2-series.h:95
@ CAPS_SPL2_ML_1520
Definition: samsung-spl2-series.h:90
◆ caps_spl2_driver