我是靠谱客的博主 直率手机,最近开发中收集的这篇文章主要介绍rv1108 sdk中的isp和sensor启动流程,觉得挺不错的,现在分享给大家,希望可以做个参考。

概述

  • Isp init and sensor check id

cif_isp11_v4l2_drv_probe
->cif_isp11_create
    -> cif_isp11_pltfrm_dev_init
    -> cif_isp11_pltfrm_soc_init
    -> cif_isp11_img_srcs_init
        ->cif_isp11_pltfrm_get_img_src_device
            ->cif_isp11_img_src_to_img_src
                ->cif_isp11_img_src_v4l2_i2c_subdev_to_img_src
                ->ioctl PLTFRM_CIFCAM_ATTACH
                ->ov_camera_module_ioctl
                -> ov_camera_module_init
                    -> pltfrm_camera_module_init
                        -> pltfrm_camera_module_get_data
                        -> pltfrm_camera_module_init_gpio
                ->ov_camera_module_attach
                    -> ov_camera_module_s_power(on)
                        -> pltfrm_camera_module_s_power
                            -> pltfrm_camera_module_set_pm_state
                                ->power/clk/reset/
                            -> pltfrm_camera_module_set_pinctrl_state(pins_default)
                        -> pltfrm_camera_module_set_pin_state(PD)
                    ->ov4689_check_camera_id
                    -> ov_camera_module_s_power(off)
                        -> pltfrm_camera_module_set_pin_state(PD)
                        -> pltfrm_camera_module_s_power
                            -> pltfrm_camera_module_set_pinctrl_state(pins_sleep)
                            -> pltfrm_camera_module_set_pm_state
                                -> reset/clk/power
    -> cif_isp11_register_isrs
    -> cif_isp11_init
        -> cif_isp11_s_input
            -> cif_isp11_input_index2inp
                -> cif_isp11_pltfrm_g_interface_config
                    -> cif_isp11_img_src_ioctl PLTFRM_CIFCAM_G_ITF_CFG
                    -> ov_camera_module_ioctl
        -> cif_isp11_init_stream SP MP DMA Y12
    ->cif_isp11_pltfrm_event_init SP MP DMA Y12
    -> init_output_formats
-> v4l2_device_register
-> cif_isp11_v4l2_register_video_device SP
-> register_cifisp_device ISP
-> cif_isp11_v4l2_register_video_device MP
-> cif_isp11_v4l2_register_video_device Y12
-> cif_isp11_v4l2_register_video_device DMA
-> cif_isp11_v4l2_register_imgsrc_subdev 

  •  user open camera:(蓝色为 camhal 调用, 黑色为 kernel 调用)

 ->CamHwItf::getCameraInfos     //此处在内核启动后的初始化会调用到,如果这里不调用,那么在系统接收拍照指令后 getfastvideo就会返回空指针
    ->open /dev/videoX

        -> cif_isp11_v4l2_open
    ->ioclt VIDIOC_QUERYCAP
    -> v4l2_querycap
    ->ioctl VIDIOC_ENUMINPUT
    -> v4l2_enum_input
->video_record_query_businfo
    -> ioctl VIDIOC_QUERYCAP

        -> v4l2_querycap
->getCamHwItf
->initHw

    ->open devices
->CamIsp11DevHwItf::Path::start
    ->getSensorModeData
        ->ioctl RK_VIDIOC_SENSOR_MODE_DATA

        -> v4l2_default_ioctl
            -> cif_isp11_img_src_ioctl
                -> cif_isp11_img_src_v4l2_subdev_ioctl
                    -> v4l2_subdev_call RK_VIDIOC_SENSOR_MODE_DATA
                    -> ov_camera_module_ioctl
                        -> ov4689_g_timings
    -> configIsp
    -> streamOn

        -> v4l_streamon
            -> cif_isp11_v4l2_streamon
                -> cif_isp11_streamon
                    -> cif_isp11_config_cif
                        -> cif_isp11_config_img_src
                            -> cif_isp11_img_src_set_state(power)
                                -> cif_isp11_img_src_s_power
                                    -> cif_isp11_img_src_v4l2_subdev_s_power
                                        -> ov_camera_module_s_power
                    -> cif_isp11_start
                        -> cif_isp11_img_src_set_state(streaming)
                            -> cif_isp11_img_src_s_streaming
                                -> ov4689_start_streaming
    -> mDequeueThread->run
->CamIsp11DevHwItf::Path::stop
    -> mDequeueThread->requestExitAndWait
    -> configIsp
    -> streamOff

        ->v4l_streamoff
            ->cif_isp11_v4l2_streamoff
                ->cif_isp11_v4l2_do_streamoff
                    ->cif_isp11_streamoff
                        ->cif_isp11_stop
                            ->cif_isp11_img_src_set_state
                                ->cif_isp11_img_src_s_streaming
                                    ->cif_isp11_img_src_v4l2_subdev_s_streaming
                                        ->imx_camera_module_s_stream
                                            -> ov4689_stop_streaming


参考文档:rk sdk

最后

以上就是直率手机为你收集整理的rv1108 sdk中的isp和sensor启动流程的全部内容,希望文章能够帮你解决rv1108 sdk中的isp和sensor启动流程所遇到的程序开发问题。

如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(59)

评论列表共有 0 条评论

立即
投稿
返回
顶部