Skip to content

Commit

Permalink
Merge master.kernel.org:/pub/scm/linux/kernel/git/mchehab/v4l-dvb
Browse files Browse the repository at this point in the history
* master.kernel.org:/pub/scm/linux/kernel/git/mchehab/v4l-dvb:
  V4L/DVB (4290): Add support for the TCL M2523_3DB_E tuner.
  V4L/DVB (4289): Missing statement in drivers/media/dvb/frontends/cx22700.c
  V4L/DVB (4288): Clean out a zillion sparse warnings in pvrusb2
  V4L/DVB (4287): Pvrusb2/: possible cleanups
  V4L/DVB (4285): Cx88: add support for Geniatech Digistar / Digiwave 103g
  V4L/DVB (4284): Cx24123: fix set_voltage function according to the specs
  V4L/DVB (4282): Fix: use swzigzag for swalgo
  V4L/DVB (4281): TDA9887_SET_CONFIG should only be handled by the tda9887.
  V4L/DVB (4277): Fix CI interface on PRO KNC1 cards
  V4L/DVB (4276): Fix CI on old KNC1 DVBC cards
  V4L/DVB (4275): The FE_SET_FRONTEND_TUNE_MODE ioctl always returns EOPNOTSUPP
  V4L/DVB (4274): Eliminate use of tda9887 from pvrusb2 driver
  V4L/DVB (4273): Always log pvrusb2 device register / unregister events
  V4L/DVB (4272): Fix tveeprom supported standards
  V4L/DVB (4270): Add tda9887-specific tuner configuration
  V4L/DVB (4269): Subject: videocodec: make 1-bit fields unsigned
  V4L/DVB (4267): Remove all instances of request_module("tda9887")
  V4L/DVB (4264): Cx88-blackbird: implement VIDIOC_QUERYCTRL and VIDIOC_QUERYMENU
  • Loading branch information
Linus Torvalds committed Jun 30, 2006
2 parents 3e8d6ad + 00819f8 commit 1cfef5e
Show file tree
Hide file tree
Showing 49 changed files with 524 additions and 548 deletions.
1 change: 1 addition & 0 deletions Documentation/video4linux/CARDLIST.cx88
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,4 @@
49 -> PixelView PlayTV P7000 [1554:4813]
50 -> NPG Tech Real TV FM Top 10 [14f1:0842]
51 -> WinFast DTV2000 H [107d:665e]
52 -> Geniatech DVB-S [14f1:0084]
4 changes: 3 additions & 1 deletion drivers/media/dvb/dvb-core/dvb_frontend.c
Original file line number Diff line number Diff line change
Expand Up @@ -570,7 +570,8 @@ static int dvb_frontend_thread(void *data)
dvb_frontend_add_event(fe, s);
fepriv->status = s;
}
}
} else
dvb_frontend_swzigzag(fe);
} else
dvb_frontend_swzigzag(fe);
}
Expand Down Expand Up @@ -975,6 +976,7 @@ static int dvb_frontend_ioctl(struct inode *inode, struct file *file,

case FE_SET_FRONTEND_TUNE_MODE:
fepriv->tune_mode_flags = (unsigned long) parg;
err = 0;
break;
};

