Support for Y16 format (Jetpack 5.0.0 and newer)

I’m interested in adding Y16 (16 bit grayscale) support for cameras in newer versions of jetpack. I came across this thread, however I don’t think the newer kernel in jetpack 5.0+ has some of the files mentioned. This seems to be supported by these changes to the kernel:

I was wondering if anyone could shed some light on how this might be accomplished for newer kernels?

The SOC camera doesn’t use any more current sensor driver is media framework.
Checking below document for sensor driver implement.

Thank you for getting back to me. This is a great resource, and I have done some reading into the media framework. I am not clear on how this answers my question though.

For Y16 format support you need add it to media framework driver like the topic you post.
The driver is located …/kernel/nvidia/drivers/media/platform/tegra/camera/*

Hi Shane,

I’m still a bit confused. The patch file in the thread I linked has this section:

index e3e665e..223edb2 100644
--- kernel/kernel-4.9/drivers/media/platform/soc_camera/soc_mediabus.c
+++ kernel/kernel-4.9/drivers/media/platform/soc_camera/soc_mediabus.c
@@ -172,6 +172,16 @@ static const struct soc_mbus_lookup mbus_fmt[] = {
 		.order			= SOC_MBUS_ORDER_LE,
 		.layout			= SOC_MBUS_LAYOUT_PACKED,
+}, {
+	.code = MEDIA_BUS_FMT_Y16_1X16,
+	.fmt = {
+		.fourcc			= V4L2_PIX_FMT_Y16,
+		.name			= "Grey 16bit",
+		.bits_per_sample	= 16,
+		.packing		= SOC_MBUS_PACKING_EXTEND16,
+		.order			= SOC_MBUS_ORDER_LE,
+		.layout			= SOC_MBUS_LAYOUT_PACKED,
+	},

The file in question doesn’t seem to exist in the newer kernel. What change would I need to make instead of this?

Have check the programing guide.

Sensor pixel phase. Possible values are:

yuyv	yvyu
bggr	grbg

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.