imx8qxp, open the Android camera application, the preview interface has no content

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

imx8qxp, open the Android camera application, the preview interface has no content

2,123件の閲覧回数
relax-wu
Contributor IV

Hi

Who can help me?

SDK:Android Q10.0.0_2.2.0_AUTO

nvp6324 connect 4 cameras
The evs function of the product mek_8q_car-userdebug has been adjusted, but the camera apk cannot be used to open the camera.
Therefore, I switched the product to mek_8q-userdebug to test the traditional method of using the camera, and I am currently experiencing problems:
The camera apk opens and previews no content.

relax-wu_0-1616980476967.png

Core video information

mek_8q:/ # ls sys/class/video4linux/
v4l-subdev0 v4l-subdev2 v4l-subdev4 video0 video12 video2
v4l-subdev1 v4l-subdev3 v4l-subdev5 video1 video13 video3
mek_8q:/ # cat sys/class/video4linux/video0/name
mxc_isi.0.capture
mek_8q:/ # cat sys/class/video4linux/video1/name
mxc_isi.1.capture
mek_8q:/ # cat sys/class/video4linux/video12/name
vpu decoder
mek_8q:/ # cat sys/class/video4linux/video13/name
vpu encoder
mek_8q:/ # cat sys/class/video4linux/video2/name
mxc_isi.2.capture
mek_8q:/ # cat sys/class/video4linux/video3/name
mxc_isi.3.capture
mek_8q:/ #

main error log

03-26 02:12:12.937   433  2408 E Camera3-Stream: getBuffer: wait for output buffer return timed out after 8000ms (max_buffers 2)
03-26 02:12:12.938   433  2408 V Camera3-Stream: getBuffer: Already dequeued max output buffers (2), wait for next returned one.

logcat_boot.log is the log of Android boot。

logcat_preview.log is the log of camera apk preview.
 

ラベル(2)
0 件の賞賛
返信
9 返答(返信)

2,114件の閲覧回数
Zhiming_Liu
NXP TechSupport
NXP TechSupport

Hi

Can you offer the kernel log?

BR

Zhiming

0 件の賞賛
返信

2,109件の閲覧回数
relax-wu
Contributor IV

Hi

  Thank you for your reply,
  Please.

Best wishes

0 件の賞賛
返信

2,104件の閲覧回数
Zhiming_Liu
NXP TechSupport
NXP TechSupport

Hi

 

The error happened in CameraHAL.Failed in below command.You need see if your camera support VIDIOC_DBG_G_CHIP_IDENT.

 

 

 

 

ret = ioctl(fd, VIDIOC_DBG_G_CHIP_IDENT, &vidChip);

 

 

 

 

0 件の賞賛
返信

2,075件の閲覧回数
relax-wu
Contributor IV

Please help to see how to solve it。

Here is the main problem

 

ret = ioctl(mDev, VIDIOC_S_PARM, &param);
if (ret < 0) {
    ALOGE("%s: VIDIOC_S_PARM Failed: %s", __func__, strerror(errno));
    return ret;
}

 

error log

 

E FslCameraHAL: onDeviceConfigureLocked: VIDIOC_S_PARM Failed: Not a typewriter
E FslCameraHAL: handleConfigureLocked onDeviceConfigure failed

 

in the kernel

 

//vendor/nxp-opensource/kernel_imx/drivers/staging/media/imx/imx8-isi-cap.c
static int mxc_isi_cap_s_parm(struct file *file, void *fh,
			      struct v4l2_streamparm *a)
{
	struct mxc_isi_cap_dev *isi_cap = video_drvdata(file);
	struct v4l2_subdev *sd;

	sd = mxc_get_remote_subdev(isi_cap, __func__);
	if (!sd)
		return -ENODEV;

	return v4l2_s_parm_cap(video_devdata(file), sd, a);
}

 

Did not call nvp6324_s_parm。

The following three functions are called

 

