timvideos / HDMI2USB-litex-firmware

A version of the HDMI2USB firmware based around LiteX tools produced by @Enjoy-Digital (based on misoc+migen created by @M-Labs)
https://hdmi2usb.tv
BSD 2-Clause "Simplified" License
143 stars 70 forks source link

Create a HDMI2USB GUI controller #41

Open mithro opened 8 years ago

mithro commented 8 years ago

Probably best to start with python and something like pygtk or pyqt. You'll probably want to use pyserial for talking to the HDMI2USB board.

UI could look something like this;

 /----------------------------------------------\
 | HDMI2USB Controller                  [X][_]  |
 +----------------------------------------------+
 | Input 1:  1024x768 @ 60 Hz                   |
 +----------------------------------------------+
 | Input 2:  1024x768 @ 60 Hz                   |
 +----------------------------------------------+
 | Output 1                                     |
 | +---------+ +---------+ +---------+ +-----+  |
 | | Input 1 | | Input 2 | | Pattern | | Off |  |
 | +---------+ +---------+ +---------+ +-----+  |
 +----------------------------------------------+
 | Output 1                                     |
 | +---------+ +---------+ +---------+ +-----+  |
 | | Input 1 | | Input 2 | | Pattern | | Off |  |
 | +---------+ +---------+ +---------+ +-----+  |
 +----------------------------------------------+
 | USB Capture                                  |
 | +---------+ +---------+ +---------+ +-----+  |
 | | Input 1 | | Input 2 | | Pattern | | Off |  |
 | +---------+ +---------+ +---------+ +-----+  |
 +----------------------------------------------+
 | Debug Terminal                               |
 | +------------------------------------------+ |
 | | HDMI2USB>                                | |
 | |                                          | |
 | +------------------------------------------+ |
 +----------------------------------------------+
shenki commented 8 years ago

I'm keen to take this on.

What firmware do I want on my Atlys board to test?

Where is the protocol defined?

mithro commented 8 years ago

No protocol is defined except in the C code at https://github.com/timvideos/HDMI2USB-misoc-firmware/blob/master/firmware/lm32/ci.c

Follow instructions at https://github.com/timvideos/HDMI2USB-misoc-firmware/tree/master/scripts to get firmware building set up.

enjoy-digital commented 8 years ago

shenki; if you don't have time setting up the environment, you can use this for now: http://enjoy-digital.fr/open_hardware/hdmi2usb/atlys_hdmi2usb_gateware_2015_09_08.tar.gz

it seems mithro is setting up travis-ci so we will be able to provide prebuilt firmwares soon.

mithro commented 8 years ago

@xfxf has been working on this issue, so I'm assigning it to him.

My version of this code can be found at https://gist.github.com/mithro/0717f9a0b39a538e1e6d - I don't know where Ryan is keeping his code currently.

xfxf commented 8 years ago

About to start hacking on this again. I'd like to abstract out the HDMI2USB hardware specific bits to something more agnostic and reusable as a library, so we'll need to figure out an appropriate interface/protocol. Will start prototyping something, expect it'll probably end up changing wildly but will require some direction on this.

xfxf commented 8 years ago

@mithro @shenki I recall having issues a month ago with trying to read from the HDMI2USB serial interface, which @mithro identified as some sort of bug in the driver. Was this solved?

mithro commented 8 years ago

To be clear, it is not the "HDMI2USB serial interface" which has problems. It is the driver for the Exar USB UART on the Atlys board -- this isn't used on the Opsis and will eventually not used on the Atlys too.

xfxf commented 8 years ago

right, thanks for the clarification - in any case it was a blocker for making sane progress on this for me a month ago. is there a workaround/fix?

mithro commented 8 years ago

The workaround was the code I posted (which isn't 100% reliable, but should get you going).

@shenki was also on getting a rewritten kernel driver upstream.

xfxf commented 8 years ago

The code above did not work for me at the time; same issues trying to read from the device.

mithro commented 8 years ago

@xfxf - Please give it a go and report what actually happening + explain what is not happening.

mithro commented 8 years ago

Ping!

mithro commented 6 years ago

@xfxf has started something here -> https://github.com/xfxf/hdmi2usbmon/blob/master/simple_switch_ui.py

@xfxf mentioned;

the tk version works for basic use, started rewriting using toga, haven't finished there's a later version than that, but it's on a device not near me atm iirc that version lets you choose inputs/outputs, and dumps debug output into a text frame, not much more