New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix 3d mode switching for Wetek HUB on Libreelec #12316
Conversation
I haven't followed Amlcodec at all, so I'll leave it to @peak3d to approve. ppmgr3d is/was used when the 3D extensions were enabled when building the aml kernel. It's not android-specific. OTOH, as, basically, kodi + amlcodec is only used on LE, afaik, and obviously LE builds the kernel the way it wants, it doesn't seem to make sense to me to keep an "old way" that won't be used anywhere ;) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From principle fully Ok, but I really don't understand why LE does not activate ppmgr3D. I mislike to have code in kodi that is already part of drivers:
https://github.com/peak3d/linux/blob/c1_qbuf/drivers/amlogic/ppmgr/Kconfig#L18
because LibreELEC/LibreELEC.tv#1175 |
Do we have an backtrace from driver? There are so many high professionals in LE, I bet it would be easy to one of them to catch the issue in driver and I could help reporting it to AML. |
People, would you mind doing LE talk in LE, please ;) +1 from me. |
@koying so for you its Ok to write code around a bug from driver wich is Open Source? Aren't there maybe some features in ppmgr3d wich we'll use in the future (there are at least some lines of code in the driver source). Edit B.t.w you pointed LE in your first post, last chapter as well. If you don't want this name here, we should all follow those golden rules (didn't knew about it so far) |
It's not a matter of naming LE (clearly) but a matter of solving (or not) a LE kernel issue, which is somewhat different ;) |
Ok - i wasn't aware of that "simple" solution to activate the ppmgr_3d in the kernel config. Well i did and tried it out. It looks like its heavily broken. I can't even tell where to start :D. But just looking at Kodis implementation for ppmgr_3d_mode here tells me that the kodi code is unintuitive at the least:
I tried to manually switch to LR mode by doing "echo 257 > ppmgr_3d_mode" which is hex 0x101 and should be 3d_LR (side by side so to say). The only thing that happened is that the picture freezes and the whole box gets unresponsive. After that i have to reboot the box because killall -9 kodi.bin does nothing. |
added WIP label as i am investigating some strange hdmi handshakes that occure with this patch (even with last commit). |
fixed that - was a stupid typo on my side ... |
Added wip label again. Oh man - sleeping another night over this might have revealed a missunderstanding.
Conclusion:
@peak3d could this make sense to you too? |
A small note on kernel-side of things: for me it looks like ppmgr3d is present in 3.14 kernel, disabled by default (in Android kernels), it looks more like a residue from 3.10 code porting. |
Updated... i also already have prepared a backport to krypton if this is accepted. |
@peak3d any idea who maintains this or is entitled to approve or deny this? |
@peak3d did you read my latest comments? What exactly doesn't feel correct? Ppmgr3d was never able to switch 3d modes on the hdmi channel - that was a miss understanding on my side. Thats why i changed the PR for adding the 3d switching into the windowing where it is for other platforms too (rbpi for example). No its not urgent - just wanted to ensure that someone is there to judge this pr ;) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks fine for me!
I apologize, I've been confused as well. Indeed, "amhdmitx0" is the only way to signal 3D on HDMI. ppmgr3d is for frames 3D post-processing, so unrelated. |
Now i feel stupid in re-inventing the wheel here. Damn i should have talked to you about that missing feature on wetek instead of lrusak :( - now i am unsure if i should instead backport the solution you've done in SPMC?!? |
@koying it looks like that feature vanished from your krypton branch though ... |
also you set it from rendering where a SetStereoMode method exists. Who in the team can tell me where exactly the hardware is to be switched to stereo mode ... i somehow feel it has to sit in windowing because we switch resolution and refreshrate there too - but looking ath that renderer code the SetStereoMode call sounds good too - and might also ensure that the mode is switched at the right time during playback start ... this is a bit confusing right now imo. |
Your solution is as good as mine ;) |
…g sysfs interface
…_3d is not available
@popcornmix ping. |
what is the concensus here? |
IIRC we should merge it (???) |
This might also fix 3d mode switching for other amlogic boxes. Basically it should for all that don't have ppmgr3d which at least my wetek hub has not under libreelec.
I have no idea where the original ppmgr3d code is currently working. Maybe its an android thingy - i have no idea.
This also fixes 3d to 2d Rendering for my wetek hub which didn't do anything before. (it simply didn't adjust the render rect properly before because it assumed ppmgr3d is there and does its magic i suppose).
This should be "backward" compatible to the fact that whenever ppmgr3d is available - it is used.
This also makes the service.odroidc2-3dautoswitch addon obsolete. (which tried to do a similar thing by using hdmitx0 but just feels not so good as implemented in core like for all other solutions).
@lrusak fyi
@koying maybe some info about the ppmgr3d - is it android?