BertoldVdb / ms-tools

Program, library and reference designs to develop for MacroSilicon MS2106/MS2109/MS2130 chips.
MIT License
117 stars 10 forks source link

Get the screen resolution of the 2109 2130 captured device #7

Closed haobinnan closed 1 year ago

haobinnan commented 1 year ago

May I know if you can provide a method to obtain the screen resolution of the 2109 and 2130 captured devices?

BertoldVdb commented 1 year ago

I know it for 2106 and 2109, didn't investigate 2130.

For the MS2109: Width is at 0xc572 and 0xc573 (16-bit big endian) Height is at 0xc574 and 0xc575 (16-bit big endian) FPS is at 0c578 and 0xc579 (16-bit big endian)

There is a status byte at 0xc568 where the MSB seems to indicate if the receiver is locked to any signal. You can read the value of signals like HPD using the GPIO interface.

haobinnan commented 1 year ago

thanks

markvdb commented 1 year ago

For the MS2130 and MS2131, we can access this info too:

Duplicates seem to be available somewhere around 0xf600 and 0xf660 it seems.

markvdb commented 1 year ago

We're having trouble detecting the source FPS on the ms2131. I suspect I have found unique fps values, but only in a RAM region far away from the resolution and not in any way logical values themselves.

@BertoldVdb Do you happen to have any set of FPS hex values from the MS2106 and MS2109? That might help us comb for FPS hex values on ms2130 and ms2131. I will happily report any findings back here.

markvdb commented 1 year ago

@BertoldVdb , @gerryd butchered (his words) your work into a minimal binary that will check an ms213x device for width, height and signal: https://github.com/gerryd/ms213x-status .

BertoldVdb commented 1 year ago

Nice. How important is FPS for you? It would certainly be possible to count each frame sent from the firmware. This could then be divided by time to get the FPS.

gerryd commented 1 year ago

Not extremely important, we can do without, but it would be a "nice to have".

We expect to have two kinds of input, a presenter's laptop and an HDMI camera. We don't care about FPS in the first case, however in the second case we do make sure to set all our cameras to the same framerate to eliminate one variable. We have noticed that some cameras seem to lose their configuration (probably after a reboot or something similar), so being able to remotely detect a wrongly configured camera would be a plus.

From your earlier comment on the 2106 and 2109 ("FPS is at 0c578 and 0xc579 (16-bit big endian)"), I guess you found that the MS213x doesn't have this value stored anywhere?

If FPS on the MS213X is something that would need to be monitored over time, it may be more work than it is worth.

matiaspl commented 10 months ago

Nice. How important is FPS for you? It would certainly be possible to count each frame sent from the firmware. This could then be divided by time to get the FPS.

Wouldn't this imply disabling the internal temporal scaler/frame duplicator or counting the input frames somehow, to work reliably?