diff options
author | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-04-17 20:37:53 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-04-24 13:09:41 -0400 |
commit | 3ca9c09379e8f3be0744c47f72769457fa46e9f3 (patch) | |
tree | ab50d7301c0fbf6d1c250f45864e851954a37609 /drivers/media/video/em28xx/em28xx-cards.c | |
parent | 227ad4ab9058ef2624934183e8083886cf64bf56 (diff) |
V4L/DVB (7597): em28xx: share the same xc3028 setup for analog and digital modes
Thanks to Devin Heitmueller <devin.heitmueller@gmail.com> and Aidan
Thornton" <makosoft@googlemail.com> for pointing some errors with the
previous scenario.
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/em28xx/em28xx-cards.c')
-rw-r--r-- | drivers/media/video/em28xx/em28xx-cards.c | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/drivers/media/video/em28xx/em28xx-cards.c b/drivers/media/video/em28xx/em28xx-cards.c index 710f110b6e8a..f4883b4a6b7a 100644 --- a/drivers/media/video/em28xx/em28xx-cards.c +++ b/drivers/media/video/em28xx/em28xx-cards.c | |||
@@ -36,7 +36,6 @@ | |||
36 | #include <media/v4l2-common.h> | 36 | #include <media/v4l2-common.h> |
37 | 37 | ||
38 | #include "em28xx.h" | 38 | #include "em28xx.h" |
39 | #include "tuner-xc2028.h" | ||
40 | 39 | ||
41 | static int tuner = -1; | 40 | static int tuner = -1; |
42 | module_param(tuner, int, 0444); | 41 | module_param(tuner, int, 0444); |
@@ -553,10 +552,25 @@ void em28xx_pre_card_setup(struct em28xx *dev) | |||
553 | }; | 552 | }; |
554 | } | 553 | } |
555 | 554 | ||
555 | void em28xx_setup_xc3028(struct em28xx *dev, struct xc2028_ctrl *ctl) | ||
556 | { | ||
557 | memset(ctl, 0, sizeof(*ctl)); | ||
558 | |||
559 | ctl->fname = XC2028_DEFAULT_FIRMWARE; | ||
560 | ctl->max_len = 64; | ||
561 | ctl->mts = em28xx_boards[dev->model].mts_firmware; | ||
562 | |||
563 | switch (dev->model) { | ||
564 | /* Add card-specific parameters for xc3028 here */ | ||
565 | default: | ||
566 | ctl->demod = XC3028_FE_OREN538; | ||
567 | } | ||
568 | } | ||
569 | EXPORT_SYMBOL_GPL(em28xx_setup_xc3028); | ||
570 | |||
556 | static void em28xx_config_tuner(struct em28xx *dev) | 571 | static void em28xx_config_tuner(struct em28xx *dev) |
557 | { | 572 | { |
558 | struct v4l2_priv_tun_config xc2028_cfg; | 573 | struct v4l2_priv_tun_config xc2028_cfg; |
559 | struct xc2028_ctrl ctl; | ||
560 | struct tuner_setup tun_setup; | 574 | struct tuner_setup tun_setup; |
561 | struct v4l2_frequency f; | 575 | struct v4l2_frequency f; |
562 | 576 | ||
@@ -571,11 +585,9 @@ static void em28xx_config_tuner(struct em28xx *dev) | |||
571 | em28xx_i2c_call_clients(dev, TUNER_SET_TYPE_ADDR, &tun_setup); | 585 | em28xx_i2c_call_clients(dev, TUNER_SET_TYPE_ADDR, &tun_setup); |
572 | 586 | ||
573 | if (dev->tuner_type == TUNER_XC2028) { | 587 | if (dev->tuner_type == TUNER_XC2028) { |
574 | memset(&ctl, 0, sizeof(ctl)); | 588 | struct xc2028_ctrl ctl; |
575 | 589 | ||
576 | ctl.fname = XC2028_DEFAULT_FIRMWARE; | 590 | em28xx_setup_xc3028(dev, &ctl); |
577 | ctl.max_len = 64; | ||
578 | ctl.mts = em28xx_boards[dev->model].mts_firmware; | ||
579 | 591 | ||
580 | xc2028_cfg.tuner = TUNER_XC2028; | 592 | xc2028_cfg.tuner = TUNER_XC2028; |
581 | xc2028_cfg.priv = &ctl; | 593 | xc2028_cfg.priv = &ctl; |