Codebase list edid-decode / 204039a
Print speaker allocation data block Arnaud Vrac authored 7 years ago Adam Jackson committed 7 years ago
1 changed file(s) with 35 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
994994 &CE_scan,
995995 };
996996
997 static const char *sadb_map[] = {
998 "FL/FR",
999 "LFE",
1000 "FC",
1001 "RL/RR",
1002 "RC",
1003 "FLC/FRC",
1004 "RLC/RRC",
1005 "FLW/FRW",
1006 "FLH/FRH",
1007 "TC",
1008 "FCH",
1009 };
1010
1011 static void
1012 cea_sadb(unsigned char *x)
1013 {
1014 int length = x[0] & 0x1f;
1015 int i;
1016
1017 if (length >= 3) {
1018 uint16_t sad = ((x[2] << 8) | x[1]);
1019
1020 printf(" Speaker map:");
1021
1022 for (i = 0; i < ARRAY_SIZE(sadb_map); i++) {
1023 if ((sad >> i) & 1)
1024 printf(" %s", sadb_map[i]);
1025 }
1026
1027 printf("\n");
1028 }
1029 }
1030
9971031 static void
9981032 cea_vcdb(unsigned char *x)
9991033 {
10271061 break;
10281062 case 0x04:
10291063 printf(" Speaker allocation data block\n");
1064 cea_sadb(x);
10301065 break;
10311066 case 0x05:
10321067 printf(" VESA DTC data block\n");