Commit 1d9c0c4d authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] dvb: Misc frontend updates

From: Michael Hunold <hunold@linuxtv.org>

- alps_tdlb7 + alps_tdmb7: Changed to use full i2c reads in probing instead
  of i2c pings to be compatable with ttusb

- nxt6000: bugfix by Robert Cook: FE_RESET did the same as FE_INIT, thus
  invalidating current channel settings on FE_RESET

- sp887x: fixed typo

- Makefile: add nxt6000 frontend driver to Makefiles

- Kconfig: DVB_TDA1004X and DVB_NXT6000 do not depend on !STANDALONE (i.e.
  no compile-time firmware image necessary)

- ves1820: turn off ves1820 test output pins

- ves1820: verbose-print AFC only if carrier has been recovered

- ves1820: change AFC handling as suggested by Robert Schlabbach, use bit 1
  of the SYNC register for FE_HAS_SIGNAL
parent d7812a54
......@@ -154,8 +154,8 @@ config DVB_VES1X93
right one will get autodetected.
config DVB_TDA1004X
tristate "Frontends with external TDA1004X demodulators (OFDM)"
depends on DVB_CORE && !STANDALONE
tristate "Frontends with external TDA10045H or TDA10046H demodulators (OFDM)"
depends on DVB_CORE
help
A DVB-T tuner module. Say Y when you want to support this frontend.
......@@ -173,3 +173,15 @@ config DVB_TDA1004X_FIRMWARE_FILE
wget http://www.technotrend.de/new/215/TTweb_215a_budget_20_05_2003.zip
unzip -j TTweb_215a_budget_20_05_2003.zip Software/Oem/PCI/App/ttlcdacc.dll
mv ttlcdacc.dll /usr/lib/hotplug/firmware/tda1004x.bin
Note: even if you're using a USB device, you MUST get the file from the
TechnoTrend PCI drivers.
config DVB_NXT6000
tristate "Frontends with NxtWave Communications NXT6000 demodulator (OFDM)"
depends on DVB_CORE
help
A DVB-T tuner module. Say Y when you want to support this frontend.
If you don't know what tuner module is soldered on your
DVB adapter simply enable all supported frontends, the
right one will get autodetected.
......@@ -17,3 +17,4 @@ obj-$(CONFIG_DVB_VES1820) += ves1820.o
obj-$(CONFIG_DVB_VES1X93) += ves1x93.o
obj-$(CONFIG_DVB_TDA1004X) += tda1004x.o
obj-$(CONFIG_DVB_SP887X) += sp887x.o
obj-$(CONFIG_DVB_NXT6000) += nxt6000.o
......@@ -665,11 +665,14 @@ static int tdlb7_ioctl (struct dvb_frontend *fe, unsigned int cmd, void *arg)
static int tdlb7_attach (struct dvb_i2c_bus *i2c, void **data)
{
struct i2c_msg msg = { addr: 0x71, flags: 0, buf: NULL, len: 0 };
u8 b0 [] = { 0x02 , 0x00 };
u8 b1 [] = { 0, 0 };
struct i2c_msg msg [] = { { addr: 0x71, flags: 0, buf: b0, len: 2 },
{ addr: 0x71, flags: I2C_M_RD, buf: b1, len: 2 } };
dprintk ("%s\n", __FUNCTION__);
if (i2c->xfer (i2c, &msg, 1) != 1)
if (i2c->xfer (i2c, msg, 2) != 2)
return -ENODEV;
sp8870_firmware_upload(i2c);
......
......@@ -404,11 +404,14 @@ static int tdmb7_ioctl (struct dvb_frontend *fe, unsigned int cmd, void *arg)
static int tdmb7_attach (struct dvb_i2c_bus *i2c, void **data)
{
struct i2c_msg msg = { .addr = 0x43, .flags = 0, .buf = NULL,. len = 0 };
u8 b0 [] = { 0x7 };
u8 b1 [] = { 0 };
struct i2c_msg msg [] = { { .addr = 0x43, .flags = 0, .buf = b0, .len = 1 },
{ .addr = 0x43, .flags = I2C_M_RD, .buf = b1, .len = 1 } };
dprintk ("%s\n", __FUNCTION__);
if (i2c->xfer (i2c, &msg, 1) != 1)
if (i2c->xfer (i2c, msg, 2) != 2)
return -ENODEV;
return dvb_register_frontend (tdmb7_ioctl, i2c, NULL, &tdmb7_info);
......
......@@ -758,11 +758,11 @@ static int nxt6000_ioctl(struct dvb_frontend *fe, unsigned int cmd, void *arg)
}
case FE_INIT:
case FE_RESET:
nxt6000_reset(fe);
nxt6000_setup(fe);
break;
case FE_RESET:
break;
case FE_SET_FRONTEND:
......
......@@ -58,7 +58,7 @@ static char *sp887x_firmware = DVB_SP887X_FIRMWARE_FILE;
static
struct dvb_frontend_info sp887x_info = {
.name = "Microtune MT7072DTF",
.name = "Microtune MT7202DTF",
.type = FE_OFDM,
.frequency_min = 50500000,
.frequency_max = 858000000,
......
......@@ -120,7 +120,7 @@ static struct dvb_frontend_info ves1820_info = {
static u8 ves1820_inittab [] =
{
0x69, 0x6A, 0x9B, 0x12, 0x12, 0x46, 0x26, 0x1A,
0x43, 0x6A, 0xAA, 0xAA, 0x1E, 0x85, 0x43, 0x28,
0x43, 0x6A, 0xAA, 0xAA, 0x1E, 0x85, 0x43, 0x20,
0xE0, 0x00, 0xA1, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
......@@ -380,7 +380,7 @@ static int ves1820_ioctl (struct dvb_frontend *fe, unsigned int cmd, void *arg)
sync = ves1820_readreg (fe, 0x11);
if (sync & 2)
if (sync & 1)
*status |= FE_HAS_SIGNAL;
if (sync & 2)
......@@ -440,13 +440,14 @@ static int ves1820_ioctl (struct dvb_frontend *fe, unsigned int cmd, void *arg)
s8 afc = 0;
sync = ves1820_readreg (fe, 0x11);
if (sync & 2)
/* AFC only valid when carrier has been recovered */
afc = ves1820_readreg(fe, 0x19);
if (verbose)
printk ("DVB: VES1820(%d): AFC (%d) %dHz\n",
if (verbose) {
/* AFC only valid when carrier has been recovered */
printk(sync & 2 ? "DVB: VES1820(%d): AFC (%d) %dHz\n" :
"DVB: VES1820(%d): [AFC (%d) %dHz]\n",
fe->i2c->adapter->num, afc,
-((s32)(p->u.qam.symbol_rate >> 3) * afc >> 7));
-((s32)p->u.qam.symbol_rate * afc) >> 10);
}
p->inversion = HAS_INVERSION(reg0) ? INVERSION_ON : INVERSION_OFF;
p->u.qam.modulation = ((reg0 >> 2) & 7) + QAM_16;
......@@ -454,9 +455,8 @@ static int ves1820_ioctl (struct dvb_frontend *fe, unsigned int cmd, void *arg)
p->u.qam.fec_inner = FEC_NONE;
p->frequency = ((p->frequency + 31250) / 62500) * 62500;
/* To prevent overflow, shift symbol rate first a
couple of bits. */
p->frequency -= (s32)(p->u.qam.symbol_rate >> 3) * afc >> 7;
if (sync & 2)
p->frequency -= ((s32)p->u.qam.symbol_rate * afc) >> 10;
break;
}
case FE_SLEEP:
......
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