From patchwork Wed Jun 17 04:38:12 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Wong X-Patchwork-Id: 30786 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n5H4cR9j021472 for ; Wed, 17 Jun 2009 04:38:28 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750913AbZFQEiM (ORCPT ); Wed, 17 Jun 2009 00:38:12 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1750986AbZFQEiM (ORCPT ); Wed, 17 Jun 2009 00:38:12 -0400 Received: from yw-out-2324.google.com ([74.125.46.28]:7760 "EHLO yw-out-2324.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750974AbZFQEiL (ORCPT ); Wed, 17 Jun 2009 00:38:11 -0400 Received: by yw-out-2324.google.com with SMTP id 5so55059ywb.1 for ; Tue, 16 Jun 2009 21:38:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:cc:content-type; bh=DK0Y0zTRRRFCt3jvalRtU+PTTWQ3OSxe0ArfGWb4Gnk=; b=IxtlfgroOFjeCvoAmyjKtQOYYjslqQe6Im2A+hNqjqlzzmZkKYyB/SI6pwE1VYp1z8 BSHDLTXHHMvv7nRo5P11P+0x4whBel7JwrvZUls+qOdn3vt30dweu/gpA6YxHsw3MQ9n GBu7LrWQLoZxa1F/OwG2T/EFnXXHQwcYutwPk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:cc:content-type; b=JXjrreLEjYgulz6fh5E3fC9i/fLD3fxTxZzp8tUWVYSEwI+uef1jHxDohfwjawKF0d FrDQKyPmUPVEQ5RH5Oh6KJsk8j7eRSX/x+sAiizLLc9z5PiJ9H2lzQ6Zcjv6QipB3+/y ook4F1mKF97t6quJKma98x+5QH1HVQZD+QJVI= MIME-Version: 1.0 Received: by 10.231.15.7 with SMTP id i7mr3220859iba.43.1245213492763; Tue, 16 Jun 2009 21:38:12 -0700 (PDT) Date: Wed, 17 Jun 2009 12:38:12 +0800 Message-ID: <15ed362e0906162138u7ffd97ecn67314df35da55701@mail.gmail.com> Subject: [PATCH 2/2] [Resend] cx23885: add card Magic-Pro ProHDTV Extreme 2 From: David Wong To: linux-media@vger.kernel.org Cc: Mauro Carvalho Chehab Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org cx23885: add card Magic-Pro ProHDTV Extreme 2 PCI-E. Signed-off-by: David T.L. Wong diff -r a92510aad9e2 -r 7195cfbca974 linux/drivers/media/video/cx23885/cx23885-cards.c --- a/linux/drivers/media/video/cx23885/cx23885-cards.c Thu Jun 11 19:07:15 2009 +0800 +++ b/linux/drivers/media/video/cx23885/cx23885-cards.c Thu Jun 11 20:04:04 2009 +0800 @@ -202,6 +202,10 @@ .name = "Mygica X8506 DMB-TH", .portb = CX23885_MPEG_DVB, }, + [CX23885_BOARD_MAGICPRO_PROHDTVE2] = { + .name = "Magic-Pro ProHDTV Extreme 2", + .portb = CX23885_MPEG_DVB, + }, }; const unsigned int cx23885_bcount = ARRAY_SIZE(cx23885_boards); @@ -325,6 +329,10 @@ .subvendor = 0x14f1, .subdevice = 0x8651, .card = CX23885_BOARD_MYGICA_X8506, + }, { + .subvendor = 0x14f1, + .subdevice = 0x8657, + .card = CX23885_BOARD_MAGICPRO_PROHDTVE2, }, }; const unsigned int cx23885_idcount = ARRAY_SIZE(cx23885_subids); @@ -716,8 +724,9 @@ cx23885_gpio_set(dev, GPIO_9); break; case CX23885_BOARD_MYGICA_X8506: + case CX23885_BOARD_MAGICPRO_PROHDTVE2: /* GPIO-1 reset XC5000 */ - /* GPIO-2 reset LGS8GL5 */ + /* GPIO-2 reset LGS8GL5 / LGS8G75 */ cx_set(GP0_IO, 0x00060000); cx_clear(GP0_IO, 0x00000006); mdelay(100); @@ -828,6 +837,7 @@ ts2->src_sel_val = CX23885_SRC_SEL_PARALLEL_MPEG_VIDEO; break; case CX23885_BOARD_MYGICA_X8506: + case CX23885_BOARD_MAGICPRO_PROHDTVE2: ts1->gen_ctrl_val = 0x5; /* Parallel */ ts1->ts_clk_en_val = 0x1; /* Enable TS_CLK */ ts1->src_sel_val = CX23885_SRC_SEL_PARALLEL_MPEG_VIDEO; diff -r a92510aad9e2 -r 7195cfbca974 linux/drivers/media/video/cx23885/cx23885-dvb.c --- a/linux/drivers/media/video/cx23885/cx23885-dvb.c Thu Jun 11 19:07:15 2009 +0800 +++ b/linux/drivers/media/video/cx23885/cx23885-dvb.c Thu Jun 11 20:04:04 2009 +0800 @@ -441,6 +441,26 @@ .if_khz = 5380, }; +static struct lgs8gxx_config magicpro_prohdtve2_lgs8g75_config = { + .prod = LGS8GXX_PROD_LGS8G75, + .demod_address = 0x19, + .serial_ts = 0, + .ts_clk_pol = 1, + .ts_clk_gated = 1, + .if_clk_freq = 30400, /* 30.4 MHz */ + .if_freq = 6500, /* 6.50 MHz */ + .if_neg_center = 1, + .ext_adc = 0, + .adc_signed = 1, + .adc_vpp = 2, /* 1.6 Vpp */ + .if_neg_edge = 1, +}; + +static struct xc5000_config magicpro_prohdtve2_xc5000_config = { + .i2c_address = 0x61, + .if_khz = 6500, +}; + static int dvb_register(struct cx23885_tsport *port) { struct cx23885_dev *dev = port->dev; @@ -779,6 +799,19 @@ &mygica_x8506_xc5000_config); } break; + case CX23885_BOARD_MAGICPRO_PROHDTVE2: + i2c_bus = &dev->i2c_bus[0]; + i2c_bus2 = &dev->i2c_bus[1]; + fe0->dvb.frontend = dvb_attach(lgs8gxx_attach, + &magicpro_prohdtve2_lgs8g75_config, + &i2c_bus->i2c_adap); + if (fe0->dvb.frontend != NULL) { + dvb_attach(xc5000_attach, + fe0->dvb.frontend, + &i2c_bus2->i2c_adap, + &magicpro_prohdtve2_xc5000_config); + } + break; default: printk(KERN_INFO "%s: The frontend of your DVB/ATSC card " " isn't supported yet\n", diff -r a92510aad9e2 -r 7195cfbca974 linux/drivers/media/video/cx23885/cx23885.h --- a/linux/drivers/media/video/cx23885/cx23885.h Thu Jun 11 19:07:15 2009 +0800 +++ b/linux/drivers/media/video/cx23885/cx23885.h Thu Jun 11 20:04:04 2009 +0800 @@ -77,6 +77,7 @@ #define CX23885_BOARD_HAUPPAUGE_HVR1255 20 #define CX23885_BOARD_HAUPPAUGE_HVR1210 21 #define CX23885_BOARD_MYGICA_X8506 22 +#define CX23885_BOARD_MAGICPRO_PROHDTVE2 23 #define GPIO_0 0x00000001 #define GPIO_1 0x00000002