From patchwork Mon Apr 4 18:16:26 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: sensoray-dev X-Patchwork-Id: 685211 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p34IQ6q4014801 for ; Mon, 4 Apr 2011 18:26:06 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754924Ab1DDS0E (ORCPT ); Mon, 4 Apr 2011 14:26:04 -0400 Received: from gateway09.websitewelcome.com ([67.18.144.14]:60815 "HELO gateway09.websitewelcome.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1752864Ab1DDS0D (ORCPT ); Mon, 4 Apr 2011 14:26:03 -0400 Received: (qmail 15392 invoked from network); 4 Apr 2011 18:14:53 -0000 Received: from gator886.hostgator.com (174.120.40.226) by gateway09.websitewelcome.com with SMTP; 4 Apr 2011 18:14:53 -0000 Received: from [50.39.76.146] (port=14806 helo=[10.140.5.32]) by gator886.hostgator.com with esmtp (Exim 4.69) (envelope-from ) id 1Q6oKA-0007Ix-5J; Mon, 04 Apr 2011 13:16:26 -0500 Message-ID: <4D9A0AFA.7090202@sensoray.com> Date: Mon, 04 Apr 2011 11:16:26 -0700 From: Sensoray Linux Development User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.14) Gecko/20110223 Thunderbird/3.1.8 MIME-Version: 1.0 To: Linux Media Mailing List Subject: [PATCH 1/2][media] s2255drv: adding MJPEG format X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - gator886.hostgator.com X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - sensoray.com X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: static-50-39-76-146.bvtn.or.frontiernet.net ([10.140.5.32]) [50.39.76.146]:14806 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Mon, 04 Apr 2011 18:26:19 +0000 (UTC) adding MJPEG format Signed-off-by: Dean Anderson --- drivers/media/video/s2255drv.c | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/drivers/media/video/s2255drv.c b/drivers/media/video/s2255drv.c index b12e28e..38e5c4b 100644 --- a/drivers/media/video/s2255drv.c +++ b/drivers/media/video/s2255drv.c @@ -428,6 +428,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 @@ -648,6 +652,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; @@ -1032,6 +1037,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);