summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans Verkuil <hans.verkuil@cisco.com>2017-09-09 12:08:21 +0200
committerAdam Jackson <ajax@redhat.com>2017-09-18 10:16:47 -0400
commit307e9c2ea986ee928dbb4e2b2fb0eb4cdd63fb48 (patch)
tree8f06deebca497607d3bbbaddf68e29ba61473dd4
parentcf3015d2190b649bb6eb8fa7bc7554ebbba0ab83 (diff)
edid-decode: update Speaker Allocation data block
More bits are now in use, implement support for those. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
-rw-r--r--edid-decode.c39
1 files changed, 23 insertions, 16 deletions
diff --git a/edid-decode.c b/edid-decode.c
index c5de5f6..8d47a5f 100644
--- a/edid-decode.c
+++ b/edid-decode.c
@@ -1615,17 +1615,26 @@ static struct field *vcdb_fields[] = {
};
static const char *sadb_map[] = {
- "FL/FR",
- "LFE",
- "FC",
- "RL/RR",
- "RC",
- "FLC/FRC",
- "RLC/RRC",
- "FLW/FRW",
- "FLH/FRH",
- "TC",
- "FCH",
+ "FL/FR - Front Left/Right",
+ "LFE - Low Frequency Effects",
+ "FC - Front Center",
+ "BL/BR - Back Left/Right",
+ "BC - Back Center",
+ "FLC/FRC - Front Left/Right of Center",
+ "RLC/RRC - Rear Left/Right of Center",
+ "FLW/FRW - Front Left/Right Wide",
+ "TpFL/TpFH - Top Front Left/Right",
+ "TpC - Top Center",
+ "TpFC - Top Front Center",
+ "LS/RS - Left/Right Surround",
+ "LFE2 - Low Frequency Effects 2",
+ "TpBC - Top Back Center",
+ "SiL/SiR - Side Left/Right",
+ "TpSiL/TpSiR - Top Side Left/Right",
+ "TpBL/TpBR - Top Back Left/Right",
+ "BtFC - Bottom Front Center",
+ "BtFL/BtBR - Bottom Front Left/Right",
+ "TpLS/TpRS - Top Left/Right Surround",
};
static void
@@ -1635,16 +1644,14 @@ cea_sadb(unsigned char *x)
int i;
if (length >= 3) {
- uint16_t sad = ((x[2] << 8) | x[1]);
+ uint32_t sad = ((x[3] << 16) | (x[2] << 8) | x[1]);
- printf(" Speaker map:");
+ printf(" Speaker map:\n");
for (i = 0; i < ARRAY_SIZE(sadb_map); i++) {
if ((sad >> i) & 1)
- printf(" %s", sadb_map[i]);
+ printf(" %s\n", sadb_map[i]);
}
-
- printf("\n");
}
}