Commit 825d51ef authored by Patrick Boettcher's avatar Patrick Boettcher Committed by Mauro Carvalho Chehab

V4L/DVB: MT2060: Code cleanups, adding to new build-mechanism

Some minor code cleanups and added the MT2060 to new v4l-dvb-build-system, preliminarily under dvb/frontends.
Signed-off-by: default avatarPatrick Boettcher <pb@linuxtv.org>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@infradead.org>
parent a841e1f6
...@@ -26,6 +26,7 @@ config DVB_USB_A800 ...@@ -26,6 +26,7 @@ config DVB_USB_A800
tristate "AVerMedia AverTV DVB-T USB 2.0 (A800)" tristate "AVerMedia AverTV DVB-T USB 2.0 (A800)"
depends on DVB_USB depends on DVB_USB
select DVB_DIB3000MC select DVB_DIB3000MC
select DVB_TUNER_MT2060
help help
Say Y here to support the AVerMedia AverTV DVB-T USB 2.0 (A800) receiver. Say Y here to support the AVerMedia AverTV DVB-T USB 2.0 (A800) receiver.
...@@ -33,6 +34,7 @@ config DVB_USB_DIBUSB_MB ...@@ -33,6 +34,7 @@ config DVB_USB_DIBUSB_MB
tristate "DiBcom USB DVB-T devices (based on the DiB3000M-B) (see help for device list)" tristate "DiBcom USB DVB-T devices (based on the DiB3000M-B) (see help for device list)"
depends on DVB_USB depends on DVB_USB
select DVB_DIB3000MB select DVB_DIB3000MB
select DVB_TUNER_MT2060
help help
Support for USB 1.1 and 2.0 DVB-T receivers based on reference designs made by Support for USB 1.1 and 2.0 DVB-T receivers based on reference designs made by
DiBcom (<http://www.dibcom.fr>) equipped with a DiB3000M-B demodulator. DiBcom (<http://www.dibcom.fr>) equipped with a DiB3000M-B demodulator.
...@@ -65,6 +67,7 @@ config DVB_USB_DIBUSB_MC ...@@ -65,6 +67,7 @@ config DVB_USB_DIBUSB_MC
tristate "DiBcom USB DVB-T devices (based on the DiB3000M-C/P) (see help for device list)" tristate "DiBcom USB DVB-T devices (based on the DiB3000M-C/P) (see help for device list)"
depends on DVB_USB depends on DVB_USB
select DVB_DIB3000MC select DVB_DIB3000MC
select DVB_TUNER_MT2060
help help
Support for 2.0 DVB-T receivers based on reference designs made by Support for 2.0 DVB-T receivers based on reference designs made by
DiBcom (<http://www.dibcom.fr>) equipped with a DiB3000M-C/P demodulator. DiBcom (<http://www.dibcom.fr>) equipped with a DiB3000M-C/P demodulator.
...@@ -80,6 +83,7 @@ config DVB_USB_UMT_010 ...@@ -80,6 +83,7 @@ config DVB_USB_UMT_010
tristate "HanfTek UMT-010 DVB-T USB2.0 support" tristate "HanfTek UMT-010 DVB-T USB2.0 support"
depends on DVB_USB depends on DVB_USB
select DVB_DIB3000MC select DVB_DIB3000MC
select DVB_TUNER_MT2060
help help
Say Y here to support the HanfTek UMT-010 USB2.0 stick-sized DVB-T receiver. Say Y here to support the HanfTek UMT-010 USB2.0 stick-sized DVB-T receiver.
...@@ -145,6 +149,7 @@ config DVB_USB_NOVA_T_USB2 ...@@ -145,6 +149,7 @@ config DVB_USB_NOVA_T_USB2
tristate "Hauppauge WinTV-NOVA-T usb2 DVB-T USB2.0 support" tristate "Hauppauge WinTV-NOVA-T usb2 DVB-T USB2.0 support"
depends on DVB_USB depends on DVB_USB
select DVB_DIB3000MC select DVB_DIB3000MC
select DVB_TUNER_MT2060
help help
Say Y here to support the Hauppauge WinTV-NOVA-T usb2 DVB-T USB2.0 receiver. Say Y here to support the Hauppauge WinTV-NOVA-T usb2 DVB-T USB2.0 receiver.
......
...@@ -235,7 +235,7 @@ int dibusb_dib3000mc_tuner_attach (struct dvb_usb_device *d) ...@@ -235,7 +235,7 @@ int dibusb_dib3000mc_tuner_attach (struct dvb_usb_device *d)
{ {
int ret; int ret;
u8 a,b; u8 a,b;
u16 if1=1220; u16 if1 = 1220;
if (d->tuner_pass_ctrl) { if (d->tuner_pass_ctrl) {
struct dibusb_state *st = d->priv; struct dibusb_state *st = d->priv;
...@@ -243,17 +243,17 @@ int dibusb_dib3000mc_tuner_attach (struct dvb_usb_device *d) ...@@ -243,17 +243,17 @@ int dibusb_dib3000mc_tuner_attach (struct dvb_usb_device *d)
// First IF calibration for Liteon Sticks // First IF calibration for Liteon Sticks
if (d->udev->descriptor.idVendor == USB_VID_LITEON && if (d->udev->descriptor.idVendor == USB_VID_LITEON &&
d->udev->descriptor.idProduct == USB_PID_LITEON_DVB_T_WARM) { d->udev->descriptor.idProduct == USB_PID_LITEON_DVB_T_WARM) {
dibusb_read_eeprom_byte(d,0x7E,&a); dibusb_read_eeprom_byte(d,0x7E,&a);
dibusb_read_eeprom_byte(d,0x7F,&b); dibusb_read_eeprom_byte(d,0x7F,&b);
if (a == 0xFF && b == 0xFF) {
if (a == 0xFF && b == 0xFF)
if1 = 1220; if1 = 1220;
} else else if (a == 0x00)
if (a == 0x00) {
if1 = 1220+b; if1 = 1220+b;
} else else if (a == 0x80)
if (a == 0x80) {
if1 = 1220-b; if1 = 1220-b;
} else { else {
warn("LITE-ON DVB-T Tuner : Strange IF1 calibration :%2X %2X\n",(int)a,(int)b); warn("LITE-ON DVB-T Tuner : Strange IF1 calibration :%2X %2X\n",(int)a,(int)b);
if1 = 1220; if1 = 1220;
} }
......
...@@ -274,6 +274,11 @@ config DVB_TDA826X ...@@ -274,6 +274,11 @@ config DVB_TDA826X
help help
A DVB-S silicon tuner module. Say Y when you want to support this tuner. A DVB-S silicon tuner module. Say Y when you want to support this tuner.
config DVB_TUNER_MT2060
tristate "Microtune MT2060 silicon IF tuner"
help
A driver for the silicon IF tuner MT2060 from Microtune.
comment "Miscellaneous devices" comment "Miscellaneous devices"
depends on DVB_CORE depends on DVB_CORE
......
...@@ -31,7 +31,6 @@ obj-$(CONFIG_DVB_BCM3510) += bcm3510.o ...@@ -31,7 +31,6 @@ obj-$(CONFIG_DVB_BCM3510) += bcm3510.o
obj-$(CONFIG_DVB_S5H1420) += s5h1420.o obj-$(CONFIG_DVB_S5H1420) += s5h1420.o
obj-$(CONFIG_DVB_LGDT330X) += lgdt330x.o obj-$(CONFIG_DVB_LGDT330X) += lgdt330x.o
obj-$(CONFIG_DVB_CX24123) += cx24123.o obj-$(CONFIG_DVB_CX24123) += cx24123.o
obj-$(CONFIG_DVB_LNBP21) += lnbp21.o
obj-$(CONFIG_DVB_ISL6421) += isl6421.o
obj-$(CONFIG_DVB_TDA10086) += tda10086.o obj-$(CONFIG_DVB_TDA10086) += tda10086.o
obj-$(CONFIG_DVB_TDA826X) += tda826x.o obj-$(CONFIG_DVB_TDA826X) += tda826x.o
obj-$(CONFIG_DVB_TUNER_MT2060) += mt2060.o
...@@ -278,7 +278,7 @@ static void mt2060_calibrate(struct mt2060_state *state) ...@@ -278,7 +278,7 @@ static void mt2060_calibrate(struct mt2060_state *state)
if (i < 10) { if (i < 10) {
mt2060_readreg(state, REG_FM_FREQ, &state->fmfreq); // now find out, what is fmreq used for :) mt2060_readreg(state, REG_FM_FREQ, &state->fmfreq); // now find out, what is fmreq used for :)
dprintk("calibration was successful: %d",state->fmfreq); dprintk("calibration was successful: %d", state->fmfreq);
} else } else
dprintk("FMCAL timed out"); dprintk("FMCAL timed out");
} }
......
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