Draft: Resolve "implement docking/portable switch software"
Thank you for your contribution!
Please make sure your Merge Request is ready to be merged:
-
if the Merge Request is about a new feature, an improvement or an important bugfix, amend RELEASE-NOTES.md -
you respected conventional commits -
you updated the wiki Please it is important 🙏 !
The results of the build can give you clues about what is missing in your Merge Request.
The software will start on boot and will
- detect if current hardware can be docked/portable (gpi2, piboy or rg353x), if not just exit
- detect current mode
- if a switch has occurred (portable to docked or docked to portable), then do this:
- change theme as requested (go2/next) if theme was not customized (see piboy docking software)
- change audio sink output
- force external or internal display off
- disable internal joystick if docked (only for gpi2: echo "1-1.3:1.0" > /sys/bus/usb/drivers/xpad/unbind)
- or lower priority for internal joystick (see piboy script)
For each hardware, some functions helper must exist:
- get current docking status (from gpio, kernel flag, drm)
- disable internal screen
- disable external video connector
- set internal audio speaker
- set external audio output
Tasks:
-
write helper -
write service -
test on piboy -
test on gpi2 -
test on rg353x -
allow 1080p for gpi2 (hdmi_group=1 and hdmi_mode=16 in recalbox-user-config.txt)
Related to #2358
Edited by David Barbion