summaryrefslogtreecommitdiff
path: root/drivers/media/video/s2255drv.c
diff options
context:
space:
mode:
authorSensoray Linux Development <linux-dev@sensoray.com>2011-04-04 22:16:26 +0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2011-05-20 16:28:39 +0400
commitd0ef8540f211ba7cde748ef4f0272cd49bfdb520 (patch)
tree9136bc3b99bf2e91d5d5c0751c1d66f4ef855aa3 /drivers/media/video/s2255drv.c
parentb01ff50035844bf2abac4a7e27b662a92ebb1d7b (diff)
downloadlinux-d0ef8540f211ba7cde748ef4f0272cd49bfdb520.tar.xz
[media] s2255drv: adding MJPEG format
adding MJPEG format Signed-off-by: Dean Anderson <linux-dev@sensoray.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/s2255drv.c')
-rw-r--r--drivers/media/video/s2255drv.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/media/video/s2255drv.c b/drivers/media/video/s2255drv.c
index 01a98c0d3950..46506d8381a2 100644
--- a/drivers/media/video/s2255drv.c
+++ b/drivers/media/video/s2255drv.c
@@ -433,6 +433,10 @@ static const struct s2255_fmt formats[] = {
.fourcc = V4L2_PIX_FMT_JPEG,
.depth = 24
}, {
+ .name = "MJPG",
+ .fourcc = V4L2_PIX_FMT_MJPEG,
+ .depth = 24
+ }, {
.name = "8bpp GREY",
.fourcc = V4L2_PIX_FMT_GREY,
.depth = 8
@@ -653,6 +657,7 @@ static void s2255_fillbuff(struct s2255_channel *channel,
memcpy(vbuf, tmpbuf, buf->vb.width * buf->vb.height);
break;
case V4L2_PIX_FMT_JPEG:
+ case V4L2_PIX_FMT_MJPEG:
buf->vb.size = jpgsize;
memcpy(vbuf, tmpbuf, buf->vb.size);
break;
@@ -1037,6 +1042,7 @@ static int vidioc_s_fmt_vid_cap(struct file *file, void *priv,
mode.color |= COLOR_Y8;
break;
case V4L2_PIX_FMT_JPEG:
+ case V4L2_PIX_FMT_MJPEG:
mode.color &= ~MASK_COLOR;
mode.color |= COLOR_JPG;
mode.color |= (channel->jc.quality << 8);