aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/cx88/cx88-dvb.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@brturbo.com.br>2005-07-12 16:58:44 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2005-07-12 19:01:04 -0400
commit41ef7c1ed48cb273c7b7a9ffd48a262a22f84483 (patch)
treec3a2772ae4eb3ea34c5023921095b78d2acd352e /drivers/media/video/cx88/cx88-dvb.c
parentfa9846a8c5965636fbade8655ae0ce1f9a655bd4 (diff)
[PATCH] v4l: CX88 Update
- Removed unused structures. - Removed BTTV version check. - Some debug structs moved to their own .c file and converted to static - Comment changed to express better when attach_inform is running - set_freq removed from set_mode at tuner-core.c. - I2C cleanups and converged to a basic reference structure. - Rename tuner structures fields. - It calls VIDIOC_G_FREQUENCY to get tuner freq from tuner. - added missing contrast offset value, set to 0. - Let Kconfig decide whether to include frontend-specific code. Signed-Off-By: Nickolay V. Shmyrev <nshmyrev@yandex.ru> Signed-off-by: Michael Krufky <mkrufky@m1k.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/media/video/cx88/cx88-dvb.c')
-rw-r--r--drivers/media/video/cx88/cx88-dvb.c36
1 files changed, 19 insertions, 17 deletions
diff --git a/drivers/media/video/cx88/cx88-dvb.c b/drivers/media/video/cx88/cx88-dvb.c
index 690477a67917..5544e1d6a344 100644
--- a/drivers/media/video/cx88/cx88-dvb.c
+++ b/drivers/media/video/cx88/cx88-dvb.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * $Id: cx88-dvb.c,v 1.39 2005/07/02 20:00:46 mkrufky Exp $ 2 * $Id: cx88-dvb.c,v 1.41 2005/07/04 19:35:05 mkrufky Exp $
3 * 3 *
4 * device driver for Conexant 2388x based TV cards 4 * device driver for Conexant 2388x based TV cards
5 * MPEG Transport Stream (DVB) routines 5 * MPEG Transport Stream (DVB) routines
@@ -30,22 +30,20 @@
30#include <linux/file.h> 30#include <linux/file.h>
31#include <linux/suspend.h> 31#include <linux/suspend.h>
32 32
33/* these three frontends need merging via linuxtv cvs ... */
34#define HAVE_CX22702 1
35#define HAVE_OR51132 1
36#define HAVE_LGDT3302 1
37
38#include "cx88.h" 33#include "cx88.h"
39#include "dvb-pll.h" 34#include "dvb-pll.h"
40#include "mt352.h" 35
41#include "mt352_priv.h" 36#if CONFIG_DVB_MT352
42#if HAVE_CX22702 37# include "mt352.h"
38# include "mt352_priv.h"
39#endif
40#if CONFIG_DVB_CX22702
43# include "cx22702.h" 41# include "cx22702.h"
44#endif 42#endif
45#if HAVE_OR51132 43#if CONFIG_DVB_OR51132
46# include "or51132.h" 44# include "or51132.h"
47#endif 45#endif
48#if HAVE_LGDT3302 46#if CONFIG_DVB_LGDT3302
49# include "lgdt3302.h" 47# include "lgdt3302.h"
50#endif 48#endif
51 49
@@ -104,6 +102,7 @@ static struct videobuf_queue_ops dvb_qops = {
104 102
105/* ------------------------------------------------------------------ */ 103/* ------------------------------------------------------------------ */
106 104
105#if CONFIG_DVB_MT352
107static int dvico_fusionhdtv_demod_init(struct dvb_frontend* fe) 106static int dvico_fusionhdtv_demod_init(struct dvb_frontend* fe)
108{ 107{
109 static u8 clock_config [] = { CLOCK_CTL, 0x38, 0x39 }; 108 static u8 clock_config [] = { CLOCK_CTL, 0x38, 0x39 };
@@ -171,8 +170,9 @@ static struct mt352_config dntv_live_dvbt_config = {
171 .demod_init = dntv_live_dvbt_demod_init, 170 .demod_init = dntv_live_dvbt_demod_init,
172 .pll_set = mt352_pll_set, 171 .pll_set = mt352_pll_set,
173}; 172};
173#endif
174 174
175#if HAVE_CX22702 175#if CONFIG_DVB_CX22702
176static struct cx22702_config connexant_refboard_config = { 176static struct cx22702_config connexant_refboard_config = {
177 .demod_address = 0x43, 177 .demod_address = 0x43,
178 .pll_address = 0x60, 178 .pll_address = 0x60,
@@ -186,7 +186,7 @@ static struct cx22702_config hauppauge_novat_config = {
186}; 186};
187#endif 187#endif
188 188
189#if HAVE_OR51132 189#if CONFIG_DVB_OR51132
190static int or51132_set_ts_param(struct dvb_frontend* fe, 190static int or51132_set_ts_param(struct dvb_frontend* fe,
191 int is_punctured) 191 int is_punctured)
192{ 192{
@@ -203,7 +203,7 @@ static struct or51132_config pchdtv_hd3000 = {
203}; 203};
204#endif 204#endif
205 205
206#if HAVE_LGDT3302 206#if CONFIG_DVB_LGDT3302
207static int lgdt3302_set_ts_param(struct dvb_frontend* fe, int is_punctured) 207static int lgdt3302_set_ts_param(struct dvb_frontend* fe, int is_punctured)
208{ 208{
209 struct cx8802_dev *dev= fe->dvb->priv; 209 struct cx8802_dev *dev= fe->dvb->priv;
@@ -237,7 +237,7 @@ static int dvb_register(struct cx8802_dev *dev)
237 237
238 /* init frontend */ 238 /* init frontend */
239 switch (dev->core->board) { 239 switch (dev->core->board) {
240#if HAVE_CX22702 240#if CONFIG_DVB_CX22702
241 case CX88_BOARD_HAUPPAUGE_DVB_T1: 241 case CX88_BOARD_HAUPPAUGE_DVB_T1:
242 dev->dvb.frontend = cx22702_attach(&hauppauge_novat_config, 242 dev->dvb.frontend = cx22702_attach(&hauppauge_novat_config,
243 &dev->core->i2c_adap); 243 &dev->core->i2c_adap);
@@ -248,6 +248,7 @@ static int dvb_register(struct cx8802_dev *dev)
248 &dev->core->i2c_adap); 248 &dev->core->i2c_adap);
249 break; 249 break;
250#endif 250#endif
251#if CONFIG_DVB_MT352
251 case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T1: 252 case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T1:
252 dev->core->pll_addr = 0x61; 253 dev->core->pll_addr = 0x61;
253 dev->core->pll_desc = &dvb_pll_lg_z201; 254 dev->core->pll_desc = &dvb_pll_lg_z201;
@@ -268,13 +269,14 @@ static int dvb_register(struct cx8802_dev *dev)
268 dev->dvb.frontend = mt352_attach(&dntv_live_dvbt_config, 269 dev->dvb.frontend = mt352_attach(&dntv_live_dvbt_config,
269 &dev->core->i2c_adap); 270 &dev->core->i2c_adap);
270 break; 271 break;
271#if HAVE_OR51132 272#endif
273#if CONFIG_DVB_OR51132
272 case CX88_BOARD_PCHDTV_HD3000: 274 case CX88_BOARD_PCHDTV_HD3000:
273 dev->dvb.frontend = or51132_attach(&pchdtv_hd3000, 275 dev->dvb.frontend = or51132_attach(&pchdtv_hd3000,
274 &dev->core->i2c_adap); 276 &dev->core->i2c_adap);
275 break; 277 break;
276#endif 278#endif
277#if HAVE_LGDT3302 279#if CONFIG_DVB_LGDT3302
278 case CX88_BOARD_DVICO_FUSIONHDTV_3_GOLD_Q: 280 case CX88_BOARD_DVICO_FUSIONHDTV_3_GOLD_Q:
279 dev->ts_gen_cntrl = 0x08; 281 dev->ts_gen_cntrl = 0x08;
280 { 282 {