Request custom-device (mediatek-genio-mipi-camera) interface for mediatek-genio

name: mediatek-genio

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.

slot Interface declaration:

  mediatek-genio-mipi-camera:
    interface: custom-device
    custom-device: mediatek-genio-mipi-camera
    devices:
      - /dev/mtk_hcp
      - /dev/mtk_ccd
      - /dev/vcu2

This request has been added to the queue for review by the @reviewers team.

Hey @kxuan

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?

Thanks

Hi @jslarraz , Thanks for your following up.

We currently have mediatek-genio-camd-g1200 to run the userspace daemon. This snap is for MediaTek Genio 1200. We also plan to have mediatek-genio-camd-g510 for Genio 510 and mediatek-genio-camd-g700 for Genio 700.

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).

Thanks!

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?

Yes. That’s exactly correct!

I think this makes sense to me, +1

1 Like

Hello @kxuan :slight_smile:

Given the reasoning provided, your requests also make sense to me, so +1 from my side also too!

+2 for, 0 against allowing mediatek-genio to declare the mediatek-genio-mipi-camera slot. The publisher is vetted. This is now live.

Next revision uploaded to the store should pass automatic review. Please let me know if something does not work as expected