[git:v4l-dvb/v2.6.37] V4L/DVB: saa7146/tuner: remove mxb hack
This is an automatic generated email to let you know that the following patch were queued at the http://git.linuxtv.org/media-tree.git tree: Subject: V4L/DVB: saa7146/tuner: remove mxb hack Author: Hans Verkuil hverk...@xs4all.nl Date:Wed Sep 15 16:14:57 2010 -0300 Remove a hack in the tuner code for the mxb board. This hack is no longer needed since the tuner is now probed on its correct address as specified by the mxb driver. Signed-off-by: Hans Verkuil hverk...@xs4all.nl Signed-off-by: Mauro Carvalho Chehab mche...@redhat.com drivers/media/common/saa7146_i2c.c |1 - drivers/media/video/tuner-core.c |6 -- 2 files changed, 0 insertions(+), 7 deletions(-) --- http://git.linuxtv.org/media-tree.git?a=commitdiff;h=42e4c5fdc6a58bae597fec1e800233294b607e8a diff --git a/drivers/media/common/saa7146_i2c.c b/drivers/media/common/saa7146_i2c.c index 48cb154..3d88542 100644 --- a/drivers/media/common/saa7146_i2c.c +++ b/drivers/media/common/saa7146_i2c.c @@ -414,7 +414,6 @@ int saa7146_i2c_adapter_prepare(struct saa7146_dev *dev, struct i2c_adapter *i2c i2c_adapter-dev.parent= dev-pci-dev; i2c_adapter-algo = saa7146_algo; i2c_adapter-algo_data = NULL; - i2c_adapter-id= I2C_HW_SAA7146; i2c_adapter-timeout = SAA7146_I2C_TIMEOUT; i2c_adapter-retries = SAA7146_I2C_RETRIES; } diff --git a/drivers/media/video/tuner-core.c b/drivers/media/video/tuner-core.c index a3bb9e9..e321466 100644 --- a/drivers/media/video/tuner-core.c +++ b/drivers/media/video/tuner-core.c @@ -1052,12 +1052,6 @@ static int tuner_probe(struct i2c_client *client, printk(KERN_CONT %02x , buffer[i]); printk(\n); } - /* HACK: This test was added to avoid tuner to probe tda9840 and - tea6415c on the MXB card */ - if (client-adapter-id == I2C_HW_SAA7146 client-addr 0x4a) { - kfree(t); - return -ENODEV; - } /* autodetection code based on the i2c addr */ if (!no_autodetect) { ___ linuxtv-commits mailing list linuxtv-commits@linuxtv.org http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits
[git:v4l-dvb/v2.6.37] V4L/DVB: s2250: remove obsolete v4l2-i2c-drv.h header
This is an automatic generated email to let you know that the following patch were queued at the http://git.linuxtv.org/media-tree.git tree: Subject: V4L/DVB: s2250: remove obsolete v4l2-i2c-drv.h header Author: Hans Verkuil hverk...@xs4all.nl Date:Wed Sep 15 15:53:43 2010 -0300 Signed-off-by: Hans Verkuil hverk...@xs4all.nl Signed-off-by: Mauro Carvalho Chehab mche...@redhat.com drivers/staging/go7007/s2250-board.c | 27 +-- 1 files changed, 21 insertions(+), 6 deletions(-) --- http://git.linuxtv.org/media-tree.git?a=commitdiff;h=41c205204d8c77dc4001a4af0aff2474207cadad diff --git a/drivers/staging/go7007/s2250-board.c b/drivers/staging/go7007/s2250-board.c index db8ac51..e7736a9 100644 --- a/drivers/staging/go7007/s2250-board.c +++ b/drivers/staging/go7007/s2250-board.c @@ -23,7 +23,6 @@ #include linux/slab.h #include media/v4l2-device.h #include media/v4l2-common.h -#include media/v4l2-i2c-drv.h #include media/v4l2-subdev.h #include go7007-priv.h @@ -675,9 +674,25 @@ static const struct i2c_device_id s2250_id[] = { }; MODULE_DEVICE_TABLE(i2c, s2250_id); -static struct v4l2_i2c_driver_data v4l2_i2c_data = { - .name = s2250, - .probe = s2250_probe, - .remove = s2250_remove, - .id_table = s2250_id, +static struct i2c_driver s2250_driver = { + .driver = { + .owner = THIS_MODULE, + .name = s2250, + }, + .probe = s2250_probe, + .remove = s2250_remove, + .id_table = s2250_id, }; + +static __init int init_s2250(void) +{ + return i2c_add_driver(s2250_driver); +} + +static __exit void exit_s2250(void) +{ + i2c_del_driver(s2250_driver); +} + +module_init(init_s2250); +module_exit(exit_s2250); ___ linuxtv-commits mailing list linuxtv-commits@linuxtv.org http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits
[git:v4l-dvb/v2.6.37] V4L/DVB: cs53l32a: remove obsolete v4l2-i2c-drv.h header
This is an automatic generated email to let you know that the following patch were queued at the http://git.linuxtv.org/media-tree.git tree: Subject: V4L/DVB: cs53l32a: remove obsolete v4l2-i2c-drv.h header Author: Hans Verkuil hverk...@xs4all.nl Date:Wed Sep 15 15:42:38 2010 -0300 Signed-off-by: Hans Verkuil hverk...@xs4all.nl Signed-off-by: Mauro Carvalho Chehab mche...@redhat.com drivers/media/video/cs53l32a.c | 27 +-- 1 files changed, 21 insertions(+), 6 deletions(-) --- http://git.linuxtv.org/media-tree.git?a=commitdiff;h=2f7f4a06cf462a5b795d18d83369fa4741c06ec6 diff --git a/drivers/media/video/cs53l32a.c b/drivers/media/video/cs53l32a.c index cc9e84d..d93e5ab 100644 --- a/drivers/media/video/cs53l32a.c +++ b/drivers/media/video/cs53l32a.c @@ -30,7 +30,6 @@ #include media/v4l2-device.h #include media/v4l2-chip-ident.h #include media/v4l2-ctrls.h -#include media/v4l2-i2c-drv.h MODULE_DESCRIPTION(i2c device driver for cs53l32a Audio ADC); MODULE_AUTHOR(Martin Vaughan); @@ -239,9 +238,25 @@ static const struct i2c_device_id cs53l32a_id[] = { }; MODULE_DEVICE_TABLE(i2c, cs53l32a_id); -static struct v4l2_i2c_driver_data v4l2_i2c_data = { - .name = cs53l32a, - .remove = cs53l32a_remove, - .probe = cs53l32a_probe, - .id_table = cs53l32a_id, +static struct i2c_driver cs53l32a_driver = { + .driver = { + .owner = THIS_MODULE, + .name = cs53l32a, + }, + .probe = cs53l32a_probe, + .remove = cs53l32a_remove, + .id_table = cs53l32a_id, }; + +static __init int init_cs53l32a(void) +{ + return i2c_add_driver(cs53l32a_driver); +} + +static __exit void exit_cs53l32a(void) +{ + i2c_del_driver(cs53l32a_driver); +} + +module_init(init_cs53l32a); +module_exit(exit_cs53l32a); ___ linuxtv-commits mailing list linuxtv-commits@linuxtv.org http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits
[git:v4l-dvb/v2.6.37] V4L/DVB: adv7170: remove obsolete v4l2-i2c-drv.h header
This is an automatic generated email to let you know that the following patch were queued at the http://git.linuxtv.org/media-tree.git tree: Subject: V4L/DVB: adv7170: remove obsolete v4l2-i2c-drv.h header Author: Hans Verkuil hverk...@xs4all.nl Date:Wed Sep 15 15:49:56 2010 -0300 Signed-off-by: Hans Verkuil hverk...@xs4all.nl Signed-off-by: Mauro Carvalho Chehab mche...@redhat.com drivers/media/video/adv7170.c | 28 +--- 1 files changed, 21 insertions(+), 7 deletions(-) --- http://git.linuxtv.org/media-tree.git?a=commitdiff;h=1e7620b77062b271afd68bbbf476e94bf1524f20 diff --git a/drivers/media/video/adv7170.c b/drivers/media/video/adv7170.c index 48e89fb..23ba5c3 100644 --- a/drivers/media/video/adv7170.c +++ b/drivers/media/video/adv7170.c @@ -34,11 +34,9 @@ #include linux/ioctl.h #include asm/uaccess.h #include linux/i2c.h -#include linux/i2c-id.h #include linux/videodev2.h #include media/v4l2-device.h #include media/v4l2-chip-ident.h -#include media/v4l2-i2c-drv.h MODULE_DESCRIPTION(Analog Devices ADV7170 video encoder driver); MODULE_AUTHOR(Maxim Yevtyushkin); @@ -337,9 +335,25 @@ static const struct i2c_device_id adv7170_id[] = { }; MODULE_DEVICE_TABLE(i2c, adv7170_id); -static struct v4l2_i2c_driver_data v4l2_i2c_data = { - .name = adv7170, - .probe = adv7170_probe, - .remove = adv7170_remove, - .id_table = adv7170_id, +static struct i2c_driver adv7170_driver = { + .driver = { + .owner = THIS_MODULE, + .name = adv7170, + }, + .probe = adv7170_probe, + .remove = adv7170_remove, + .id_table = adv7170_id, }; + +static __init int init_adv7170(void) +{ + return i2c_add_driver(adv7170_driver); +} + +static __exit void exit_adv7170(void) +{ + i2c_del_driver(adv7170_driver); +} + +module_init(init_adv7170); +module_exit(exit_adv7170); ___ linuxtv-commits mailing list linuxtv-commits@linuxtv.org http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits
[git:v4l-dvb/v2.6.37] V4L/DVB: tda9875: remove obsolete v4l2-i2c-drv.h header
This is an automatic generated email to let you know that the following patch were queued at the http://git.linuxtv.org/media-tree.git tree: Subject: V4L/DVB: tda9875: remove obsolete v4l2-i2c-drv.h header Author: Hans Verkuil hverk...@xs4all.nl Date:Wed Sep 15 15:37:46 2010 -0300 Signed-off-by: Hans Verkuil hverk...@xs4all.nl Signed-off-by: Mauro Carvalho Chehab mche...@redhat.com drivers/media/video/tda9875.c | 27 +-- 1 files changed, 21 insertions(+), 6 deletions(-) --- http://git.linuxtv.org/media-tree.git?a=commitdiff;h=f433857c106819127d7e811dcb95c80383b6c6e8 diff --git a/drivers/media/video/tda9875.c b/drivers/media/video/tda9875.c index 24e2b7d..35b6ff5 100644 --- a/drivers/media/video/tda9875.c +++ b/drivers/media/video/tda9875.c @@ -28,7 +28,6 @@ #include linux/i2c.h #include linux/videodev2.h #include media/v4l2-device.h -#include media/v4l2-i2c-drv.h #include media/i2c-addr.h static int debug; /* insmod parameter */ @@ -388,9 +387,25 @@ static const struct i2c_device_id tda9875_id[] = { }; MODULE_DEVICE_TABLE(i2c, tda9875_id); -static struct v4l2_i2c_driver_data v4l2_i2c_data = { - .name = tda9875, - .probe = tda9875_probe, - .remove = tda9875_remove, - .id_table = tda9875_id, +static struct i2c_driver tda9875_driver = { + .driver = { + .owner = THIS_MODULE, + .name = tda9875, + }, + .probe = tda9875_probe, + .remove = tda9875_remove, + .id_table = tda9875_id, }; + +static __init int init_tda9875(void) +{ + return i2c_add_driver(tda9875_driver); +} + +static __exit void exit_tda9875(void) +{ + i2c_del_driver(tda9875_driver); +} + +module_init(init_tda9875); +module_exit(exit_tda9875); ___ linuxtv-commits mailing list linuxtv-commits@linuxtv.org http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits
[git:v4l-dvb/v2.6.37] V4L/DVB: bt866: remove obsolete v4l2-i2c-drv.h header
This is an automatic generated email to let you know that the following patch were queued at the http://git.linuxtv.org/media-tree.git tree: Subject: V4L/DVB: bt866: remove obsolete v4l2-i2c-drv.h header Author: Hans Verkuil hverk...@xs4all.nl Date:Wed Sep 15 15:24:03 2010 -0300 Signed-off-by: Hans Verkuil hverk...@xs4all.nl Signed-off-by: Mauro Carvalho Chehab mche...@redhat.com drivers/media/video/bt866.c | 28 +--- 1 files changed, 21 insertions(+), 7 deletions(-) --- http://git.linuxtv.org/media-tree.git?a=commitdiff;h=5b3d202df4d5d2eb8338996dd624e69ab4a6911d diff --git a/drivers/media/video/bt866.c b/drivers/media/video/bt866.c index 62ac422..4e5dcea 100644 --- a/drivers/media/video/bt866.c +++ b/drivers/media/video/bt866.c @@ -34,11 +34,9 @@ #include linux/ioctl.h #include asm/uaccess.h #include linux/i2c.h -#include linux/i2c-id.h #include linux/videodev2.h #include media/v4l2-device.h #include media/v4l2-chip-ident.h -#include media/v4l2-i2c-drv.h MODULE_DESCRIPTION(Brooktree-866 video encoder driver); MODULE_AUTHOR(Mike Bernson Dave Perks); @@ -232,9 +230,25 @@ static const struct i2c_device_id bt866_id[] = { }; MODULE_DEVICE_TABLE(i2c, bt866_id); -static struct v4l2_i2c_driver_data v4l2_i2c_data = { - .name = bt866, - .probe = bt866_probe, - .remove = bt866_remove, - .id_table = bt866_id, +static struct i2c_driver bt866_driver = { + .driver = { + .owner = THIS_MODULE, + .name = bt866, + }, + .probe = bt866_probe, + .remove = bt866_remove, + .id_table = bt866_id, }; + +static __init int init_bt866(void) +{ + return i2c_add_driver(bt866_driver); +} + +static __exit void exit_bt866(void) +{ + i2c_del_driver(bt866_driver); +} + +module_init(init_bt866); +module_exit(exit_bt866); ___ linuxtv-commits mailing list linuxtv-commits@linuxtv.org http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits
[git:v4l-dvb/v2.6.37] V4L/DVB: saa7191: remove obsolete v4l2-i2c-drv.h header
This is an automatic generated email to let you know that the following patch were queued at the http://git.linuxtv.org/media-tree.git tree: Subject: V4L/DVB: saa7191: remove obsolete v4l2-i2c-drv.h header Author: Hans Verkuil hverk...@xs4all.nl Date:Wed Sep 15 15:31:11 2010 -0300 Signed-off-by: Hans Verkuil hverk...@xs4all.nl Signed-off-by: Mauro Carvalho Chehab mche...@redhat.com drivers/media/video/saa7191.c | 27 +-- 1 files changed, 21 insertions(+), 6 deletions(-) --- http://git.linuxtv.org/media-tree.git?a=commitdiff;h=632ac5a982b3a7e0f61051e5cd16f6fad9b43117 diff --git a/drivers/media/video/saa7191.c b/drivers/media/video/saa7191.c index a251377..211fa25 100644 --- a/drivers/media/video/saa7191.c +++ b/drivers/media/video/saa7191.c @@ -23,7 +23,6 @@ #include linux/i2c.h #include media/v4l2-device.h #include media/v4l2-chip-ident.h -#include media/v4l2-i2c-drv.h #include saa7191.h @@ -647,9 +646,25 @@ static const struct i2c_device_id saa7191_id[] = { }; MODULE_DEVICE_TABLE(i2c, saa7191_id); -static struct v4l2_i2c_driver_data v4l2_i2c_data = { - .name = saa7191, - .probe = saa7191_probe, - .remove = saa7191_remove, - .id_table = saa7191_id, +static struct i2c_driver saa7191_driver = { + .driver = { + .owner = THIS_MODULE, + .name = saa7191, + }, + .probe = saa7191_probe, + .remove = saa7191_remove, + .id_table = saa7191_id, }; + +static __init int init_saa7191(void) +{ + return i2c_add_driver(saa7191_driver); +} + +static __exit void exit_saa7191(void) +{ + i2c_del_driver(saa7191_driver); +} + +module_init(init_saa7191); +module_exit(exit_saa7191); ___ linuxtv-commits mailing list linuxtv-commits@linuxtv.org http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits
[git:v4l-dvb/v2.6.37] V4L/DVB: ks0127: remove obsolete v4l2_i2c_drv.h header
This is an automatic generated email to let you know that the following patch were queued at the http://git.linuxtv.org/media-tree.git tree: Subject: V4L/DVB: ks0127: remove obsolete v4l2_i2c_drv.h header Author: Hans Verkuil hverk...@xs4all.nl Date:Wed Sep 15 15:51:04 2010 -0300 Signed-off-by: Hans Verkuil hverk...@xs4all.nl Signed-off-by: Mauro Carvalho Chehab mche...@redhat.com drivers/media/video/ks0127.c | 27 +-- 1 files changed, 21 insertions(+), 6 deletions(-) --- http://git.linuxtv.org/media-tree.git?a=commitdiff;h=99b3a8732f9c5be7376a0f792dcbae670ea434b9 diff --git a/drivers/media/video/ks0127.c b/drivers/media/video/ks0127.c index 9473482..afa9118 100644 --- a/drivers/media/video/ks0127.c +++ b/drivers/media/video/ks0127.c @@ -43,7 +43,6 @@ #include linux/slab.h #include media/v4l2-device.h #include media/v4l2-chip-ident.h -#include media/v4l2-i2c-drv.h #include ks0127.h MODULE_DESCRIPTION(KS0127 video decoder driver); @@ -712,9 +711,25 @@ static const struct i2c_device_id ks0127_id[] = { }; MODULE_DEVICE_TABLE(i2c, ks0127_id); -static struct v4l2_i2c_driver_data v4l2_i2c_data = { - .name = ks0127, - .probe = ks0127_probe, - .remove = ks0127_remove, - .id_table = ks0127_id, +static struct i2c_driver ks0127_driver = { + .driver = { + .owner = THIS_MODULE, + .name = ks0127, + }, + .probe = ks0127_probe, + .remove = ks0127_remove, + .id_table = ks0127_id, }; + +static __init int init_ks0127(void) +{ + return i2c_add_driver(ks0127_driver); +} + +static __exit void exit_ks0127(void) +{ + i2c_del_driver(ks0127_driver); +} + +module_init(init_ks0127); +module_exit(exit_ks0127); ___ linuxtv-commits mailing list linuxtv-commits@linuxtv.org http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits
[git:v4l-dvb/v2.6.37] V4L/DVB: bt856: remove obsolete v4l2-i2c-drv.h header
This is an automatic generated email to let you know that the following patch were queued at the http://git.linuxtv.org/media-tree.git tree: Subject: V4L/DVB: bt856: remove obsolete v4l2-i2c-drv.h header Author: Hans Verkuil hverk...@xs4all.nl Date:Wed Sep 15 15:32:24 2010 -0300 Signed-off-by: Hans Verkuil hverk...@xs4all.nl Signed-off-by: Mauro Carvalho Chehab mche...@redhat.com drivers/media/video/bt856.c | 28 +--- 1 files changed, 21 insertions(+), 7 deletions(-) --- http://git.linuxtv.org/media-tree.git?a=commitdiff;h=91c23afc8b7da2b597e5cd5a0231cb74fc2ef097 diff --git a/drivers/media/video/bt856.c b/drivers/media/video/bt856.c index ae33373..a43059d 100644 --- a/drivers/media/video/bt856.c +++ b/drivers/media/video/bt856.c @@ -34,11 +34,9 @@ #include linux/ioctl.h #include asm/uaccess.h #include linux/i2c.h -#include linux/i2c-id.h #include linux/videodev2.h #include media/v4l2-device.h #include media/v4l2-chip-ident.h -#include media/v4l2-i2c-drv.h MODULE_DESCRIPTION(Brooktree-856A video encoder driver); MODULE_AUTHOR(Mike Bernson Dave Perks); @@ -262,9 +260,25 @@ static const struct i2c_device_id bt856_id[] = { }; MODULE_DEVICE_TABLE(i2c, bt856_id); -static struct v4l2_i2c_driver_data v4l2_i2c_data = { - .name = bt856, - .probe = bt856_probe, - .remove = bt856_remove, - .id_table = bt856_id, +static struct i2c_driver bt856_driver = { + .driver = { + .owner = THIS_MODULE, + .name = bt856, + }, + .probe = bt856_probe, + .remove = bt856_remove, + .id_table = bt856_id, }; + +static __init int init_bt856(void) +{ + return i2c_add_driver(bt856_driver); +} + +static __exit void exit_bt856(void) +{ + i2c_del_driver(bt856_driver); +} + +module_init(init_bt856); +module_exit(exit_bt856); ___ linuxtv-commits mailing list linuxtv-commits@linuxtv.org http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits
[git:v4l-dvb/v2.6.37] V4L/DVB: au8522_decoder: remove obsolete v4l2-i2c-drv.h header
This is an automatic generated email to let you know that the following patch were queued at the http://git.linuxtv.org/media-tree.git tree: Subject: V4L/DVB: au8522_decoder: remove obsolete v4l2-i2c-drv.h header Author: Hans Verkuil hverk...@xs4all.nl Date:Wed Sep 15 15:52:25 2010 -0300 Signed-off-by: Hans Verkuil hverk...@xs4all.nl Signed-off-by: Mauro Carvalho Chehab mche...@redhat.com drivers/media/dvb/frontends/au8522_decoder.c | 27 - 1 files changed, 21 insertions(+), 6 deletions(-) --- http://git.linuxtv.org/media-tree.git?a=commitdiff;h=8d6d0a1064816df0377427c110ba2cecbdfc1ff1 diff --git a/drivers/media/dvb/frontends/au8522_decoder.c b/drivers/media/dvb/frontends/au8522_decoder.c index 29cdbfe..6d9c594 100644 --- a/drivers/media/dvb/frontends/au8522_decoder.c +++ b/drivers/media/dvb/frontends/au8522_decoder.c @@ -36,7 +36,6 @@ #include linux/delay.h #include media/v4l2-common.h #include media/v4l2-chip-ident.h -#include media/v4l2-i2c-drv.h #include media/v4l2-device.h #include au8522.h #include au8522_priv.h @@ -831,9 +830,25 @@ static const struct i2c_device_id au8522_id[] = { MODULE_DEVICE_TABLE(i2c, au8522_id); -static struct v4l2_i2c_driver_data v4l2_i2c_data = { - .name = au8522, - .probe = au8522_probe, - .remove = au8522_remove, - .id_table = au8522_id, +static struct i2c_driver au8522_driver = { + .driver = { + .owner = THIS_MODULE, + .name = au8522, + }, + .probe = au8522_probe, + .remove = au8522_remove, + .id_table = au8522_id, }; + +static __init int init_au8522(void) +{ + return i2c_add_driver(au8522_driver); +} + +static __exit void exit_au8522(void) +{ + i2c_del_driver(au8522_driver); +} + +module_init(init_au8522); +module_exit(exit_au8522); ___ linuxtv-commits mailing list linuxtv-commits@linuxtv.org http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits
[git:v4l-dvb/v2.6.37] V4L/DVB: tea6415c: remove obsolete v4l2-i2c-drv.h header
This is an automatic generated email to let you know that the following patch were queued at the http://git.linuxtv.org/media-tree.git tree: Subject: V4L/DVB: tea6415c: remove obsolete v4l2-i2c-drv.h header Author: Hans Verkuil hverk...@xs4all.nl Date:Wed Sep 15 15:25:23 2010 -0300 Signed-off-by: Hans Verkuil hverk...@xs4all.nl Signed-off-by: Mauro Carvalho Chehab mche...@redhat.com drivers/media/video/tea6415c.c | 27 +-- 1 files changed, 21 insertions(+), 6 deletions(-) --- http://git.linuxtv.org/media-tree.git?a=commitdiff;h=81fb1d386bb6dd2f2400e92cfe4f96ffc290b82e diff --git a/drivers/media/video/tea6415c.c b/drivers/media/video/tea6415c.c index 3021a1e..3e99cea 100644 --- a/drivers/media/video/tea6415c.c +++ b/drivers/media/video/tea6415c.c @@ -34,7 +34,6 @@ #include linux/i2c.h #include media/v4l2-device.h #include media/v4l2-chip-ident.h -#include media/v4l2-i2c-drv.h #include tea6415c.h MODULE_AUTHOR(Michael Hunold mich...@mihu.de); @@ -175,9 +174,25 @@ static const struct i2c_device_id tea6415c_id[] = { }; MODULE_DEVICE_TABLE(i2c, tea6415c_id); -static struct v4l2_i2c_driver_data v4l2_i2c_data = { - .name = tea6415c, - .probe = tea6415c_probe, - .remove = tea6415c_remove, - .id_table = tea6415c_id, +static struct i2c_driver tea6415c_driver = { + .driver = { + .owner = THIS_MODULE, + .name = tea6415c, + }, + .probe = tea6415c_probe, + .remove = tea6415c_remove, + .id_table = tea6415c_id, }; + +static __init int init_tea6415c(void) +{ + return i2c_add_driver(tea6415c_driver); +} + +static __exit void exit_tea6415c(void) +{ + i2c_del_driver(tea6415c_driver); +} + +module_init(init_tea6415c); +module_exit(exit_tea6415c); ___ linuxtv-commits mailing list linuxtv-commits@linuxtv.org http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits
[git:v4l-dvb/v2.6.37] V4L/DVB: saa7110: remove obsolete v4l2-i2c-drv.h header
This is an automatic generated email to let you know that the following patch were queued at the http://git.linuxtv.org/media-tree.git tree: Subject: V4L/DVB: saa7110: remove obsolete v4l2-i2c-drv.h header Author: Hans Verkuil hverk...@xs4all.nl Date:Wed Sep 15 15:38:54 2010 -0300 Signed-off-by: Hans Verkuil hverk...@xs4all.nl Signed-off-by: Mauro Carvalho Chehab mche...@redhat.com drivers/media/video/saa7110.c | 27 +-- 1 files changed, 21 insertions(+), 6 deletions(-) --- http://git.linuxtv.org/media-tree.git?a=commitdiff;h=cfc6935e667cc33bb7c3b432c18723550fc7dac4 diff --git a/drivers/media/video/saa7110.c b/drivers/media/video/saa7110.c index 3bca744..7913f93 100644 --- a/drivers/media/video/saa7110.c +++ b/drivers/media/video/saa7110.c @@ -36,7 +36,6 @@ #include linux/videodev2.h #include media/v4l2-device.h #include media/v4l2-chip-ident.h -#include media/v4l2-i2c-drv.h MODULE_DESCRIPTION(Philips SAA7110 video decoder driver); MODULE_AUTHOR(Pauline Middelink); @@ -505,9 +504,25 @@ static const struct i2c_device_id saa7110_id[] = { }; MODULE_DEVICE_TABLE(i2c, saa7110_id); -static struct v4l2_i2c_driver_data v4l2_i2c_data = { - .name = saa7110, - .probe = saa7110_probe, - .remove = saa7110_remove, - .id_table = saa7110_id, +static struct i2c_driver saa7110_driver = { + .driver = { + .owner = THIS_MODULE, + .name = saa7110, + }, + .probe = saa7110_probe, + .remove = saa7110_remove, + .id_table = saa7110_id, }; + +static __init int init_saa7110(void) +{ + return i2c_add_driver(saa7110_driver); +} + +static __exit void exit_saa7110(void) +{ + i2c_del_driver(saa7110_driver); +} + +module_init(init_saa7110); +module_exit(exit_saa7110); ___ linuxtv-commits mailing list linuxtv-commits@linuxtv.org http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits
[git:v4l-dvb/v2.6.37] V4L/DVB: adv7175: remove obsolete v4l2-i2c-drv.h header
This is an automatic generated email to let you know that the following patch were queued at the http://git.linuxtv.org/media-tree.git tree: Subject: V4L/DVB: adv7175: remove obsolete v4l2-i2c-drv.h header Author: Hans Verkuil hverk...@xs4all.nl Date:Wed Sep 15 15:29:53 2010 -0300 Signed-off-by: Hans Verkuil hverk...@xs4all.nl Signed-off-by: Mauro Carvalho Chehab mche...@redhat.com drivers/media/video/adv7175.c | 28 +--- 1 files changed, 21 insertions(+), 7 deletions(-) --- http://git.linuxtv.org/media-tree.git?a=commitdiff;h=f2e7f0219f5b94e009ac86c2791ef8a4f8b03615 diff --git a/drivers/media/video/adv7175.c b/drivers/media/video/adv7175.c index f1ba0d7..f318b51 100644 --- a/drivers/media/video/adv7175.c +++ b/drivers/media/video/adv7175.c @@ -30,11 +30,9 @@ #include linux/ioctl.h #include asm/uaccess.h #include linux/i2c.h -#include linux/i2c-id.h #include linux/videodev2.h #include media/v4l2-device.h #include media/v4l2-chip-ident.h -#include media/v4l2-i2c-drv.h MODULE_DESCRIPTION(Analog Devices ADV7175 video encoder driver); MODULE_AUTHOR(Dave Perks); @@ -376,9 +374,25 @@ static const struct i2c_device_id adv7175_id[] = { }; MODULE_DEVICE_TABLE(i2c, adv7175_id); -static struct v4l2_i2c_driver_data v4l2_i2c_data = { - .name = adv7175, - .probe = adv7175_probe, - .remove = adv7175_remove, - .id_table = adv7175_id, +static struct i2c_driver adv7175_driver = { + .driver = { + .owner = THIS_MODULE, + .name = adv7175, + }, + .probe = adv7175_probe, + .remove = adv7175_remove, + .id_table = adv7175_id, }; + +static __init int init_adv7175(void) +{ + return i2c_add_driver(adv7175_driver); +} + +static __exit void exit_adv7175(void) +{ + i2c_del_driver(adv7175_driver); +} + +module_init(init_adv7175); +module_exit(exit_adv7175); ___ linuxtv-commits mailing list linuxtv-commits@linuxtv.org http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits
[git:v4l-dvb/v2.6.37] V4L/DVB: wm8739: remove obsolete v4l2-i2c-drv.h header
This is an automatic generated email to let you know that the following patch were queued at the http://git.linuxtv.org/media-tree.git tree: Subject: V4L/DVB: wm8739: remove obsolete v4l2-i2c-drv.h header Author: Hans Verkuil hverk...@xs4all.nl Date:Wed Sep 15 14:58:16 2010 -0300 Signed-off-by: Hans Verkuil hverk...@xs4all.nl Signed-off-by: Mauro Carvalho Chehab mche...@redhat.com drivers/media/video/wm8739.c | 27 +-- 1 files changed, 21 insertions(+), 6 deletions(-) --- http://git.linuxtv.org/media-tree.git?a=commitdiff;h=b625eddbe0661c41e6f35dd4b4cdeb6a6cff72d4 diff --git a/drivers/media/video/wm8739.c b/drivers/media/video/wm8739.c index d596554..a22f765 100644 --- a/drivers/media/video/wm8739.c +++ b/drivers/media/video/wm8739.c @@ -30,7 +30,6 @@ #include linux/videodev2.h #include media/v4l2-device.h #include media/v4l2-chip-ident.h -#include media/v4l2-i2c-drv.h #include media/v4l2-ctrls.h MODULE_DESCRIPTION(wm8739 driver); @@ -282,9 +281,25 @@ static const struct i2c_device_id wm8739_id[] = { }; MODULE_DEVICE_TABLE(i2c, wm8739_id); -static struct v4l2_i2c_driver_data v4l2_i2c_data = { - .name = wm8739, - .probe = wm8739_probe, - .remove = wm8739_remove, - .id_table = wm8739_id, +static struct i2c_driver wm8739_driver = { + .driver = { + .owner = THIS_MODULE, + .name = wm8739, + }, + .probe = wm8739_probe, + .remove = wm8739_remove, + .id_table = wm8739_id, }; + +static __init int init_wm8739(void) +{ + return i2c_add_driver(wm8739_driver); +} + +static __exit void exit_wm8739(void) +{ + i2c_del_driver(wm8739_driver); +} + +module_init(init_wm8739); +module_exit(exit_wm8739); ___ linuxtv-commits mailing list linuxtv-commits@linuxtv.org http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits
[git:v4l-dvb/v2.6.37] V4L/DVB: bt819: remove obsolete v4l2-i2c-drv.h header
This is an automatic generated email to let you know that the following patch were queued at the http://git.linuxtv.org/media-tree.git tree: Subject: V4L/DVB: bt819: remove obsolete v4l2-i2c-drv.h header Author: Hans Verkuil hverk...@xs4all.nl Date:Wed Sep 15 15:15:55 2010 -0300 Signed-off-by: Hans Verkuil hverk...@xs4all.nl Signed-off-by: Mauro Carvalho Chehab mche...@redhat.com drivers/media/video/bt819.c | 28 +--- 1 files changed, 21 insertions(+), 7 deletions(-) --- http://git.linuxtv.org/media-tree.git?a=commitdiff;h=d631380a4638c1f1198910fb20e527c1853924e0 diff --git a/drivers/media/video/bt819.c b/drivers/media/video/bt819.c index 770cb9a..c38300f 100644 --- a/drivers/media/video/bt819.c +++ b/drivers/media/video/bt819.c @@ -33,12 +33,10 @@ #include linux/ioctl.h #include linux/delay.h #include linux/i2c.h -#include linux/i2c-id.h #include linux/videodev2.h #include linux/slab.h #include media/v4l2-device.h #include media/v4l2-chip-ident.h -#include media/v4l2-i2c-drv.h #include media/bt819.h MODULE_DESCRIPTION(Brooktree-819 video decoder driver); @@ -537,9 +535,25 @@ static const struct i2c_device_id bt819_id[] = { }; MODULE_DEVICE_TABLE(i2c, bt819_id); -static struct v4l2_i2c_driver_data v4l2_i2c_data = { - .name = bt819, - .probe = bt819_probe, - .remove = bt819_remove, - .id_table = bt819_id, +static struct i2c_driver bt819_driver = { + .driver = { + .owner = THIS_MODULE, + .name = bt819, + }, + .probe = bt819_probe, + .remove = bt819_remove, + .id_table = bt819_id, }; + +static __init int init_bt819(void) +{ + return i2c_add_driver(bt819_driver); +} + +static __exit void exit_bt819(void) +{ + i2c_del_driver(bt819_driver); +} + +module_init(init_bt819); +module_exit(exit_bt819); ___ linuxtv-commits mailing list linuxtv-commits@linuxtv.org http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits
[git:v4l-dvb/v2.6.37] V4L/DVB: ov7670: remove obsolete v4l2-i2c-drv.h header
This is an automatic generated email to let you know that the following patch were queued at the http://git.linuxtv.org/media-tree.git tree: Subject: V4L/DVB: ov7670: remove obsolete v4l2-i2c-drv.h header Author: Hans Verkuil hverk...@xs4all.nl Date:Wed Sep 15 15:08:09 2010 -0300 Signed-off-by: Hans Verkuil hverk...@xs4all.nl Signed-off-by: Mauro Carvalho Chehab mche...@redhat.com drivers/media/video/ov7670.c | 27 +-- 1 files changed, 21 insertions(+), 6 deletions(-) --- http://git.linuxtv.org/media-tree.git?a=commitdiff;h=46717bb4baff0922345c209ea9e5fd15faf53247 diff --git a/drivers/media/video/ov7670.c b/drivers/media/video/ov7670.c index c141d2e..089013e 100644 --- a/drivers/media/video/ov7670.c +++ b/drivers/media/video/ov7670.c @@ -19,7 +19,6 @@ #include media/v4l2-device.h #include media/v4l2-chip-ident.h #include media/v4l2-mediabus.h -#include media/v4l2-i2c-drv.h MODULE_AUTHOR(Jonathan Corbet cor...@lwn.net); @@ -1496,9 +1495,25 @@ static const struct i2c_device_id ov7670_id[] = { }; MODULE_DEVICE_TABLE(i2c, ov7670_id); -static struct v4l2_i2c_driver_data v4l2_i2c_data = { - .name = ov7670, - .probe = ov7670_probe, - .remove = ov7670_remove, - .id_table = ov7670_id, +static struct i2c_driver ov7670_driver = { + .driver = { + .owner = THIS_MODULE, + .name = ov7670, + }, + .probe = ov7670_probe, + .remove = ov7670_remove, + .id_table = ov7670_id, }; + +static __init int init_ov7670(void) +{ + return i2c_add_driver(ov7670_driver); +} + +static __exit void exit_ov7670(void) +{ + i2c_del_driver(ov7670_driver); +} + +module_init(init_ov7670); +module_exit(exit_ov7670); ___ linuxtv-commits mailing list linuxtv-commits@linuxtv.org http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits
[git:v4l-dvb/v2.6.37] V4L/DVB: mt9v011: remove obsolete v4l2-i2c-drv.h header
This is an automatic generated email to let you know that the following patch were queued at the http://git.linuxtv.org/media-tree.git tree: Subject: V4L/DVB: mt9v011: remove obsolete v4l2-i2c-drv.h header Author: Hans Verkuil hverk...@xs4all.nl Date:Wed Sep 15 15:09:38 2010 -0300 Signed-off-by: Hans Verkuil hverk...@xs4all.nl Signed-off-by: Mauro Carvalho Chehab mche...@redhat.com drivers/media/video/mt9v011.c | 29 ++--- 1 files changed, 22 insertions(+), 7 deletions(-) --- http://git.linuxtv.org/media-tree.git?a=commitdiff;h=d8f1105f03ec493fe45410acbbadace2a7e4f18a diff --git a/drivers/media/video/mt9v011.c b/drivers/media/video/mt9v011.c index f5e778d..209ff97 100644 --- a/drivers/media/video/mt9v011.c +++ b/drivers/media/video/mt9v011.c @@ -11,9 +11,8 @@ #include linux/delay.h #include asm/div64.h #include media/v4l2-device.h -#include mt9v011.h -#include media/v4l2-i2c-drv.h #include media/v4l2-chip-ident.h +#include mt9v011.h MODULE_DESCRIPTION(Micron mt9v011 sensor driver); MODULE_AUTHOR(Mauro Carvalho Chehab mche...@redhat.com); @@ -624,9 +623,25 @@ static const struct i2c_device_id mt9v011_id[] = { }; MODULE_DEVICE_TABLE(i2c, mt9v011_id); -static struct v4l2_i2c_driver_data v4l2_i2c_data = { - .name = mt9v011, - .probe = mt9v011_probe, - .remove = mt9v011_remove, - .id_table = mt9v011_id, +static struct i2c_driver mt9v011_driver = { + .driver = { + .owner = THIS_MODULE, + .name = mt9v011, + }, + .probe = mt9v011_probe, + .remove = mt9v011_remove, + .id_table = mt9v011_id, }; + +static __init int init_mt9v011(void) +{ + return i2c_add_driver(mt9v011_driver); +} + +static __exit void exit_mt9v011(void) +{ + i2c_del_driver(mt9v011_driver); +} + +module_init(init_mt9v011); +module_exit(exit_mt9v011); ___ linuxtv-commits mailing list linuxtv-commits@linuxtv.org http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits
[git:v4l-dvb/v2.6.37] V4L/DVB: msp3400: remove obsolete v4l2-i2c-drv.h header
This is an automatic generated email to let you know that the following patch were queued at the http://git.linuxtv.org/media-tree.git tree: Subject: V4L/DVB: msp3400: remove obsolete v4l2-i2c-drv.h header Author: Hans Verkuil hverk...@xs4all.nl Date:Wed Sep 15 15:22:34 2010 -0300 Signed-off-by: Hans Verkuil hverk...@xs4all.nl Signed-off-by: Mauro Carvalho Chehab mche...@redhat.com drivers/media/video/msp3400-driver.c | 31 +++ 1 files changed, 23 insertions(+), 8 deletions(-) --- http://git.linuxtv.org/media-tree.git?a=commitdiff;h=86c72b152c5d4e281b554eed992b5ef931a2 diff --git a/drivers/media/video/msp3400-driver.c b/drivers/media/video/msp3400-driver.c index 0e41213..fe18a0a 100644 --- a/drivers/media/video/msp3400-driver.c +++ b/drivers/media/video/msp3400-driver.c @@ -56,7 +56,6 @@ #include linux/videodev2.h #include media/v4l2-device.h #include media/v4l2-ioctl.h -#include media/v4l2-i2c-drv.h #include media/msp3400.h #include media/tvaudio.h #include msp3400-driver.h @@ -843,15 +842,31 @@ static const struct i2c_device_id msp_id[] = { }; MODULE_DEVICE_TABLE(i2c, msp_id); -static struct v4l2_i2c_driver_data v4l2_i2c_data = { - .name = msp3400, - .probe = msp_probe, - .remove = msp_remove, - .suspend = msp_suspend, - .resume = msp_resume, - .id_table = msp_id, +static struct i2c_driver msp_driver = { + .driver = { + .owner = THIS_MODULE, + .name = msp3400, + }, + .probe = msp_probe, + .remove = msp_remove, + .suspend= msp_suspend, + .resume = msp_resume, + .id_table = msp_id, }; +static __init int init_msp(void) +{ + return i2c_add_driver(msp_driver); +} + +static __exit void exit_msp(void) +{ + i2c_del_driver(msp_driver); +} + +module_init(init_msp); +module_exit(exit_msp); + /* * Overrides for Emacs so that we follow Linus's tabbing style. * --- ___ linuxtv-commits mailing list linuxtv-commits@linuxtv.org http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits
[git:v4l-dvb/v2.6.37] V4L/DVB: indycam: remove obsolete v4l2-i2c-drv.h header
This is an automatic generated email to let you know that the following patch were queued at the http://git.linuxtv.org/media-tree.git tree: Subject: V4L/DVB: indycam: remove obsolete v4l2-i2c-drv.h header Author: Hans Verkuil hverk...@xs4all.nl Date:Wed Sep 15 15:17:19 2010 -0300 Signed-off-by: Hans Verkuil hverk...@xs4all.nl Signed-off-by: Mauro Carvalho Chehab mche...@redhat.com drivers/media/video/indycam.c | 27 +-- 1 files changed, 21 insertions(+), 6 deletions(-) --- http://git.linuxtv.org/media-tree.git?a=commitdiff;h=a392bb7ca6e6d580db0d377da8de34e53d171905 diff --git a/drivers/media/video/indycam.c b/drivers/media/video/indycam.c index 3d69401..e5ed4db 100644 --- a/drivers/media/video/indycam.c +++ b/drivers/media/video/indycam.c @@ -24,7 +24,6 @@ #include linux/i2c.h #include media/v4l2-device.h #include media/v4l2-chip-ident.h -#include media/v4l2-i2c-drv.h #include indycam.h @@ -378,9 +377,25 @@ static const struct i2c_device_id indycam_id[] = { }; MODULE_DEVICE_TABLE(i2c, indycam_id); -static struct v4l2_i2c_driver_data v4l2_i2c_data = { - .name = indycam, - .probe = indycam_probe, - .remove = indycam_remove, - .id_table = indycam_id, +static struct i2c_driver indycam_driver = { + .driver = { + .owner = THIS_MODULE, + .name = indycam, + }, + .probe = indycam_probe, + .remove = indycam_remove, + .id_table = indycam_id, }; + +static __init int init_indycam(void) +{ + return i2c_add_driver(indycam_driver); +} + +static __exit void exit_indycam(void) +{ + i2c_del_driver(indycam_driver); +} + +module_init(init_indycam); +module_exit(exit_indycam); ___ linuxtv-commits mailing list linuxtv-commits@linuxtv.org http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits
[git:v4l-dvb/v2.6.37] V4L/DVB: vp27smpx: remove obsolete v4l2-i2c-drv.h header
This is an automatic generated email to let you know that the following patch were queued at the http://git.linuxtv.org/media-tree.git tree: Subject: V4L/DVB: vp27smpx: remove obsolete v4l2-i2c-drv.h header Author: Hans Verkuil hverk...@xs4all.nl Date:Wed Sep 15 14:56:12 2010 -0300 Signed-off-by: Hans Verkuil hverk...@xs4all.nl Signed-off-by: Mauro Carvalho Chehab mche...@redhat.com drivers/media/video/vp27smpx.c | 28 +--- 1 files changed, 21 insertions(+), 7 deletions(-) --- http://git.linuxtv.org/media-tree.git?a=commitdiff;h=7f7538b1fdae40c84ac1595a9dbb6e964d7a8568 diff --git a/drivers/media/video/vp27smpx.c b/drivers/media/video/vp27smpx.c index ca8303b..c15efb6 100644 --- a/drivers/media/video/vp27smpx.c +++ b/drivers/media/video/vp27smpx.c @@ -27,11 +27,9 @@ #include linux/ioctl.h #include asm/uaccess.h #include linux/i2c.h -#include linux/i2c-id.h #include linux/videodev2.h #include media/v4l2-device.h #include media/v4l2-chip-ident.h -#include media/v4l2-i2c-drv.h MODULE_DESCRIPTION(vp27smpx driver); MODULE_AUTHOR(Hans Verkuil); @@ -200,9 +198,25 @@ static const struct i2c_device_id vp27smpx_id[] = { }; MODULE_DEVICE_TABLE(i2c, vp27smpx_id); -static struct v4l2_i2c_driver_data v4l2_i2c_data = { - .name = vp27smpx, - .probe = vp27smpx_probe, - .remove = vp27smpx_remove, - .id_table = vp27smpx_id, +static struct i2c_driver vp27smpx_driver = { + .driver = { + .owner = THIS_MODULE, + .name = vp27smpx, + }, + .probe = vp27smpx_probe, + .remove = vp27smpx_remove, + .id_table = vp27smpx_id, }; + +static __init int init_vp27smpx(void) +{ + return i2c_add_driver(vp27smpx_driver); +} + +static __exit void exit_vp27smpx(void) +{ + i2c_del_driver(vp27smpx_driver); +} + +module_init(init_vp27smpx); +module_exit(exit_vp27smpx); ___ linuxtv-commits mailing list linuxtv-commits@linuxtv.org http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits
[git:v4l-dvb/v2.6.37] V4L/DVB: saa717x: remove obsolete v4l2-i2c-drv.h header
This is an automatic generated email to let you know that the following patch were queued at the http://git.linuxtv.org/media-tree.git tree: Subject: V4L/DVB: saa717x: remove obsolete v4l2-i2c-drv.h header Author: Hans Verkuil hverk...@xs4all.nl Date:Wed Sep 15 15:01:48 2010 -0300 Signed-off-by: Hans Verkuil hverk...@xs4all.nl Signed-off-by: Mauro Carvalho Chehab mche...@redhat.com drivers/media/video/saa717x.c | 27 +-- 1 files changed, 21 insertions(+), 6 deletions(-) --- http://git.linuxtv.org/media-tree.git?a=commitdiff;h=e1a233a90a3a1774b47fc06c5330670ec5292da2 diff --git a/drivers/media/video/saa717x.c b/drivers/media/video/saa717x.c index 45f8bfc..b6172c2 100644 --- a/drivers/media/video/saa717x.c +++ b/drivers/media/video/saa717x.c @@ -39,7 +39,6 @@ #include linux/i2c.h #include media/v4l2-device.h #include media/v4l2-ctrls.h -#include media/v4l2-i2c-drv.h MODULE_DESCRIPTION(Philips SAA717x audio/video decoder driver); MODULE_AUTHOR(K. Ohta, T. Adachi, Hans Verkuil); @@ -1366,9 +1365,25 @@ static const struct i2c_device_id saa717x_id[] = { }; MODULE_DEVICE_TABLE(i2c, saa717x_id); -static struct v4l2_i2c_driver_data v4l2_i2c_data = { - .name = saa717x, - .probe = saa717x_probe, - .remove = saa717x_remove, - .id_table = saa717x_id, +static struct i2c_driver saa717x_driver = { + .driver = { + .owner = THIS_MODULE, + .name = saa717x, + }, + .probe = saa717x_probe, + .remove = saa717x_remove, + .id_table = saa717x_id, }; + +static __init int init_saa717x(void) +{ + return i2c_add_driver(saa717x_driver); +} + +static __exit void exit_saa717x(void) +{ + i2c_del_driver(saa717x_driver); +} + +module_init(init_saa717x); +module_exit(exit_saa717x); ___ linuxtv-commits mailing list linuxtv-commits@linuxtv.org http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits
[git:v4l-dvb/v2.6.37] V4L/DVB: IR/imon: set up mce-only devices w/mce keytable
This is an automatic generated email to let you know that the following patch were queued at the http://git.linuxtv.org/media-tree.git tree: Subject: V4L/DVB: IR/imon: set up mce-only devices w/mce keytable Author: Jarod Wilson ja...@redhat.com Date:Wed Sep 15 00:28:41 2010 -0300 Currently, they get set up with the pad keytable, which they can't actually use at all. Also add another variant of volume scancodes from another 0xffdc device, and properly set up the 0x9e 0xffdc device as an iMON VFD w/MCE proto IR. Based on data and a prior patch from Anders Eriksson on the lirc list. Signed-off-by: Jarod Wilson ja...@redhat.com Signed-off-by: Mauro Carvalho Chehab mche...@redhat.com drivers/media/IR/imon.c | 264 -- 1 files changed, 138 insertions(+), 126 deletions(-) --- http://git.linuxtv.org/media-tree.git?a=commitdiff;h=e156b731596795714f1428c4ec00fe9f5468e083 diff --git a/drivers/media/IR/imon.c b/drivers/media/IR/imon.c index 4b73b8e..7a97176 100644 --- a/drivers/media/IR/imon.c +++ b/drivers/media/IR/imon.c @@ -292,6 +292,9 @@ static const struct { { 0x0001ffeell, KEY_VOLUMEUP }, { 0x0100ffeell, KEY_VOLUMEDOWN }, { 0x0100ffeell, KEY_MUTE }, + /* 0xffdc iMON MCE VFD */ + { 0x0001ffeell, KEY_VOLUMEUP }, + { 0x0100ffeell, KEY_VOLUMEDOWN }, /* iMON Knob values */ { 0x000100eell, KEY_VOLUMEUP }, { 0x01eell, KEY_VOLUMEDOWN }, @@ -1701,11 +1704,128 @@ static void usb_rx_callback_intf1(struct urb *urb) usb_submit_urb(ictx-rx_urb_intf1, GFP_ATOMIC); } +/* + * The 0x15c2:0xffdc device ID was used for umpteen different imon + * devices, and all of them constantly spew interrupts, even when there + * is no actual data to report. However, byte 6 of this buffer looks like + * its unique across device variants, so we're trying to key off that to + * figure out which display type (if any) and what IR protocol the device + * actually supports. These devices have their IR protocol hard-coded into + * their firmware, they can't be changed on the fly like the newer hardware. + */ +static void imon_get_ffdc_type(struct imon_context *ictx) +{ + u8 ffdc_cfg_byte = ictx-usb_rx_buf[6]; + u8 detected_display_type = IMON_DISPLAY_TYPE_NONE; + u64 allowed_protos = IR_TYPE_OTHER; + + switch (ffdc_cfg_byte) { + /* iMON Knob, no display, iMON IR + vol knob */ + case 0x21: + dev_info(ictx-dev, 0xffdc iMON Knob, iMON IR); + ictx-display_supported = false; + break; + /* iMON 2.4G LT (usb stick), no display, iMON RF */ + case 0x4e: + dev_info(ictx-dev, 0xffdc iMON 2.4G LT, iMON RF); + ictx-display_supported = false; + ictx-rf_device = true; + break; + /* iMON VFD, no IR (does have vol knob tho) */ + case 0x35: + dev_info(ictx-dev, 0xffdc iMON VFD + knob, no IR); + detected_display_type = IMON_DISPLAY_TYPE_VFD; + break; + /* iMON VFD, iMON IR */ + case 0x24: + case 0x85: + dev_info(ictx-dev, 0xffdc iMON VFD, iMON IR); + detected_display_type = IMON_DISPLAY_TYPE_VFD; + break; + /* iMON VFD, MCE IR */ + case 0x9e: + dev_info(ictx-dev, 0xffdc iMON VFD, MCE IR); + detected_display_type = IMON_DISPLAY_TYPE_VFD; + allowed_protos = IR_TYPE_RC6; + break; + /* iMON LCD, MCE IR */ + case 0x9f: + dev_info(ictx-dev, 0xffdc iMON LCD, MCE IR); + detected_display_type = IMON_DISPLAY_TYPE_LCD; + allowed_protos = IR_TYPE_RC6; + break; + default: + dev_info(ictx-dev, Unknown 0xffdc device, +defaulting to VFD and iMON IR); + detected_display_type = IMON_DISPLAY_TYPE_VFD; + break; + } + + printk(KERN_CONT (id 0x%02x)\n, ffdc_cfg_byte); + + ictx-display_type = detected_display_type; + ictx-props-allowed_protos = allowed_protos; + ictx-ir_type = allowed_protos; +} + +static void imon_set_display_type(struct imon_context *ictx) +{ + u8 configured_display_type = IMON_DISPLAY_TYPE_VFD; + + /* +* Try to auto-detect the type of display if the user hasn't set +* it by hand via the display_type modparam. Default is VFD. +*/ + + if (display_type == IMON_DISPLAY_TYPE_AUTO) { + switch (ictx-product) { + case 0xffdc: + /* set in imon_get_ffdc_type() */ + configured_display_type = ictx-display_type; + break; + case 0x0034: + case 0x0035: + configured_display_type = IMON_DISPLAY_TYPE_VGA
[git:v4l-dvb/v2.6.37] V4L/DVB: imon: split mouse events to a separate input dev
This is an automatic generated email to let you know that the following patch were queued at the http://git.linuxtv.org/media-tree.git tree: Subject: V4L/DVB: imon: split mouse events to a separate input dev Author: David Härdeman da...@hardeman.nu Date:Wed Sep 15 15:42:07 2010 -0300 This is a stab at separating the mouse (and front panel/knob) events out to a separate input device. This is necessary in preparation for the next patch which makes the rc-core input dev opaque to rc drivers. I can't verify the correctness of the patch beyond the fact that it compiles without warnings. The driver has resisted most of my attempts at understanding it properly...for example, the double calls to le64_to_cpu() and be64_to_cpu() which are applied in imon_incoming_packet() and imon_panel_key_lookup() would amount to a bswab64() call, irregardless of the cpu endianness, and I think the code wouldn't have worked on a big-endian machine... - Minor alterations to apply with minimal core IR changes - Use timer for imon keys too, since its entirely possible for the receiver to miss release codes (either by way of another key being pressed while the first is held or by the remote pointing away from the recevier when the key is release. yes, I know, its ugly). - Bump driver version number, since this is a fairly significant change (for the much much better). Tested successfully w/an imon knob receiver. Signed-off-by: David Härdeman da...@hardeman.nu Signed-off-by: Jarod Wilson ja...@redhat.com Signed-off-by: Mauro Carvalho Chehab mche...@redhat.com drivers/media/IR/imon.c | 273 +++--- 1 files changed, 160 insertions(+), 113 deletions(-) --- http://git.linuxtv.org/media-tree.git?a=commitdiff;h=4d2acb4e7a23d47b8792bce34cf874da24193ce2 diff --git a/drivers/media/IR/imon.c b/drivers/media/IR/imon.c index c185422..d36fe72 100644 --- a/drivers/media/IR/imon.c +++ b/drivers/media/IR/imon.c @@ -44,7 +44,7 @@ #define MOD_AUTHOR Jarod Wilson ja...@wilsonet.com #define MOD_DESC Driver for SoundGraph iMON MultiMedia IR/Display #define MOD_NAME imon -#define MOD_VERSION0.9.1 +#define MOD_VERSION0.9.2 #define DISPLAY_MINOR_BASE 144 #define DEVICE_NAMElcd%d @@ -121,21 +121,25 @@ struct imon_context { u16 vendor; /* usb vendor ID */ u16 product;/* usb product ID */ - struct input_dev *idev; /* input device for remote */ + struct input_dev *rdev; /* input device for remote */ + struct input_dev *idev; /* input device for panel IR mouse */ struct input_dev *touch;/* input device for touchscreen */ u32 kc; /* current input keycode */ u32 last_keycode; /* last reported input keycode */ + u32 rc_scancode;/* the computed remote scancode */ + u8 rc_toggle; /* the computed remote toggle bit */ u64 ir_type;/* iMON or MCE (RC6) IR protocol? */ - u8 mce_toggle_bit; /* last mce toggle bit */ bool release_code; /* some keys send a release code */ u8 display_type;/* store the display type */ bool pad_mouse; /* toggle kbd(0)/mouse(1) mode */ + char name_rdev[128];/* rc input device name */ + char phys_rdev[64]; /* rc input device phys path */ + char name_idev[128];/* input device name */ char phys_idev[64]; /* input device phys path */ - struct timer_list itimer; /* input device timer, need for rc6 */ char name_touch[128]; /* touch screen name */ char phys_touch[64];/* touch screen phys path */ @@ -956,17 +960,6 @@ static void usb_tx_callback(struct urb *urb) } /** - * mce/rc6 keypresses have no distinct release code, use timer - */ -static void imon_mce_timeout(unsigned long data) -{ - struct imon_context *ictx = (struct imon_context *)data; - - input_report_key(ictx-idev, ictx-last_keycode, 0); - input_sync(ictx-idev); -} - -/** * report touchscreen input */ static void imon_touch_display_timeout(unsigned long data) @@ -1006,9 +999,6 @@ int imon_ir_change_protocol(void *priv, u64 ir_type) dev_dbg(dev, Configuring IR receiver for MCE protocol\n); ir_proto_packet[0] = 0x01; pad_mouse = false; - init_timer(ictx-itimer); - ictx-itimer.data = (unsigned long)ictx; - ictx-itimer.function = imon_mce_timeout; break; case IR_TYPE_UNKNOWN: case IR_TYPE_OTHER: @@ -1147,20 +1137,21 @@ static int stabilize(int a, int b, u16 timeout, u16 threshold) return result; } -static u32 imon_remote_key_lookup(struct imon_context *ictx, u32 hw_code) +static
[git:v4l-dvb/v2.6.37] V4L/DVB: dvb: Convert mutex to semaphore
This is an automatic generated email to let you know that the following patch were queued at the http://git.linuxtv.org/media-tree.git tree: Subject: V4L/DVB: dvb: Convert mutex to semaphore Author: Thomas Gleixner t...@linutronix.de Date:Tue Sep 7 11:33:27 2010 -0300 Get rid of init_MUTEX[_LOCKED]() and use sema_init() instead. Signed-off-by: Thomas Gleixner t...@linutronix.de Signed-off-by: Mauro Carvalho Chehab mche...@redhat.com drivers/media/dvb/dvb-core/dvb_frontend.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) --- http://git.linuxtv.org/media-tree.git?a=commitdiff;h=ddad8df4bb05845f2a5de747363885322cede73c diff --git a/drivers/media/dvb/dvb-core/dvb_frontend.c b/drivers/media/dvb/dvb-core/dvb_frontend.c index 4d45b7d..083ed15 100644 --- a/drivers/media/dvb/dvb-core/dvb_frontend.c +++ b/drivers/media/dvb/dvb-core/dvb_frontend.c @@ -702,7 +702,7 @@ static void dvb_frontend_stop(struct dvb_frontend *fe) kthread_stop(fepriv-thread); - init_MUTEX (fepriv-sem); + sema_init(fepriv-sem, 1); fepriv-state = FESTATE_IDLE; /* paranoia check in case a signal arrived */ @@ -2061,7 +2061,7 @@ int dvb_register_frontend(struct dvb_adapter* dvb, } fepriv = fe-frontend_priv; - init_MUTEX (fepriv-sem); + sema_init(fepriv-sem, 1); init_waitqueue_head (fepriv-wait_queue); init_waitqueue_head (fepriv-events.wait_queue); mutex_init(fepriv-events.mtx); ___ linuxtv-commits mailing list linuxtv-commits@linuxtv.org http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits
[git:v4l-dvb/v2.6.36] V4L/DVB: mx2_camera: add rising edge for pixclock
This is an automatic generated email to let you know that the following patch were queued at the http://git.linuxtv.org/media-tree.git tree: Subject: V4L/DVB: mx2_camera: add rising edge for pixclock Author: Michael Grzeschik m.grzesc...@pengutronix.de Date:Tue Aug 3 06:37:55 2010 -0300 Signed-off-by: Michael Grzeschik m.grzesc...@pengutronix.de Signed-off-by: Guennadi Liakhovetski g.liakhovet...@gmx.de Signed-off-by: Mauro Carvalho Chehab mche...@redhat.com drivers/media/video/mx2_camera.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) --- http://git.linuxtv.org/media-tree.git?a=commitdiff;h=d86097e19cef2f13a29fc37db0dad17b99b6d5f8 diff --git a/drivers/media/video/mx2_camera.c b/drivers/media/video/mx2_camera.c index 8441eca..66ff174 100644 --- a/drivers/media/video/mx2_camera.c +++ b/drivers/media/video/mx2_camera.c @@ -785,6 +785,8 @@ static int mx2_camera_set_bus_param(struct soc_camera_device *icd, if (ret 0) return ret; + if (common_flags SOCAM_PCLK_SAMPLE_RISING) + csicr1 |= CSICR1_REDGE; if (common_flags SOCAM_PCLK_SAMPLE_FALLING) csicr1 |= CSICR1_INV_PCLK; if (common_flags SOCAM_VSYNC_ACTIVE_HIGH) ___ linuxtv-commits mailing list linuxtv-commits@linuxtv.org http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits
[git:v4l-dvb/v2.6.36] V4L/DVB: mx2_camera: fix for list bufnum in frame_done_emma
This is an automatic generated email to let you know that the following patch were queued at the http://git.linuxtv.org/media-tree.git tree: Subject: V4L/DVB: mx2_camera: fix for list bufnum in frame_done_emma Author: Michael Grzeschik m.grzesc...@pengutronix.de Date:Tue Aug 3 06:37:54 2010 -0300 The emma uses bufnum 1 and 0. This patch tells the bufqueue to change the next buffer to the next one and not the current one. Otherwise the BUG_ON above will trigger everytime. Signed-off-by: Michael Grzeschik m.grzesc...@pengutronix.de Signed-off-by: Guennadi Liakhovetski g.liakhovet...@gmx.de Signed-off-by: Mauro Carvalho Chehab mche...@redhat.com drivers/media/video/mx2_camera.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) --- http://git.linuxtv.org/media-tree.git?a=commitdiff;h=cd9ebdbc0541b4e8ee145c81642d68332f79b932 diff --git a/drivers/media/video/mx2_camera.c b/drivers/media/video/mx2_camera.c index 026bef0..8441eca 100644 --- a/drivers/media/video/mx2_camera.c +++ b/drivers/media/video/mx2_camera.c @@ -1201,7 +1201,7 @@ static void mx27_camera_frame_done_emma(struct mx2_camera_dev *pcdev, buf = list_entry(pcdev-capture.next, struct mx2_buffer, vb.queue); - buf-bufnum = bufnum; + buf-bufnum = !bufnum; list_move_tail(pcdev-capture.next, pcdev-active_bufs); ___ linuxtv-commits mailing list linuxtv-commits@linuxtv.org http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits
[git:v4l-dvb/v2.6.36] V4L/DVB: gspca - zc3xx: Redefine the exchanges of sensor mt9v111 (mi0360soc)
This is an automatic generated email to let you know that the following patch were queued at the http://git.linuxtv.org/media-tree.git tree: Subject: V4L/DVB: gspca - zc3xx: Redefine the exchanges of sensor mt9v111 (mi0360soc) Author: Jean-François Moine moin...@free.fr Date:Wed Aug 4 07:25:12 2010 -0300 The exchanges for sensor mt9v111 are different with bridges zc301 and zc303. The exchanges for the bridge zc303 were those of the bad named tas5130ck. These mt9v111 exchanges have been adjusted from the ms-Windows public files vm30x.inf (for 0ac8:301b) and usbvm303.inf (for 0ac8:303b). Signed-off-by: Jean-François Moine moin...@free.fr Signed-off-by: Mauro Carvalho Chehab mche...@redhat.com drivers/media/video/gspca/zc3xx.c | 774 +++-- 1 files changed, 307 insertions(+), 467 deletions(-) --- http://git.linuxtv.org/media-tree.git?a=commitdiff;h=a484dd9b77fbbda2a79bf1b371c6d31f90e15504 diff --git a/drivers/media/video/gspca/zc3xx.c b/drivers/media/video/gspca/zc3xx.c index 5c91130..0666038 100644 --- a/drivers/media/video/gspca/zc3xx.c +++ b/drivers/media/video/gspca/zc3xx.c @@ -52,11 +52,16 @@ struct sd { #define QUALITY_MAX 80 #define QUALITY_DEF 70 + u8 bridge; u8 sensor; /* Type of image sensor chip */ u16 chip_revision; u8 jpeg_hdr[JPEG_HDR_SZ]; }; +enum bridges { + BRIDGE_ZC301, + BRIDGE_ZC303, +}; enum sensors { SENSOR_ADCM2700, SENSOR_CS2102, @@ -67,14 +72,14 @@ enum sensors { SENSOR_HV7131R, SENSOR_ICM105A, SENSOR_MC501CB, - SENSOR_MI0360SOC, /* = MT9V111 */ + SENSOR_MT9V111_1, /* (mi360soc) zc301 */ + SENSOR_MT9V111_3, /* (mi360soc) zc303 */ SENSOR_OV7620, /* OV7648 - same values */ SENSOR_OV7630C, SENSOR_PAS106, SENSOR_PAS202B, SENSOR_PB0330, SENSOR_PO2030, - SENSOR_TAS5130CK, SENSOR_TAS5130C, SENSOR_TAS5130C_VF0250, SENSOR_MAX @@ -4249,8 +4254,8 @@ static const struct usb_action pas202b_NoFlikerScale[] = { {} }; -/* mi0360soc and pb0330 from vm30x.inf for 0ac8:301b and 0ac8:303b 07/02/13 */ -static const struct usb_action mi0360soc_Initial[] = { /* 640x480 */ +/* mt9v111 (mi0360soc) and pb0330 from vm30x.inf 0ac8:301b 07/02/13 */ +static const struct usb_action mt9v111_1_Initial[] = { /* 640x480 */ {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL}, {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING}, {0xa0, 0x0a, ZC3XX_R010_CMOSSENSORSELECT}, @@ -4261,14 +4266,14 @@ static const struct usb_action mi0360soc_Initial[] = { /* 640x480 */ {0xa0, 0xe0, ZC3XX_R006_FRAMEHEIGHTLOW}, {0xa0, 0xdc, ZC3XX_R08B_I2CDEVICEADDR}, {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING}, - {0xa0, 0x07, ZC3XX_R012_VIDEOCONTROLFUNC}, /*jfm: was 03*/ -/* {0xa0, 0x01, ZC3XX_R012_VIDEOCONTROLFUNC}, */ + {0xa0, 0x07, ZC3XX_R012_VIDEOCONTROLFUNC}, {0xa0, 0x00, ZC3XX_R098_WINYSTARTLOW}, {0xa0, 0x00, ZC3XX_R09A_WINXSTARTLOW}, {0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW}, {0xa0, 0x00, ZC3XX_R11C_FIRSTXLOW}, {0xa0, 0xdc, ZC3XX_R08B_I2CDEVICEADDR}, {0xdd, 0x00, 0x0200}, + {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC}, {0xaa, 0x01, 0x0001}, {0xaa, 0x06, 0x}, {0xaa, 0x08, 0x0483}, @@ -4278,18 +4283,18 @@ static const struct usb_action mi0360soc_Initial[] = { /* 640x480 */ {0xaa, 0x03, 0x01e5}, /*jfm: was 01e7*/ {0xaa, 0x04, 0x0285}, /*jfm: was 0287*/ {0xaa, 0x07, 0x3002}, - {0xaa, 0x20, 0x5100}, /*jfm: was 1100*/ - {0xaa, 0x35, 0x507f}, /*jfm: was 0050*/ + {0xaa, 0x20, 0x5100}, + {0xaa, 0x35, 0x507f}, {0xaa, 0x30, 0x0005}, {0xaa, 0x31, 0x}, {0xaa, 0x58, 0x0078}, {0xaa, 0x62, 0x0411}, - {0xaa, 0x2b, 0x0028}, + {0xaa, 0x2b, 0x007f}, {0xaa, 0x2c, 0x007f}, /*jfm: was 0030*/ {0xaa, 0x2d, 0x007f}, /*jfm: was 0030*/ {0xaa, 0x2e, 0x007f}, /*jfm: was 0030*/ {0xa0, 0x10, ZC3XX_R087_EXPTIMEMID}, - {0xa0, 0xb7, ZC3XX_R101_SENSORCORRECTION}, /*jfm: was 37*/ + {0xa0, 0xb7, ZC3XX_R101_SENSORCORRECTION}, {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC}, {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE}, {0xa0, 0x06, ZC3XX_R189_AWBSTATUS}, @@ -4299,12 +4304,12 @@ static const struct usb_action mi0360soc_Initial[] = { /* 640x480 */ {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE}, {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS}, {0xa0, 0x60, ZC3XX_R1A8_DIGITALGAIN}, - {0xa0, 0x6c, ZC3XX_R18D_YTARGET}, /* jfm: was 78 */ + {0xa0, 0x6c, ZC3XX_R18D_YTARGET}, {0xa0, 0x61, ZC3XX_R116_RGAIN}, {0xa0, 0x65, ZC3XX_R118_BGAIN}, {} }; -static const struct
[git:v4l-dvb/v2.6.36] V4L/DVB: gspca - zc3xx: Possible use of the highest alternate setting
This is an automatic generated email to let you know that the following patch were queued at the http://git.linuxtv.org/media-tree.git tree: Subject: V4L/DVB: gspca - zc3xx: Possible use of the highest alternate setting Author: Jean-François Moine moin...@free.fr Date:Wed Aug 4 06:08:52 2010 -0300 Signed-off-by: Jean-François Moine moin...@free.fr Signed-off-by: Mauro Carvalho Chehab mche...@redhat.com drivers/media/video/gspca/zc3xx.c |2 -- 1 files changed, 0 insertions(+), 2 deletions(-) --- http://git.linuxtv.org/media-tree.git?a=commitdiff;h=5fd450e913c8836ce3f111300ab04d601876af2f diff --git a/drivers/media/video/gspca/zc3xx.c b/drivers/media/video/gspca/zc3xx.c index 2743ed4..d796bec 100644 --- a/drivers/media/video/gspca/zc3xx.c +++ b/drivers/media/video/gspca/zc3xx.c @@ -6773,8 +6773,6 @@ static int sd_init(struct gspca_dev *gspca_dev) } cam = gspca_dev-cam; -/*fixme:test*/ - gspca_dev-nbalt--; switch (mode_tb[sd-sensor]) { case 0: cam-cam_mode = sif_mode; ___ linuxtv-commits mailing list linuxtv-commits@linuxtv.org http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits
[git:v4l-dvb/v2.6.36] V4L/DVB: gspca - zc3xx: Add the light frequency control for sensor hv7131r
This is an automatic generated email to let you know that the following patch were queued at the http://git.linuxtv.org/media-tree.git tree: Subject: V4L/DVB: gspca - zc3xx: Add the light frequency control for sensor hv7131r Author: Jean-François Moine moin...@free.fr Date:Wed Aug 4 07:12:57 2010 -0300 The new exchanges are extracted from the public file lPEPI264v.inf of the ms-Windows driver. In this file, the sensor is named hv7131b but the exchanges are those of the hv7131r. Signed-off-by: Jean-François Moine moin...@free.fr Signed-off-by: Mauro Carvalho Chehab mche...@redhat.com drivers/media/video/gspca/zc3xx.c | 241 +++-- 1 files changed, 123 insertions(+), 118 deletions(-) --- http://git.linuxtv.org/media-tree.git?a=commitdiff;h=2af0b4c60cc0daf0a3abbaa159380fd729dcf729 diff --git a/drivers/media/video/gspca/zc3xx.c b/drivers/media/video/gspca/zc3xx.c index d796bec..5c91130 100644 --- a/drivers/media/video/gspca/zc3xx.c +++ b/drivers/media/video/gspca/zc3xx.c @@ -2076,6 +2076,7 @@ static const struct usb_action hv7131b_NoFlikerScale[] = { /* 320x240 */ {} }; +/* from lPEPI264v.inf (hv7131b!) */ static const struct usb_action hv7131r_InitialScale[] = { {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL}, {0xa0, 0x10, ZC3XX_R002_CLOCKSELECT}, @@ -2083,8 +2084,8 @@ static const struct usb_action hv7131r_InitialScale[] = { {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING}, {0xa0, 0x77, ZC3XX_R101_SENSORCORRECTION}, {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING}, - {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC}, {0xa0, 0x07, ZC3XX_R012_VIDEOCONTROLFUNC}, + {0xa0, 0x01, ZC3XX_R012_VIDEOCONTROLFUNC}, {0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH}, {0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW}, {0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH}, @@ -2097,6 +2098,8 @@ static const struct usb_action hv7131r_InitialScale[] = { {0xa0, 0x88, ZC3XX_R09E_WINWIDTHLOW}, {0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW}, {0xa0, 0x00, ZC3XX_R11C_FIRSTXLOW}, + {0xa0, 0x07, ZC3XX_R012_VIDEOCONTROLFUNC}, + {0xdd, 0x00, 0x0200}, {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC}, {0xaa, 0x01, 0x000c}, {0xaa, 0x11, 0x}, @@ -2105,10 +2108,10 @@ static const struct usb_action hv7131r_InitialScale[] = { {0xaa, 0x15, 0x00e8}, {0xaa, 0x16, 0x0002}, {0xaa, 0x17, 0x0088}, - + {0xaa, 0x30, 0x000b}, {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE}, - {0xa0, 0x89, ZC3XX_R18D_YTARGET}, + {0xa0, 0x78, ZC3XX_R18D_YTARGET}, {0xa0, 0x50, ZC3XX_R1A8_DIGITALGAIN}, {0xa0, 0x00, 0x01ad}, {0xa0, 0xc0, 0x019b}, @@ -2118,96 +2121,44 @@ static const struct usb_action hv7131r_InitialScale[] = { {0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05}, {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE}, {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS}, - {0xa1, 0x01, 0x0002}, - {0xa0, 0x00, ZC3XX_R092_I2CADDRESSSELECT}, - {0xa0, 0x02, ZC3XX_R090_I2CCOMMAND}, - {0xa1, 0x01, 0x0091}, - {0xa1, 0x01, 0x0095}, - {0xa1, 0x01, 0x0096}, - - {0xa1, 0x01, 0x0008}, - {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING}, /* clock ? */ - {0xa0, 0x08, ZC3XX_R1C6_SHARPNESS00}, /* sharpness+ */ - {0xa1, 0x01, 0x01c8}, - {0xa1, 0x01, 0x01c9}, - {0xa1, 0x01, 0x01ca}, - {0xa0, 0x0f, ZC3XX_R1CB_SHARPNESS05}, /* sharpness- */ - - {0xa0, 0x60, ZC3XX_R10A_RGB00}, /* matrix */ - {0xa0, 0xf0, ZC3XX_R10B_RGB01}, - {0xa0, 0xf0, ZC3XX_R10C_RGB02}, - {0xa0, 0xf0, ZC3XX_R10D_RGB10}, - {0xa0, 0x60, ZC3XX_R10E_RGB11}, - {0xa0, 0xf0, ZC3XX_R10F_RGB12}, - {0xa0, 0xf0, ZC3XX_R110_RGB20}, - {0xa0, 0xf0, ZC3XX_R111_RGB21}, - {0xa0, 0x60, ZC3XX_R112_RGB22}, - {0xa1, 0x01, 0x0180}, - {0xa0, 0x10, ZC3XX_R180_AUTOCORRECTENABLE}, - {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, - {0xaa, 0x25, 0x0007}, - {0xaa, 0x26, 0x0053}, - {0xaa, 0x27, 0x}, - - {0xa0, 0x10, ZC3XX_R190_EXPOSURELIMITHIGH}, /* 2f */ - {0xa0, 0x04, ZC3XX_R191_EXPOSURELIMITMID}, /* 9b */ - {0xa0, 0x60, ZC3XX_R192_EXPOSURELIMITLOW}, /* 80 */ - {0xa0, 0x01, ZC3XX_R195_ANTIFLICKERHIGH}, - {0xa0, 0xd4, ZC3XX_R196_ANTIFLICKERMID}, - {0xa0, 0xc0, ZC3XX_R197_ANTIFLICKERLOW}, - {0xa0, 0x10, ZC3XX_R18C_AEFREEZE}, - {0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE}, - {0xa0, 0x60, ZC3XX_R1A8_DIGITALGAIN}, - {0xa0, 0x10, ZC3XX_R1A9_DIGITALLIMITDIFF}, - {0xa0, 0x13, ZC3XX_R1AA_DIGITALGAINSTEP}, - {0xa1, 0x01, 0x001d}, - {0xa1, 0x01, 0x001e}, - {0xa1, 0x01, 0x001f}, - {0xa1, 0x01, 0x0020}, - {0xa0, 0x40, ZC3XX_R180_AUTOCORRECTENABLE}, - {0xa1, 0x01, 0x0180}, - {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE}, {} }; - static const struct usb_action
[git:v4l-dvb/v2.6.36] V4L/DVB: gspca - zc3xx: Do the sensor probe at resume time
This is an automatic generated email to let you know that the following patch were queued at the http://git.linuxtv.org/media-tree.git tree: Subject: V4L/DVB: gspca - zc3xx: Do the sensor probe at resume time Author: Jean-François Moine moin...@free.fr Date:Wed Aug 4 06:07:23 2010 -0300 Signed-off-by: Jean-François Moine moin...@free.fr Signed-off-by: Mauro Carvalho Chehab mche...@redhat.com drivers/media/video/gspca/zc3xx.c | 34 +++--- 1 files changed, 19 insertions(+), 15 deletions(-) --- http://git.linuxtv.org/media-tree.git?a=commitdiff;h=c39da6a37566733d703bbd9a489fe39e95ea4df1 diff --git a/drivers/media/video/gspca/zc3xx.c b/drivers/media/video/gspca/zc3xx.c index a9af568..2743ed4 100644 --- a/drivers/media/video/gspca/zc3xx.c +++ b/drivers/media/video/gspca/zc3xx.c @@ -6572,6 +6572,24 @@ static int sd_config(struct gspca_dev *gspca_dev, const struct usb_device_id *id) { struct sd *sd = (struct sd *) gspca_dev; + + /* define some sensors from the vendor/product */ + sd-sensor = id-driver_info; + + sd-sharpness = SHARPNESS_DEF; + sd-brightness = BRIGHTNESS_DEF; + sd-contrast = CONTRAST_DEF; + sd-autogain = AUTOGAIN_DEF; + sd-lightfreq = FREQ_DEF; + sd-quality = QUALITY_DEF; + + return 0; +} + +/* this function is called at probe and resume time */ +static int sd_init(struct gspca_dev *gspca_dev) +{ + struct sd *sd = (struct sd *) gspca_dev; struct cam *cam; int sensor; static const u8 gamma[SENSOR_MAX] = { @@ -6617,9 +6635,6 @@ static int sd_config(struct gspca_dev *gspca_dev, [SENSOR_TAS5130C_VF0250] = 1, }; - /* define some sensors from the vendor/product */ - sd-sharpness = SHARPNESS_DEF; - sd-sensor = id-driver_info; sensor = zcxx_probeSensor(gspca_dev); if (sensor = 0) PDEBUG(D_PROBE, probe sensor - %04x, sensor); @@ -6775,12 +6790,7 @@ static int sd_config(struct gspca_dev *gspca_dev, cam-nmodes = ARRAY_SIZE(broken_vga_mode); break; } - sd-brightness = BRIGHTNESS_DEF; - sd-contrast = CONTRAST_DEF; sd-gamma = gamma[sd-sensor]; - sd-autogain = AUTOGAIN_DEF; - sd-lightfreq = FREQ_DEF; - sd-quality = QUALITY_DEF; switch (sd-sensor) { case SENSOR_HV7131B: @@ -6790,15 +6800,9 @@ static int sd_config(struct gspca_dev *gspca_dev, break; } - return gspca_dev-usb_err; -} - -/* this function is called at probe and resume time */ -static int sd_init(struct gspca_dev *gspca_dev) -{ /* switch off the led */ reg_w(gspca_dev, 0x01, 0x); - return 0; + return gspca_dev-usb_err; } static int sd_start(struct gspca_dev *gspca_dev) ___ linuxtv-commits mailing list linuxtv-commits@linuxtv.org http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits
[git:v4l-dvb/v2.6.36] V4L/DVB: gspca - zc3xx: Check the USB exchanges
This is an automatic generated email to let you know that the following patch were queued at the http://git.linuxtv.org/media-tree.git tree: Subject: V4L/DVB: gspca - zc3xx: Check the USB exchanges Author: Jean-François Moine moin...@free.fr Date:Wed Aug 4 05:44:13 2010 -0300 Signed-off-by: Jean-François Moine moin...@free.fr Signed-off-by: Mauro Carvalho Chehab mche...@redhat.com drivers/media/video/gspca/zc3xx.c | 329 +++-- 1 files changed, 171 insertions(+), 158 deletions(-) --- http://git.linuxtv.org/media-tree.git?a=commitdiff;h=6d31450544c75d99e1f4dbb21d5db6b2ca6ada4d diff --git a/drivers/media/video/gspca/zc3xx.c b/drivers/media/video/gspca/zc3xx.c index e184eb3..a9af568 100644 --- a/drivers/media/video/gspca/zc3xx.c +++ b/drivers/media/video/gspca/zc3xx.c @@ -5841,13 +5841,22 @@ static const struct usb_action tas5130c_vf0250_NoFliker[] = { static u8 reg_r_i(struct gspca_dev *gspca_dev, u16 index) { - usb_control_msg(gspca_dev-dev, + int ret; + + if (gspca_dev-usb_err 0) + return 0; + ret = usb_control_msg(gspca_dev-dev, usb_rcvctrlpipe(gspca_dev-dev, 0), 0xa1, USB_DIR_IN | USB_TYPE_VENDOR | USB_RECIP_DEVICE, 0x01, /* value */ index, gspca_dev-usb_buf, 1, 500); + if (ret 0) { + PDEBUG(D_ERR, reg_r_i err %d, ret); + gspca_dev-usb_err = ret; + return 0; + } return gspca_dev-usb_buf[0]; } @@ -5861,24 +5870,32 @@ static u8 reg_r(struct gspca_dev *gspca_dev, return ret; } -static void reg_w_i(struct usb_device *dev, +static void reg_w_i(struct gspca_dev *gspca_dev, u8 value, u16 index) { - usb_control_msg(dev, - usb_sndctrlpipe(dev, 0), + int ret; + + if (gspca_dev-usb_err 0) + return; + ret = usb_control_msg(gspca_dev-dev, + usb_sndctrlpipe(gspca_dev-dev, 0), 0xa0, USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_DEVICE, value, index, NULL, 0, 500); + if (ret 0) { + PDEBUG(D_ERR, reg_w_i err %d, ret); + gspca_dev-usb_err = ret; + } } -static void reg_w(struct usb_device *dev, +static void reg_w(struct gspca_dev *gspca_dev, u8 value, u16 index) { PDEBUG(D_USBO, reg w [%04x] = %02x, index, value); - reg_w_i(dev, value, index); + reg_w_i(gspca_dev, value, index); } static u16 i2c_read(struct gspca_dev *gspca_dev, @@ -5887,8 +5904,10 @@ static u16 i2c_read(struct gspca_dev *gspca_dev, u8 retbyte; u16 retval; - reg_w_i(gspca_dev-dev, reg, 0x0092); - reg_w_i(gspca_dev-dev, 0x02, 0x0090); /* - read command */ + if (gspca_dev-usb_err 0) + return 0; + reg_w_i(gspca_dev, reg, 0x0092); + reg_w_i(gspca_dev, 0x02, 0x0090); /* - read command */ msleep(20); retbyte = reg_r_i(gspca_dev, 0x0091); /* read status */ if (retbyte != 0x00) @@ -5907,10 +5926,12 @@ static u8 i2c_write(struct gspca_dev *gspca_dev, { u8 retbyte; - reg_w_i(gspca_dev-dev, reg, 0x92); - reg_w_i(gspca_dev-dev, valL, 0x93); - reg_w_i(gspca_dev-dev, valH, 0x94); - reg_w_i(gspca_dev-dev, 0x01, 0x90);/* - write command */ + if (gspca_dev-usb_err 0) + return 0; + reg_w_i(gspca_dev, reg, 0x92); + reg_w_i(gspca_dev, valL, 0x93); + reg_w_i(gspca_dev, valH, 0x94); + reg_w_i(gspca_dev, 0x01, 0x90); /* - write command */ msleep(1); retbyte = reg_r_i(gspca_dev, 0x0091); /* read status */ if (retbyte != 0x00) @@ -5926,7 +5947,7 @@ static void usb_exchange(struct gspca_dev *gspca_dev, while (action-req) { switch (action-req) { case 0xa0: /* write register */ - reg_w(gspca_dev-dev, action-val, action-idx); + reg_w(gspca_dev, action-val, action-idx); break; case 0xa1: /* read status */ reg_r(gspca_dev, action-idx); @@ -6000,13 +6021,12 @@ static void setmatrix(struct gspca_dev *gspca_dev) if (matrix == NULL) return; /* matrix already loaded */ for (i = 0; i ARRAY_SIZE(ov7620_matrix); i++) - reg_w(gspca_dev-dev, matrix[i], 0x010a + i); + reg_w(gspca_dev, matrix[i], 0x010a + i); } static void setsharpness(struct gspca_dev *gspca_dev) { struct sd *sd = (struct sd *) gspca_dev; - struct usb_device *dev
[git:v4l-dvb/v2.6.36] V4L/DVB: gspca - zc3xx: Cleanup source
This is an automatic generated email to let you know that the following patch were queued at the http://git.linuxtv.org/media-tree.git tree: Subject: V4L/DVB: gspca - zc3xx: Cleanup source Author: Jean-François Moine moin...@free.fr Date:Wed Aug 4 05:11:23 2010 -0300 - use an enum to define the sensor numbers - use the sensor numbers to index the associated tables - rename TAS5130CXX to TAS5130C - rename HV7131C to HV7131R - change some comments Signed-off-by: Jean-François Moine moin...@free.fr Signed-off-by: Mauro Carvalho Chehab mche...@redhat.com drivers/media/video/gspca/zc3xx.c | 385 +++-- 1 files changed, 200 insertions(+), 185 deletions(-) --- http://git.linuxtv.org/media-tree.git?a=commitdiff;h=83d1aa3d21ce50b9bc3b503ce2b1e7bb718709f1 diff --git a/drivers/media/video/gspca/zc3xx.c b/drivers/media/video/gspca/zc3xx.c index 4473f0f..e184eb3 100644 --- a/drivers/media/video/gspca/zc3xx.c +++ b/drivers/media/video/gspca/zc3xx.c @@ -21,7 +21,9 @@ #define MODULE_NAME zc3xx +#ifdef CONFIG_INPUT #include linux/input.h +#endif #include gspca.h #include jpeg.h @@ -51,32 +53,32 @@ struct sd { #define QUALITY_DEF 70 u8 sensor; /* Type of image sensor chip */ -/* !! values used in different tables */ -#define SENSOR_ADCM2700 0 -#define SENSOR_CS2102 1 -#define SENSOR_CS2102K 2 -#define SENSOR_GC0305 3 -#define SENSOR_HDCS2020b 4 -#define SENSOR_HV7131B 5 -#define SENSOR_HV7131C 6 -#define SENSOR_ICM105A 7 -#define SENSOR_MC501CB 8 -#define SENSOR_MI0360SOC 9 -#define SENSOR_OV7620 10 -/*#define SENSOR_OV7648 10 - same values */ -#define SENSOR_OV7630C 11 -#define SENSOR_PAS106 12 -#define SENSOR_PAS202B 13 -#define SENSOR_PB0330 14 /* (MI0360) */ -#define SENSOR_PO2030 15 -#define SENSOR_TAS5130CK 16 -#define SENSOR_TAS5130CXX 17 -#define SENSOR_TAS5130C_VF0250 18 -#define SENSOR_MAX 19 - unsigned short chip_revision; + u16 chip_revision; u8 jpeg_hdr[JPEG_HDR_SZ]; }; +enum sensors { + SENSOR_ADCM2700, + SENSOR_CS2102, + SENSOR_CS2102K, + SENSOR_GC0305, + SENSOR_HDCS2020b, + SENSOR_HV7131B, + SENSOR_HV7131R, + SENSOR_ICM105A, + SENSOR_MC501CB, + SENSOR_MI0360SOC, /* = MT9V111 */ + SENSOR_OV7620, /* OV7648 - same values */ + SENSOR_OV7630C, + SENSOR_PAS106, + SENSOR_PAS202B, + SENSOR_PB0330, + SENSOR_PO2030, + SENSOR_TAS5130CK, + SENSOR_TAS5130C, + SENSOR_TAS5130C_VF0250, + SENSOR_MAX +}; /* V4L2 controls supported by the driver */ static int sd_setbrightness(struct gspca_dev *gspca_dev, __s32 val); @@ -3350,7 +3352,7 @@ static const struct usb_action ov7620_NoFliker[] = { {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, /* 01,96,00,cc */ {0xa0, 0x01, ZC3XX_R197_ANTIFLICKERLOW}, /* 01,97,01,cc */ /* {0xa0, 0x44, ZC3XX_R002_CLOCKSELECT},* 00,02,44,cc -- if mode1 (320x240) */ +* if mode1 (320x240) */ /* ?? was {0xa0, 0x00, 0x0039}, * 00,00,00,dd * {0xa1, 0x01, 0x0037}, */ @@ -3439,7 +3441,6 @@ static const struct usb_action ov7630c_InitialScale[] = { {0xa0, 0xf8, ZC3XX_R110_RGB20}, {0xa0, 0xf8, ZC3XX_R111_RGB21}, {0xa0, 0x50, ZC3XX_R112_RGB22}, -/* 0x03, */ {0xa1, 0x01, 0x0008}, {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING}, /* clock ? */ {0xa0, 0x08, ZC3XX_R1C6_SHARPNESS00}, /* sharpness+ */ @@ -3719,7 +3720,7 @@ static const struct usb_action pas106b_InitialScale[] = { /* 176x144 */ {0xaa, 0x0e, 0x0002}, {0xaa, 0x14, 0x0081}, -/* Other registors */ +/* Other registers */ {0xa0, 0x37, ZC3XX_R101_SENSORCORRECTION}, /* Frame retreiving */ {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, @@ -3730,7 +3731,7 @@ static const struct usb_action pas106b_InitialScale[] = { /* 176x144 */ /* Sharpness */ {0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE}, {0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05}, -/* Other registors */ +/* Other registers */ {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE}, /* Auto exposure and white balance */ {0xa0, 0x06, ZC3XX_R189_AWBSTATUS}, @@ -3837,7 +3838,7 @@ static const struct usb_action pas106b_Initial[] = { /* 352x288 */ {0xaa, 0x0e, 0x0002}, {0xaa, 0x14, 0x0081}, -/* Other registors */ +/* Other registers */ {0xa0, 0x37, ZC3XX_R101_SENSORCORRECTION}, /* Frame retreiving */ {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, @@ -3848,7 +3849,7 @@ static const struct usb_action pas106b_Initial[] = { /* 352x288 */ /* Sharpness */ {0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE}, {0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05}, -/* Other registors */ +/* Other registers */ {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE}, /* Auto exposure and white balance */ {0xa0, 0x06, ZC3XX_R189_AWBSTATUS
[git:v4l-dvb/v2.6.36] V4L/DVB: gspca - main: Fix a crash in gspca_frame_add()
This is an automatic generated email to let you know that the following patch were queued at the http://git.linuxtv.org/media-tree.git tree: Subject: V4L/DVB: gspca - main: Fix a crash in gspca_frame_add() Author: Jean-François Moine moin...@free.fr Date:Thu Jul 29 02:46:02 2010 -0300 Some webcams as ov511 may find many times an end of image. In this case, with the last patch in image concatenation (commit 799b1bd41f398054d46fd35f73abd01c4009f6ca), the image pointer was NULL and the system crashed in memcpy(). Signed-off-by: Jean-François Moine moin...@free.fr Signed-off-by: Mauro Carvalho Chehab mche...@redhat.com drivers/media/video/gspca/gspca.c | 19 +++ 1 files changed, 15 insertions(+), 4 deletions(-) --- http://git.linuxtv.org/media-tree.git?a=commitdiff;h=fe988f56c7c1bff52a4c26164ceb3dbd582de433 diff --git a/drivers/media/video/gspca/gspca.c b/drivers/media/video/gspca/gspca.c index 0004469..b984610 100644 --- a/drivers/media/video/gspca/gspca.c +++ b/drivers/media/video/gspca/gspca.c @@ -440,10 +440,15 @@ void gspca_frame_add(struct gspca_dev *gspca_dev, frame-v4l2_buf.sequence = ++gspca_dev-sequence; gspca_dev-image = frame-data; gspca_dev-image_len = 0; - } else if (gspca_dev-last_packet_type == DISCARD_PACKET) { - if (packet_type == LAST_PACKET) - gspca_dev-last_packet_type = packet_type; - return; + } else { + switch (gspca_dev-last_packet_type) { + case DISCARD_PACKET: + if (packet_type == LAST_PACKET) + gspca_dev-last_packet_type = packet_type; + return; + case LAST_PACKET: + return; + } } /* append the packet to the frame buffer */ @@ -454,6 +459,12 @@ void gspca_frame_add(struct gspca_dev *gspca_dev, gspca_dev-frsz); packet_type = DISCARD_PACKET; } else { +/* !! image is NULL only when last pkt is LAST or DISCARD + if (gspca_dev-image == NULL) { + err(gspca_frame_add() image == NULL); + return; + } + */ memcpy(gspca_dev-image + gspca_dev-image_len, data, len); gspca_dev-image_len += len; ___ linuxtv-commits mailing list linuxtv-commits@linuxtv.org http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits
[git:v4l-dvb/v2.6.36] V4L/DVB: uvcvideo: Add support for Miricle 307K thermal webcam
This is an automatic generated email to let you know that the following patch were queued at the http://git.linuxtv.org/media-tree.git tree: Subject: V4L/DVB: uvcvideo: Add support for Miricle 307K thermal webcam Author: Laurent Pinchart laurent.pinch...@ideasonboard.com Date:Tue Aug 3 11:18:01 2010 -0300 The camera requires the STREAM_NO_FID quirk. Add a corresponding entry in the device IDs list. Signed-off-by: Laurent Pinchart laurent.pinch...@ideasonboard.com Signed-off-by: Mauro Carvalho Chehab mche...@redhat.com drivers/media/video/uvc/uvc_driver.c |9 + 1 files changed, 9 insertions(+), 0 deletions(-) --- http://git.linuxtv.org/media-tree.git?a=commitdiff;h=70092c26dcfcdcc463e157c103ec4c9d2d49de67 diff --git a/drivers/media/video/uvc/uvc_driver.c b/drivers/media/video/uvc/uvc_driver.c index 7eaf99b..8bdd940 100644 --- a/drivers/media/video/uvc/uvc_driver.c +++ b/drivers/media/video/uvc/uvc_driver.c @@ -2145,6 +2145,15 @@ static struct usb_device_id uvc_ids[] = { .bInterfaceSubClass = 1, .bInterfaceProtocol = 0, .driver_info = UVC_QUIRK_STREAM_NO_FID }, + /* Miricle 307K */ + { .match_flags = USB_DEVICE_ID_MATCH_DEVICE + | USB_DEVICE_ID_MATCH_INT_INFO, + .idVendor = 0x17dc, + .idProduct= 0x0202, + .bInterfaceClass = USB_CLASS_VIDEO, + .bInterfaceSubClass = 1, + .bInterfaceProtocol = 0, + .driver_info = UVC_QUIRK_STREAM_NO_FID }, /* Lenovo Thinkpad SL400/SL500 */ { .match_flags = USB_DEVICE_ID_MATCH_DEVICE | USB_DEVICE_ID_MATCH_INT_INFO, ___ linuxtv-commits mailing list linuxtv-commits@linuxtv.org http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits
[git:v4l-dvb/v2.6.36] V4L/DVB: uvcvideo: Drop corrupted compressed frames
This is an automatic generated email to let you know that the following patch were queued at the http://git.linuxtv.org/media-tree.git tree: Subject: V4L/DVB: uvcvideo: Drop corrupted compressed frames Author: Laurent Pinchart laurent.pinch...@ideasonboard.com Date:Thu Jun 17 06:52:37 2010 -0300 Corrupted video frames are dropped by default by the driver for uncompressed formats. Data corruption is not less problematic for compressed formats, so frame drop should be enabled by default for those formats as well. Mark buffers as faulty when an isochronous packet loss is detected for any format, or when the buffer length doesn't match the image size for uncompressed formats. Drop erroneous buffers regardless of whether the format is compressed or uncompressed. Signed-off-by: Laurent Pinchart laurent.pinch...@ideasonboard.com Signed-off-by: Mauro Carvalho Chehab mche...@redhat.com drivers/media/video/uvc/uvc_queue.c | 13 + drivers/media/video/uvc/uvc_video.c | 19 +++ drivers/media/video/uvc/uvcvideo.h |5 +++-- 3 files changed, 23 insertions(+), 14 deletions(-) --- http://git.linuxtv.org/media-tree.git?a=commitdiff;h=9bde9f263e958b0d588aada03854fcc0f0c88b86 diff --git a/drivers/media/video/uvc/uvc_queue.c b/drivers/media/video/uvc/uvc_queue.c index 133c78d..e9928a4 100644 --- a/drivers/media/video/uvc/uvc_queue.c +++ b/drivers/media/video/uvc/uvc_queue.c @@ -78,12 +78,14 @@ * */ -void uvc_queue_init(struct uvc_video_queue *queue, enum v4l2_buf_type type) +void uvc_queue_init(struct uvc_video_queue *queue, enum v4l2_buf_type type, + int drop_corrupted) { mutex_init(queue-mutex); spin_lock_init(queue-irqlock); INIT_LIST_HEAD(queue-mainqueue); INIT_LIST_HEAD(queue-irqqueue); + queue-flags = drop_corrupted ? UVC_QUEUE_DROP_CORRUPTED : 0; queue-type = type; } @@ -435,8 +437,10 @@ int uvc_queue_enable(struct uvc_video_queue *queue, int enable) uvc_queue_cancel(queue, 0); INIT_LIST_HEAD(queue-mainqueue); - for (i = 0; i queue-count; ++i) + for (i = 0; i queue-count; ++i) { + queue-buffer[i].error = 0; queue-buffer[i].state = UVC_BUF_STATE_IDLE; + } queue-flags = ~UVC_QUEUE_STREAMING; } @@ -488,8 +492,8 @@ struct uvc_buffer *uvc_queue_next_buffer(struct uvc_video_queue *queue, struct uvc_buffer *nextbuf; unsigned long flags; - if ((queue-flags UVC_QUEUE_DROP_INCOMPLETE) - buf-buf.length != buf-buf.bytesused) { + if ((queue-flags UVC_QUEUE_DROP_CORRUPTED) buf-error) { + buf-error = 0; buf-state = UVC_BUF_STATE_QUEUED; buf-buf.bytesused = 0; return buf; @@ -497,6 +501,7 @@ struct uvc_buffer *uvc_queue_next_buffer(struct uvc_video_queue *queue, spin_lock_irqsave(queue-irqlock, flags); list_del(buf-queue); + buf-error = 0; buf-state = UVC_BUF_STATE_DONE; if (!list_empty(queue-irqqueue)) nextbuf = list_first_entry(queue-irqqueue, struct uvc_buffer, diff --git a/drivers/media/video/uvc/uvc_video.c b/drivers/media/video/uvc/uvc_video.c index 53f3ef4..e27cf0d 100644 --- a/drivers/media/video/uvc/uvc_video.c +++ b/drivers/media/video/uvc/uvc_video.c @@ -555,6 +555,9 @@ static void uvc_video_decode_isoc(struct urb *urb, struct uvc_streaming *stream, if (urb-iso_frame_desc[i].status 0) { uvc_trace(UVC_TRACE_FRAME, USB isochronous frame lost (%d).\n, urb-iso_frame_desc[i].status); + /* Mark the buffer as faulty. */ + if (buf != NULL) + buf-error = 1; continue; } @@ -579,8 +582,14 @@ static void uvc_video_decode_isoc(struct urb *urb, struct uvc_streaming *stream, uvc_video_decode_end(stream, buf, mem, urb-iso_frame_desc[i].actual_length); - if (buf-state == UVC_BUF_STATE_READY) + if (buf-state == UVC_BUF_STATE_READY) { + if (buf-buf.length != buf-buf.bytesused + !(stream-cur_format-flags + UVC_FMT_FLAG_COMPRESSED)) + buf-error = 1; + buf = uvc_queue_next_buffer(stream-queue, buf); + } } } @@ -1104,7 +1113,7 @@ int uvc_video_init(struct uvc_streaming *stream) atomic_set(stream-active, 0); /* Initialize the video buffers queue. */ - uvc_queue_init(stream-queue, stream-type); + uvc_queue_init(stream-queue, stream-type, !uvc_no_drop_param); /* Alternate setting 0 should be the default, yet the XBox Live Vision * Cam (and possibly other
[git:v4l-dvb/v2.6.36] V4L/DVB: IR keymap: Add print button for HP OEM version of MCE remote
This is an automatic generated email to let you know that the following patch were queued at the http://git.linuxtv.org/media-tree.git tree: Subject: V4L/DVB: IR keymap: Add print button for HP OEM version of MCE remote Author: Andy Walls awa...@md.metrocast.net Date:Sat Jul 31 14:23:04 2010 -0300 This patch adds a defintion for the Print button found on HP OEM versions of the MCE remote. All of the other keys found on the HP OEM version of the remote match the other keys as already defined. Because, who doesn't need remote printing, while one is sitting on the couch across from one's PC? ;) Signed-off-by: Andy Walls awa...@md.metrocast.net Acked-by: Jarod Wilson ja...@redhat.com Signed-off-by: Mauro Carvalho Chehab mche...@redhat.com drivers/media/IR/keymaps/rc-rc6-mce.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) --- http://git.linuxtv.org/media-tree.git?a=commitdiff;h=df49d113d16b18070b3d51832f3a02145eeb354b diff --git a/drivers/media/IR/keymaps/rc-rc6-mce.c b/drivers/media/IR/keymaps/rc-rc6-mce.c index c6726a8..64264f7 100644 --- a/drivers/media/IR/keymaps/rc-rc6-mce.c +++ b/drivers/media/IR/keymaps/rc-rc6-mce.c @@ -74,6 +74,8 @@ static struct ir_scancode rc6_mce[] = { { 0x800f045a, KEY_SUBTITLE }, /* Caption/Teletext */ { 0x800f044d, KEY_TITLE }, + { 0x800f044e, KEY_PRINT }, /* Print - HP OEM version of remote */ + { 0x800f040c, KEY_POWER }, { 0x800f040d, KEY_PROG1 }, /* Windows MCE button */ ___ linuxtv-commits mailing list linuxtv-commits@linuxtv.org http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits
[git:v4l-dvb/v2.6.36] V4L/DVB: IR: Port ene driver to new IR subsystem and enable it
This is an automatic generated email to let you know that the following patch were queued at the http://git.linuxtv.org/media-tree.git tree: Subject: V4L/DVB: IR: Port ene driver to new IR subsystem and enable it Author: Maxim Levitsky maximlevit...@gmail.com Date:Sat Jul 31 11:59:26 2010 -0300 Signed-off-by: Maxim Levitsky maximlevit...@gmail.com Signed-off-by: Mauro Carvalho Chehab mche...@redhat.com MAINTAINERS |6 + drivers/media/IR/Kconfig | 14 + drivers/media/IR/Makefile |1 + drivers/media/IR/ene_ir.c | 595 + drivers/media/IR/ene_ir.h | 49 ++-- 5 files changed, 264 insertions(+), 401 deletions(-) --- http://git.linuxtv.org/media-tree.git?a=commitdiff;h=931e39a13924f528754f07555689f77588e97763 diff --git a/MAINTAINERS b/MAINTAINERS index 0af9595..423eadd 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -2203,6 +2203,12 @@ F: drivers/misc/cb710/ F: drivers/mmc/host/cb710-mmc.* F: include/linux/cb710.h +ENE KB2426 (ENE0100/ENE020XX) INFRARED RECEIVER +M: Maxim Levitsky maximlevit...@gmail.com +S: Maintained +F: drivers/media/IR/ene_ir.c +F: drivers/media/IR/ene_ir.h + EPSON 1355 FRAMEBUFFER DRIVER M: Christopher Hoover c...@murgatroid.com M: Christopher Hoover c...@hpl.hp.com diff --git a/drivers/media/IR/Kconfig b/drivers/media/IR/Kconfig index 9e8f82d..30e0491 100644 --- a/drivers/media/IR/Kconfig +++ b/drivers/media/IR/Kconfig @@ -106,6 +106,20 @@ config IR_MCEUSB To compile this driver as a module, choose M here: the module will be called mceusb. +config IR_ENE + tristate ENE eHome Receiver/Transciever (pnp id: ENE0100/ENE02xxx) + depends on PNP + depends on IR_CORE + ---help--- + Say Y here to enable support for integrated infrared receiver + /transciever made by ENE. + + You can see if you have it by looking at lspnp output. + Output should include ENE0100 ENE0200 or something similiar. + + To compile this driver as a module, choose M here: the + module will be called ene_ir. + config IR_STREAMZAP tristate Streamzap PC Remote IR Receiver depends on USB_ARCH_HAS_HCD diff --git a/drivers/media/IR/Makefile b/drivers/media/IR/Makefile index 2566fb4..5367683 100644 --- a/drivers/media/IR/Makefile +++ b/drivers/media/IR/Makefile @@ -16,4 +16,5 @@ obj-$(CONFIG_IR_LIRC_CODEC) += ir-lirc-codec.o # stand-alone IR receivers/transmitters obj-$(CONFIG_IR_IMON) += imon.o obj-$(CONFIG_IR_MCEUSB) += mceusb.o +obj-$(CONFIG_IR_ENE) += ene_ir.o obj-$(CONFIG_IR_STREAMZAP) += streamzap.o diff --git a/drivers/media/IR/ene_ir.c b/drivers/media/IR/ene_ir.c index 9d11caf..5447750 100644 --- a/drivers/media/IR/ene_ir.c +++ b/drivers/media/IR/ene_ir.c @@ -1,5 +1,5 @@ /* - * driver for ENE KB3926 B/C/D CIR (also known as ENE0100/ENE0200/ENE0201) + * driver for ENE KB3926 B/C/D CIR (pnp id: ENE0XXX) * * Copyright (C) 2010 Maxim Levitsky maximlevit...@gmail.com * @@ -25,20 +25,20 @@ #include linux/io.h #include linux/interrupt.h #include linux/sched.h -#include linux/uaccess.h -#include lirc_ene0100.h +#include linux/slab.h +#include linux/input.h +#include media/ir-core.h +#include media/ir-common.h +#include ene_ir.h static int sample_period = -1; static int enable_idle = 1; -static int enable_duty_carrier; static int input = 1; static int debug; static int txsim; -static void ene_rx_set_idle(struct ene_device *dev, int idle); static int ene_irq_status(struct ene_device *dev); -static void ene_send_sample(struct ene_device *dev, unsigned long sample); /* read a hardware register */ static u8 ene_hw_read_reg(struct ene_device *dev, u16 reg) @@ -85,6 +85,7 @@ static int ene_hw_detect(struct ene_device *dev) u8 hw_revision, old_ver; u8 tmp; u8 fw_capabilities; + int pll_freq; tmp = ene_hw_read_reg(dev, ENE_HW_UNK); ene_hw_write_reg(dev, ENE_HW_UNK, tmp ~ENE_HW_UNK_CLR); @@ -96,6 +97,17 @@ static int ene_hw_detect(struct ene_device *dev) hw_revision = ene_hw_read_reg(dev, ENE_HW_VERSION); old_ver = ene_hw_read_reg(dev, ENE_HW_VER_OLD); + pll_freq = (ene_hw_read_reg(dev, ENE_PLLFRH) 4) + + (ene_hw_read_reg(dev, ENE_PLLFRL) 4); + + if (pll_freq != 1000) + dev-rx_period_adjust = 4; + else + dev-rx_period_adjust = 2; + + + ene_printk(KERN_NOTICE, PLL freq = %d\n, pll_freq); + if (hw_revision == 0xFF) { ene_printk(KERN_WARNING, device seems to be disabled\n); @@ -160,7 +172,7 @@ static int ene_hw_detect(struct ene_device *dev) } /* this enables/disables IR input via gpio40*/ -static void ene_enable_gpio40_recieve(struct ene_device *dev, int enable) +static void ene_enable_gpio40_receive(struct ene_device *dev, int enable) { ene_hw_write_reg_mask(dev, ENE_CIR_CONF2, enable
[git:v4l-dvb/v2.6.36] V4L/DVB: IR: report unknown scancodes the in-kernel decoders found
This is an automatic generated email to let you know that the following patch were queued at the http://git.linuxtv.org/media-tree.git tree: Subject: V4L/DVB: IR: report unknown scancodes the in-kernel decoders found Author: Maxim Levitsky maximlevit...@gmail.com Date:Sat Jul 31 11:59:24 2010 -0300 This way it is possible to use evtest to create keymap for unknown remote. Signed-off-by: Maxim Levitsky maximlevit...@gmail.com Signed-off-by: Mauro Carvalho Chehab mche...@redhat.com drivers/media/IR/ir-keytable.c |8 1 files changed, 8 insertions(+), 0 deletions(-) --- http://git.linuxtv.org/media-tree.git?a=commitdiff;h=ed4d3876d18d95406e0258a6421b1f4eda51d629 diff --git a/drivers/media/IR/ir-keytable.c b/drivers/media/IR/ir-keytable.c index 411976d..7032ea0 100644 --- a/drivers/media/IR/ir-keytable.c +++ b/drivers/media/IR/ir-keytable.c @@ -339,6 +339,8 @@ void ir_repeat(struct input_dev *dev) spin_lock_irqsave(ir-keylock, flags); + input_event(dev, EV_MSC, MSC_SCAN, ir-last_scancode); + if (!ir-keypressed) goto out; @@ -370,6 +372,8 @@ void ir_keydown(struct input_dev *dev, int scancode, u8 toggle) spin_lock_irqsave(ir-keylock, flags); + input_event(dev, EV_MSC, MSC_SCAN, scancode); + /* Repeat event? */ if (ir-keypressed ir-last_scancode == scancode @@ -383,9 +387,11 @@ void ir_keydown(struct input_dev *dev, int scancode, u8 toggle) ir-last_toggle = toggle; ir-last_keycode = keycode; + if (keycode == KEY_RESERVED) goto out; + /* Register a keypress */ ir-keypressed = true; IR_dprintk(1, %s: key down event, key 0x%04x, scancode 0x%04x\n, @@ -480,6 +486,8 @@ int __ir_input_register(struct input_dev *input_dev, set_bit(EV_KEY, input_dev-evbit); set_bit(EV_REP, input_dev-evbit); + set_bit(EV_MSC, input_dev-evbit); + set_bit(MSC_SCAN, input_dev-mscbit); if (ir_setkeytable(input_dev, ir_dev-rc_tab, rc_tab)) { rc = -ENOMEM; ___ linuxtv-commits mailing list linuxtv-commits@linuxtv.org http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits
[git:v4l-dvb/v2.6.36] V4L/DVB: IR: Allow not to compile keymaps in
This is an automatic generated email to let you know that the following patch were queued at the http://git.linuxtv.org/media-tree.git tree: Subject: V4L/DVB: IR: Allow not to compile keymaps in Author: Maxim Levitsky maximlevit...@gmail.com Date:Sat Jul 31 11:59:21 2010 -0300 Currently, ir device registration fails if keymap requested by driver is not found. Fix that by always compiling in the empty keymap, and using it as a failback. Signed-off-by: Maxim Levitsky maximlevit...@gmail.com Acked-by: Jarod Wilson ja...@redhat.com Signed-off-by: Mauro Carvalho Chehab mche...@redhat.com drivers/media/IR/ir-core-priv.h |3 +- drivers/media/IR/ir-sysfs.c |2 + drivers/media/IR/keymaps/Makefile |1 - drivers/media/IR/keymaps/rc-empty.c | 44 --- drivers/media/IR/rc-map.c | 23 ++ include/media/ir-core.h |8 - 6 files changed, 33 insertions(+), 48 deletions(-) --- http://git.linuxtv.org/media-tree.git?a=commitdiff;h=b378f43fe9466e7712a8b16be64795ffca3a937e diff --git a/drivers/media/IR/ir-core-priv.h b/drivers/media/IR/ir-core-priv.h index 502d477..be68172 100644 --- a/drivers/media/IR/ir-core-priv.h +++ b/drivers/media/IR/ir-core-priv.h @@ -126,7 +126,8 @@ int ir_raw_handler_register(struct ir_raw_handler *ir_raw_handler); void ir_raw_handler_unregister(struct ir_raw_handler *ir_raw_handler); void ir_raw_init(void); - +int ir_rcmap_init(void); +void ir_rcmap_cleanup(void); /* * Decoder initialization code * diff --git a/drivers/media/IR/ir-sysfs.c b/drivers/media/IR/ir-sysfs.c index 6273047..96dafc4 100644 --- a/drivers/media/IR/ir-sysfs.c +++ b/drivers/media/IR/ir-sysfs.c @@ -325,6 +325,7 @@ static int __init ir_core_init(void) /* Initialize/load the decoders/keymap code that will be used */ ir_raw_init(); + ir_rcmap_init(); return 0; } @@ -332,6 +333,7 @@ static int __init ir_core_init(void) static void __exit ir_core_exit(void) { class_unregister(ir_input_class); + ir_rcmap_cleanup(); } module_init(ir_core_init); diff --git a/drivers/media/IR/keymaps/Makefile b/drivers/media/IR/keymaps/Makefile index c9fcc41..950e5d9 100644 --- a/drivers/media/IR/keymaps/Makefile +++ b/drivers/media/IR/keymaps/Makefile @@ -19,7 +19,6 @@ obj-$(CONFIG_RC_MAP) += rc-adstech-dvb-t-pci.o \ rc-dm1105-nec.o \ rc-dntv-live-dvb-t.o \ rc-dntv-live-dvbt-pro.o \ - rc-empty.o \ rc-em-terratec.o \ rc-encore-enltv2.o \ rc-encore-enltv.o \ diff --git a/drivers/media/IR/keymaps/rc-empty.c b/drivers/media/IR/keymaps/rc-empty.c deleted file mode 100644 index 3b338d8..000 --- a/drivers/media/IR/keymaps/rc-empty.c +++ /dev/null @@ -1,44 +0,0 @@ -/* empty.h - Keytable for empty Remote Controller - * - * keymap imported from ir-keymaps.c - * - * Copyright (c) 2010 by Mauro Carvalho Chehab mche...@redhat.com - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - */ - -#include media/rc-map.h - -/* empty keytable, can be used as placeholder for not-yet created keytables */ - -static struct ir_scancode empty[] = { - { 0x2a, KEY_COFFEE }, -}; - -static struct rc_keymap empty_map = { - .map = { - .scan= empty, - .size= ARRAY_SIZE(empty), - .ir_type = IR_TYPE_UNKNOWN, /* Legacy IR type */ - .name= RC_MAP_EMPTY, - } -}; - -static int __init init_rc_map_empty(void) -{ - return ir_register_map(empty_map); -} - -static void __exit exit_rc_map_empty(void) -{ - ir_unregister_map(empty_map); -} - -module_init(init_rc_map_empty) -module_exit(exit_rc_map_empty) - -MODULE_LICENSE(GPL); -MODULE_AUTHOR(Mauro Carvalho Chehab mche...@redhat.com); diff --git a/drivers/media/IR/rc-map.c b/drivers/media/IR/rc-map.c index 46a8f15..689143f 100644 --- a/drivers/media/IR/rc-map.c +++ b/drivers/media/IR/rc-map.c @@ -82,3 +82,26 @@ void ir_unregister_map(struct rc_keymap *map) } EXPORT_SYMBOL_GPL(ir_unregister_map); + +static struct ir_scancode empty[] = { + { 0x2a, KEY_COFFEE }, +}; + +static struct rc_keymap empty_map = { + .map = { + .scan= empty, + .size= ARRAY_SIZE(empty), + .ir_type = IR_TYPE_UNKNOWN, /* Legacy IR type */ + .name= RC_MAP_EMPTY, + } +}; + +int ir_rcmap_init(void) +{ + return ir_register_map(empty_map); +} + +void ir_rcmap_cleanup(void) +{ + ir_unregister_map(empty_map); +} diff --git a/include/media/ir-core.h b/include/media/ir-core.h index 513e60d..197d05a 100644 --- a/include/media/ir-core.h
[git:v4l-dvb/v2.6.36] V4L/DVB: IR: nec decoder: fix repeat
This is an automatic generated email to let you know that the following patch were queued at the http://git.linuxtv.org/media-tree.git tree: Subject: V4L/DVB: IR: nec decoder: fix repeat Author: Maxim Levitsky maximlevit...@gmail.com Date:Sat Jul 31 11:59:19 2010 -0300 Repeat space is 4 units, not 8. Current code would never trigger a repeat. However that isn't true for NECX, so repeat there must be handled differently. Signed-off-by: Maxim Levitsky maximlevit...@gmail.com Reviewed-by: Andy Walls awa...@md.metrocast.net Signed-off-by: Mauro Carvalho Chehab mche...@redhat.com drivers/media/IR/ir-nec-decoder.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) --- http://git.linuxtv.org/media-tree.git?a=commitdiff;h=e31f41278f0bed38ee16b55d09b49bed2f1b2085 diff --git a/drivers/media/IR/ir-nec-decoder.c b/drivers/media/IR/ir-nec-decoder.c index 52e0f37..1c0cf03 100644 --- a/drivers/media/IR/ir-nec-decoder.c +++ b/drivers/media/IR/ir-nec-decoder.c @@ -20,7 +20,7 @@ #define NEC_HEADER_PULSE (16 * NEC_UNIT) #define NECX_HEADER_PULSE (8 * NEC_UNIT) /* Less common NEC variant */ #define NEC_HEADER_SPACE (8 * NEC_UNIT) -#define NEC_REPEAT_SPACE (8 * NEC_UNIT) +#define NEC_REPEAT_SPACE (4 * NEC_UNIT) #define NEC_BIT_PULSE (1 * NEC_UNIT) #define NEC_BIT_0_SPACE(1 * NEC_UNIT) #define NEC_BIT_1_SPACE(3 * NEC_UNIT) ___ linuxtv-commits mailing list linuxtv-commits@linuxtv.org http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits
[git:v4l-dvb/v2.6.36] V4L/DVB: cx25840/ivtv: replace ugly priv control with s_config
This is an automatic generated email to let you know that the following patch were queued at the http://git.linuxtv.org/media-tree.git tree: Subject: V4L/DVB: cx25840/ivtv: replace ugly priv control with s_config Author: Hans Verkuil hverk...@xs4all.nl Date:Fri Aug 6 10:53:19 2010 -0300 The cx25840 used a private control CX25840_CID_ENABLE_PVR150_WORKAROUND to be told whether to enable a workaround for certain pvr150 cards. This is really config data that it needs to get at load time. Implemented this in cx25840 and ivtv. Signed-off-by: Hans Verkuil hverk...@xs4all.nl Signed-off-by: Mauro Carvalho Chehab mche...@redhat.com drivers/media/video/cx25840/cx25840-core.c | 23 +++ drivers/media/video/cx25840/cx25840-core.h |8 drivers/media/video/ivtv/ivtv-driver.c |9 + drivers/media/video/ivtv/ivtv-i2c.c|7 +++ include/media/cx25840.h| 12 5 files changed, 35 insertions(+), 24 deletions(-) --- http://git.linuxtv.org/media-tree.git?a=commitdiff;h=72c851b00f6c86353c54fdd9f1ef88d82e8df6c5 diff --git a/drivers/media/video/cx25840/cx25840-core.c b/drivers/media/video/cx25840/cx25840-core.c index 9fab0b1..6976372 100644 --- a/drivers/media/video/cx25840/cx25840-core.c +++ b/drivers/media/video/cx25840/cx25840-core.c @@ -1127,11 +1127,6 @@ static int cx25840_s_ctrl(struct v4l2_subdev *sd, struct v4l2_control *ctrl) struct i2c_client *client = v4l2_get_subdevdata(sd); switch (ctrl-id) { - case CX25840_CID_ENABLE_PVR150_WORKAROUND: - state-pvr150_workaround = ctrl-value; - set_input(client, state-vid_input, state-aud_input); - break; - case V4L2_CID_BRIGHTNESS: if (ctrl-value 0 || ctrl-value 255) { v4l_err(client, invalid brightness setting %d\n, @@ -1194,9 +1189,6 @@ static int cx25840_g_ctrl(struct v4l2_subdev *sd, struct v4l2_control *ctrl) struct i2c_client *client = v4l2_get_subdevdata(sd); switch (ctrl-id) { - case CX25840_CID_ENABLE_PVR150_WORKAROUND: - ctrl-value = state-pvr150_workaround; - break; case V4L2_CID_BRIGHTNESS: ctrl-value = (s8)cx25840_read(client, 0x414) + 128; break; @@ -1792,6 +1784,20 @@ static int cx25840_log_status(struct v4l2_subdev *sd) return 0; } +static int cx25840_s_config(struct v4l2_subdev *sd, int irq, void *platform_data) +{ + struct cx25840_state *state = to_state(sd); + struct i2c_client *client = v4l2_get_subdevdata(sd); + + if (platform_data) { + struct cx25840_platform_data *pdata = platform_data; + + state-pvr150_workaround = pdata-pvr150_workaround; + set_input(client, state-vid_input, state-aud_input); + } + return 0; +} + static int cx23885_irq_handler(struct v4l2_subdev *sd, u32 status, bool *handled) { @@ -1879,6 +1885,7 @@ static int cx25840_irq_handler(struct v4l2_subdev *sd, u32 status, static const struct v4l2_subdev_core_ops cx25840_core_ops = { .log_status = cx25840_log_status, + .s_config = cx25840_s_config, .g_chip_ident = cx25840_g_chip_ident, .g_ctrl = cx25840_g_ctrl, .s_ctrl = cx25840_s_ctrl, diff --git a/drivers/media/video/cx25840/cx25840-core.h b/drivers/media/video/cx25840/cx25840-core.h index 8f47322..8ac57a1 100644 --- a/drivers/media/video/cx25840/cx25840-core.h +++ b/drivers/media/video/cx25840/cx25840-core.h @@ -26,14 +26,6 @@ #include media/v4l2-chip-ident.h #include linux/i2c.h -/* ENABLE_PVR150_WORKAROUND activates a workaround for a hardware bug that is - present in Hauppauge PVR-150 (and possibly PVR-500) cards that have - certain NTSC tuners (tveeprom tuner model numbers 85, 99 and 112). The - audio autodetect fails on some channels for these models and the workaround - is to select the audio standard explicitly. Many thanks to Hauppauge for - providing this information. */ -#define CX25840_CID_ENABLE_PVR150_WORKAROUND (V4L2_CID_PRIVATE_BASE+0) - struct cx25840_ir_state; struct cx25840_state { diff --git a/drivers/media/video/ivtv/ivtv-driver.c b/drivers/media/video/ivtv/ivtv-driver.c index 07c5c18..f72e9d1 100644 --- a/drivers/media/video/ivtv/ivtv-driver.c +++ b/drivers/media/video/ivtv/ivtv-driver.c @@ -1269,15 +1269,8 @@ int ivtv_init_on_first_open(struct ivtv *itv) IVTV_DEBUG_INFO(Getting firmware version..\n); ivtv_firmware_versions(itv); - if (itv-card-hw_all IVTV_HW_CX25840) { - struct v4l2_control ctrl; - + if (itv-card-hw_all IVTV_HW_CX25840) v4l2_subdev_call(itv-sd_video, core, load_fw); - /* CX25840_CID_ENABLE_PVR150_WORKAROUND */ - ctrl.id = V4L2_CID_PRIVATE_BASE; - ctrl.value = itv-pvr150_workaround
[git:v4l-dvb/v2.6.36] V4L/DVB: IR: NECX: support repeat
This is an automatic generated email to let you know that the following patch were queued at the http://git.linuxtv.org/media-tree.git tree: Subject: V4L/DVB: IR: NECX: support repeat Author: Maxim Levitsky maximlevit...@gmail.com Date:Sat Jul 31 11:59:20 2010 -0300 This adds support for repeat detecting for NECX variant Tested with uneversal remote Signed-off-by: Maxim Levitsky maximlevit...@gmail.com Signed-off-by: Mauro Carvalho Chehab mche...@redhat.com drivers/media/IR/ir-core-priv.h |2 ++ drivers/media/IR/ir-nec-decoder.c | 23 +-- 2 files changed, 23 insertions(+), 2 deletions(-) --- http://git.linuxtv.org/media-tree.git?a=commitdiff;h=86ff071cad3e7e4c7469b3941bfced6fe9b04b5f diff --git a/drivers/media/IR/ir-core-priv.h b/drivers/media/IR/ir-core-priv.h index 84c7a9a..502d477 100644 --- a/drivers/media/IR/ir-core-priv.h +++ b/drivers/media/IR/ir-core-priv.h @@ -45,6 +45,8 @@ struct ir_raw_event_ctrl { int state; unsigned count; u32 bits; + bool is_nec_x; + bool necx_repeat; } nec; struct rc5_dec { int state; diff --git a/drivers/media/IR/ir-nec-decoder.c b/drivers/media/IR/ir-nec-decoder.c index 1c0cf03..d597421 100644 --- a/drivers/media/IR/ir-nec-decoder.c +++ b/drivers/media/IR/ir-nec-decoder.c @@ -26,6 +26,7 @@ #define NEC_BIT_1_SPACE(3 * NEC_UNIT) #defineNEC_TRAILER_PULSE (1 * NEC_UNIT) #defineNEC_TRAILER_SPACE (10 * NEC_UNIT) /* even longer in reality */ +#define NECX_REPEAT_BITS 1 enum nec_state { STATE_INACTIVE, @@ -67,8 +68,12 @@ static int ir_nec_decode(struct input_dev *input_dev, struct ir_raw_event ev) if (!ev.pulse) break; - if (!eq_margin(ev.duration, NEC_HEADER_PULSE, NEC_UNIT / 2) - !eq_margin(ev.duration, NECX_HEADER_PULSE, NEC_UNIT / 2)) + if (eq_margin(ev.duration, NEC_HEADER_PULSE, NEC_UNIT / 2)) { + data-is_nec_x = false; + data-necx_repeat = false; + } else if (eq_margin(ev.duration, NECX_HEADER_PULSE, NEC_UNIT / 2)) + data-is_nec_x = true; + else break; data-count = 0; @@ -105,6 +110,17 @@ static int ir_nec_decode(struct input_dev *input_dev, struct ir_raw_event ev) if (ev.pulse) break; + if (data-necx_repeat data-count == NECX_REPEAT_BITS + geq_margin(ev.duration, + NEC_TRAILER_SPACE, NEC_UNIT / 2)) { + IR_dprintk(1, Repeat last key\n); + ir_repeat(input_dev); + data-state = STATE_INACTIVE; + return 0; + + } else if (data-count NECX_REPEAT_BITS) + data-necx_repeat = false; + data-bits = 1; if (eq_margin(ev.duration, NEC_BIT_1_SPACE, NEC_UNIT / 2)) data-bits |= 1; @@ -159,6 +175,9 @@ static int ir_nec_decode(struct input_dev *input_dev, struct ir_raw_event ev) IR_dprintk(1, NEC scancode 0x%04x\n, scancode); } + if (data-is_nec_x) + data-necx_repeat = true; + ir_keydown(input_dev, scancode, 0); data-state = STATE_INACTIVE; return 0; ___ linuxtv-commits mailing list linuxtv-commits@linuxtv.org http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits
[git:v4l-dvb/v2.6.36] V4L/DVB: saa7115: convert to the new control framework
This is an automatic generated email to let you know that the following patch were queued at the http://git.linuxtv.org/media-tree.git tree: Subject: V4L/DVB: saa7115: convert to the new control framework Author: Hans Verkuil hverk...@xs4all.nl Date:Mon May 24 10:00:52 2010 -0300 Signed-off-by: Hans Verkuil hverk...@xs4all.nl Signed-off-by: Mauro Carvalho Chehab mche...@redhat.com drivers/media/video/saa7115.c | 183 +++-- 1 files changed, 83 insertions(+), 100 deletions(-) --- http://git.linuxtv.org/media-tree.git?a=commitdiff;h=e356054337fe42a1b98725c8e68d6599764888b9 diff --git a/drivers/media/video/saa7115.c b/drivers/media/video/saa7115.c index 76da743..ee963f4 100644 --- a/drivers/media/video/saa7115.c +++ b/drivers/media/video/saa7115.c @@ -45,6 +45,7 @@ #include linux/i2c.h #include linux/videodev2.h #include media/v4l2-device.h +#include media/v4l2-ctrls.h #include media/v4l2-chip-ident.h #include media/v4l2-i2c-drv.h #include media/saa7115.h @@ -65,16 +66,19 @@ MODULE_PARM_DESC(debug, Debug level (0-1)); struct saa711x_state { struct v4l2_subdev sd; + struct v4l2_ctrl_handler hdl; + + struct { + /* chroma gain control cluster */ + struct v4l2_ctrl *agc; + struct v4l2_ctrl *gain; + }; + v4l2_std_id std; int input; int output; int enable; int radio; - int bright; - int contrast; - int hue; - int sat; - int chroma_agc; int width; int height; u32 ident; @@ -90,6 +94,11 @@ static inline struct saa711x_state *to_state(struct v4l2_subdev *sd) return container_of(sd, struct saa711x_state, sd); } +static inline struct v4l2_subdev *to_sd(struct v4l2_ctrl *ctrl) +{ + return container_of(ctrl-handler, struct saa711x_state, hdl)-sd; +} + /* --- */ static inline int saa711x_write(struct v4l2_subdev *sd, u8 reg, u8 value) @@ -741,96 +750,53 @@ static int saa711x_s_clock_freq(struct v4l2_subdev *sd, u32 freq) return 0; } -static int saa711x_s_ctrl(struct v4l2_subdev *sd, struct v4l2_control *ctrl) +static int saa711x_g_volatile_ctrl(struct v4l2_ctrl *ctrl) { + struct v4l2_subdev *sd = to_sd(ctrl); struct saa711x_state *state = to_state(sd); - u8 val; switch (ctrl-id) { - case V4L2_CID_BRIGHTNESS: - if (ctrl-value 0 || ctrl-value 255) { - v4l2_err(sd, invalid brightness setting %d\n, ctrl-value); - return -ERANGE; - } - - state-bright = ctrl-value; - saa711x_write(sd, R_0A_LUMA_BRIGHT_CNTL, state-bright); - break; - - case V4L2_CID_CONTRAST: - if (ctrl-value 0 || ctrl-value 127) { - v4l2_err(sd, invalid contrast setting %d\n, ctrl-value); - return -ERANGE; - } - - state-contrast = ctrl-value; - saa711x_write(sd, R_0B_LUMA_CONTRAST_CNTL, state-contrast); - break; - - case V4L2_CID_SATURATION: - if (ctrl-value 0 || ctrl-value 127) { - v4l2_err(sd, invalid saturation setting %d\n, ctrl-value); - return -ERANGE; - } - - state-sat = ctrl-value; - saa711x_write(sd, R_0C_CHROMA_SAT_CNTL, state-sat); - break; - - case V4L2_CID_HUE: - if (ctrl-value -128 || ctrl-value 127) { - v4l2_err(sd, invalid hue setting %d\n, ctrl-value); - return -ERANGE; - } - - state-hue = ctrl-value; - saa711x_write(sd, R_0D_CHROMA_HUE_CNTL, state-hue); - break; case V4L2_CID_CHROMA_AGC: - val = saa711x_read(sd, R_0F_CHROMA_GAIN_CNTL); - state-chroma_agc = ctrl-value; - if (ctrl-value) - val = 0x7f; - else - val |= 0x80; - saa711x_write(sd, R_0F_CHROMA_GAIN_CNTL, val); + /* chroma gain cluster */ + if (state-agc-cur.val) + state-gain-cur.val = + saa711x_read(sd, R_0F_CHROMA_GAIN_CNTL) 0x7f; break; - case V4L2_CID_CHROMA_GAIN: - /* Chroma gain cannot be set when AGC is enabled */ - if (state-chroma_agc == 1) - return -EINVAL; - saa711x_write(sd, R_0F_CHROMA_GAIN_CNTL, ctrl-value | 0x80); - break; - default: - return -EINVAL; } - return 0; } -static int saa711x_g_ctrl(struct v4l2_subdev *sd, struct v4l2_control *ctrl) +static int saa711x_s_ctrl(struct v4l2_ctrl *ctrl
[git:v4l-dvb/v2.6.36] V4L/DVB: IR: replace workqueue with kthread
This is an automatic generated email to let you know that the following patch were queued at the http://git.linuxtv.org/media-tree.git tree: Subject: V4L/DVB: IR: replace workqueue with kthread Author: Maxim Levitsky maximlevit...@gmail.com Date:Sat Jul 31 11:59:17 2010 -0300 It is perfectly possible to have ir_raw_event_work running concurently on two cpus, thus we must protect it from that situation. This stems from the fact that if hardware sends short packets of samples we might end up queueing the work item more times that nessesary. Such job isn't well suited for a workqueue, so use a kernel thread. Signed-off-by: Maxim Levitsky maximlevit...@gmail.com Signed-off-by: Mauro Carvalho Chehab mche...@redhat.com drivers/media/IR/ir-core-priv.h |2 +- drivers/media/IR/ir-raw-event.c | 42 -- 2 files changed, 32 insertions(+), 12 deletions(-) --- http://git.linuxtv.org/media-tree.git?a=commitdiff;h=0d2cb1de8e81ffc06df67853be5ead3556d3a6b5 diff --git a/drivers/media/IR/ir-core-priv.h b/drivers/media/IR/ir-core-priv.h index dc26e2b..84c7a9a 100644 --- a/drivers/media/IR/ir-core-priv.h +++ b/drivers/media/IR/ir-core-priv.h @@ -32,7 +32,7 @@ struct ir_raw_handler { struct ir_raw_event_ctrl { struct list_headlist; /* to keep track of raw clients */ - struct work_struct rx_work;/* for the rx decoding workqueue */ + struct task_struct *thread; struct kfifokfifo; /* fifo for the pulse/space durations */ ktime_t last_event; /* when last event occurred */ enum raw_event_type last_type; /* last event type */ diff --git a/drivers/media/IR/ir-raw-event.c b/drivers/media/IR/ir-raw-event.c index 9d5c029..d0c18db 100644 --- a/drivers/media/IR/ir-raw-event.c +++ b/drivers/media/IR/ir-raw-event.c @@ -12,9 +12,10 @@ * GNU General Public License for more details. */ -#include linux/workqueue.h +#include linux/kthread.h #include linux/mutex.h #include linux/sched.h +#include linux/freezer.h #include ir-core-priv.h /* Define the max number of pulse/space transitions to buffer */ @@ -33,20 +34,30 @@ static u64 available_protocols; static struct work_struct wq_load; #endif -static void ir_raw_event_work(struct work_struct *work) +static int ir_raw_event_thread(void *data) { struct ir_raw_event ev; struct ir_raw_handler *handler; - struct ir_raw_event_ctrl *raw = - container_of(work, struct ir_raw_event_ctrl, rx_work); + struct ir_raw_event_ctrl *raw = (struct ir_raw_event_ctrl *)data; + + while (!kthread_should_stop()) { + try_to_freeze(); - while (kfifo_out(raw-kfifo, ev, sizeof(ev)) == sizeof(ev)) { mutex_lock(ir_raw_handler_lock); - list_for_each_entry(handler, ir_raw_handler_list, list) - handler-decode(raw-input_dev, ev); + + while (kfifo_out(raw-kfifo, ev, sizeof(ev)) == sizeof(ev)) { + list_for_each_entry(handler, ir_raw_handler_list, list) + handler-decode(raw-input_dev, ev); + raw-prev_ev = ev; + } + mutex_unlock(ir_raw_handler_lock); - raw-prev_ev = ev; + + set_current_state(TASK_INTERRUPTIBLE); + schedule(); } + + return 0; } /** @@ -141,7 +152,7 @@ void ir_raw_event_handle(struct input_dev *input_dev) if (!ir-raw) return; - schedule_work(ir-raw-rx_work); + wake_up_process(ir-raw-thread); } EXPORT_SYMBOL_GPL(ir_raw_event_handle); @@ -170,7 +181,7 @@ int ir_raw_event_register(struct input_dev *input_dev) return -ENOMEM; ir-raw-input_dev = input_dev; - INIT_WORK(ir-raw-rx_work, ir_raw_event_work); + ir-raw-enabled_protocols = ~0; rc = kfifo_alloc(ir-raw-kfifo, sizeof(s64) * MAX_IR_EVENT_SIZE, GFP_KERNEL); @@ -180,6 +191,15 @@ int ir_raw_event_register(struct input_dev *input_dev) return rc; } + ir-raw-thread = kthread_run(ir_raw_event_thread, ir-raw, + rc%u, (unsigned int)ir-devno); + + if (IS_ERR(ir-raw-thread)) { + kfree(ir-raw); + ir-raw = NULL; + return PTR_ERR(ir-raw-thread); + } + mutex_lock(ir_raw_handler_lock); list_add_tail(ir-raw-list, ir_raw_client_list); list_for_each_entry(handler, ir_raw_handler_list, list) @@ -198,7 +218,7 @@ void ir_raw_event_unregister(struct input_dev *input_dev) if (!ir-raw) return; - cancel_work_sync(ir-raw-rx_work); + kthread_stop(ir-raw-thread); mutex_lock(ir_raw_handler_lock); list_del(ir-raw-list
[git:v4l-dvb/v2.6.36] V4L/DVB: IR: replace spinlock with mutex
This is an automatic generated email to let you know that the following patch were queued at the http://git.linuxtv.org/media-tree.git tree: Subject: V4L/DVB: IR: replace spinlock with mutex Author: Maxim Levitsky maximlevit...@gmail.com Date:Sat Jul 31 11:59:16 2010 -0300 Some handlers (lirc for example) allocates memory on initialization, doing so in atomic context is cumbersome. Fixes warning about sleeping function in atomic context. Signed-off-by: Maxim Levitsky maximlevit...@gmail.com Signed-off-by: Mauro Carvalho Chehab mche...@redhat.com drivers/media/IR/ir-raw-event.c | 28 ++-- 1 files changed, 14 insertions(+), 14 deletions(-) --- http://git.linuxtv.org/media-tree.git?a=commitdiff;h=45a568fa6f6bf8e5b9c32e52292f297e8473a985 diff --git a/drivers/media/IR/ir-raw-event.c b/drivers/media/IR/ir-raw-event.c index 51f65da..9d5c029 100644 --- a/drivers/media/IR/ir-raw-event.c +++ b/drivers/media/IR/ir-raw-event.c @@ -13,7 +13,7 @@ */ #include linux/workqueue.h -#include linux/spinlock.h +#include linux/mutex.h #include linux/sched.h #include ir-core-priv.h @@ -24,7 +24,7 @@ static LIST_HEAD(ir_raw_client_list); /* Used to handle IR raw handler extensions */ -static DEFINE_SPINLOCK(ir_raw_handler_lock); +static DEFINE_MUTEX(ir_raw_handler_lock); static LIST_HEAD(ir_raw_handler_list); static u64 available_protocols; @@ -41,10 +41,10 @@ static void ir_raw_event_work(struct work_struct *work) container_of(work, struct ir_raw_event_ctrl, rx_work); while (kfifo_out(raw-kfifo, ev, sizeof(ev)) == sizeof(ev)) { - spin_lock(ir_raw_handler_lock); + mutex_lock(ir_raw_handler_lock); list_for_each_entry(handler, ir_raw_handler_list, list) handler-decode(raw-input_dev, ev); - spin_unlock(ir_raw_handler_lock); + mutex_unlock(ir_raw_handler_lock); raw-prev_ev = ev; } } @@ -150,9 +150,9 @@ u64 ir_raw_get_allowed_protocols() { u64 protocols; - spin_lock(ir_raw_handler_lock); + mutex_lock(ir_raw_handler_lock); protocols = available_protocols; - spin_unlock(ir_raw_handler_lock); + mutex_unlock(ir_raw_handler_lock); return protocols; } @@ -180,12 +180,12 @@ int ir_raw_event_register(struct input_dev *input_dev) return rc; } - spin_lock(ir_raw_handler_lock); + mutex_lock(ir_raw_handler_lock); list_add_tail(ir-raw-list, ir_raw_client_list); list_for_each_entry(handler, ir_raw_handler_list, list) if (handler-raw_register) handler-raw_register(ir-raw-input_dev); - spin_unlock(ir_raw_handler_lock); + mutex_unlock(ir_raw_handler_lock); return 0; } @@ -200,12 +200,12 @@ void ir_raw_event_unregister(struct input_dev *input_dev) cancel_work_sync(ir-raw-rx_work); - spin_lock(ir_raw_handler_lock); + mutex_lock(ir_raw_handler_lock); list_del(ir-raw-list); list_for_each_entry(handler, ir_raw_handler_list, list) if (handler-raw_unregister) handler-raw_unregister(ir-raw-input_dev); - spin_unlock(ir_raw_handler_lock); + mutex_unlock(ir_raw_handler_lock); kfifo_free(ir-raw-kfifo); kfree(ir-raw); @@ -220,13 +220,13 @@ int ir_raw_handler_register(struct ir_raw_handler *ir_raw_handler) { struct ir_raw_event_ctrl *raw; - spin_lock(ir_raw_handler_lock); + mutex_lock(ir_raw_handler_lock); list_add_tail(ir_raw_handler-list, ir_raw_handler_list); if (ir_raw_handler-raw_register) list_for_each_entry(raw, ir_raw_client_list, list) ir_raw_handler-raw_register(raw-input_dev); available_protocols |= ir_raw_handler-protocols; - spin_unlock(ir_raw_handler_lock); + mutex_unlock(ir_raw_handler_lock); return 0; } @@ -236,13 +236,13 @@ void ir_raw_handler_unregister(struct ir_raw_handler *ir_raw_handler) { struct ir_raw_event_ctrl *raw; - spin_lock(ir_raw_handler_lock); + mutex_lock(ir_raw_handler_lock); list_del(ir_raw_handler-list); if (ir_raw_handler-raw_unregister) list_for_each_entry(raw, ir_raw_client_list, list) ir_raw_handler-raw_unregister(raw-input_dev); available_protocols = ~ir_raw_handler-protocols; - spin_unlock(ir_raw_handler_lock); + mutex_unlock(ir_raw_handler_lock); } EXPORT_SYMBOL(ir_raw_handler_unregister); ___ linuxtv-commits mailing list linuxtv-commits@linuxtv.org http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits
[git:v4l-dvb/v2.6.36] V4L/DVB: IR: Kconfig fixes
This is an automatic generated email to let you know that the following patch were queued at the http://git.linuxtv.org/media-tree.git tree: Subject: V4L/DVB: IR: Kconfig fixes Author: Maxim Levitsky maximlevit...@gmail.com Date:Sat Jul 31 11:59:14 2010 -0300 Move IR drives below separate menu. This allows to disable them. Also correct a typo. Signed-off-by: Maxim Levitsky maximlevit...@gmail.com Signed-off-by: Mauro Carvalho Chehab mche...@redhat.com drivers/media/IR/Kconfig | 10 +++--- 1 files changed, 7 insertions(+), 3 deletions(-) --- http://git.linuxtv.org/media-tree.git?a=commitdiff;h=ade321c5b8a0e4d40c0f3b73bf0d2579850028d0 diff --git a/drivers/media/IR/Kconfig b/drivers/media/IR/Kconfig index 4094490..9e8f82d 100644 --- a/drivers/media/IR/Kconfig +++ b/drivers/media/IR/Kconfig @@ -1,8 +1,10 @@ -config IR_CORE - tristate +menuconfig IR_CORE + tristate Infrared remote controller adapters depends on INPUT default INPUT +if IR_CORE + config VIDEO_IR tristate depends on IR_CORE @@ -16,7 +18,7 @@ config LIRC Enable this option to build the Linux Infrared Remote Control (LIRC) core device interface driver. The LIRC interface passes raw IR to and from userspace, where the - LIRC daemon handles protocol decoding for IR reception ann + LIRC daemon handles protocol decoding for IR reception and encoding for IR transmitting (aka blasting). source drivers/media/IR/keymaps/Kconfig @@ -115,3 +117,5 @@ config IR_STREAMZAP To compile this driver as a module, choose M here: the module will be called streamzap. + +endif #IR_CORE ___ linuxtv-commits mailing list linuxtv-commits@linuxtv.org http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits
[git:v4l-dvb/v2.6.36] V4L/DVB: IR: put newly ported streamzap driver in proper home
This is an automatic generated email to let you know that the following patch were queued at the http://git.linuxtv.org/media-tree.git tree: Subject: V4L/DVB: IR: put newly ported streamzap driver in proper home Author: Jarod Wilson ja...@redhat.com Date:Mon Aug 2 15:46:03 2010 -0300 Moves drivers/staging/lirc/lirc_streamzap.c to drivers/media/IR/streamzap.c, along with making the requisite Kconfig and Makefile changes. Signed-off-by: Jarod Wilson ja...@redhat.com Signed-off-by: Mauro Carvalho Chehab mche...@redhat.com drivers/media/IR/Kconfig | 12 + drivers/media/IR/Makefile |1 + drivers/media/IR/streamzap.c | 741 + drivers/staging/lirc/Kconfig |6 - drivers/staging/lirc/Makefile |1 - drivers/staging/lirc/lirc_streamzap.c | 741 - 6 files changed, 754 insertions(+), 748 deletions(-) --- http://git.linuxtv.org/media-tree.git?a=commitdiff;h=2c1101d5aeddda7bd0dd03bddea7aed6dbf80074 diff --git a/drivers/media/IR/Kconfig b/drivers/media/IR/Kconfig index 999a825..4094490 100644 --- a/drivers/media/IR/Kconfig +++ b/drivers/media/IR/Kconfig @@ -103,3 +103,15 @@ config IR_MCEUSB To compile this driver as a module, choose M here: the module will be called mceusb. + +config IR_STREAMZAP + tristate Streamzap PC Remote IR Receiver + depends on USB_ARCH_HAS_HCD + depends on IR_CORE + select USB + ---help--- + Say Y here if you want to use a Streamzap PC Remote + Infrared Receiver. + + To compile this driver as a module, choose M here: the + module will be called streamzap. diff --git a/drivers/media/IR/Makefile b/drivers/media/IR/Makefile index 2ae4f3a..2566fb4 100644 --- a/drivers/media/IR/Makefile +++ b/drivers/media/IR/Makefile @@ -16,3 +16,4 @@ obj-$(CONFIG_IR_LIRC_CODEC) += ir-lirc-codec.o # stand-alone IR receivers/transmitters obj-$(CONFIG_IR_IMON) += imon.o obj-$(CONFIG_IR_MCEUSB) += mceusb.o +obj-$(CONFIG_IR_STREAMZAP) += streamzap.o diff --git a/drivers/media/IR/streamzap.c b/drivers/media/IR/streamzap.c new file mode 100644 index 000..058e29f --- /dev/null +++ b/drivers/media/IR/streamzap.c @@ -0,0 +1,741 @@ +/* + * Streamzap Remote Control driver + * + * Copyright (c) 2005 Christoph Bartelmus l...@bartelmus.de + * Copyright (c) 2010 Jarod Wilson ja...@wilsonet.com + * + * This driver was based on the work of Greg Wickham and Adrian + * Dewhurst. It was substantially rewritten to support correct signal + * gaps and now maintains a delay buffer, which is used to present + * consistent timing behaviour to user space applications. Without the + * delay buffer an ugly hack would be required in lircd, which can + * cause sluggish signal decoding in certain situations. + * + * Ported to in-kernel ir-core interface by Jarod Wilson + * + * This driver is based on the USB skeleton driver packaged with the + * kernel; copyright (C) 2001-2003 Greg Kroah-Hartman (g...@kroah.com) + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include linux/device.h +#include linux/module.h +#include linux/slab.h +#include linux/usb.h +#include linux/input.h +#include media/ir-core.h + +#define DRIVER_VERSION 1.60 +#define DRIVER_NAMEstreamzap +#define DRIVER_DESCStreamzap Remote Control driver + +#ifdef CONFIG_USB_DEBUG +static int debug = 1; +#else +static int debug; +#endif + +#define USB_STREAMZAP_VENDOR_ID0x0e9c +#define USB_STREAMZAP_PRODUCT_ID 0x + +/* table of devices that work with this driver */ +static struct usb_device_id streamzap_table[] = { + /* Streamzap Remote Control */ + { USB_DEVICE(USB_STREAMZAP_VENDOR_ID, USB_STREAMZAP_PRODUCT_ID) }, + /* Terminating entry */ + { } +}; + +MODULE_DEVICE_TABLE(usb, streamzap_table); + +#define STREAMZAP_PULSE_MASK 0xf0 +#define STREAMZAP_SPACE_MASK 0x0f +#define STREAMZAP_TIMEOUT0xff +#define STREAMZAP_RESOLUTION 256 + +/* number of samples buffered */ +#define SZ_BUF_LEN 128 + +enum StreamzapDecoderState { + PulseSpace, + FullPulse, + FullSpace, + IgnorePulse +}; + +/* structure to hold our device specific stuff */ +struct streamzap_ir { + + /* ir-core
[git:v4l-dvb/v2.6.36] V4L/DVB: IR: minor fixes
This is an automatic generated email to let you know that the following patch were queued at the http://git.linuxtv.org/media-tree.git tree: Subject: V4L/DVB: IR: minor fixes Author: Maxim Levitsky maximlevit...@gmail.com Date:Sat Jul 31 11:59:15 2010 -0300 * lirc: Don't propagate reset event to userspace * lirc: Remove strange logic from lirc that would make first sample always be pulse * Make TO_US macro actualy print what it should. Signed-off-by: Maxim Levitsky maximlevit...@gmail.com Signed-off-by: Mauro Carvalho Chehab mche...@redhat.com drivers/media/IR/ir-core-priv.h |4 +--- drivers/media/IR/ir-lirc-codec.c | 14 -- drivers/media/IR/ir-raw-event.c |3 +++ 3 files changed, 12 insertions(+), 9 deletions(-) --- http://git.linuxtv.org/media-tree.git?a=commitdiff;h=510fcb70ff375b0cec6638fcfafdf36233690bfc diff --git a/drivers/media/IR/ir-core-priv.h b/drivers/media/IR/ir-core-priv.h index babd520..dc26e2b 100644 --- a/drivers/media/IR/ir-core-priv.h +++ b/drivers/media/IR/ir-core-priv.h @@ -76,7 +76,6 @@ struct ir_raw_event_ctrl { struct lirc_codec { struct ir_input_dev *ir_dev; struct lirc_driver *drv; - int lircdata; } lirc; }; @@ -104,10 +103,9 @@ static inline void decrease_duration(struct ir_raw_event *ev, unsigned duration) ev-duration -= duration; } -#define TO_US(duration)(((duration) + 500) / 1000) +#define TO_US(duration)DIV_ROUND_CLOSEST((duration), 1000) #define TO_STR(is_pulse) ((is_pulse) ? pulse : space) #define IS_RESET(ev) (ev.duration == 0) - /* * Routines from ir-sysfs.c - Meant to be called only internally inside * ir-core diff --git a/drivers/media/IR/ir-lirc-codec.c b/drivers/media/IR/ir-lirc-codec.c index 3ba482d..8ca01fd 100644 --- a/drivers/media/IR/ir-lirc-codec.c +++ b/drivers/media/IR/ir-lirc-codec.c @@ -32,6 +32,7 @@ static int ir_lirc_decode(struct input_dev *input_dev, struct ir_raw_event ev) { struct ir_input_dev *ir_dev = input_get_drvdata(input_dev); + int sample; if (!(ir_dev-raw-enabled_protocols IR_TYPE_LIRC)) return 0; @@ -39,18 +40,21 @@ static int ir_lirc_decode(struct input_dev *input_dev, struct ir_raw_event ev) if (!ir_dev-raw-lirc.drv || !ir_dev-raw-lirc.drv-rbuf) return -EINVAL; + if (IS_RESET(ev)) + return 0; + IR_dprintk(2, LIRC data transfer started (%uus %s)\n, TO_US(ev.duration), TO_STR(ev.pulse)); - ir_dev-raw-lirc.lircdata += ev.duration / 1000; + + sample = ev.duration / 1000; if (ev.pulse) - ir_dev-raw-lirc.lircdata |= PULSE_BIT; + sample |= PULSE_BIT; lirc_buffer_write(ir_dev-raw-lirc.drv-rbuf, - (unsigned char *) ir_dev-raw-lirc.lircdata); + (unsigned char *) sample); wake_up(ir_dev-raw-lirc.drv-rbuf-wait_poll); - ir_dev-raw-lirc.lircdata = 0; return 0; } @@ -224,8 +228,6 @@ static int ir_lirc_register(struct input_dev *input_dev) ir_dev-raw-lirc.drv = drv; ir_dev-raw-lirc.ir_dev = ir_dev; - ir_dev-raw-lirc.lircdata = PULSE_MASK; - return 0; lirc_register_failed: diff --git a/drivers/media/IR/ir-raw-event.c b/drivers/media/IR/ir-raw-event.c index 6f192ef..51f65da 100644 --- a/drivers/media/IR/ir-raw-event.c +++ b/drivers/media/IR/ir-raw-event.c @@ -66,6 +66,9 @@ int ir_raw_event_store(struct input_dev *input_dev, struct ir_raw_event *ev) if (!ir-raw) return -EINVAL; + IR_dprintk(2, sample: (05%dus %s)\n, + TO_US(ev-duration), TO_STR(ev-pulse)); + if (kfifo_in(ir-raw-kfifo, ev, sizeof(*ev)) != sizeof(*ev)) return -ENOMEM; ___ linuxtv-commits mailing list linuxtv-commits@linuxtv.org http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits
[git:v4l-dvb/v2.6.36] V4L/DVB: staging/lirc: fix non-CONFIG_MODULES build horkage
This is an automatic generated email to let you know that the following patch were queued at the http://git.linuxtv.org/media-tree.git tree: Subject: V4L/DVB: staging/lirc: fix non-CONFIG_MODULES build horkage Author: Jarod Wilson ja...@redhat.com Date:Thu Jul 29 18:20:44 2010 -0300 Fix when CONFIG_MODULES is not enabled: drivers/staging/lirc/lirc_parallel.c:243: error: implicit declaration of function 'module_refcount' drivers/staging/lirc/lirc_it87.c:150: error: implicit declaration of function 'module_refcount' drivers/built-in.o: In function `it87_probe': lirc_it87.c:(.text+0x4079b0): undefined reference to `init_chrdev' lirc_it87.c:(.text+0x4079cc): undefined reference to `drop_chrdev' drivers/built-in.o: In function `lirc_it87_exit': lirc_it87.c:(.exit.text+0x38a5): undefined reference to `drop_chrdev' Its a quick hack and untested beyond building, since I don't have the hardware, but it should do the trick. Acked-by: Randy Dunlap randy.dun...@oracle.com Signed-off-by: Jarod Wilson ja...@redhat.com Signed-off-by: Mauro Carvalho Chehab mche...@redhat.com drivers/staging/lirc/lirc_it87.c |9 ++--- drivers/staging/lirc/lirc_parallel.c |4 ++-- 2 files changed, 8 insertions(+), 5 deletions(-) --- http://git.linuxtv.org/media-tree.git?a=commitdiff;h=82ce67bf262b3f47ecb5a0ca31cace8ac72b7c98 diff --git a/drivers/staging/lirc/lirc_it87.c b/drivers/staging/lirc/lirc_it87.c index 09f3696..ec11c0e 100644 --- a/drivers/staging/lirc/lirc_it87.c +++ b/drivers/staging/lirc/lirc_it87.c @@ -109,6 +109,7 @@ static DECLARE_WAIT_QUEUE_HEAD(lirc_read_queue); static DEFINE_SPINLOCK(hardware_lock); static DEFINE_SPINLOCK(dev_lock); +static bool device_open; static int rx_buf[RBUF_LEN]; unsigned int rx_tail, rx_head; @@ -147,10 +148,11 @@ static void drop_port(void); static int lirc_open(struct inode *inode, struct file *file) { spin_lock(dev_lock); - if (module_refcount(THIS_MODULE)) { + if (device_open) { spin_unlock(dev_lock); return -EBUSY; } + device_open = true; spin_unlock(dev_lock); return 0; } @@ -158,6 +160,9 @@ static int lirc_open(struct inode *inode, struct file *file) static int lirc_close(struct inode *inode, struct file *file) { + spin_lock(dev_lock); + device_open = false; + spin_unlock(dev_lock); return 0; } @@ -363,7 +368,6 @@ static struct lirc_driver driver = { }; -#ifdef MODULE static int init_chrdev(void) { driver.minor = lirc_register_driver(driver); @@ -380,7 +384,6 @@ static void drop_chrdev(void) { lirc_unregister_driver(driver.minor); } -#endif /* SECTION: Hardware */ diff --git a/drivers/staging/lirc/lirc_parallel.c b/drivers/staging/lirc/lirc_parallel.c index a1ebd07..6da4a8c 100644 --- a/drivers/staging/lirc/lirc_parallel.c +++ b/drivers/staging/lirc/lirc_parallel.c @@ -240,7 +240,7 @@ static void irq_handler(void *blah) unsigned int level, newlevel; unsigned int timeout; - if (!module_refcount(THIS_MODULE)) + if (!is_open) return; if (!is_claimed) @@ -515,7 +515,7 @@ static long lirc_ioctl(struct file *filep, unsigned int cmd, unsigned long arg) static int lirc_open(struct inode *node, struct file *filep) { - if (module_refcount(THIS_MODULE) || !lirc_claim()) + if (is_open || !lirc_claim()) return -EBUSY; parport_enable_irq(pport); ___ linuxtv-commits mailing list linuxtv-commits@linuxtv.org http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits
[git:v4l-dvb/v2.6.36] V4L/DVB: IR/mceusb: remove bad ir_input_dev use
This is an automatic generated email to let you know that the following patch were queued at the http://git.linuxtv.org/media-tree.git tree: Subject: V4L/DVB: IR/mceusb: remove bad ir_input_dev use Author: Jarod Wilson ja...@redhat.com Date:Thu Jul 29 18:34:52 2010 -0300 The ir_input_dev gets filled in by __ir_input_register, the one allocated in mceusb_init_input_dev was being overwritten by the correct one shortly after it was initialized (ultimately resulting in a memory leak). This bug was inherited from imon.c, and was pointed out to me by Maxim Levitsky. v2: fix incorrect dev arg to dev_dbg Signed-off-by: Jarod Wilson ja...@redhat.com Signed-off-by: Mauro Carvalho Chehab mche...@redhat.com drivers/media/IR/mceusb.c | 15 +-- 1 files changed, 1 insertions(+), 14 deletions(-) --- http://git.linuxtv.org/media-tree.git?a=commitdiff;h=7a9fcb41b9370a32bb65bece9afc83701ab2d2b6 diff --git a/drivers/media/IR/mceusb.c b/drivers/media/IR/mceusb.c index 78bf7f7..65b0738 100644 --- a/drivers/media/IR/mceusb.c +++ b/drivers/media/IR/mceusb.c @@ -228,7 +228,6 @@ static struct usb_device_id std_tx_mask_list[] = { /* data structure for each usb transceiver */ struct mceusb_dev { /* ir-core bits */ - struct ir_input_dev *irdev; struct ir_dev_props *props; struct ir_raw_event rawir; @@ -739,7 +738,7 @@ static void mceusb_dev_recv(struct urb *urb, struct pt_regs *regs) if (ir-send_flags == RECV_FLAG_IN_PROGRESS) { ir-send_flags = SEND_FLAG_COMPLETE; - dev_dbg(ir-irdev-dev, setup answer received %d bytes\n, + dev_dbg(ir-dev, setup answer received %d bytes\n, buf_len); } @@ -861,7 +860,6 @@ static struct input_dev *mceusb_init_input_dev(struct mceusb_dev *ir) { struct input_dev *idev; struct ir_dev_props *props; - struct ir_input_dev *irdev; struct device *dev = ir-dev; int ret = -ENODEV; @@ -878,12 +876,6 @@ static struct input_dev *mceusb_init_input_dev(struct mceusb_dev *ir) goto props_alloc_failed; } - irdev = kzalloc(sizeof(struct ir_input_dev), GFP_KERNEL); - if (!irdev) { - dev_err(dev, remote ir input dev allocation failed\n); - goto ir_dev_alloc_failed; - } - snprintf(ir-name, sizeof(ir-name), Media Center Ed. eHome Infrared Remote Transceiver (%04x:%04x), le16_to_cpu(ir-usbdev-descriptor.idVendor), @@ -902,9 +894,6 @@ static struct input_dev *mceusb_init_input_dev(struct mceusb_dev *ir) props-tx_ir = mceusb_tx_ir; ir-props = props; - ir-irdev = irdev; - - input_set_drvdata(idev, irdev); ret = ir_input_register(idev, RC_MAP_RC6_MCE, props, DRIVER_NAME); if (ret 0) { @@ -915,8 +904,6 @@ static struct input_dev *mceusb_init_input_dev(struct mceusb_dev *ir) return idev; irdev_failed: - kfree(irdev); -ir_dev_alloc_failed: kfree(props); props_alloc_failed: input_free_device(idev); ___ linuxtv-commits mailing list linuxtv-commits@linuxtv.org http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits
[git:v4l-dvb/v2.6.36] V4L/DVB: staging/lirc: port lirc_streamzap to ir-core
This is an automatic generated email to let you know that the following patch were queued at the http://git.linuxtv.org/media-tree.git tree: Subject: V4L/DVB: staging/lirc: port lirc_streamzap to ir-core Author: Jarod Wilson ja...@redhat.com Date:Tue Aug 3 01:07:04 2010 -0300 This ports lirc_streamzap.c over to ir-core in-place, to be followed by a patch moving the driver over to drivers/media/IR/streamzap.c and enabling the proper Kconfig bits. Presently, the in-kernel keymap doesn't work, as the stock Streamzap remote uses an RC-5-like, but not-quite-RC-5 protocol, which the in-kernel RC-5 decoder doesn't cope with. The remote can be used right now with the lirc bridge driver though, and other remotes (at least an RC-6(A) MCE remote) work perfectly with the driver. I'll take a look at making the existing RC-5 decoder cope with this odd duck, possibly implement another standalone decoder engine, or just throw up my hands and say meh, use lirc... But the driver itself should be perfectly sound. Remaining items on the streamzap TODO list: - add LIRC_SET_REC_TIMEOUT-alike support - add LIRC_GET_M{AX,IN}_TIMEOUT-alike support - add LIRC_GET_REC_RESOLUTION-alike support All of the above should be trivial to add. There are patches pending to add this support to ir-core from Maxim Levitsky, and I'll take care of these once his patches get integrated. None of them are currently essential though. Signed-off-by: Jarod Wilson ja...@redhat.com Signed-off-by: Mauro Carvalho Chehab mche...@redhat.com drivers/media/IR/keymaps/Makefile |1 + drivers/media/IR/keymaps/rc-rc5-streamzap.c | 81 +++ drivers/staging/lirc/lirc_streamzap.c | 812 --- include/media/rc-map.h |1 + 4 files changed, 449 insertions(+), 446 deletions(-) --- http://git.linuxtv.org/media-tree.git?a=commitdiff;h=8e9e60640067858e8036d4d43bbf725c60613359 diff --git a/drivers/media/IR/keymaps/Makefile b/drivers/media/IR/keymaps/Makefile index cbee062..c9fcc41 100644 --- a/drivers/media/IR/keymaps/Makefile +++ b/drivers/media/IR/keymaps/Makefile @@ -59,6 +59,7 @@ obj-$(CONFIG_RC_MAP) += rc-adstech-dvb-t-pci.o \ rc-purpletv.o \ rc-pv951.o \ rc-rc5-hauppauge-new.o \ + rc-rc5-streamzap.o \ rc-rc5-tv.o \ rc-rc6-mce.o \ rc-real-audio-220-32-keys.o \ diff --git a/drivers/media/IR/keymaps/rc-rc5-streamzap.c b/drivers/media/IR/keymaps/rc-rc5-streamzap.c new file mode 100644 index 000..4c19c58 --- /dev/null +++ b/drivers/media/IR/keymaps/rc-rc5-streamzap.c @@ -0,0 +1,81 @@ +/* rc-rc5-streamzap.c - Keytable for Streamzap PC Remote, for use + * with the Streamzap PC Remote IR Receiver. + * + * Copyright (c) 2010 by Jarod Wilson ja...@redhat.com + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + */ + +#include media/rc-map.h + +static struct ir_scancode rc5_streamzap[] = { +/* + * FIXME: The Streamzap remote isn't actually true RC-5, it has an extra + * bit in it, which presently throws the in-kernel RC-5 decoder for a loop. + * We either have to enhance the decoder to support it, add a new decoder, + * or just rely on lirc userspace decoding. + */ + { 0x00, KEY_NUMERIC_0 }, + { 0x01, KEY_NUMERIC_1 }, + { 0x02, KEY_NUMERIC_2 }, + { 0x03, KEY_NUMERIC_3 }, + { 0x04, KEY_NUMERIC_4 }, + { 0x05, KEY_NUMERIC_5 }, + { 0x06, KEY_NUMERIC_6 }, + { 0x07, KEY_NUMERIC_7 }, + { 0x08, KEY_NUMERIC_8 }, + { 0x0a, KEY_POWER }, + { 0x0b, KEY_MUTE }, + { 0x0c, KEY_CHANNELUP }, + { 0x0d, KEY_VOLUMEUP }, + { 0x0e, KEY_CHANNELDOWN }, + { 0x0f, KEY_VOLUMEDOWN }, + { 0x10, KEY_UP }, + { 0x11, KEY_LEFT }, + { 0x12, KEY_OK }, + { 0x13, KEY_RIGHT }, + { 0x14, KEY_DOWN }, + { 0x15, KEY_MENU }, + { 0x16, KEY_EXIT }, + { 0x17, KEY_PLAY }, + { 0x18, KEY_PAUSE }, + { 0x19, KEY_STOP }, + { 0x1a, KEY_BACK }, + { 0x1b, KEY_FORWARD }, + { 0x1c, KEY_RECORD }, + { 0x1d, KEY_REWIND }, + { 0x1e, KEY_FASTFORWARD }, + { 0x20, KEY_RED }, + { 0x21, KEY_GREEN }, + { 0x22, KEY_YELLOW }, + { 0x23, KEY_BLUE }, + +}; + +static struct rc_keymap rc5_streamzap_map = { + .map = { + .scan= rc5_streamzap, + .size= ARRAY_SIZE(rc5_streamzap), + .ir_type = IR_TYPE_RC5, + .name= RC_MAP_RC5_STREAMZAP, + } +}; + +static int __init init_rc_map_rc5_streamzap(void) +{ + return ir_register_map(rc5_streamzap_map); +} + +static void __exit exit_rc_map_rc5_streamzap(void
[git:v4l-dvb/v2.6.36] V4L/DVB: IR/imon: remove bad ir_input_dev use
This is an automatic generated email to let you know that the following patch were queued at the http://git.linuxtv.org/media-tree.git tree: Subject: V4L/DVB: IR/imon: remove bad ir_input_dev use Author: Jarod Wilson ja...@redhat.com Date:Tue Jul 27 22:29:44 2010 -0300 The ir_input_dev gets filled in by __ir_input_register, the one allocated in imon_init_idev was being overwritten by the correct one shortly after it was initialized (ultimately resulting in a memory leak). Additionally, there was an ill-advised memcpy into that extraneous ir_input_dev which gets fixed by this. Ill-advised memcpy pointed out by Dmitry Torokhov, bad usage of ir_input_dev pointed out by Maxim Levitsky. Signed-off-by: Jarod Wilson ja...@redhat.com Signed-off-by: Mauro Carvalho Chehab mche...@redhat.com drivers/media/IR/imon.c | 15 --- 1 files changed, 0 insertions(+), 15 deletions(-) --- http://git.linuxtv.org/media-tree.git?a=commitdiff;h=da48db669f50d47c208da3648dca7cac7ea6dcca diff --git a/drivers/media/IR/imon.c b/drivers/media/IR/imon.c index a665d48..c185422 100644 --- a/drivers/media/IR/imon.c +++ b/drivers/media/IR/imon.c @@ -87,7 +87,6 @@ static ssize_t lcd_write(struct file *file, const char *buf, struct imon_context { struct device *dev; struct ir_dev_props *props; - struct ir_input_dev *ir; /* Newer devices have two interfaces */ struct usb_device *usbdev_intf0; struct usb_device *usbdev_intf1; @@ -1656,7 +1655,6 @@ static struct input_dev *imon_init_idev(struct imon_context *ictx) { struct input_dev *idev; struct ir_dev_props *props; - struct ir_input_dev *ir; int ret, i; idev = input_allocate_device(); @@ -1671,12 +1669,6 @@ static struct input_dev *imon_init_idev(struct imon_context *ictx) goto props_alloc_failed; } - ir = kzalloc(sizeof(struct ir_input_dev), GFP_KERNEL); - if (!ir) { - dev_err(ictx-dev, remote ir input dev allocation failed\n); - goto ir_dev_alloc_failed; - } - snprintf(ictx-name_idev, sizeof(ictx-name_idev), iMON Remote (%04x:%04x), ictx-vendor, ictx-product); idev-name = ictx-name_idev; @@ -1706,14 +1698,9 @@ static struct input_dev *imon_init_idev(struct imon_context *ictx) props-change_protocol = imon_ir_change_protocol; ictx-props = props; - ictx-ir = ir; - memcpy(ir-dev, ictx-dev, sizeof(struct device)); - usb_to_input_id(ictx-usbdev_intf0, idev-id); idev-dev.parent = ictx-dev; - input_set_drvdata(idev, ir); - ret = ir_input_register(idev, RC_MAP_IMON_PAD, props, MOD_NAME); if (ret 0) { dev_err(ictx-dev, remote input dev register failed\n); @@ -1723,8 +1710,6 @@ static struct input_dev *imon_init_idev(struct imon_context *ictx) return idev; idev_register_failed: - kfree(ir); -ir_dev_alloc_failed: kfree(props); props_alloc_failed: input_free_device(idev); ___ linuxtv-commits mailing list linuxtv-commits@linuxtv.org http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits
[git:v4l-dvb/v2.6.36] V4L/DVB: IR/imon: remove incorrect calls to input_free_device
This is an automatic generated email to let you know that the following patch were queued at the http://git.linuxtv.org/media-tree.git tree: Subject: V4L/DVB: IR/imon: remove incorrect calls to input_free_device Author: Jarod Wilson ja...@redhat.com Date:Mon Jul 26 11:11:36 2010 -0300 Per Dmitry Torokhov, following input_unregister_device with an input_free_device is forbidden, the former is sufficient alone. Acked-by: Dmitry Torokhov d...@mail.ru Signed-off-by: Jarod Wilson ja...@redhat.com Signed-off-by: Mauro Carvalho Chehab mche...@redhat.com drivers/media/IR/imon.c |5 + 1 files changed, 1 insertions(+), 4 deletions(-) --- http://git.linuxtv.org/media-tree.git?a=commitdiff;h=20cd19597238723237d214dbab18c0b7c68c5814 diff --git a/drivers/media/IR/imon.c b/drivers/media/IR/imon.c index 65c125e..a665d48 100644 --- a/drivers/media/IR/imon.c +++ b/drivers/media/IR/imon.c @@ -1944,7 +1944,6 @@ static struct imon_context *imon_init_intf0(struct usb_interface *intf) urb_submit_failed: ir_input_unregister(ictx-idev); - input_free_device(ictx-idev); idev_setup_failed: find_endpoint_failed: mutex_unlock(ictx-lock); @@ -2014,10 +2013,8 @@ static struct imon_context *imon_init_intf1(struct usb_interface *intf, return ictx; urb_submit_failed: - if (ictx-touch) { + if (ictx-touch) input_unregister_device(ictx-touch); - input_free_device(ictx-touch); - } touch_setup_failed: find_endpoint_failed: mutex_unlock(ictx-lock); ___ linuxtv-commits mailing list linuxtv-commits@linuxtv.org http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits
[git:v4l-dvb/v2.6.36] V4L/DVB: staging/lirc: fix Kconfig dependencies
This is an automatic generated email to let you know that the following patch were queued at the http://git.linuxtv.org/media-tree.git tree: Subject: V4L/DVB: staging/lirc: fix Kconfig dependencies Author: Janne Grunau j...@jannau.net Date:Thu Jul 29 12:24:22 2010 -0300 Signed-off-by: Janne Grunau j...@jannau.net Signed-off-by: Jarod Wilson ja...@redhat.com Signed-off-by: Mauro Carvalho Chehab mche...@redhat.com drivers/staging/lirc/Kconfig | 19 ++- 1 files changed, 10 insertions(+), 9 deletions(-) --- http://git.linuxtv.org/media-tree.git?a=commitdiff;h=efce8ca3c5d8a35018f801d687396e1911cfc868 diff --git a/drivers/staging/lirc/Kconfig b/drivers/staging/lirc/Kconfig index 968c2ad..ab30a09 100644 --- a/drivers/staging/lirc/Kconfig +++ b/drivers/staging/lirc/Kconfig @@ -3,6 +3,7 @@ # menuconfig LIRC_STAGING bool Linux Infrared Remote Control IR receiver/transmitter drivers + depends on LIRC help Say Y here, and all supported Linux Infrared Remote Control IR and RF receiver and transmitter drivers will be displayed. When paired @@ -13,13 +14,13 @@ if LIRC_STAGING config LIRC_BT829 tristate BT829 based hardware - depends on LIRC_STAGING + depends on LIRC_STAGING PCI help Driver for the IR interface on BT829-based hardware config LIRC_ENE0100 tristate ENE KB3924/ENE0100 CIR Port Reciever - depends on LIRC_STAGING + depends on LIRC_STAGING PNP help This is a driver for CIR port handled by ENE KB3924 embedded controller found on some notebooks. @@ -27,7 +28,7 @@ config LIRC_ENE0100 config LIRC_I2C tristate I2C Based IR Receivers - depends on LIRC_STAGING + depends on LIRC_STAGING I2C help Driver for I2C-based IR receivers, such as those commonly found onboard Hauppauge PVR-150/250/350 video capture cards @@ -40,7 +41,7 @@ config LIRC_IGORPLUGUSB config LIRC_IMON tristate Legacy SoundGraph iMON Receiver and Display - depends on LIRC_STAGING + depends on LIRC_STAGING USB help Driver for the original SoundGraph iMON IR Receiver and Display @@ -48,7 +49,7 @@ config LIRC_IMON config LIRC_IT87 tristate ITE IT87XX CIR Port Receiver - depends on LIRC_STAGING + depends on LIRC_STAGING PNP help Driver for the ITE IT87xx IR Receiver @@ -60,13 +61,13 @@ config LIRC_ITE8709 config LIRC_PARALLEL tristate Homebrew Parallel Port Receiver - depends on LIRC_STAGING !SMP + depends on LIRC_STAGING PARPORT !SMP help Driver for Homebrew Parallel Port Receivers config LIRC_SASEM tristate Sasem USB IR Remote - depends on LIRC_STAGING + depends on LIRC_STAGING USB help Driver for the Sasem OnAir Remocon-V or Dign HV5 HTPC IR/VFD Module @@ -91,7 +92,7 @@ config LIRC_SIR config LIRC_STREAMZAP tristate Streamzap PC Receiver - depends on LIRC_STAGING + depends on LIRC_STAGING USB help Driver for the Streamzap PC Receiver @@ -103,7 +104,7 @@ config LIRC_TTUSBIR config LIRC_ZILOG tristate Zilog/Hauppauge IR Transmitter - depends on LIRC_STAGING + depends on LIRC_STAGING I2C help Driver for the Zilog/Hauppauge IR Transmitter, found on PVR-150/500, HVR-1200/1250/1700/1800, HD-PVR and other cards ___ linuxtv-commits mailing list linuxtv-commits@linuxtv.org http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits
[git:v4l-dvb/v2.6.36] V4L/DVB: v4l2_subdev: Get rid of now unused IR pulse width defines
This is an automatic generated email to let you know that the following patch were queued at the http://git.linuxtv.org/media-tree.git tree: Subject: V4L/DVB: v4l2_subdev: Get rid of now unused IR pulse width defines Author: Andy Walls awa...@md.metrocast.net Date:Sun Aug 1 02:36:20 2010 -0300 Signed-off-by: Andy Walls awa...@md.metrocast.net Signed-off-by: Mauro Carvalho Chehab mche...@redhat.com drivers/media/video/cx25840/cx25840-ir.c |4 ++-- include/media/v4l2-subdev.h |7 +-- 2 files changed, 3 insertions(+), 8 deletions(-) --- http://git.linuxtv.org/media-tree.git?a=commitdiff;h=d69e85b644dbc8c68dec3b4149941989d4bcc66f diff --git a/drivers/media/video/cx25840/cx25840-ir.c b/drivers/media/video/cx25840/cx25840-ir.c index 34e284b..c2b4c14 100644 --- a/drivers/media/video/cx25840/cx25840-ir.c +++ b/drivers/media/video/cx25840/cx25840-ir.c @@ -886,10 +886,10 @@ static int cx25840_ir_tx_write(struct v4l2_subdev *sd, u8 *buf, size_t count, */ for (i = 0; i n; ) { for (j = 0; j FIFO_TX_DEPTH / 2 i n; j++) { - mark = ns_pulse[i] V4L2_SUBDEV_IR_PULSE_LEVEL_MASK; + mark = ns_pulse[i] LEVEL_MASK; fifo_pulse[j] = ns_to_pulse_width_count( ns_pulse[i] - ~V4L2_SUBDEV_IR_PULSE_LEVEL_MASK, + ~LEVEL_MASK, ir_state-txclk_divider); if (mark) fifo_pulse[j] = FIFO_RXTX_LVL; diff --git a/include/media/v4l2-subdev.h b/include/media/v4l2-subdev.h index bacd525..08880dd 100644 --- a/include/media/v4l2-subdev.h +++ b/include/media/v4l2-subdev.h @@ -360,14 +360,9 @@ struct v4l2_subdev_sensor_ops { */ enum v4l2_subdev_ir_mode { - V4L2_SUBDEV_IR_MODE_PULSE_WIDTH, /* space mark widths in nanosecs */ + V4L2_SUBDEV_IR_MODE_PULSE_WIDTH, /* uses struct ir_raw_event records */ }; -/* Data format of data read or written for V4L2_SUBDEV_IR_MODE_PULSE_WIDTH */ -#define V4L2_SUBDEV_IR_PULSE_MAX_WIDTH_NS 0x7fff -#define V4L2_SUBDEV_IR_PULSE_LEVEL_MASK0x8000 -#define V4L2_SUBDEV_IR_PULSE_RX_SEQ_END0x - struct v4l2_subdev_ir_parameters { /* Either Rx or Tx */ unsigned int bytes_per_data_element; /* of data in read or write call */ ___ linuxtv-commits mailing list linuxtv-commits@linuxtv.org http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits
[git:v4l-dvb/v2.6.36] V4L/DVB: cx23885, cx25840: Report the actual length of an IR Rx timeout event
This is an automatic generated email to let you know that the following patch were queued at the http://git.linuxtv.org/media-tree.git tree: Subject: V4L/DVB: cx23885, cx25840: Report the actual length of an IR Rx timeout event Author: Andy Walls awa...@md.metrocast.net Date:Sat Jul 31 23:28:37 2010 -0300 Instead of reporting an IR Rx timeout event as a ridiculously long space, report it as a space of the lenght of the timeout. This partially fixes operation with LIRC without breaking interoperation with the in kernel decoders. The gaps lengths reported to LIRC are still not real however. Signed-off-by: Andy Walls awa...@md.metrocast.net Signed-off-by: Mauro Carvalho Chehab mche...@redhat.com drivers/media/video/cx23885/cx23885-input.c |6 -- drivers/media/video/cx23885/cx23888-ir.c| 14 -- drivers/media/video/cx25840/cx25840-ir.c| 14 -- 3 files changed, 16 insertions(+), 18 deletions(-) --- http://git.linuxtv.org/media-tree.git?a=commitdiff;h=2560d94e330f35776e944b54256a526a19259429 diff --git a/drivers/media/video/cx23885/cx23885-input.c b/drivers/media/video/cx23885/cx23885-input.c index 3f924e2..252817a 100644 --- a/drivers/media/video/cx23885/cx23885-input.c +++ b/drivers/media/video/cx23885/cx23885-input.c @@ -46,12 +46,6 @@ static void convert_measurement(u32 x, struct ir_raw_event *y) { - if (x == V4L2_SUBDEV_IR_PULSE_RX_SEQ_END) { - y-pulse = false; - y-duration = V4L2_SUBDEV_IR_PULSE_MAX_WIDTH_NS; - return; - } - y-pulse = (x V4L2_SUBDEV_IR_PULSE_LEVEL_MASK) ? true : false; y-duration = x V4L2_SUBDEV_IR_PULSE_MAX_WIDTH_NS; } diff --git a/drivers/media/video/cx23885/cx23888-ir.c b/drivers/media/video/cx23885/cx23888-ir.c index aa07286..684d23d 100644 --- a/drivers/media/video/cx23885/cx23888-ir.c +++ b/drivers/media/video/cx23885/cx23888-ir.c @@ -675,16 +675,18 @@ static int cx23888_ir_rx_read(struct v4l2_subdev *sd, u8 *buf, size_t count, *num = n * sizeof(u32); for (p = (u32 *) buf, i = 0; i n; p++, i++) { + if ((*p FIFO_RXTX_RTO) == FIFO_RXTX_RTO) { - *p = V4L2_SUBDEV_IR_PULSE_RX_SEQ_END; + /* Assume RTO was because of no IR light input */ + u = 0; v4l2_dbg(2, ir_888_debug, sd, rx read: end of rx\n); - continue; + } else { + u = (*p FIFO_RXTX_LVL) + ? V4L2_SUBDEV_IR_PULSE_LEVEL_MASK : 0; + if (invert) + u = u ? 0 : V4L2_SUBDEV_IR_PULSE_LEVEL_MASK; } - u = (*p FIFO_RXTX_LVL) ? V4L2_SUBDEV_IR_PULSE_LEVEL_MASK : 0; - if (invert) - u = u ? 0 : V4L2_SUBDEV_IR_PULSE_LEVEL_MASK; - v = (u32) pulse_width_count_to_ns((u16) (*p FIFO_RXTX), divider); if (v = V4L2_SUBDEV_IR_PULSE_MAX_WIDTH_NS) diff --git a/drivers/media/video/cx25840/cx25840-ir.c b/drivers/media/video/cx25840/cx25840-ir.c index 326c255..be23c5b 100644 --- a/drivers/media/video/cx25840/cx25840-ir.c +++ b/drivers/media/video/cx25840/cx25840-ir.c @@ -677,16 +677,18 @@ static int cx25840_ir_rx_read(struct v4l2_subdev *sd, u8 *buf, size_t count, *num = n * sizeof(u32); for (p = (u32 *) buf, i = 0; i n; p++, i++) { + if ((*p FIFO_RXTX_RTO) == FIFO_RXTX_RTO) { - *p = V4L2_SUBDEV_IR_PULSE_RX_SEQ_END; + /* Assume RTO was because of no IR light input */ + u = 0; v4l2_dbg(2, ir_debug, sd, rx read: end of rx\n); - continue; + } else { + u = (*p FIFO_RXTX_LVL) + ? V4L2_SUBDEV_IR_PULSE_LEVEL_MASK : 0; + if (invert) + u = u ? 0 : V4L2_SUBDEV_IR_PULSE_LEVEL_MASK; } - u = (*p FIFO_RXTX_LVL) ? V4L2_SUBDEV_IR_PULSE_LEVEL_MASK : 0; - if (invert) - u = u ? 0 : V4L2_SUBDEV_IR_PULSE_LEVEL_MASK; - v = (u32) pulse_width_count_to_ns((u16) (*p FIFO_RXTX), divider); if (v = V4L2_SUBDEV_IR_PULSE_MAX_WIDTH_NS) ___ linuxtv-commits mailing list linuxtv-commits@linuxtv.org http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits
[git:v4l-dvb/v2.6.36] V4L/DVB: cx23885, cx25840: Report IR max pulse width regardless of mod/demod use
This is an automatic generated email to let you know that the following patch were queued at the http://git.linuxtv.org/media-tree.git tree: Subject: V4L/DVB: cx23885, cx25840: Report IR max pulse width regardless of mod/demod use Author: Andy Walls awa...@md.metrocast.net Date:Sat Jul 31 21:57:42 2010 -0300 Compute and report the maximum IR pulse measurment width, even if we are set to perform carrier modulation or demodulation and the number is fixed by the carrier freq. Signed-off-by: Andy Walls awa...@md.metrocast.net Signed-off-by: Mauro Carvalho Chehab mche...@redhat.com drivers/media/video/cx23885/cx23888-ir.c | 26 ++ drivers/media/video/cx25840/cx25840-ir.c | 26 ++ 2 files changed, 28 insertions(+), 24 deletions(-) --- http://git.linuxtv.org/media-tree.git?a=commitdiff;h=ceb152add687db152d90ba64b54687b3975963cf diff --git a/drivers/media/video/cx23885/cx23888-ir.c b/drivers/media/video/cx23885/cx23888-ir.c index 51f2163..aa07286 100644 --- a/drivers/media/video/cx23885/cx23888-ir.c +++ b/drivers/media/video/cx23885/cx23888-ir.c @@ -771,12 +771,15 @@ static int cx23888_ir_rx_s_parameters(struct v4l2_subdev *sd, p-carrier_range_upper); o-carrier_range_lower = p-carrier_range_lower; o-carrier_range_upper = p-carrier_range_upper; + + p-max_pulse_width = + (u32) pulse_width_count_to_ns(FIFO_RXTX, rxclk_divider); } else { p-max_pulse_width = rxclk_rx_s_max_pulse_width(dev, p-max_pulse_width, rxclk_divider); - o-max_pulse_width = p-max_pulse_width; } + o-max_pulse_width = p-max_pulse_width; atomic_set(state-rxclk_divider, rxclk_divider); p-noise_filter_min_width = @@ -889,12 +892,15 @@ static int cx23888_ir_tx_s_parameters(struct v4l2_subdev *sd, p-duty_cycle = cduty_tx_s_duty_cycle(dev, p-duty_cycle); o-duty_cycle = p-duty_cycle; + + p-max_pulse_width = + (u32) pulse_width_count_to_ns(FIFO_RXTX, txclk_divider); } else { p-max_pulse_width = txclk_tx_s_max_pulse_width(dev, p-max_pulse_width, txclk_divider); - o-max_pulse_width = p-max_pulse_width; } + o-max_pulse_width = p-max_pulse_width; atomic_set(state-txclk_divider, txclk_divider); p-resolution = clock_divider_to_resolution(txclk_divider); @@ -1000,12 +1006,10 @@ static int cx23888_ir_log_status(struct v4l2_subdev *sd) -%1d/+%1d, %u to %u Hz\n, i, j, clock_divider_to_freq(rxclk, 16 + j), clock_divider_to_freq(rxclk, 16 - i)); - } else { - v4l2_info(sd, \tMax measurable pulse width:%u us, - %llu ns\n, - pulse_width_count_to_us(FIFO_RXTX, rxclk), - pulse_width_count_to_ns(FIFO_RXTX, rxclk)); } + v4l2_info(sd, \tMax measurable pulse width:%u us, %llu ns\n, + pulse_width_count_to_us(FIFO_RXTX, rxclk), + pulse_width_count_to_ns(FIFO_RXTX, rxclk)); v4l2_info(sd, \tLow pass filter: %s\n, filtr ? enabled : disabled); if (filtr) @@ -1047,12 +1051,10 @@ static int cx23888_ir_log_status(struct v4l2_subdev *sd) clock_divider_to_carrier_freq(txclk)); v4l2_info(sd, \tCarrier duty cycle:%2u/16\n, cduty + 1); - } else { - v4l2_info(sd, \tMax pulse width: %u us, - %llu ns\n, - pulse_width_count_to_us(FIFO_RXTX, txclk), - pulse_width_count_to_ns(FIFO_RXTX, txclk)); } + v4l2_info(sd, \tMax pulse width: %u us, %llu ns\n, + pulse_width_count_to_us(FIFO_RXTX, txclk), + pulse_width_count_to_ns(FIFO_RXTX, txclk)); v4l2_info(sd, \tBusy: %s\n, stats STATS_TBY ? yes : no); v4l2_info(sd, \tFIFO service requested:%s\n, diff --git a/drivers/media/video/cx25840/cx25840-ir.c b/drivers/media/video/cx25840/cx25840-ir.c index 308e87e..326c255 100644 --- a/drivers/media/video/cx25840/cx25840-ir.c +++ b/drivers/media/video/cx25840/cx25840-ir.c @@ -791,12 +791,15 @@ static int cx25840_ir_rx_s_parameters(struct v4l2_subdev *sd, p-carrier_range_upper); o-carrier_range_lower = p-carrier_range_lower; o-carrier_range_upper = p-carrier_range_upper
[git:v4l-dvb/v2.6.36] V4L/DVB: cx23885: Move AV Core irq handling to a work handler
This is an automatic generated email to let you know that the following patch were queued at the http://git.linuxtv.org/media-tree.git tree: Subject: V4L/DVB: cx23885: Move AV Core irq handling to a work handler Author: Andy Walls awa...@md.metrocast.net Date:Mon Jul 19 01:35:46 2010 -0300 Interrupts from the AV Core are best handled by a workqueue handler since many I2C transactions are required to service the AV Core interrupt. The AV_CORE PCI interrupt is disabled by the IRQ handler and reenabled when the work handler is finished. Signed-off-by: Andy Walls awa...@md.metrocast.net Signed-off-by: Mauro Carvalho Chehab mche...@redhat.com drivers/media/video/cx23885/Makefile |5 ++- drivers/media/video/cx23885/cx23885-av.c | 35 drivers/media/video/cx23885/cx23885-av.h | 27 + drivers/media/video/cx23885/cx23885-core.c | 20 --- drivers/media/video/cx23885/cx23885-ir.c | 24 --- drivers/media/video/cx23885/cx23885.h |1 + 6 files changed, 97 insertions(+), 15 deletions(-) --- http://git.linuxtv.org/media-tree.git?a=commitdiff;h=e5514f104d875b3d28cbcd5d4f2b96ab2fca1e29 diff --git a/drivers/media/video/cx23885/Makefile b/drivers/media/video/cx23885/Makefile index 5787ae2..e2ee95f 100644 --- a/drivers/media/video/cx23885/Makefile +++ b/drivers/media/video/cx23885/Makefile @@ -1,7 +1,8 @@ cx23885-objs := cx23885-cards.o cx23885-video.o cx23885-vbi.o \ cx23885-core.o cx23885-i2c.o cx23885-dvb.o cx23885-417.o \ - cx23885-ioctl.o cx23885-ir.o cx23885-input.o cx23888-ir.o \ - netup-init.o cimax2.o netup-eeprom.o cx23885-f300.o + cx23885-ioctl.o cx23885-ir.o cx23885-av.o cx23885-input.o \ + cx23888-ir.o netup-init.o cimax2.o netup-eeprom.o \ + cx23885-f300.o obj-$(CONFIG_VIDEO_CX23885) += cx23885.o diff --git a/drivers/media/video/cx23885/cx23885-av.c b/drivers/media/video/cx23885/cx23885-av.c new file mode 100644 index 000..134ebdd --- /dev/null +++ b/drivers/media/video/cx23885/cx23885-av.c @@ -0,0 +1,35 @@ +/* + * Driver for the Conexant CX23885/7/8 PCIe bridge + * + * AV device support routines - non-input, non-vl42_subdev routines + * + * Copyright (C) 2010 Andy Walls awa...@md.metrocast.net + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301, USA. + */ + +#include cx23885.h + +void cx23885_av_work_handler(struct work_struct *work) +{ + struct cx23885_dev *dev = + container_of(work, struct cx23885_dev, cx25840_work); + bool handled; + + v4l2_subdev_call(dev-sd_cx25840, core, interrupt_service_routine, +PCI_MSK_AV_CORE, handled); + cx23885_irq_enable(dev, PCI_MSK_AV_CORE); +} diff --git a/drivers/media/video/cx23885/cx23885-av.h b/drivers/media/video/cx23885/cx23885-av.h new file mode 100644 index 000..d2915c3 --- /dev/null +++ b/drivers/media/video/cx23885/cx23885-av.h @@ -0,0 +1,27 @@ +/* + * Driver for the Conexant CX23885/7/8 PCIe bridge + * + * AV device support routines - non-input, non-vl42_subdev routines + * + * Copyright (C) 2010 Andy Walls awa...@md.metrocast.net + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301, USA. + */ + +#ifndef _CX23885_AV_H_ +#define _CX23885_AV_H_ +void cx23885_av_work_handler(struct work_struct *work); +#endif diff --git a/drivers/media/video/cx23885/cx23885-core.c b/drivers/media/video/cx23885/cx23885-core.c index 0765abf..f6b62e7 100644 --- a/drivers/media/video/cx23885/cx23885
[git:v4l-dvb/v2.6.36] V4L/DVB: cx23885: Protect PCI interrupt mask manipulations with a spinlock
This is an automatic generated email to let you know that the following patch were queued at the http://git.linuxtv.org/media-tree.git tree: Subject: V4L/DVB: cx23885: Protect PCI interrupt mask manipulations with a spinlock Author: Andy Walls awa...@md.metrocast.net Date:Mon Jul 19 01:19:43 2010 -0300 This patch encapsulates access to the PCI_INT_MSK register and dev-pci_irqmask variable and protects them with a spinlock. This is needed because both the hard IRQ handler and a workhandler will need to manipulate the mask to disable the AV_CORE interrupt. Signed-off-by: Andy Walls awa...@md.metrocast.net Signed-off-by: Mauro Carvalho Chehab mche...@redhat.com drivers/media/video/cx23885/cx23885-cards.c | 17 ++--- drivers/media/video/cx23885/cx23885-core.c | 94 +-- drivers/media/video/cx23885/cx23885-vbi.c |2 +- drivers/media/video/cx23885/cx23885-video.c |7 +- drivers/media/video/cx23885/cx23885.h |5 ++ 5 files changed, 103 insertions(+), 22 deletions(-) --- http://git.linuxtv.org/media-tree.git?a=commitdiff;h=dbe83a3b921328e12b2abe894fc692afba293d7f diff --git a/drivers/media/video/cx23885/cx23885-cards.c b/drivers/media/video/cx23885/cx23885-cards.c index 294a753..d72b48e 100644 --- a/drivers/media/video/cx23885/cx23885-cards.c +++ b/drivers/media/video/cx23885/cx23885-cards.c @@ -1012,7 +1012,6 @@ int cx23885_ir_init(struct cx23885_dev *dev) dev-sd_ir = cx23885_find_hw(dev, CX23885_HW_888_IR); v4l2_subdev_call(dev-sd_cx25840, core, s_io_pin_config, ir_rxtx_pin_cfg_count, ir_rxtx_pin_cfg); - dev-pci_irqmask |= PCI_MSK_IR; /* * For these boards we need to invert the Tx output via the * IR controller to have the LED off while idle @@ -1033,7 +1032,6 @@ int cx23885_ir_init(struct cx23885_dev *dev) } v4l2_subdev_call(dev-sd_cx25840, core, s_io_pin_config, ir_rx_pin_cfg_count, ir_rx_pin_cfg); - dev-pci_irqmask |= PCI_MSK_AV_CORE; break; case CX23885_BOARD_HAUPPAUGE_HVR1250: dev-sd_ir = cx23885_find_hw(dev, CX23885_HW_AV_CORE); @@ -1043,7 +1041,6 @@ int cx23885_ir_init(struct cx23885_dev *dev) } v4l2_subdev_call(dev-sd_cx25840, core, s_io_pin_config, ir_rxtx_pin_cfg_count, ir_rxtx_pin_cfg); - dev-pci_irqmask |= PCI_MSK_AV_CORE; break; case CX23885_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL_EXP: request_module(ir-kbd-i2c); @@ -1058,15 +1055,13 @@ void cx23885_ir_fini(struct cx23885_dev *dev) switch (dev-board) { case CX23885_BOARD_HAUPPAUGE_HVR1850: case CX23885_BOARD_HAUPPAUGE_HVR1290: - dev-pci_irqmask = ~PCI_MSK_IR; - cx_clear(PCI_INT_MSK, PCI_MSK_IR); + cx23885_irq_remove(dev, PCI_MSK_IR); cx23888_ir_remove(dev); dev-sd_ir = NULL; break; case CX23885_BOARD_TEVII_S470: case CX23885_BOARD_HAUPPAUGE_HVR1250: - dev-pci_irqmask = ~PCI_MSK_AV_CORE; - cx_clear(PCI_INT_MSK, PCI_MSK_AV_CORE); + cx23885_irq_remove(dev, PCI_MSK_AV_CORE); /* sd_ir is a duplicate pointer to the AV Core, just clear it */ dev-sd_ir = NULL; break; @@ -1078,13 +1073,13 @@ void cx23885_ir_pci_int_enable(struct cx23885_dev *dev) switch (dev-board) { case CX23885_BOARD_HAUPPAUGE_HVR1850: case CX23885_BOARD_HAUPPAUGE_HVR1290: - if (dev-sd_ir (dev-pci_irqmask PCI_MSK_IR)) - cx_set(PCI_INT_MSK, PCI_MSK_IR); + if (dev-sd_ir) + cx23885_irq_add_enable(dev, PCI_MSK_IR); break; case CX23885_BOARD_TEVII_S470: case CX23885_BOARD_HAUPPAUGE_HVR1250: - if (dev-sd_ir (dev-pci_irqmask PCI_MSK_AV_CORE)) - cx_set(PCI_INT_MSK, PCI_MSK_AV_CORE); + if (dev-sd_ir) + cx23885_irq_add_enable(dev, PCI_MSK_AV_CORE); break; } } diff --git a/drivers/media/video/cx23885/cx23885-core.c b/drivers/media/video/cx23885/cx23885-core.c index 93e7afb..0765abf 100644 --- a/drivers/media/video/cx23885/cx23885-core.c +++ b/drivers/media/video/cx23885/cx23885-core.c @@ -299,6 +299,83 @@ static struct sram_channel cx23887_sram_channels[] = { }, }; +void cx23885_irq_add(struct cx23885_dev *dev, u32 mask) +{ + unsigned long flags; + spin_lock_irqsave(dev-pci_irqmask_lock, flags); + + dev-pci_irqmask |= mask; + + spin_unlock_irqrestore(dev-pci_irqmask_lock, flags); +} + +void cx23885_irq_add_enable(struct cx23885_dev *dev, u32 mask) +{ + unsigned long flags; + spin_lock_irqsave
[git:v4l-dvb/v2.6.36] V4L/DVB: cx23885: Add preliminary IR Rx support for the HVR-1250 and TeVii S470
This is an automatic generated email to let you know that the following patch were queued at the http://git.linuxtv.org/media-tree.git tree: Subject: V4L/DVB: cx23885: Add preliminary IR Rx support for the HVR-1250 and TeVii S470 Author: Andy Walls awa...@md.metrocast.net Date:Mon Jul 19 00:41:41 2010 -0300 Add initial IR Rx support using the intergrated IR controller in the A/V core of the CX23885 bridge chip. This initial support is flawed in that I2C transactions should not be performed in a hard irq context. That will be fixed in a follow on patch. The TeVii S470 support is reported to generate perptual interrupts that renders a user' system nearly unusable. The TeVii S470 IR will be disabled by default in a follow on patch. Signed-off-by: Andy Walls awa...@md.metrocast.net Signed-off-by: Mauro Carvalho Chehab mche...@redhat.com drivers/media/video/cx23885/cx23885-cards.c | 52 -- drivers/media/video/cx23885/cx23885-core.c | 22 +-- drivers/media/video/cx23885/cx23885-input.c | 46 ++- drivers/media/video/cx23885/cx23885-reg.h |1 + 4 files changed, 111 insertions(+), 10 deletions(-) --- http://git.linuxtv.org/media-tree.git?a=commitdiff;h=98d109f90fc02ce8baf1c2471ffcf8d66fb0d8e6 diff --git a/drivers/media/video/cx23885/cx23885-cards.c b/drivers/media/video/cx23885/cx23885-cards.c index b083e5d..294a753 100644 --- a/drivers/media/video/cx23885/cx23885-cards.c +++ b/drivers/media/video/cx23885/cx23885-cards.c @@ -962,7 +962,7 @@ void cx23885_gpio_setup(struct cx23885_dev *dev) int cx23885_ir_init(struct cx23885_dev *dev) { - static struct v4l2_subdev_io_pin_config ir_pin_cfg[] = { + static struct v4l2_subdev_io_pin_config ir_rxtx_pin_cfg[] = { { .flags= V4L2_SUBDEV_IO_PIN_INPUT, .pin = CX23885_PIN_IR_RX_GPIO19, @@ -977,12 +977,22 @@ int cx23885_ir_init(struct cx23885_dev *dev) .strength = CX25840_PIN_DRIVE_MEDIUM, } }; - const size_t ir_pin_cfg_count = ARRAY_SIZE(ir_pin_cfg); + const size_t ir_rxtx_pin_cfg_count = ARRAY_SIZE(ir_rxtx_pin_cfg); + + static struct v4l2_subdev_io_pin_config ir_rx_pin_cfg[] = { + { + .flags= V4L2_SUBDEV_IO_PIN_INPUT, + .pin = CX23885_PIN_IR_RX_GPIO19, + .function = CX23885_PAD_IR_RX, + .value= 0, + .strength = CX25840_PIN_DRIVE_MEDIUM, + } + }; + const size_t ir_rx_pin_cfg_count = ARRAY_SIZE(ir_rx_pin_cfg); struct v4l2_subdev_ir_parameters params; int ret = 0; switch (dev-board) { - case CX23885_BOARD_HAUPPAUGE_HVR1250: case CX23885_BOARD_HAUPPAUGE_HVR1500: case CX23885_BOARD_HAUPPAUGE_HVR1500Q: case CX23885_BOARD_HAUPPAUGE_HVR1800: @@ -1001,7 +1011,7 @@ int cx23885_ir_init(struct cx23885_dev *dev) break; dev-sd_ir = cx23885_find_hw(dev, CX23885_HW_888_IR); v4l2_subdev_call(dev-sd_cx25840, core, s_io_pin_config, -ir_pin_cfg_count, ir_pin_cfg); +ir_rxtx_pin_cfg_count, ir_rxtx_pin_cfg); dev-pci_irqmask |= PCI_MSK_IR; /* * For these boards we need to invert the Tx output via the @@ -1015,6 +1025,26 @@ int cx23885_ir_init(struct cx23885_dev *dev) params.shutdown = true; v4l2_subdev_call(dev-sd_ir, ir, tx_s_parameters, params); break; + case CX23885_BOARD_TEVII_S470: + dev-sd_ir = cx23885_find_hw(dev, CX23885_HW_AV_CORE); + if (dev-sd_ir == NULL) { + ret = -ENODEV; + break; + } + v4l2_subdev_call(dev-sd_cx25840, core, s_io_pin_config, +ir_rx_pin_cfg_count, ir_rx_pin_cfg); + dev-pci_irqmask |= PCI_MSK_AV_CORE; + break; + case CX23885_BOARD_HAUPPAUGE_HVR1250: + dev-sd_ir = cx23885_find_hw(dev, CX23885_HW_AV_CORE); + if (dev-sd_ir == NULL) { + ret = -ENODEV; + break; + } + v4l2_subdev_call(dev-sd_cx25840, core, s_io_pin_config, +ir_rxtx_pin_cfg_count, ir_rxtx_pin_cfg); + dev-pci_irqmask |= PCI_MSK_AV_CORE; + break; case CX23885_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL_EXP: request_module(ir-kbd-i2c); break; @@ -1033,6 +1063,13 @@ void cx23885_ir_fini(struct cx23885_dev *dev) cx23888_ir_remove(dev); dev-sd_ir = NULL; break; + case CX23885_BOARD_TEVII_S470: + case CX23885_BOARD_HAUPPAUGE_HVR1250
[git:v4l-dvb/v2.6.36] V4L/DVB: cx23885: Add a v4l2_subdev group id for the CX2388[578] integrated AV core
This is an automatic generated email to let you know that the following patch were queued at the http://git.linuxtv.org/media-tree.git tree: Subject: V4L/DVB: cx23885: Add a v4l2_subdev group id for the CX2388[578] integrated AV core Author: Andy Walls awa...@md.metrocast.net Date:Sun Jul 18 23:26:29 2010 -0300 Signed-off-by: Andy Walls awa...@md.metrocast.net Signed-off-by: Mauro Carvalho Chehab mche...@redhat.com drivers/media/video/cx23885/cx23885-cards.c |5 - drivers/media/video/cx23885/cx23885.h |3 ++- 2 files changed, 6 insertions(+), 2 deletions(-) --- http://git.linuxtv.org/media-tree.git?a=commitdiff;h=d6b1850d3c49e66f17bbb67f964a48b11528f56b diff --git a/drivers/media/video/cx23885/cx23885-cards.c b/drivers/media/video/cx23885/cx23885-cards.c index e958674..b083e5d 100644 --- a/drivers/media/video/cx23885/cx23885-cards.c +++ b/drivers/media/video/cx23885/cx23885-cards.c @@ -1192,7 +1192,10 @@ void cx23885_card_setup(struct cx23885_dev *dev) dev-sd_cx25840 = v4l2_i2c_new_subdev(dev-v4l2_dev, dev-i2c_bus[2].i2c_adap, cx25840, cx25840, 0x88 1, NULL); - v4l2_subdev_call(dev-sd_cx25840, core, load_fw); + if (dev-sd_cx25840) { + dev-sd_cx25840-grp_id = CX23885_HW_AV_CORE; + v4l2_subdev_call(dev-sd_cx25840, core, load_fw); + } break; } diff --git a/drivers/media/video/cx23885/cx23885.h b/drivers/media/video/cx23885/cx23885.h index a33f2b7..460f430 100644 --- a/drivers/media/video/cx23885/cx23885.h +++ b/drivers/media/video/cx23885/cx23885.h @@ -403,7 +403,8 @@ static inline struct cx23885_dev *to_cx23885(struct v4l2_device *v4l2_dev) #define call_all(dev, o, f, args...) \ v4l2_device_call_all(dev-v4l2_dev, 0, o, f, ##args) -#define CX23885_HW_888_IR (1 0) +#define CX23885_HW_888_IR (1 0) +#define CX23885_HW_AV_CORE (1 1) #define call_hw(dev, grpid, o, f, args...) \ v4l2_device_call_all(dev-v4l2_dev, grpid, o, f, ##args) ___ linuxtv-commits mailing list linuxtv-commits@linuxtv.org http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits
[git:v4l-dvb/v2.6.36] V4L/DVB: cx23885: For CX23888 IR, configure the IO pin mux IR pins explcitly
This is an automatic generated email to let you know that the following patch were queued at the http://git.linuxtv.org/media-tree.git tree: Subject: V4L/DVB: cx23885: For CX23888 IR, configure the IO pin mux IR pins explcitly Author: Andy Walls awa...@md.metrocast.net Date:Sun Jul 18 20:26:37 2010 -0300 Explicitly configure the IR Tx and IR Rx pins to be driven by the IR Rx and Tx pads from the AV core for CX23888 IR. For the HVR-1850 and HVR-1290 configure the IR Tx level inversion, so the Tx LED is off when idle. Signed-off-by: Andy Walls awa...@md.metrocast.net Signed-off-by: Mauro Carvalho Chehab mche...@redhat.com drivers/media/video/cx23885/cx23885-cards.c | 31 +++ 1 files changed, 31 insertions(+), 0 deletions(-) --- http://git.linuxtv.org/media-tree.git?a=commitdiff;h=81f287da73377eb408de6879aa6c54c6d57dc1db diff --git a/drivers/media/video/cx23885/cx23885-cards.c b/drivers/media/video/cx23885/cx23885-cards.c index 29eea8d..e958674 100644 --- a/drivers/media/video/cx23885/cx23885-cards.c +++ b/drivers/media/video/cx23885/cx23885-cards.c @@ -962,6 +962,24 @@ void cx23885_gpio_setup(struct cx23885_dev *dev) int cx23885_ir_init(struct cx23885_dev *dev) { + static struct v4l2_subdev_io_pin_config ir_pin_cfg[] = { + { + .flags= V4L2_SUBDEV_IO_PIN_INPUT, + .pin = CX23885_PIN_IR_RX_GPIO19, + .function = CX23885_PAD_IR_RX, + .value= 0, + .strength = CX25840_PIN_DRIVE_MEDIUM, + }, { + .flags= V4L2_SUBDEV_IO_PIN_OUTPUT, + .pin = CX23885_PIN_IR_TX_GPIO20, + .function = CX23885_PAD_IR_TX, + .value= 0, + .strength = CX25840_PIN_DRIVE_MEDIUM, + } + }; + const size_t ir_pin_cfg_count = ARRAY_SIZE(ir_pin_cfg); + + struct v4l2_subdev_ir_parameters params; int ret = 0; switch (dev-board) { case CX23885_BOARD_HAUPPAUGE_HVR1250: @@ -982,7 +1000,20 @@ int cx23885_ir_init(struct cx23885_dev *dev) if (ret) break; dev-sd_ir = cx23885_find_hw(dev, CX23885_HW_888_IR); + v4l2_subdev_call(dev-sd_cx25840, core, s_io_pin_config, +ir_pin_cfg_count, ir_pin_cfg); dev-pci_irqmask |= PCI_MSK_IR; + /* +* For these boards we need to invert the Tx output via the +* IR controller to have the LED off while idle +*/ + v4l2_subdev_call(dev-sd_ir, ir, tx_g_parameters, params); + params.enable = false; + params.shutdown = false; + params.invert_level = true; + v4l2_subdev_call(dev-sd_ir, ir, tx_s_parameters, params); + params.shutdown = true; + v4l2_subdev_call(dev-sd_ir, ir, tx_s_parameters, params); break; case CX23885_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL_EXP: request_module(ir-kbd-i2c); ___ linuxtv-commits mailing list linuxtv-commits@linuxtv.org http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits
[git:v4l-dvb/v2.6.36] V4L/DVB: v4l2_subdev: Move interrupt_service_routine ptr to v4l2_subdev_core_ops
This is an automatic generated email to let you know that the following patch were queued at the http://git.linuxtv.org/media-tree.git tree: Subject: V4L/DVB: v4l2_subdev: Move interrupt_service_routine ptr to v4l2_subdev_core_ops Author: Andy Walls awa...@md.metrocast.net Date:Sun Jul 18 20:54:52 2010 -0300 The CX2584x and related cores are multifunction subdevices with a number of internal blocks that act as interrupt sources. Move the v4L2_subdev interrupt_service_routine callback from v4l_subdev_ir_ops to v4l2_subdev_core_ops, as the video and audio blocks of a CX2584x and related cores can generate interrupts along with the IR block. This change also makes sense for other subdev's that generate interrupts and do not have an IR block. Signed-off-by: Andy Walls awa...@md.metrocast.net Signed-off-by: Mauro Carvalho Chehab mche...@redhat.com drivers/media/video/cx23885/cx23885-core.c |2 +- drivers/media/video/cx23885/cx23888-ir.c |3 +-- include/media/v4l2-subdev.h| 16 +++- 3 files changed, 9 insertions(+), 12 deletions(-) --- http://git.linuxtv.org/media-tree.git?a=commitdiff;h=260e689ba237fb513b49e98841d98e93ea639c75 diff --git a/drivers/media/video/cx23885/cx23885-core.c b/drivers/media/video/cx23885/cx23885-core.c index ff76f64..a74c0ab 100644 --- a/drivers/media/video/cx23885/cx23885-core.c +++ b/drivers/media/video/cx23885/cx23885-core.c @@ -1765,7 +1765,7 @@ static irqreturn_t cx23885_irq(int irq, void *dev_id) handled += cx23885_video_irq(dev, vida_status); if (pci_status PCI_MSK_IR) { - v4l2_subdev_call(dev-sd_ir, ir, interrupt_service_routine, + v4l2_subdev_call(dev-sd_ir, core, interrupt_service_routine, pci_status, ir_handled); if (ir_handled) handled++; diff --git a/drivers/media/video/cx23885/cx23888-ir.c b/drivers/media/video/cx23885/cx23888-ir.c index 28ca90f..51f2163 100644 --- a/drivers/media/video/cx23885/cx23888-ir.c +++ b/drivers/media/video/cx23885/cx23888-ir.c @@ -1126,11 +1126,10 @@ static const struct v4l2_subdev_core_ops cx23888_ir_core_ops = { .g_register = cx23888_ir_g_register, .s_register = cx23888_ir_s_register, #endif + .interrupt_service_routine = cx23888_ir_irq_handler, }; static const struct v4l2_subdev_ir_ops cx23888_ir_ir_ops = { - .interrupt_service_routine = cx23888_ir_irq_handler, - .rx_read = cx23888_ir_rx_read, .rx_g_parameters = cx23888_ir_rx_g_parameters, .rx_s_parameters = cx23888_ir_rx_s_parameters, diff --git a/include/media/v4l2-subdev.h b/include/media/v4l2-subdev.h index a780cca..bacd525 100644 --- a/include/media/v4l2-subdev.h +++ b/include/media/v4l2-subdev.h @@ -131,6 +131,11 @@ struct v4l2_subdev_io_pin_config { s_power: puts subdevice in power saving mode (on == 0) or normal operation mode (on == 1). + + interrupt_service_routine: Called by the bridge chip's interrupt service + handler, when an interrupt status has be raised due to this subdev, + so that this subdev can handle the details. It may schedule work to be + performed later. It must not sleep. *Called from an IRQ context*. */ struct v4l2_subdev_core_ops { int (*g_chip_ident)(struct v4l2_subdev *sd, struct v4l2_dbg_chip_ident *chip); @@ -156,6 +161,8 @@ struct v4l2_subdev_core_ops { int (*s_register)(struct v4l2_subdev *sd, struct v4l2_dbg_register *reg); #endif int (*s_power)(struct v4l2_subdev *sd, int on); + int (*interrupt_service_routine)(struct v4l2_subdev *sd, + u32 status, bool *handled); }; /* s_mode: switch the tuner to a specific tuner mode. Replacement of s_radio. @@ -330,11 +337,6 @@ struct v4l2_subdev_sensor_ops { }; /* - interrupt_service_routine: Called by the bridge chip's interrupt service - handler, when an IR interrupt status has be raised due to this subdev, - so that this subdev can handle the details. It may schedule work to be - performed later. It must not sleep. *Called from an IRQ context*. - [rt]x_g_parameters: Get the current operating parameters and state of the the IR receiver or transmitter. @@ -392,10 +394,6 @@ struct v4l2_subdev_ir_parameters { }; struct v4l2_subdev_ir_ops { - /* Common to receiver and transmitter */ - int (*interrupt_service_routine)(struct v4l2_subdev *sd, - u32 status, bool *handled); - /* Receiver */ int (*rx_read)(struct v4l2_subdev *sd, u8 *buf, size_t count, ssize_t *num); ___ linuxtv-commits mailing list linuxtv-commits@linuxtv.org http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits
[git:v4l-dvb/v2.6.36] V4L/DVB: cx25840: Add s_io_pin_config core subdev ops for the CX2388[578]
This is an automatic generated email to let you know that the following patch were queued at the http://git.linuxtv.org/media-tree.git tree: Subject: V4L/DVB: cx25840: Add s_io_pin_config core subdev ops for the CX2388[578] Author: Andy Walls awa...@md.metrocast.net Date:Sun Jul 18 19:39:54 2010 -0300 Add s_io_pin_config core subdev op for the CX2388[578] AV cores. This is complete for IR_RX, IR_TX, GPIOs 16,19-23, and IRQ_N. It likely needs work for the I2S signal direction. Signed-off-by: Andy Walls awa...@md.metrocast.net Signed-off-by: Mauro Carvalho Chehab mche...@redhat.com drivers/media/video/cx25840/cx25840-core.c | 153 include/media/cx25840.h| 75 ++ 2 files changed, 228 insertions(+), 0 deletions(-) --- http://git.linuxtv.org/media-tree.git?a=commitdiff;h=d06d5777b22e8355e2f5a700c6a9babfdd6f diff --git a/drivers/media/video/cx25840/cx25840-core.c b/drivers/media/video/cx25840/cx25840-core.c index 4f908fa..46a046d 100644 --- a/drivers/media/video/cx25840/cx25840-core.c +++ b/drivers/media/video/cx25840/cx25840-core.c @@ -144,6 +144,158 @@ static int set_input(struct i2c_client *client, enum cx25840_video_input vid_inp /* --- */ +static int cx23885_s_io_pin_config(struct v4l2_subdev *sd, size_t n, + struct v4l2_subdev_io_pin_config *p) +{ + struct i2c_client *client = v4l2_get_subdevdata(sd); + int i; + u32 pin_ctrl; + u8 gpio_oe, gpio_data, strength; + + pin_ctrl = cx25840_read4(client, 0x120); + gpio_oe = cx25840_read(client, 0x160); + gpio_data = cx25840_read(client, 0x164); + + for (i = 0; i n; i++) { + strength = p[i].strength; + if (strength CX25840_PIN_DRIVE_FAST) + strength = CX25840_PIN_DRIVE_FAST; + + switch (p[i].pin) { + case CX23885_PIN_IRQ_N_GPIO16: + if (p[i].function != CX23885_PAD_IRQ_N) { + /* GPIO16 */ + pin_ctrl = ~(0x1 25); + } else { + /* IRQ_N */ + if (p[i].flags + (V4L2_SUBDEV_IO_PIN_DISABLE | +V4L2_SUBDEV_IO_PIN_INPUT)) { + pin_ctrl = ~(0x1 25); + } else { + pin_ctrl |= (0x1 25); + } + if (p[i].flags + V4L2_SUBDEV_IO_PIN_ACTIVE_LOW) { + pin_ctrl = ~(0x1 24); + } else { + pin_ctrl |= (0x1 24); + } + } + break; + case CX23885_PIN_IR_RX_GPIO19: + if (p[i].function != CX23885_PAD_GPIO19) { + /* IR_RX */ + gpio_oe |= (0x1 0); + pin_ctrl = ~(0x3 18); + pin_ctrl |= (strength 18); + } else { + /* GPIO19 */ + gpio_oe = ~(0x1 0); + if (p[i].flags V4L2_SUBDEV_IO_PIN_SET_VALUE) { + gpio_data = ~(0x1 0); + gpio_data |= ((p[i].value 0x1) 0); + } + pin_ctrl = ~(0x3 12); + pin_ctrl |= (strength 12); + } + break; + case CX23885_PIN_IR_TX_GPIO20: + if (p[i].function != CX23885_PAD_GPIO20) { + /* IR_TX */ + gpio_oe |= (0x1 1); + if (p[i].flags V4L2_SUBDEV_IO_PIN_DISABLE) + pin_ctrl = ~(0x1 10); + else + pin_ctrl |= (0x1 10); + pin_ctrl = ~(0x3 18); + pin_ctrl |= (strength 18); + } else { + /* GPIO20 */ + gpio_oe = ~(0x1 1); + if (p[i].flags V4L2_SUBDEV_IO_PIN_SET_VALUE) { + gpio_data = ~(0x1 1); + gpio_data |= ((p[i].value 0x1) 1); + } + pin_ctrl = ~(0x3 12); + pin_ctrl |= (strength 12
[git:v4l-dvb/v2.6.36] V4L/DVB: v4l2_subdev, cx23885: Differentiate IR carrier sense and I/O pin inversion
This is an automatic generated email to let you know that the following patch were queued at the http://git.linuxtv.org/media-tree.git tree: Subject: V4L/DVB: v4l2_subdev, cx23885: Differentiate IR carrier sense and I/O pin inversion Author: Andy Walls awa...@md.metrocast.net Date:Sun Jul 18 19:57:25 2010 -0300 There is a distinction on IR Tx for the CX2388[578] chips of carrier sense inversion (space is a carrier burst and mark is no burst) and I/O pin level inversion (0 is high output level, 1 is low output level). Allow the caller to set these parameters distinctly as v4l2_subdevice IR parameters. This permits the IR device to be configured and enabled without the IR Tx LED being on during idle/space time due to an external hardware level inversion Signed-off-by: Andy Walls awa...@md.metrocast.net Signed-off-by: Mauro Carvalho Chehab mche...@redhat.com drivers/media/video/cx23885/cx23885-input.c |2 +- drivers/media/video/cx23885/cx23888-ir.c| 32 -- include/media/v4l2-subdev.h |5 +++- 3 files changed, 29 insertions(+), 10 deletions(-) --- http://git.linuxtv.org/media-tree.git?a=commitdiff;h=5a28d9a320c865007da830c065bcaecfe91b3932 diff --git a/drivers/media/video/cx23885/cx23885-input.c b/drivers/media/video/cx23885/cx23885-input.c index d0b1613..496d751 100644 --- a/drivers/media/video/cx23885/cx23885-input.c +++ b/drivers/media/video/cx23885/cx23885-input.c @@ -170,7 +170,7 @@ static int cx23885_input_ir_start(struct cx23885_dev *dev) * mark is received as low logic level; * falling edges are detected as rising edges; etc. */ - params.invert = true; + params.invert_level = true; break; } v4l2_subdev_call(dev-sd_ir, ir, rx_s_parameters, params); diff --git a/drivers/media/video/cx23885/cx23888-ir.c b/drivers/media/video/cx23885/cx23888-ir.c index f63d378..28ca90f 100644 --- a/drivers/media/video/cx23885/cx23888-ir.c +++ b/drivers/media/video/cx23885/cx23888-ir.c @@ -60,6 +60,8 @@ MODULE_PARM_DESC(ir_888_debug, enable debug messages [CX23888 IR controller]); #define CNTRL_CPL 0x1000 #define CNTRL_LBM 0x2000 #define CNTRL_R0x4000 +/* CX23888 specific control flag */ +#define CNTRL_IVO 0x8000 #define CX23888_IR_TXCLK_REG 0x170004 #define TXCLK_TCD 0x @@ -423,6 +425,13 @@ static inline void control_tx_polarity_invert(struct cx23885_dev *dev, invert ? CNTRL_CPL : 0); } +static inline void control_tx_level_invert(struct cx23885_dev *dev, + bool invert) +{ + cx23888_ir_and_or4(dev, CX23888_IR_CNTRL_REG, ~CNTRL_IVO, + invert ? CNTRL_IVO : 0); +} + /* * IR Rx Tx Clock Register helpers */ @@ -782,8 +791,8 @@ static int cx23888_ir_rx_s_parameters(struct v4l2_subdev *sd, control_rx_s_edge_detection(dev, CNTRL_EDG_BOTH); - o-invert = p-invert; - atomic_set(state-rx_invert, p-invert); + o-invert_level = p-invert_level; + atomic_set(state-rx_invert, p-invert_level); o-interrupt_enable = p-interrupt_enable; o-enable = p-enable; @@ -894,8 +903,11 @@ static int cx23888_ir_tx_s_parameters(struct v4l2_subdev *sd, /* FIXME - make this dependent on resolution for better performance */ control_tx_irq_watermark(dev, TX_FIFO_HALF_EMPTY); - control_tx_polarity_invert(dev, p-invert); - o-invert = p-invert; + control_tx_polarity_invert(dev, p-invert_carrier_sense); + o-invert_carrier_sense = p-invert_carrier_sense; + + control_tx_level_invert(dev, p-invert_level); + o-invert_level = p-invert_level; o-interrupt_enable = p-interrupt_enable; o-enable = p-enable; @@ -1025,8 +1037,11 @@ static int cx23888_ir_log_status(struct v4l2_subdev *sd) cntrl CNTRL_TFE ? enabled : disabled); v4l2_info(sd, \tFIFO interrupt watermark: %s\n, cntrl CNTRL_TIC ? not empty : half full or less); - v4l2_info(sd, \tSignal polarity: %s\n, - cntrl CNTRL_CPL ? 0:mark 1:space : 0:space 1:mark); + v4l2_info(sd, \tOutput pin level inversion %s\n, + cntrl CNTRL_IVO ? yes : no); + v4l2_info(sd, \tCarrier polarity: %s\n, + cntrl CNTRL_CPL ? space:burst mark:noburst + : space:noburst mark:burst); if (cntrl CNTRL_MOD) { v4l2_info(sd, \tCarrier (16 clocks): %u Hz\n, clock_divider_to_carrier_freq(txclk)); @@ -1146,7 +1161,7 @@ static const struct v4l2_subdev_ir_parameters default_rx_params = { .noise_filter_min_width = 33, /* ns */ .carrier_range_lower = 35000, .carrier_range_upper = 37000
[git:v4l-dvb/v2.6.36] V4L/DVB: cx25840: Add support for CX2388[57] A/V core integrated IR controllers
This is an automatic generated email to let you know that the following patch were queued at the http://git.linuxtv.org/media-tree.git tree: Subject: V4L/DVB: cx25840: Add support for CX2388[57] A/V core integrated IR controllers Author: Andy Walls awa...@md.metrocast.net Date:Sun Jul 18 22:08:03 2010 -0300 This patch is primarily a port of the integrated IR controller code in cx23885/cx23888-ir.c. Right now, only the CX2388[57] AV core will really try to set up IR. This IR support, by design, still requires the bridge driver to do final IO pin mux configuration and setup of the IR controller parameters. For the CX2388[578] chips, enabling the AV Core for IR also starts sending Audio and Video interrupts to the bridge driver. For CX2388[578] chips audio and video interrupts are ignored and acknowledged when they happen. IR interrupt handling and status logging is exluded for the CX23888 which does not have an IR controller on the AV core. Note that experimentation reveals that the IR irq enables on the CX23885 have an inverted logic sense. The CX23887 likely suffers from the same quirk. For these chips, those irq enable bits are handled as interrupt disables. Signed-off-by: Andy Walls awa...@md.metrocast.net Signed-off-by: Mauro Carvalho Chehab mche...@redhat.com drivers/media/video/cx25840/Makefile |2 +- drivers/media/video/cx25840/cx25840-core.c | 128 +++ drivers/media/video/cx25840/cx25840-core.h | 28 + drivers/media/video/cx25840/cx25840-ir.c | 1262 4 files changed, 1419 insertions(+), 1 deletions(-) --- http://git.linuxtv.org/media-tree.git?a=commitdiff;h=52fd3dda130d03ae5c2bbdcbe81f6e083c051e12 diff --git a/drivers/media/video/cx25840/Makefile b/drivers/media/video/cx25840/Makefile index 6e8665b..2ee96d3 100644 --- a/drivers/media/video/cx25840/Makefile +++ b/drivers/media/video/cx25840/Makefile @@ -1,5 +1,5 @@ cx25840-objs:= cx25840-core.o cx25840-audio.o cx25840-firmware.o \ - cx25840-vbi.o + cx25840-vbi.o cx25840-ir.o obj-$(CONFIG_VIDEO_CX25840) += cx25840.o diff --git a/drivers/media/video/cx25840/cx25840-core.c b/drivers/media/video/cx25840/cx25840-core.c index 46a046d..9fab0b1 100644 --- a/drivers/media/video/cx25840/cx25840-core.c +++ b/drivers/media/video/cx25840/cx25840-core.c @@ -15,6 +15,9 @@ * * CX23885 support by Steven Toth st...@linuxtv.org. * + * CX2388[578] IRQ handling, IO Pin mux configuration and other small fixes are + * Copyright (C) 2010 Andy Walls awa...@md.metrocast.net + * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 @@ -48,6 +51,28 @@ MODULE_DESCRIPTION(Conexant CX25840 audio/video decoder driver); MODULE_AUTHOR(Ulf Eklund, Chris Kennedy, Hans Verkuil, Tyler Trafford); MODULE_LICENSE(GPL); +#define CX25840_VID_INT_STAT_REG 0x410 +#define CX25840_VID_INT_STAT_BITS 0x +#define CX25840_VID_INT_MASK_BITS 0x +#define CX25840_VID_INT_MASK_SHFT 16 +#define CX25840_VID_INT_MASK_REG 0x412 + +#define CX23885_AUD_MC_INT_MASK_REG 0x80c +#define CX23885_AUD_MC_INT_STAT_BITS 0x +#define CX23885_AUD_MC_INT_CTRL_BITS 0x +#define CX23885_AUD_MC_INT_STAT_SHFT 16 + +#define CX25840_AUD_INT_CTRL_REG 0x812 +#define CX25840_AUD_INT_STAT_REG 0x813 + +#define CX23885_PIN_CTRL_IRQ_REG 0x123 +#define CX23885_PIN_CTRL_IRQ_IR_STAT 0x40 +#define CX23885_PIN_CTRL_IRQ_AUD_STAT 0x20 +#define CX23885_PIN_CTRL_IRQ_VID_STAT 0x10 + +#define CX25840_IR_STATS_REG 0x210 +#define CX25840_IR_IRQEN_REG 0x214 + static int cx25840_debug; module_param_named(debug,cx25840_debug, int, 0644); @@ -137,6 +162,14 @@ int cx25840_and_or(struct i2c_client *client, u16 addr, unsigned and_mask, or_value); } +int cx25840_and_or4(struct i2c_client *client, u16 addr, u32 and_mask, + u32 or_value) +{ + return cx25840_write4(client, addr, + (cx25840_read4(client, addr) and_mask) | + or_value); +} + /* --- */ static int set_input(struct i2c_client *client, enum cx25840_video_input vid_input, @@ -592,6 +625,13 @@ static void cx23885_initialize(struct i2c_client *client) /* start microcontroller */ cx25840_and_or(client, 0x803, ~0x10, 0x10); + + /* Disable and clear video interrupts - we don't use them */ + cx25840_write4(client, CX25840_VID_INT_STAT_REG, 0x); + + /* Disable and clear audio interrupts - we don't use them */ + cx25840_write(client, CX25840_AUD_INT_CTRL_REG, 0xff); + cx25840_write(client, CX25840_AUD_INT_STAT_REG, 0xff); } /* --- */ @@ -1748,9 +1788,93 @@ static int cx25840_log_status(struct
[git:v4l-dvb/v2.6.36] V4L/DVB: v4l2_subdev: Add s_io_pin_config to v4l2_subdev_core_ops
This is an automatic generated email to let you know that the following patch were queued at the http://git.linuxtv.org/media-tree.git tree: Subject: V4L/DVB: v4l2_subdev: Add s_io_pin_config to v4l2_subdev_core_ops Author: Andy Walls awa...@md.metrocast.net Date:Sun Jul 18 18:51:10 2010 -0300 Add a method to v4l2_sudev_core_ops to allow bridge drivers to manage what signal pads/functions are routed out to multiplexed IO pins on a pin by pin basis. The interface also allows specifying initial output settings for pins and disabling an IO pin altogether. Signed-off-by: Andy Walls awa...@md.metrocast.net Signed-off-by: Mauro Carvalho Chehab mche...@redhat.com include/media/v4l2-subdev.h | 23 +++ 1 files changed, 23 insertions(+), 0 deletions(-) --- http://git.linuxtv.org/media-tree.git?a=commitdiff;h=66752f8396f97360cafb226aa1fe230f66785c5a diff --git a/include/media/v4l2-subdev.h b/include/media/v4l2-subdev.h index 02c6f4d..9195ad4 100644 --- a/include/media/v4l2-subdev.h +++ b/include/media/v4l2-subdev.h @@ -90,10 +90,31 @@ struct v4l2_decode_vbi_line { not yet implemented) since ops provide proper type-checking. */ +/* Subdevice external IO pin configuration */ +#define V4L2_SUBDEV_IO_PIN_DISABLE (1 0) /* ENABLE assumed */ +#define V4L2_SUBDEV_IO_PIN_OUTPUT (1 1) +#define V4L2_SUBDEV_IO_PIN_INPUT (1 2) +#define V4L2_SUBDEV_IO_PIN_SET_VALUE (1 3) /* Set output value */ +#define V4L2_SUBDEV_IO_PIN_ACTIVE_LOW (1 4) /* ACTIVE HIGH assumed */ + +struct v4l2_subdev_io_pin_config { + u32 flags; /* V4L2_SUBDEV_IO_PIN_* flags for this pin's config */ + u8 pin; /* Chip external IO pin to configure */ + u8 function;/* Internal signal pad/function to route to IO pin */ + u8 value; /* Initial value for pin - e.g. GPIO output value */ + u8 strength;/* Pin drive strength */ +}; + /* s_config: if set, then it is always called by the v4l2_i2c_new_subdev* functions after the v4l2_subdev was registered. It is used to pass platform data to the subdev which can be used during initialization. + s_io_pin_config: configure one or more chip I/O pins for chips that + multiplex different internal signal pads out to IO pins. This function + takes a pointer to an array of 'n' pin configuration entries, one for + each pin being configured. This function could be called at times + other than just subdevice initialization. + init: initialize the sensor registors to some sort of reasonable default values. Do not use for new drivers and should be removed in existing drivers. @@ -115,6 +136,8 @@ struct v4l2_subdev_core_ops { int (*g_chip_ident)(struct v4l2_subdev *sd, struct v4l2_dbg_chip_ident *chip); int (*log_status)(struct v4l2_subdev *sd); int (*s_config)(struct v4l2_subdev *sd, int irq, void *platform_data); + int (*s_io_pin_config)(struct v4l2_subdev *sd, size_t n, + struct v4l2_subdev_io_pin_config *pincfg); int (*init)(struct v4l2_subdev *sd, u32 val); int (*load_fw)(struct v4l2_subdev *sd); int (*reset)(struct v4l2_subdev *sd, u32 val); ___ linuxtv-commits mailing list linuxtv-commits@linuxtv.org http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits
[git:v4l-dvb/v2.6.36] V4L/DVB: cx23885: Add a VIDIOC_LOG_STATUS ioctl function for analog video devices
This is an automatic generated email to let you know that the following patch were queued at the http://git.linuxtv.org/media-tree.git tree: Subject: V4L/DVB: cx23885: Add a VIDIOC_LOG_STATUS ioctl function for analog video devices Author: Andy Walls awa...@md.metrocast.net Date:Sun Jul 18 18:18:06 2010 -0300 Add a simple log_status function for raw analog video capture device nodes, to provide insight into the state of the CX2388[578] A/V decoder core. Signed-off-by: Andy Walls awa...@md.metrocast.net Signed-off-by: Mauro Carvalho Chehab mche...@redhat.com drivers/media/video/cx23885/cx23885-video.c | 16 1 files changed, 16 insertions(+), 0 deletions(-) --- http://git.linuxtv.org/media-tree.git?a=commitdiff;h=e9e5cf472751a16ebe80c9a47b512605e3511880 diff --git a/drivers/media/video/cx23885/cx23885-video.c b/drivers/media/video/cx23885/cx23885-video.c index 4e44dcd..2519455 100644 --- a/drivers/media/video/cx23885/cx23885-video.c +++ b/drivers/media/video/cx23885/cx23885-video.c @@ -1205,6 +1205,21 @@ static int vidioc_s_input(struct file *file, void *priv, unsigned int i) return 0; } +static int vidioc_log_status(struct file *file, void *priv) +{ + struct cx23885_fh *fh = priv; + struct cx23885_dev *dev = fh-dev; + + printk(KERN_INFO + %s/0: START LOG STATUS \n, + dev-name); + call_all(dev, core, log_status); + printk(KERN_INFO + %s/0: = END LOG STATUS =\n, + dev-name); + return 0; +} + static int vidioc_queryctrl(struct file *file, void *priv, struct v4l2_queryctrl *qctrl) { @@ -1410,6 +1425,7 @@ static const struct v4l2_ioctl_ops video_ioctl_ops = { .vidioc_enum_input= vidioc_enum_input, .vidioc_g_input = vidioc_g_input, .vidioc_s_input = vidioc_s_input, + .vidioc_log_status= vidioc_log_status, .vidioc_queryctrl = vidioc_queryctrl, .vidioc_g_ctrl= vidioc_g_ctrl, .vidioc_s_ctrl= vidioc_s_ctrl, ___ linuxtv-commits mailing list linuxtv-commits@linuxtv.org http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits
[git:v4l-dvb/v2.6.36] V4L/DVB: cx23885: Add correct detection of the HVR-1250 model 79501
This is an automatic generated email to let you know that the following patch were queued at the http://git.linuxtv.org/media-tree.git tree: Subject: V4L/DVB: cx23885: Add correct detection of the HVR-1250 model 79501 Author: Andy Walls awa...@md.metrocast.net Date:Sun Jul 18 17:35:00 2010 -0300 The offset in the eeprom data for the 79501 version of the HVR-1250 is at 0xc0 vs. the standard 0x80. Signed-off-by: Andy Walls awa...@md.metrocast.net Signed-off-by: Mauro Carvalho Chehab mche...@redhat.com drivers/media/video/cx23885/cx23885-cards.c | 10 ++ 1 files changed, 10 insertions(+), 0 deletions(-) --- http://git.linuxtv.org/media-tree.git?a=commitdiff;h=ebbeb46000676af0772da4b7da22e2aae3889bd0 diff --git a/drivers/media/video/cx23885/cx23885-cards.c b/drivers/media/video/cx23885/cx23885-cards.c index 2014dae..29eea8d 100644 --- a/drivers/media/video/cx23885/cx23885-cards.c +++ b/drivers/media/video/cx23885/cx23885-cards.c @@ -626,6 +626,9 @@ static void hauppauge_eeprom(struct cx23885_dev *dev, u8 *eeprom_data) case 79101: /* WinTV-HVR1250 (PCIe, Retail, IR, half height, ATSC and Basic analog */ + case 79501: + /* WinTV-HVR1250 (PCIe, No IR, half height, + ATSC [at least] and Basic analog) */ case 79561: /* WinTV-HVR1250 (PCIe, OEM, No IR, half height, ATSC and Basic analog */ @@ -1028,6 +1031,13 @@ void cx23885_card_setup(struct cx23885_dev *dev) switch (dev-board) { case CX23885_BOARD_HAUPPAUGE_HVR1250: + if (dev-i2c_bus[0].i2c_rc == 0) { + if (eeprom[0x80] != 0x84) + hauppauge_eeprom(dev, eeprom+0xc0); + else + hauppauge_eeprom(dev, eeprom+0x80); + } + break; case CX23885_BOARD_HAUPPAUGE_HVR1500: case CX23885_BOARD_HAUPPAUGE_HVR1500Q: case CX23885_BOARD_HAUPPAUGE_HVR1400: ___ linuxtv-commits mailing list linuxtv-commits@linuxtv.org http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits
[git:v4l-dvb/v2.6.36] V4L/DVB: cx25840: Make cx25840 i2c register read transactions atomic
This is an automatic generated email to let you know that the following patch were queued at the http://git.linuxtv.org/media-tree.git tree: Subject: V4L/DVB: cx25840: Make cx25840 i2c register read transactions atomic Author: Andy Walls awa...@md.metrocast.net Date:Sun Jul 18 17:16:16 2010 -0300 There was a small window between writing the cx25840 register address over the i2c bus and reading the register contents back from the cx25840 device that the i2c adapter lock was released. This change ensures the adapter lock is not released until the register read is done. Signed-off-by: Andy Walls awa...@md.metrocast.net Signed-off-by: Mauro Carvalho Chehab mche...@redhat.com drivers/media/video/cx25840/cx25840-core.c | 58 +++- 1 files changed, 39 insertions(+), 19 deletions(-) --- http://git.linuxtv.org/media-tree.git?a=commitdiff;h=5f272644464bfb8cf8cec958cfc06020283c2f14 diff --git a/drivers/media/video/cx25840/cx25840-core.c b/drivers/media/video/cx25840/cx25840-core.c index bb4872b..4f908fa 100644 --- a/drivers/media/video/cx25840/cx25840-core.c +++ b/drivers/media/video/cx25840/cx25840-core.c @@ -80,33 +80,53 @@ int cx25840_write4(struct i2c_client *client, u16 addr, u32 value) u8 cx25840_read(struct i2c_client * client, u16 addr) { - u8 buffer[2]; - buffer[0] = addr 8; - buffer[1] = addr 0xff; - - if (i2c_master_send(client, buffer, 2) 2) - return 0; - - if (i2c_master_recv(client, buffer, 1) 1) + struct i2c_msg msgs[2]; + u8 tx_buf[2], rx_buf[1]; + + /* Write register address */ + tx_buf[0] = addr 8; + tx_buf[1] = addr 0xff; + msgs[0].addr = client-addr; + msgs[0].flags = 0; + msgs[0].len = 2; + msgs[0].buf = (char *) tx_buf; + + /* Read data from register */ + msgs[1].addr = client-addr; + msgs[1].flags = I2C_M_RD; + msgs[1].len = 1; + msgs[1].buf = (char *) rx_buf; + + if (i2c_transfer(client-adapter, msgs, 2) 2) return 0; - return buffer[0]; + return rx_buf[0]; } u32 cx25840_read4(struct i2c_client * client, u16 addr) { - u8 buffer[4]; - buffer[0] = addr 8; - buffer[1] = addr 0xff; - - if (i2c_master_send(client, buffer, 2) 2) - return 0; - - if (i2c_master_recv(client, buffer, 4) 4) + struct i2c_msg msgs[2]; + u8 tx_buf[2], rx_buf[4]; + + /* Write register address */ + tx_buf[0] = addr 8; + tx_buf[1] = addr 0xff; + msgs[0].addr = client-addr; + msgs[0].flags = 0; + msgs[0].len = 2; + msgs[0].buf = (char *) tx_buf; + + /* Read data from registers */ + msgs[1].addr = client-addr; + msgs[1].flags = I2C_M_RD; + msgs[1].len = 4; + msgs[1].buf = (char *) rx_buf; + + if (i2c_transfer(client-adapter, msgs, 2) 2) return 0; - return (buffer[3] 24) | (buffer[2] 16) | - (buffer[1] 8) | buffer[0]; + return (rx_buf[3] 24) | (rx_buf[2] 16) | (rx_buf[1] 8) | + rx_buf[0]; } int cx25840_and_or(struct i2c_client *client, u16 addr, unsigned and_mask, ___ linuxtv-commits mailing list linuxtv-commits@linuxtv.org http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits
[git:v4l-dvb/v2.6.36] V4L/DVB: gspca - vc032x: Do sensor probe at resume time
This is an automatic generated email to let you know that the following patch were queued at the http://git.linuxtv.org/media-tree.git tree: Subject: V4L/DVB: gspca - vc032x: Do sensor probe at resume time Author: Jean-François Moine moin...@free.fr Date:Mon Jul 26 07:59:23 2010 -0300 Signed-off-by: Jean-François Moine moin...@free.fr Signed-off-by: Mauro Carvalho Chehab mche...@redhat.com drivers/media/video/gspca/vc032x.c | 60 +++- 1 files changed, 32 insertions(+), 28 deletions(-) --- http://git.linuxtv.org/media-tree.git?a=commitdiff;h=bb44f5682b7b7829cf010d6dad9c75f58d1f767b diff --git a/drivers/media/video/gspca/vc032x.c b/drivers/media/video/gspca/vc032x.c index d450a95..48a8af3 100644 --- a/drivers/media/video/gspca/vc032x.c +++ b/drivers/media/video/gspca/vc032x.c @@ -3391,6 +3391,33 @@ static int sd_config(struct gspca_dev *gspca_dev, const struct usb_device_id *id) { struct sd *sd = (struct sd *) gspca_dev; + + sd-bridge = id-driver_info 8; + sd-flags = id-driver_info 0xff; + + if (id-idVendor == 0x046d + (id-idProduct == 0x0892 || id-idProduct == 0x0896)) + sd-sensor = SENSOR_PO; /* no probe */ + + sd-brightness = BRIGHTNESS_DEF; + sd-contrast = CONTRAST_DEF; + sd-colors = COLOR_DEF; + sd-hflip = HFLIP_DEF; + sd-vflip = VFLIP_DEF; + sd-lightfreq = FREQ_DEF; + sd-sharpness = SHARPNESS_DEF; + sd-gain = GAIN_DEF; + sd-exposure = EXPOSURE_DEF; + sd-autogain = AUTOGAIN_DEF; + sd-backlight = BACKLIGHT_DEF; + + return 0; +} + +/* this function is called at probe and resume time */ +static int sd_init(struct gspca_dev *gspca_dev) +{ + struct sd *sd = (struct sd *) gspca_dev; struct cam *cam; int sensor; static u8 npkt[] = {/* number of packets per ISOC message */ @@ -3406,14 +3433,11 @@ static int sd_config(struct gspca_dev *gspca_dev, 128,/* PO 9 */ }; - cam = gspca_dev-cam; - sd-bridge = id-driver_info 8; - sd-flags = id-driver_info 0xff; - if (id-idVendor == 0x046d - (id-idProduct == 0x0892 || id-idProduct == 0x0896)) - sensor = SENSOR_PO; - else + if (sd-sensor != SENSOR_PO) sensor = vc032x_probe_sensor(gspca_dev); + else + sensor = sd-sensor; + switch (sensor) { case -1: PDEBUG(D_PROBE, Unknown sensor...); @@ -3452,6 +3476,7 @@ static int sd_config(struct gspca_dev *gspca_dev, } sd-sensor = sensor; + cam = gspca_dev-cam; if (sd-bridge == BRIDGE_VC0321) { cam-cam_mode = vc0321_mode; cam-nmodes = ARRAY_SIZE(vc0321_mode); @@ -3480,32 +3505,11 @@ static int sd_config(struct gspca_dev *gspca_dev, } } cam-npkt = npkt[sd-sensor]; - - sd-brightness = BRIGHTNESS_DEF; - sd-contrast = CONTRAST_DEF; - sd-colors = COLOR_DEF; - sd-hflip = HFLIP_DEF; - sd-vflip = VFLIP_DEF; - sd-lightfreq = FREQ_DEF; - sd-sharpness = SHARPNESS_DEF; - sd-gain = GAIN_DEF; - sd-exposure = EXPOSURE_DEF; - sd-autogain = AUTOGAIN_DEF; - sd-backlight = BACKLIGHT_DEF; - gspca_dev-ctrl_dis = ctrl_dis[sd-sensor]; if (sd-sensor == SENSOR_OV7670) sd-flags |= FL_HFLIP | FL_VFLIP; - return 0; -} - -/* this function is called at probe and resume time */ -static int sd_init(struct gspca_dev *gspca_dev) -{ - struct sd *sd = (struct sd *) gspca_dev; - if (sd-bridge == BRIDGE_VC0321) { reg_r(gspca_dev, 0x8a, 0, 3); reg_w(gspca_dev, 0x87, 0x00, 0x0f0f); ___ linuxtv-commits mailing list linuxtv-commits@linuxtv.org http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits
[git:v4l-dvb/v2.6.36] V4L/DVB: saa717x: convert to the new control framework
This is an automatic generated email to let you know that the following patch were queued at the http://git.linuxtv.org/media-tree.git tree: Subject: V4L/DVB: saa717x: convert to the new control framework Author: Hans Verkuil hverk...@xs4all.nl Date:Fri Apr 23 09:04:48 2010 -0300 Signed-off-by: Hans Verkuil hverk...@xs4all.nl Signed-off-by: Mauro Carvalho Chehab mche...@redhat.com drivers/media/video/saa717x.c | 323 ++-- 1 files changed, 81 insertions(+), 242 deletions(-) --- http://git.linuxtv.org/media-tree.git?a=commitdiff;h=59b8311a9b4cdd3e11d1c7d434bb9abf1ae3bc5c diff --git a/drivers/media/video/saa717x.c b/drivers/media/video/saa717x.c index 78d6995..45f8bfc 100644 --- a/drivers/media/video/saa717x.c +++ b/drivers/media/video/saa717x.c @@ -38,6 +38,7 @@ #include linux/videodev2.h #include linux/i2c.h #include media/v4l2-device.h +#include media/v4l2-ctrls.h #include media/v4l2-i2c-drv.h MODULE_DESCRIPTION(Philips SAA717x audio/video decoder driver); @@ -55,14 +56,11 @@ MODULE_PARM_DESC(debug, Debug level (0-1)); struct saa717x_state { struct v4l2_subdev sd; + struct v4l2_ctrl_handler hdl; v4l2_std_id std; int input; int enable; int radio; - int bright; - int contrast; - int hue; - int sat; int playback; int audio; int tuner_audio_mode; @@ -81,6 +79,11 @@ static inline struct saa717x_state *to_state(struct v4l2_subdev *sd) return container_of(sd, struct saa717x_state, sd); } +static inline struct v4l2_subdev *to_sd(struct v4l2_ctrl *ctrl) +{ + return container_of(ctrl-handler, struct saa717x_state, hdl)-sd; +} + /* --- */ /* for audio mode */ @@ -774,29 +777,6 @@ static void set_audio_mode(struct v4l2_subdev *sd, int audio_mode) saa717x_write(sd, 0x470, reg_set_audio_template[audio_mode][1]); } -/* write regs to video output level (bright,contrast,hue,sat) */ -static void set_video_output_level_regs(struct v4l2_subdev *sd, - struct saa717x_state *decoder) -{ - /* brightness ffh (bright) - 80h (ITU level) - 00h (dark) */ - saa717x_write(sd, 0x10a, decoder-bright); - - /* contrast 7fh (max: 1.984) - 44h (ITU) - 40h (1.0) - - 0h (luminance off) 40: i2c dump - c0h (-1.0 inverse chrominance) - 80h (-2.0 inverse chrominance) */ - saa717x_write(sd, 0x10b, decoder-contrast); - - /* saturation? 7fh(max)-40h(ITU)-0h(color off) - c0h (-1.0 inverse chrominance) - 80h (-2.0 inverse chrominance) */ - saa717x_write(sd, 0x10c, decoder-sat); - - /* color hue (phase) control - 7fh (+178.6) - 0h (0 normal) - 80h (-180.0) */ - saa717x_write(sd, 0x10d, decoder-hue); -} - /* write regs to set audio volume, bass and treble */ static int set_audio_regs(struct v4l2_subdev *sd, struct saa717x_state *decoder) @@ -829,9 +809,9 @@ static int set_audio_regs(struct v4l2_subdev *sd, saa717x_write(sd, 0x480, val); - /* bass and treble; go to another function */ /* set bass and treble */ - val = decoder-audio_main_bass | (decoder-audio_main_treble 8); + val = decoder-audio_main_bass 0x1f; + val |= (decoder-audio_main_treble 0x1f) 5; saa717x_write(sd, 0x488, val); return 0; } @@ -893,218 +873,55 @@ static void set_v_scale(struct v4l2_subdev *sd, int task, int yscale) saa717x_write(sd, 0x71 + task_shift, yscale 8); } -static int saa717x_s_ctrl(struct v4l2_subdev *sd, struct v4l2_control *ctrl) -{ - struct saa717x_state *state = to_state(sd); - - switch (ctrl-id) { - case V4L2_CID_BRIGHTNESS: - if (ctrl-value 0 || ctrl-value 255) { - v4l2_err(sd, invalid brightness setting %d\n, ctrl-value); - return -ERANGE; - } - - state-bright = ctrl-value; - v4l2_dbg(1, debug, sd, bright:%d\n, state-bright); - saa717x_write(sd, 0x10a, state-bright); - break; - - case V4L2_CID_CONTRAST: - if (ctrl-value 0 || ctrl-value 127) { - v4l2_err(sd, invalid contrast setting %d\n, ctrl-value); - return -ERANGE; - } - - state-contrast = ctrl-value; - v4l2_dbg(1, debug, sd, contrast:%d\n, state-contrast); - saa717x_write(sd, 0x10b, state-contrast); - break; - - case V4L2_CID_SATURATION: - if (ctrl-value 0 || ctrl-value 127) { - v4l2_err(sd, invalid saturation setting %d\n, ctrl-value); - return -ERANGE; - } - - state-sat = ctrl-value; - v4l2_dbg(1, debug, sd, sat:%d\n, state-sat); - saa717x_write(sd
[git:v4l-dvb/v2.6.36] V4L/DVB: msp3400: convert to the new control framework
This is an automatic generated email to let you know that the following patch were queued at the http://git.linuxtv.org/media-tree.git tree: Subject: V4L/DVB: msp3400: convert to the new control framework Author: Hans Verkuil hverk...@xs4all.nl Date:Mon May 24 10:01:58 2010 -0300 Signed-off-by: Hans Verkuil hverk...@xs4all.nl Signed-off-by: Mauro Carvalho Chehab mche...@redhat.com drivers/media/video/msp3400-driver.c | 248 +++ drivers/media/video/msp3400-driver.h | 18 ++- drivers/media/video/msp3400-kthreads.c | 16 +- 3 files changed, 110 insertions(+), 172 deletions(-) --- http://git.linuxtv.org/media-tree.git?a=commitdiff;h=ebc3bba5833e7021336f09767347a52448a60bc5 diff --git a/drivers/media/video/msp3400-driver.c b/drivers/media/video/msp3400-driver.c index e9df3cb..0e41213 100644 --- a/drivers/media/video/msp3400-driver.c +++ b/drivers/media/video/msp3400-driver.c @@ -283,51 +283,6 @@ void msp_set_scart(struct i2c_client *client, int in, int out) msp_write_dem(client, 0x40, state-i2s_mode); } -void msp_set_audio(struct i2c_client *client) -{ - struct msp_state *state = to_state(i2c_get_clientdata(client)); - int bal = 0, bass, treble, loudness; - int val = 0; - int reallymuted = state-muted | state-scan_in_progress; - - if (!reallymuted) - val = (state-volume * 0x7f / 65535) 8; - - v4l_dbg(1, msp_debug, client, mute=%s scanning=%s volume=%d\n, - state-muted ? on : off, - state-scan_in_progress ? yes : no, - state-volume); - - msp_write_dsp(client, 0x, val); - msp_write_dsp(client, 0x0007, reallymuted ? 0x1 : (val | 0x1)); - if (state-has_scart2_out_volume) - msp_write_dsp(client, 0x0040, reallymuted ? 0x1 : (val | 0x1)); - if (state-has_headphones) - msp_write_dsp(client, 0x0006, val); - if (!state-has_sound_processing) - return; - - if (val) - bal = (u8)((state-balance / 256) - 128); - bass = ((state-bass - 32768) * 0x60 / 65535) 8; - treble = ((state-treble - 32768) * 0x60 / 65535) 8; - loudness = state-loudness ? ((5 * 4) 8) : 0; - - v4l_dbg(1, msp_debug, client, balance=%d bass=%d treble=%d loudness=%d\n, - state-balance, state-bass, state-treble, state-loudness); - - msp_write_dsp(client, 0x0001, bal 8); - msp_write_dsp(client, 0x0002, bass); - msp_write_dsp(client, 0x0003, treble); - msp_write_dsp(client, 0x0004, loudness); - if (!state-has_headphones) - return; - msp_write_dsp(client, 0x0030, bal 8); - msp_write_dsp(client, 0x0031, bass); - msp_write_dsp(client, 0x0032, treble); - msp_write_dsp(client, 0x0033, loudness); -} - /* */ static void msp_wake_thread(struct i2c_client *client) @@ -363,98 +318,73 @@ int msp_sleep(struct msp_state *state, int timeout) /* */ -static int msp_g_ctrl(struct v4l2_subdev *sd, struct v4l2_control *ctrl) +static int msp_s_ctrl(struct v4l2_ctrl *ctrl) { - struct msp_state *state = to_state(sd); + struct msp_state *state = ctrl_to_state(ctrl); + struct i2c_client *client = v4l2_get_subdevdata(state-sd); + int val = ctrl-val; switch (ctrl-id) { - case V4L2_CID_AUDIO_VOLUME: - ctrl-value = state-volume; - break; - - case V4L2_CID_AUDIO_MUTE: - ctrl-value = state-muted; - break; - - case V4L2_CID_AUDIO_BALANCE: - if (!state-has_sound_processing) - return -EINVAL; - ctrl-value = state-balance; - break; - - case V4L2_CID_AUDIO_BASS: - if (!state-has_sound_processing) - return -EINVAL; - ctrl-value = state-bass; + case V4L2_CID_AUDIO_VOLUME: { + /* audio volume cluster */ + int reallymuted = state-muted-val | state-scan_in_progress; + + if (!reallymuted) + val = (val * 0x7f / 65535) 8; + + v4l_dbg(1, msp_debug, client, mute=%s scanning=%s volume=%d\n, + state-muted-val ? on : off, + state-scan_in_progress ? yes : no, + state-volume-val); + + msp_write_dsp(client, 0x, val); + msp_write_dsp(client, 0x0007, reallymuted ? 0x1 : (val | 0x1)); + if (state-has_scart2_out_volume) + msp_write_dsp(client, 0x0040, reallymuted ? 0x1 : (val | 0x1)); + if (state-has_headphones) + msp_write_dsp(client, 0x0006, val); break; - - case
[git:v4l-dvb/v2.6.36] V4L/DVB: gspca - vc032x: Add more controls for poxxxx
This is an automatic generated email to let you know that the following patch were queued at the http://git.linuxtv.org/media-tree.git tree: Subject: V4L/DVB: gspca - vc032x: Add more controls for po Author: Jean-François Moine moin...@free.fr Date:Mon Jul 26 07:53:57 2010 -0300 The added controls are exposure, gain, autogain and backlight compensation. Signed-off-by: Jean-François Moine moin...@free.fr Signed-off-by: Mauro Carvalho Chehab mche...@redhat.com drivers/media/video/gspca/vc032x.c | 306 1 files changed, 272 insertions(+), 34 deletions(-) --- http://git.linuxtv.org/media-tree.git?a=commitdiff;h=486cb2d5b01e77fb3cd93c4c0810100d59a45c8b diff --git a/drivers/media/video/gspca/vc032x.c b/drivers/media/video/gspca/vc032x.c index 031266a..d450a95 100644 --- a/drivers/media/video/gspca/vc032x.c +++ b/drivers/media/video/gspca/vc032x.c @@ -39,6 +39,10 @@ struct sd { u8 vflip; u8 lightfreq; s8 sharpness; + u16 exposure; + u8 gain; + u8 autogain; + u8 backlight; u8 image_offset; @@ -77,6 +81,14 @@ static int sd_setfreq(struct gspca_dev *gspca_dev, __s32 val); static int sd_getfreq(struct gspca_dev *gspca_dev, __s32 *val); static int sd_setsharpness(struct gspca_dev *gspca_dev, __s32 val); static int sd_getsharpness(struct gspca_dev *gspca_dev, __s32 *val); +static int sd_setgain(struct gspca_dev *gspca_dev, __s32 val); +static int sd_getgain(struct gspca_dev *gspca_dev, __s32 *val); +static int sd_setexposure(struct gspca_dev *gspca_dev, __s32 val); +static int sd_getexposure(struct gspca_dev *gspca_dev, __s32 *val); +static int sd_setautogain(struct gspca_dev *gspca_dev, __s32 val); +static int sd_getautogain(struct gspca_dev *gspca_dev, __s32 *val); +static int sd_setbacklight(struct gspca_dev *gspca_dev, __s32 val); +static int sd_getbacklight(struct gspca_dev *gspca_dev, __s32 *val); static const struct ctrl sd_ctrls[] = { #define BRIGHTNESS_IDX 0 @@ -185,6 +197,66 @@ static const struct ctrl sd_ctrls[] = { .set = sd_setsharpness, .get = sd_getsharpness, }, +#define GAIN_IDX 7 + { + { + .id = V4L2_CID_GAIN, + .type= V4L2_CTRL_TYPE_INTEGER, + .name= Gain, + .minimum = 0, + .maximum = 78, + .step= 1, +#define GAIN_DEF 0 + .default_value = GAIN_DEF, + }, + .set = sd_setgain, + .get = sd_getgain, + }, +#define EXPOSURE_IDX 8 + { + { + .id = V4L2_CID_EXPOSURE, + .type = V4L2_CTRL_TYPE_INTEGER, + .name = Exposure, +#define EXPOSURE_DEF 450 + .minimum = 0, + .maximum = 4095, + .step = 1, + .default_value = EXPOSURE_DEF, + }, + .set = sd_setexposure, + .get = sd_getexposure, + }, +#define AUTOGAIN_IDX 9 + { + { + .id = V4L2_CID_AUTOGAIN, + .type = V4L2_CTRL_TYPE_BOOLEAN, + .name = Automatic Gain and Exposure, + .minimum = 0, + .maximum = 1, + .step = 1, +#define AUTOGAIN_DEF 1 + .default_value = AUTOGAIN_DEF, + }, + .set = sd_setautogain, + .get = sd_getautogain, + }, +#define BACKLIGHT_IDX 10 + { + { + .id = V4L2_CID_BACKLIGHT_COMPENSATION, + .type = V4L2_CTRL_TYPE_BOOLEAN, + .name = Backlight Compensation, + .minimum = 0, + .maximum = 15, + .step = 1, +#define BACKLIGHT_DEF 15 + .default_value = BACKLIGHT_DEF, + }, + .set = sd_setbacklight, + .get = sd_getbacklight, + }, }; /* table of the disabled controls */ @@ -192,33 +264,51 @@ static u32 ctrl_dis[] = { /* SENSOR_HV7131R 0 */ (1 BRIGHTNESS_IDX) | (1 CONTRAST_IDX) | (1 COLORS_IDX) | (1 HFLIP_IDX) | (1 VFLIP_IDX) | (1 LIGHTFREQ_IDX) - | (1 SHARPNESS_IDX), + | (1 SHARPNESS_IDX) + | (1 GAIN_IDX) | (1 EXPOSURE_IDX) + | (1 AUTOGAIN_IDX) | (1 BACKLIGHT_IDX), /* SENSOR_MI0360 1 */ (1 BRIGHTNESS_IDX) | (1 CONTRAST_IDX) | (1 COLORS_IDX) | (1 HFLIP_IDX) | (1 VFLIP_IDX) | (1 LIGHTFREQ_IDX) - | (1 SHARPNESS_IDX), + | (1 SHARPNESS_IDX) + | (1 GAIN_IDX) | (1 EXPOSURE_IDX) + | (1 AUTOGAIN_IDX) | (1 BACKLIGHT_IDX), /* SENSOR_MI1310_SOC 2 */ (1 BRIGHTNESS_IDX) | (1 CONTRAST_IDX) | (1 COLORS_IDX
[git:v4l-dvb/v2.6.36] V4L/DVB: gspca - sq930x: Cleanup source, add comments
This is an automatic generated email to let you know that the following patch were queued at the http://git.linuxtv.org/media-tree.git tree: Subject: V4L/DVB: gspca - sq930x: Cleanup source, add comments Author: Jean-François Moine moin...@free.fr Date:Mon Jul 26 07:27:13 2010 -0300 Signed-off-by: Jean-François Moine moin...@free.fr Signed-off-by: Mauro Carvalho Chehab mche...@redhat.com drivers/media/video/gspca/sq930x.c | 12 +++- 1 files changed, 7 insertions(+), 5 deletions(-) --- http://git.linuxtv.org/media-tree.git?a=commitdiff;h=6e80cc51b4419ca0f8162024ee2497d7ec8ba31c diff --git a/drivers/media/video/gspca/sq930x.c b/drivers/media/video/gspca/sq930x.c index fceed19..7ae6522 100644 --- a/drivers/media/video/gspca/sq930x.c +++ b/drivers/media/video/gspca/sq930x.c @@ -48,7 +48,7 @@ enum sensors { SENSOR_ICX098BQ, SENSOR_LZ24BP, SENSOR_MI0360, - SENSOR_MT9V111, + SENSOR_MT9V111, /* = MI360SOC */ SENSOR_OV7660, SENSOR_OV9630, }; @@ -279,7 +279,7 @@ static const struct i2c_write_cmd mt9v111_init_0[] = { {0x01, 0x0001}, /* select IFP/SOC registers */ {0x06, 0x300c}, /* operating mode control */ {0x08, 0xcc00}, /* output format control (RGB) */ - {0x01, 0x0004}, /* select core registers */ + {0x01, 0x0004}, /* select sensor core registers */ }; static const struct i2c_write_cmd mt9v111_init_1[] = { {0x03, 0x01e5}, /* window height */ @@ -321,6 +321,7 @@ static const struct ucbus_write_cmd ov9630_start_0[] = { {0xf334, 0x3e}, {0xf335, 0xf8}, {0xf33f, 0x03} }; +/* start parameters indexed by [sensor][mode] */ static const struct cap_s { u8 cc_sizeid; u8 cc_bytes[32]; @@ -923,11 +924,12 @@ static void send_start(struct gspca_dev *gspca_dev) reg_wb(gspca_dev, 0x0900 | SQ930_CTRL_CAP_START, 0x0a00 | cap-cc_sizeid, cap-cc_bytes, 32); -}; +} + static void send_stop(struct gspca_dev *gspca_dev) { reg_w(gspca_dev, SQ930_CTRL_CAP_STOP, 0); -}; +} /* function called at start time before URB creation */ static int sd_isoc_init(struct gspca_dev *gspca_dev) @@ -1014,7 +1016,7 @@ static int sd_start(struct gspca_dev *gspca_dev) /* 1st start */ send_start(gspca_dev); msleep(60); - reg_w(gspca_dev, SQ930_CTRL_CAP_STOP, 0x); + send_stop(gspca_dev); i2c_write(sd, mi0360_start_4, ARRAY_SIZE(mi0360_start_4)); ___ linuxtv-commits mailing list linuxtv-commits@linuxtv.org http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits
[git:v4l-dvb/v2.6.36] V4L/DVB: gspca - sq930x: Change the horizontal blanking of sensor mt9v111
This is an automatic generated email to let you know that the following patch were queued at the http://git.linuxtv.org/media-tree.git tree: Subject: V4L/DVB: gspca - sq930x: Change the horizontal blanking of sensor mt9v111 Author: Jean-François Moine moin...@free.fr Date:Mon Jul 26 07:25:44 2010 -0300 Signed-off-by: Jean-François Moine moin...@free.fr Signed-off-by: Mauro Carvalho Chehab mche...@redhat.com drivers/media/video/gspca/sq930x.c |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) --- http://git.linuxtv.org/media-tree.git?a=commitdiff;h=585d48812c66f3045b6cb51539bafe10b109882f diff --git a/drivers/media/video/gspca/sq930x.c b/drivers/media/video/gspca/sq930x.c index 4b50aa1..fceed19 100644 --- a/drivers/media/video/gspca/sq930x.c +++ b/drivers/media/video/gspca/sq930x.c @@ -307,7 +307,8 @@ static const struct i2c_write_cmd mt9v111_init_3[] = { {0x62, 0x0405}, }; static const struct i2c_write_cmd mt9v111_init_4[] = { - {0x05, 0x00ce}, /* horizontal blanking */ +/* {0x05, 0x00ce}, */ + {0x05, 0x005d}, /* horizontal blanking */ }; static const struct ucbus_write_cmd ov7660_start_0[] = { ___ linuxtv-commits mailing list linuxtv-commits@linuxtv.org http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits
[git:v4l-dvb/v2.6.36] V4L/DVB: gspca - sq930x: Change the gain value for Micron sensors
This is an automatic generated email to let you know that the following patch were queued at the http://git.linuxtv.org/media-tree.git tree: Subject: V4L/DVB: gspca - sq930x: Change the gain value for Micron sensors Author: Jean-François Moine moin...@free.fr Date:Mon Jul 26 06:58:18 2010 -0300 The bit 7 of the sensor gain register multiplies the 7bits value by two. It is now always set with half the user gain value. Signed-off-by: Jean-François Moine moin...@free.fr Signed-off-by: Mauro Carvalho Chehab mche...@redhat.com drivers/media/video/gspca/sq930x.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) --- http://git.linuxtv.org/media-tree.git?a=commitdiff;h=b3c0af6e1f870dc1ade19382177f931f47499d86 diff --git a/drivers/media/video/gspca/sq930x.c b/drivers/media/video/gspca/sq930x.c index 8032190..04516b4 100644 --- a/drivers/media/video/gspca/sq930x.c +++ b/drivers/media/video/gspca/sq930x.c @@ -862,7 +862,7 @@ static void setexposure(struct gspca_dev *gspca_dev) buf[i++] = 0x35;/* reg = global gain */ buf[i++] = 0x00;/* val H */ buf[i++] = sensor-i2c_dum; - buf[i++] = sd-gain;/* val L */ + buf[i++] = 0x80 + sd-gain / 2; /* val L */ buf[i++] = 0x00; buf[i++] = 0x00; buf[i++] = 0x00; ___ linuxtv-commits mailing list linuxtv-commits@linuxtv.org http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits
[git:v4l-dvb/v2.6.36] V4L/DVB: gspca - sq930x: Change image format to Bayer mode
This is an automatic generated email to let you know that the following patch were queued at the http://git.linuxtv.org/media-tree.git tree: Subject: V4L/DVB: gspca - sq930x: Change image format to Bayer mode Author: Jean-François Moine moin...@free.fr Date:Mon Jul 26 07:23:00 2010 -0300 The JPEG format did not work fine. The Bayer format offers correct VGA (640x480) resolution, but bad QQVGA (160x120). This last resolution is removed. Signed-off-by: Jean-François Moine moin...@free.fr Signed-off-by: Mauro Carvalho Chehab mche...@redhat.com drivers/media/video/gspca/sq930x.c | 312 +++- 1 files changed, 56 insertions(+), 256 deletions(-) --- http://git.linuxtv.org/media-tree.git?a=commitdiff;h=82d2c7aa85e0c7902cd309acafa375b61e147ce6 diff --git a/drivers/media/video/gspca/sq930x.c b/drivers/media/video/gspca/sq930x.c index cec3daf..4b50aa1 100644 --- a/drivers/media/video/gspca/sq930x.c +++ b/drivers/media/video/gspca/sq930x.c @@ -23,7 +23,6 @@ #define MODULE_NAME sq930x #include gspca.h -#include jpeg.h MODULE_AUTHOR(Jean-Francois Moine http://moinejf.free.fr\n Gerard Klaver gerard at gkall dot hobby dot nl\n @@ -31,8 +30,6 @@ MODULE_AUTHOR(Jean-Francois Moine http://moinejf.free.fr\n MODULE_DESCRIPTION(GSPCA/SQ930x USB Camera Driver); MODULE_LICENSE(GPL); -#define BULK_TRANSFER_LEN 5128 - /* Structure to hold all of our device specific stuff */ struct sd { struct gspca_dev gspca_dev; /* !! must be the first item */ @@ -40,14 +37,8 @@ struct sd { u16 expo; u8 gain; - u8 quality; /* webcam quality 0..3 */ -#define QUALITY_DEF 1 - - u8 gpio[2]; - - u8 eof_len; u8 do_ctrl; - + u8 gpio[2]; u8 sensor; u8 type; #define Generic 0 @@ -99,30 +90,18 @@ static const struct ctrl sd_ctrls[] = { }; static struct v4l2_pix_format vga_mode[] = { - {160, 120, V4L2_PIX_FMT_JPEG, V4L2_FIELD_NONE, - .bytesperline = 160, - .sizeimage = 160 * 120 * 5 / 8 + 590, - .colorspace = V4L2_COLORSPACE_JPEG, - .priv = 0}, - {320, 240, V4L2_PIX_FMT_JPEG, V4L2_FIELD_NONE, + {320, 240, V4L2_PIX_FMT_SRGGB8, V4L2_FIELD_NONE, .bytesperline = 320, - .sizeimage = 320 * 240 * 4 / 8 + 590, - .colorspace = V4L2_COLORSPACE_JPEG, - .priv = 1}, - {640, 480, V4L2_PIX_FMT_JPEG, V4L2_FIELD_NONE, + .sizeimage = 320 * 240, + .colorspace = V4L2_COLORSPACE_SRGB, + .priv = 0}, + {640, 480, V4L2_PIX_FMT_SRGGB8, V4L2_FIELD_NONE, .bytesperline = 640, - .sizeimage = 640 * 480 * 3 / 8 + 590, - .colorspace = V4L2_COLORSPACE_JPEG, - .priv = 2}, + .sizeimage = 640 * 480, + .colorspace = V4L2_COLORSPACE_SRGB, + .priv = 1}, }; -/* JPEG quality indexed by webcam quality */ -#define QUAL_0 90 -#define QUAL_1 85 -#define QUAL_2 75 -#define QUAL_3 70 -static const u8 quality_tb[4] = { QUAL_0, QUAL_1, QUAL_2, QUAL_3 }; - /* sq930x registers */ #define SQ930_CTRL_UCBUS_IO0x0001 #define SQ930_CTRL_I2C_IO 0x0002 @@ -344,75 +323,54 @@ static const struct ucbus_write_cmd ov9630_start_0[] = { static const struct cap_s { u8 cc_sizeid; u8 cc_bytes[32]; -} capconfig[4][3] = { +} capconfig[4][2] = { [SENSOR_ICX098BQ] = { - {0, /* JPEG, 160x120 */ + {2, /* Bayer 320x240 */ + {0x05, 0x1f, 0x20, 0x0e, 0x00, 0x9f, 0x02, 0xee, + 0x01, 0x01, 0x00, 0x08, 0x18, 0x12, 0x78, 0xc8, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00} }, + {4, /* Bayer 640x480 */ {0x01, 0x1f, 0x20, 0x0e, 0x00, 0x9f, 0x02, 0xee, 0x01, 0x02, 0x00, 0x08, 0x18, 0x12, 0x78, 0xc8, - 0x02, 0x8b, 0x00, 0x8b, 0x00, 0x41, 0x01, 0x41, - 0x01, 0x41, 0x01, 0x05, 0x40, 0x01, 0xf0, 0x00} }, - {2, /* JPEG, 320x240 */ - {0x01, 0x1f, 0x20, 0x0e, 0x00, 0x9f, 0x02, 0xee, - 0x01, 0x02, 0x00, 0x08, 0x18, 0x12, 0x78, 0xc8, - 0x02, 0xdf, 0x01, 0x00, 0x00, 0x3f, 0x01, 0x3f, - 0x01, 0x00, 0x00, 0x05, 0x40, 0x01, 0xf0, 0x00} }, - {4, /* JPEG, 640x480 */ - {0x01, 0x22, 0x20, 0x0e, 0x00, 0xa2, 0x02, 0xf0, - 0x01, 0x02, 0x00, 0x08, 0x18, 0x12, 0x78, 0xc8, - 0x07, 0xe1, 0x01, 0xe1, 0x01, 0x3f, 0x01, 0x3f, - 0x01, 0x3f, 0x01, 0x05, 0x80, 0x02, 0xe0, 0x01} }, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
[git:v4l-dvb/v2.6.36] V4L/DVB: gspca - sq930x: Bad init sequence for sensor mt9v111
This is an automatic generated email to let you know that the following patch were queued at the http://git.linuxtv.org/media-tree.git tree: Subject: V4L/DVB: gspca - sq930x: Bad init sequence for sensor mt9v111 Author: Jean-François Moine moin...@free.fr Date:Mon Jul 26 06:50:31 2010 -0300 The start_1 exchange must be done by (reg, val) * 5 and not 8. Signed-off-by: Jean-François Moine moin...@free.fr Signed-off-by: Mauro Carvalho Chehab mche...@redhat.com drivers/media/video/gspca/sq930x.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) --- http://git.linuxtv.org/media-tree.git?a=commitdiff;h=4663117bbaa27a3fdaff9422f09c64e04ce82694 diff --git a/drivers/media/video/gspca/sq930x.c b/drivers/media/video/gspca/sq930x.c index c9f367a..8032190 100644 --- a/drivers/media/video/gspca/sq930x.c +++ b/drivers/media/video/gspca/sq930x.c @@ -,7 +,7 @@ static int sd_start(struct gspca_dev *gspca_dev) ARRAY_SIZE(mt9v111_init_2)); ucbus_write(gspca_dev, mt9v111_start_1, ARRAY_SIZE(mt9v111_start_1), - 8); + 5); i2c_write(sd, mt9v111_init_3, ARRAY_SIZE(mt9v111_init_3)); i2c_write(sd, mt9v111_init_4, ___ linuxtv-commits mailing list linuxtv-commits@linuxtv.org http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits
[git:v4l-dvb/v2.6.36] V4L/DVB: gspca - sonixj / sq930x / t613: Remove unused variable in struct sd
This is an automatic generated email to let you know that the following patch were queued at the http://git.linuxtv.org/media-tree.git tree: Subject: V4L/DVB: gspca - sonixj / sq930x / t613: Remove unused variable in struct sd Author: Jean-François Moine moin...@free.fr Date:Mon Jul 26 06:39:40 2010 -0300 The sensor enum definition was not at the right place. Signed-off-by: Jean-François Moine moin...@free.fr Signed-off-by: Mauro Carvalho Chehab mche...@redhat.com drivers/media/video/gspca/sonixj.c | 10 +- drivers/media/video/gspca/sq930x.c | 12 +--- drivers/media/video/gspca/t613.c |4 ++-- 3 files changed, 12 insertions(+), 14 deletions(-) --- http://git.linuxtv.org/media-tree.git?a=commitdiff;h=11ce884a0df4487b9f9f9e0605a1f16321637d24 diff --git a/drivers/media/video/gspca/sonixj.c b/drivers/media/video/gspca/sonixj.c index ee17b03..3705443 100644 --- a/drivers/media/video/gspca/sonixj.c +++ b/drivers/media/video/gspca/sonixj.c @@ -66,7 +66,11 @@ struct sd { #define BRIDGE_SN9C110 2 #define BRIDGE_SN9C120 3 u8 sensor; /* Type of image sensor chip */ -enum { + u8 i2c_addr; + + u8 jpeg_hdr[JPEG_HDR_SZ]; +}; +enum sensors { SENSOR_ADCM1700, SENSOR_GC0307, SENSOR_HV7131R, @@ -81,10 +85,6 @@ enum { SENSOR_PO2030N, SENSOR_SOI768, SENSOR_SP80708, -} sensors; - u8 i2c_addr; - - u8 jpeg_hdr[JPEG_HDR_SZ]; }; /* V4L2 controls supported by the driver */ diff --git a/drivers/media/video/gspca/sq930x.c b/drivers/media/video/gspca/sq930x.c index 37cee5e..c9f367a 100644 --- a/drivers/media/video/gspca/sq930x.c +++ b/drivers/media/video/gspca/sq930x.c @@ -49,19 +49,17 @@ struct sd { u8 do_ctrl; u8 sensor; -enum { + u8 type; +#define Generic 0 +#define Creative_live_motion 1 +}; +enum sensors { SENSOR_ICX098BQ, SENSOR_LZ24BP, SENSOR_MI0360, SENSOR_MT9V111, SENSOR_OV7660, SENSOR_OV9630, -} sensors; - u8 type; -#define Generic 0 -#define Creative_live_motion 1 - - u8 jpeg_hdr[JPEG_HDR_SZ]; }; static int sd_setexpo(struct gspca_dev *gspca_dev, __s32 val); diff --git a/drivers/media/video/gspca/t613.c b/drivers/media/video/gspca/t613.c index 2a0f12d..3b3b983 100644 --- a/drivers/media/video/gspca/t613.c +++ b/drivers/media/video/gspca/t613.c @@ -55,12 +55,12 @@ struct sd { u8 effect; u8 sensor; -enum { +}; +enum sensors { SENSOR_OM6802, SENSOR_OTHER, SENSOR_TAS5130A, SENSOR_LT168G, /* must verify if this is the actual model */ -} sensors; }; /* V4L2 controls supported by the driver */ ___ linuxtv-commits mailing list linuxtv-commits@linuxtv.org http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits
[git:v4l-dvb/v2.6.36] V4L/DVB: cx23885: Check for slave nack on all transactions
This is an automatic generated email to let you know that the following patch were queued at the http://git.linuxtv.org/media-tree.git tree: Subject: V4L/DVB: cx23885: Check for slave nack on all transactions Author: Jean Delvare kh...@linux-fr.org Date:Sun Jul 18 16:52:05 2010 -0300 Don't just check for nacks on zero-length transactions. Check on other transactions too. Signed-off-by: Jean Delvare kh...@linux-fr.org Signed-off-by: Andy Walls awa...@md.metrocast.net Signed-off-by: Mauro Carvalho Chehab mche...@redhat.com drivers/media/video/cx23885/cx23885-i2c.c |8 1 files changed, 8 insertions(+), 0 deletions(-) --- http://git.linuxtv.org/media-tree.git?a=commitdiff;h=44835f197bf1e3f57464f23dfb239fef06cf89be diff --git a/drivers/media/video/cx23885/cx23885-i2c.c b/drivers/media/video/cx23885/cx23885-i2c.c index 154c914..afb8d6f 100644 --- a/drivers/media/video/cx23885/cx23885-i2c.c +++ b/drivers/media/video/cx23885/cx23885-i2c.c @@ -125,6 +125,10 @@ static int i2c_sendbytes(struct i2c_adapter *i2c_adap, goto err; if (retval == 0) goto eio; + if (!i2c_slave_did_ack(i2c_adap)) { + retval = -ENXIO; + goto err; + } if (i2c_debug) { printk( W %02x %02x, msg-addr 1, msg-buf[0]); if (!(ctrl I2C_NOSTOP)) @@ -214,6 +218,10 @@ static int i2c_readbytes(struct i2c_adapter *i2c_adap, goto err; if (retval == 0) goto eio; + if (cnt == 0 !i2c_slave_did_ack(i2c_adap)) { + retval = -ENXIO; + goto err; + } msg-buf[cnt] = cx_read(bus-reg_rdata) 0xff; if (i2c_debug) { dprintk(1, %02x, msg-buf[cnt]); ___ linuxtv-commits mailing list linuxtv-commits@linuxtv.org http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits
[git:v4l-dvb/v2.6.36] V4L/DVB: cx23885: Return -ENXIO on slave nack
This is an automatic generated email to let you know that the following patch were queued at the http://git.linuxtv.org/media-tree.git tree: Subject: V4L/DVB: cx23885: Return -ENXIO on slave nack Author: Jean Delvare kh...@linux-fr.org Date:Sun Jul 18 16:48:47 2010 -0300 Documentation/i2c/fault-codes says that i2c adapter drivers should return -ENXIO when no slave acks an address byte. Signed-off-by: Jean Delvare kh...@linux-fr.org Signed-off-by: Andy Walls awa...@md.metrocast.net Signed-off-by: Mauro Carvalho Chehab mche...@redhat.com drivers/media/video/cx23885/cx23885-i2c.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) --- http://git.linuxtv.org/media-tree.git?a=commitdiff;h=f4acb3c4ccca74f5448354308f917e87ce83505a diff --git a/drivers/media/video/cx23885/cx23885-i2c.c b/drivers/media/video/cx23885/cx23885-i2c.c index d4746e0..154c914 100644 --- a/drivers/media/video/cx23885/cx23885-i2c.c +++ b/drivers/media/video/cx23885/cx23885-i2c.c @@ -99,7 +99,7 @@ static int i2c_sendbytes(struct i2c_adapter *i2c_adap, if (!i2c_wait_done(i2c_adap)) return -EIO; if (!i2c_slave_did_ack(i2c_adap)) - return -EIO; + return -ENXIO; dprintk(1, %s() returns 0\n, __func__); return 0; @@ -185,7 +185,7 @@ static int i2c_readbytes(struct i2c_adapter *i2c_adap, if (!i2c_wait_done(i2c_adap)) return -EIO; if (!i2c_slave_did_ack(i2c_adap)) - return -EIO; + return -ENXIO; dprintk(1, %s() returns 0\n, __func__); ___ linuxtv-commits mailing list linuxtv-commits@linuxtv.org http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits
[git:v4l-dvb/v2.6.36] V4L/DVB: cx23885: i2c_wait_done returns 0 or 1, don't check for 0 return value
This is an automatic generated email to let you know that the following patch were queued at the http://git.linuxtv.org/media-tree.git tree: Subject: V4L/DVB: cx23885: i2c_wait_done returns 0 or 1, don't check for 0 return value Author: Jean Delvare kh...@linux-fr.org Date:Sun Jul 18 17:05:17 2010 -0300 Function i2c_wait_done() never returns negative values, so there is no point in checking for them. Signed-off-by: Jean Delvare kh...@linux-fr.org Signed-off-by: Andy Walls awa...@md.metrocast.net Signed-off-by: Mauro Carvalho Chehab mche...@redhat.com drivers/media/video/cx23885/cx23885-i2c.c | 15 +++ 1 files changed, 3 insertions(+), 12 deletions(-) --- http://git.linuxtv.org/media-tree.git?a=commitdiff;h=18a87becf85d50e7f3d547f1b7a75108b151374d diff --git a/drivers/media/video/cx23885/cx23885-i2c.c b/drivers/media/video/cx23885/cx23885-i2c.c index afb8d6f..1a39148 100644 --- a/drivers/media/video/cx23885/cx23885-i2c.c +++ b/drivers/media/video/cx23885/cx23885-i2c.c @@ -120,10 +120,7 @@ static int i2c_sendbytes(struct i2c_adapter *i2c_adap, cx_write(bus-reg_wdata, wdata); cx_write(bus-reg_ctrl, ctrl); - retval = i2c_wait_done(i2c_adap); - if (retval 0) - goto err; - if (retval == 0) + if (!i2c_wait_done(i2c_adap)) goto eio; if (!i2c_slave_did_ack(i2c_adap)) { retval = -ENXIO; @@ -149,10 +146,7 @@ static int i2c_sendbytes(struct i2c_adapter *i2c_adap, cx_write(bus-reg_wdata, wdata); cx_write(bus-reg_ctrl, ctrl); - retval = i2c_wait_done(i2c_adap); - if (retval 0) - goto err; - if (retval == 0) + if (!i2c_wait_done(i2c_adap)) goto eio; if (i2c_debug) { dprintk(1, %02x, msg-buf[cnt]); @@ -213,10 +207,7 @@ static int i2c_readbytes(struct i2c_adapter *i2c_adap, cx_write(bus-reg_addr, msg-addr 25); cx_write(bus-reg_ctrl, ctrl); - retval = i2c_wait_done(i2c_adap); - if (retval 0) - goto err; - if (retval == 0) + if (!i2c_wait_done(i2c_adap)) goto eio; if (cnt == 0 !i2c_slave_did_ack(i2c_adap)) { retval = -ENXIO; ___ linuxtv-commits mailing list linuxtv-commits@linuxtv.org http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits
[git:v4l-dvb/v2.6.36] V4L/DVB: gspca - vc032x: Force main register write at probe time (poxxxx)
This is an automatic generated email to let you know that the following patch were queued at the http://git.linuxtv.org/media-tree.git tree: Subject: V4L/DVB: gspca - vc032x: Force main register write at probe time (po) Author: Jean-François Moine moin...@free.fr Date:Tue Jul 27 05:34:49 2010 -0300 On laptops, the webcam sometimes disconnects when writing the first main register (b300). This patch prevents the creation of a new /dev/videon on streaming start. Signed-off-by: Jean-François Moine moin...@free.fr Signed-off-by: Mauro Carvalho Chehab mche...@redhat.com drivers/media/video/gspca/vc032x.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) --- http://git.linuxtv.org/media-tree.git?a=commitdiff;h=3d217c8656842c77d6f33329a034102157363c8d diff --git a/drivers/media/video/gspca/vc032x.c b/drivers/media/video/gspca/vc032x.c index 48a8af3..b16fd47 100644 --- a/drivers/media/video/gspca/vc032x.c +++ b/drivers/media/video/gspca/vc032x.c @@ -3520,8 +3520,8 @@ static int sd_init(struct gspca_dev *gspca_dev) if (gspca_dev-usb_buf[0] != 0) { reg_w(gspca_dev, 0xa0, 0x26, 0xb300); reg_w(gspca_dev, 0xa0, 0x04, 0xb300); - reg_w(gspca_dev, 0xa0, 0x00, 0xb300); } + reg_w(gspca_dev, 0xa0, 0x00, 0xb300); } } return gspca_dev-usb_err; ___ linuxtv-commits mailing list linuxtv-commits@linuxtv.org http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits
[git:v4l-dvb/v2.6.36] V4L/DVB: tm6000: bugfix data handling
This is an automatic generated email to let you know that the following patch were queued at the http://git.linuxtv.org/media-tree.git tree: Subject: V4L/DVB: tm6000: bugfix data handling Author: Stefan Ringel stefan.rin...@arcor.de Date:Thu Sep 9 14:45:22 2010 -0300 Signed-off-by: Stefan Ringel stefan.rin...@arcor.de Signed-off-by: Mauro Carvalho Chehab mche...@redhat.com drivers/staging/tm6000/tm6000-input.c | 61 + 1 files changed, 39 insertions(+), 22 deletions(-) --- http://git.linuxtv.org/media-tree.git?a=commitdiff;h=9144ff680a090d8b0dde31d5693a4200a41c4f6a diff --git a/drivers/staging/tm6000/tm6000-input.c b/drivers/staging/tm6000/tm6000-input.c index 32f7a0a..54f7667 100644 --- a/drivers/staging/tm6000/tm6000-input.c +++ b/drivers/staging/tm6000/tm6000-input.c @@ -46,7 +46,7 @@ MODULE_PARM_DESC(enable_ir, enable ir (default is enable); } struct tm6000_ir_poll_result { - u8 rc_data[4]; + u16 rc_data; }; struct tm6000_IR { @@ -60,9 +60,9 @@ struct tm6000_IR { int polling; struct delayed_work work; u8 wait:1; + u8 key:1; struct urb *int_urb; u8 *urb_data; - u8 key:1; int (*get_key) (struct tm6000_IR *, struct tm6000_ir_poll_result *); @@ -122,13 +122,14 @@ static void tm6000_ir_urb_received(struct urb *urb) if (urb-status != 0) printk(KERN_INFO not ready\n); - else if (urb-actual_length 0) + else if (urb-actual_length 0) { memcpy(ir-urb_data, urb-transfer_buffer, urb-actual_length); - dprintk(data %02x %02x %02x %02x\n, ir-urb_data[0], - ir-urb_data[1], ir-urb_data[2], ir-urb_data[3]); + dprintk(data %02x %02x %02x %02x\n, ir-urb_data[0], + ir-urb_data[1], ir-urb_data[2], ir-urb_data[3]); - ir-key = 1; + ir-key = 1; + } rc = usb_submit_urb(urb, GFP_ATOMIC); } @@ -140,30 +141,47 @@ static int default_polling_getkey(struct tm6000_IR *ir, int rc; u8 buf[2]; - if (ir-wait !dev-int_in) { - poll_result-rc_data[0] = 0xff; + if (ir-wait !dev-int_in) return 0; - } if (dev-int_in) { - poll_result-rc_data[0] = ir-urb_data[0]; - poll_result-rc_data[1] = ir-urb_data[1]; + if (ir-ir.ir_type == IR_TYPE_RC5) + poll_result-rc_data = ir-urb_data[0]; + else + poll_result-rc_data = ir-urb_data[0] | ir-urb_data[1] 8; } else { tm6000_set_reg(dev, REQ_04_EN_DISABLE_MCU_INT, 2, 0); msleep(10); tm6000_set_reg(dev, REQ_04_EN_DISABLE_MCU_INT, 2, 1); msleep(10); - rc = tm6000_read_write_usb(dev, USB_DIR_IN | USB_TYPE_VENDOR | -USB_RECIP_DEVICE, REQ_02_GET_IR_CODE, 0, 0, buf, 1); + if (ir-ir.ir_type == IR_TYPE_RC5) { + rc = tm6000_read_write_usb(dev, USB_DIR_IN | + USB_TYPE_VENDOR | USB_RECIP_DEVICE, + REQ_02_GET_IR_CODE, 0, 0, buf, 1); - msleep(10); + msleep(10); - dprintk(read data=%02x\n, buf[0]); - if (rc 0) - return rc; + dprintk(read data=%02x\n, buf[0]); + if (rc 0) + return rc; - poll_result-rc_data[0] = buf[0]; + poll_result-rc_data = buf[0]; + } else { + rc = tm6000_read_write_usb(dev, USB_DIR_IN | + USB_TYPE_VENDOR | USB_RECIP_DEVICE, + REQ_02_GET_IR_CODE, 0, 0, buf, 2); + + msleep(10); + + dprintk(read data=%04x\n, buf[0] | buf[1] 8); + if (rc 0) + return rc; + + poll_result-rc_data = buf[0] | buf[1] 8; + } + if ((poll_result-rc_data 0x00ff) != 0xff) + ir-key = 1; } return 0; } @@ -180,12 +198,11 @@ static void tm6000_ir_handle_key(struct tm6000_IR *ir) return; } - dprintk(ir-get_key result data=%02x %02x\n, - poll_result.rc_data[0], poll_result.rc_data[1]); + dprintk(ir-get_key result data=%04x\n, poll_result.rc_data); - if (poll_result.rc_data[0] != 0xff ir-key == 1) { + if (ir-key) { ir_input_keydown(ir-input-input_dev, ir-ir, - poll_result.rc_data[0] | poll_result.rc_data[1] 8); + (u32)poll_result.rc_data
[git:v4l-dvb/v2.6.36] V4L/DVB: gspca - sn9c20x: Bad transfer size of Bayer images
This is an automatic generated email to let you know that the following patch were queued at the http://git.linuxtv.org/media-tree.git tree: Subject: V4L/DVB: gspca - sn9c20x: Bad transfer size of Bayer images Author: Jean-François Moine moin...@free.fr Date:Mon Sep 13 05:22:37 2010 -0300 As the end of frame marker does not contain any pixel, it must not be transferred. Reported-by: Ivo Jager ivo.ja...@siliconfields.net Signed-off-by: Jean-François Moine moin...@free.fr Cc: sta...@kernel.org Signed-off-by: Mauro Carvalho Chehab mche...@redhat.com drivers/media/video/gspca/sn9c20x.c |3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) --- http://git.linuxtv.org/media-tree.git?a=commitdiff;h=2569a8dbf4f85768f8de49220dc86b5750340048 diff --git a/drivers/media/video/gspca/sn9c20x.c b/drivers/media/video/gspca/sn9c20x.c index 83a718f..9052d57 100644 --- a/drivers/media/video/gspca/sn9c20x.c +++ b/drivers/media/video/gspca/sn9c20x.c @@ -2357,8 +2357,7 @@ static void sd_pkt_scan(struct gspca_dev *gspca_dev, (data[33] 10); avg_lum = 9; atomic_set(sd-avg_lum, avg_lum); - gspca_frame_add(gspca_dev, LAST_PACKET, - data, len); + gspca_frame_add(gspca_dev, LAST_PACKET, NULL, 0); return; } if (gspca_dev-last_packet_type == LAST_PACKET) { ___ linuxtv-commits mailing list linuxtv-commits@linuxtv.org http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits
[git:v4l-dvb/v2.6.36] V4L/DVB: videobuf-dma-sg: set correct size in last sg element
This is an automatic generated email to let you know that the following patch were queued at the http://git.linuxtv.org/media-tree.git tree: Subject: V4L/DVB: videobuf-dma-sg: set correct size in last sg element Author: Hans Verkuil hans.verk...@tandberg.com Date:Tue Sep 7 06:10:45 2010 -0300 This fixes a nasty memory corruption bug when using userptr I/O. The function videobuf_pages_to_sg() sets up the scatter-gather list for the DMA transfer to the userspace pages. The first transfer is setup correctly (the size is set to PAGE_SIZE - offset), but all other transfers have size PAGE_SIZE. This is wrong for the last transfer which may be less than PAGE_SIZE. Most, if not all, drivers will program the boards DMA engine correctly, i.e. even though the size in the last sg element is wrong, they will do their own size calculations and make sure the right amount is DMA-ed, and so seemingly prevent memory corruption. However, behind the scenes the dynamic DMA mapping support (in lib/swiotlb.c) may create bounce buffers if the memory pages are not in DMA-able memory. This happens for example on a 64-bit linux with a board that only supports 32-bit DMA. These bounce buffers DO use the information in the sg list to determine the size. So while the DMA engine transfers the correct amount of data, when the data is 'bounced' back too much is copied, causing buffer overwrites. The fix is simple: calculate and set the correct size for the last sg list element. Signed-off-by: Hans Verkuil hans.verk...@tandberg.com Cc: sta...@kernel.org Signed-off-by: Mauro Carvalho Chehab mche...@redhat.com drivers/media/video/videobuf-dma-sg.c | 11 +++ include/media/videobuf-dma-sg.h |1 + 2 files changed, 8 insertions(+), 4 deletions(-) --- http://git.linuxtv.org/media-tree.git?a=commitdiff;h=49be61099b7603f7e84cb7735f5c4c5f1b7b125d diff --git a/drivers/media/video/videobuf-dma-sg.c b/drivers/media/video/videobuf-dma-sg.c index 06f9a9c..2ad0bc2 100644 --- a/drivers/media/video/videobuf-dma-sg.c +++ b/drivers/media/video/videobuf-dma-sg.c @@ -94,7 +94,7 @@ err: * must free the memory. */ static struct scatterlist *videobuf_pages_to_sg(struct page **pages, - int nr_pages, int offset) + int nr_pages, int offset, size_t size) { struct scatterlist *sglist; int i; @@ -110,12 +110,14 @@ static struct scatterlist *videobuf_pages_to_sg(struct page **pages, /* DMA to highmem pages might not work */ goto highmem; sg_set_page(sglist[0], pages[0], PAGE_SIZE - offset, offset); + size -= PAGE_SIZE - offset; for (i = 1; i nr_pages; i++) { if (NULL == pages[i]) goto nopage; if (PageHighMem(pages[i])) goto highmem; - sg_set_page(sglist[i], pages[i], PAGE_SIZE, 0); + sg_set_page(sglist[i], pages[i], min(PAGE_SIZE, size), 0); + size -= min(PAGE_SIZE, size); } return sglist; @@ -170,7 +172,8 @@ static int videobuf_dma_init_user_locked(struct videobuf_dmabuf *dma, first = (data PAGE_MASK) PAGE_SHIFT; last = ((data+size-1) PAGE_MASK) PAGE_SHIFT; - dma-offset = data ~PAGE_MASK; + dma-offset = data ~PAGE_MASK; + dma-size = size; dma-nr_pages = last-first+1; dma-pages = kmalloc(dma-nr_pages * sizeof(struct page *), GFP_KERNEL); if (NULL == dma-pages) @@ -252,7 +255,7 @@ int videobuf_dma_map(struct device *dev, struct videobuf_dmabuf *dma) if (dma-pages) { dma-sglist = videobuf_pages_to_sg(dma-pages, dma-nr_pages, - dma-offset); + dma-offset, dma-size); } if (dma-vaddr) { dma-sglist = videobuf_vmalloc_to_sg(dma-vaddr, diff --git a/include/media/videobuf-dma-sg.h b/include/media/videobuf-dma-sg.h index 97e07f4..aa4ebb4 100644 --- a/include/media/videobuf-dma-sg.h +++ b/include/media/videobuf-dma-sg.h @@ -48,6 +48,7 @@ struct videobuf_dmabuf { /* for userland buffer */ int offset; + size_t size; struct page **pages; /* for kernel buffers */ ___ linuxtv-commits mailing list linuxtv-commits@linuxtv.org http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits
[git:v4l-dvb/v2.6.36] V4L/DVB: cx231xx: Avoid an OOPS when card is unknown (card=0)
This is an automatic generated email to let you know that the following patch were queued at the http://git.linuxtv.org/media-tree.git tree: Subject: V4L/DVB: cx231xx: Avoid an OOPS when card is unknown (card=0) Author: Mauro Carvalho Chehab mche...@redhat.com Date:Sat Sep 11 11:37:51 2010 -0300 As reported by: Carlos Americo Domiciano c_domici...@yahoo.com.br: [ 220.033500] cx231xx v4l2 driver loaded. [ 220.033571] cx231xx #0: New device Conexant Corporation Polaris AV Capturb @ 480 Mbps (1554:5010) with 6 interfaces [ 220.033577] cx231xx #0: registering interface 0 [ 220.033591] cx231xx #0: registering interface 1 [ 220.033654] cx231xx #0: registering interface 6 [ 220.033910] cx231xx #0: Identified as Unknown CX231xx video grabber (card=0) [ 220.033946] BUG: unable to handle kernel NULL pointer dereference at (null) [ 220.033955] IP: [a0d3c8bd] cx231xx_pre_card_setup+0x5d/0xb0 [cx231xx] Thanks-to: Carlos Americo Domiciano c_domici...@yahoo.com.br Cc: sta...@kernel.org Signed-off-by: Mauro Carvalho Chehab mche...@redhat.com drivers/media/video/cx231xx/cx231xx-cards.c | 14 -- 1 files changed, 8 insertions(+), 6 deletions(-) --- http://git.linuxtv.org/media-tree.git?a=commitdiff;h=dbb4cd1b2046a777c28cafa9a2c5592ca5505dac diff --git a/drivers/media/video/cx231xx/cx231xx-cards.c b/drivers/media/video/cx231xx/cx231xx-cards.c index 5b7c9a9..f2a4900 100644 --- a/drivers/media/video/cx231xx/cx231xx-cards.c +++ b/drivers/media/video/cx231xx/cx231xx-cards.c @@ -229,14 +229,16 @@ void cx231xx_pre_card_setup(struct cx231xx *dev) dev-board.name, dev-model); /* set the direction for GPIO pins */ - cx231xx_set_gpio_direction(dev, dev-board.tuner_gpio-bit, 1); - cx231xx_set_gpio_value(dev, dev-board.tuner_gpio-bit, 1); - cx231xx_set_gpio_direction(dev, dev-board.tuner_sif_gpio, 1); + if (dev-board.tuner_gpio) { + cx231xx_set_gpio_direction(dev, dev-board.tuner_gpio-bit, 1); + cx231xx_set_gpio_value(dev, dev-board.tuner_gpio-bit, 1); + cx231xx_set_gpio_direction(dev, dev-board.tuner_sif_gpio, 1); - /* request some modules if any required */ + /* request some modules if any required */ - /* reset the Tuner */ - cx231xx_gpio_set(dev, dev-board.tuner_gpio); + /* reset the Tuner */ + cx231xx_gpio_set(dev, dev-board.tuner_gpio); + } /* set the mode to Analog mode initially */ cx231xx_set_mode(dev, CX231XX_ANALOG_MODE); ___ linuxtv-commits mailing list linuxtv-commits@linuxtv.org http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits
[git:v4l-dvb/v2.6.36] V4L/DVB: dvb: fix smscore_getbuffer() logic
This is an automatic generated email to let you know that the following patch were queued at the http://git.linuxtv.org/media-tree.git tree: Subject: V4L/DVB: dvb: fix smscore_getbuffer() logic Author: Richard Zidlicky r...@linux-m68k.org Date:Tue Aug 24 09:52:36 2010 -0300 Drivers shouldn't sleep while holding a spinlock. A previous workaround were to release the spinlock before callinc schedule(). This patch uses a different approach: it just waits for the siano hardware to answer. Signed-off-by: Richard Zidlicky r...@linux-m68k.org Cc: sta...@kernel.org Signed-off-by: Mauro Carvalho Chehab mche...@redhat.com drivers/media/dvb/siano/smscoreapi.c | 31 --- 1 files changed, 12 insertions(+), 19 deletions(-) --- http://git.linuxtv.org/media-tree.git?a=commitdiff;h=8d511741e3738ebf3f6260bf24d57b30500970b6 diff --git a/drivers/media/dvb/siano/smscoreapi.c b/drivers/media/dvb/siano/smscoreapi.c index d93468c..ff3b0fa 100644 --- a/drivers/media/dvb/siano/smscoreapi.c +++ b/drivers/media/dvb/siano/smscoreapi.c @@ -1098,33 +1098,26 @@ EXPORT_SYMBOL_GPL(smscore_onresponse); * * @return pointer to descriptor on success, NULL on error. */ -struct smscore_buffer_t *smscore_getbuffer(struct smscore_device_t *coredev) + +struct smscore_buffer_t *get_entry(struct smscore_device_t *coredev) { struct smscore_buffer_t *cb = NULL; unsigned long flags; - DEFINE_WAIT(wait); - spin_lock_irqsave(coredev-bufferslock, flags); - - /* This function must return a valid buffer, since the buffer list is -* finite, we check that there is an available buffer, if not, we wait -* until such buffer become available. -*/ - - prepare_to_wait(coredev-buffer_mng_waitq, wait, TASK_INTERRUPTIBLE); - if (list_empty(coredev-buffers)) { - spin_unlock_irqrestore(coredev-bufferslock, flags); - schedule(); - spin_lock_irqsave(coredev-bufferslock, flags); + if (!list_empty(coredev-buffers)) { + cb = (struct smscore_buffer_t *) coredev-buffers.next; + list_del(cb-entry); } + spin_unlock_irqrestore(coredev-bufferslock, flags); + return cb; +} - finish_wait(coredev-buffer_mng_waitq, wait); - - cb = (struct smscore_buffer_t *) coredev-buffers.next; - list_del(cb-entry); +struct smscore_buffer_t *smscore_getbuffer(struct smscore_device_t *coredev) +{ + struct smscore_buffer_t *cb = NULL; - spin_unlock_irqrestore(coredev-bufferslock, flags); + wait_event(coredev-buffer_mng_waitq, (cb = get_entry(coredev))); return cb; } ___ linuxtv-commits mailing list linuxtv-commits@linuxtv.org http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits
[git:v4l-dvb/v2.6.36] V4L/DVB: dib7000p: add disable sample and hold, and diversity delay parameter
This is an automatic generated email to let you know that the following patch were queued at the http://git.linuxtv.org/media-tree.git tree: Subject: V4L/DVB: dib7000p: add disable sample and hold, and diversity delay parameter Author: Olivier Grenie olivier.gre...@dibcom.fr Date:Tue Sep 7 12:50:46 2010 -0300 This patch improves the overall driver performance in diversity-reception scenarios. Signed-off-by: Olivier Grenie olivier.gre...@dibcom.fr Signed-off-by: Patrick Boettcher patrick.boettc...@dibcom.fr Cc: sta...@kernel.org Signed-off-by: Mauro Carvalho Chehab mche...@redhat.com drivers/media/dvb/dvb-usb/dib0700_devices.c |1 + drivers/media/dvb/frontends/dib7000p.c |6 +- drivers/media/dvb/frontends/dib7000p.h |2 ++ 3 files changed, 8 insertions(+), 1 deletions(-) --- http://git.linuxtv.org/media-tree.git?a=commitdiff;h=c332876c64b12300a7ddae8f0dfbd654895b204b diff --git a/drivers/media/dvb/dvb-usb/dib0700_devices.c b/drivers/media/dvb/dvb-usb/dib0700_devices.c index 385ce1c..e06acd1 100644 --- a/drivers/media/dvb/dvb-usb/dib0700_devices.c +++ b/drivers/media/dvb/dvb-usb/dib0700_devices.c @@ -956,6 +956,7 @@ static struct dib7000p_config dib7770p_dib7000p_config = { .hostbus_diversity = 1, .enable_current_mirror = 1, + .disable_sample_and_hold = 0, }; static int stk7770p_frontend_attach(struct dvb_usb_adapter *adap) diff --git a/drivers/media/dvb/frontends/dib7000p.c b/drivers/media/dvb/frontends/dib7000p.c index 73f59ab..3aed0d4 100644 --- a/drivers/media/dvb/frontends/dib7000p.c +++ b/drivers/media/dvb/frontends/dib7000p.c @@ -260,6 +260,7 @@ static void dib7000p_set_adc_state(struct dib7000p_state *state, enum dibx000_ad // dprintk( 908: %x, 909: %x\n, reg_908, reg_909); + reg_909 |= (state-cfg.disable_sample_and_hold 1) 4; reg_908 |= (state-cfg.enable_current_mirror 1) 7; dib7000p_write_word(state, 908, reg_908); @@ -780,7 +781,10 @@ static void dib7000p_set_channel(struct dib7000p_state *state, struct dvb_fronte default: case GUARD_INTERVAL_1_32: value *= 1; break; } - state-div_sync_wait = (value * 3) / 2 + 32; // add 50% SFN margin + compensate for one DVSY-fifo TODO + if (state-cfg.diversity_delay == 0) + state-div_sync_wait = (value * 3) / 2 + 48; // add 50% SFN margin + compensate for one DVSY-fifo + else + state-div_sync_wait = (value * 3) / 2 + state-cfg.diversity_delay; // add 50% SFN margin + compensate for one DVSY-fifo /* deactive the possibility of diversity reception if extended interleaver */ state-div_force_off = !1 ch-u.ofdm.transmission_mode != TRANSMISSION_MODE_8K; diff --git a/drivers/media/dvb/frontends/dib7000p.h b/drivers/media/dvb/frontends/dib7000p.h index 04a7449..da17345 100644 --- a/drivers/media/dvb/frontends/dib7000p.h +++ b/drivers/media/dvb/frontends/dib7000p.h @@ -33,8 +33,10 @@ struct dib7000p_config { int (*agc_control) (struct dvb_frontend *, u8 before); u8 output_mode; + u8 disable_sample_and_hold : 1; u8 enable_current_mirror : 1; + u8 diversity_delay; }; ___ linuxtv-commits mailing list linuxtv-commits@linuxtv.org http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits
[git:v4l-dvb/v2.6.36] V4L/DVB: dib7770: enable the current mirror
This is an automatic generated email to let you know that the following patch were queued at the http://git.linuxtv.org/media-tree.git tree: Subject: V4L/DVB: dib7770: enable the current mirror Author: Olivier Grenie olivier.gre...@dibcom.fr Date:Tue Sep 7 12:50:45 2010 -0300 To improve performance on DiB7770-devices enabling the current mirror is needed. This patch adds an option to the dib7000p-driver to do that and it creates a separate device-entry in dib0700-device to use those changes on hardware which is using the DiB7770. Signed-off-by: Olivier Grenie olivier.gre...@dibcom.fr Signed-off-by: Patrick Boettcher patrick.boettc...@dibcom.fr Signed-off-by: Mauro Carvalho Chehab mche...@redhat.com drivers/media/dvb/dvb-usb/dib0700_devices.c | 53 ++- drivers/media/dvb/frontends/dib7000p.c |2 + drivers/media/dvb/frontends/dib7000p.h |3 ++ 3 files changed, 57 insertions(+), 1 deletions(-) --- http://git.linuxtv.org/media-tree.git?a=commitdiff;h=f36e4913cfc12863804b0c200e037a61a9e2046a diff --git a/drivers/media/dvb/dvb-usb/dib0700_devices.c b/drivers/media/dvb/dvb-usb/dib0700_devices.c index ce66c5a..385ce1c 100644 --- a/drivers/media/dvb/dvb-usb/dib0700_devices.c +++ b/drivers/media/dvb/dvb-usb/dib0700_devices.c @@ -940,6 +940,57 @@ static int stk7070p_frontend_attach(struct dvb_usb_adapter *adap) return adap-fe == NULL ? -ENODEV : 0; } +/* STK7770P */ +static struct dib7000p_config dib7770p_dib7000p_config = { + .output_mpeg2_in_188_bytes = 1, + + .agc_config_count = 1, + .agc = dib7070_agc_config, + .bw = dib7070_bw_config_12_mhz, + .tuner_is_baseband = 1, + .spur_protect = 1, + + .gpio_dir = DIB7000P_GPIO_DEFAULT_DIRECTIONS, + .gpio_val = DIB7000P_GPIO_DEFAULT_VALUES, + .gpio_pwm_pos = DIB7000P_GPIO_DEFAULT_PWM_POS, + + .hostbus_diversity = 1, + .enable_current_mirror = 1, +}; + +static int stk7770p_frontend_attach(struct dvb_usb_adapter *adap) +{ + struct usb_device_descriptor *p = adap-dev-udev-descriptor; + if (p-idVendor == cpu_to_le16(USB_VID_PINNACLE) + p-idProduct == cpu_to_le16(USB_PID_PINNACLE_PCTV72E)) + dib0700_set_gpio(adap-dev, GPIO6, GPIO_OUT, 0); + else + dib0700_set_gpio(adap-dev, GPIO6, GPIO_OUT, 1); + msleep(10); + dib0700_set_gpio(adap-dev, GPIO9, GPIO_OUT, 1); + dib0700_set_gpio(adap-dev, GPIO4, GPIO_OUT, 1); + dib0700_set_gpio(adap-dev, GPIO7, GPIO_OUT, 1); + dib0700_set_gpio(adap-dev, GPIO10, GPIO_OUT, 0); + + dib0700_ctrl_clock(adap-dev, 72, 1); + + msleep(10); + dib0700_set_gpio(adap-dev, GPIO10, GPIO_OUT, 1); + msleep(10); + dib0700_set_gpio(adap-dev, GPIO0, GPIO_OUT, 1); + + if (dib7000p_i2c_enumeration(adap-dev-i2c_adap, 1, 18, +dib7770p_dib7000p_config) != 0) { + err(%s: dib7000p_i2c_enumeration failed. Cannot continue\n, + __func__); + return -ENODEV; + } + + adap-fe = dvb_attach(dib7000p_attach, adap-dev-i2c_adap, 0x80, + dib7770p_dib7000p_config); + return adap-fe == NULL ? -ENODEV : 0; +} + /* DIB807x generic */ static struct dibx000_agc_config dib807x_agc_config[2] = { { @@ -2406,7 +2457,7 @@ struct dvb_usb_device_properties dib0700_devices[] = { .pid_filter_count = 32, .pid_filter = stk70x0p_pid_filter, .pid_filter_ctrl = stk70x0p_pid_filter_ctrl, - .frontend_attach = stk7070p_frontend_attach, + .frontend_attach = stk7770p_frontend_attach, .tuner_attach = dib7770p_tuner_attach, DIB0700_DEFAULT_STREAMING_CONFIG(0x02), diff --git a/drivers/media/dvb/frontends/dib7000p.c b/drivers/media/dvb/frontends/dib7000p.c index 2e28b97..73f59ab 100644 --- a/drivers/media/dvb/frontends/dib7000p.c +++ b/drivers/media/dvb/frontends/dib7000p.c @@ -260,6 +260,8 @@ static void dib7000p_set_adc_state(struct dib7000p_state *state, enum dibx000_ad // dprintk( 908: %x, 909: %x\n, reg_908, reg_909); + reg_908 |= (state-cfg.enable_current_mirror 1) 7; + dib7000p_write_word(state, 908, reg_908); dib7000p_write_word(state, 909, reg_909); } diff --git a/drivers/media/dvb/frontends/dib7000p.h b/drivers/media/dvb/frontends/dib7000p.h index 805dd13..04a7449 100644 --- a/drivers/media/dvb/frontends/dib7000p.h +++ b/drivers/media/dvb/frontends/dib7000p.h @@ -33,6 +33,9 @@ struct dib7000p_config { int (*agc_control) (struct dvb_frontend *, u8 before); u8 output_mode; + + u8 enable_current_mirror : 1; + }; #define DEFAULT_DIB7000P_I2C_ADDRESS 18 ___ linuxtv-commits mailing list
[git:v4l-dvb/v2.6.36] V4L/DVB: rc-core: increase repeat time
This is an automatic generated email to let you know that the following patch were queued at the http://git.linuxtv.org/media-tree.git tree: Subject: V4L/DVB: rc-core: increase repeat time Author: Mauro Carvalho Chehab mche...@redhat.com Date:Wed Sep 8 12:58:12 2010 -0300 As reported by Anton Blanchard an...@samba.org, double IR events on 2.6.36-rc2 and a DViCO FusionHDTV DVB-T Dual Express are happening: [ 1351.032084] ir_keydown: i2c IR (FusionHDTV): key down event, key 0x0067, scancode 0x0051 [ 1351.281284] ir_keyup: keyup key 0x0067 ie one key down event and one key up event 250ms later. So, we need to increase the repeat timeout, to avoid this bug to hit. As we're doing it at core, this fix is not needed anymore at dib0700 driver. Thanks-to: Anton Blanchard an...@samba.org Cc: sta...@kernel.org Signed-off-by: Mauro Carvalho Chehab mche...@redhat.com drivers/media/IR/ir-keytable.c |7 +++ drivers/media/dvb/dvb-usb/dib0700_core.c |3 --- 2 files changed, 7 insertions(+), 3 deletions(-) --- http://git.linuxtv.org/media-tree.git?a=commitdiff;h=bc08cc24c55a3e4b94011ba1964830076d02a4a2 diff --git a/drivers/media/IR/ir-keytable.c b/drivers/media/IR/ir-keytable.c index 7e82a9d..d00ef19 100644 --- a/drivers/media/IR/ir-keytable.c +++ b/drivers/media/IR/ir-keytable.c @@ -510,6 +510,13 @@ int __ir_input_register(struct input_dev *input_dev, (ir_dev-props ir_dev-props-driver_type == RC_DRIVER_IR_RAW) ? in raw mode : ); + /* +* Default delay of 250ms is too short for some protocols, expecially +* since the timeout is currently set to 250ms. Increase it to 500ms, +* to avoid wrong repetition of the keycodes. +*/ + input_dev-rep[REP_DELAY] = 500; + return 0; out_event: diff --git a/drivers/media/dvb/dvb-usb/dib0700_core.c b/drivers/media/dvb/dvb-usb/dib0700_core.c index fe81834..48397f1 100644 --- a/drivers/media/dvb/dvb-usb/dib0700_core.c +++ b/drivers/media/dvb/dvb-usb/dib0700_core.c @@ -673,9 +673,6 @@ static int dib0700_probe(struct usb_interface *intf, else dev-props.rc.core.bulk_mode = false; - /* Need a higher delay, to avoid wrong repeat */ - dev-rc_input_dev-rep[REP_DELAY] = 500; - dib0700_rc_setup(dev); return 0; ___ linuxtv-commits mailing list linuxtv-commits@linuxtv.org http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits
[git:v4l-dvb/v2.6.36] V4L/DVB: IR: extend MCE keymap
This is an automatic generated email to let you know that the following patch were queued at the http://git.linuxtv.org/media-tree.git tree: Subject: V4L/DVB: IR: extend MCE keymap Author: Maxim Levitsky maximlevit...@gmail.com Date:Mon Sep 6 18:26:10 2010 -0300 These keys are found on remote bundled with Toshiba Qosmio F50-10q. Found and tested by, Sami R maeses...@gmail.com Signed-off-by: Maxim Levitsky maximlevit...@gmail.com Acked-by: Jarod Wilson ja...@redhat.com Signed-off-by: Mauro Carvalho Chehab mche...@redhat.com drivers/media/IR/keymaps/rc-rc6-mce.c |3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) --- http://git.linuxtv.org/media-tree.git?a=commitdiff;h=93f76dc87ce43720bc8d8b2323ce7fccc9fd32c3 diff --git a/drivers/media/IR/keymaps/rc-rc6-mce.c b/drivers/media/IR/keymaps/rc-rc6-mce.c index 64264f7..39557ad 100644 --- a/drivers/media/IR/keymaps/rc-rc6-mce.c +++ b/drivers/media/IR/keymaps/rc-rc6-mce.c @@ -19,6 +19,7 @@ static struct ir_scancode rc6_mce[] = { { 0x800f0416, KEY_PLAY }, { 0x800f0418, KEY_PAUSE }, + { 0x800f046e, KEY_PLAYPAUSE }, { 0x800f0419, KEY_STOP }, { 0x800f0417, KEY_RECORD }, @@ -37,6 +38,8 @@ static struct ir_scancode rc6_mce[] = { { 0x800f0411, KEY_VOLUMEDOWN }, { 0x800f0412, KEY_CHANNELUP }, { 0x800f0413, KEY_CHANNELDOWN }, + { 0x800f043a, KEY_BRIGHTNESSUP }, + { 0x800f0480, KEY_BRIGHTNESSDOWN }, { 0x800f0401, KEY_NUMERIC_1 }, { 0x800f0402, KEY_NUMERIC_2 }, ___ linuxtv-commits mailing list linuxtv-commits@linuxtv.org http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits
[git:v4l-dvb/v2.6.36] V4L/DVB: Don't identify PV SBTVD Hybrid as a DibCom device
This is an automatic generated email to let you know that the following patch were queued at the http://git.linuxtv.org/media-tree.git tree: Subject: V4L/DVB: Don't identify PV SBTVD Hybrid as a DibCom device Author: Mauro Carvalho Chehab mche...@redhat.com Date:Fri Sep 3 10:50:24 2010 -0300 As reported by Carlos, Prolink Pixelview SBTVD Hybrid is based on Conexant cx231xx + Fujitsu 86A20S demodulator. However, both shares the same USB ID. So, we need to use USB bcdDevice, in order to properly discover what's the board. We know for sure that bcd 0x100 is used for a dib0700 device, while bcd 0x4001 is used for a cx23102 device. This patch reserves two ranges, the first one from 0x-0x3f00 for dib0700, and the second from 0x4000-0x4fff for cx231xx devices. This may need fixes in the future, as we get access to other devices. Thanks-to: Carlos Americo Domiciano c_domici...@yahoo.com.br Cc: sta...@kernel.org Signed-off-by: Mauro Carvalho Chehab mche...@redhat.com drivers/media/dvb/dvb-usb/dib0700_devices.c |2 +- drivers/media/video/cx231xx/Makefile|1 + drivers/media/video/cx231xx/cx231xx-cards.c |3 +++ 3 files changed, 5 insertions(+), 1 deletions(-) --- http://git.linuxtv.org/media-tree.git?a=commitdiff;h=c4dfb040d0f7d476a5fd44614606421deaaffb42 diff --git a/drivers/media/dvb/dvb-usb/dib0700_devices.c b/drivers/media/dvb/dvb-usb/dib0700_devices.c index f634d2e..ce66c5a 100644 --- a/drivers/media/dvb/dvb-usb/dib0700_devices.c +++ b/drivers/media/dvb/dvb-usb/dib0700_devices.c @@ -1781,7 +1781,7 @@ struct usb_device_id dib0700_usb_id_table[] = { /* 60 */{ USB_DEVICE(USB_VID_TERRATEC, USB_PID_TERRATEC_CINERGY_T_XXS_2) }, { USB_DEVICE(USB_VID_DIBCOM,USB_PID_DIBCOM_STK807XPVR) }, { USB_DEVICE(USB_VID_DIBCOM,USB_PID_DIBCOM_STK807XP) }, - { USB_DEVICE(USB_VID_PIXELVIEW, USB_PID_PIXELVIEW_SBTVD) }, + { USB_DEVICE_VER(USB_VID_PIXELVIEW, USB_PID_PIXELVIEW_SBTVD, 0x000, 0x3f00) }, { USB_DEVICE(USB_VID_EVOLUTEPC, USB_PID_TVWAY_PLUS) }, /* 65 */{ USB_DEVICE(USB_VID_PINNACLE, USB_PID_PINNACLE_PCTV73ESE) }, { USB_DEVICE(USB_VID_PINNACLE, USB_PID_PINNACLE_PCTV282E) }, diff --git a/drivers/media/video/cx231xx/Makefile b/drivers/media/video/cx231xx/Makefile index 755dd0c..6f2b573 100644 --- a/drivers/media/video/cx231xx/Makefile +++ b/drivers/media/video/cx231xx/Makefile @@ -11,4 +11,5 @@ EXTRA_CFLAGS += -Idrivers/media/video EXTRA_CFLAGS += -Idrivers/media/common/tuners EXTRA_CFLAGS += -Idrivers/media/dvb/dvb-core EXTRA_CFLAGS += -Idrivers/media/dvb/frontends +EXTRA_CFLAGS += -Idrivers/media/dvb/dvb-usb diff --git a/drivers/media/video/cx231xx/cx231xx-cards.c b/drivers/media/video/cx231xx/cx231xx-cards.c index 6bdc0ef..5b7c9a9 100644 --- a/drivers/media/video/cx231xx/cx231xx-cards.c +++ b/drivers/media/video/cx231xx/cx231xx-cards.c @@ -32,6 +32,7 @@ #include media/v4l2-chip-ident.h #include media/cx25840.h +#include dvb-usb-ids.h #include xc5000.h #include cx231xx.h @@ -175,6 +176,8 @@ struct usb_device_id cx231xx_id_table[] = { .driver_info = CX231XX_BOARD_CNXT_RDE_250}, {USB_DEVICE(0x0572, 0x58A1), .driver_info = CX231XX_BOARD_CNXT_RDU_250}, + {USB_DEVICE_VER(USB_VID_PIXELVIEW, USB_PID_PIXELVIEW_SBTVD, 0x4000,0x4fff), +.driver_info = CX231XX_BOARD_UNKNOWN}, {}, }; ___ linuxtv-commits mailing list linuxtv-commits@linuxtv.org http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits
[git:v4l-dvb/v2.6.36] V4L/DVB: mceusb: add two new ASUS device IDs
This is an automatic generated email to let you know that the following patch were queued at the http://git.linuxtv.org/media-tree.git tree: Subject: V4L/DVB: mceusb: add two new ASUS device IDs Author: Jarod Wilson ja...@redhat.com Date:Fri Aug 27 18:21:14 2010 -0300 Reported in lirc sf.net tracker and on lirc mailing list Signed-off-by: Jarod Wilson ja...@redhat.com Signed-off-by: Mauro Carvalho Chehab mche...@redhat.com drivers/media/IR/mceusb.c |4 1 files changed, 4 insertions(+), 0 deletions(-) --- http://git.linuxtv.org/media-tree.git?a=commitdiff;h=3542d9723a891d419db293aae79914d8cce67640 diff --git a/drivers/media/IR/mceusb.c b/drivers/media/IR/mceusb.c index ac6bb2c..bc620e1 100644 --- a/drivers/media/IR/mceusb.c +++ b/drivers/media/IR/mceusb.c @@ -120,6 +120,10 @@ static struct usb_device_id mceusb_dev_table[] = { { USB_DEVICE(VENDOR_PHILIPS, 0x0613) }, /* Philips eHome Infrared Transceiver */ { USB_DEVICE(VENDOR_PHILIPS, 0x0815) }, + /* Philips/Spinel plus IR transceiver for ASUS */ + { USB_DEVICE(VENDOR_PHILIPS, 0x206c) }, + /* Philips/Spinel plus IR transceiver for ASUS */ + { USB_DEVICE(VENDOR_PHILIPS, 0x2088) }, /* Realtek MCE IR Receiver */ { USB_DEVICE(VENDOR_REALTEK, 0x0161) }, /* SMK/Toshiba G83C0004D410 */ ___ linuxtv-commits mailing list linuxtv-commits@linuxtv.org http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits
[git:v4l-dvb/v2.6.36] V4L/DVB: IR: fix keys beeing stuck down forever
This is an automatic generated email to let you know that the following patch were queued at the http://git.linuxtv.org/media-tree.git tree: Subject: V4L/DVB: IR: fix keys beeing stuck down forever Author: Maxim Levitsky maximlevit...@gmail.com Date:Mon Sep 6 18:26:09 2010 -0300 The logic in ir_timer_keyup was inverted. In case that values aren't equal, the meaning of the time_is_after_eq_jiffies(ir-keyup_jiffies) is that ir-keyup_jiffies is after the the jiffies or equally that that jiffies are before the the ir-keyup_jiffies which is exactly the situation we want to avoid (that the timeout is in the future) Confusing Eh? Signed-off-by: Maxim Levitsky maximlevit...@gmail.com Acked-by: Jarod Wilson ja...@redhat.com Cc: sta...@kernel.org Signed-off-by: Mauro Carvalho Chehab mche...@redhat.com drivers/media/IR/ir-keytable.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) --- http://git.linuxtv.org/media-tree.git?a=commitdiff;h=512afd048eafc211e18057711b51685af9e53458 diff --git a/drivers/media/IR/ir-keytable.c b/drivers/media/IR/ir-keytable.c index d00ef19..7961d59 100644 --- a/drivers/media/IR/ir-keytable.c +++ b/drivers/media/IR/ir-keytable.c @@ -319,7 +319,7 @@ static void ir_timer_keyup(unsigned long cookie) * a keyup event might follow immediately after the keydown. */ spin_lock_irqsave(ir-keylock, flags); - if (time_is_after_eq_jiffies(ir-keyup_jiffies)) + if (time_is_before_eq_jiffies(ir-keyup_jiffies)) ir_keyup(ir); spin_unlock_irqrestore(ir-keylock, flags); } ___ linuxtv-commits mailing list linuxtv-commits@linuxtv.org http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits
[git:v4l-dvb/v2.6.36] V4L/DVB: gspca - main: Fix a crash of some webcams on ARM arch
This is an automatic generated email to let you know that the following patch were queued at the http://git.linuxtv.org/media-tree.git tree: Subject: V4L/DVB: gspca - main: Fix a crash of some webcams on ARM arch Author: Jason Wang jason77.w...@gmail.com Date:Fri Sep 3 06:57:19 2010 -0300 When plugging some webcams on ARM, the system crashes. This is because we alloc buffer for an urb through usb_buffer_alloc, the alloced buffer is already in DMA coherent region, so we should set the flag of this urb to URB_NO_TRANSFER_DMA_MAP, otherwise when we submit this urb, the hcd core will handle this address as an non-DMA address and call dma_map_single/sg to map it. On arm architecture, dma_map_single a DMA coherent address will be catched by a BUG_ON(). Signed-off-by: Jason Wang jason77.w...@gmail.com Signed-off-by: Jean-François Moine moin...@free.fr Cc: sta...@kernel.org Signed-off-by: Mauro Carvalho Chehab mche...@redhat.com drivers/media/video/gspca/gspca.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) --- http://git.linuxtv.org/media-tree.git?a=commitdiff;h=fa18c9657a3ef6c84d9e56d0b58cf03632592936 diff --git a/drivers/media/video/gspca/gspca.c b/drivers/media/video/gspca/gspca.c index b984610..78abc1c 100644 --- a/drivers/media/video/gspca/gspca.c +++ b/drivers/media/video/gspca/gspca.c @@ -223,6 +223,7 @@ static int alloc_and_submit_int_urb(struct gspca_dev *gspca_dev, usb_rcvintpipe(dev, ep-bEndpointAddress), buffer, buffer_len, int_irq, (void *)gspca_dev, interval); + urb-transfer_flags |= URB_NO_TRANSFER_DMA_MAP; gspca_dev-int_urb = urb; ret = usb_submit_urb(urb, GFP_KERNEL); if (ret 0) { ___ linuxtv-commits mailing list linuxtv-commits@linuxtv.org http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits
[git:v4l-dvb/v2.6.36] V4L/DVB: IR: fix duty cycle capability
This is an automatic generated email to let you know that the following patch were queued at the http://git.linuxtv.org/media-tree.git tree: Subject: V4L/DVB: IR: fix duty cycle capability Author: Maxim Levitsky maximlevit...@gmail.com Date:Mon Sep 6 18:26:08 2010 -0300 Due to typo lirc bridge enabled wrong capability. Signed-off-by: Maxim Levitsky maximlevit...@gmail.com Acked-by: Jarod Wilson ja...@redhat.com Signed-off-by: Mauro Carvalho Chehab mche...@redhat.com drivers/media/IR/ir-lirc-codec.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) --- http://git.linuxtv.org/media-tree.git?a=commitdiff;h=11c473dec2dd43568e8126e7762dfcbdce0de89a diff --git a/drivers/media/IR/ir-lirc-codec.c b/drivers/media/IR/ir-lirc-codec.c index 77b5946..e63f757 100644 --- a/drivers/media/IR/ir-lirc-codec.c +++ b/drivers/media/IR/ir-lirc-codec.c @@ -267,7 +267,7 @@ static int ir_lirc_register(struct input_dev *input_dev) features |= LIRC_CAN_SET_SEND_CARRIER; if (ir_dev-props-s_tx_duty_cycle) - features |= LIRC_CAN_SET_REC_DUTY_CYCLE; + features |= LIRC_CAN_SET_SEND_DUTY_CYCLE; } if (ir_dev-props-s_rx_carrier_range) ___ linuxtv-commits mailing list linuxtv-commits@linuxtv.org http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits
[git:v4l-dvb/v2.6.36] V4L/DVB: mx2_camera: fix a race causing NULL dereference
This is an automatic generated email to let you know that the following patch were queued at the http://git.linuxtv.org/media-tree.git tree: Subject: V4L/DVB: mx2_camera: fix a race causing NULL dereference Author: Baruch Siach bar...@tkos.co.il Date:Tue Jul 27 09:06:07 2010 -0300 The mx25_camera_irq irq handler may get called after the camera has been deactivated (from mx2_camera_deactivate). Detect this situation, and bail out. Signed-off-by: Baruch Siach bar...@tkos.co.il Signed-off-by: Guennadi Liakhovetski g.liakhovet...@gmx.de Signed-off-by: Mauro Carvalho Chehab mche...@redhat.com drivers/media/video/mx2_camera.c |4 1 files changed, 4 insertions(+), 0 deletions(-) --- http://git.linuxtv.org/media-tree.git?a=commitdiff;h=7fa212423bf5695de4ca26bd9a3852559b09b08d diff --git a/drivers/media/video/mx2_camera.c b/drivers/media/video/mx2_camera.c index 66ff174..b6ea672 100644 --- a/drivers/media/video/mx2_camera.c +++ b/drivers/media/video/mx2_camera.c @@ -378,6 +378,9 @@ static void mx25_camera_frame_done(struct mx2_camera_dev *pcdev, int fb, spin_lock_irqsave(pcdev-lock, flags); + if (*fb_active == NULL) + goto out; + vb = (*fb_active)-vb; dev_dbg(pcdev-dev, %s (vb=0x%p) 0x%08lx %d\n, __func__, vb, vb-baddr, vb-bsize); @@ -402,6 +405,7 @@ static void mx25_camera_frame_done(struct mx2_camera_dev *pcdev, int fb, *fb_active = buf; +out: spin_unlock_irqrestore(pcdev-lock, flags); } ___ linuxtv-commits mailing list linuxtv-commits@linuxtv.org http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits
[git:v4l-dvb/v2.6.36] V4L/DVB: uvcvideo: Restrict frame rates for Chicony CNF7129 webcam
This is an automatic generated email to let you know that the following patch were queued at the http://git.linuxtv.org/media-tree.git tree: Subject: V4L/DVB: uvcvideo: Restrict frame rates for Chicony CNF7129 webcam Author: Laurent Pinchart laurent.pinch...@ideasonboard.com Date:Thu Sep 16 12:37:26 2010 -0300 At all frame rates except 30fps and 5fps the camera produces very dark pictures. Auto-exposure is probably disabled by the camera at all frame rates except 30fps, making them pretty unusable. Work around the problem by introducing a new RESTRICT_FRAME_RATE quirk that disables all the frame rates except the default one. Signed-off-by: Laurent Pinchart laurent.pinch...@ideasonboard.com Signed-off-by: Mauro Carvalho Chehab mche...@redhat.com drivers/media/video/uvc/uvc_driver.c | 15 +++ drivers/media/video/uvc/uvcvideo.h |1 + 2 files changed, 16 insertions(+), 0 deletions(-) --- http://git.linuxtv.org/media-tree.git?a=commitdiff;h=56d9889349f510931d2cc066abe57cdcd74a3b4a diff --git a/drivers/media/video/uvc/uvc_driver.c b/drivers/media/video/uvc/uvc_driver.c index 63756ca..2ac85d8 100644 --- a/drivers/media/video/uvc/uvc_driver.c +++ b/drivers/media/video/uvc/uvc_driver.c @@ -486,6 +486,12 @@ static int uvc_parse_format(struct uvc_device *dev, max(frame-dwFrameInterval[0], frame-dwDefaultFrameInterval)); + if (dev-quirks UVC_QUIRK_RESTRICT_FRAME_RATE) { + frame-bFrameIntervalType = 1; + frame-dwFrameInterval[0] = + frame-dwDefaultFrameInterval; + } + uvc_trace(UVC_TRACE_DESCR, - %ux%u (%u.%u fps)\n, frame-wWidth, frame-wHeight, 1000/frame-dwDefaultFrameInterval, @@ -2026,6 +2032,15 @@ static struct usb_device_id uvc_ids[] = { .bInterfaceClass = USB_CLASS_VENDOR_SPEC, .bInterfaceSubClass = 1, .bInterfaceProtocol = 0 }, + /* Chicony CNF7129 (Asus EEE 100HE) */ + { .match_flags = USB_DEVICE_ID_MATCH_DEVICE + | USB_DEVICE_ID_MATCH_INT_INFO, + .idVendor = 0x04f2, + .idProduct= 0xb071, + .bInterfaceClass = USB_CLASS_VIDEO, + .bInterfaceSubClass = 1, + .bInterfaceProtocol = 0, + .driver_info = UVC_QUIRK_RESTRICT_FRAME_RATE }, /* Alcor Micro AU3820 (Future Boy PC USB Webcam) */ { .match_flags = USB_DEVICE_ID_MATCH_DEVICE | USB_DEVICE_ID_MATCH_INT_INFO, diff --git a/drivers/media/video/uvc/uvcvideo.h b/drivers/media/video/uvc/uvcvideo.h index bdacf3b..892e0e5 100644 --- a/drivers/media/video/uvc/uvcvideo.h +++ b/drivers/media/video/uvc/uvcvideo.h @@ -182,6 +182,7 @@ struct uvc_xu_control { #define UVC_QUIRK_IGNORE_SELECTOR_UNIT 0x0020 #define UVC_QUIRK_FIX_BANDWIDTH0x0080 #define UVC_QUIRK_PROBE_DEF0x0100 +#define UVC_QUIRK_RESTRICT_FRAME_RATE 0x0200 /* Format flags */ #define UVC_FMT_FLAG_COMPRESSED0x0001 ___ linuxtv-commits mailing list linuxtv-commits@linuxtv.org http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits