From a7f4228b14d7feb5e4f26daea8401f0ad0564724 Mon Sep 17 00:00:00 2001 From: Phi Bang Nguyen Date: Wed, 21 May 2025 12:10:54 +0200 Subject: [PATCH] drivers: video: ov7670: Set default format to RGB565 QVGA The default format for ov7670 is currently VGA YUYV and it counts on the smartdma to reset the format to RGB565 QVGA when get_format() is called. Recently, set_format() is decoupled from get_format() so this assumption is nolonger correct. Set the default format to RGB565 QVGA instead. Signed-off-by: Phi Bang Nguyen --- drivers/video/ov7670.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/video/ov7670.c b/drivers/video/ov7670.c index 27d5bc218f040..9451e3a9068f8 100644 --- a/drivers/video/ov7670.c +++ b/drivers/video/ov7670.c @@ -551,9 +551,9 @@ static int ov7670_init(const struct device *dev) k_msleep(5); /* Set default camera format (QVGA, YUYV) */ - fmt.pixelformat = VIDEO_PIX_FMT_YUYV; - fmt.width = 640; - fmt.height = 480; + fmt.pixelformat = VIDEO_PIX_FMT_RGB565; + fmt.width = 320; + fmt.height = 240; ret = ov7670_set_fmt(dev, &fmt); if (ret < 0) { return ret;