sinfonia: More consolidation and updates:

- Consolidate media query
  - Correct EK8810 8x10 print counts
  - Consolidate 6R/5R print counts
  - Documentation updates
This commit is contained in:
Solomon Peachy 2019-09-08 21:33:30 -04:00
parent 1b90a94f8b
commit 9510016387
6 changed files with 147 additions and 211 deletions

View File

@ -48,12 +48,6 @@
#define USB_PID_KODAK_7010 0x4037
#define USB_PID_KODAK_7015 0x4038
/* List of confirmed commands */
//#define SINFONIA_CMD_GETSTATUS 0x0001
//#define SINFONIA_CMD_MEDIAINFO 0x0002
//#define SINFONIA_CMD_PRINTJOB 0x4001
//#define SINFONIA_CMD_UPDATE 0xC004
/* Media structure */
struct kodak605_media_list {
struct sinfonia_status_hdr hdr;
@ -63,7 +57,7 @@ struct kodak605_media_list {
struct sinfonia_mediainfo_item entries[];
} __attribute__((packed));
#define MAX_MEDIA_LEN 128
#define MAX_MEDIA_LEN (sizeof(struct kodak605_media_list) + sizeof(struct sinfonia_mediainfo_item) * 10)
/* Status response */
struct kodak605_status {
@ -289,30 +283,6 @@ static const char *error_codes(uint8_t major, uint8_t minor)
}
}
static int kodak605_get_media(struct kodak605_ctx *ctx, struct kodak605_media_list *media)
{
struct sinfonia_cmd_hdr cmd;
int i, ret, num = 0;
cmd.cmd = cpu_to_le16(SINFONIA_CMD_MEDIAINFO);
cmd.len = cpu_to_le16(0);
if ((ret = sinfonia_docmd(&ctx->dev,
(uint8_t*)&cmd, sizeof(cmd),
(uint8_t*)media, MAX_MEDIA_LEN,
&num))) {
return ret;
}
for (i = 0 ; i < media->count; i++) {
media->entries[i].rows = le16_to_cpu(media->entries[i].rows);
media->entries[i].columns = le16_to_cpu(media->entries[i].columns);
}
return 0;
}
static int kodak605_get_status(struct kodak605_ctx *ctx, struct kodak605_status *sts)
{
struct sinfonia_cmd_hdr cmd;
@ -363,10 +333,10 @@ static int kodak605_attach(void *vctx, struct libusb_device_handle *dev, int typ
if (test_mode < TEST_MODE_NOATTACH) {
/* Query media info */
if (kodak605_get_media(ctx, ctx->media)) {
ERROR("Can't query media\n");
return CUPS_BACKEND_FAILED;
}
int ret = sinfonia_query_media(&ctx->dev,
&ctx->media);
if (ret)
return ret;
} else {
int media_code = KODAK6_MEDIA_6TR2;
if (getenv("MEDIA_CODE"))
@ -622,20 +592,7 @@ static void kodak605_dump_status(struct kodak605_ctx *ctx, struct kodak605_statu
INFO("Head prints : %u\n", le32_to_cpu(sts->ctr_head));
INFO("Media prints : %u\n", le32_to_cpu(sts->ctr_media));
{
int max;
switch(ctx->media->type) {
case KODAK6_MEDIA_6R:
case KODAK6_MEDIA_6TR2:
max = 375;
break;
case KODAK7_MEDIA_6R:
max = 570;
break;
default:
max = 0;
break;
}
int max = kodak6_mediamax(ctx->media->type);
if (max) {
INFO("\t Remaining : %u\n", max - le32_to_cpu(sts->ctr_media));
@ -771,7 +728,7 @@ static const char *kodak605_prefixes[] = {
/* Exported */
struct dyesub_backend kodak605_backend = {
.name = "Kodak 605/70xx",
.version = "0.46" " (lib " LIBSINFONIA_VER ")",
.version = "0.47" " (lib " LIBSINFONIA_VER ")",
.uri_prefixes = kodak605_prefixes,
.cmdline_usage = kodak605_cmdline,
.cmdline_arg = kodak605_cmdline_arg,

View File

@ -324,20 +324,10 @@ static void kodak68x0_dump_status(struct kodak6800_ctx *ctx, struct kodak68x0_st
INFO("\tCutter : %u\n", be32_to_cpu(status->cutter));
if (ctx->type == P_KODAK_6850) {
int max;
int max = kodak6_mediamax(ctx->media_type);
INFO("\tMedia : %u\n", be32_to_cpu(status->media));
switch(ctx->media_type) {
case KODAK6_MEDIA_6R:
case KODAK6_MEDIA_6TR2:
max = 375;
break;
default:
max = 0;
break;
}
if (max) {
INFO("\t Remaining : %u\n", max - be32_to_cpu(status->media));
} else {
@ -1058,7 +1048,7 @@ static const char *kodak6800_prefixes[] = {
/* Exported */
struct dyesub_backend kodak6800_backend = {
.name = "Kodak 6800/6850",
.version = "0.75" " (lib " LIBSINFONIA_VER ")",
.version = "0.76" " (lib " LIBSINFONIA_VER ")",
.uri_prefixes = kodak6800_prefixes,
.cmdline_usage = kodak6800_cmdline,
.cmdline_arg = kodak6800_cmdline_arg,

View File

@ -536,14 +536,6 @@ static const char *print_ribbons (uint8_t v) {
}
}
struct s6145_mediainfo_resp {
struct sinfonia_status_hdr hdr;
uint8_t ribbon;
uint8_t reserved;
uint8_t count;
struct sinfonia_mediainfo_item items[10]; /* Not all necessarily used */
} __attribute__((packed));
struct s6145_imagecorr_resp {
struct sinfonia_status_hdr hdr;
uint16_t total_size;
@ -565,7 +557,7 @@ struct shinkos6145_ctx {
struct marker marker;
struct s6145_mediainfo_resp media;
struct sinfonia_6x45_mediainfo_resp media;
uint8_t *eeprom;
size_t eepromlen;
@ -703,11 +695,11 @@ static int get_status(struct shinkos6145_ctx *ctx)
return 0;
}
static void dump_mediainfo(struct s6145_mediainfo_resp *resp)
static void dump_mediainfo(struct sinfonia_6x45_mediainfo_resp *resp)
{
int i;
INFO("Loaded Media Type: %s\n", print_ribbons(resp->ribbon));
INFO("Loaded Media Type: %s\n", print_ribbons(resp->ribbon_code));
INFO("Supported Print Sizes: %u entries:\n", resp->count);
for (i = 0 ; i < resp->count ; i++) {
INFO(" %02d: C 0x%02x (%s), %04ux%04u, P 0x%02x (%s)\n", i,
@ -1025,38 +1017,23 @@ static int shinkos6145_attach(void *vctx, struct libusb_device_handle *dev, int
if (!ctx->jobid)
ctx->jobid++;
/* Query Media */
if (test_mode < TEST_MODE_NOATTACH) {
/* Query Media */
struct sinfonia_cmd_hdr cmd;
int num;
cmd.cmd = cpu_to_le16(SINFONIA_CMD_MEDIAINFO);
cmd.len = cpu_to_le16(0);
if (sinfonia_docmd(&ctx->dev,
(uint8_t*)&cmd, sizeof(cmd),
(uint8_t*)&ctx->media, sizeof(ctx->media),
&num)) {
return CUPS_BACKEND_FAILED;
}
/* Byteswap media descriptor.. */
int i;
for (i = 0 ; i < ctx->media.count ; i++) {
ctx->media.items[i].columns = le16_to_cpu(ctx->media.items[i].columns);
ctx->media.items[i].rows = le16_to_cpu(ctx->media.items[i].rows);
}
int ret = sinfonia_query_media(&ctx->dev,
&ctx->media);
if (ret)
return ret;
} else {
int media_code = RIBBON_6x8;
if (getenv("MEDIA_CODE"))
media_code = atoi(getenv("MEDIA_CODE"));
ctx->media.ribbon = media_code;
ctx->media.ribbon_code = media_code;
}
ctx->marker.color = "#00FFFF#FF00FF#FFFF00";
ctx->marker.name = print_ribbons(ctx->media.ribbon);
ctx->marker.levelmax = ribbon_sizes(ctx->media.ribbon);
ctx->marker.name = print_ribbons(ctx->media.ribbon_code);
ctx->marker.levelmax = ribbon_sizes(ctx->media.ribbon_code);
ctx->marker.levelnow = -2;
return CUPS_BACKEND_OK;
@ -1496,36 +1473,6 @@ printer_error:
return CUPS_BACKEND_FAILED;
}
static int shinkos6145_query_serno(struct libusb_device_handle *dev, uint8_t endp_up, uint8_t endp_down, char *buf, int buf_len)
{
struct sinfonia_cmd_hdr cmd;
struct sinfonia_getserial_resp resp;
int ret, num = 0;
struct sinfonia_usbdev sdev = {
.dev = dev,
.endp_up = endp_up,
.endp_down = endp_down,
};
cmd.cmd = cpu_to_le16(SINFONIA_CMD_GETSERIAL);
cmd.len = cpu_to_le16(0);
if ((ret = sinfonia_docmd(&sdev,
(uint8_t*)&cmd, sizeof(cmd),
(uint8_t*)&resp, sizeof(resp),
&num)) < 0) {
return ret;
}
/* Copy and Null-terminate */
num = (buf_len > (int)sizeof(resp.data)) ? (int)sizeof(resp.data) : (buf_len - 1);
memcpy(buf, resp.data, num);
buf[num] = 0;
return CUPS_BACKEND_OK;
}
static int shinkos6145_query_markers(void *vctx, struct marker **markers, int *count)
{
struct shinkos6145_ctx *ctx = vctx;
@ -1574,7 +1521,7 @@ static const char *shinkos6145_prefixes[] = {
struct dyesub_backend shinkos6145_backend = {
.name = "Shinko/Sinfonia CHC-S6145/CS2/S2245/S3",
.version = "0.40" " (lib " LIBSINFONIA_VER ")",
.version = "0.41" " (lib " LIBSINFONIA_VER ")",
.uri_prefixes = shinkos6145_prefixes,
.cmdline_usage = shinkos6145_cmdline,
.cmdline_arg = shinkos6145_cmdline_arg,
@ -1584,7 +1531,7 @@ struct dyesub_backend shinkos6145_backend = {
.cleanup_job = sinfonia_cleanup_job,
.read_parse = shinkos6145_read_parse,
.main_loop = shinkos6145_main_loop,
.query_serno = shinkos6145_query_serno,
.query_serno = sinfonia_query_serno,
.query_markers = shinkos6145_query_markers,
.devices = {
{ USB_VID_SHINKO, USB_PID_SHINKO_S6145, P_SHINKO_S6145, NULL, "sinfonia-chcs6145"},

View File

@ -566,20 +566,12 @@ struct s6245_geteeprom_resp {
uint8_t data[256];
} __attribute__((packed));
struct s6245_mediainfo_resp {
struct sinfonia_status_hdr hdr;
uint8_t ribbon_code;
uint8_t reserved;
uint8_t count;
struct sinfonia_mediainfo_item items[10]; /* Not all necessarily used */
} __attribute__((packed));
#define RIBBON_NONE 0x00
#define RIBBON_8x10 0x11
#define RIBBON_8x12 0x12
#define RIBBON_8x10K 0x03 /* XXX GUESS - EK8810 */
#define RIBBON_8x12K 0x04 /* EK8810 */
#define RIBBON_8x10K 0x03 /* XXX GUESS - EK8810 (129-4966/109-9787) */
#define RIBBON_8x12K 0x04 /* EK8810 (127-7268/115-6413 or equiv) */
static const char *ribbon_sizes (uint8_t v) {
switch (v) {
@ -603,7 +595,7 @@ static int ribbon_counts (uint8_t v) {
case RIBBON_8x12:
return 100;
case RIBBON_8x10K:
return 250;
return 300;
case RIBBON_8x12K:
return 250;
default:
@ -651,7 +643,7 @@ struct shinkos6245_ctx {
struct marker marker;
struct s6245_mediainfo_resp media;
struct sinfonia_6x45_mediainfo_resp media;
};
#define CMDBUF_LEN sizeof(struct s6245_print_cmd)
@ -774,7 +766,7 @@ static int get_errorlog(struct shinkos6245_ctx *ctx)
return 0;
}
static void dump_mediainfo(struct s6245_mediainfo_resp *resp)
static void dump_mediainfo(struct sinfonia_6x45_mediainfo_resp *resp)
{
int i;
@ -906,8 +898,6 @@ static int shinkos6245_attach(void *vctx, struct libusb_device_handle *dev, int
{
struct shinkos6245_ctx *ctx = vctx;
int num;
ctx->dev.dev = dev;
ctx->dev.endp_up = endp_up;
ctx->dev.endp_down = endp_down;
@ -925,24 +915,10 @@ static int shinkos6245_attach(void *vctx, struct libusb_device_handle *dev, int
/* Query Media */
if (test_mode < TEST_MODE_NOATTACH) {
struct sinfonia_cmd_hdr cmd;
cmd.cmd = cpu_to_le16(SINFONIA_CMD_MEDIAINFO);
cmd.len = cpu_to_le16(0);
if (sinfonia_docmd(&ctx->dev,
(uint8_t*)&cmd, sizeof(cmd),
(uint8_t*)&ctx->media, sizeof(ctx->media),
&num)) {
return CUPS_BACKEND_FAILED;
}
/* Byteswap media descriptor.. */
int i;
for (i = 0 ; i < ctx->media.count ; i++) {
ctx->media.items[i].columns = le16_to_cpu(ctx->media.items[i].columns);
ctx->media.items[i].rows = le16_to_cpu(ctx->media.items[i].rows);
}
int ret = sinfonia_query_media(&ctx->dev,
&ctx->media);
if (ret)
return ret;
} else {
int media_code = RIBBON_8x12;
if (getenv("MEDIA_CODE"))
@ -1035,7 +1011,7 @@ static int shinkos6245_main_loop(void *vctx, const void *vjob) {
}
// XXX what about mcut |= PRINT_METHOD_DISABLE_ERR;
#if 0
#if 0 /* Doesn't work on EK8810. Not sure about S6245 */
int i;
/* Validate print sizes */
for (i = 0; i < ctx->media.count ; i++) {
@ -1164,7 +1140,7 @@ top:
print->rows = print->rows2 = cpu_to_le16(job->jp.rows);
print->mode = job->jp.oc_mode;
print->method = job->jp.method;
print->reserved2 = job->jp.media;
// print->reserved2 = job->jp.media; /* Ignored */
if ((ret = sinfonia_docmd(&ctx->dev,
cmdbuf, sizeof(*print),
@ -1224,36 +1200,6 @@ fail:
return CUPS_BACKEND_FAILED;
}
static int shinkos6245_query_serno(struct libusb_device_handle *dev, uint8_t endp_up, uint8_t endp_down, char *buf, int buf_len)
{
struct sinfonia_cmd_hdr cmd;
struct sinfonia_getserial_resp resp;
int ret, num = 0;
struct sinfonia_usbdev sdev = {
.dev = dev,
.endp_up = endp_up,
.endp_down = endp_down,
};
cmd.cmd = cpu_to_le16(SINFONIA_CMD_GETSERIAL);
cmd.len = cpu_to_le16(0);
if ((ret = sinfonia_docmd(&sdev,
(uint8_t*)&cmd, sizeof(cmd),
(uint8_t*)&resp, sizeof(resp),
&num)) < 0) {
return ret;
}
/* Copy and Null-terminate */
num = (buf_len > (int)sizeof(resp.data)) ? (int)sizeof(resp.data) : (buf_len - 1);
memcpy(buf, resp.data, num);
buf[num] = 0;
return CUPS_BACKEND_OK;
}
static int shinkos6245_query_markers(void *vctx, struct marker **markers, int *count)
{
struct shinkos6245_ctx *ctx = vctx;
@ -1299,7 +1245,7 @@ static const char *shinkos6245_prefixes[] = {
struct dyesub_backend shinkos6245_backend = {
.name = "Sinfonia CHC-S6245 / Kodak 8810",
.version = "0.24" " (lib " LIBSINFONIA_VER ")",
.version = "0.25" " (lib " LIBSINFONIA_VER ")",
.uri_prefixes = shinkos6245_prefixes,
.cmdline_usage = shinkos6245_cmdline,
.cmdline_arg = shinkos6245_cmdline_arg,
@ -1308,7 +1254,7 @@ struct dyesub_backend shinkos6245_backend = {
.cleanup_job = sinfonia_cleanup_job,
.read_parse = shinkos6245_read_parse,
.main_loop = shinkos6245_main_loop,
.query_serno = shinkos6245_query_serno,
.query_serno = sinfonia_query_serno,
.query_markers = shinkos6245_query_markers,
.devices = {
{ USB_VID_SHINKO, USB_PID_SHINKO_S6245, P_SHINKO_S6245, NULL, "shinfonia-chcs6245"},

View File

@ -166,7 +166,7 @@ int sinfonia_raw10_read_parse(int data_fd, struct sinfonia_printjob *job)
return CUPS_BACKEND_CANCEL;
}
/* Validate header */
if (le16_to_cpu(hdr.hdr.cmd) != 0x4001 ||
if (le16_to_cpu(hdr.hdr.cmd) != SINFONIA_CMD_PRINTJOB ||
le16_to_cpu(hdr.hdr.len) != 10) {
ERROR("Unrecognized data format!\n");
return CUPS_BACKEND_CANCEL;
@ -683,6 +683,63 @@ done:
return ret;
}
int sinfonia_query_media(struct sinfonia_usbdev *dev,
void *resp)
{
struct sinfonia_cmd_hdr cmd;
int i, num;
struct sinfonia_6x45_mediainfo_resp *media = resp;
cmd.cmd = cpu_to_le16(SINFONIA_CMD_MEDIAINFO);
cmd.len = cpu_to_le16(0);
if (sinfonia_docmd(dev,
(uint8_t*)&cmd, sizeof(cmd),
(uint8_t*)media, sizeof(*media),
&num)) {
return CUPS_BACKEND_FAILED;
}
/* Byteswap media descriptor.. */
for (i = 0 ; i < media->count ; i++) {
media->items[i].columns = le16_to_cpu(media->items[i].columns);
media->items[i].rows = le16_to_cpu(media->items[i].rows);
}
return CUPS_BACKEND_OK;
}
int sinfonia_query_serno(struct libusb_device_handle *dev, uint8_t endp_up, uint8_t endp_down, char *buf, int buf_len)
{
struct sinfonia_cmd_hdr cmd;
struct sinfonia_getserial_resp resp;
int ret, num = 0;
struct sinfonia_usbdev sdev = {
.dev = dev,
.endp_up = endp_up,
.endp_down = endp_down,
};
cmd.cmd = cpu_to_le16(SINFONIA_CMD_GETSERIAL);
cmd.len = cpu_to_le16(0);
if ((ret = sinfonia_docmd(&sdev,
(uint8_t*)&cmd, sizeof(cmd),
(uint8_t*)&resp, sizeof(resp),
&num)) < 0) {
return ret;
}
/* Copy and Null-terminate */
num = (buf_len > (int)sizeof(resp.data)) ? (int)sizeof(resp.data) : (buf_len - 1);
memcpy(buf, resp.data, num);
buf[num] = 0;
return CUPS_BACKEND_OK;
}
const char *sinfonia_update_targets (uint8_t v) {
switch (v) {
case UPDATE_TARGET_USER:
@ -989,15 +1046,36 @@ const char *kodak6_mediatypes(int type)
return "Unknown";
}
int kodak6_mediamax(int type)
{
switch(type) {
case KODAK6_MEDIA_5R:
case KODAK6_MEDIA_6R:
case KODAK6_MEDIA_6TR2:
return 375;
case KODAK7_MEDIA_5R:
case KODAK7_MEDIA_6R:
return 570;
default:
return 0;
}
}
void kodak6_dumpmediacommon(int type)
{
switch (type) {
case KODAK6_MEDIA_5R:
INFO("Media type: 5R (Kodak 189-9160 or equivalent)\n");
break;
case KODAK6_MEDIA_6R:
INFO("Media type: 6R (Kodak 197-4096 or equivalent)\n");
break;
case KODAK6_MEDIA_6TR2:
INFO("Media type: 6R (Kodak 396-2941 or equivalent)\n");
break;
case KODAK7_MEDIA_5R:
INFO("Media type: 5R (Kodak 164-9011 or equivalent)\n");
break;
case KODAK7_MEDIA_6R:
INFO("Media type: 6R (Kodak 659-9047 or equivalent)\n");
break;

View File

@ -27,7 +27,7 @@
*
*/
#define LIBSINFONIA_VER "0.08"
#define LIBSINFONIA_VER "0.09"
#define SINFONIA_HDR1_LEN 0x10
#define SINFONIA_HDR2_LEN 0x64
@ -90,6 +90,8 @@ int sinfonia_resetcurve(struct sinfonia_usbdev *usbh, int target, int id);
int sinfonia_gettonecurve(struct sinfonia_usbdev *usbh, int type, char *fname);
int sinfonia_settonecurve(struct sinfonia_usbdev *usbh, int target, char *fname);
int sinfonia_query_serno(struct libusb_device_handle *dev, uint8_t endp_up, uint8_t endp_down, char *buf, int buf_len);
#define BANK_STATUS_FREE 0x00
#define BANK_STATUS_XFER 0x01
#define BANK_STATUS_FULL 0x02
@ -214,6 +216,19 @@ struct sinfonia_mediainfo_item {
uint8_t reserved[2];
} __attribute__((packed));
struct sinfonia_6x45_mediainfo_resp {
struct sinfonia_status_hdr hdr;
uint8_t ribbon_code;
uint8_t reserved;
uint8_t count;
struct sinfonia_mediainfo_item items[10]; /* Not all necessarily used */
} __attribute__((packed));
/* resp needs to be at least sizeof(struct sinfonia_6x45_mediainfo_resp) */
int sinfonia_query_media(struct sinfonia_usbdev *usbh,
void *resp);
struct sinfonia_setparam_cmd {
struct sinfonia_cmd_hdr hdr;
uint8_t target;
@ -404,52 +419,55 @@ const char *sinfonia_status_str(uint8_t v);
#define SINFONIA_CMD_GETSTATUS 0x0001
#define SINFONIA_CMD_MEDIAINFO 0x0002
#define SINFONIA_CMD_MODELNAME 0x0003 // 2145 only
#define SINFONIA_CMD_MODELNAME 0x0003 // 2145
#define SINFONIA_CMD_ERRORLOG 0x0004
#define SINFONIA_CMD_GETPARAM 0x0005 // !2145
#define SINFONIA_CMD_GETSERIAL 0x0006 // !2145
#define SINFONIA_CMD_PRINTSTAT 0x0007 // !2145
#define SINFONIA_CMD_EXTCOUNTER 0x0008 // !2145
#define SINFONIA_CMD_MEMORYBANK 0x000A // Brava 21 only?
#define SINFONIA_CMD_MEMORYBANK 0x000A // 6145
#define SINFONIA_CMD_PRINTJOB 0x4001
#define SINFONIA_CMD_CANCELJOB 0x4002
#define SINFONIA_CMD_FLASHLED 0x4003
#define SINFONIA_CMD_RESET 0x4004
#define SINFONIA_CMD_READTONE 0x4005
#define SINFONIA_CMD_BUTTON 0x4006 // 2145 only
#define SINFONIA_CMD_SETPARAM 0x4007
#define SINFONIA_CMD_BUTTON 0x4006 // 2145
#define SINFONIA_CMD_SETPARAM 0x4007 // !2145
#define SINFONIA_CMD_UNKNOWN 0x4008 // EK8810, panorama status?
#define SINFONIA_CMD_UNKNOWN 0x4008 // 8810 only, panorama status?
#define SINFONIA_CMD_UNKNOWN2 0x400C // 8810 only, panorama setup?
#define SINFONIA_CMD_UNKNOWN2 0x400C // EK8810, panorama setup?
#define SINFONIA_CMD_GETCORR 0x400D // 6145/2245
#define SINFONIA_CMD_GETEEPROM 0x400E // 6x45
#define SINFONIA_CMD_SETEEPROM 0x400F // 6x45
#define SINFONIA_CMD_GETUNIQUE 0x8003 // 2145 only
#define SINFONIA_CMD_SETTIME 0x4011 // 6245
#define SINFONIA_CMD_GETCORR 0x400D
#define SINFONIA_CMD_GETEEPROM 0x400E
#define SINFONIA_CMD_SETEEPROM 0x400F
#define SINFONIA_CMD_SETTIME 0x4011 // 6245 only
#define SINFONIA_CMD_GETUNIQUE 0x8003 // 2145
#define SINFONIA_CMD_DIAGNOSTIC 0xC001 // ??
#define SINFONIA_CMD_FWINFO 0xC003
#define SINFONIA_CMD_UPDATE 0xC004
#define SINFONIA_CMD_SETUNIQUE 0xC007 // 2145 only
#define SINFONIA_CMD_SETUNIQUE 0xC007 // 2145
const char *sinfonia_cmd_names(uint16_t v);
//#define KODAK6_MEDIA_5R // 189-9160
#define KODAK6_MEDIA_5R 0xff //XX 189-9160
#define KODAK6_MEDIA_6R 0x0b // 197-4096 [ Also: 101-0867, 141-9597, 659-9054, 169-6418, DNP-900-060 ]
#define KODAK6_MEDIA_UNK 0x03 // ??? reported but unknown
#define KODAK6_MEDIA_6TR2 0x2c // 396-2941
//#define KODAK6_MEDIA_5FR2 // 6900-compatible
//#define KODAK6_MEDIA_6FR2 // 6900-compatible, 102-5925
#define KODAK6_MEDIA_NONE 0x00
//#define KODAK7_MEDIA_5R // 164-9011 137-0600
#define KODAK7_MEDIA_5R 0xfe //XX 164-9011 137-0600
#define KODAK7_MEDIA_6R 0x29 // 659-9047 166-1925 396-2966 846-2004 103-7688 DNP-900-070 -- ALSO FUJI R68-D2P570 16578944
//#define KODAK7_MEDIA_6TA2
//#define KODAK7_MEDIA_5TA2
int kodak6_mediamax(int type);
const char *kodak6_mediatypes(int type);
void kodak6_dumpmediacommon(int type);