You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
Merge master.kernel.org:/pub/scm/linux/kernel/git/mchehab/v4l-dvb
* master.kernel.org:/pub/scm/linux/kernel/git/mchehab/v4l-dvb: (26 commits)
V4L/DVB (4380): Bttv: Revert VBI_OFFSET to previous value, it works better
V4L/DVB (4379): Videodev: Check return value of class_device_register() correctly
V4L/DVB (4373): Correctly handle sysfs error leg file removal in pvrusb2
V4L/DVB (4368): Bttv: use class_device_create_file and handle errors
V4L/DVB (4367): Videodev: Handle class_device related errors
V4L/DVB (4365): OVERLAY flag were enabled by mistake
V4L/DVB (4344): Fix broken dependencies on media Kconfig
V4L/DVB (4343): Fix for compilation without V4L1 or V4L1_COMPAT
V4L/DVB (4342): Fix ext_controls align on 64 bit architectures
V4L/DVB (4341): VIDIOCSMICROCODE were missing on compat_ioctl32
V4L/DVB (4322): Fix dvb-pll autoprobing
V4L/DVB (4311): Fix possible dvb-pll oops
V4L/DVB (4337): Refine dead code elimination in pvrusb2
V4L/DVB (4323): [budget/budget-av/budget-ci/budget-patch drivers] fixed DMA start/stop code
V4L/DVB (4316): Check __must_check warnings
V4L/DVB (4314): Set the Auxiliary Byte when tuning LG H06xF in analog mode
V4L/DVB (4313): Bugfix for keycode calculation on NPG remotes
V4L/DVB (4310): Saa7134: rename dmasound_{init, exit}
V4L/DVB (4306): Support non interlaced capture by default for saa713x
V4L/DVB (4298): Check all __must_check warnings in bttv.
...
This commit is contained in:
@@ -526,7 +526,9 @@ static int dvb_frontend_thread(void *data)
|
||||
fepriv->delay = 3*HZ;
|
||||
fepriv->status = 0;
|
||||
fepriv->wakeup = 0;
|
||||
fepriv->reinitialise = 1;
|
||||
fepriv->reinitialise = 0;
|
||||
|
||||
dvb_frontend_init(fe);
|
||||
|
||||
while (1) {
|
||||
up(&fepriv->sem); /* is locked when we enter the thread... */
|
||||
@@ -1013,17 +1015,18 @@ static int dvb_frontend_open(struct inode *inode, struct file *file)
|
||||
return ret;
|
||||
|
||||
if ((file->f_flags & O_ACCMODE) != O_RDONLY) {
|
||||
|
||||
/* normal tune mode when opened R/W */
|
||||
fepriv->tune_mode_flags &= ~FE_TUNE_MODE_ONESHOT;
|
||||
fepriv->tone = -1;
|
||||
fepriv->voltage = -1;
|
||||
|
||||
ret = dvb_frontend_start (fe);
|
||||
if (ret)
|
||||
dvb_generic_release (inode, file);
|
||||
|
||||
/* empty event queue */
|
||||
fepriv->events.eventr = fepriv->events.eventw = 0;
|
||||
|
||||
/* normal tune mode when opened R/W */
|
||||
fepriv->tune_mode_flags &= ~FE_TUNE_MODE_ONESHOT;
|
||||
fepriv->tone = -1;
|
||||
fepriv->voltage = -1;
|
||||
}
|
||||
|
||||
return ret;
|
||||
|
||||
@@ -194,11 +194,11 @@ struct dvb_pll_desc dvb_pll_tda665x = {
|
||||
{ 253834000, 36249333, 166667, 0xca, 0x62 /* 011 0 0 0 10 */ },
|
||||
{ 383834000, 36249333, 166667, 0xca, 0xa2 /* 101 0 0 0 10 */ },
|
||||
{ 443834000, 36249333, 166667, 0xca, 0xc2 /* 110 0 0 0 10 */ },
|
||||
{ 444000000, 36249333, 166667, 0xca, 0xc3 /* 110 0 0 0 11 */ },
|
||||
{ 583834000, 36249333, 166667, 0xca, 0x63 /* 011 0 0 0 11 */ },
|
||||
{ 793834000, 36249333, 166667, 0xca, 0xa3 /* 101 0 0 0 11 */ },
|
||||
{ 444834000, 36249333, 166667, 0xca, 0xc3 /* 110 0 0 0 11 */ },
|
||||
{ 861000000, 36249333, 166667, 0xca, 0xe3 /* 111 0 0 0 11 */ },
|
||||
{ 444000000, 36249333, 166667, 0xca, 0xc4 /* 110 0 0 1 00 */ },
|
||||
{ 583834000, 36249333, 166667, 0xca, 0x64 /* 011 0 0 1 00 */ },
|
||||
{ 793834000, 36249333, 166667, 0xca, 0xa4 /* 101 0 0 1 00 */ },
|
||||
{ 444834000, 36249333, 166667, 0xca, 0xc4 /* 110 0 0 1 00 */ },
|
||||
{ 861000000, 36249333, 166667, 0xca, 0xe4 /* 111 0 0 1 00 */ },
|
||||
}
|
||||
};
|
||||
EXPORT_SYMBOL(dvb_pll_tda665x);
|
||||
@@ -613,7 +613,21 @@ static struct dvb_tuner_ops dvb_pll_tuner_ops = {
|
||||
|
||||
int dvb_pll_attach(struct dvb_frontend *fe, int pll_addr, struct i2c_adapter *i2c, struct dvb_pll_desc *desc)
|
||||
{
|
||||
u8 b1 [] = { 0 };
|
||||
struct i2c_msg msg = { .addr = pll_addr, .flags = I2C_M_RD, .buf = b1, .len = 1 };
|
||||
struct dvb_pll_priv *priv = NULL;
|
||||
int ret;
|
||||
|
||||
if (i2c != NULL) {
|
||||
if (fe->ops.i2c_gate_ctrl)
|
||||
fe->ops.i2c_gate_ctrl(fe, 1);
|
||||
|
||||
ret = i2c_transfer (i2c, &msg, 1);
|
||||
if (ret != 1)
|
||||
return -1;
|
||||
if (fe->ops.i2c_gate_ctrl)
|
||||
fe->ops.i2c_gate_ctrl(fe, 0);
|
||||
}
|
||||
|
||||
priv = kzalloc(sizeof(struct dvb_pll_priv), GFP_KERNEL);
|
||||
if (priv == NULL)
|
||||
|
||||
@@ -2203,8 +2203,8 @@ static int frontend_init(struct av7110 *av7110)
|
||||
av7110->fe->ops.tuner_ops.set_params = nexusca_stv0297_tuner_set_params;
|
||||
|
||||
/* set TDA9819 into DVB mode */
|
||||
saa7146_setgpio(av7110->dev, 1, SAA7146_GPIO_OUTLO); // TDA9198 pin9(STD)
|
||||
saa7146_setgpio(av7110->dev, 3, SAA7146_GPIO_OUTLO); // TDA9198 pin30(VIF)
|
||||
saa7146_setgpio(av7110->dev, 1, SAA7146_GPIO_OUTLO); // TDA9819 pin9(STD)
|
||||
saa7146_setgpio(av7110->dev, 3, SAA7146_GPIO_OUTLO); // TDA9819 pin30(VIF)
|
||||
|
||||
/* tuner on this needs a slower i2c bus speed */
|
||||
av7110->dev->i2c_bitrate = SAA7146_I2C_BUS_BIT_RATE_240;
|
||||
|
||||
@@ -272,8 +272,8 @@ static int av7110_dvb_c_switch(struct saa7146_fh *fh)
|
||||
if (ves1820_writereg(dev, 0x09, 0x0f, 0x60))
|
||||
dprintk(1, "setting band in demodulator failed.\n");
|
||||
} else if (av7110->analog_tuner_flags & ANALOG_TUNER_STV0297) {
|
||||
saa7146_setgpio(dev, 1, SAA7146_GPIO_OUTHI); // TDA9198 pin9(STD)
|
||||
saa7146_setgpio(dev, 3, SAA7146_GPIO_OUTHI); // TDA9198 pin30(VIF)
|
||||
saa7146_setgpio(dev, 1, SAA7146_GPIO_OUTHI); // TDA9819 pin9(STD)
|
||||
saa7146_setgpio(dev, 3, SAA7146_GPIO_OUTHI); // TDA9819 pin30(VIF)
|
||||
}
|
||||
if (i2c_writereg(av7110, 0x48, 0x02, 0xd0) != 1)
|
||||
dprintk(1, "saa7113 write failed @ card %d", av7110->dvb_adapter.num);
|
||||
@@ -308,8 +308,8 @@ static int av7110_dvb_c_switch(struct saa7146_fh *fh)
|
||||
if (ves1820_writereg(dev, 0x09, 0x0f, 0x20))
|
||||
dprintk(1, "setting band in demodulator failed.\n");
|
||||
} else if (av7110->analog_tuner_flags & ANALOG_TUNER_STV0297) {
|
||||
saa7146_setgpio(dev, 1, SAA7146_GPIO_OUTLO); // TDA9198 pin9(STD)
|
||||
saa7146_setgpio(dev, 3, SAA7146_GPIO_OUTLO); // TDA9198 pin30(VIF)
|
||||
saa7146_setgpio(dev, 1, SAA7146_GPIO_OUTLO); // TDA9819 pin9(STD)
|
||||
saa7146_setgpio(dev, 3, SAA7146_GPIO_OUTLO); // TDA9819 pin30(VIF)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -750,8 +750,8 @@ int av7110_init_analog_module(struct av7110 *av7110)
|
||||
if (ves1820_writereg(av7110->dev, 0x09, 0x0f, 0x20))
|
||||
dprintk(1, "setting band in demodulator failed.\n");
|
||||
} else if (av7110->analog_tuner_flags & ANALOG_TUNER_STV0297) {
|
||||
saa7146_setgpio(av7110->dev, 1, SAA7146_GPIO_OUTLO); // TDA9198 pin9(STD)
|
||||
saa7146_setgpio(av7110->dev, 3, SAA7146_GPIO_OUTLO); // TDA9198 pin30(VIF)
|
||||
saa7146_setgpio(av7110->dev, 1, SAA7146_GPIO_OUTLO); // TDA9819 pin9(STD)
|
||||
saa7146_setgpio(av7110->dev, 3, SAA7146_GPIO_OUTLO); // TDA9819 pin30(VIF)
|
||||
}
|
||||
|
||||
/* init the saa7113 */
|
||||
|
||||
@@ -1303,6 +1303,9 @@ 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);
|
||||
ciintf_init(budget_av);
|
||||
|
||||
ttpci_budget_init_hooks(&budget_av->budget);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -1101,6 +1101,8 @@ static int budget_ci_attach(struct saa7146_dev *dev, struct saa7146_pci_extensio
|
||||
budget_ci->budget.dvb_adapter.priv = budget_ci;
|
||||
frontend_init(budget_ci);
|
||||
|
||||
ttpci_budget_init_hooks(&budget_ci->budget);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -63,9 +63,6 @@ static int stop_ts_capture(struct budget *budget)
|
||||
{
|
||||
dprintk(2, "budget: %p\n", budget);
|
||||
|
||||
if (--budget->feeding)
|
||||
return budget->feeding;
|
||||
|
||||
saa7146_write(budget->dev, MC1, MASK_20); // DMA3 off
|
||||
SAA7146_IER_DISABLE(budget->dev, MASK_10);
|
||||
return 0;
|
||||
@@ -77,8 +74,8 @@ static int start_ts_capture(struct budget *budget)
|
||||
|
||||
dprintk(2, "budget: %p\n", budget);
|
||||
|
||||
if (budget->feeding)
|
||||
return ++budget->feeding;
|
||||
if (!budget->feeding || !budget->fe_synced)
|
||||
return 0;
|
||||
|
||||
saa7146_write(dev, MC1, MASK_20); // DMA3 off
|
||||
|
||||
@@ -139,7 +136,33 @@ static int start_ts_capture(struct budget *budget)
|
||||
SAA7146_IER_ENABLE(budget->dev, MASK_10); /* VPE */
|
||||
saa7146_write(dev, MC1, (MASK_04 | MASK_20)); /* DMA3 on */
|
||||
|
||||
return ++budget->feeding;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int budget_read_fe_status(struct dvb_frontend *fe, fe_status_t *status)
|
||||
{
|
||||
struct budget *budget = (struct budget *) fe->dvb->priv;
|
||||
int synced;
|
||||
int ret;
|
||||
|
||||
if (budget->read_fe_status)
|
||||
ret = budget->read_fe_status(fe, status);
|
||||
else
|
||||
ret = -EINVAL;
|
||||
|
||||
if (!ret) {
|
||||
synced = (*status & FE_HAS_LOCK);
|
||||
if (synced != budget->fe_synced) {
|
||||
budget->fe_synced = synced;
|
||||
spin_lock(&budget->feedlock);
|
||||
if (synced)
|
||||
start_ts_capture(budget);
|
||||
else
|
||||
stop_ts_capture(budget);
|
||||
spin_unlock(&budget->feedlock);
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
static void vpeirq(unsigned long data)
|
||||
@@ -267,7 +290,7 @@ static int budget_start_feed(struct dvb_demux_feed *feed)
|
||||
{
|
||||
struct dvb_demux *demux = feed->demux;
|
||||
struct budget *budget = (struct budget *) demux->priv;
|
||||
int status;
|
||||
int status = 0;
|
||||
|
||||
dprintk(2, "budget: %p\n", budget);
|
||||
|
||||
@@ -276,7 +299,8 @@ static int budget_start_feed(struct dvb_demux_feed *feed)
|
||||
|
||||
spin_lock(&budget->feedlock);
|
||||
feed->pusi_seen = 0; /* have a clean section start */
|
||||
status = start_ts_capture(budget);
|
||||
if (budget->feeding++ == 0)
|
||||
status = start_ts_capture(budget);
|
||||
spin_unlock(&budget->feedlock);
|
||||
return status;
|
||||
}
|
||||
@@ -285,12 +309,13 @@ static int budget_stop_feed(struct dvb_demux_feed *feed)
|
||||
{
|
||||
struct dvb_demux *demux = feed->demux;
|
||||
struct budget *budget = (struct budget *) demux->priv;
|
||||
int status;
|
||||
int status = 0;
|
||||
|
||||
dprintk(2, "budget: %p\n", budget);
|
||||
|
||||
spin_lock(&budget->feedlock);
|
||||
status = stop_ts_capture(budget);
|
||||
if (--budget->feeding == 0)
|
||||
status = stop_ts_capture(budget);
|
||||
spin_unlock(&budget->feedlock);
|
||||
return status;
|
||||
}
|
||||
@@ -470,6 +495,14 @@ err:
|
||||
return ret;
|
||||
}
|
||||
|
||||
void ttpci_budget_init_hooks(struct budget *budget)
|
||||
{
|
||||
if (budget->dvb_frontend && !budget->read_fe_status) {
|
||||
budget->read_fe_status = budget->dvb_frontend->ops.read_status;
|
||||
budget->dvb_frontend->ops.read_status = budget_read_fe_status;
|
||||
}
|
||||
}
|
||||
|
||||
int ttpci_budget_deinit(struct budget *budget)
|
||||
{
|
||||
struct saa7146_dev *dev = budget->dev;
|
||||
@@ -508,11 +541,8 @@ void ttpci_budget_set_video_port(struct saa7146_dev *dev, int video_port)
|
||||
spin_lock(&budget->feedlock);
|
||||
budget->video_port = video_port;
|
||||
if (budget->feeding) {
|
||||
int oldfeeding = budget->feeding;
|
||||
budget->feeding = 1;
|
||||
stop_ts_capture(budget);
|
||||
start_ts_capture(budget);
|
||||
budget->feeding = oldfeeding;
|
||||
}
|
||||
spin_unlock(&budget->feedlock);
|
||||
}
|
||||
@@ -520,6 +550,7 @@ void ttpci_budget_set_video_port(struct saa7146_dev *dev, int video_port)
|
||||
EXPORT_SYMBOL_GPL(ttpci_budget_debiread);
|
||||
EXPORT_SYMBOL_GPL(ttpci_budget_debiwrite);
|
||||
EXPORT_SYMBOL_GPL(ttpci_budget_init);
|
||||
EXPORT_SYMBOL_GPL(ttpci_budget_init_hooks);
|
||||
EXPORT_SYMBOL_GPL(ttpci_budget_deinit);
|
||||
EXPORT_SYMBOL_GPL(ttpci_budget_irq10_handler);
|
||||
EXPORT_SYMBOL_GPL(ttpci_budget_set_video_port);
|
||||
|
||||
@@ -617,6 +617,8 @@ static int budget_patch_attach (struct saa7146_dev* dev, struct saa7146_pci_exte
|
||||
budget->dvb_adapter.priv = budget;
|
||||
frontend_init(budget);
|
||||
|
||||
ttpci_budget_init_hooks(budget);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -375,9 +375,6 @@ static void frontend_init(struct budget *budget)
|
||||
if (budget->dvb_frontend) {
|
||||
budget->dvb_frontend->ops.tuner_ops.set_params = alps_bsru6_tuner_set_params;
|
||||
budget->dvb_frontend->tuner_priv = &budget->i2c_adap;
|
||||
budget->dvb_frontend->ops.diseqc_send_master_cmd = budget_diseqc_send_master_cmd;
|
||||
budget->dvb_frontend->ops.diseqc_send_burst = budget_diseqc_send_burst;
|
||||
budget->dvb_frontend->ops.set_tone = budget_set_tone;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
@@ -474,6 +471,8 @@ static int budget_attach (struct saa7146_dev* dev, struct saa7146_pci_extension_
|
||||
budget->dvb_adapter.priv = budget;
|
||||
frontend_init(budget);
|
||||
|
||||
ttpci_budget_init_hooks(budget);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -52,9 +52,6 @@ struct budget {
|
||||
struct dmx_frontend hw_frontend;
|
||||
struct dmx_frontend mem_frontend;
|
||||
|
||||
int fe_synced;
|
||||
struct mutex pid_mutex;
|
||||
|
||||
int ci_present;
|
||||
int video_port;
|
||||
|
||||
@@ -74,6 +71,9 @@ struct budget {
|
||||
|
||||
struct dvb_adapter dvb_adapter;
|
||||
struct dvb_frontend *dvb_frontend;
|
||||
int (*read_fe_status)(struct dvb_frontend *fe, fe_status_t *status);
|
||||
int fe_synced;
|
||||
|
||||
void *priv;
|
||||
};
|
||||
|
||||
@@ -106,6 +106,7 @@ static struct saa7146_pci_extension_data x_var = { \
|
||||
extern int ttpci_budget_init(struct budget *budget, struct saa7146_dev *dev,
|
||||
struct saa7146_pci_extension_data *info,
|
||||
struct module *owner);
|
||||
extern void ttpci_budget_init_hooks(struct budget *budget);
|
||||
extern int ttpci_budget_deinit(struct budget *budget);
|
||||
extern void ttpci_budget_irq10_handler(struct saa7146_dev *dev, u32 * isr);
|
||||
extern void ttpci_budget_set_video_port(struct saa7146_dev *dev, int video_port);
|
||||
|
||||
@@ -145,7 +145,7 @@ config VIDEO_SAA5246A
|
||||
|
||||
config VIDEO_SAA5249
|
||||
tristate "SAA5249 Teletext processor"
|
||||
depends on VIDEO_DEV && I2C
|
||||
depends on VIDEO_DEV && I2C && VIDEO_V4L1
|
||||
help
|
||||
Support for I2C bus based teletext using the SAA5249 chip. At the
|
||||
moment this is only useful on some European WinTV cards.
|
||||
@@ -155,7 +155,7 @@ config VIDEO_SAA5249
|
||||
|
||||
config TUNER_3036
|
||||
tristate "SAB3036 tuner"
|
||||
depends on VIDEO_DEV && I2C
|
||||
depends on VIDEO_DEV && I2C && VIDEO_V4L1
|
||||
help
|
||||
Say Y here to include support for Philips SAB3036 compatible tuners.
|
||||
If in doubt, say N.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
config VIDEO_BT848
|
||||
tristate "BT848 Video For Linux"
|
||||
depends on VIDEO_DEV && PCI && I2C && VIDEO_V4L2
|
||||
depends on VIDEO_DEV && PCI && I2C && VIDEO_V4L1
|
||||
select I2C_ALGOBIT
|
||||
select FW_LOADER
|
||||
select VIDEO_BTCX
|
||||
|
||||
@@ -3923,7 +3923,12 @@ static int __devinit bttv_register_video(struct bttv *btv)
|
||||
goto err;
|
||||
printk(KERN_INFO "bttv%d: registered device video%d\n",
|
||||
btv->c.nr,btv->video_dev->minor & 0x1f);
|
||||
video_device_create_file(btv->video_dev, &class_device_attr_card);
|
||||
if (class_device_create_file(&btv->video_dev->class_dev,
|
||||
&class_device_attr_card)<0) {
|
||||
printk(KERN_ERR "bttv%d: class_device_create_file 'card' "
|
||||
"failed\n", btv->c.nr);
|
||||
goto err;
|
||||
}
|
||||
|
||||
/* vbi */
|
||||
btv->vbi_dev = vdev_init(btv, &bttv_vbi_template, "vbi");
|
||||
@@ -4287,6 +4292,8 @@ static struct pci_driver bttv_pci_driver = {
|
||||
|
||||
static int bttv_init_module(void)
|
||||
{
|
||||
int ret;
|
||||
|
||||
bttv_num = 0;
|
||||
|
||||
printk(KERN_INFO "bttv: driver version %d.%d.%d loaded\n",
|
||||
@@ -4308,7 +4315,11 @@ static int bttv_init_module(void)
|
||||
|
||||
bttv_check_chipset();
|
||||
|
||||
bus_register(&bttv_sub_bus_type);
|
||||
ret = bus_register(&bttv_sub_bus_type);
|
||||
if (ret < 0) {
|
||||
printk(KERN_WARNING "bttv: bus_register error: %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
return pci_register_driver(&bttv_pci_driver);
|
||||
}
|
||||
|
||||
|
||||
@@ -31,11 +31,16 @@
|
||||
#include <asm/io.h>
|
||||
#include "bttvp.h"
|
||||
|
||||
/* Offset from line sync pulse leading edge (0H) in 1 / sampling_rate:
|
||||
bt8x8 /HRESET pulse starts at 0H and has length 64 / fCLKx1 (E|O_VTC
|
||||
HSFMT = 0). VBI_HDELAY (always 0) is an offset from the trailing edge
|
||||
of /HRESET in 1 / fCLKx1, and the sampling_rate tvnorm->Fsc is fCLKx2. */
|
||||
#define VBI_OFFSET ((64 + 0) * 2)
|
||||
/* Offset from line sync pulse leading edge (0H) to start of VBI capture,
|
||||
in fCLKx2 pixels. According to the datasheet, VBI capture starts
|
||||
VBI_HDELAY fCLKx1 pixels from the tailing edgeof /HRESET, and /HRESET
|
||||
is 64 fCLKx1 pixels wide. VBI_HDELAY is set to 0, so this should be
|
||||
(64 + 0) * 2 = 128 fCLKx2 pixels. But it's not! The datasheet is
|
||||
Just Plain Wrong. The real value appears to be different for
|
||||
different revisions of the bt8x8 chips, and to be affected by the
|
||||
horizontal scaling factor. Experimentally, the value is measured
|
||||
to be about 244. */
|
||||
#define VBI_OFFSET 244
|
||||
|
||||
#define VBI_DEFLINES 16
|
||||
#define VBI_MAXLINES 32
|
||||
|
||||
@@ -490,6 +490,23 @@ static inline int put_v4l2_input(struct v4l2_input *kp, struct v4l2_input __user
|
||||
return 0;
|
||||
}
|
||||
|
||||
struct video_code32
|
||||
{
|
||||
char loadwhat[16]; /* name or tag of file being passed */
|
||||
compat_int_t datasize;
|
||||
unsigned char *data;
|
||||
};
|
||||
|
||||
static inline int microcode32(struct video_code *kp, struct video_code32 __user *up)
|
||||
{
|
||||
if(!access_ok(VERIFY_READ, up, sizeof(struct video_code32)) ||
|
||||
copy_from_user(kp->loadwhat, up->loadwhat, sizeof (up->loadwhat)) ||
|
||||
get_user(kp->datasize, &up->datasize) ||
|
||||
copy_from_user(kp->data, up->data, up->datasize))
|
||||
return -EFAULT;
|
||||
return 0;
|
||||
}
|
||||
|
||||
#define VIDIOCGTUNER32 _IOWR('v',4, struct video_tuner32)
|
||||
#define VIDIOCSTUNER32 _IOW('v',5, struct video_tuner32)
|
||||
#define VIDIOCGWIN32 _IOR('v',9, struct video_window32)
|
||||
@@ -498,6 +515,7 @@ static inline int put_v4l2_input(struct v4l2_input *kp, struct v4l2_input __user
|
||||
#define VIDIOCSFBUF32 _IOW('v',12, struct video_buffer32)
|
||||
#define VIDIOCGFREQ32 _IOR('v',14, u32)
|
||||
#define VIDIOCSFREQ32 _IOW('v',15, u32)
|
||||
#define VIDIOCSMICROCODE32 _IOW('v',27, struct video_code32)
|
||||
|
||||
/* VIDIOC_ENUMINPUT32 is VIDIOC_ENUMINPUT minus 4 bytes of padding alignement */
|
||||
#define VIDIOC_ENUMINPUT32 VIDIOC_ENUMINPUT - _IOC(0, 0, 0, 4)
|
||||
@@ -590,6 +608,7 @@ static int do_video_ioctl(struct file *file, unsigned int cmd, unsigned long arg
|
||||
struct video_tuner vt;
|
||||
struct video_buffer vb;
|
||||
struct video_window vw;
|
||||
struct video_code vc;
|
||||
struct v4l2_format v2f;
|
||||
struct v4l2_buffer v2b;
|
||||
struct v4l2_framebuffer v2fb;
|
||||
@@ -628,6 +647,7 @@ static int do_video_ioctl(struct file *file, unsigned int cmd, unsigned long arg
|
||||
case VIDIOC_G_INPUT32: cmd = VIDIOC_G_INPUT; break;
|
||||
case VIDIOC_S_INPUT32: cmd = VIDIOC_S_INPUT; break;
|
||||
case VIDIOC_TRY_FMT32: cmd = VIDIOC_TRY_FMT; break;
|
||||
case VIDIOCSMICROCODE32: cmd = VIDIOCSMICROCODE; break;
|
||||
};
|
||||
|
||||
switch(cmd) {
|
||||
@@ -703,6 +723,10 @@ static int do_video_ioctl(struct file *file, unsigned int cmd, unsigned long arg
|
||||
case VIDIOC_G_FBUF:
|
||||
case VIDIOC_G_INPUT:
|
||||
compatible_arg = 0;
|
||||
case VIDIOCSMICROCODE:
|
||||
err = microcode32(&karg.vc, up);
|
||||
compatible_arg = 0;
|
||||
break;
|
||||
};
|
||||
|
||||
if(err)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
config VIDEO_CPIA2
|
||||
tristate "CPiA2 Video For Linux"
|
||||
depends on VIDEO_DEV && USB
|
||||
depends on VIDEO_DEV && USB && VIDEO_V4L1
|
||||
---help---
|
||||
This is the video4linux driver for cameras based on Vision's CPiA2
|
||||
(Colour Processor Interface ASIC), such as the Digital Blue QX5
|
||||
|
||||
@@ -89,7 +89,7 @@ static void cx88_ir_handle_key(struct cx88_IR *ir)
|
||||
|
||||
auxgpio = cx_read(MO_GP1_IO);
|
||||
/* Take out the parity part */
|
||||
gpio+=(gpio & 0x7fd) + (auxgpio & 0xef);
|
||||
gpio=(gpio & 0x7fd) + (auxgpio & 0xef);
|
||||
} else
|
||||
auxgpio = gpio;
|
||||
|
||||
|
||||
@@ -1180,7 +1180,6 @@ static int video_do_ioctl(struct inode *inode, struct file *file,
|
||||
V4L2_CAP_READWRITE |
|
||||
V4L2_CAP_STREAMING |
|
||||
V4L2_CAP_VBI_CAPTURE |
|
||||
V4L2_CAP_VIDEO_OVERLAY |
|
||||
0;
|
||||
if (UNSET != core->tuner_type)
|
||||
cap->capabilities |= V4L2_CAP_TUNER;
|
||||
@@ -1226,7 +1225,7 @@ static int video_do_ioctl(struct inode *inode, struct file *file,
|
||||
struct v4l2_format *f = arg;
|
||||
return cx8800_try_fmt(dev,fh,f);
|
||||
}
|
||||
#ifdef HAVE_V4L1
|
||||
#ifdef CONFIG_V4L1_COMPAT
|
||||
/* --- streaming capture ------------------------------------- */
|
||||
case VIDIOCGMBUF:
|
||||
{
|
||||
@@ -1585,7 +1584,7 @@ static int radio_do_ioctl(struct inode *inode, struct file *file,
|
||||
*id = 0;
|
||||
return 0;
|
||||
}
|
||||
#ifdef HAVE_V4L1
|
||||
#ifdef CONFIG_V4L1_COMPAT
|
||||
case VIDIOCSTUNER:
|
||||
{
|
||||
struct video_tuner *v = arg;
|
||||
|
||||
@@ -362,7 +362,7 @@ int msp_sleep(struct msp_state *state, int timeout)
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------------------ */
|
||||
|
||||
#ifdef CONFIG_VIDEO_V4L1
|
||||
static int msp_mode_v4l2_to_v4l1(int rxsubchans, int audmode)
|
||||
{
|
||||
if (rxsubchans == V4L2_TUNER_SUB_MONO)
|
||||
@@ -384,6 +384,7 @@ static int msp_mode_v4l1_to_v4l2(int mode)
|
||||
return V4L2_TUNER_MODE_LANG1;
|
||||
return V4L2_TUNER_MODE_MONO;
|
||||
}
|
||||
#endif
|
||||
|
||||
static int msp_get_ctrl(struct i2c_client *client, struct v4l2_control *ctrl)
|
||||
{
|
||||
@@ -509,6 +510,7 @@ static int msp_command(struct i2c_client *client, unsigned int cmd, void *arg)
|
||||
/* --- v4l ioctls --- */
|
||||
/* take care: bttv does userspace copying, we'll get a
|
||||
kernel pointer here... */
|
||||
#ifdef CONFIG_VIDEO_V4L1
|
||||
case VIDIOCGAUDIO:
|
||||
{
|
||||
struct video_audio *va = arg;
|
||||
@@ -577,6 +579,12 @@ static int msp_command(struct i2c_client *client, unsigned int cmd, void *arg)
|
||||
}
|
||||
|
||||
case VIDIOCSFREQ:
|
||||
{
|
||||
/* new channel -- kick audio carrier scan */
|
||||
msp_wake_thread(client);
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
case VIDIOC_S_FREQUENCY:
|
||||
{
|
||||
/* new channel -- kick audio carrier scan */
|
||||
|
||||
@@ -852,7 +852,6 @@ unsigned long pvr2_hdw_get_sn(struct pvr2_hdw *hdw)
|
||||
return hdw->serial_number;
|
||||
}
|
||||
|
||||
|
||||
int pvr2_hdw_get_unit_number(struct pvr2_hdw *hdw)
|
||||
{
|
||||
return hdw->unit_number;
|
||||
@@ -2318,7 +2317,6 @@ void pvr2_hdw_poll_trigger_unlocked(struct pvr2_hdw *hdw)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* Return name for this driver instance */
|
||||
const char *pvr2_hdw_get_driver_name(struct pvr2_hdw *hdw)
|
||||
{
|
||||
@@ -2542,6 +2540,10 @@ static void pvr2_ctl_timeout(unsigned long data)
|
||||
}
|
||||
|
||||
|
||||
/* Issue a command and get a response from the device. This extended
|
||||
version includes a probe flag (which if set means that device errors
|
||||
should not be logged or treated as fatal) and a timeout in jiffies.
|
||||
This can be used to non-lethally probe the health of endpoint 1. */
|
||||
static int pvr2_send_request_ex(struct pvr2_hdw *hdw,
|
||||
unsigned int timeout,int probe_fl,
|
||||
void *write_data,unsigned int write_len,
|
||||
@@ -2970,6 +2972,7 @@ int pvr2_hdw_cmd_decoder_reset(struct pvr2_hdw *hdw)
|
||||
}
|
||||
|
||||
|
||||
/* Stop / start video stream transport */
|
||||
static int pvr2_hdw_cmd_usbstream(struct pvr2_hdw *hdw,int runFl)
|
||||
{
|
||||
int status;
|
||||
@@ -3068,6 +3071,7 @@ int pvr2_hdw_gpio_chg_out(struct pvr2_hdw *hdw,u32 msk,u32 val)
|
||||
}
|
||||
|
||||
|
||||
/* Find I2C address of eeprom */
|
||||
static int pvr2_hdw_get_eeprom_addr(struct pvr2_hdw *hdw)
|
||||
{
|
||||
int result;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user