AnsweredAssumed Answered

imx6 adv7180 green screen

Question asked by 昌清 黄 on Jul 19, 2017
Latest reply on Jul 20, 2017 by Bio_TICFSL

imx6q  Android6.0

 

When not connected to the camera expected to be blue screen, but the failure to open the camera

 

adv7180   ANI1 not connect camera   ANI2 connect camera   

system boot log:

 

root@sabresd_6dq:/ # logcat -s FslCameraHAL
--------- beginning of main
--------- beginning of system
01-01 07:30:04.818   217   217 I FslCameraHAL: void CameraHAL::enumSensorSet()
01-01 07:30:04.819   217   217 I FslCameraHAL: int32_t CameraHAL::matchDevNodes()
01-01 07:30:04.819   217   217 I FslCameraHAL: getNodeName: dev path:/devideo0
01-01 07:30:05.253   217   217 I FslCameraHAL: getNodeName: node name:mxc_v4l2
01-01 07:30:05.253   217   217 I FslCameraHAL: getNodeNames: node name:mxc_v4l2,adv7180_decoder
01-01 07:30:05.274   217   217 I FslCameraHAL: getNodeName: dev path:/devideo1
01-01 07:30:05.289   217   217 W FslCameraHAL: int32_t CameraHAL::getNodeName(const char*, char*, size_t) open dev path:/devideo1 failed:Trn
01-01 07:30:05.289   217   217 I FslCameraHAL: getNodeName: dev path:/devideo16
01-01 07:30:05.289   217   217 W FslCameraHAL: int32_t CameraHAL::getNodeName(const char*, char*, size_t) open dev path:/devideo16 failed:Pd
01-01 07:30:05.289   217   217 I FslCameraHAL: getNodeName: dev path:/devideo17
01-01 07:30:05.290   217   217 W FslCameraHAL: int32_t CameraHAL::getNodeName(const char*, char*, size_t) dev path:/devideo17 is not capture
01-01 07:30:05.290   217   217 I FslCameraHAL: getNodeName: dev path:/devideo18
01-01 07:30:05.291   217   217 W FslCameraHAL: int32_t CameraHAL::getNodeName(const char*, char*, size_t) dev path:/devideo18 is not capture
01-01 07:30:05.292   217   217 I FslCameraHAL: getNodeName: dev path:/devideo19
01-01 07:30:05.292   217   217 W FslCameraHAL: int32_t CameraHAL::getNodeName(const char*, char*, size_t) dev path:/devideo19 is not capture
01-01 07:30:05.292   217   217 I FslCameraHAL: matchPropertyName: index:0, adv7180_decoder
01-01 07:30:05.292   217   217 I FslCameraHAL: index:0, propName:adv7180_decoder
01-01 07:30:05.292   217   217 I FslCameraHAL: int32_t CameraHAL::matchNodeName(const char*, nodeSet*, int32_t)
01-01 07:30:05.292   217   217 I FslCameraHAL: matchNodeName: sensor:mxc_v4l2,adv7180_decoder, dev:/devideo0, node:adv7180_decoder, index:0
01-01 07:30:05.292   217   217 I FslCameraHAL: Camera ID 0: name mxc_v4l2,adv7180_decoder, Facing 0, orientation 0, dev path /devideo0
01-01 07:30:05.292   217   217 I FslCameraHAL: matchPropertyName: index:1, 0
01-01 07:30:05.292   217   217 I FslCameraHAL: create id:0 adv7180 tvin device
01-01 07:30:05.292   217   217 I FslCameraHAL: Camera::Camera(int32_t, int32_t, int32_t, char*):0: new camera device
01-01 07:30:05.293   217   217 I FslCameraHAL: camera number is 1
01-01 07:30:05.296   217   217 I FslCameraHAL: int CameraHAL::getCameraInfo(int, camera_info*): camera id 0: info=0xbefd7678
01-01 07:30:05.765   217   217 E FslCameraHAL: virtual android::status_t TVINDevice::initSensorStaticData() Error!Get invalid mode: 16777215
01-01 07:30:05.777   217   217 E FslCameraHAL: int32_t Camera::getInfo(camera_info*) initSensorStaticData failed
01-01 07:30:05.777   217   217 I FslCameraHAL: int CameraHAL::getCameraInfo(int, camera_info*): camera id 0: info=0xbefd7720
01-01 07:30:06.234   217   217 E FslCameraHAL: virtual android::status_t TVINDevice::initSensorStaticData() Error!Get invalid mode: 16777215
01-01 07:30:06.248   217   217 E FslCameraHAL: int32_t Camera::getInfo(camera_info*) initSensorStaticData failed
01-01 07:30:28.884   217   619 I FslCameraHAL: int CameraHAL::getCameraInfo(int, camera_info*): camera id 0: info=0xab8c0638
01-01 07:30:29.374   217   619 E FslCameraHAL: virtual android::status_t TVINDevice::initSensorStaticData() Error!Get invalid mode: 16777215
01-01 07:30:29.399   217   619 E FslCameraHAL: int32_t Camera::getInfo(camera_info*) initSensorStaticData failed
01-01 07:30:29.399   217   619 I FslCameraHAL: int CameraHAL::getCameraInfo(int, camera_info*): camera id 0: info=0xab8c0568
01-01 07:30:29.910   217   619 E FslCameraHAL: virtual android::status_t TVINDevice::initSensorStaticData() Error!Get invalid mode: 16777215
01-01 07:30:29.932   217   619 E FslCameraHAL: int32_t Camera::getInfo(camera_info*) initSensorStaticData failed
so  i change this:

diff --git a/myandroid/hardware/imx/mx6/libcamera3/TVINDevice.cpp b/myandroid/hardware/imx/mx6/libcamera3/TVINDevice.cpp
index 09c6652..66ecaec 100644
--- a/myandroid/hardware/imx/mx6/libcamera3/TVINDevice.cpp
+++ b/myandroid/hardware/imx/mx6/libcamera3/TVINDevice.cpp
@@ -52,9 +52,9 @@ status_t TVINDevice::initSensorStaticData()
else if (mSTD == V4L2_STD_NTSC)
ALOGI("%s Get current mode: NTSC", __func__);
else {
- ALOGE("%s Error!Get invalid mode: %llu", __func__, mSTD);
- close(fd);
- return BAD_VALUE;
+// ALOGE("%s Error!Get invalid mode: %llu", __func__, mSTD);
+// close(fd);
+// return BAD_VALUE;
}

if (ioctl(fd, VIDIOC_S_STD, &mSTD) < 0) {
@@ -209,8 +209,8 @@ int32_t TVINDevice::TVinStream::onDeviceConfigureLocked()
else if (mSTD == V4L2_STD_NTSC)
ALOGI("%s Get current mode: NTSC", __func__);
else {
- ALOGE("%s Error!Get invalid mode: %llu", __func__, mSTD);
- return BAD_VALUE;
+// ALOGE("%s Error!Get invalid mode: %llu", __func__, mSTD);
+// return BAD_VALUE;
}

if (ioctl(mDev, VIDIOC_S_STD, &mSTD) < 0) {
huangcq@cookoo:~/work/a40/os_fsl_6.0/myandroid/hardware/imx/mx6/libcamera3$

 

I turned on the camera and there was this phenomenon.

Outcomes