This is an automatic generated email to let you know that the following patch were queued at the http://git.linuxtv.org/cgit.cgi/v4l-utils.git tree:
Subject: cec: move vendor2s to cec-info.cpp Author: Hans Verkuil <hans.verk...@cisco.com> Date: Wed Jun 6 08:11:27 2018 +0200 This makes this function available to all cec utilities. Signed-off-by: Hans Verkuil <hans.verk...@cisco.com> utils/cec-ctl/cec-ctl.cpp | 68 +--------------------------------------------- utils/common/cec-info.cpp | 69 ++++++++++++++++++++++++++++++++++++++++++++++- utils/common/cec-info.h | 1 + 3 files changed, 70 insertions(+), 68 deletions(-) --- http://git.linuxtv.org/cgit.cgi/v4l-utils.git/commit/?id=13d2e65db2a8059a54b9110f5642a05785372afe diff --git a/utils/cec-ctl/cec-ctl.cpp b/utils/cec-ctl/cec-ctl.cpp index 7feb52e28f20..34c83fdd8020 100644 --- a/utils/cec-ctl/cec-ctl.cpp +++ b/utils/cec-ctl/cec-ctl.cpp @@ -889,72 +889,6 @@ static const char *power_status2s(__u8 power_status) } } -/* - * 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 ""; - } -} - std::string ts2s(__u64 ts) { std::string s; @@ -1205,7 +1139,7 @@ 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%s\n", + 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])); diff --git a/utils/common/cec-info.cpp b/utils/common/cec-info.cpp index 107b6d663dbb..28c5ef3932d4 100644 --- a/utils/common/cec-info.cpp +++ b/utils/common/cec-info.cpp @@ -65,6 +65,72 @@ const char *version2s(unsigned version) } } +/* + * Most of these vendor IDs come from include/cectypes.h from libcec. + */ +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 ""; + } +} + const char *prim_type2s(unsigned type) { switch (type) { @@ -231,7 +297,8 @@ void cec_driver_info(const struct cec_caps &caps, 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()); diff --git a/utils/common/cec-info.h b/utils/common/cec-info.h index 9a10645bf305..c5b6b01cc860 100644 --- a/utils/common/cec-info.h +++ b/utils/common/cec-info.h @@ -17,6 +17,7 @@ const char *la2s(unsigned la); const char *la_type2s(unsigned type); const char *prim_type2s(unsigned type); const char *version2s(unsigned version); +const char *vendor2s(unsigned vendor); std::string all_dev_types2s(unsigned types); std::string rc_src_prof2s(unsigned prof, const std::string &prefix); std::string dev_feat2s(unsigned feat, const std::string &prefix); _______________________________________________ linuxtv-commits mailing list linuxtv-commits@linuxtv.org https://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits