From patchwork Sun Jan 16 20:44:53 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mariusz Bialonczyk X-Patchwork-Id: 482691 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 p0GKjBPU028150 for ; Sun, 16 Jan 2011 20:45:11 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753864Ab1APUpJ (ORCPT ); Sun, 16 Jan 2011 15:45:09 -0500 Received: from skyboo.net ([82.160.187.4]:35242 "EHLO skyboo.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1753666Ab1APUpI (ORCPT ); Sun, 16 Jan 2011 15:45:08 -0500 Received: from [2001:470:1f0b:1af:f000::2] by skyboo.net with esmtpsa (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.72) (envelope-from ) id 1PeZTC-0003n2-S6; Sun, 16 Jan 2011 21:45:03 +0100 Message-ID: <4D3358C5.5080706@skyboo.net> Date: Sun, 16 Jan 2011 21:44:53 +0100 From: Mariusz Bialonczyk User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.16) Gecko/20101226 Icedove/3.0.11 MIME-Version: 1.0 To: Mauro Carvalho Chehab CC: linux-media@vger.kernel.org X-SA-Exim-Connect-IP: 2001:470:1f0b:1af:f000::2 X-SA-Exim-Mail-From: manio@skyboo.net X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on draco.skyboo.net X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED autolearn=unavailable version=3.3.1 Subject: [PATCH] Prof 7301: switching frontend to stv090x, fixing "LOCK FAILED" issue X-SA-Exim-Version: 4.2.1 (built Mon, 22 Mar 2010 06:26:47 +0000) X-SA-Exim-Scanned: Yes (on skyboo.net) 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, 16 Jan 2011 20:45:11 +0000 (UTC) diff --git a/drivers/media/video/cx88/Kconfig b/drivers/media/video/cx88/Kconfig index 5c42abd..57316bb 100644 --- a/drivers/media/video/cx88/Kconfig +++ b/drivers/media/video/cx88/Kconfig @@ -60,7 +60,7 @@ config VIDEO_CX88_DVB select DVB_STV0299 if !DVB_FE_CUSTOMISE select DVB_STV0288 if !DVB_FE_CUSTOMISE select DVB_STB6000 if !DVB_FE_CUSTOMISE - select DVB_STV0900 if !DVB_FE_CUSTOMISE + select DVB_STV090x if !DVB_FE_CUSTOMISE select DVB_STB6100 if !DVB_FE_CUSTOMISE select MEDIA_TUNER_SIMPLE if !MEDIA_TUNER_CUSTOMISE ---help--- diff --git a/drivers/media/video/cx88/cx88-dvb.c b/drivers/media/video/cx88/cx88-dvb.c index 90717ee..3f25872 100644 --- a/drivers/media/video/cx88/cx88-dvb.c +++ b/drivers/media/video/cx88/cx88-dvb.c @@ -53,9 +53,9 @@ #include "stv0288.h" #include "stb6000.h" #include "cx24116.h" -#include "stv0900.h" +#include "stv090x.h" #include "stb6100.h" -#include "stb6100_proc.h" +#include "stb6100_cfg.h" #include "mb86a16.h" MODULE_DESCRIPTION("driver for cx2388x based DVB cards"); @@ -611,15 +611,6 @@ static int cx24116_set_ts_param(struct dvb_frontend *fe, return 0; } -static int stv0900_set_ts_param(struct dvb_frontend *fe, - int is_punctured) -{ - struct cx8802_dev *dev = fe->dvb->priv; - dev->ts_gen_cntrl = 0; - - return 0; -} - static int cx24116_reset_device(struct dvb_frontend *fe) { struct cx8802_dev *dev = fe->dvb->priv; @@ -648,16 +639,21 @@ static const struct cx24116_config tevii_s460_config = { .reset_device = cx24116_reset_device, }; -static const struct stv0900_config prof_7301_stv0900_config = { - .demod_address = 0x6a, -/* demod_mode = 0,*/ - .xtal = 27000000, - .clkmode = 3,/* 0-CLKI, 2-XTALI, else AUTO */ - .diseqc_mode = 2,/* 2/3 PWM */ - .tun1_maddress = 0,/* 0x60 */ - .tun1_adc = 0,/* 2 Vpp */ - .path1_mode = 3, - .set_ts_params = stv0900_set_ts_param, +static struct stv090x_config prof_7301_stv090x_config = { + .device = STV0903, + .demod_mode = STV090x_SINGLE, + .clk_mode = STV090x_CLK_EXT, + .xtal = 27000000, + .address = 0x6A, + .ts1_mode = STV090x_TSMODE_PARALLEL_PUNCTURED, + .repeater_level = STV090x_RPTLEVEL_64, + .adc1_range = STV090x_ADC_2Vpp, + .diseqc_envelope_mode = false, + + .tuner_get_frequency = stb6100_get_frequency, + .tuner_set_frequency = stb6100_set_frequency, + .tuner_set_bandwidth = stb6100_set_bandwidth, + .tuner_get_bandwidth = stb6100_get_bandwidth, }; static const struct stb6100_config prof_7301_stb6100_config = { @@ -1402,23 +1398,19 @@ static int dvb_register(struct cx8802_dev *dev) } break; case CX88_BOARD_PROF_7301:{ - struct dvb_tuner_ops *tuner_ops = NULL; + dev->ts_gen_cntrl = 0x00; - fe0->dvb.frontend = dvb_attach(stv0900_attach, - &prof_7301_stv0900_config, - &core->i2c_adap, 0); + fe0->dvb.frontend = dvb_attach(stv090x_attach, + &prof_7301_stv090x_config, + &core->i2c_adap, + STV090x_DEMODULATOR_0); if (fe0->dvb.frontend != NULL) { - if (!dvb_attach(stb6100_attach, fe0->dvb.frontend, + if (!dvb_attach(stb6100_attach, + fe0->dvb.frontend, &prof_7301_stb6100_config, &core->i2c_adap)) goto frontend_detach; - 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; - core->prev_set_voltage = fe0->dvb.frontend->ops.set_voltage; fe0->dvb.frontend->ops.set_voltage =