From patchwork Thu Jun 11 12:39:18 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Wong X-Patchwork-Id: 29548 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 n5BCdN5R014877 for ; Thu, 11 Jun 2009 12:39:24 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752053AbZFKMjS (ORCPT ); Thu, 11 Jun 2009 08:39:18 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1755843AbZFKMjS (ORCPT ); Thu, 11 Jun 2009 08:39:18 -0400 Received: from yw-out-2324.google.com ([74.125.46.28]:29161 "EHLO yw-out-2324.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752053AbZFKMjQ (ORCPT ); Thu, 11 Jun 2009 08:39:16 -0400 Received: by yw-out-2324.google.com with SMTP id 5so986075ywb.1 for ; Thu, 11 Jun 2009 05:39:18 -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=l9WH3EhLHeQ5dellJX7modbynTxcEyUpyiphE7YHkbo=; b=j5Ex0SyeKdqMrEywvzqYxdBrx5jcByByAqcs60WOeJMyk/kaB/MYJOBtDMtq+K8WgY JQqVUdJYSot/UgWgGNo6veLyb8wQKPxbyKjiur/XzfuDIuBeNxnQFH+RW1J1YpflypoX MIoFBZqlP6uNImc6DedZA+Z3IvAsDepDWUNys= 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=kZh7F/2vZySe0AQA2k4v22/hOrbSYSBpU6F5Fjdyu/RtksW1Fd+XoV5tyHVGLAbLdY +eSD5EUePPPyJsUUeeeC3fkH2mvta8pVUgBmEv2LxA5s8grrpMKATMxMpLypxoUdJBHu ySVwe/RW/taPWwkUeZRLLP2yjSUM5mYSPtm4w= MIME-Version: 1.0 Received: by 10.231.39.5 with SMTP id d5mr1200861ibe.39.1244723958208; Thu, 11 Jun 2009 05:39:18 -0700 (PDT) Date: Thu, 11 Jun 2009 20:39:18 +0800 Message-ID: <15ed362e0906110539ud3349f6x351beabb3e1ed281@mail.gmail.com> Subject: [PATCH 4/4] 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 gmail.com> 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