Skip to content
Snippets Groups Projects
Commit ed127710 authored by Mans Rullgard's avatar Mans Rullgard
Browse files

mqascan: print more details for datasync packet

parent 01f481d8
No related branches found
No related tags found
No related merge requests found
......@@ -108,7 +108,7 @@ static const struct bitfield datasync_fields[] = {
{ 1, 0, "unknown_2" },
{ 2, 0, "pad" },
{ 8, BF_HEX, "mqa_level" },
{ 7, BF_RET, "items" },
{ 7, BF_RET, "item_count" },
{ 0 }
};
......@@ -116,6 +116,8 @@ static int handle_datasync(struct bitreader *b, unsigned ptype)
{
uint64_t val[2];
int stream_pos_flag;
unsigned pos = 0;
int offs;
int n;
int size[128];
int type[128];
......@@ -138,18 +140,44 @@ static int handle_datasync(struct bitreader *b, unsigned ptype)
print_verbose(1, "%10s[type %d]\n", "", type[i]);
switch (type[i]) {
case 0:
print_field(b, 2, 0, "unknown_3", NULL);
print_field(b, 4, 0, "unknown_4", NULL);
print_field(b, 2, 0, "stage2_dither", NULL);
print_field(b, 4, 0, "gain_index", NULL);
print_field(b, 7, 0, "unknown_5", NULL);
print_field(b, 7, 0, "unknown_6", NULL);
if (stream_pos_flag) {
print_field(b, 27, BF_HEX, "start_offset",
NULL);
pos = print_field(b, 27, BF_HEX | BF_NONL,
"start_pos", NULL);
pos <<= 5;
print_verbose(1, " [0x%x]\n", pos);
print_field(b, 1, 0, "pad", NULL);
print_data(b, size[i] - 48, BF_HEX, "data",
NULL);
}
break;
case 1:
print_field(b, 6, 0, "unknown_7", NULL);
print_field(b, 2, 0, "unknown_8", NULL);
print_field(b, 1, 0, "unknown_9", NULL);
print_field(b, 2, 0, "unknown_10", NULL);
if (stream_pos_flag) {
print_field(b, 8, 0, "unknown_11", NULL);
print_field(b, 1, 0, "unknown_12", NULL);
offs = print_field(b, 12, BF_SIGNED | BF_NONL,
"unknown_13", NULL);
print_verbose(1, " [0x%x]\n", pos + offs);
}
break;
case 2:
print_field(b, 6, 0, "unknown_7", NULL);
print_field(b, 2, 0, "unknown_10", NULL);
if (stream_pos_flag) {
print_field(b, 3, 0, "unknown_11", NULL);
print_field(b, 1, 0, "unknown_12", NULL);
offs = print_field(b, 12, BF_SIGNED | BF_NONL,
"unknown_13", NULL);
print_verbose(1, " [0x%x]\n", pos + offs);
}
break;
case 3:
print_field(b, 64, BF_HEX, "iv", NULL);
print_field(b, 32, BF_HEX, "start_pos", NULL);
......@@ -157,7 +185,7 @@ static int handle_datasync(struct bitreader *b, unsigned ptype)
default:
print_field(b, size[i],
BF_HEX | (size[i] > 32 ? BF_DATA : 0),
"unknown_7", NULL);
"unknown_12", NULL);
break;
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment