description: The gadget snap for MediaTek Genio devices
interfaces:
custom-device (mediatek-genio-mipi-camera):
request-type: installation
reasoning: We are trying to support a MediaTek proprietary camera framework on MediaTek Genio devices with Ubuntu Core. This feature requires a userspace daemon to work with HWE kernel (provided by mediatek-genio-kernel kernel snap). The userspace daemon use these device nodes to communicate with kernel:
/dev/mtk_hcp: To allow userspace daemon control HCP (Hetero Control Processor) via mtk_hcp kernel module.
/dev/mtk_ccd: To allow userspace daemon control camera sensor’s CCD via mtk_ccd kernel module
/dev/vcu2: To allow userspace daemon control VCU (Video Communication/Controller Unit) via mtk_vcu kernel module.
This makes sense to me but I would like to understand the underlying architecture a bit better. Could you please clarify what snap ships the mentioned userspace daemon and how the camera application communicated with this daemon?
For the relationship between camera applications and this daemon, you can refer to the MediaTek Imgsensor part in this documention.
Briefly put, this daemon only communicates with the kernel. Camera applications interact through standard V4L2 device interfaces to fetch images rather than communicating with the daemon directly. Within the kernel space, the driver talks to this userspace daemon to apply 3A algorithms in the userspace (allowing MediaTek to keep their proprietary 3A algorithm source code proprietary and avoid GPL restrictions).
I see, then mediatek-genio, which is a gadget snap, will declare the requested custom-device slot that will be plugged by the various mediatek-genio-camd-gxxx snaps. Is my understanding correct?