file path:kernel/arch/arm/boot/dts/qcom/sdm660-camera-sensor-mtp_gm8plus.dtsi
example:
qcom,camera@2 {
cell-index = <2>;
compatible = "qcom,camera";
reg = <0x02>;
qcom,csiphy-sd-index = <2>;
qcom,csid-sd-index = <2>;
qcom,mount-angle = <270>;
//qcom,actuator-src = <&actuator2>;
//qcom,led-flash-src = <&led_flash1>;
//qcom,eeprom-src = <&eeprom2>;
cam_vio-supply = <&pm660_l11>;
cam_vana-supply = <&cam_avdd_gpio_regulator>;
cam_vdig-supply = <&cam_dvdd_gpio_regulator>;
qcom,cam-vreg-name = "cam_vio", "cam_vana", "cam_vdig";
qcom,cam-vreg-min-voltage = <1780000 0 0>;
qcom,cam-vreg-max-voltage = <1950000 0 0>;
qcom,cam-vreg-op-mode = <105000 0 0>;
qcom,gpio-no-mux = <0>;
pinctrl-names = "cam_default", "cam_suspend";
pinctrl-0 = <&cam_sensor_mclk1_active
&cam_sensor_front_active>;
pinctrl-1 = <&cam_sensor_mclk1_suspend
&cam_sensor_front_suspend>;
gpios = <&tlmm 33 0>,
<&tlmm 47 0>;
qcom,gpio-reset = <1>;
qcom,gpio-req-tbl-num = <0 1>;
qcom,gpio-req-tbl-flags = <1 0>;
qcom,gpio-req-tbl-label = "CAMIF_MCLK1",
"CAM_RESET1";
qcom,sensor-position = <1>;
qcom,sensor-mode = <0>;
qcom,cci-master = <1>;
status = "ok";
clocks = <&clock_mmss MCLK1_CLK_SRC>,
<&clock_mmss MMSS_CAMSS_MCLK1_CLK>;
clock-names = "cam_src_clk", "cam_clk";
qcom,clock-rates = <24000000 0>;
};
cam_avdd_gpio_regulator: cam_avdd_fixed_regulator {
compatible = "regulator-fixed";
regulator-name = "cam_avdd_gpio_regulator";
regulator-min-microvolt = <2800000>;
regulator-max-microvolt = <2800000>;
enable-active-high;
gpio = <&tlmm 31 0>;
vin-supply = <&pm660l_bob>;
};
cam_dvdd_gpio_regulator: cam_dvdd_fixed_regulator {
compatible = "regulator-fixed";
regulator-name = "cam_dvdd_gpio_regulator";
regulator-min-microvolt = <1200000>;
regulator-max-microvolt = <1200000>;
enable-active-high;
gpio = <&tlmm 29 0>;
vin-supply = <&pm660_s5>;
};
file path:vendor/qcom/proprietary/mm-camera/mm-camera2/media-controller/modules/sensors/sensor/libs/
example:
1.创建sensor库文件夹。
2.添加以下驱动恩建及Makefile:
(1)
(2)
(3)Make file
key note:在
file path:vendor/qcom/proprietary/mm-camera/mm-camera2/media-controller/modules/sensors/chromatix/0310/
example:
1.创建sensor的效果文件夹。
2.添加效果文件。
1.创建
file path:vendor/qcom-proprietary/mm-camera/mm-camera2/media-controller/modules/sensors/configs/
example:
s5k3h7_sunny_a8s05a_front_i_common
s5k3h7_sunny_a8s05a_front_i_postproc
s5k3h7_sunny_a8s05a_front_i_snapshot
s5k3h7_sunny_a8s05a_front_i_snapshot
s5k3h7_sunny_a8s05a_front_i_video_full
s5k3h7_sunny_a8s05a_front_i_cpp_video_full
s5k3h7_sunny_a8s05a_front_i_cpp_preview
s5k3h7_sunny_a8s05a_front_i_cpp_snapshot
s5k3h7_sunny_a8s05a_front_i_cpp_liveshot
s5k3h7_sunny_a8s05a_front_i_zsl_preview
s5k3h7_sunny_a8s05a_front_i_zsl_video
s5k3h7_sunny_a8s05a_front_i_preview
s5k3h7_sunny_a8s05a_front_i_preview
s5k3h7_sunny_a8s05a_front_i_default_video
s5k3h7_sunny_a8s05a_front_i_cpp_video
s5k3h7_sunny_a8s05a_front_i_cpp_preview
s5k3h7_sunny_a8s05a_front_i_cpp_snapshot
s5k3h7_sunny_a8s05a_front_i_cpp_liveshot
s5k3h7_sunny_a8s05a_front_i_a3_default_preview
s5k3h7_sunny_a8s05a_front_i_a3_default_video
s5k3h7_sunny_a8s05a_front_i_hfr_60
s5k3h7_sunny_a8s05a_front_i_hfr_60
s5k3h7_sunny_a8s05a_front_i_hfr_60
s5k3h7_sunny_a8s05a_front_i_cpp_hfr_60
s5k3h7_sunny_a8s05a_front_i_cpp_hfr_60
s5k3h7_sunny_a8s05a_front_i_cpp_hfr_60
s5k3h7_sunny_a8s05a_front_i_cpp_hfr_60
s5k3h7_sunny_a8s05a_front_i_a3_hfr_60
s5k3h7_sunny_a8s05a_front_i_a3_hfr_60
s5k3h7_sunny_a8s05a_front_i_hfr_90
s5k3h7_sunny_a8s05a_front_i_hfr_90
s5k3h7_sunny_a8s05a_front_i_hfr_90
s5k3h7_sunny_a8s05a_front_i_cpp_hfr_90
s5k3h7_sunny_a8s05a_front_i_cpp_hfr_90
s5k3h7_sunny_a8s05a_front_i_cpp_hfr_90
s5k3h7_sunny_a8s05a_front_i_cpp_hfr_90
s5k3h7_sunny_a8s05a_front_i_a3_hfr_90
s5k3h7_sunny_a8s05a_front_i_a3_hfr_90
s5k3h7_sunny_a8s05a_front_i_hfr_120
s5k3h7_sunny_a8s05a_front_i_hfr_120
s5k3h7_sunny_a8s05a_front_i_hfr_120
s5k3h7_sunny_a8s05a_front_i_cpp_hfr_120
s5k3h7_sunny_a8s05a_front_i_cpp_hfr_120
s5k3h7_sunny_a8s05a_front_i_cpp_hfr_120
s5k3h7_sunny_a8s05a_front_i_cpp_hfr_120
s5k3h7_sunny_a8s05a_front_i_a3_hfr_120
s5k3h7_sunny_a8s05a_front_i_a3_hfr_120
key note:文件中一系列"s5k3h7_sunny_a8s05a_front_i_***" name一定要与1.2.2中添加的效果文件中的Makefile里的LOCAL_MODULE名字一样。
2.配置make file文件:
file path:/vendor/qcom-proprietary/mm-camera/mm-camera2/media-controller/modules/sensors/configs/Android.mk
example:
include $(CLEAR_VARS)
LOCAL_MODULE:= gm8plus_s5k3h7_sunny_front_i_chromatix.xml
LOCAL_MODULE_CLASS := EXECUTABLES
LOCAL_SRC_FILES := gm8plus_s5k3h7_sunny_front_i_chromatix.xml
LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR)/etc/camera
LOCAL_MODULE_OWNER := qti
include $(BUILD_PREBUILT)
file path:vendor/qcom/proprietary/mm-camera/mm-camera2/media-controller/modules/sensors/configs/gm8plus_camera.xml
example:
2
gm8plus_s5k3h7_sunny_front_i
pmic
gm8plus_s5k3h7_sunny_front_i_chromatix
1
FRONT
270
2
0x1F
0x4320
0
1.97
2.0
1.9
84.0
63.0
0.1
key note:上述代码中的SensorName、EepromName和ChromatixName一定要填写正确。
file path:vendor/qcom/proprietary/common/config/device-vendor.mk
example:
MM_CAMERA += libchromatix_gm8plus_s5k3h7_sunny_front_i_common
MM_CAMERA += libchromatix_gm8plus_s5k3h7_sunny_front_i_postproc
MM_CAMERA += libchromatix_gm8plus_s5k3h7_sunny_front_i_cpp_preview
MM_CAMERA += libchromatix_gm8plus_s5k3h7_sunny_front_i_cpp_snapshot
MM_CAMERA += libchromatix_gm8plus_s5k3h7_sunny_front_i_cpp_liveshot
MM_CAMERA += libchromatix_gm8plus_s5k3h7_sunny_front_i_cpp_us_chromatix
MM_CAMERA += libchromatix_gm8plus_s5k3h7_sunny_front_i_cpp_ds_chromatix
MM_CAMERA += libchromatix_gm8plus_s5k3h7_sunny_front_i_cpp_video_full
MM_CAMERA += libchromatix_gm8plus_s5k3h7_sunny_front_i_cpp_video
MM_CAMERA += libchromatix_gm8plus_s5k3h7_sunny_front_i_cpp_hfr_120
MM_CAMERA += libchromatix_gm8plus_s5k3h7_sunny_front_i_cpp_hfr_90
MM_CAMERA += libchromatix_gm8plus_s5k3h7_sunny_front_i_cpp_hfr_60
MM_CAMERA += libchromatix_gm8plus_s5k3h7_sunny_front_i_a3_default_preview
MM_CAMERA += libchromatix_gm8plus_s5k3h7_sunny_front_i_a3_default_video
MM_CAMERA += libchromatix_gm8plus_s5k3h7_sunny_front_i_a3_hfr_60
MM_CAMERA += libchromatix_gm8plus_s5k3h7_sunny_front_i_a3_hfr_90
MM_CAMERA += libchromatix_gm8plus_s5k3h7_sunny_front_i_a3_hfr_120
MM_CAMERA += libchromatix_gm8plus_s5k3h7_sunny_front_i_zsl_preview
MM_CAMERA += libchromatix_gm8plus_s5k3h7_sunny_front_i_zsl_video
MM_CAMERA += libchromatix_gm8plus_s5k3h7_sunny_front_i_snapshot
MM_CAMERA += libchromatix_gm8plus_s5k3h7_sunny_front_i_video_full
MM_CAMERA += libchromatix_gm8plus_s5k3h7_sunny_front_i_preview
MM_CAMERA += libchromatix_gm8plus_s5k3h7_sunny_front_i_liveshot
MM_CAMERA += libchromatix_gm8plus_s5k3h7_sunny_front_i_default_video
MM_CAMERA += libchromatix_gm8plus_s5k3h7_sunny_front_i_hfr_60
MM_CAMERA += libchromatix_gm8plus_s5k3h7_sunny_front_i_hfr_90
MM_CAMERA += libchromatix_gm8plus_s5k3h7_sunny_front_i_hfr_120
MM_CAMERA += libmmcamera_gm8plus_s5k3h7_sunny_front_i
MM_CAMERA += gm8plus_s5k3h7_sunny_front_i_chromatix.xml