Android:展锐camera调试

本文详细介绍了在Android系统中针对展锐平台进行camera调试的过程,涉及的文件包括BoardConfig.mk、sensor_config.xml、设备树配置及库文件等。通过修改这些文件,可以配置后摄gc5025传感器,包括AF驱动、ISP参数和Tuning参数。内容涵盖了kernel、vendor目录下的多个组件,以及如何添加和修改特定于传感器的参数。
摘要由CSDN通过智能技术生成

展锐平台camera调试,主要涉及的文件修改,以后摄gc5025为例:

device/sprd/roc1/ud710_2h10/BoardConfig.mk
device/sprd/roc1/ud710_2h10/camera/sensor_config.xml

kernel4.14/arch/arm64/boot/dts/sprd/ud710-2h10.dts

vendor/sprd/modules/libcamera/sensor/af_drv/cn3937/Android.mk
vendor/sprd/modules/libcamera/sensor/af_drv/cn3937/af_cn3927.h
vendor/sprd/modules/libcamera/sensor/af_drv/cn3937/af_cn3927.c
vendor/sprd/modules/libcamera/sensor/af_drv/vcm_lib_cfg.mk
vendor/sprd/modules/libcamera/sensor/sensor_cfg.c
vendor/sprd/modules/libcamera/sensor/sensor_drv/classic/Galaxycore/gc5035/Android.mk
vendor/sprd/modules/libcamera/sensor/sensor_drv/classic/Galaxycore/gc5035/sensor_gc5035_mipi_raw.h
vendor/sprd/modules/libcamera/sensor/sensor_drv/classic/Galaxycore/gc5035/sensor_gc5035_mipi_raw.c
vendor/sprd/modules/libcamera/sensor/sensor_drv/sensor_lib_cfg.mk
vendor/sprd/modules/libcamera/sensor/tuning_param/roc1/Galaxycore/gc5035/Android.mk
vendor/sprd/modules/libcamera/sensor/tuning_param/roc1/Galaxycore/gc5035/param_manager.c
vendor/sprd/modules/libcamera/sensor/tuning_param/roc1/Galaxycore/gc5035/parameters/NR/common/normal/3dnr_param.h
vendor/sprd/modules/libcamera/sensor/tuning_param/roc1/Galaxycore/gc5035/parameters/NR/common/normal/bayer_nr_param.h
vendor/sprd/modules/libcamera/sensor/tuning_param/roc1/Galaxycore/gc5035/parameters/NR/common/normal/bpc_param.h
vendor/sprd/modules/libcamera/sensor/tuning_param/roc1/Galaxycore/gc5035/parameters/NR/common/normal/cap_3dnr_param.h
vendor/sprd/modules/libcamera/sensor/tuning_param/roc1/Galaxycore/gc5035/parameters/NR/common/normal/cce_uvdiv_param.h
vendor/sprd/modules/libcamera/sensor/tuning_param/roc1/Galaxycore/gc5035/parameters/NR/common/normal/cfai_param.h
vendor/sprd/modules/libcamera/sensor/tuning_param/roc1/Galaxycore/gc5035/parameters/NR/common/normal/cnr_param.h
vendor/sprd/modules/libcamera/sensor/tuning_param/roc1/Galaxycore/gc5035/parameters/NR/common/normal/ee_param.h
vendor/sprd/modules/libcamera/sensor/tuning_param/roc1/Galaxycore/gc5035/parameters/NR/common/normal/grgb_param.h
vendor/sprd/modules/libcamera/sensor/tuning_param/roc1/Galaxycore/gc5035/parameters/NR/common/normal/iircnr_param.h
vendor/sprd/modules/libcamera/sensor/tuning_param/roc1/Galaxycore/gc5035/parameters/NR/common/normal/imbalance_param.h
vendor/sprd/modules/libcamera/sensor/tuning_param/roc1/Galaxycore/gc5035/parameters/NR/common/normal/ivst_param.h
vendor/sprd/modules/libcamera/sensor/tuning_param/roc1/Galaxycore/gc5035/parameters/NR/common/normal/ltm_param.h
vendor/sprd/modules/libcamera/sensor/tuning_param/roc1/Galaxycore/gc5035/parameters/NR/common/normal/ppe_param.h
vendor/sprd/modules/libcamera/sensor/tuning_param/roc1/Galaxycore/gc5035/parameters/NR/common/normal/pre_3dnr_param.h
vendor/sprd/modules/libcamera/sensor/tuning_param/roc1/Galaxycore/gc5035/parameters/NR/common/normal/rgb_afm_param.h
vendor/sprd/modules/libcamera/sensor/tuning_param/roc1/Galaxycore/gc5035/parameters/NR/common/normal/rgb_dither_param.h
vendor/sprd/modules/libcamera/sensor/tuning_param/roc1/Galaxycore/gc5035/parameters/NR/common/normal/sw3dnr_param.h
vendor/sprd/modules/libcamera/sensor/tuning_param/roc1/Galaxycore/gc5035/parameters/NR/common/normal/uv_cdn_param.h
vendor/sprd/modules/libcamera/sensor/tuning_param/roc1/Galaxycore/gc5035/parameters/NR/common/normal/uv_postcdn_param.h
vendor/sprd/modules/libcamera/sensor/tuning_param/roc1/Galaxycore/gc5035/parameters/NR/common/normal/vst_param.h
vendor/sprd/modules/libcamera/sensor/tuning_param/roc1/Galaxycore/gc5035/parameters/NR/common/normal/ynr_param.h
vendor/sprd/modules/libcamera/sensor/tuning_param/roc1/Galaxycore/gc5035/parameters/NR/common/normal/ynrs_param.h
vendor/sprd/modules/libcamera/sensor/tuning_param/roc1/Galaxycore/gc5035/parameters/NR/common/normal/yuv_noisefilter_param.h
vendor/sprd/modules/libcamera/sensor/tuning_param/roc1/Galaxycore/gc5035/parameters/NR/common/normal/yuv_precdn_param.h
vendor/sprd/modules/libcamera/sensor/tuning_param/roc1/Galaxycore/gc5035/parameters/isp_nr.h
vendor/sprd/modules/libcamera/sensor/tuning_param/roc1/Galaxycore/gc5035/parameters/sensor_gc5035_raw_param_cap_0.c
vendor/sprd/modules/libcamera/sensor/tuning_param/roc1/Galaxycore/gc5035/parameters/sensor_gc5035_raw_param_common.c
vendor/sprd/modules/libcamera/sensor/tuning_param/roc1/Galaxycore/gc5035/parameters/sensor_gc5035_raw_param_main.c
vendor/sprd/modules/libcamera/sensor/tuning_param/roc1/Galaxycore/gc5035/parameters/sensor_gc5035_raw_param_prv_0.c
vendor/sprd/modules/libcamera/sensor/tuning_param/roc1/Galaxycore/gc5035/parameters/sensor_gc5035_raw_param_video_0.c
vendor/sprd/modules/libcamera/sensor/tuning_param/roc1/Galaxycore/gc5035/parameters/sensor_gc5035_raw_param_video_1.c
vendor/sprd/modules/libcamera/sensor/tuning_param/tunning_lib_cfg.mk

vendor/sprd/modules/libcamera/sensor/af_drv/cn3937/
vendor/sprd/modules/libcamera/sensor/sensor_drv/classic/Galaxycore/gc5035/
vendor/sprd/modules/libcamera/sensor/tuning_param/roc1/Galaxycore/gc5035/

以上driver和param新增的目录就不列举了,一般芯片厂会提供,至于param参数,AF文件也可以参考平台已有的代码添加,其他的主要修改点如下:

device/sprd/roc1/ud710_2h10/BoardConfig.mk

#tuning param support list
TUNING_PARAM_LIST := "gc8034,gc8034_rear,hi846_front,hi846,gc5035"

device/sprd/roc1/ud710_2h10/camera/sensor_config.xml

  <!-->
  sensor id 0
  <-->
      <CameraModuleCfg>
        <SlotId>0</SlotId>
        <SensorName>gc5035</SensorName>
        <Facing>BACK</Facing>
        <Orientation>270</Orientation>
        <Resource_cost>0</Resource_cost>
        <VCM>
            <AfName>cn3927</AfName>
            <Mode>2</Mode>
        </VCM>
        <OTP>
            <E2prom>
                <OtpName>general</OtpName>
                <I2cAddr>0xa0</I2cAddr>
                <E2promNum>0</E2promNum>
                <E2promSize>8192</E2promSize>
            </E2prom>
        </OTP>
        <TuningParameter>
            <TuningName>gc5035</TuningName>
        </TuningParameter>
      </CameraModuleCfg>

kernel4.14/arch/arm64/boot/dts/sprd/ud710-2h10.dts

