From 5093e81a7a6cf3e9f11aa74591caeb5702301c85 Mon Sep 17 00:00:00 2001 From: Nikhil Devshatwar Date: Wed, 12 Mar 2014 19:10:52 +0530 Subject: [PATCH] v4l2: Fix conflict between libdrm and v4l2 fourcc For ARGB8888 format, libdrm(AR24) and v4l2 framework(RGB4) both use different fourcc. This patch sets fourcc to RGB4 when calling v4l2 ioctl for AR24 color format. Signed-off-by: Nikhil Devshatwar --- util/v4l2.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/util/v4l2.c b/util/v4l2.c index 33293e2..6349834 100644 --- a/util/v4l2.c +++ b/util/v4l2.c @@ -286,6 +286,9 @@ v4l2_open(int argc, char **argv, uint32_t *fourcc, format.fmt.pix.pixelformat = *fourcc; format.fmt.pix.width = *width; format.fmt.pix.height = *height; + if(*fourcc == FOURCC_STR("AR24")) + format.fmt.pix.pixelformat = FOURCC_STR("RGB4"); + } if ((format.fmt.pix.width == 0) || (format.fmt.pix.height == 0) || -- 2.26.2