From patchwork Fri Oct 10 18:41:12 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Crispin X-Patchwork-Id: 5066881 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id ADA6E9F40A for ; Fri, 10 Oct 2014 18:59:59 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D8D1820212 for ; Fri, 10 Oct 2014 18:59:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 068BF2022A for ; Fri, 10 Oct 2014 18:59:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751995AbaJJS7y (ORCPT ); Fri, 10 Oct 2014 14:59:54 -0400 Received: from static.88-198-24-112.clients.your-server.de ([88.198.24.112]:46878 "EHLO nbd.name" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751703AbaJJS7x (ORCPT ); Fri, 10 Oct 2014 14:59:53 -0400 From: John Crispin To: Laurent Pinchart Cc: linux-media@vger.kernel.org Subject: [PATCH 1/2] [media] uvcvideo: add a new quirk UVC_QUIRK_SINGLE_ISO Date: Fri, 10 Oct 2014 20:41:12 +0200 Message-Id: <1412966473-5407-1-git-send-email-blogic@openwrt.org> X-Mailer: git-send-email 1.7.10.4 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Spam-Status: No, score=-7.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The following patch adds the usb ids for the iPassion chip. This chip is found on D-Link DIR-930 IP cameras. For them to work this patch needs to be applied. I am almost certain that this is the incorrect fix. Could someone shed a bit of light on how i should really implement the fix ? Signed-off-by: John Crispin --- drivers/media/usb/uvc/uvc_video.c | 2 ++ drivers/media/usb/uvc/uvcvideo.h | 1 + 2 files changed, 3 insertions(+) diff --git a/drivers/media/usb/uvc/uvc_video.c b/drivers/media/usb/uvc/uvc_video.c index 9144a2f..61381fd 100644 --- a/drivers/media/usb/uvc/uvc_video.c +++ b/drivers/media/usb/uvc/uvc_video.c @@ -1495,6 +1495,8 @@ static int uvc_init_video_isoc(struct uvc_streaming *stream, if (npackets == 0) return -ENOMEM; + if (stream->dev->quirks & UVC_QUIRK_SINGLE_ISO) + npackets = 1; size = npackets * psize; for (i = 0; i < UVC_URBS; ++i) { diff --git a/drivers/media/usb/uvc/uvcvideo.h b/drivers/media/usb/uvc/uvcvideo.h index b1f69a6..b6df4f8 100644 --- a/drivers/media/usb/uvc/uvcvideo.h +++ b/drivers/media/usb/uvc/uvcvideo.h @@ -147,6 +147,7 @@ #define UVC_QUIRK_FIX_BANDWIDTH 0x00000080 #define UVC_QUIRK_PROBE_DEF 0x00000100 #define UVC_QUIRK_RESTRICT_FRAME_RATE 0x00000200 +#define UVC_QUIRK_SINGLE_ISO 0x00000400 /* Format flags */ #define UVC_FMT_FLAG_COMPRESSED 0x00000001