Commit d76a6179 authored by Michael Krufky's avatar Michael Krufky Committed by Mauro Carvalho Chehab

V4L/DVB (3413): Kill nxt2002 in favor of the nxt200x module

- Kill nxt2002 module in favor of nxt200x.
- Repair broken nxt2002 support in the nxt200x module.
- Make the flexcop driver use nxt200x instead of the nxt2002 module for the
  Air2PC 2nd generation PCI card.
- Remove the nxt2002 module from cvs and kernel build.
Signed-off-by: default avatarMichael Krufky <mkrufky@m1k.net>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@infradead.org>
parent 2af35577
......@@ -4,7 +4,7 @@ config DVB_B2C2_FLEXCOP
select DVB_STV0299
select DVB_MT352
select DVB_MT312
select DVB_NXT2002
select DVB_NXT200X
select DVB_STV0297
select DVB_BCM3510
select DVB_LGDT330X
......
......@@ -9,7 +9,7 @@
#include "stv0299.h"
#include "mt352.h"
#include "nxt2002.h"
#include "nxt200x.h"
#include "bcm3510.h"
#include "stv0297.h"
#include "mt312.h"
......@@ -343,9 +343,10 @@ static struct lgdt330x_config air2pc_atsc_hd5000_config = {
.clock_polarity_flip = 1,
};
static struct nxt2002_config samsung_tbmv_config = {
static struct nxt200x_config samsung_tbmv_config = {
.demod_address = 0x0a,
.request_firmware = flexcop_fe_request_firmware,
.pll_address = 0xc2,
.pll_desc = &dvb_pll_tbmv30111in,
};
static struct bcm3510_config air2pc_atsc_first_gen_config = {
......@@ -505,7 +506,7 @@ int flexcop_frontend_init(struct flexcop_device *fc)
info("found the mt352 at i2c address: 0x%02x",samsung_tdtc9251dh0_config.demod_address);
} else
/* try the air atsc 2nd generation (nxt2002) */
if ((fc->fe = nxt2002_attach(&samsung_tbmv_config, &fc->i2c_adap)) != NULL) {
if ((fc->fe = nxt200x_attach(&samsung_tbmv_config, &fc->i2c_adap)) != NULL) {
fc->dev_type = FC_AIR_ATSC2;
info("found the nxt2002 at i2c address: 0x%02x",samsung_tbmv_config.demod_address);
} else
......
......@@ -166,18 +166,6 @@ config DVB_STV0297
comment "ATSC (North American/Korean Terresterial DTV) frontends"
depends on DVB_CORE
config DVB_NXT2002
tristate "Nxt2002 based"
depends on DVB_CORE
select FW_LOADER
help
An ATSC 8VSB tuner module. Say Y when you want to support this frontend.
This driver needs external firmware. Please use the command
"<kerneldir>/Documentation/dvb/get_dvb_firmware nxt2002" to
download/extract it, and then copy it to /usr/lib/hotplug/firmware
or /lib/firmware (depending on configuration of firmware hotplug).
config DVB_NXT200X
tristate "Nextwave NXT2002/NXT2004 based"
depends on DVB_CORE
......
......@@ -25,7 +25,6 @@ obj-$(CONFIG_DVB_CX22702) += cx22702.o
obj-$(CONFIG_DVB_TDA80XX) += tda80xx.o
obj-$(CONFIG_DVB_TDA10021) += tda10021.o
obj-$(CONFIG_DVB_STV0297) += stv0297.o
obj-$(CONFIG_DVB_NXT2002) += nxt2002.o
obj-$(CONFIG_DVB_NXT200X) += nxt200x.o
obj-$(CONFIG_DVB_OR51211) += or51211.o
obj-$(CONFIG_DVB_OR51132) += or51132.o
......
......@@ -326,7 +326,7 @@ struct dvb_pll_desc dvb_pll_tuv1236d = {
};
EXPORT_SYMBOL(dvb_pll_tuv1236d);
/* Samsung TBMV30111IN
/* Samsung TBMV30111IN / TBMV30712IN1
* used in Air2PC ATSC - 2nd generation (nxt2002)
*/
struct dvb_pll_desc dvb_pll_tbmv30111in = {
......
This diff is collapsed.
/*
Driver for the Nxt2002 demodulator
*/
#ifndef NXT2002_H
#define NXT2002_H
#include <linux/dvb/frontend.h>
#include <linux/firmware.h>
struct nxt2002_config
{
/* the demodulator's i2c address */
u8 demod_address;
/* request firmware for device */
int (*request_firmware)(struct dvb_frontend* fe, const struct firmware **fw, char* name);
};
extern struct dvb_frontend* nxt2002_attach(const struct nxt2002_config* config,
struct i2c_adapter* i2c);
#endif // NXT2002_H
/*
* Support for NXT2002 and NXT2004 - VSB/QAM
*
* Copyright (C) 2005 Kirk Lapray (kirk.lapray@gmail.com)
* Copyright (C) 2005 Kirk Lapray <kirk.lapray@gmail.com>
* Copyright (C) 2006 Michael Krufky <mkrufky@m1k.net>
* based on nxt2002 by Taylor Jacob <rtjacob@earthlink.net>
* and nxt2004 by Jean-Francois Thibert (jeanfrancois@sagetv.com)
* and nxt2004 by Jean-Francois Thibert <jeanfrancois@sagetv.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......@@ -614,7 +615,17 @@ static int nxt200x_setup_frontend_parameters (struct dvb_frontend* fe,
/* write sdm1 input */
buf[0] = 0x10;
buf[1] = 0x00;
nxt200x_writebytes(state, 0x58, buf, 2);
switch (state->demod_chip) {
case NXT2002:
nxt200x_writereg_multibyte(state, 0x58, buf, 2);
break;
case NXT2004:
nxt200x_writebytes(state, 0x58, buf, 2);
break;
default:
return -EINVAL;
break;
}
/* write sdmx input */
switch (p->u.vsb.modulation) {
......@@ -632,7 +643,17 @@ static int nxt200x_setup_frontend_parameters (struct dvb_frontend* fe,
break;
}
buf[1] = 0x00;
nxt200x_writebytes(state, 0x5C, buf, 2);
switch (state->demod_chip) {
case NXT2002:
nxt200x_writereg_multibyte(state, 0x5C, buf, 2);
break;
case NXT2004:
nxt200x_writebytes(state, 0x5C, buf, 2);
break;
default:
return -EINVAL;
break;
}
/* write adc power lpf fc */
buf[0] = 0x05;
......@@ -648,7 +669,17 @@ static int nxt200x_setup_frontend_parameters (struct dvb_frontend* fe,
/* write accumulator2 input */
buf[0] = 0x80;
buf[1] = 0x00;
nxt200x_writebytes(state, 0x4B, buf, 2);
switch (state->demod_chip) {
case NXT2002:
nxt200x_writereg_multibyte(state, 0x4B, buf, 2);
break;
case NXT2004:
nxt200x_writebytes(state, 0x4B, buf, 2);
break;
default:
return -EINVAL;
break;
}
/* write kg1 */
buf[0] = 0x00;
......@@ -714,8 +745,19 @@ static int nxt200x_setup_frontend_parameters (struct dvb_frontend* fe,
/* write accumulator2 input */
buf[0] = 0x80;
buf[1] = 0x00;
nxt200x_writebytes(state, 0x49, buf,2);
nxt200x_writebytes(state, 0x4B, buf,2);
switch (state->demod_chip) {
case NXT2002:
nxt200x_writereg_multibyte(state, 0x49, buf, 2);
nxt200x_writereg_multibyte(state, 0x4B, buf, 2);
break;
case NXT2004:
nxt200x_writebytes(state, 0x49, buf, 2);
nxt200x_writebytes(state, 0x4B, buf, 2);
break;
default:
return -EINVAL;
break;
}
/* write agc control reg */
buf[0] = 0x04;
......@@ -1199,7 +1241,7 @@ module_param(debug, int, 0644);
MODULE_PARM_DESC(debug, "Turn on/off frontend debugging (default:off).");
MODULE_DESCRIPTION("NXT200X (ATSC 8VSB & ITU-T J.83 AnnexB 64/256 QAM) Demodulator Driver");
MODULE_AUTHOR("Kirk Lapray, Jean-Francois Thibert, and Taylor Jacob");
MODULE_AUTHOR("Kirk Lapray, Michael Krufky, Jean-Francois Thibert, and Taylor Jacob");
MODULE_LICENSE("GPL");
EXPORT_SYMBOL(nxt200x_attach);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment