diff --git a/test/v4l2_videodevice/buffer_cache.cpp b/test/v4l2_videodevice/buffer_cache.cpp
index d730e7550377..b22de88e214c 100644
--- a/test/v4l2_videodevice/buffer_cache.cpp
+++ b/test/v4l2_videodevice/buffer_cache.cpp
@@ -9,6 +9,7 @@
 #include <random>
 #include <vector>
 
+#include <libcamera/formats.h>
 #include <libcamera/stream.h>
 
 #include "buffer_source.h"
@@ -142,7 +143,7 @@ public:
 		const unsigned int numBuffers = 8;
 
 		StreamConfiguration cfg;
-		cfg.pixelFormat = PixelFormat(DRM_FORMAT_YUYV);
+		cfg.pixelFormat = formats::YUYV;
 		cfg.size = Size(600, 800);
 		cfg.bufferCount = numBuffers;
 
