kodak69xx: Add in panorma detection and splitting. (Untested)

Much like the EK8810, I still don't know what exactly is needed to tell
the printer to do the fancy panorama handling.  That should change within
a couple of weeks.
This commit is contained in:
Solomon Peachy 2024-08-17 09:21:30 -04:00
parent 4ea3205b87
commit c95564b0dd
2 changed files with 33 additions and 3 deletions

View file

@ -1339,7 +1339,7 @@ static int shinkos6145_read_parse(void *vctx, const void **vjob, int data_fd, in
return ret;
}
/* Use whicever copy count is larger */
/* Use whichever copy count is larger */
if (job->common.copies < copies)
job->common.copies = copies;
@ -1358,6 +1358,36 @@ static int shinkos6145_read_parse(void *vctx, const void **vjob, int data_fd, in
job->common.can_combine = 1;
}
/* Panorama split */
if (ctx->is_2245 && job->jp.rows > 2436) {
if (job->common.copies > 1) {
WARNING("Multiple copies of panorama prints is not supported!\n");
job->common.copies = 1;
}
if (job->jp.media) {
ERROR("Don't support multi-cut with panorama!\n");
sinfonia_cleanup_job(job);
return CUPS_BACKEND_CANCEL;
}
int rval;
int maxrows;
if (job->jp.rows == 1548)
maxrows = 2140;
else
maxrows = 2436;
rval = sinfonia_panorama_splitjob(job, maxrows,
(struct sinfonia_printjob**)vjob);
/* Unconditionally clean up original job regardless */
sinfonia_cleanup_job(job);
return rval;
}
/* Extended spool format to re-purpose an unused header field.
When bit 0 is set, this tells the backend that the data is
already in planar YMC format (vs packed RGB) so we don't need
@ -1969,7 +1999,7 @@ static const struct device_id shinkos6145_devices[] = {
const struct dyesub_backend shinkos6145_backend = {
.name = "Shinko/Sinfonia CHC-S6145/CS2/S2245/S3",
.version = "0.50" " (lib " LIBSINFONIA_VER ")",
.version = "0.51" " (lib " LIBSINFONIA_VER ")",
.uri_prefixes = shinkos6145_prefixes,
.devices = shinkos6145_devices,
.cmdline_usage = shinkos6145_cmdline,

View file

@ -570,7 +570,7 @@ struct sinfonia_printcmd28_hdr {
uint8_t media; /* always 0 on S2245 */
uint8_t reserved[7];
uint8_t options;
uint8_t method;
uint8_t method; /* Always 0 on EK69xx */
uint8_t ipp;
uint8_t reserved2[10];
} __attribute__((packed));