HDMI CEC command for shutdown not working on Android

0

I am sending HDMI CEC command to Power on and Standby my LG LED TV 2015 make. The device is a Amlogic S922x based SBC running Android 9. The Power On commands work but the Standby commands don't. Can someone tell me what is wrong with this?

Power ON command (works): echo 0x40 0x04 > /sys/class/cec/cmd

Power OFF command (does not work): echo 0x40 0x36 > /sys/class/cec/cmd

Output of echo 0x40 0x36 > /sys/class/cec/cmd && sleep 0.1 && cat /sys/class/cec/dump_reg

AO_RTI_PWR_CNTL_REG0: 0x00004200
AO_CEC_GEN_CNTL: 0x00000000
AO_CECB_CLK_CNTL_REG0:  0xd02db2dc
AO_CECB_CLK_CNTL_REG1:  0x0000a007
AO_CECB_GEN_CNTL:   0x0000710a
AO_CECB_RW_REG: 0x02010300
AO_CECB_INTR_MASKN:0x0000003f
AO_CECB_INTR_STAT: 0x00000000
CEC MODULE REGS:
CEC_CTRL      = 0x03
CEC_MASK      = 0x00
CEC_ADDR_L   = 0x10
CEC_ADDR_H   = 0x00
CEC_TX_CNT   = 0x05
CEC_RX_CNT   = 0x02
CEC_LOCK      = 0x00
CEC_WKUPCTRL = 0x10
RX buffer: 04 83 00 e0 91 00 00 00 00 00 00 00 00 00 00 00
TX buffer: 4f 84 10 00 04 00 00 00 00 00 00 00 00 00 00 00
android
raspberry-pi
television
hdmi
hdmi-cec
asked on Stack Overflow Dec 10, 2019 by Debasish Mitra • edited Dec 10, 2019 by Debasish Mitra

1 Answer

0

Try 0xF0 0x36 instead of 0x40 0x36.

Get codes from here: https://www.cec-o-matic.com/ Looks like 0x40 is when source is "playback 1". If you set the source to "unregistered" the result code for standby is 0xF0 0x36. Worked for me on Amlogic and Samsung TV.

answered on Stack Overflow Jul 8, 2020 by ldzhamov • edited Jul 8, 2020 by ldzhamov

User contributions licensed under CC BY-SA 3.0