From patchwork Sun Mar 20 19:32:59 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wojciech Myrda X-Patchwork-Id: 646791 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 p2KJWO3b011221 for ; Sun, 20 Mar 2011 19:33:54 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752162Ab1CTTdx (ORCPT ); Sun, 20 Mar 2011 15:33:53 -0400 Received: from tur.go2.pl ([193.17.41.50]:50414 "EHLO tur.go2.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751390Ab1CTTdw (ORCPT ); Sun, 20 Mar 2011 15:33:52 -0400 Received: from moh1-ve3.go2.pl (moh1-ve3.go2.pl [193.17.41.134]) by tur.go2.pl (o2.pl Mailer 2.0.1) with ESMTP id ABC9C230F2A for ; Sun, 20 Mar 2011 20:33:48 +0100 (CET) Received: from moh1-ve3.go2.pl (unknown [10.0.0.134]) by moh1-ve3.go2.pl (Postfix) with ESMTP id 283DB6645DC for ; Sun, 20 Mar 2011 20:33:00 +0100 (CET) Received: from unknown (unknown [10.0.0.74]) by moh1-ve3.go2.pl (Postfix) with SMTP for ; Sun, 20 Mar 2011 20:33:00 +0100 (CET) Received: from acxe113.neoplus.adsl.tpnet.pl [83.11.162.113] by poczta.o2.pl with ESMTP id fpjtfM; Sun, 20 Mar 2011 20:32:59 +0100 Message-ID: <4D86566B.9090803@tlen.pl> Date: Sun, 20 Mar 2011 20:32:59 +0100 From: Wojciech Myrda User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.15) Gecko/20110310 Lightning/1.0b3pre Thunderbird/3.1.9 MIME-Version: 1.0 To: linux-media@vger.kernel.org Subject: Prof_Revolution_DVB-S2_8000_PCI-E & Linux Kernel 2.6.38-rc8-next-20110314 X-O2-Trust: 2, 66 X-O2-SPF: neutral 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]); Sun, 20 Mar 2011 19:33:54 +0000 (UTC) diff -r 1da5fed5c8b2 linux/drivers/media/video/cx23885/cx23885-cards.c --- a/linux/drivers/media/video/cx23885/cx23885-cards.c Sun Sep 19 02:23:09 2010 -0300 +++ b/linux/drivers/media/video/cx23885/cx23885-cards.c Sat Oct 02 11:19:50 2010 +0300 @@ -169,6 +169,10 @@ .name = "TurboSight TBS 6920", .portb = CX23885_MPEG_DVB, }, + [CX23885_BOARD_PROF_8000] = { + .name = "Prof Revolution DVB-S2 8000", + .portb = CX23885_MPEG_DVB, + }, [CX23885_BOARD_TEVII_S470] = { .name = "TeVii S470", .portb = CX23885_MPEG_DVB, @@ -388,6 +392,10 @@ .subdevice = 0x8888, .card = CX23885_BOARD_TBS_6920, }, { + .subvendor = 0x8000, + .subdevice = 0x3034, + .card = CX23885_BOARD_PROF_8000, + }, { .subvendor = 0xd470, .subdevice = 0x9022, .card = CX23885_BOARD_TEVII_S470, @@ -813,6 +821,7 @@ mdelay(20); cx_set(GP0_IO, 0x00040004); break; + case CX23885_BOARD_PROF_8000: case CX23885_BOARD_TBS_6920: cx_write(MC417_CTL, 0x00000036); cx_write(MC417_OEN, 0x00001000); @@ -1043,6 +1052,7 @@ ts1->ts_clk_en_val = 0x1; /* Enable TS_CLK */ ts1->src_sel_val = CX23885_SRC_SEL_PARALLEL_MPEG_VIDEO; break; + case CX23885_BOARD_PROF_8000: case CX23885_BOARD_TEVII_S470: case CX23885_BOARD_DVBWORLD_2005: ts1->gen_ctrl_val = 0x5; /* Parallel */ --- a/linux/drivers/media/video/cx23885/cx23885-dvb.c.old 2011-03-20 08:20:37.384001338 +0100 +++ b/linux/drivers/media/video/cx23885/cx23885-dvb.c 2011-03-20 08:29:56.757001476 +0100 @@ -47,6 +47,9 @@ #include "dibx000_common.h" #include "zl10353.h" #include "stv0900.h" +#include "stb6100.h" +#include "stb6100_proc.h" +#include "stv0900.h" #include "stv0900_reg.h" #include "stv6110.h" #include "lnbh24.h" @@ -478,6 +478,35 @@ .if_khz = 5380, }; +static int p8000_set_voltage(struct dvb_frontend *fe, fe_sec_voltage_t voltage) +{ + struct cx23885_tsport *port = fe->dvb->priv; + struct cx23885_dev *dev = port->dev; + + if (voltage == SEC_VOLTAGE_18) + cx_write(MC417_RWD, 0x00001e00); + else if (voltage == SEC_VOLTAGE_13) + cx_write(MC417_RWD, 0x00001a00); + else + cx_write(MC417_RWD, 0x00001800); + return 0; +} + +static struct stv0900_config prof_8000_stv0900_config = { + .demod_address = 0x6a, + .xtal = 27000000, + .clkmode = 3, + .diseqc_mode = 2, + .tun1_maddress = 0, + .tun1_adc = 0, + .path1_mode = 3, +}; + +static struct stb6100_config prof_8000_stb6100_config = { + .tuner_address = 0x60, + .refclock = 27000000, +}; + static int cx23885_dvb_set_frontend(struct dvb_frontend *fe, struct dvb_frontend_parameters *param) { @@ -1094,6 +1123,29 @@ goto frontend_detach; } break; + case CX23885_BOARD_PROF_8000: { + struct dvb_tuner_ops *tuner_ops = NULL; + + i2c_bus = &dev->i2c_bus[0]; + fe0->dvb.frontend = dvb_attach(stv0900_attach, + &prof_8000_stv0900_config, + &i2c_bus->i2c_adap, 0); + if (fe0->dvb.frontend != NULL) { + if (dvb_attach(stb6100_attach, fe0->dvb.frontend, + &prof_8000_stb6100_config, + &i2c_bus->i2c_adap)) { + tuner_ops = &fe0->dvb.frontend->ops.tuner_ops; + tuner_ops->set_frequency = stb6100_set_freq; + tuner_ops->get_frequency = stb6100_get_freq; + tuner_ops->set_bandwidth = stb6100_set_bandw; + tuner_ops->get_bandwidth = stb6100_get_bandw; + + fe0->dvb.frontend->ops.set_voltage = + p8000_set_voltage; + } + } + break; + } default: printk(KERN_INFO "%s: The frontend of your DVB/ATSC card " " isn't supported yet\n", --- a/linux/drivers/media/video/cx23885/cx23885.h.old 2011-03-20 08:33:15.159001527 +0100 +++ b/linux/drivers/media/video/cx23885/cx23885.h 2011-03-20 08:34:32.244001547 +0100 @@ -86,6 +86,7 @@ #define CX23885_BOARD_LEADTEK_WINFAST_PXTV1200 28 #define CX23885_BOARD_GOTVIEW_X5_3D_HYBRID 29 #define CX23885_BOARD_NETUP_DUAL_DVB_T_C_CI_RF 30 +#define CX23885_BOARD_PROF_8000 31 #define GPIO_0 0x00000001 #define GPIO_1 0x00000002