From patchwork Fri Mar 1 23:53:30 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matt Gomboc X-Patchwork-Id: 2205301 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 15525DF24C for ; Fri, 1 Mar 2013 23:53:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752704Ab3CAXxe (ORCPT ); Fri, 1 Mar 2013 18:53:34 -0500 Received: from mail-ia0-f171.google.com ([209.85.210.171]:41666 "EHLO mail-ia0-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752496Ab3CAXxe (ORCPT ); Fri, 1 Mar 2013 18:53:34 -0500 Received: by mail-ia0-f171.google.com with SMTP id z13so3156021iaz.2 for ; Fri, 01 Mar 2013 15:53:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:message-id:date:from:reply-to:user-agent:mime-version:to :subject:references:in-reply-to:content-type :content-transfer-encoding; bh=3fDjuvhaK1fOJ8nhF7qSKcqbShwScqkZy5s1hxNgmAw=; b=cjcJsOa13ro4qxQo2zdeiwTw71nSVcgUS1ItjjainLDo/eg7URFMA2YUuVPi+AKrTq 3AxZX9fIomHIks9Ft+Go7qsK1W/aDCFBSMZLtrraTQJvq1Vo3pUNDbFuKrkjjT9w4+3h 0gVNUtbM12xEmeTqoDmxM0p1+XHyVcMsWkhLLk6W9o995fV33am1aiKKP7vlc2cvpOZY yCxCdmHq+P3k1M3P224oBIm5Jg90vLfR169iIs4cPdExiU/t5MkMBT9HppcowBgcKNhI ydDYlrB3HHepF6cJ9WPDd2G11vTcWsyUaRHXlga2gnmi2W2miGGCHO0jHImg/d1zhDZM GQ+Q== X-Received: by 10.43.65.195 with SMTP id xn3mr8820067icb.5.1362182013661; Fri, 01 Mar 2013 15:53:33 -0800 (PST) Received: from [192.168.1.5] (c-50-152-48-34.hsd1.co.comcast.net. [50.152.48.34]) by mx.google.com with ESMTPS id uy13sm604504igb.7.2013.03.01.15.53.31 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 01 Mar 2013 15:53:32 -0800 (PST) Message-ID: <51313F7A.9080900@gmail.com> Date: Fri, 01 Mar 2013 16:53:30 -0700 From: Matt Gomboc Reply-To: gomboc0@gmail.com User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:16.0) Gecko/20121101 Thunderbird/16.0.1 MIME-Version: 1.0 To: Hans Verkuil , linux-media@vger.kernel.org Subject: Re: cx231xx : Add support for OTG102 aka EZGrabber2 References: <4B487EF5847E47F0A8C1E96B9CA6B6D6@ucdenver.pvt> <201303010852.36574.hverkuil@xs4all.nl> In-Reply-To: <201303010852.36574.hverkuil@xs4all.nl> Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Thanks for the response, I have done as you suggested. Below is an updated patch for the OTG102 device against http://git.linuxtv.org/hverkuil/media_tree.git/shortlog/refs/heads/cx231xx, kernel version 3.8. With further testing it appears the extra clauses in cx231xx-cards.c were not necessary (in static in cx231xx_init_dev and static int cx231xx_usb_probe), so those have been also been removed. Signed-off-by: Matt Gomboc Acked-by: Hans Verkuil Acked-by: Hans Verkuil --- drivers/media/usb/cx231xx/cx231xx-avcore.c | 2 ++ drivers/media/usb/cx231xx/cx231xx-cards.c | 35 ++++++++++++++++++++++++++++++ drivers/media/usb/cx231xx/cx231xx.h | 1 + 3 files changed, 38 insertions(+) -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/media/usb/cx231xx/cx231xx-avcore.c b/drivers/media/usb/cx231xx/cx231xx-avcore.c index 2e51fb9..235ba65 100644 --- a/drivers/media/usb/cx231xx/cx231xx-avcore.c +++ b/drivers/media/usb/cx231xx/cx231xx-avcore.c @@ -357,6 +357,7 @@ int cx231xx_afe_update_power_control(struct cx231xx *dev, case CX231XX_BOARD_PV_PLAYTV_USB_HYBRID: case CX231XX_BOARD_HAUPPAUGE_USB2_FM_PAL: case CX231XX_BOARD_HAUPPAUGE_USB2_FM_NTSC: + case CX231XX_BOARD_OTG102: if (avmode == POLARIS_AVMODE_ANALOGT_TV) { while (afe_power_status != (FLD_PWRDN_TUNING_BIAS | FLD_PWRDN_ENABLE_PLL)) { @@ -1720,6 +1721,7 @@ int cx231xx_dif_set_standard(struct cx231xx *dev, u32 standard) case CX231XX_BOARD_CNXT_RDU_250: case CX231XX_BOARD_CNXT_VIDEO_GRABBER: case CX231XX_BOARD_HAUPPAUGE_EXETER: + case CX231XX_BOARD_OTG102: func_mode = 0x03; break; case CX231XX_BOARD_CNXT_RDE_253S: diff --git a/drivers/media/usb/cx231xx/cx231xx-cards.c b/drivers/media/usb/cx231xx/cx231xx-cards.c index b7b1acd..13249e5 100644 --- a/drivers/media/usb/cx231xx/cx231xx-cards.c +++ b/drivers/media/usb/cx231xx/cx231xx-cards.c @@ -634,6 +634,39 @@ struct cx231xx_board cx231xx_boards[] = { .gpio = NULL, } }, }, + [CX231XX_BOARD_OTG102] = { + .name = "Geniatech OTG102", + .tuner_type = TUNER_ABSENT, + .decoder = CX231XX_AVDECODER, + .output_mode = OUT_MODE_VIP11, + .ctl_pin_status_mask = 0xFFFFFFC4, + .agc_analog_digital_select_gpio = 0x0c, + /* According with PV CxPlrCAP.inf file */ + .gpio_pin_status_mask = 0x4001000, + .norm = V4L2_STD_NTSC, + .no_alt_vanc = 1, + .external_av = 1, + .dont_use_port_3 = 1, + /*.has_417 = 1, */ + /* This board is believed to have a hardware encoding chip + * supporting mpeg1/2/4, but as the 417 is apparently not + * working for the reference board it is not here either. */ + + .input = {{ + .type = CX231XX_VMUX_COMPOSITE1, + .vmux = CX231XX_VIN_2_1, + .amux = CX231XX_AMUX_LINE_IN, + .gpio = NULL, + }, { + .type = CX231XX_VMUX_SVIDEO, + .vmux = CX231XX_VIN_1_1 | + (CX231XX_VIN_1_2 << 8) | + CX25840_SVIDEO_ON, + .amux = CX231XX_AMUX_LINE_IN, + .gpio = NULL, + } + }, + }, }; const unsigned int cx231xx_bcount = ARRAY_SIZE(cx231xx_boards); @@ -675,6 +708,8 @@ struct usb_device_id cx231xx_id_table[] = { .driver_info = CX231XX_BOARD_ICONBIT_U100}, {USB_DEVICE(0x0fd9, 0x0037), .driver_info = CX231XX_BOARD_ELGATO_VIDEO_CAPTURE_V2}, + {USB_DEVICE(0x1f4d, 0x0102), + .driver_info = CX231XX_BOARD_OTG102}, {}, }; diff --git a/drivers/media/usb/cx231xx/cx231xx.h b/drivers/media/usb/cx231xx/cx231xx.h index a8e50d2..dff3f1d 100644 --- a/drivers/media/usb/cx231xx/cx231xx.h +++ b/drivers/media/usb/cx231xx/cx231xx.h @@ -71,6 +71,7 @@ #define CX231XX_BOARD_HAUPPAUGE_USB2_FM_PAL 14 #define CX231XX_BOARD_HAUPPAUGE_USB2_FM_NTSC 15 #define CX231XX_BOARD_ELGATO_VIDEO_CAPTURE_V2 16 +#define CX231XX_BOARD_OTG102 17 /* Limits minimum and default number of buffers */ #define CX231XX_MIN_BUF 4