hi,NXP:
我司最近在调试一款imx8qxp的android11的系统上的摄像头功能。发现有如下问题:
使用环境:imx8qxp android11 系统 OV5640_MIPI接口的摄像头 竖屏的mipi屏幕
在拍照的时候发现有下面的问题:
1)我是竖屏的mipi屏。摄像功能打开后会顺时针旋转90度变为横屏的应用。
2)摄像拍照预览的时候,预览整体图像为逆时针旋转90度(这个不需要旋转,主要是这个问题)
下面的是我的dts的前后摄像头配置:
&i2c_mipi_csi0 {
#address-cells = <1>;
#size-cells = <0>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_i2c_mipi_csi0>;
clock-frequency = <100000>;
status = "okay";
/*前摄*/
ov5640: ov5640@3c {
compatible = "ovti,ov5640";
reg = <0x3c>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_parallel_csi>;
clocks = <&pi0_misc_lpcg 0>;
assigned-clocks = <&pi0_misc_lpcg 0>;
assigned-clock-rates = <24000000>;
clock-names = "xclk";
powerdown-gpios = <&lsio_gpio3 2 GPIO_ACTIVE_HIGH>;
reset-gpios = <&lsio_gpio3 3 GPIO_ACTIVE_LOW>;
csi_id = <0>;
mclk = <24000000>;
mclk_source = <0>;
status = "okay";
port {
ov5640_ep: endpoint {
remote-endpoint = <¶llel_csi_ep>;
bus-type = <5>; /* V4L2_FWNODE_BUS_TYPE_PARALLEL */
bus-width = <8>;
vsync-active = <0>;
hsync-active = <1>;
pclk-sample = <1>;
};
};
};
/*后摄*/
ov5640_mipi: ov5640@3b {
compatible = "ovti,ov5640";
reg = <0x3b>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_mipi_csi0>;
clocks = <&pi0_misc_lpcg 0>;
assigned-clocks = <&pi0_misc_lpcg 0>;
assigned-clock-rates = <24000000>;
clock-names = "xclk";
clock-frequency = <24000000>;
rotation=<180>;
powerdown-gpios = <&lsio_gpio3 7 GPIO_ACTIVE_HIGH>;
reset-gpios = <&lsio_gpio3 8 GPIO_ACTIVE_LOW>;
csi_id = <1>;
mclk = <24000000>;
mclk_source = <0>;
status = "okay";
port {
ov5640_ep_mipi: endpoint {
remote-endpoint = <&mipi_csi0_ep>;
bus-type = <4>; /* V4L2_FWNODE_BUS_TYPE_CSI2_DPHY */
clock-lanes = <0>;
data-lanes = <1 2>;
};
};
};
};
我尝试在frameworks/base/进行修改,发现并没有效。
我该如何在修改预览角度不对的问题呢?
谢谢!!!
你可以试着改在aosp的默认camera app源码中的预览方向(可以实现)。主要是应用层控制了方向,不是底层代码。