Skip to contentSkip to conversation

Disable colour conversion in the CPiA Video Camera driver

PATCH New Luca Risolia 1 participant 1 message Aug 30, 2004 Media (V4L/DVB)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Disable colour conversion in the CPiA Video Camera driver

Given that colour conversion is not allowed in kernel space, this patch disables it in the CPiA driver. The routines implementing the conversions can be removed at all by the maintainers of the driver; however, this patch is a good starting point and makes someone happy.

I have already submitted this patch to both the V4L mailing list and the V4L maintainer two months ago, but it has been ignored for some unknown reasons, so here it is again.

Please apply.

drivers/media/video/cpia.c renamed from drivers/media/video/cpia.c.orig +2 -8
@@ -1428,14 +1428,8 @@ static void __exit proc_cpia_destroy(voi
 /* supported frame palettes and depths */
 static inline int valid_mode(u16 palette, u16 depth)
 {
-	return (palette == VIDEO_PALETTE_GREY && depth == 8) ||
-	       (palette == VIDEO_PALETTE_RGB555 && depth == 16) ||
-	       (palette == VIDEO_PALETTE_RGB565 && depth == 16) ||
-	       (palette == VIDEO_PALETTE_RGB24 && depth == 24) ||
-	       (palette == VIDEO_PALETTE_RGB32 && depth == 32) ||
-	       (palette == VIDEO_PALETTE_YUV422 && depth == 16) ||
-	       (palette == VIDEO_PALETTE_YUYV && depth == 16) ||
-	       (palette == VIDEO_PALETTE_UYVY && depth == 16);
+	return (palette == VIDEO_PALETTE_YUV422 && depth == 16) ||
+	       (palette == VIDEO_PALETTE_YUYV && depth == 16);
 }
 
 static int match_videosize( int width, int height )