&i2c0 {
	status = "okay";

    sensor_main2: sensor-main2@6c {
        compatible = "sprd,sensor-main2";
        reg = <0x6c>;

        clock-names = "clk_src","sensor_eb",
            "clk_96m","clk_76m8",
            "clk_48m","clk_26m";
        clocks = <&mm_clk CLK_SENSOR2>,<&mm_gate CLK_MM_SENSOR2_EB>,
            <&g12_pll CLK_TWPLL_96M>,<&g12_pll CLK_TWPLL_76M8>,
            <&g12_pll CLK_TWPLL_48M>,<&ext_26m>;
        vddio-supply = <&vddcamio>;
        vddcama-supply = <&vddcama0>;
        vddcamd-supply = <&vddcamd0>;
        vddcammot-supply = <&vddcammot>;
        sprd,phyid = <5>;
        csi = <&csi1>;
        reset-gpios = <&ap_gpio 41 0>;
        power-down-gpios = <&ap_gpio 40 0>;

        status = "okay";
    };
};

&i2c1 {
	status = "okay";

    sensor_sub: sensor-sub@20 {
        compatible = "sprd,sensor-sub";
        reg = <0x20>;

        clock-names = "clk_src","sensor_eb",
            "clk_96m","clk_76m8",
            "clk_48m","clk_26m";
        clocks = <&mm_clk CLK_SENSOR1>,<&mm_gate CLK_MM_SENSOR1_EB>,
            <&g12_pll CLK_TWPLL_96M>,<&g12_pll CLK_TWPLL_76M8>,
            <&g12_pll CLK_TWPLL_48M>,<&ext_26m>;
        vddio-supply = <&vddcamio>;
        vddcama-supply = <&vddcama1>;
        vddcamd-supply = <&vddcamd1>;
        vddcammot-supply = <&vddcammot>;
        sprd,phyid = <0>;
        csi = <&csi0>;
        reset-gpios = <&ap_gpio 45 0>;
        power-down-gpios = <&ap_gpio 47 0>;

        status = "okay";
    };

    sensor_main: sensor-main@6c {
        compatible = "sprd,sensor-main";
        reg = <0x6c>;

        clock-names = "clk_src","sensor_eb",
            "clk_96m","clk_76m8",
            "clk_48m","clk_26m";
        clocks = <&mm_clk CLK_SENSOR0>,<&mm_gate CLK_MM_SENSOR0_EB>,
            <&g12_pll CLK_TWPLL_96M>,<&g12_pll CLK_TWPLL_76M8>,
            <&g12_pll CLK_TWPLL_48M>,<&ext_26m>;
        vddio-supply = <&vddcamio>;
        vddcama-supply = <&vddcama1>;
        vddcamd-supply = <&vddcamd1>;
        vddcammot-supply = <&vddcammot>;
        sprd,phyid = <3>;
        csi = <&csi0>;
        reset-gpios = <&ap_gpio 44 0>;
        power-down-gpios = <&ap_gpio 46 0>;

        status = "okay";
    };
};

vendor/sprd/modules/libcamera/sensor/af_drv/vcm_lib_cfg.mk

PRODUCT_PACKAGES += libvcm_dw9714p \
                    libvcm_lc898213 \
                    libvcm_dw9768v \
                    libvcm_dw9800 \
                    libvcm_dw9714 \
                    libvcm_dw9718s \
                    libvcm_zc524 \
                    libvcm_cn3927

vendor/sprd/modules/libcamera/sensor/sensor_cfg.c

/*---------------------------------------------------------------------------*
 *                         Constant Variables                                *
 *---------------------------------------------------------------------------*/
const SENSOR_MATCH_T back_sensor_infor_tab[] = {
... ...

// gc area
#ifdef GC5035
    {MODULE_SUNNY, "gc5035", &g_gc5035_mipi_raw_info, {&cn3927v_drv_entry, 0}, {&general_otp_entry, 0x6e, SINGLE_CAM_ONE_EEPROM, 8192}},
#endif

};

vendor/sprd/modules/libcamera/sensor/sensor_drv/sensor_lib_cfg.mk

PRODUCT_PACKAGES += libsensor_imx351 \
    ... ...
	libsensor_gc8034 \
	libsensor_gc5035

vendor/sprd/modules/libcamera/sensor/tuning_param/tunning_lib_cfg.mk

#roc1
PRODUCT_PACKAGES += libparam_gc5035

评论 4
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

leezs0614

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值