# media-ctl -p Media controller API version 5.15.0 Media device information ------------------------ driver atmel_isc_mc model microchip,sama7g5-isc serial bus info platform:microchip-sama7g5-xisc hw revision 0x220 driver version 5.15.0 Device topology - entity 1: atmel_isc_scaler (2 pads, 2 links) type V4L2 subdev subtype Unknown flags 0 device node name /dev/v4l-subdev0 pad0: Sink [fmt:unknown/3264x2464 crop.bounds:(0,0)/3264x2464 crop:(0,0)/3264x2464] <- "csi2dc":1 [ENABLED,IMMUTABLE] pad1: Source [fmt:unknown/3264x2464] -> "atmel_isc_base":0 [ENABLED,IMMUTABLE] - entity 4: csi2dc (2 pads, 2 links) type V4L2 subdev subtype Unknown flags 0 device node name /dev/v4l-subdev1 pad0: Sink [fmt:SBGGR10_1X10/640x480 field:none colorspace:srgb] <- "dw-csi.0":1 [ENABLED] pad1: Source [fmt:SBGGR10_1X10/640x480 field:none colorspace:srgb] -> "atmel_isc_scaler":0 [ENABLED,IMMUTABLE] - entity 7: dw-csi.0 (2 pads, 2 links) type V4L2 subdev subtype Unknown flags 0 device node name /dev/v4l-subdev2 pad0: Sink [fmt:SBGGR8_1X8/0x0] <- "imx219 1-0010":0 [ENABLED] pad1: Source [fmt:SBGGR8_1X8/0x0] -> "csi2dc":0 [ENABLED] - entity 12: imx219 1-0010 (1 pad, 1 link) type V4L2 subdev subtype Sensor flags 0 device node name /dev/v4l-subdev3 pad0: Source [fmt:SRGGB10_1X10/3280x2464 field:none colorspace:srgb xfer:srgb ycbcr:601 quantization:full-range crop.bounds:(8,8)/3280x2464 crop:(8,8)/3280x2464] -> "dw-csi.0":0 [ENABLED] - entity 24: atmel_isc_base (1 pad, 1 link) type Node subtype V4L flags 1 device node name /dev/video0 pad0: Sink <- "atmel_isc_scaler":1 [ENABLED,IMMUTABLE]
# v4l2-ctl -d /dev/v4l-subdev3 --list-subdev-mbus-codes 0 ioctl: VIDIOC_SUBDEV_ENUM_MBUS_CODE (pad=0) 0x300f: MEDIA_BUS_FMT_SRGGB10_1X10 0x3014: MEDIA_BUS_FMT_SRGGB8_1X8
# v4l2-ctl -d /dev/v4l-subdev2 --list-subdev-mbus-codes 0 ioctl: VIDIOC_SUBDEV_ENUM_MBUS_CODE (pad=0) 0x3001: MEDIA_BUS_FMT_SBGGR8_1X8 0x3007: MEDIA_BUS_FMT_SBGGR10_1X10 0x300f: MEDIA_BUS_FMT_SRGGB10_1X10 0x3008: MEDIA_BUS_FMT_SBGGR12_1X12 0x3019: MEDIA_BUS_FMT_SBGGR14_1X14 0x301d: MEDIA_BUS_FMT_SBGGR16_1X16 0x1009: MEDIA_BUS_FMT_RGB666_1X18 0x1007: MEDIA_BUS_FMT_RGB565_2X8_BE 0x1008: MEDIA_BUS_FMT_RGB565_2X8_LE 0x1003: MEDIA_BUS_FMT_RGB555_2X8_PADHI_BE 0x1004: MEDIA_BUS_FMT_RGB555_2X8_PADHI_LE 0x1001: MEDIA_BUS_FMT_RGB444_2X8_PADHI_BE 0x1002: MEDIA_BUS_FMT_RGB444_2X8_PADHI_LE 0x100c: MEDIA_BUS_FMT_RGB888_2X12_LE 0x100b: MEDIA_BUS_FMT_RGB888_2X12_BE 0x100a: MEDIA_BUS_FMT_RGB888_1X24 0x2010: MEDIA_BUS_FMT_VYUY8_1X16 0x2019: MEDIA_BUS_FMT_VYUY10_2X10 0x2001: MEDIA_BUS_FMT_Y8_1X8 0x200a: MEDIA_BUS_FMT_Y10_1X10 # v4l2-ctl -d /dev/v4l-subdev2 --list-subdev-mbus-codes 1 ioctl: VIDIOC_SUBDEV_ENUM_MBUS_CODE (pad=1) 0x3001: MEDIA_BUS_FMT_SBGGR8_1X8 0x3007: MEDIA_BUS_FMT_SBGGR10_1X10 0x300f: MEDIA_BUS_FMT_SRGGB10_1X10 0x3008: MEDIA_BUS_FMT_SBGGR12_1X12 0x3019: MEDIA_BUS_FMT_SBGGR14_1X14 0x301d: MEDIA_BUS_FMT_SBGGR16_1X16 0x1009: MEDIA_BUS_FMT_RGB666_1X18 0x1007: MEDIA_BUS_FMT_RGB565_2X8_BE 0x1008: MEDIA_BUS_FMT_RGB565_2X8_LE 0x1003: MEDIA_BUS_FMT_RGB555_2X8_PADHI_BE 0x1004: MEDIA_BUS_FMT_RGB555_2X8_PADHI_LE 0x1001: MEDIA_BUS_FMT_RGB444_2X8_PADHI_BE 0x1002: MEDIA_BUS_FMT_RGB444_2X8_PADHI_LE 0x100c: MEDIA_BUS_FMT_RGB888_2X12_LE 0x100b: MEDIA_BUS_FMT_RGB888_2X12_BE 0x100a: MEDIA_BUS_FMT_RGB888_1X24 0x2010: MEDIA_BUS_FMT_VYUY8_1X16 0x2019: MEDIA_BUS_FMT_VYUY10_2X10 0x2001: MEDIA_BUS_FMT_Y8_1X8 0x200a: MEDIA_BUS_FMT_Y10_1X10
# v4l2-ctl -d /dev/v4l-subdev1 --list-subdev-mbus-codes 0 ioctl: VIDIOC_SUBDEV_ENUM_MBUS_CODE (pad=0) 0x300f: MEDIA_BUS_FMT_SRGGB10_1X10 0x3007: MEDIA_BUS_FMT_SBGGR10_1X10 0x300a: MEDIA_BUS_FMT_SGRBG10_1X10 0x300e: MEDIA_BUS_FMT_SGBRG10_1X10 # v4l2-ctl -d /dev/v4l-subdev1 --list-subdev-mbus-codes 1 ioctl: VIDIOC_SUBDEV_ENUM_MBUS_CODE (pad=1) 0x300f: MEDIA_BUS_FMT_SRGGB10_1X10 0x3007: MEDIA_BUS_FMT_SBGGR10_1X10 0x300a: MEDIA_BUS_FMT_SGRBG10_1X10 0x300e: MEDIA_BUS_FMT_SGBRG10_1X10 #
# v4l2-ctl -d /dev/v4l-subdev0 --list-subdev-mbus-codes 0 ioctl: VIDIOC_SUBDEV_ENUM_MBUS_CODE (pad=0) 0x3007: MEDIA_BUS_FMT_SBGGR10_1X10 0x300e: MEDIA_BUS_FMT_SGBRG10_1X10 0x300a: MEDIA_BUS_FMT_SGRBG10_1X10 0x300f: MEDIA_BUS_FMT_SRGGB10_1X10 # v4l2-ctl -d /dev/v4l-subdev0 --list-subdev-mbus-codes 1 ioctl: VIDIOC_SUBDEV_ENUM_MBUS_CODE (pad=1) 0x3007: MEDIA_BUS_FMT_SBGGR10_1X10 0x300e: MEDIA_BUS_FMT_SGBRG10_1X10 0x300a: MEDIA_BUS_FMT_SGRBG10_1X10 0x300f: MEDIA_BUS_FMT_SRGGB10_1X10 #
# v4l2-ctl -d /dev/v4l-subdev3 --list-subdev-framesizes pad=0,code=0x300f ioctl: VIDIOC_SUBDEV_ENUM_FRAME_SIZE (pad=0) Size Range: 3280x2464 - 3280x2464 Size Range: 1920x1080 - 1920x1080 Size Range: 1640x1232 - 1640x1232 Size Range: 640x480 - 640x480
# v4l2-ctl -d /dev/v4l-subdev3 --list-subdev-framesizes pad=0,code=0x3001 ioctl: VIDIOC_SUBDEV_ENUM_FRAME_SIZE (pad=0) #
# v4l2-ctl -d /dev/v4l-subdev2 --list-subdev-framesizes pad=0 ioctl: VIDIOC_SUBDEV_ENUM_FRAME_SIZE (pad=0) Size Range: 16x16 - 4000x3000 #
# v4l2-ctl -d /dev/v4l-subdev3 --get-subdev-fmt 0 ioctl: VIDIOC_SUBDEV_G_FMT (pad=0) Width/Height : 3280/2464 Mediabus Code : 0x300f (MEDIA_BUS_FMT_SRGGB10_1X10) Field : None Colorspace : sRGB Transfer Function : sRGB YCbCr/HSV Encoding: ITU-R 601 Quantization : Full Range #
# v4l2-ctl -d /dev/v4l-subdev2 --get-subdev-fmt 0 ioctl: VIDIOC_SUBDEV_G_FMT (pad=0) Width/Height : 0/0 Mediabus Code : 0x3001 (MEDIA_BUS_FMT_SBGGR8_1X8) Field : Any Colorspace : Default Transfer Function : Default (maps to Rec. 709) YCbCr/HSV Encoding: Default (maps to ITU-R 601) Quantization : Default (maps to Full Range) # v4l2-ctl -d /dev/v4l-subdev2 --get-subdev-fmt 1 ioctl: VIDIOC_SUBDEV_G_FMT (pad=1) Width/Height : 0/0 Mediabus Code : 0x3001 (MEDIA_BUS_FMT_SBGGR8_1X8) Field : Any Colorspace : Default Transfer Function : Default (maps to Rec. 709) YCbCr/HSV Encoding: Default (maps to ITU-R 601) Quantization : Default (maps to Full Range) #
media-ctl -d /dev/media0 --set-v4l2 '"imx219 1-0010":0[fmt:SRGGB10_1X10/3280x2464]' media-ctl -d /dev/media0 --set-v4l2 '"dw-csi.0":0[fmt:SRGGB10_1X10/3280x2464]' media-ctl -d /dev/media0 --set-v4l2 '"csi2dc":0[fmt:SRGGB10_1X10/3280x2464]' media-ctl -d /dev/media0 --set-v4l2 '"atmel_isc_scaler":0[fmt:SRGGB10_1X10/3280x2464]'The above sequence of commands will configure the 4 given entities with the format specified.
# media-ctl -p Media controller API version 5.15.0 Media device information ------------------------ driver atmel_isc_mc model microchip,sama7g5-isc serial bus info platform:microchip-sama7g5-xisc hw revision 0x220 driver version 5.15.0 Device topology - entity 1: atmel_isc_scaler (2 pads, 2 links) type V4L2 subdev subtype Unknown flags 0 device node name /dev/v4l-subdev0 pad0: Sink [fmt:SRGGB10_1X10/3280x2464 crop.bounds:(0,0)/3264x2464 crop:(0,0)/3264x2464] <- "csi2dc":1 [ENABLED,IMMUTABLE] pad1: Source [fmt:SRGGB10_1X10/3264x2464] -> "atmel_isc_base":0 [ENABLED,IMMUTABLE] - entity 4: csi2dc (2 pads, 2 links) type V4L2 subdev subtype Unknown flags 0 device node name /dev/v4l-subdev1 pad0: Sink [fmt:SRGGB10_1X10/3280x2464 field:none colorspace:srgb] <- "dw-csi.0":1 [ENABLED] pad1: Source [fmt:SRGGB10_1X10/3280x2464 field:none colorspace:srgb] -> "atmel_isc_scaler":0 [ENABLED,IMMUTABLE] - entity 7: dw-csi.0 (2 pads, 2 links) type V4L2 subdev subtype Unknown flags 0 device node name /dev/v4l-subdev2 pad0: Sink [fmt:SRGGB10_1X10/3280x2464] <- "imx219 1-0010":0 [ENABLED] pad1: Source [fmt:SRGGB10_1X10/3280x2464] -> "csi2dc":0 [ENABLED] - entity 12: imx219 1-0010 (1 pad, 1 link) type V4L2 subdev subtype Sensor flags 0 device node name /dev/v4l-subdev3 pad0: Source [fmt:SRGGB10_1X10/3280x2464 field:none colorspace:srgb xfer:srgb ycbcr:601 quantization:full-range crop.bounds:(8,8)/3280x2464 crop:(8,8)/3280x2464] -> "dw-csi.0":0 [ENABLED] - entity 24: atmel_isc_base (1 pad, 1 link) type Node subtype V4L flags 1 device node name /dev/video0 pad0: Sink <- "atmel_isc_scaler":1 [ENABLED,IMMUTABLE]
media-ctl -d /dev/media0 --set-v4l2 '"imx219 1-0010":0[fmt:SRGGB10_1X10/1920x1080]' media-ctl -d /dev/media0 --set-v4l2 '"dw-csi.0":0[fmt:SRGGB10_1X10/1920x1080]' media-ctl -d /dev/media0 --set-v4l2 '"csi2dc":0[fmt:SRGGB10_1X10/1920x1080]' media-ctl -d /dev/media0 --set-v4l2 '"atmel_isc_scaler":0[fmt:SRGGB10_1X10/1920x1080]'
# media-ctl -p Media controller API version 5.15.0 Media device information ------------------------ driver atmel_isc_mc model microchip,sama7g5-isc serial bus info platform:microchip-sama7g5-xisc hw revision 0x220 driver version 5.15.0 Device topology - entity 1: atmel_isc_scaler (2 pads, 2 links) type V4L2 subdev subtype Unknown flags 0 device node name /dev/v4l-subdev0 pad0: Sink [fmt:SRGGB10_1X10/1920x1080 crop.bounds:(0,0)/3264x2464 crop:(0,0)/3264x2464] <- "csi2dc":1 [ENABLED,IMMUTABLE] pad1: Source [fmt:SRGGB10_1X10/1920x1080] -> "atmel_isc_base":0 [ENABLED,IMMUTABLE] - entity 4: csi2dc (2 pads, 2 links) type V4L2 subdev subtype Unknown flags 0 device node name /dev/v4l-subdev1 pad0: Sink [fmt:SRGGB10_1X10/1920x1080 field:none colorspace:srgb] <- "dw-csi.0":1 [ENABLED] pad1: Source [fmt:SRGGB10_1X10/1920x1080 field:none colorspace:srgb] -> "atmel_isc_scaler":0 [ENABLED,IMMUTABLE] - entity 7: dw-csi.0 (2 pads, 2 links) type V4L2 subdev subtype Unknown flags 0 device node name /dev/v4l-subdev2 pad0: Sink [fmt:SRGGB10_1X10/1920x1080] <- "imx219 1-0010":0 [ENABLED] pad1: Source [fmt:SRGGB10_1X10/1920x1080] -> "csi2dc":0 [ENABLED] - entity 12: imx219 1-0010 (1 pad, 1 link) type V4L2 subdev subtype Sensor flags 0 device node name /dev/v4l-subdev3 pad0: Source [fmt:SRGGB10_1X10/1920x1080 field:none colorspace:srgb xfer:srgb ycbcr:601 quantization:full-range crop.bounds:(8,8)/3280x2464 crop:(688,700)/1920x1080] -> "dw-csi.0":0 [ENABLED] - entity 24: atmel_isc_base (1 pad, 1 link) type Node subtype V4L flags 1 device node name /dev/video0 pad0: Sink <- "atmel_isc_scaler":1 [ENABLED,IMMUTABLE]
# v4l2-ctl -d /dev/video0 --list-formats ioctl: VIDIOC_ENUM_FMT Type: Video Capture [0]: 'BG10' (10-bit Bayer BGBG/GRGR) [1]: 'GB10' (10-bit Bayer GBGB/RGRG) [2]: 'BA10' (10-bit Bayer GRGR/BGBG) [3]: 'RG10' (10-bit Bayer RGRG/GBGB) [4]: 'AR12' (16-bit ARGB 4-4-4-4) [5]: 'AR15' (16-bit ARGB 1-5-5-5) [6]: 'RGBP' (16-bit RGB 5-6-5) [7]: 'AR24' (32-bit BGRA 8-8-8-8) [8]: 'XR24' (32-bit BGRX 8-8-8-8) [9]: 'YU12' (Planar YUV 4:2:0) [10]: 'UYVY' (UYVY 4:2:2) [11]: 'VYUY' (VYUY 4:2:2) [12]: 'YUYV' (YUYV 4:2:2) [13]: '422P' (Planar YUV 4:2:2) [14]: 'GREY' (8-bit Greyscale) [15]: 'Y10 ' (10-bit Greyscale) [16]: 'Y16 ' (16-bit Greyscale) #
# v4l2-ctl -d /dev/video0 --list-formats-ext ioctl: VIDIOC_ENUM_FMT Type: Video Capture [0]: 'BG10' (10-bit Bayer BGBG/GRGR) Size: Continuous 16x16 - 3264x2464 [1]: 'GB10' (10-bit Bayer GBGB/RGRG) Size: Continuous 16x16 - 3264x2464 [2]: 'BA10' (10-bit Bayer GRGR/BGBG) Size: Continuous 16x16 - 3264x2464 [3]: 'RG10' (10-bit Bayer RGRG/GBGB) Size: Continuous 16x16 - 3264x2464 [4]: 'AR12' (16-bit ARGB 4-4-4-4) Size: Continuous 16x16 - 3264x2464 [5]: 'AR15' (16-bit ARGB 1-5-5-5) Size: Continuous 16x16 - 3264x2464 [6]: 'RGBP' (16-bit RGB 5-6-5) Size: Continuous 16x16 - 3264x2464 [7]: 'AR24' (32-bit BGRA 8-8-8-8) Size: Continuous 16x16 - 3264x2464 [8]: 'XR24' (32-bit BGRX 8-8-8-8) Size: Continuous 16x16 - 3264x2464 [9]: 'YU12' (Planar YUV 4:2:0) Size: Continuous 16x16 - 3264x2464 [10]: 'UYVY' (UYVY 4:2:2) Size: Continuous 16x16 - 3264x2464 [11]: 'VYUY' (VYUY 4:2:2) Size: Continuous 16x16 - 3264x2464 [12]: 'YUYV' (YUYV 4:2:2) Size: Continuous 16x16 - 3264x2464 [13]: '422P' (Planar YUV 4:2:2) Size: Continuous 16x16 - 3264x2464 [14]: 'GREY' (8-bit Greyscale) Size: Continuous 16x16 - 3264x2464 [15]: 'Y10 ' (10-bit Greyscale) Size: Continuous 16x16 - 3264x2464 [16]: 'Y16 ' (16-bit Greyscale) Size: Continuous 16x16 - 3264x2464
# v4l2-ctl -d /dev/video0 --get-fmt-video Format Video Capture: Width/Height : 640/480 Pixel Format : 'BG10' (10-bit Bayer BGBG/GRGR) Field : None Bytes per Line : 1280 Size Image : 614400 Colorspace : sRGB Transfer Function : Default (maps to sRGB) YCbCr/HSV Encoding: Default (maps to ITU-R 601) Quantization : Default (maps to Full Range) Flags : #
# v4l2-ctl -d /dev/video0 --set-fmt-video width=3464,height=2464,pixelformat=RGBP # v4l2-ctl -d /dev/video0 --get-fmt-video Format Video Capture: Width/Height : 3264/2464 Pixel Format : 'RGBP' (16-bit RGB 5-6-5) Field : None Bytes per Line : 6528 Size Image : 16084992 Colorspace : sRGB Transfer Function : Default (maps to sRGB) YCbCr/HSV Encoding: Default (maps to ITU-R 601) Quantization : Default (maps to Full Range) Flags : #
# v4l2-ctl --device /dev/video0 --stream-mmap --stream-to=RGBP_3264_2464.raw --stream-count=1 < # ls -la RGBP_3264_2464.raw -rw-r--r-- 1 root root 16084992 Jan 1 00:00 RGBP_3264_2464.raw #
ffmpeg -f rawvideo -s 1920x1080 -pix_fmt bayer_rggb8 -i frame.raw result.png
# ffmpeg -pix_fmts
fswebcam -p RGB565 -r 3280x2464 -S 20 bigRGB565.png fswebcam -p YUYV -r 3280x2464 -S 20 bigYUYV.png fswebcam -p UYVY -r 3280x2464 -S 20 bigUYVY.png fswebcam -p VYUY -r 3280x2464 -S 20 bigVYUY.png fswebcam -p ABGR32 -r 3280x2464 -S 20 bigABGR32.png fswebcam -p Y16 -r 3280x2464 -S 20 bigY16.png fswebcam -p GREY -r 3280x2464 -S 20 bigGREY.png fswebcam -p YUV420P -r 3280x2464 -S 20 bigYUV420P.png
# cam -l [3:09:29.602118600] [272] INFO IPAManager ipa_manager.cpp:138 libcamera is not installed. Adding '//src/ipa' to the IPA search path [3:09:29.602612000] [272] WARN IPAManager ipa_manager.cpp:149 No IPA found in '/usr/lib/libcamera' [3:09:29.602773400] [272] INFO Camera camera_manager.cpp:293 libcamera v0.0.0+58645-2021.08-dirty (2021-10-08T16:10:25+03:00) [3:09:29.610875800] [274] WARN CameraSensor camera_sensor.cpp:197 'imx219 1-0010': Recommended V4L2 control 0x009a0922 not supported [3:09:29.611025000] [274] WARN CameraSensor camera_sensor.cpp:249 'imx219 1-0010': The sensor kernel driver needs to be fixed [3:09:29.611092200] [274] WARN CameraSensor camera_sensor.cpp:251 'imx219 1-0010': See Documentation/sensor_driver_requirements.rst in the libcamera sources for more information [3:09:29.617962400] [274] WARN CameraSensor camera_sensor.cpp:414 'imx219 1-0010': Failed to retrieve the camera location [3:09:29.620663000] [274] WARN V4L2 v4l2_pixelformat.cpp:283 Unsupported V4L2 pixel format Y10 [3:09:29.620766200] [274] WARN V4L2 v4l2_pixelformat.cpp:283 Unsupported V4L2 pixel format Y16 [3:09:29.620828600] [274] WARN V4L2 v4l2_pixelformat.cpp:283 Unsupported V4L2 pixel format AR12 [3:09:29.620886800] [274] WARN V4L2 v4l2_pixelformat.cpp:283 Unsupported V4L2 pixel format AR15 Available cameras: 1: 'imx219' (/base/soc/flexcom@e2818000/i2c@600/camera@10) #
|
|||||||||||||||
Copyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Linux® is the registered trademark of Linus Torvalds in the U.S. and other countries.
Microchip® and others, are registered trademarks or trademarks of Microchip Technology Inc. and its subsidiaries.
Arm® and others are registered trademarks or trademarks of Arm Limited (or its affiliates). Other terms and product names may be trademarks of others.
Ideas, requests, contributions ? Connect to LinksToCommunities page.