aboutsummaryrefslogtreecommitdiffstats
path: root/utils/cec-ctl/cec-ctl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'utils/cec-ctl/cec-ctl.cpp')
-rw-r--r--utils/cec-ctl/cec-ctl.cpp74
1 files changed, 71 insertions, 3 deletions
diff --git a/utils/cec-ctl/cec-ctl.cpp b/utils/cec-ctl/cec-ctl.cpp
index 15d70184..d70841bd 100644
--- a/utils/cec-ctl/cec-ctl.cpp
+++ b/utils/cec-ctl/cec-ctl.cpp
@@ -1037,6 +1037,72 @@ static std::string dev_feat2s(unsigned feat, const std::string &prefix)
return s;
}
+/*
+ * Most of these vendor IDs come from include/cectypes.h from libcec.
+ */
+static const char *vendor2s(unsigned vendor)
+{
+ switch (vendor) {
+ case 0x000039:
+ case 0x000ce7:
+ return " (Toshiba)";
+ case 0x0000f0:
+ return " (Samsung)";
+ case 0x0005cd:
+ return " (Denon)";
+ case 0x000678:
+ return " (Marantz)";
+ case 0x000982:
+ return " (Loewe)";
+ case 0x0009b0:
+ return " (Onkyo)";
+ case 0x000c03:
+ return " (HDMI)";
+ case 0x001582:
+ return " (Pulse-Eight)";
+ case 0x001950:
+ case 0x9c645e:
+ return " (Harman Kardon)";
+ case 0x001a11:
+ return " (Google)";
+ case 0x0020c7:
+ return " (Akai)";
+ case 0x002467:
+ return " (AOC)";
+ case 0x005060:
+ return " (Cisco)";
+ case 0x008045:
+ return " (Panasonic)";
+ case 0x00903e:
+ return " (Philips)";
+ case 0x009053:
+ return " (Daewoo)";
+ case 0x00a0de:
+ return " (Yamaha)";
+ case 0x00d0d5:
+ return " (Grundig)";
+ case 0x00d38d:
+ return " (Hospitality Profile)";
+ case 0x00e036:
+ return " (Pioneer)";
+ case 0x00e091:
+ return " (LG)";
+ case 0x08001f:
+ case 0x534850:
+ return " (Sharp)";
+ case 0x080046:
+ return " (Sony)";
+ case 0x18c086:
+ return " (Broadcom)";
+ case 0x6b746d:
+ return " (Vizio)";
+ case 0x8065e9:
+ return " (Benq)";
+ default:
+ return "";
+ }
+}
+
int cec_named_ioctl(int fd, const char *name,
unsigned long int request, void *parm)
{
@@ -1171,8 +1237,9 @@ static int showTopologyDevice(struct node *node, unsigned i, unsigned la)
if (!cec_msg_status_is_ok(&msg))
printf("%s\n", status2s(msg).c_str());
else
- printf("0x%02x%02x%02x\n",
- msg.msg[2], msg.msg[3], msg.msg[4]);
+ printf("0x%02x%02x%02x%s\n",
+ msg.msg[2], msg.msg[3], msg.msg[4],
+ vendor2s(msg.msg[2] << 16 | msg.msg[3] << 8 | msg.msg[4]));
cec_msg_init(&msg, la, i);
cec_msg_give_osd_name(&msg, true);
@@ -1883,7 +1950,8 @@ int main(int argc, char **argv)
printf("\tLogical Address Mask : 0x%04x\n", laddrs.log_addr_mask);
printf("\tCEC Version : %s\n", version2s(laddrs.cec_version));
if (laddrs.vendor_id != CEC_VENDOR_ID_NONE)
- printf("\tVendor ID : 0x%06x\n", laddrs.vendor_id);
+ printf("\tVendor ID : 0x%06x%s\n",
+ laddrs.vendor_id, vendor2s(laddrs.vendor_id));
printf("\tOSD Name : '%s'\n", laddrs.osd_name);
printf("\tLogical Addresses : %u %s\n",
laddrs.num_log_addrs, laflags2s(laddrs.flags).c_str());

Privacy Policy