Expand Down
1 change: 1 addition & 0 deletions drivers/media/dvb/frontends/cx22700.c
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ static int cx22700_set_tps (struct cx22700_state *state, struct dvb_ofdm_paramet
return -EINVAL;

if (p->code_rate_LP < FEC_1_2 || p->code_rate_LP > FEC_7_8)
return -EINVAL;

if (p->code_rate_HP == FEC_4_5 || p->code_rate_LP == FEC_4_5)
return -EINVAL;
Expand Down
4 changes: 2 additions & 2 deletions drivers/media/dvb/frontends/cx24123.c
Original file line number Diff line number Diff line change
Expand Up @@ -670,10 +670,10 @@ static int cx24123_set_voltage(struct dvb_frontend* fe, fe_sec_voltage_t voltage
switch (voltage) {
case SEC_VOLTAGE_13:
dprintk("%s: setting voltage 13V\n", __FUNCTION__);
return cx24123_writereg(state, 0x29, val | 0x80);
return cx24123_writereg(state, 0x29, val & 0x7f);
case SEC_VOLTAGE_18:
dprintk("%s: setting voltage 18V\n", __FUNCTION__);
return cx24123_writereg(state, 0x29, val & 0x7f);
return cx24123_writereg(state, 0x29, val | 0x80);
default:
return -EINVAL;
};
Expand Down
15 changes: 10 additions & 5 deletions drivers/media/dvb/ttpci/budget-av.c
Original file line number Diff line number Diff line change
Expand Up @@ -1141,6 +1141,15 @@ static void frontend_init(struct budget_av *budget_av)
break;

case SUBID_DVBC_KNC1:
budget_av->reinitialise_demod = 1;
fe = tda10021_attach(&philips_cu1216_config,
&budget_av->budget.i2c_adap,
read_pwm(budget_av));
if (fe) {
fe->ops.tuner_ops.set_params = philips_cu1216_tuner_set_params;
}
break;

case SUBID_DVBC_KNC1_PLUS:
case SUBID_DVBC_CINERGY1200:
budget_av->reinitialise_demod = 1;
Expand Down Expand Up @@ -1293,11 +1302,7 @@ static int budget_av_attach(struct saa7146_dev *dev, struct saa7146_pci_extensio

budget_av->budget.dvb_adapter.priv = budget_av;
frontend_init(budget_av);

if (!budget_av->has_saa7113) {
ciintf_init(budget_av);
}

ciintf_init(budget_av);
return 0;
}

Expand Down
5 changes: 0 additions & 5 deletions drivers/media/video/bt8xx/bttv-cards.c
Original file line number Diff line number Diff line change
Expand Up @@ -3548,11 +3548,6 @@ void __devinit bttv_init_card2(struct bttv *btv)
/* Hybrid DVB card, DOES have a tda9887 */
if (btv->c.type == BTTV_BOARD_DVICO_FUSIONHDTV_5_LITE)
tda9887 = 1;
if((btv->tuner_type == TUNER_PHILIPS_FM1216ME_MK3) ||
(btv->tuner_type == TUNER_PHILIPS_FM1236_MK3) ||
(btv->tuner_type == TUNER_PHILIPS_FM1256_IH3) ||
tda9887)
request_module("tda9887");
if (btv->tuner_type != UNSET)
request_module("tuner");
}
Expand Down
43 changes: 43 additions & 0 deletions drivers/media/video/cx88/cx88-blackbird.c
Original file line number Diff line number Diff line change
Expand Up @@ -686,6 +686,39 @@ static struct videobuf_queue_ops blackbird_qops = {

/* ------------------------------------------------------------------ */

static const u32 *ctrl_classes[] = {
cx88_user_ctrls,
cx2341x_mpeg_ctrls,
NULL
};

static int blackbird_queryctrl(struct cx8802_dev *dev, struct v4l2_queryctrl *qctrl)
{
qctrl->id = v4l2_ctrl_next(ctrl_classes, qctrl->id);
if (qctrl->id == 0)
return -EINVAL;

/* Standard V4L2 controls */
if (cx8800_ctrl_query(qctrl) == 0)
return 0;

/* MPEG V4L2 controls */
if (cx2341x_ctrl_query(&dev->params, qctrl))
qctrl->flags |= V4L2_CTRL_FLAG_DISABLED;
return 0;
}

static int blackbird_querymenu(struct cx8802_dev *dev, struct v4l2_querymenu *qmenu)
{
struct v4l2_queryctrl qctrl;

qctrl.id = qmenu->id;
blackbird_queryctrl(dev, &qctrl);
return v4l2_ctrl_query_menu(qmenu, &qctrl, cx2341x_ctrl_get_menu(qmenu->id));
}

/* ------------------------------------------------------------------ */

static int mpeg_do_ioctl(struct inode *inode, struct file *file,
unsigned int cmd, void *arg)
{
Expand Down Expand Up @@ -866,6 +899,16 @@ static int mpeg_do_ioctl(struct inode *inode, struct file *file,
core->name);
return 0;
}
case VIDIOC_QUERYMENU:
return blackbird_querymenu(dev, arg);
case VIDIOC_QUERYCTRL:
{
struct v4l2_queryctrl *c = arg;

if (blackbird_queryctrl(dev, c) == 0)
return 0;
return cx88_do_ioctl(inode, file, 0, dev->core, cmd, arg, mpeg_do_ioctl);
}

default:
return cx88_do_ioctl(inode, file, 0, dev->core, cmd, arg, mpeg_do_ioctl);
Expand Down
19 changes: 19 additions & 0 deletions drivers/media/video/cx88/cx88-cards.c
Original file line number Diff line number Diff line change
Expand Up @@ -1194,6 +1194,21 @@ struct cx88_board cx88_boards[] = {
}},
.dvb = 1,
},
[CX88_BOARD_GENIATECH_DVBS] = {
.name = "Geniatech DVB-S",
.tuner_type = TUNER_ABSENT,
.radio_type = UNSET,
.tuner_addr = ADDR_UNSET,
.radio_addr = ADDR_UNSET,
.input = {{
.type = CX88_VMUX_DVB,
.vmux = 0,
},{
.type = CX88_VMUX_COMPOSITE1,
.vmux = 1,
}},
.dvb = 1,
},
};
const unsigned int cx88_bcount = ARRAY_SIZE(cx88_boards);

