Quote from: srsa_4c on 09 / June / 2018, 16:49:11- The HDMI power related function will likely need to be called after every play -> rec transition on a camera that disables HDMI power in rec mode.yes, you are right. the code for that is already prepared in the patch. from shooting_set_playrec_mode() the camera specific function pf_notify_modeswitch() is called. Here the HDMI power can be enabled. (depending on mode, and if HDMI is used as remote input)
- The HDMI power related function will likely need to be called after every play -> rec transition on a camera that disables HDMI power in rec mode.
Quote from: srsa_4c on 09 / June / 2018, 16:49:11- It might be beneficial to mask the HDMI hotplug bit (if it is even possible), so that the camera won't do unnecessary work when that bit is toggled.yes, you are right. also this is already prepared in the camera specific function set_pf_remote_override(). it is called from kbd_common.c
- It might be beneficial to mask the HDMI hotplug bit (if it is even possible), so that the camera won't do unnecessary work when that bit is toggled.
Quote from: hugoboss00 on 10 / June / 2018, 11:39:59Quote from: srsa_4c on 09 / June / 2018, 16:49:11- The HDMI power related function will likely need to be called after every play -> rec transition on a camera that disables HDMI power in rec mode.yes, you are right. the code for that is already prepared in the patch. from shooting_set_playrec_mode() the camera specific function pf_notify_modeswitch() is called. Here the HDMI power can be enabled. (depending on mode, and if HDMI is used as remote input)I did not explain fully what I meant. Doing this in shooting_set_playrec_mode() is only okay if you control the rec<->play transitions from a script. In any other cases (say, user operates camera by hand), it won't be executed. There is a function somewhere (mode_get() in core/shooting.c) that updates state variables in conf structure, placing the hdmi mode control there would be more appropriate, I believe.
QuoteQuote from: srsa_4c on 09 / June / 2018, 16:49:11- It might be beneficial to mask the HDMI hotplug bit (if it is even possible), so that the camera won't do unnecessary work when that bit is toggled.yes, you are right. also this is already prepared in the camera specific function set_pf_remote_override(). it is called from kbd_common.cIs that effective for the HDMI bit? Comparing camera log with/without masking that bit while toggling the pin would probably show whether masking is effective.
The is one additional change in generic/wrappers.c because i wanted to use dbg_printf() from there, but it was crashing. After replacing _ExecuteEventProcedure("Printf",s) with _LogCameraEvent(0x20,"%s", s) it worked.
Some other stuff I had in mind but didn't get to:Updating the remote setting should update the hdmi power state if needed. Currently if you are in rec mode and switch to hmdi remote, the power won't get turned on until you switch to play and back. This could maybe be a conf_info_func function like conf_change_dng
I'm not sure putting the implementation in platform pf_... functions is the right approach. I'd expect the HDMI stuff (and the battery terminal remote) to work the same on all cameras that have it (+ some constants and maybe a low level read function), so I think most of it should be under feature specific ifdefs, maybe in kbd_common.c. In the g7x kbd.c get_remote_bit and the pf functions would all be generic for any platform that had those combination of features. This might seem like a cosmetic choice, but with > 160 platforms I really like to keep the copy/paste in check where possible.
This should be already working, it is handled in pf_notify_modeswitch(), but to be sure i will test it again.
The background for choosing this aproach was that theoretical you can have every combination of supported remote inputs.
Index: tools/finsig_dryos.c===================================================================--- tools/finsig_dryos.c (revision 5052)+++ tools/finsig_dryos.c (working copy)@@ -507,6 +507,8 @@ { "SS_MFOff", OPTIONAL }, { "GetAdChValue", OPTIONAL },+ { "EnableHDMIPower", OPTIONAL },+ { "DisableHDMIPower", OPTIONAL }, { 0, 0, 0 } };@@ -2088,6 +2090,8 @@ // R20 R23 R31 R39 R43 R45 R47 R49 R50 R51 R52 R54 R55 R57 R58 R59 { 23, "UnregisterInterruptHandler", "HeadInterrupt1", 76, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }, { 23, "get_string_by_id", "NoError", 16, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, -2 },+ { 23, "EnableHDMIPower", "HDMIConnectCnt", 9, 99, 99, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,},+ { 23, "DisableHDMIPower", "HDMIConnectCnt", 9, 99, 99, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,}, // R20 R23 R31 R39 R43 R45 R47 R49 R50 R51 R52 R54 R55 R57 R58 R59 { 24, "get_string_by_id", "StringID[%d] is not installed!!\n", 64, 0xf000, 0xf000, 0xf000, 0xf000, 0xf000, 0xf000, 0xf000, 0xf000, 0xf000, 0xf000, 0xf000, 0xf000, 0x0000, 0x0000, 0x0000, 0xf000 },