.enum_frame_size = nvp6324_enum_framesizes,
.get_fmt = nvp6324_get_fmt,
.set_fmt = nvp6324_set_fmt,

 

 

0 件の賞賛
返信

2,068件の閲覧回数
Zhiming_Liu
NXP TechSupport
NXP TechSupport

I will consult with software team. 

0 件の賞賛
返信

2,045件の閲覧回数
relax-wu
Contributor IV

Hi nxf65025

    Is there any good news?

Best wishes

0 件の賞賛
返信

2,064件の閲覧回数
relax-wu
Contributor IV

thank you very much
The relevant documents are as follows:

//HAL
//vendor/nxp-opensource/imx/libcamera3/ImxCamera.cpp
ImxCamera::ImxCameraDMAStream::onDeviceConfigureLocked()
	ret = ioctl(mDev, VIDIOC_S_PARM, &param);
    if (ret < 0) {
        ALOGE("%s: VIDIOC_S_PARM Failed: %s", __func__, strerror(errno));
        return ret;
    }

//kernel
//vendor/nxp-opensource/kernel_imx/drivers/staging/media/imx/imx8-isi-cap.c
static int mxc_isi_cap_s_parm(struct file *file, void *fh,
			      struct v4l2_streamparm *a)
{
	struct mxc_isi_cap_dev *isi_cap = video_drvdata(file);
	struct v4l2_subdev *sd;

	sd = mxc_get_remote_subdev(isi_cap, __func__);
	if (!sd)
		return -ENODEV;

	return v4l2_s_parm_cap(video_devdata(file), sd, a);
}
//vendor/nxp-opensource/kernel_imx/drivers/media/platform/imx8/nvp6324/nvp6324_video.c
static int nvp6324_s_parm(struct v4l2_subdev *sd, struct v4l2_streamparm *a)
{
    ......
}
0 件の賞賛
返信

2,084件の閲覧回数
relax-wu
Contributor IV

I saw another problem I was trying to solve

E FslCameraHAL: onDeviceConfigureLocked: VIDIOC_S_PARM Failed: Not a typewriter
E FslCameraHAL: handleConfigureLocked onDeviceConfigure failed
0 件の賞賛
返信

2,090件の閲覧回数
relax-wu
Contributor IV

I have solved this problem,

ioctl(fd, VIDIOC_DBG_G_CHIP_IDENT, &vidChip)

--- a/android_build/vendor/nxp-opensource/kernel_imx/drivers/staging/media/imx/imx8-isi-cap.c
+++ b/android_build/vendor/nxp-opensource/kernel_imx/drivers/staging/media/imx/imx8-isi-cap.c
@@ -1170,6 +1170,15 @@ static int mxc_isi_cap_s_selection(struct file *file, void *fh,
        return 0;
 }

+static int mxc_isi_cap_g_chip_ident(struct file *file, void *fh,
+                                       struct v4l2_dbg_chip_ident *chip)
+{
+       chip->match.type = V4L2_CHIP_MATCH_I2C_DRIVER;
+       strcpy(chip->match.name, "nvp6324_mipi_camera");
+
+       return 0;
+}
+
 static int mxc_isi_cap_enum_framesizes(struct file *file, void *priv,
                                       struct v4l2_frmsizeenum *fsize)
 {
@@ -1285,6 +1294,7 @@ static const struct v4l2_ioctl_ops mxc_isi_capture_ioctl_ops = {

        .vidioc_g_selection             = mxc_isi_cap_g_selection,
        .vidioc_s_selection             = mxc_isi_cap_s_selection,
+       .vidioc_g_chip_ident    = mxc_isi_cap_g_chip_ident,

        .vidioc_enum_framesizes = mxc_isi_cap_enum_framesizes,
        .vidioc_enum_frameintervals = mxc_isi_cap_enum_frameintervals,

The preview interface still has no content。

0 件の賞賛
返信