aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/gspca/gspca.c
diff options
context:
space:
mode:
authorHans de Goede <j.w.r.degoede@hhs.nl>2008-07-04 17:29:32 -0400
committerMauro Carvalho Chehab <mchehab@infradead.org>2008-07-20 06:17:02 -0400
commitab8f12cf8e3d33adec382585f9f60f8686a372c3 (patch)
tree5e788581199b1a8ddeaba222d958a8a77ba84a02 /drivers/media/video/gspca/gspca.c
parent24c530b4abb979f9e79298f0b4c4e83781a0e4c3 (diff)
V4L/DVB (8197): gspca: pac207 frames no more decoded in the subdriver.
videodev2: New pixfmt pac207: Remove the specific decoding. main: get_buff_size operation added for the subdriver. Signed-off-by: Hans de Goede <j.w.r.degoede@hhs.nl> Signed-off-by: Jean-Francois Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/gspca/gspca.c')
-rw-r--r--drivers/media/video/gspca/gspca.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/media/video/gspca/gspca.c b/drivers/media/video/gspca/gspca.c
index f6d216316b11..708270a46e1f 100644
--- a/drivers/media/video/gspca/gspca.c
+++ b/drivers/media/video/gspca/gspca.c
@@ -321,6 +321,7 @@ static int gspca_is_compressed(__u32 format)
321 case V4L2_PIX_FMT_MJPEG: 321 case V4L2_PIX_FMT_MJPEG:
322 case V4L2_PIX_FMT_JPEG: 322 case V4L2_PIX_FMT_JPEG:
323 case V4L2_PIX_FMT_SPCA561: 323 case V4L2_PIX_FMT_SPCA561:
324 case V4L2_PIX_FMT_PAC207:
324 return 1; 325 return 1;
325 } 326 }
326 return 0; 327 return 0;
@@ -380,7 +381,8 @@ static __u32 get_v4l2_depth(__u32 pixfmt)
380 case V4L2_PIX_FMT_JPEG: 381 case V4L2_PIX_FMT_JPEG:
381 case V4L2_PIX_FMT_SBGGR8: /* 'BA81' Bayer */ 382 case V4L2_PIX_FMT_SBGGR8: /* 'BA81' Bayer */
382 case V4L2_PIX_FMT_SN9C10X: /* 'S910' SN9C10x compression */ 383 case V4L2_PIX_FMT_SN9C10X: /* 'S910' SN9C10x compression */
383 case V4L2_PIX_FMT_SPCA561: /* 'S561' compressed BGGR bayer */ 384 case V4L2_PIX_FMT_SPCA561: /* 'S561' compressed GBRG bayer */
385 case V4L2_PIX_FMT_PAC207: /* 'P207' compressed BGGR bayer */
384 return 8; 386 return 8;
385 } 387 }
386 PDEBUG(D_ERR|D_CONF, "Unknown pixel format %c%c%c%c", 388 PDEBUG(D_ERR|D_CONF, "Unknown pixel format %c%c%c%c",
@@ -395,6 +397,9 @@ static int gspca_get_buff_size(struct gspca_dev *gspca_dev, int mode)
395{ 397{
396 unsigned int size; 398 unsigned int size;
397 399
400 if (gspca_dev->sd_desc->get_buff_size)
401 return gspca_dev->sd_desc->get_buff_size(gspca_dev, mode);
402
398 size = gspca_dev->cam.cam_mode[mode].width * 403 size = gspca_dev->cam.cam_mode[mode].width *
399 gspca_dev->cam.cam_mode[mode].height * 404 gspca_dev->cam.cam_mode[mode].height *
400 get_v4l2_depth(gspca_dev->cam.cam_mode[mode].pixfmt) / 8; 405 get_v4l2_depth(gspca_dev->cam.cam_mode[mode].pixfmt) / 8;