Expand Down Expand Up @@ -1439,6 +1454,10 @@ struct cx88_subid cx88_subids[] = {
.subvendor = 0x18ac,
.subdevice = 0xd800, /* FusionHDTV 3 Gold (original revision) */
.card = CX88_BOARD_DVICO_FUSIONHDTV_3_GOLD_Q,
},{
.subvendor = 0x14f1,
.subdevice = 0x0084,
.card = CX88_BOARD_GENIATECH_DVBS,
},
};
const unsigned int cx88_idcount = ARRAY_SIZE(cx88_subids);
Expand Down
28 changes: 28 additions & 0 deletions drivers/media/video/cx88/cx88-dvb.c
Original file line number Diff line number Diff line change
Expand Up @@ -496,6 +496,26 @@ static int kworld_dvbs_100_set_voltage(struct dvb_frontend* fe, fe_sec_voltage_t
return 0;
}

static int geniatech_dvbs_set_voltage(struct dvb_frontend *fe, fe_sec_voltage_t voltage)
{
struct cx8802_dev *dev= fe->dvb->priv;
struct cx88_core *core = dev->core;

if (voltage == SEC_VOLTAGE_OFF) {
dprintk(1,"LNB Voltage OFF\n");
cx_write(MO_GP0_IO, 0x0000efff);
}

if (core->prev_set_voltage)
return core->prev_set_voltage(fe, voltage);
return 0;
}

static struct cx24123_config geniatech_dvbs_config = {
.demod_address = 0x55,
.set_ts_params = cx24123_set_ts_param,
};

