aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@infradead.org>2007-11-22 10:08:53 -0500
committerMauro Carvalho Chehab <mchehab@infradead.org>2008-01-25 16:02:39 -0500
commit5add9a6f3c90680f89b4694e81025d2aed9559af (patch)
treea7661548230608cf9f6e49eaa4e314d25c6fd035 /drivers/media
parenta5e9fe149afb0fdf0de4729f1b0d203d4ac14906 (diff)
V4L/DVB (6659): Convert MTS to bitfield
Xc2028.3028 has two type of firmwares: audio-standard specific ones and baseband MTS firmwares. MTS firmwares provide stereo decoding for 6 MHz BTSC/EIAJ and for monoaural audio decoding on 8 MHz firmwares. It seems that the option to use MTS or a standard-specific audio decoding depends on the way xc2028/3028 is connected. Instead of wasting 32 (or 64 bits) to signalize if the driver needs to use MTS firmware, this patch converts it to a bitfield that can be shared with other proprieties of xc2028/3028. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/dvb/dvb-usb/cxusb.c1
-rw-r--r--drivers/media/video/em28xx/em28xx-cards.c4
-rw-r--r--drivers/media/video/em28xx/em28xx.h2
-rw-r--r--drivers/media/video/tuner-xc2028.c2
-rw-r--r--drivers/media/video/tuner-xc2028.h9
5 files changed, 6 insertions, 12 deletions
diff --git a/drivers/media/dvb/dvb-usb/cxusb.c b/drivers/media/dvb/dvb-usb/cxusb.c
index deeb3871a2a..c58365005ac 100644
--- a/drivers/media/dvb/dvb-usb/cxusb.c
+++ b/drivers/media/dvb/dvb-usb/cxusb.c
@@ -513,7 +513,6 @@ static int cxusb_dvico_xc3028_tuner_attach(struct dvb_usb_adapter *adap)
513 .callback = dvico_bluebird_xc2028_callback, 513 .callback = dvico_bluebird_xc2028_callback,
514 }; 514 };
515 static struct xc2028_ctrl ctl = { 515 static struct xc2028_ctrl ctl = {
516 .type = XC2028_FIRM_NORMAL,
517 .fname = "xc3028-dvico-au-01.fw", 516 .fname = "xc3028-dvico-au-01.fw",
518 .max_len = 64, 517 .max_len = 64,
519 .scode_table = ZARLINK456, 518 .scode_table = ZARLINK456,
diff --git a/drivers/media/video/em28xx/em28xx-cards.c b/drivers/media/video/em28xx/em28xx-cards.c
index c40b9d9b307..29e935f4109 100644
--- a/drivers/media/video/em28xx/em28xx-cards.c
+++ b/drivers/media/video/em28xx/em28xx-cards.c
@@ -154,7 +154,7 @@ struct em28xx_board em28xx_boards[] = {
154 .tda9887_conf = TDA9887_PRESENT, 154 .tda9887_conf = TDA9887_PRESENT,
155 .tuner_type = TUNER_XC2028, 155 .tuner_type = TUNER_XC2028,
156 .has_tuner = 1, 156 .has_tuner = 1,
157 .xc2028_type = XC2028_FIRM_MTS, 157 .mts_firmware = 1,
158 .decoder = EM28XX_TVP5150, 158 .decoder = EM28XX_TVP5150,
159 .input = {{ 159 .input = {{
160 .type = EM28XX_VMUX_TELEVISION, 160 .type = EM28XX_VMUX_TELEVISION,
@@ -476,7 +476,7 @@ static void em28xx_config_tuner (struct em28xx *dev)
476 476
477 ctl.fname = XC2028_DEFAULT_FIRMWARE; 477 ctl.fname = XC2028_DEFAULT_FIRMWARE;
478 ctl.max_len = 64; 478 ctl.max_len = 64;
479 ctl.type = em28xx_boards[dev->model].xc2028_type; 479 ctl.mts = em28xx_boards[dev->model].mts_firmware;
480 480
481 xc2028_cfg.tuner = TUNER_XC2028; 481 xc2028_cfg.tuner = TUNER_XC2028;
482 xc2028_cfg.priv = &ctl; 482 xc2028_cfg.priv = &ctl;
diff --git a/drivers/media/video/em28xx/em28xx.h b/drivers/media/video/em28xx/em28xx.h
index db82b51c85f..93007cc72f4 100644
--- a/drivers/media/video/em28xx/em28xx.h
+++ b/drivers/media/video/em28xx/em28xx.h
@@ -176,9 +176,9 @@ struct em28xx_board {
176 176
177 unsigned int has_tuner:1; 177 unsigned int has_tuner:1;
178 unsigned int has_msp34xx:1; 178 unsigned int has_msp34xx:1;
179 unsigned int mts_firmware:1;
179 180
180 enum em28xx_decoder decoder; 181 enum em28xx_decoder decoder;
181 int xc2028_type;
182 182
183 struct em28xx_input input[MAX_EM28XX_INPUT]; 183 struct em28xx_input input[MAX_EM28XX_INPUT];
184}; 184};
diff --git a/drivers/media/video/tuner-xc2028.c b/drivers/media/video/tuner-xc2028.c
index 8fa3ab76fd5..6a6642ea48c 100644
--- a/drivers/media/video/tuner-xc2028.c
+++ b/drivers/media/video/tuner-xc2028.c
@@ -631,7 +631,7 @@ static int check_firmware(struct dvb_frontend *fe, enum tuner_mode new_mode,
631 return rc; 631 return rc;
632 } 632 }
633 633
634 if (priv->ctrl.type == XC2028_FIRM_MTS) 634 if (priv->ctrl.mts)
635 type |= MTS; 635 type |= MTS;
636 if (bandwidth == BANDWIDTH_7_MHZ || bandwidth == BANDWIDTH_8_MHZ) 636 if (bandwidth == BANDWIDTH_7_MHZ || bandwidth == BANDWIDTH_8_MHZ)
637 type |= F8MHZ; 637 type |= F8MHZ;
diff --git a/drivers/media/video/tuner-xc2028.h b/drivers/media/video/tuner-xc2028.h
index 16259b14ce9..f24fb2a00f6 100644
--- a/drivers/media/video/tuner-xc2028.h
+++ b/drivers/media/video/tuner-xc2028.h
@@ -11,17 +11,12 @@
11 11
12#define XC2028_DEFAULT_FIRMWARE "xc3028-v27.fw" 12#define XC2028_DEFAULT_FIRMWARE "xc3028-v27.fw"
13 13
14enum xc2028_firm_type {
15 XC2028_FIRM_NORMAL,
16 XC2028_FIRM_MTS,
17};
18
19struct xc2028_ctrl { 14struct xc2028_ctrl {
20 enum xc2028_firm_type type;
21 char *fname; 15 char *fname;
22 int max_len; 16 int max_len;
23 int d2633:1;
24 unsigned int scode_table; 17 unsigned int scode_table;
18 unsigned int mts :1;
19 unsigned int d2633:1;
25}; 20};
26 21
27struct xc2028_config { 22struct xc2028_config {