Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 92675
b: refs/heads/master
c: 3ca9c09
h: refs/heads/master
i:
  92673: 29f3da5
  92671: 9942408
v: v3
  • Loading branch information
Mauro Carvalho Chehab committed Apr 24, 2008
1 parent c771bb2 commit 90c8bb4
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 15 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 227ad4ab9058ef2624934183e8083886cf64bf56
refs/heads/master: 3ca9c09379e8f3be0744c47f72769457fa46e9f3
24 changes: 18 additions & 6 deletions trunk/drivers/media/video/em28xx/em28xx-cards.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
#include <media/v4l2-common.h>

#include "em28xx.h"
#include "tuner-xc2028.h"

static int tuner = -1;
module_param(tuner, int, 0444);
Expand Down Expand Up @@ -553,10 +552,25 @@ void em28xx_pre_card_setup(struct em28xx *dev)
};
}

void em28xx_setup_xc3028(struct em28xx *dev, struct xc2028_ctrl *ctl)
{
memset(ctl, 0, sizeof(*ctl));

ctl->fname = XC2028_DEFAULT_FIRMWARE;
ctl->max_len = 64;
ctl->mts = em28xx_boards[dev->model].mts_firmware;

switch (dev->model) {
/* Add card-specific parameters for xc3028 here */
default:
ctl->demod = XC3028_FE_OREN538;
}
}
EXPORT_SYMBOL_GPL(em28xx_setup_xc3028);

static void em28xx_config_tuner(struct em28xx *dev)
{
struct v4l2_priv_tun_config xc2028_cfg;
struct xc2028_ctrl ctl;
struct tuner_setup tun_setup;
struct v4l2_frequency f;

Expand All @@ -571,11 +585,9 @@ static void em28xx_config_tuner(struct em28xx *dev)
em28xx_i2c_call_clients(dev, TUNER_SET_TYPE_ADDR, &tun_setup);

if (dev->tuner_type == TUNER_XC2028) {
memset(&ctl, 0, sizeof(ctl));
struct xc2028_ctrl ctl;

ctl.fname = XC2028_DEFAULT_FIRMWARE;
ctl.max_len = 64;
ctl.mts = em28xx_boards[dev->model].mts_firmware;
em28xx_setup_xc3028(dev, &ctl);

xc2028_cfg.tuner = TUNER_XC2028;
xc2028_cfg.priv = &ctl;
Expand Down
17 changes: 9 additions & 8 deletions trunk/drivers/media/video/em28xx/em28xx-dvb.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@
#include <media/videobuf-vmalloc.h>

#include "lgdt330x.h"
#include "tuner-xc2028.h"
#include "tuner-xc2028-types.h"

MODULE_DESCRIPTION("driver for em28xx based DVB cards");
MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@infradead.org>");
Expand Down Expand Up @@ -69,12 +67,15 @@ static int attach_xc3028(u8 addr, struct em28xx *dev)
{
struct dvb_frontend *fe;
struct xc2028_ctrl ctl;
struct xc2028_config cfg = {
.i2c_adap = &dev->i2c_adap,
.i2c_addr = addr,
.ctrl = &ctl,
.callback = em28xx_tuner_callback,
};
struct xc2028_config cfg;

memset (&cfg, 0, sizeof(cfg));
cfg.i2c_adap = &dev->i2c_adap;
cfg.i2c_addr = addr;
cfg.ctrl = &ctl;
cfg.callback = em28xx_tuner_callback;

em28xx_setup_xc3028(dev, &ctl);

if (!dev->dvb.frontend) {
printk(KERN_ERR "%s/2: dvb frontend not attached. "
Expand Down
2 changes: 2 additions & 0 deletions trunk/drivers/media/video/em28xx/em28xx.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
#if defined(CONFIG_VIDEO_EM28XX_DVB) || defined(CONFIG_VIDEO_EM28XX_DVB_MODULE)
#include <media/videobuf-dvb.h>
#endif
#include "tuner-xc2028.h"

/* Boards supported by driver */
#define EM2800_BOARD_UNKNOWN 0
Expand Down Expand Up @@ -462,6 +463,7 @@ extern struct usb_device_id em28xx_id_table[];
extern const unsigned int em28xx_bcount;
void em28xx_set_ir(struct em28xx *dev, struct IR_i2c *ir);
int em28xx_tuner_callback(void *ptr, int command, int arg);
void em28xx_setup_xc3028(struct em28xx *dev, struct xc2028_ctrl *ctl);

/* Provided by em28xx-input.c */
/* TODO: Check if the standard get_key handlers on ir-common can be used */
Expand Down

0 comments on commit 90c8bb4

Please sign in to comment.