patch-2.2.18 linux/drivers/char/buz.c
Next file: linux/drivers/char/bw-qcam.c
Previous file: linux/drivers/char/bttv.h
Back to the patch index
Back to the overall index
- Lines: 75
- Date:
Wed Nov 8 22:52:33 2000
- Orig file:
v2.2.17/drivers/char/buz.c
- Orig date:
Fri Apr 21 12:45:51 2000
diff -u --new-file --recursive --exclude-from /usr/src/exclude v2.2.17/drivers/char/buz.c linux/drivers/char/buz.c
@@ -201,6 +201,7 @@
mem_map_reserve(MAP_NR(mem + off));
DEBUG(printk(BUZ_INFO ": V4L frame %d mem 0x%x (bus: 0x%x=%d)\n", i, mem, virt_to_bus(mem), virt_to_bus(mem)));
} else {
+ v4l_fbuffer_free(zr);
return -ENOBUFS;
}
}
@@ -2389,7 +2390,7 @@
case VIDIOCSCHAN:
{
struct video_channel v;
- int input;
+ int input, norm;
int on, res;
if (copy_from_user(&v, arg, sizeof(v))) {
@@ -2421,9 +2422,10 @@
if (on)
zr36057_overlay(zr, 0);
+ norm = zr->params.norm;
i2c_control_device(&zr->i2c, I2C_DRIVERID_VIDEODECODER, DECODER_SET_INPUT, &input);
- i2c_control_device(&zr->i2c, I2C_DRIVERID_VIDEODECODER, DECODER_SET_NORM, &zr->params.norm);
- i2c_control_device(&zr->i2c, I2C_DRIVERID_VIDEOENCODER, ENCODER_SET_NORM, &zr->params.norm);
+ i2c_control_device(&zr->i2c, I2C_DRIVERID_VIDEODECODER, DECODER_SET_NORM, &norm);
+ i2c_control_device(&zr->i2c, I2C_DRIVERID_VIDEOENCODER, ENCODER_SET_NORM, &norm);
if (on)
zr36057_overlay(zr, 1);
@@ -2781,7 +2783,7 @@
case BUZIOC_S_PARAMS:
{
struct zoran_params bp;
- int input, on;
+ int input, on, norm;
if (zr->codec_mode != BUZ_MODE_IDLE) {
return -EINVAL;
@@ -2808,9 +2810,10 @@
zr36057_overlay(zr, 0);
input = zr->params.input == 0 ? 3 : 7;
+ norm = zr->params.norm;
i2c_control_device(&zr->i2c, I2C_DRIVERID_VIDEODECODER, DECODER_SET_INPUT, &input);
- i2c_control_device(&zr->i2c, I2C_DRIVERID_VIDEODECODER, DECODER_SET_NORM, &zr->params.norm);
- i2c_control_device(&zr->i2c, I2C_DRIVERID_VIDEOENCODER, ENCODER_SET_NORM, &zr->params.norm);
+ i2c_control_device(&zr->i2c, I2C_DRIVERID_VIDEODECODER, DECODER_SET_NORM, &norm);
+ i2c_control_device(&zr->i2c, I2C_DRIVERID_VIDEOENCODER, ENCODER_SET_NORM, &norm);
if (on)
zr36057_overlay(zr, 1);
@@ -2939,8 +2942,9 @@
/* restore previous input and norm */
input = zr->params.input == 0 ? 3 : 7;
+ norm = zr->params.norm;
i2c_control_device(&zr->i2c, I2C_DRIVERID_VIDEODECODER, DECODER_SET_INPUT, &input);
- i2c_control_device(&zr->i2c, I2C_DRIVERID_VIDEODECODER, DECODER_SET_NORM, &zr->params.norm);
+ i2c_control_device(&zr->i2c, I2C_DRIVERID_VIDEODECODER, DECODER_SET_NORM, &norm);
if (copy_to_user(arg, &bs, sizeof(bs))) {
return -EFAULT;
@@ -3252,8 +3256,9 @@
j = zr->params.input == 0 ? 3 : 7;
i2c_control_device(&zr->i2c, I2C_DRIVERID_VIDEODECODER, DECODER_SET_INPUT, &j);
- i2c_control_device(&zr->i2c, I2C_DRIVERID_VIDEODECODER, DECODER_SET_NORM, &zr->params.norm);
- i2c_control_device(&zr->i2c, I2C_DRIVERID_VIDEOENCODER, ENCODER_SET_NORM, &zr->params.norm);
+ j = zr->params.norm;
+ i2c_control_device(&zr->i2c, I2C_DRIVERID_VIDEODECODER, DECODER_SET_NORM, &j);
+ i2c_control_device(&zr->i2c, I2C_DRIVERID_VIDEOENCODER, ENCODER_SET_NORM, &j);
/* set individual interrupt enables (without GIRQ0)
but don't global enable until zoran_open() */
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)