kodak6900: Update understanding of the IPP data structures
This commit is contained in:
parent
39a753e2c7
commit
19765bb5dc
|
@ -1004,9 +1004,9 @@ static int kodak6900_get_imagecorr(struct shinkos6145_ctx *ctx, uint8_t options,
|
|||
cmd.options = options;
|
||||
|
||||
cmd.rows = cpu_to_le16(rows);
|
||||
cmd.unk[0] = 0x01; // XXX no idea what these mean
|
||||
cmd.unk[0] = 0x01; // XXX request "extended" format?
|
||||
cmd.unk[1] = 0x00;
|
||||
cmd.unk[2] = 0x38;
|
||||
cmd.unk[2] = 0x38; // XXX == 56d?
|
||||
cmd.unk[3] = 0x00;
|
||||
|
||||
cmd.flags = EK6900_IMAGECORR_FLAG_UNKNOWN; // XXX make configurable? (What about S2245's "contour enahcement"?)
|
||||
|
|
|
@ -125,8 +125,9 @@ STATIC_ASSERT(sizeof(struct SIppData) == 2524);
|
|||
struct ippHeader {
|
||||
char model[16];
|
||||
char ipp[4];
|
||||
uint8_t version;
|
||||
uint8_t pad_0x15[43];
|
||||
uint16_t version;
|
||||
uint8_t serial[10]; /* null terminated */
|
||||
uint8_t pad_0x15[32];
|
||||
} __attribute__((packed));
|
||||
|
||||
STATIC_ASSERT(sizeof(struct ippHeader) == 64);
|
||||
|
@ -138,7 +139,7 @@ struct ippConf {
|
|||
uint8_t planes; // 3 or 4, can be up to 16!
|
||||
uint8_t printmode; // Corresponds to corrdata_req field 1
|
||||
uint8_t corrections1; // Corresponds to corrdata_req field 2
|
||||
uint8_t corrections2; // B0,B1,B2
|
||||
uint8_t corrections2; // b0 b1 b2 defined.
|
||||
uint8_t borderCapable; // 0x02 if we can do 5x7-on-6x8
|
||||
uint8_t pad_0xb[21];
|
||||
uint8_t planeOrder[16];
|
||||
|
@ -165,17 +166,23 @@ struct ippConfKA {
|
|||
uint8_t planes; // 3 or 4, can be up to 16!
|
||||
uint8_t printmode; // Corresponds to corrdata_req field 1
|
||||
uint8_t corrections1; // Corresponds to corrdata_req field 2
|
||||
uint8_t corrections2; // B0,B1,B2
|
||||
uint8_t borderCapable; // 0x02 if we can do 5x7-on-6x8
|
||||
uint8_t pad_0xb[21];
|
||||
uint8_t corrections2; // b0 b1 b2 defined?
|
||||
uint8_t borderCapable; // 0xc8 means what?
|
||||
uint8_t pad_0xb[3];
|
||||
uint8_t unk_0xe; // 0xbe means what??
|
||||
uint8_t pad_0xf[17];
|
||||
uint8_t planeOrder[16];
|
||||
uint8_t num_panels; /* 0x01-0x03 ? */
|
||||
uint8_t unk_0x21; /* 0x06 in IPP, 0x00 or 0x01 in cmd */
|
||||
uint16_t unk_0x22; /* 0x0032 */
|
||||
/*@30*/ uint8_t num_panels; /* 0x01-0x03 */
|
||||
uint8_t unk_0x31; /* 0x06 in IPP, 0x00 or 0x01 in cmd */
|
||||
uint16_t unk_0x32; /* 0x0032 */
|
||||
uint16_t max_panel_overlap; /* 0x0258 == 600d */
|
||||
uint16_t panel_rows[3]; /* */
|
||||
uint16_t lam_rows[3]; /* */
|
||||
uint16_t unk_0x42[31];
|
||||
uint16_t panel_rows[3]; /* panel size, or 0 if not used */
|
||||
uint16_t lam_rows[3]; /* panel size, or 0 if not used */
|
||||
uint8_t unk_0x42; // 0x00
|
||||
uint8_t unk_0x43; // 0x01 for "extended" ?
|
||||
uint16_t unk_0x44; // 0x01 for "extended enable" ?
|
||||
uint8_t extraRows; // ?
|
||||
uint8_t unk_0x45[57];
|
||||
} __attribute__((packed));
|
||||
|
||||
STATIC_ASSERT(sizeof(struct ippConfKA) == 128); /* KA6900 */
|
||||
|
@ -314,10 +321,10 @@ static bool CIppMng_CheckHeader(struct CIppMng *this, void *ippData)
|
|||
if (memcmp(this->header.ipp, ippStr, 4))
|
||||
return 0;
|
||||
if (this->ka6900) {
|
||||
if (this->header.version != 0x7)
|
||||
if (le16_to_cpu(this->header.version) != 0x7)
|
||||
return 0;
|
||||
} else {
|
||||
if (this->header.version != 0x3)
|
||||
if (le16_to_cpu(this->header.version) != 0x3)
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -354,8 +361,6 @@ static bool CIppMng_CheckConf(struct CIppMng *this, void *ippData)
|
|||
if (tmp > 1)
|
||||
return 0;
|
||||
|
||||
// XXX anything else for KA6900?
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -397,7 +402,7 @@ static bool CIppMng_SetConf(struct CIppMng *this, void *ippData,
|
|||
#endif
|
||||
if (this->ka6900) {
|
||||
this->conf.max_panel_overlap = le16_to_cpu(this->conf.max_panel_overlap);
|
||||
this->conf.unk_0x22 = le16_to_cpu(this->conf.unk_0x22); // XXX
|
||||
this->conf.unk_0x32 = le16_to_cpu(this->conf.unk_0x32); // XXX
|
||||
for (int i = 0 ; i < 3 ; i++) {
|
||||
this->conf.panel_rows[i] = le16_to_cpu(this->conf.panel_rows[i]);
|
||||
this->conf.lam_rows[i] = le16_to_cpu(this->conf.lam_rows[i]);
|
||||
|
|
Loading…
Reference in a new issue