Tool/software: Linux
Hello,
I am using AM437x-gp-evm to connect our fingerprint sensor on connector J3. I am writing a device driver based on ov2659.c for the fingerprint sensor. I modify the dual camera demo software to display the video on th 7-inch LCD of the EVM board.
What we did:
1. The fingerprint sensor is a 8-bit gray video with w800 x h600. The data pins are connected to the higher 8 data pins of the J3.
2. I modified the following statement in the dual camera demo file loopback.c:
device->fmt.fmt.pix.pixelformat = FOURCC_STR("GREY");
device->fmt.fmt.pix.pixelformat = FOURCC_STR("GREY");
device->fmt.fmt.pix.pixelformat = FOURCC_STR("GREY");
disabled cap1 that on the board with #if 0
1105 #if 0
1106 if(v4l2_init_device(&cap1_device) < 0) {
1107 /* If there is not a second camera, program can still continue */
1108 if(status.num_cams ==2){
1109 status.num_cams=1;
1110 status.pip=false;
1111 printf("Only one camera detected\n");
1112 }
1113 //first camera wasn't detected
1114 else if (!status_cam0){
1115 printf("No camera detected\n");
1116 goto Error;
1117 }
1118 }
1119 else{
1120 unsigned int i;
1121 struct dmabuf_buffer **buffers = get_vid_buffers(&drm_device, cap1_device.num_buffers,
1122 cap1_device.fmt.fmt.pix.pixelformat, cap1_device.width, cap1_device.height);
1123 if (!buffers) {
1124 goto Error;
1125 }
1126
1127 drm_device.buf[1] = buffers;
1128
1129 /* Pass these buffers to the capture drivers */
1130 if (v4l2_request_buffer(&cap1_device, buffers) < 0) {
1131 goto Error;
1132 }
1133
1134 for (i = 0; i < cap1_device.num_buffers; i++) {
1135 v4l2_queue_buffer(&cap1_device, buffers[i]);
1136 }
1137
1138 status_cam1 = 1;
1139 }
1140 #endif
I have the following questions:
1. When I use use MEDIA_BUS_FMT_YUYV8_2X8 format in the device driver, I can get fingerprint video. It is greenish, stretched and only occupies left side half screen.
2. When I change the MEDIA_BUS_FMT_GRAY_Y8_1X9 or MEDIA_BUS_FMT_Y10_1X10, I get error message when booting (probing):
no suitable format reported by subdev...
Error registering async notifier
vpfe: probe of 48438000.vpfe gailed with error: -22
3. I checked file board-support/linux-4.9.69+gitAUTOINC+9ce43c71ae-g9ce43c71ae/drivers/media/platform/am437x/am437x-vpfe.c, I can't find the Y8 and Y10 supports in the format. See below. Does it mean no Y8 or Y10 soppprts by ti vpfe?
static struct vpfe_fmt formats[] = {
{
.fourcc = V4L2_PIX_FMT_YUYV,
.code = MEDIA_BUS_FMT_YUYV8_2X8,
.bitsperpixel = 16,
}, {
.fourcc = V4L2_PIX_FMT_UYVY,
.code = MEDIA_BUS_FMT_UYVY8_2X8,
.bitsperpixel = 16,
}, {
.fourcc = V4L2_PIX_FMT_YVYU,
.code = MEDIA_BUS_FMT_YVYU8_2X8,
.bitsperpixel = 16,
}, {
.fourcc = V4L2_PIX_FMT_VYUY,
.code = MEDIA_BUS_FMT_VYUY8_2X8,
.bitsperpixel = 16,
}, {
.fourcc = V4L2_PIX_FMT_SBGGR8,
.code = MEDIA_BUS_FMT_SBGGR8_1X8,
.bitsperpixel = 8,
}, {
.fourcc = V4L2_PIX_FMT_SGBRG8,
.code = MEDIA_BUS_FMT_SGBRG8_1X8,
.bitsperpixel = 8,
}, {
.fourcc = V4L2_PIX_FMT_SGRBG8,
.code = MEDIA_BUS_FMT_SGRBG8_1X8,
.bitsperpixel = 8,
}, {
.fourcc = V4L2_PIX_FMT_SRGGB8,
.code = MEDIA_BUS_FMT_SRGGB8_1X8,
.bitsperpixel = 8,
}, {
.fourcc = V4L2_PIX_FMT_RGB565,
.code = MEDIA_BUS_FMT_RGB565_2X8_LE,
.bitsperpixel = 16,
}, {
.fourcc = V4L2_PIX_FMT_RGB565X,
.code = MEDIA_BUS_FMT_RGB565_2X8_BE,
.bitsperpixel = 16,
},
};
Please help me how to set the format on both driver and application sides.
Thanks you,.
-Ken Li