djx-treme Posted July 27, 2016 Posted July 27, 2016 Hello, Is there any way to programmatically interact with HDMI on Banana Pi/Pro? Ideally I would like the following: Learn the current state of the HDMI monitor (and/or receive notifications): not connected, connected and turned off (in standby), connected and turned on. Turn off the HDMI monitor (put to standby). Turn on the HDMI monitor (exit standby). Thank you in advance!
djx-treme Posted August 3, 2016 Author Posted August 3, 2016 Ok. Found the following tricks: 1) Learn the current state of the HDMI monitor apt-get install read-edid get-edid > /tmp/edid If monitor is not plugged, you'll get something like this: Attempting to use i2c interfaceNo EDID on bus 0No EDID on bus 1No EDID on bus 2No EDID on bus 3No EDID on bus 4Looks like no busses have an EDID. Sorry!I'm sorry nothing was successful. Maybe try some other argumentsif you played with them, or send an email to Matthew Kern <pyrophobicman@gmail.com>. If monitor is plugged, you'll get something like this: This is read-edid version 3.0.2. Prepare for some fun.Attempting to use i2c interfaceNo EDID on bus 0No EDID on bus 1No EDID on bus 2No EDID on bus 31 potential busses found: 4256-byte EDID successfully retrieved from i2c bus 4Looks like i2c was successful. Have a good day.Checksum Correct Additionally, when connect a device to HDMI, the following is passed to the kernel: Aug 3 01:33:32 nx1 kernel: [ 5556.680012] ParseEDIDAug 3 01:33:32 nx1 kernel: [ 5556.704694] EDID version: 1.3Aug 3 01:33:32 nx1 kernel: [ 5556.717744] PCLK=148500000 X 1920 2008 2052 2200 Y 1080 1084 1089 1125 fr 60 PPAug 3 01:33:32 nx1 kernel: [ 5556.745364] Unimplemented SVD code 4Aug 3 01:33:32 nx1 kernel: [ 5556.747896] Unimplemented SVD code 2Aug 3 01:33:32 nx1 kernel: [ 5556.750510] Unimplemented SVD code 17Aug 3 01:33:32 nx1 kernel: [ 5556.756376] disp_clk: Could not find a matching pll-freq for 53900000 pclkAug 3 01:33:32 nx1 kernel: [ 5556.762219] disp_clk: Could not find a matching pll-freq for 53900000 pclkAug 3 01:33:32 nx1 kernel: [ 5556.768145] disp_clk: Could not find a matching pll-freq for 108100000 pclkAug 3 01:33:32 nx1 kernel: [ 5556.773970] disp_clk: Could not find a matching pll-freq for 25150000 pclkAug 3 01:33:32 nx1 kernel: [ 5556.779820] disp_clk: Could not find a matching pll-freq for 74200000 pclkAug 3 01:33:32 nx1 kernel: [ 5556.785646] disp_clk: Could not find a matching pll-freq for 74600000 pclkAug 3 01:33:32 nx1 kernel: [ 5556.791688] disp_clk: Could not find a matching pll-freq for 146850000 pclkAug 3 01:33:32 nx1 kernel: [ 5556.797640] disp_clk: Could not find a matching pll-freq for 172900000 pclkAug 3 01:33:32 nx1 kernel: [ 5556.803466] disp_clk: Could not find a matching pll-freq for 78800000 pclkAug 3 01:33:32 nx1 kernel: [ 5556.809311] disp_clk: Could not find a matching pll-freq for 53450000 pclkAug 3 01:33:32 nx1 kernel: [ 5556.815144] disp_clk: Could not find a matching pll-freq for 27100000 pclkAug 3 01:33:32 nx1 kernel: [ 5556.821092] disp_clk: Could not find a matching pll-freq for 26150000 pclkAug 3 01:33:32 nx1 kernel: [ 5557.006753] Parse_VideoData_Block: VIC 16 supportAug 3 01:33:32 nx1 kernel: [ 5557.019037] Parse_VideoData_Block: VIC 31 supportAug 3 01:33:32 nx1 kernel: [ 5557.031524] Parse_VideoData_Block: VIC 5 supportAug 3 01:33:32 nx1 kernel: [ 5557.043727] Parse_VideoData_Block: VIC 20 supportAug 3 01:33:32 nx1 kernel: [ 5557.056109] Parse_VideoData_Block: VIC 4 supportAug 3 01:33:32 nx1 kernel: [ 5557.068279] Parse_VideoData_Block: VIC 19 supportAug 3 01:33:32 nx1 kernel: [ 5557.080507] Parse_VideoData_Block: VIC 3 supportAug 3 01:33:32 nx1 kernel: [ 5557.092683] Parse_VideoData_Block: VIC 18 supportAug 3 01:33:32 nx1 kernel: [ 5557.104805] Parse_VideoData_Block: VIC 2 supportAug 3 01:33:32 nx1 kernel: [ 5557.116842] Parse_VideoData_Block: VIC 17 supportAug 3 01:33:32 nx1 kernel: [ 5557.128831] Parse_VideoData_Block: VIC 1 supportAug 3 01:33:32 nx1 kernel: [ 5557.140681] Parse_AudioData_Block: max channel=2Aug 3 01:33:32 nx1 kernel: [ 5557.152796] Parse_AudioData_Block: SampleRate code=7Aug 3 01:33:32 nx1 kernel: [ 5557.165050] Parse_AudioData_Block: WordLen code=7Aug 3 01:33:32 nx1 kernel: [ 5557.176686] Find HDMI Vendor Specific DataBlockAug 3 01:33:32 nx1 kernel: [ 5557.190211] PCLK=27000000 X 720 736 798 858 Y 480 489 495 525 fr 59 NNAug 3 01:33:32 nx1 kernel: [ 5557.206142] PCLK=74250000 X 1280 1390 1430 1650 Y 720 725 730 750 fr 60 PPAug 3 01:33:32 nx1 kernel: [ 5557.222220] PCLK=27000000 X 720 736 798 858 Y 480 489 495 525 fr 59 NNAug 3 01:33:32 nx1 kernel: [ 5557.237922] PCLK=27000000 X 720 732 796 864 Y 576 581 586 625 fr 50 NN 2. Turn on/off HDMI Use this utility: https://github.com/doozan/a10-tools a10_display hdmi off|on 1
Recommended Posts