Jump to content

Recommended Posts

Posted

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!

Posted

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 interface
No EDID on bus 0
No EDID on bus 1
No EDID on bus 2
No EDID on bus 3
No EDID on bus 4
Looks like no busses have an EDID. Sorry!
I'm sorry nothing was successful. Maybe try some other arguments
if 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 interface
No EDID on bus 0
No EDID on bus 1
No EDID on bus 2
No EDID on bus 3
1 potential busses found: 4
256-byte EDID successfully retrieved from i2c bus 4
Looks 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] ParseEDID
Aug 3 01:33:32 nx1 kernel: [ 5556.704694] EDID version: 1.3
Aug 3 01:33:32 nx1 kernel: [ 5556.717744] PCLK=148500000 X 1920 2008 2052 2200 Y 1080 1084 1089 1125 fr 60 PP
Aug 3 01:33:32 nx1 kernel: [ 5556.745364] Unimplemented SVD code 4
Aug 3 01:33:32 nx1 kernel: [ 5556.747896] Unimplemented SVD code 2
Aug 3 01:33:32 nx1 kernel: [ 5556.750510] Unimplemented SVD code 17
Aug 3 01:33:32 nx1 kernel: [ 5556.756376] disp_clk: Could not find a matching pll-freq for 53900000 pclk
Aug 3 01:33:32 nx1 kernel: [ 5556.762219] disp_clk: Could not find a matching pll-freq for 53900000 pclk
Aug 3 01:33:32 nx1 kernel: [ 5556.768145] disp_clk: Could not find a matching pll-freq for 108100000 pclk
Aug 3 01:33:32 nx1 kernel: [ 5556.773970] disp_clk: Could not find a matching pll-freq for 25150000 pclk
Aug 3 01:33:32 nx1 kernel: [ 5556.779820] disp_clk: Could not find a matching pll-freq for 74200000 pclk
Aug 3 01:33:32 nx1 kernel: [ 5556.785646] disp_clk: Could not find a matching pll-freq for 74600000 pclk
Aug 3 01:33:32 nx1 kernel: [ 5556.791688] disp_clk: Could not find a matching pll-freq for 146850000 pclk
Aug 3 01:33:32 nx1 kernel: [ 5556.797640] disp_clk: Could not find a matching pll-freq for 172900000 pclk
Aug 3 01:33:32 nx1 kernel: [ 5556.803466] disp_clk: Could not find a matching pll-freq for 78800000 pclk
Aug 3 01:33:32 nx1 kernel: [ 5556.809311] disp_clk: Could not find a matching pll-freq for 53450000 pclk
Aug 3 01:33:32 nx1 kernel: [ 5556.815144] disp_clk: Could not find a matching pll-freq for 27100000 pclk
Aug 3 01:33:32 nx1 kernel: [ 5556.821092] disp_clk: Could not find a matching pll-freq for 26150000 pclk
Aug 3 01:33:32 nx1 kernel: [ 5557.006753] Parse_VideoData_Block: VIC 16 support
Aug 3 01:33:32 nx1 kernel: [ 5557.019037] Parse_VideoData_Block: VIC 31 support
Aug 3 01:33:32 nx1 kernel: [ 5557.031524] Parse_VideoData_Block: VIC 5 support
Aug 3 01:33:32 nx1 kernel: [ 5557.043727] Parse_VideoData_Block: VIC 20 support
Aug 3 01:33:32 nx1 kernel: [ 5557.056109] Parse_VideoData_Block: VIC 4 support
Aug 3 01:33:32 nx1 kernel: [ 5557.068279] Parse_VideoData_Block: VIC 19 support
Aug 3 01:33:32 nx1 kernel: [ 5557.080507] Parse_VideoData_Block: VIC 3 support
Aug 3 01:33:32 nx1 kernel: [ 5557.092683] Parse_VideoData_Block: VIC 18 support
Aug 3 01:33:32 nx1 kernel: [ 5557.104805] Parse_VideoData_Block: VIC 2 support
Aug 3 01:33:32 nx1 kernel: [ 5557.116842] Parse_VideoData_Block: VIC 17 support
Aug 3 01:33:32 nx1 kernel: [ 5557.128831] Parse_VideoData_Block: VIC 1 support
Aug 3 01:33:32 nx1 kernel: [ 5557.140681] Parse_AudioData_Block: max channel=2
Aug 3 01:33:32 nx1 kernel: [ 5557.152796] Parse_AudioData_Block: SampleRate code=7
Aug 3 01:33:32 nx1 kernel: [ 5557.165050] Parse_AudioData_Block: WordLen code=7
Aug 3 01:33:32 nx1 kernel: [ 5557.176686] Find HDMI Vendor Specific DataBlock
Aug 3 01:33:32 nx1 kernel: [ 5557.190211] PCLK=27000000 X 720 736 798 858 Y 480 489 495 525 fr 59 NN
Aug 3 01:33:32 nx1 kernel: [ 5557.206142] PCLK=74250000 X 1280 1390 1430 1650 Y 720 725 730 750 fr 60 PP
Aug 3 01:33:32 nx1 kernel: [ 5557.222220] PCLK=27000000 X 720 736 798 858 Y 480 489 495 525 fr 59 NN
Aug 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

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines