From patchwork Wed May 11 13:37:23 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 776752 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 p4BGBfH3009086 for ; Wed, 11 May 2011 16:11:51 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757002Ab1EKQLD (ORCPT ); Wed, 11 May 2011 12:11:03 -0400 Received: from perceval.ideasonboard.com ([95.142.166.194]:48934 "EHLO perceval.ideasonboard.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757075Ab1EKQJ5 (ORCPT ); Wed, 11 May 2011 12:09:57 -0400 Received: from localhost.localdomain (business-89-133-214-82.business.broadband.hu [89.133.214.82]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id ED634359D0; Wed, 11 May 2011 13:36:32 +0000 (UTC) From: Laurent Pinchart To: linux-media@vger.kernel.org Cc: hdegoede@redhat.com Subject: [PATCH 2/2] uvcvideo: Add M420 format support Date: Wed, 11 May 2011 15:37:23 +0200 Message-Id: <1305121043-8543-2-git-send-email-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 1.7.3.4 In-Reply-To: <1305121043-8543-1-git-send-email-laurent.pinchart@ideasonboard.com> References: <1305121043-8543-1-git-send-email-laurent.pinchart@ideasonboard.com> 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]); Wed, 11 May 2011 16:11:51 +0000 (UTC) From: Hans de Goede The M420 format is used by the Microsoft LifeCam Studio HD. Signed-off-by: Hans de Goede [laurent.pinchart@ideasonboard.com: split into v4l/uvcvideo patches] Signed-off-by: Laurent Pinchart --- drivers/media/video/uvc/uvc_driver.c | 5 +++++ drivers/media/video/uvc/uvcvideo.h | 3 +++ 2 files changed, 8 insertions(+), 0 deletions(-) diff --git a/drivers/media/video/uvc/uvc_driver.c b/drivers/media/video/uvc/uvc_driver.c index 496a9de..823f4b3 100644 --- a/drivers/media/video/uvc/uvc_driver.c +++ b/drivers/media/video/uvc/uvc_driver.c @@ -84,6 +84,11 @@ static struct uvc_format_desc uvc_fmts[] = { .fcc = V4L2_PIX_FMT_YUV420, }, { + .name = "YUV 4:2:0 (M420)", + .guid = UVC_GUID_FORMAT_M420, + .fcc = V4L2_PIX_FMT_M420, + }, + { .name = "YUV 4:2:2 (UYVY)", .guid = UVC_GUID_FORMAT_UYVY, .fcc = V4L2_PIX_FMT_UYVY, diff --git a/drivers/media/video/uvc/uvcvideo.h b/drivers/media/video/uvc/uvcvideo.h index 0275613..7cf224b 100644 --- a/drivers/media/video/uvc/uvcvideo.h +++ b/drivers/media/video/uvc/uvcvideo.h @@ -172,6 +172,9 @@ struct uvc_xu_control { #define UVC_GUID_FORMAT_RGBP \ { 'R', 'G', 'B', 'P', 0x00, 0x00, 0x10, 0x00, \ 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71} +#define UVC_GUID_FORMAT_M420 \ + { 'M', '4', '2', '0', 0x00, 0x00, 0x10, 0x00, \ + 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71} /* ------------------------------------------------------------------------ * Driver specific constants.