192 lines
6.6 KiB
Diff
192 lines
6.6 KiB
Diff
From 4cd0ecb27fcee453c4b435d6bb5fd4e5994f5d2a Mon Sep 17 00:00:00 2001
|
|
From: Manu Abraham <abraham.manu@gmail.com>
|
|
Date: Fri, 4 Dec 2009 04:42:22 -0300
|
|
Subject: [PATCH 025/120] V4L/DVB (13723): [Mantis/VP-2040, Terratec Cinergy C] Add support for the Cinergy C, VP-2040 clone
|
|
MIME-Version: 1.0
|
|
Content-Type: text/plain; charset=UTF-8
|
|
Content-Transfer-Encoding: 8bit
|
|
|
|
Signed-off-by: Manu Abraham <manu@linuxtv.org>
|
|
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
|
|
(cherry picked from commit b2eb1312faa26703e71b7b3945c8773213e9ee49)
|
|
|
|
Signed-off-by: Bjørn Mork <bjorn@mork.no>
|
|
---
|
|
drivers/media/dvb/mantis/Makefile | 13 ++++++++--
|
|
drivers/media/dvb/mantis/mantis_core.c | 4 +++
|
|
drivers/media/dvb/mantis/mantis_dvb.c | 16 ++++++++++++-
|
|
drivers/media/dvb/mantis/mantis_vp2040.c | 36 ++++++++++++++++++++++++++++++
|
|
drivers/media/dvb/mantis/mantis_vp2040.h | 33 +++++++++++++++++++++++++++
|
|
5 files changed, 98 insertions(+), 4 deletions(-)
|
|
create mode 100644 drivers/media/dvb/mantis/mantis_vp2040.c
|
|
create mode 100644 drivers/media/dvb/mantis/mantis_vp2040.h
|
|
|
|
diff --git a/drivers/media/dvb/mantis/Makefile b/drivers/media/dvb/mantis/Makefile
|
|
index a980ff2..2be21bf 100644
|
|
--- a/drivers/media/dvb/mantis/Makefile
|
|
+++ b/drivers/media/dvb/mantis/Makefile
|
|
@@ -1,6 +1,13 @@
|
|
-mantis-objs = mantis_core.o mantis_dma.o mantis_pci.o mantis_i2c.o \
|
|
- mantis_dvb.o mantis_vp1033.o mantis_vp1034.o mantis_vp2033.o \
|
|
- mantis_vp3030.o
|
|
+mantis-objs = mantis_core.o \
|
|
+ mantis_dma.o \
|
|
+ mantis_pci.o \
|
|
+ mantis_i2c.o \
|
|
+ mantis_dvb.o \
|
|
+ mantis_vp1033.o \
|
|
+ mantis_vp1034.o \
|
|
+ mantis_vp2033.o \
|
|
+ mantis_vp2040.o \
|
|
+ mantis_vp3030.o
|
|
|
|
obj-$(CONFIG_DVB_MANTIS) += mantis.o
|
|
|
|
diff --git a/drivers/media/dvb/mantis/mantis_core.c b/drivers/media/dvb/mantis/mantis_core.c
|
|
index 16d693e..96b9392 100644
|
|
--- a/drivers/media/dvb/mantis/mantis_core.c
|
|
+++ b/drivers/media/dvb/mantis/mantis_core.c
|
|
@@ -23,6 +23,7 @@
|
|
#include "mantis_vp1033.h"
|
|
#include "mantis_vp1034.h"
|
|
#include "mantis_vp2033.h"
|
|
+#include "mantis_vp2040.h"
|
|
#include "mantis_vp3030.h"
|
|
|
|
static int read_eeprom_byte(struct mantis_pci *mantis, u8 *data, u8 length)
|
|
@@ -113,6 +114,9 @@ static void mantis_load_config(struct mantis_pci *mantis)
|
|
case MANTIS_VP_2033_DVB_C: // VP-2033
|
|
mantis->hwconfig = &vp2033_mantis_config;
|
|
break;
|
|
+ case TERRATEC_CINERGY_C_PCI: // VP-2040 clone
|
|
+ mantis->hwconfig = &vp2040_mantis_config;
|
|
+ break;
|
|
case MANTIS_VP_3030_DVB_T: // VP-3030
|
|
mantis->hwconfig = &vp3030_mantis_config;
|
|
break;
|
|
diff --git a/drivers/media/dvb/mantis/mantis_dvb.c b/drivers/media/dvb/mantis/mantis_dvb.c
|
|
index f255695..15012ea 100644
|
|
--- a/drivers/media/dvb/mantis/mantis_dvb.c
|
|
+++ b/drivers/media/dvb/mantis/mantis_dvb.c
|
|
@@ -28,6 +28,7 @@
|
|
#include "mantis_vp1033.h"
|
|
#include "mantis_vp1034.h"
|
|
#include "mantis_vp2033.h"
|
|
+#include "mantis_vp2040.h"
|
|
#include "mantis_vp3030.h"
|
|
|
|
/* Tuner power supply control */
|
|
@@ -243,7 +244,7 @@ int __devinit mantis_frontend_init(struct mantis_pci *mantis)
|
|
if (mantis->fe) {
|
|
mantis->fe->ops.tuner_ops.set_params = philips_cu1216_tuner_set;
|
|
dprintk(verbose, MANTIS_ERROR, 1,
|
|
- "found Philips CU1216 DVB-C frontend @ 0x%02x",
|
|
+ "found Philips CU1216 DVB-C frontend (TDA10021) @ 0x%02x",
|
|
philips_cu1216_config.demod_address);
|
|
|
|
dprintk(verbose, MANTIS_ERROR, 1,
|
|
@@ -251,6 +252,19 @@ int __devinit mantis_frontend_init(struct mantis_pci *mantis)
|
|
|
|
}
|
|
break;
|
|
+ case TERRATEC_CINERGY_C_PCI:
|
|
+ dprintk(verbose, MANTIS_ERROR, 1, "Probing for CU1216 (DVB-C)");
|
|
+ mantis->fe = tda10023_attach(&tda10023_cu1216_config, &mantis->adapter, read_pwm(mantis));
|
|
+ if (mantis->fe) {
|
|
+ mantis->fe->ops.tuner_ops.set_params = philips_cu1216_tuner_set;
|
|
+ dprintk(verbose, MANTIS_ERROR, 1,
|
|
+ "found Philips CU1216 DVB-C frontend (TDA10023) @ 0x%02x",
|
|
+ philips_cu1216_config.demod_address);
|
|
+
|
|
+ dprintk(verbose, MANTIS_ERROR, 1,
|
|
+ "Mantis DVB-C Philips CU1216 frontend attach success");
|
|
+ }
|
|
+ break;
|
|
default:
|
|
dprintk(verbose, MANTIS_DEBUG, 1, "Unknown frontend:[0x%02x]",
|
|
mantis->sub_device_id);
|
|
diff --git a/drivers/media/dvb/mantis/mantis_vp2040.c b/drivers/media/dvb/mantis/mantis_vp2040.c
|
|
new file mode 100644
|
|
index 0000000..07da738
|
|
--- /dev/null
|
|
+++ b/drivers/media/dvb/mantis/mantis_vp2040.c
|
|
@@ -0,0 +1,36 @@
|
|
+/*
|
|
+ Mantis VP-2040 driver
|
|
+
|
|
+ Copyright (C) Manu Abraham (abraham.manu@gmail.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
|
|
+ the Free Software Foundation; either version 2 of the License, or
|
|
+ (at your option) any later version.
|
|
+
|
|
+ This program is distributed in the hope that it will be useful,
|
|
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
+ GNU General Public License for more details.
|
|
+
|
|
+ You should have received a copy of the GNU General Public License
|
|
+ along with this program; if not, write to the Free Software
|
|
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
+*/
|
|
+
|
|
+#include "mantis_common.h"
|
|
+#include "mantis_vp2040.h"
|
|
+
|
|
+#define MANTIS_MODEL_NAME "VP-2040"
|
|
+#define MANTIS_DEV_TYPE "DVB-C"
|
|
+
|
|
+struct mantis_hwconfig vp2040_mantis_config = {
|
|
+ .model_name = MANTIS_MODEL_NAME,
|
|
+ .dev_type = MANTIS_DEV_TYPE,
|
|
+ .ts_size = MANTIS_TS_204,
|
|
+};
|
|
+
|
|
+struct tda1002x_config tda10023_cu1216_config = {
|
|
+ .demod_address = 0x18 >> 1,
|
|
+ .invert = 1,
|
|
+};
|
|
diff --git a/drivers/media/dvb/mantis/mantis_vp2040.h b/drivers/media/dvb/mantis/mantis_vp2040.h
|
|
new file mode 100644
|
|
index 0000000..825ccbb
|
|
--- /dev/null
|
|
+++ b/drivers/media/dvb/mantis/mantis_vp2040.h
|
|
@@ -0,0 +1,33 @@
|
|
+/*
|
|
+ Mantis VP-2040 driver
|
|
+
|
|
+ Copyright (C) Manu Abraham (abraham.manu@gmail.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
|
|
+ the Free Software Foundation; either version 2 of the License, or
|
|
+ (at your option) any later version.
|
|
+
|
|
+ This program is distributed in the hope that it will be useful,
|
|
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
+ GNU General Public License for more details.
|
|
+
|
|
+ You should have received a copy of the GNU General Public License
|
|
+ along with this program; if not, write to the Free Software
|
|
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
+*/
|
|
+
|
|
+#ifndef __MANTIS_VP2040_H
|
|
+#define __MANTIS_VP2040_H
|
|
+
|
|
+#include "dvb_frontend.h"
|
|
+#include "mantis_common.h"
|
|
+#include "tda1002x.h"
|
|
+
|
|
+#define TERRATEC_CINERGY_C_PCI 0x1178
|
|
+
|
|
+extern struct tda1002x_config tda10023_cu1216_config;
|
|
+extern struct mantis_hwconfig vp2040_mantis_config;
|
|
+
|
|
+#endif //__MANTIS_VP2040_H
|
|
--
|
|
1.7.1
|
|
|