From b5f5fe52acd6950d39ed7bade847af37031ae213 Mon Sep 17 00:00:00 2001 From: Hans Verkuil Date: Sat, 3 Feb 2007 00:49:54 +0100 Subject: Fix cx2584x revision reporting. From: Hans Verkuil Revisions >= 23 were always reported as revision 23. Signed-off-by: Hans Verkuil --- linux/drivers/media/video/cx25840/cx25840-core.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'linux/drivers') diff --git a/linux/drivers/media/video/cx25840/cx25840-core.c b/linux/drivers/media/video/cx25840/cx25840-core.c index b06553a1f..a1a4907af 100644 --- a/linux/drivers/media/video/cx25840/cx25840-core.c +++ b/linux/drivers/media/video/cx25840/cx25840-core.c @@ -908,9 +908,11 @@ static int cx25840_detect_client(struct i2c_adapter *adapter, int address, return 0; } + /* Note: revision '(device_id & 0x0f) == 2' was never built. The + marking skips from 0x1 == 22 to 0x3 == 23. */ v4l_info(client, "cx25%3x-2%x found @ 0x%x (%s)\n", (device_id & 0xfff0) >> 4, - (device_id & 0x0f) < 3 ? (device_id & 0x0f) + 1 : 3, + (device_id & 0x0f) < 3 ? (device_id & 0x0f) + 1 : (device_id & 0x0f), address << 1, adapter->name); i2c_set_clientdata(client, state); -- cgit v1.2.3 From 1bc102264989e1835b7cb712a20692c8b22d3abd Mon Sep 17 00:00:00 2001 From: Hans Verkuil Date: Sat, 3 Feb 2007 10:35:07 +0100 Subject: Fix CC handling in VIDIOC_INT_G_VBI_DATA From: Hans Verkuil When capturing a 60 Hz input the internal field ID is inverted. The VIDIOC_INT_G_VBI_DATA didn't take that into account and so returned XDS instead of CC and vice versa. Signed-off-by: Hans Verkuil --- linux/drivers/media/video/saa7115.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'linux/drivers') diff --git a/linux/drivers/media/video/saa7115.c b/linux/drivers/media/video/saa7115.c index 71e1cab45..6163a68e3 100644 --- a/linux/drivers/media/video/saa7115.c +++ b/linux/drivers/media/video/saa7115.c @@ -1399,6 +1399,9 @@ static int saa711x_command(struct i2c_client *client, unsigned int cmd, void *ar { struct v4l2_sliced_vbi_data *data = arg; + /* Note: the internal field ID is inverted for NTSC, + so data->field 0 maps to the saa7115 even field, + whereas for PAL it maps to the saa7115 odd field. */ switch (data->id) { case V4L2_SLICED_WSS_625: if (saa711x_read(client, 0x6b) & 0xc0) @@ -1409,17 +1412,17 @@ static int saa711x_command(struct i2c_client *client, unsigned int cmd, void *ar case V4L2_SLICED_CAPTION_525: if (data->field == 0) { /* CC */ - if (saa711x_read(client, 0x66) & 0xc0) + if (saa711x_read(client, 0x66) & 0x30) return -EIO; - data->data[0] = saa711x_read(client, 0x67); - data->data[1] = saa711x_read(client, 0x68); + data->data[0] = saa711x_read(client, 0x69); + data->data[1] = saa711x_read(client, 0x6a); return 0; } /* XDS */ - if (saa711x_read(client, 0x66) & 0x30) + if (saa711x_read(client, 0x66) & 0xc0) return -EIO; - data->data[0] = saa711x_read(client, 0x69); - data->data[1] = saa711x_read(client, 0x6a); + data->data[0] = saa711x_read(client, 0x67); + data->data[1] = saa711x_read(client, 0x68); return 0; default: return -EINVAL; -- cgit v1.2.3 From cfdafbfa99ae8858be9853b49f8140d159c85d57 Mon Sep 17 00:00:00 2001 From: Hans Verkuil Date: Mon, 5 Feb 2007 20:56:22 +0100 Subject: cx25840 request_firmware failed due to wrong device. From: Hans Verkuil Due to changes in the /sys directory structure a bug in the cx25840 firmware load surfaced in 2.6.20: the device passed to request_firmware was wrong: instead of the i2c device the i2c adapter was passed. Because of this an attemp was made to create a kobject with the adapter name inside the adapter directory, but a kobject with that name already exists. Now pass the i2c device itself so that the correct /sys directory is used. This way the firmware can be loaded again. Signed-off-by: Hans Verkuil --- linux/drivers/media/video/cx25840/cx25840-firmware.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'linux/drivers') diff --git a/linux/drivers/media/video/cx25840/cx25840-firmware.c b/linux/drivers/media/video/cx25840/cx25840-firmware.c index e14e0bc1f..1b730b155 100644 --- a/linux/drivers/media/video/cx25840/cx25840-firmware.c +++ b/linux/drivers/media/video/cx25840/cx25840-firmware.c @@ -39,7 +39,7 @@ #define FWSEND 48 #if LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0) -#define FWDEV(x) &((x)->adapter->dev) +#define FWDEV(x) &((x)->dev) #else #define FWDEV(x) (x)->name #endif -- cgit v1.2.3 From a3318fa68e690e504facbbb034973611802f26c6 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Tue, 6 Feb 2007 21:29:07 -0200 Subject: Avoid race when deregistering the IR control for dvb-usb From: Chris Rankin The work item function is dvb_usb_read_remote_control(): INIT_WORK(&d->rc_query_work, dvb_usb_read_remote_control, d); and the last piece of work it does is: schedule_delayed_work(&d->rc_query_work,msecs_to_jiffies(d->props.rc_interval)); Hence you need to call "cancel_rearming_delayed_work()" and not "cancel_delayed_work()", correct? I certainly haven't seen this oops reoccur since I applied this patch. Signed-off-by: Andrew Morton Signed-off-by: Mauro Carvalho Chehab --- linux/drivers/media/dvb/dvb-usb/dvb-usb-remote.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'linux/drivers') diff --git a/linux/drivers/media/dvb/dvb-usb/dvb-usb-remote.c b/linux/drivers/media/dvb/dvb-usb/dvb-usb-remote.c index 1bee5dfad..7b899cd6b 100644 --- a/linux/drivers/media/dvb/dvb-usb/dvb-usb-remote.c +++ b/linux/drivers/media/dvb/dvb-usb/dvb-usb-remote.c @@ -174,7 +174,7 @@ int dvb_usb_remote_init(struct dvb_usb_device *d) int dvb_usb_remote_exit(struct dvb_usb_device *d) { if (d->state & DVB_USB_STATE_REMOTE) { - cancel_delayed_work(&d->rc_query_work); + cancel_rearming_delayed_work(&d->rc_query_work); flush_scheduled_work(); input_unregister_device(d->rc_input_dev); } -- cgit v1.2.3