Hi Radxa team,
I am opening a new topic regarding the IMX219 camera on the Dragon Q6A.
I have been debugging this for quite some time and wanted to share the results of my testing.
Test 1: Basic libcamera Preview
gst-launch-1.0 libcamerasrc ! videoconvert ! autovideosink
Result:
WARN IPAManager ipa_manager.cpp:154 No IPA found in '/usr/lib/aarch64-linux-gnu/libcamera'
WARN CameraSensor camera_sensor.cpp:248 'imx219 20-0010': Recommended V4L2 control 0x009a0922 not supported
WARN CameraSensor camera_sensor.cpp:315 'imx219 20-0010': The sensor kernel driver needs to be fixed
ERROR:
streaming stopped, reason not-negotiated (-4)
The IMX219 sensor is detected, but the stream fails immediately.
Test 2: Direct V4L2 Bayer Test
gst-launch-1.0 v4l2src device=/dev/video0 ! \
video/x-bayer,format=bggr10,width=640,height=480 ! \
bayer2rgb ! videoconvert ! waylandsink
Result:
WARNING: erroneous pipeline:
could not link v4l2src0 to bayer2rgb0,
neither element can handle caps
video/x-bayer, format=(string)bggr10
This suggests the Bayer format exposed by the camera cannot be handled by the pipeline.
Test 3: libcamera Debug Logging
LIBCAMERA_LOG_LEVELS=Camera:DEBUG \
gst-launch-1.0 libcamerasrc ! fakesink
Result:
DEBUG Camera camera.cpp:1118 streams configuration:
(0) 640x480-SRGGB10_CSI2P
CRITICAL:
Unsupported media type: video/x-bayer
ERROR:
streaming stopped, reason not-negotiated (-4)
Additional GStreamer errors:
gst_structure_set: assertion 'structure != NULL' failed
gst_caps_get_structure: assertion 'index < GST_CAPS_LEN (caps)' failed
gst_event_new_caps: assertion 'gst_caps_is_fixed (caps)' failed
gst_pad_push_event: assertion 'GST_IS_EVENT (event)' failed
The stream is configured as:
640x480-SRGGB10_CSI2P
but GStreamer reports that video/x-bayer is unsupported and the pipeline terminates.
Additional Information
The camera is consistently detected as:
imx219 20-0010
and libcamera consistently reports:
Recommended V4L2 control 0x009a0922 not supported
The sensor kernel driver needs to be fixed
Failed to retrieve the camera location
Rotation control not available, default to 0 degrees
Summary
From what I can tell:
-
IMX219 is detected successfully.
-
libcamera can configure a raw Bayer stream (
640x480-SRGGB10_CSI2P). -
GStreamer fails during caps negotiation.
-
video/x-bayerappears to be the common point of failure. -
All tested pipelines end with
not-negotiated (-4).
Has anyone successfully brought up an IMX219 on the Dragon Q6A?
Are there additional kernel packages, firmware files, device-tree changes, ISP components, or newer builds required to get the camera working?
Any guidance would be greatly appreciated.
Thanks.
post by NANTHINI 2 mins ago
If you want to try it now, download the pre-built debs manually:
enable hardware-encoder:
https://docs.radxa.com/en/dragon/q6a/faq#why-does-q6a-reboot-immediately-when-using-the-hardware-encoder
https://github.com/chenchongbiao/libcamera/actions/runs/27256200300/artifacts/7527665865
Installation:
unzip libcamera.zip
cd libcamera
sudo apt update
sudo apt install ./*.deb
sudo apt install -y gstreamer1.0-tools gstreamer1.0-plugins-base
Hardware-encoded recording examples:
# H.264 1080p
gst-launch-1.0 -e libcamerasrc \
! videoconvert ! video/x-raw,format=NV12,width=1920,height=1080,framerate=30/1 \
! v4l2h264enc ! h264parse ! mp4mux \
! filesink location=/tmp/camera-h264.mp4
# H.265 1080p
gst-launch-1.0 -e libcamerasrc \
! videoconvert ! video/x-raw,format=NV12,width=1920,height=1080,framerate=30/1 \
! v4l2h265enc ! h265parse ! mp4mux \
! filesink location=/tmp/camera-h265.mp4
# Full resolution 3272×2464 H.264
gst-launch-1.0 -e libcamerasrc \
! video/x-raw,width=3272,height=2464,framerate=30/1 \
! queue ! videoconvert ! video/x-raw,format=NV12 \
! queue ! v4l2h264enc ! h264parse ! mp4mux \
! filesink location=/tmp/camera-8mp.mp4
This was posted by Radxa team on the comment secction. This one still gives a black screen (or 0 B file).
Any Idea abut which part should i work on?
If any clear overview can be given, it would be preferred.
can @dmytro.lishchynskyi give your review on this.