static struct cx24123_config hauppauge_novas_config = {
.demod_address = 0x55,
.set_ts_params = cx24123_set_ts_param,
Expand Down Expand Up @@ -760,6 +780,14 @@ static int dvb_register(struct cx8802_dev *dev)
dev->dvb.frontend->ops.set_voltage = kworld_dvbs_100_set_voltage;
}
break;
case CX88_BOARD_GENIATECH_DVBS:
dev->dvb.frontend = cx24123_attach(&geniatech_dvbs_config,
&dev->core->i2c_adap);
if (dev->dvb.frontend) {
dev->core->prev_set_voltage = dev->dvb.frontend->ops.set_voltage;
dev->dvb.frontend->ops.set_voltage = geniatech_dvbs_set_voltage;
}
break;
#endif
default:
printk("%s: The frontend of your DVB/ATSC card isn't supported yet\n",
Expand Down
61 changes: 46 additions & 15 deletions drivers/media/video/cx88/cx88-video.c
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,51 @@ static struct cx88_ctrl cx8800_ctls[] = {
};
static const int CX8800_CTLS = ARRAY_SIZE(cx8800_ctls);

const u32 cx88_user_ctrls[] = {
V4L2_CID_USER_CLASS,
V4L2_CID_BRIGHTNESS,
V4L2_CID_CONTRAST,
V4L2_CID_SATURATION,
V4L2_CID_HUE,
V4L2_CID_AUDIO_VOLUME,
V4L2_CID_AUDIO_BALANCE,
V4L2_CID_AUDIO_MUTE,
0
};
EXPORT_SYMBOL(cx88_user_ctrls);

static const u32 *ctrl_classes[] = {
cx88_user_ctrls,
NULL
};

int cx8800_ctrl_query(struct v4l2_queryctrl *qctrl)
{
int i;

if (qctrl->id < V4L2_CID_BASE ||
qctrl->id >= V4L2_CID_LASTP1)
return -EINVAL;
for (i = 0; i < CX8800_CTLS; i++)
if (cx8800_ctls[i].v.id == qctrl->id)
break;
if (i == CX8800_CTLS) {
*qctrl = no_ctl;
return 0;
}
*qctrl = cx8800_ctls[i].v;
return 0;
}
EXPORT_SYMBOL(cx8800_ctrl_query);

static int cx88_queryctrl(struct v4l2_queryctrl *qctrl)
{
qctrl->id = v4l2_ctrl_next(ctrl_classes, qctrl->id);
if (qctrl->id == 0)
return -EINVAL;
return cx8800_ctrl_query(qctrl);
}

/* ------------------------------------------------------------------- */
/* resource management */

Expand Down Expand Up @@ -1362,20 +1407,8 @@ int cx88_do_ioctl(struct inode *inode, struct file *file, int radio,
case VIDIOC_QUERYCTRL:
{
struct v4l2_queryctrl *c = arg;
int i;

if (c->id < V4L2_CID_BASE ||
c->id >= V4L2_CID_LASTP1)
return -EINVAL;
for (i = 0; i < CX8800_CTLS; i++)
if (cx8800_ctls[i].v.id == c->id)
break;
if (i == CX8800_CTLS) {
*c = no_ctl;
return 0;
}
*c = cx8800_ctls[i].v;
return 0;
return cx88_queryctrl(c);
}
case VIDIOC_G_CTRL:
return get_control(core,arg);
Expand Down Expand Up @@ -1893,8 +1926,6 @@ static int __devinit cx8800_initdev(struct pci_dev *pci_dev,
/* load and configure helper modules */
if (TUNER_ABSENT != core->tuner_type)
request_module("tuner");
if (core->tda9887_conf)
request_module("tda9887");

/* register v4l devices */
dev->video_dev = cx88_vdev_init(core,dev->pci,
Expand Down
3 changes: 3 additions & 0 deletions drivers/media/video/cx88/cx88.h
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,7 @@ extern struct sram_channel cx88_sram_channels[];
#define CX88_BOARD_PIXELVIEW_PLAYTV_P7000 49
#define CX88_BOARD_NPGTECH_REALTV_TOP10FM 50
#define CX88_BOARD_WINFAST_DTV2000H 51
#define CX88_BOARD_GENIATECH_DVBS 52

enum cx88_itype {
CX88_VMUX_COMPOSITE1 = 1,
Expand Down Expand Up @@ -590,6 +591,8 @@ int cx8802_resume_common(struct pci_dev *pci_dev);
extern int cx88_do_ioctl(struct inode *inode, struct file *file, int radio,
struct cx88_core *core, unsigned int cmd,
void *arg, v4l2_kioctl driver_ioctl);
extern const u32 cx88_user_ctrls[];
extern int cx8800_ctrl_query(struct v4l2_queryctrl *qctrl);

/*
* Local variables:
Expand Down
2 changes: 0 additions & 2 deletions drivers/media/video/em28xx/em28xx-video.c
Original file line number Diff line number Diff line change
Expand Up @@ -1574,8 +1574,6 @@ static int em28xx_init_dev(struct em28xx **devhandle, struct usb_device *udev,
request_module("tvp5150");
if (dev->has_tuner)
request_module("tuner");
if (dev->tda9887_conf)
request_module("tda9887");
#endif
errCode = em28xx_config(dev);
if (errCode) {
Expand Down
4 changes: 2 additions & 2 deletions drivers/media/video/msp3400-driver.h
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@ struct msp_state {
/* thread */
struct task_struct *kthread;
wait_queue_head_t wq;
int restart:1;
int watch_stereo:1;
unsigned int restart:1;
unsigned int watch_stereo:1;
};

/* msp3400-driver.c */
Expand Down
2 changes: 1 addition & 1 deletion drivers/media/video/pvrusb2/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ obj-pvrusb2-24xxx-$(CONFIG_VIDEO_PVRUSB2_24XXX) := \
pvrusb2-objs := pvrusb2-i2c-core.o pvrusb2-i2c-cmd-v4l2.o \
pvrusb2-audio.o pvrusb2-i2c-chips-v4l2.o \
pvrusb2-encoder.o pvrusb2-video-v4l.o \
pvrusb2-eeprom.o pvrusb2-tuner.o pvrusb2-demod.o \
pvrusb2-eeprom.o pvrusb2-tuner.o \
pvrusb2-main.o pvrusb2-hdw.o pvrusb2-v4l2.o \
pvrusb2-ctrl.o pvrusb2-std.o \
pvrusb2-context.o pvrusb2-io.o pvrusb2-ioread.o \
Expand Down
4 changes: 2 additions & 2 deletions drivers/media/video/pvrusb2/pvrusb2-audio.c
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,8 @@ static int get_audio_status(struct pvr2_msp3400_handler *ctxt)

static void pvr2_msp3400_detach(struct pvr2_msp3400_handler *ctxt)
{
ctxt->client->handler = 0;
ctxt->hdw->audio_stat = 0;
ctxt->client->handler = NULL;
ctxt->hdw->audio_stat = NULL;
kfree(ctxt);
}

Expand Down
Loading

0 comments on commit 1cfef5e

Please sign in to comment.