summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Benesch <twoof7@freenet.de>2009-12-18 21:20:34 +0100
committerMatthias Benesch <twoof7@freenet.de>2009-12-18 21:20:34 +0100
commit96a0d72e80360684c15a6a7ab1bc3c25ca603e66 (patch)
tree18f219c39ed2d774290e65959639bf4ecb1c8274
parent599744408a850c5643b007729cd4b1c429e7f0cd (diff)
downloadmediapointer-dvb-s2-96a0d72e80360684c15a6a7ab1bc3c25ca603e66.tar.gz
mediapointer-dvb-s2-96a0d72e80360684c15a6a7ab1bc3c25ca603e66.tar.bz2
ngene: Removed use of modules stv0900 & stv6110.
From: Matthias Benesch <twoof7@freenet.de> Removed use of modules stv0900 & stv6110 from Igor M. Liplianin. Therefore also define NGENE_STV090X became unnecessary (clean up module ngene). Priority: normal
-rw-r--r--linux/drivers/media/video/ngene/Kconfig2
-rw-r--r--linux/drivers/media/video/ngene/ngene-core.c270
-rw-r--r--linux/drivers/media/video/ngene/ngene.h2
3 files changed, 86 insertions, 188 deletions
diff --git a/linux/drivers/media/video/ngene/Kconfig b/linux/drivers/media/video/ngene/Kconfig
index 835dea4f6..479fcd2fb 100644
--- a/linux/drivers/media/video/ngene/Kconfig
+++ b/linux/drivers/media/video/ngene/Kconfig
@@ -3,9 +3,7 @@ config VIDEO_NGENE
depends on DVB_CORE && VIDEO_DEV && PCI && I2C
select DVB_LNBP21 if !DVB_FE_CUSTOMISE
select DVB_STV6110x if !DVB_FE_CUSTOMISE
- select DVB_STV6110 if !DVB_FE_CUSTOMISE
select DVB_STV090x if !DVB_FE_CUSTOMISE
- select DVB_STV0900 if !DVB_FE_CUSTOMISE
---help---
Support for Micronas PCI express cards with nGene bridge.
diff --git a/linux/drivers/media/video/ngene/ngene-core.c b/linux/drivers/media/video/ngene/ngene-core.c
index 3b2a186ca..a27a62939 100644
--- a/linux/drivers/media/video/ngene/ngene-core.c
+++ b/linux/drivers/media/video/ngene/ngene-core.c
@@ -44,15 +44,8 @@
#include "ngene.h"
-#ifdef NGENE_STV090X
#include "stv6110x.h"
#include "stv090x.h"
-#else
-#include "stv0900.h"
-#include "stv0900_reg.h"
-#include "stv6110.h"
-#endif /* NGENE_STV090X */
-
#include "lnbh24.h"
#ifdef NGENE_COMMAND_API
@@ -3493,6 +3486,35 @@ static int python_gate_ctrl(struct dvb_frontend *fe, int enable)
/* Demod/tuner attachment ***************************************************/
/****************************************************************************/
+static int tuner_attach_stv6110(struct ngene_channel *chan)
+{
+ struct stv090x_config *feconf = (struct stv090x_config*)
+ chan->dev->card_info->fe_config[chan->number];
+ struct stv6110x_config *tunerconf = (struct stv6110x_config*)
+ chan->dev->card_info->tuner_config[chan->number];
+ struct stv6110x_devctl *ctl;
+
+ ctl = dvb_attach(stv6110x_attach, chan->fe, tunerconf,
+ &chan->i2c_adapter);
+ if (ctl == NULL) {
+ printk(KERN_ERR "No STV6110X found!\n");
+ return -ENODEV;
+ }
+
+ feconf->tuner_init = ctl->tuner_init;
+ feconf->tuner_set_mode = ctl->tuner_set_mode;
+ feconf->tuner_set_frequency = ctl->tuner_set_frequency;
+ feconf->tuner_get_frequency = ctl->tuner_get_frequency;
+ feconf->tuner_set_bandwidth = ctl->tuner_set_bandwidth;
+ feconf->tuner_get_bandwidth = ctl->tuner_get_bandwidth;
+ feconf->tuner_set_bbgain = ctl->tuner_set_bbgain;
+ feconf->tuner_get_bbgain = ctl->tuner_get_bbgain;
+ feconf->tuner_set_refclk = ctl->tuner_set_refclk;
+ feconf->tuner_get_status = ctl->tuner_get_status;
+
+ return 0;
+}
+
#if 0
static int tuner_attach_mt2060(struct ngene_channel *chan)
{
@@ -3542,57 +3564,6 @@ static int tuner_attach_xc3028(struct ngene_channel *chan)
return fe2 ? 0 : -ENODEV;
}
-#endif
-
-static int tuner_attach_stv6110(struct ngene_channel *chan)
-{
-#ifdef NGENE_STV090X
- struct stv090x_config *feconf =
- (struct stv090x_config*)chan->dev->card_info->fe_config[chan->number];
- struct stv6110x_config *tunerconf =
- (struct stv6110x_config*)chan->dev->card_info->tuner_config[chan->number];
- struct stv6110x_devctl *ctl;
-
- printk(DEVICE_NAME ": stv6110x_attach: nr = %d, \n", chan->number);
- printk(DEVICE_NAME ": addr = %x, \n", tunerconf->addr);
- printk(DEVICE_NAME ": refclk = %d, \n", tunerconf->refclk);
-
- ctl = dvb_attach(stv6110x_attach, chan->fe, tunerconf, &chan->i2c_adapter);
- if (ctl == NULL) {
- printk(KERN_ERR "No STV6110X found!\n");
- return -ENODEV;
- }
-
- feconf->tuner_init = ctl->tuner_init;
- feconf->tuner_set_mode = ctl->tuner_set_mode;
- feconf->tuner_set_frequency = ctl->tuner_set_frequency;
- feconf->tuner_get_frequency = ctl->tuner_get_frequency;
- feconf->tuner_set_bandwidth = ctl->tuner_set_bandwidth;
- feconf->tuner_get_bandwidth = ctl->tuner_get_bandwidth;
- feconf->tuner_set_bbgain = ctl->tuner_set_bbgain;
- feconf->tuner_get_bbgain = ctl->tuner_get_bbgain;
- feconf->tuner_set_refclk = ctl->tuner_set_refclk;
- feconf->tuner_get_status = ctl->tuner_get_status;
-
-#else
- struct stv6110_config *tunerconf =
- (struct stv6110_config*)chan->dev->card_info->tuner_config[chan->number];
-
- printk(DEVICE_NAME ": stv6110_attach: nr = %d, \n", chan->number);
- printk(DEVICE_NAME ": i2c_address = %x, \n", tunerconf->i2c_address);
- printk(DEVICE_NAME ": mclk = %d, \n", tunerconf->mclk);
- printk(DEVICE_NAME ": clk_div = %x, \n", tunerconf->clk_div);
-
- if (!dvb_attach(stv6110_attach, chan->fe, tunerconf, &chan->i2c_adapter)) {
- printk(KERN_ERR "No STV6110 found!\n");
- return -ENODEV;
- }
-#endif /* NGENE_STV090X */
-
- return 0;
-}
-
-#if 0
static int demod_attach_drxd(struct ngene_channel *chan)
{
void *feconf=chan->dev->card_info->fe_config[chan->number];
@@ -3638,43 +3609,14 @@ static int demod_attach_stb0899(struct ngene_channel *chan)
static int demod_attach_stv0900(struct ngene_channel *chan)
{
-#ifdef NGENE_STV090X
- struct stv090x_config *feconf =
- (struct stv090x_config*)chan->dev->card_info->fe_config[chan->number];
-
- printk(DEVICE_NAME ": stv090x_attach: nr = %d, \n", chan->number);
- printk(DEVICE_NAME ": device = %x, \n", feconf->device);
- printk(DEVICE_NAME ": demod_mode = %x, \n", feconf->demod_mode);
- printk(DEVICE_NAME ": clk_mode = %x, \n", feconf->clk_mode);
- printk(DEVICE_NAME ": xtal = %d, \n", feconf->xtal);
- printk(DEVICE_NAME ": address = %x, \n", feconf->address);
- printk(DEVICE_NAME ": ref_clk = %d, \n", feconf->ref_clk);
- printk(DEVICE_NAME ": ts1_mode = %x, \n", feconf->ts1_mode);
- printk(DEVICE_NAME ": ts2_mode = %x, \n", feconf->ts2_mode);
- printk(DEVICE_NAME ": repeater_level = %x, \n", feconf->repeater_level);
+ struct stv090x_config *feconf = (struct stv090x_config*)
+ chan->dev->card_info->fe_config[chan->number];
chan->fe = dvb_attach(stv090x_attach,
feconf,
&chan->i2c_adapter,
- chan->number == 0 ? STV090x_DEMODULATOR_0 : STV090x_DEMODULATOR_1);
-#else
- struct stv0900_config *feconf =
- (struct stv0900_config*)chan->dev->card_info->fe_config[chan->number];
-
- printk(DEVICE_NAME ": stv0900_attach: nr = %d, \n", chan->number);
- printk(DEVICE_NAME ": demod_address = %x, \n", feconf->demod_address);
- printk(DEVICE_NAME ": xtal = %d, \n", feconf->xtal);
- printk(DEVICE_NAME ": clkmode = %x, \n", feconf->clkmode);
- printk(DEVICE_NAME ": diseqc_mode = %x, \n", feconf->diseqc_mode);
- printk(DEVICE_NAME ": path1_mode = %x, \n", feconf->path1_mode);
- printk(DEVICE_NAME ": path2_mode = %x, \n", feconf->path2_mode);
- printk(DEVICE_NAME ": tun1_maddress = %x, \n", feconf->tun1_maddress);
- printk(DEVICE_NAME ": tun2_maddress = %x, \n", feconf->tun2_maddress);
- printk(DEVICE_NAME ": tun1_adc = %x, \n", feconf->tun1_adc);
- printk(DEVICE_NAME ": tun2_adc = %x, \n", feconf->tun2_adc);
-
- chan->fe=dvb_attach(stv0900_attach, feconf, &chan->i2c_adapter, chan->number);
-#endif /* NGENE_STV090X */
+ chan->number == 0 ? STV090x_DEMODULATOR_0 :
+ STV090x_DEMODULATOR_1);
if (chan->fe) {
if (dvb_attach(lnbh24_attach, chan->fe, &chan->i2c_adapter, 0,
@@ -3970,12 +3912,63 @@ fail0:
return stat;
}
-
-
/****************************************************************************/
/* Card configs *************************************************************/
/****************************************************************************/
+static struct stv090x_config fe_mps2 = {
+ .device = STV0900,
+ .demod_mode = STV090x_DUAL,
+ .clk_mode = STV090x_CLK_EXT,
+
+ .xtal = 27000000,
+ .address = 0x68,
+ .ref_clk = 27000000,
+
+ .ts1_mode = STV090x_TSMODE_SERIAL_PUNCTURED,
+ .ts2_mode = STV090x_TSMODE_SERIAL_PUNCTURED,
+
+ .repeater_level = STV090x_RPTLEVEL_16,
+
+ .diseqc_envelope_mode = true,
+
+ .tuner_init = NULL,
+ .tuner_set_mode = NULL,
+ .tuner_set_frequency = NULL,
+ .tuner_get_frequency = NULL,
+ .tuner_set_bandwidth = NULL,
+ .tuner_get_bandwidth = NULL,
+ .tuner_set_bbgain = NULL,
+ .tuner_get_bbgain = NULL,
+ .tuner_set_refclk = NULL,
+ .tuner_get_status = NULL,
+};
+
+static struct stv6110x_config tuner_mps2_0 = {
+ .addr = 0x60,
+ .refclk = 27000000,
+};
+
+static struct stv6110x_config tuner_mps2_1 = {
+ .addr = 0x63,
+ .refclk = 27000000,
+};
+
+static struct ngene_info ngene_info_mps2 = {
+ .type = NGENE_SIDEWINDER,
+ .name = "Media-Pointer MP-S2� DVB-S2 Twin Tuner",
+ .io_type = { NGENE_IO_TSIN, NGENE_IO_TSIN },
+ .demod_attach = { demod_attach_stv0900, demod_attach_stv0900 },
+ .tuner_attach = { tuner_attach_stv6110, tuner_attach_stv6110 },
+ .fe_config = { &fe_mps2, &fe_mps2 },
+ .tuner_config = { &tuner_mps2_0, &tuner_mps2_1 },
+ .lnb = { 0x0b, 0x08 },
+ .tsf = { 3, 3 },
+ .fw_version = 17,
+};
+
+/****************************************************************************/
+
#if 0
static struct drxd_config fe_terratec_dvbt_0 = {
.index=0, .demod_address=0x70, .demod_revision=0xa2,
@@ -4112,102 +4105,11 @@ static struct ngene_info ngene_info_sidewinder = {
.fe_config = { &fe_sidewinder_0, &fe_sidewinder_1 },
.lnb = { 0x0b, 0x08 },
};
-#endif
-
-/****************************************************************************/
-
-#ifdef NGENE_STV090X
-static struct stv090x_config fe_mps2 = {
- .device = STV0900,
- .demod_mode = STV090x_DUAL,
- .clk_mode = STV090x_CLK_EXT,
-
- .xtal = 27000000,
- .address = 0x68,
- .ref_clk = 27000000,
-
- .ts1_mode = STV090x_TSMODE_SERIAL_PUNCTURED, /* => TSCFGH.SERIAL & TSCFGH.TSFIFO_DVBCI */
- .ts2_mode = STV090x_TSMODE_SERIAL_PUNCTURED, /* => TSCFGH.SERIAL & TSCFGH.TSFIFO_DVBCI */
-
- .repeater_level = STV090x_RPTLEVEL_16, /* => I2CRPT.ENARPT_LEVEL */
-
- .diseqc_envelope_mode = true,
-
- .tuner_init = NULL,
- .tuner_set_mode = NULL,
- .tuner_set_frequency = NULL,
- .tuner_get_frequency = NULL,
- .tuner_set_bandwidth = NULL,
- .tuner_get_bandwidth = NULL,
- .tuner_set_bbgain = NULL,
- .tuner_get_bbgain = NULL,
- .tuner_set_refclk = NULL,
- .tuner_get_status = NULL,
-};
-
-static struct stv6110x_config tuner_mps2_0 = {
- .addr = 0x60,
- .refclk = 27000000,
-};
-
-static struct stv6110x_config tuner_mps2_1 = {
- .addr = 0x63,
- .refclk = 27000000,
-};
-
-#else
-
-static struct stv0900_config fe_mps2 = {
- .demod_address = 0x68,
- .xtal = 27000000,
- .clkmode = 2, /* 0-CLKI, 2-XTALI, else AUTO => SYNTCTRL.SELOSCI */
- .diseqc_mode = 2, /* ??? => DISTXCTL.DISTX_MODE */
- /* STV0900_USE_REGISTERS_DEFAULT = 0,
- * STV0900_SERIAL_PUNCT_CLOCK = 1,
- * STV0900_SERIAL_CONT_CLOCK = 2,
- * STV0900_PARALLEL_PUNCT_CLOCK = 3,
- * STV0900_DVBCI_CLOCK = 4 */
- .path1_mode = 1, /* => TSCFGH.TSFIFO_SERIAL & TSCFGH.TSFIFO_DVBCI */
- .path2_mode = 1, /* => TSCFGH.TSFIFO_SERIAL & TSCFGH.TSFIFO_DVBCI */
- .ts_config_regs = NULL,
- .tun1_maddress = 0, /* 0x60 */
- .tun2_maddress = 3, /* 0x63 */
- .tun1_adc = 1, /* => if 1 TSTTNR1=0x26 */
- .tun2_adc = 1, /* => if 1 TSTTNR3=0x26 */
-};
-
-static struct stv6110_config tuner_mps2_0 = {
- .i2c_address = 0x60,
- .mclk = 27000000, /* => CTRL1.K */
- .clk_div = 0, /* => CTRL2.CO_DIV */
-};
-
-static struct stv6110_config tuner_mps2_1 = {
- .i2c_address = 0x63,
- .mclk = 27000000, /* => CTRL1.K */
- .clk_div = 0, /* => CTRL2.CO_DIV */
-};
-
-#endif /* NGENE_STV090X */
-
-static struct ngene_info ngene_info_mps2 = {
- .type = NGENE_SIDEWINDER,
- .name = "Media-Pointer MP-S2� DVB-S2 Twin Tuner",
- .io_type = { NGENE_IO_TSIN, NGENE_IO_TSIN },
- .demod_attach = { demod_attach_stv0900, demod_attach_stv0900 },
- .tuner_attach = { tuner_attach_stv6110, tuner_attach_stv6110 },
- .fe_config = { &fe_mps2, &fe_mps2 },
- .tuner_config = { &tuner_mps2_0, &tuner_mps2_1 },
- .lnb = { 0x0b, 0x08 },
- .tsf = { 3, 3 },
- .fw_version = 17,
-};
/****************************************************************************/
/* Yet unnamed S2 card with dual DVB-S2 demod */
/****************************************************************************/
-#if 0
static struct stv0900_config fe_s2_0 = {
.addr=0x68, .pll=0x63, .pll_type=0, .nr=0,
};
diff --git a/linux/drivers/media/video/ngene/ngene.h b/linux/drivers/media/video/ngene/ngene.h
index e47c0d8a9..ccf7ed42c 100644
--- a/linux/drivers/media/video/ngene/ngene.h
+++ b/linux/drivers/media/video/ngene/ngene.h
@@ -26,7 +26,6 @@
//#define ONE_ADAPTER
//#define NGENE_COMMAND_API
-#define NGENE_STV090X
//#define NGENE_V4L
#include <linux/types.h>
@@ -35,7 +34,6 @@
#include <linux/i2c.h>
#include <asm/dma.h>
#include <asm/scatterlist.h>
-//#include <sound/driver.h>
#include <sound/core.h>
#include <sound/initval.h>
#include <sound/control.h>