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-compliance: send IMAGE_VIEW_ON when no HPD Author: Hans Verkuil <hans.verk...@cisco.com> Date: Tue Aug 8 14:07:54 2017 +0200 When no HPD is detected at the start, then try to send an IMAGE_VIEW_ON to wake up the display. This to support some displays that turn off the HPD but still listen to CEC commands. Signed-off-by: Hans Verkuil <hans.verk...@cisco.com> utils/cec-compliance/cec-compliance.cpp | 34 ++++++++++++++++++++++++++++++--- 1 file changed, 31 insertions(+), 3 deletions(-) --- http://git.linuxtv.org/cgit.cgi/v4l-utils.git/commit/?id=61b41bf7c56f21a0b1e70cf24135232e62231bc5 diff --git a/utils/cec-compliance/cec-compliance.cpp b/utils/cec-compliance/cec-compliance.cpp index 2867446d060f..61fee6678f76 100644 --- a/utils/cec-compliance/cec-compliance.cpp +++ b/utils/cec-compliance/cec-compliance.cpp @@ -1490,12 +1490,40 @@ int main(int argc, char **argv) node.phys_addr = CEC_PHYS_ADDR_INVALID; doioctl(&node, CEC_ADAP_G_PHYS_ADDR, &node.phys_addr); - printf("\tPhysical Address : %x.%x.%x.%x\n", - cec_phys_addr_exp(node.phys_addr)); - struct cec_log_addrs laddrs = { }; doioctl(&node, CEC_ADAP_G_LOG_ADDRS, &laddrs); + if (node.phys_addr == CEC_PHYS_ADDR_INVALID && + !(node.caps & (CEC_CAP_PHYS_ADDR | CEC_CAP_NEEDS_HPD)) && + laddrs.num_log_addrs) { + struct cec_msg msg; + + /* + * Special corner case: if PA is invalid, then you can still try + * to poll a TV. If found, try to wake it up. + */ + cec_msg_init(&msg, CEC_LOG_ADDR_UNREGISTERED, CEC_LOG_ADDR_TV); + + fail_on_test(doioctl(&node, CEC_TRANSMIT, &msg)); + if (msg.tx_status & CEC_TX_STATUS_OK) { + unsigned cnt = 0; + + cec_msg_image_view_on(&msg); + fail_on_test(doioctl(&node, CEC_TRANSMIT, &msg)); + while ((msg.tx_status & CEC_TX_STATUS_OK) && cnt++ <= long_timeout) { + fail_on_test(doioctl(&node, CEC_ADAP_G_PHYS_ADDR, &node.phys_addr)); + if (node.phys_addr != CEC_PHYS_ADDR_INVALID) { + doioctl(&node, CEC_ADAP_G_LOG_ADDRS, &laddrs); + break; + } + sleep(1); + } + } + + } + + printf("\tPhysical Address : %x.%x.%x.%x\n", + cec_phys_addr_exp(node.phys_addr)); 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) _______________________________________________ linuxtv-commits mailing list linuxtv-commits@linuxtv.org https://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits