[linuxtv-commits] [hg:v4l-dvb] v4l2-i2c-drv*.h: fix warnings caused by I2C API change

2008-05-02 Thread Patch from Mauro Carvalho Chehab
The patch number 7826 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
v4l2-i2c-drv*.h: fix warnings caused by I2C API change


The I2C changes at probe method did this:

In file included from /home/v4l/master/v4l/cx25840-core.c:42:
/home/v4l/master/v4l/../linux/include/media/v4l2-i2c-drv-legacy.h: In function 
'v4l2_i2c_drv_init':
/home/v4l/master/v4l/../linux/include/media/v4l2-i2c-drv-legacy.h:201: warning: 
assignment from incompatible pointer type

/home/v4l/master/v4l/../linux/include/media/v4l2-i2c-drv.h: In function 
'v4l2_i2c_drv_init':
/home/v4l/master/v4l/../linux/include/media/v4l2-i2c-drv.h:57: warning: 
assignment from incompatible pointer type

This patches creates a pseudo-function, at include/media/v4l2-i2c-drv-legacy.h
and on include/media/v4l2-i2c-drv.h, that makes the proper translation:

static int compat_legacy_probe(struct i2c_client *client)
{
return v4l2_i2c_data.probe(client, NULL);
}

Hopefully, this will fix the issue of making the code backward compatible
without much changes.

Notice: The fix weren't tested on hardware. I'm currently out of town, without
hardware here.

Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 linux/include/media/v4l2-i2c-drv-legacy.h |   12 
 linux/include/media/v4l2-i2c-drv.h|   11 +++
 2 files changed, 23 insertions(+)

diff -r dd4685496fb7 -r 4c4fd6b8755c linux/include/media/v4l2-i2c-drv-legacy.h
--- a/linux/include/media/v4l2-i2c-drv-legacy.h Fri May 02 01:48:36 2008 -0300
+++ b/linux/include/media/v4l2-i2c-drv-legacy.h Fri May 02 07:51:27 2008 -0300
@@ -168,6 +168,14 @@ static struct i2c_driver v4l2_i2c_driver
 };
 #endif
 
+
+#if LINUX_VERSION_CODE = KERNEL_VERSION(2, 6, 26)
+static int compat_legacy_probe(struct i2c_client *client)
+{
+   return v4l2_i2c_data.probe(client, NULL);
+}
+#endif
+
 static int __init v4l2_i2c_drv_init(void)
 {
int err;
@@ -198,7 +206,11 @@ static int __init v4l2_i2c_drv_init(void
v4l2_i2c_driver.driver.name = v4l2_i2c_data.name;
v4l2_i2c_driver.id = v4l2_i2c_data.driverid;
v4l2_i2c_driver.command = v4l2_i2c_data.command;
+#if LINUX_VERSION_CODE = KERNEL_VERSION(2, 6, 26)
v4l2_i2c_driver.probe = v4l2_i2c_data.probe;
+#else
+   v4l2_i2c_driver.probe = compat_legacy_probe;
+#endif
v4l2_i2c_driver.remove = v4l2_i2c_data.remove;
err = i2c_add_driver(v4l2_i2c_driver);
if (err)
diff -r dd4685496fb7 -r 4c4fd6b8755c linux/include/media/v4l2-i2c-drv.h
--- a/linux/include/media/v4l2-i2c-drv.hFri May 02 01:48:36 2008 -0300
+++ b/linux/include/media/v4l2-i2c-drv.hFri May 02 07:51:27 2008 -0300
@@ -45,6 +45,13 @@ static struct v4l2_i2c_driver_data v4l2_
 static struct v4l2_i2c_driver_data v4l2_i2c_data;
 static struct i2c_driver v4l2_i2c_driver;
 
+#if LINUX_VERSION_CODE = KERNEL_VERSION(2, 6, 26)
+static int compat_legacy_probe(struct i2c_client *client)
+{
+   return v4l2_i2c_data.probe(client, NULL);
+}
+#endif
+
 #if LINUX_VERSION_CODE = KERNEL_VERSION(2,6,22)
 
 /* Bus-based I2C implementation for kernels = 2.6.22 */
@@ -54,7 +61,11 @@ static int __init v4l2_i2c_drv_init(void
v4l2_i2c_driver.driver.name = v4l2_i2c_data.name;
v4l2_i2c_driver.id = v4l2_i2c_data.driverid;
v4l2_i2c_driver.command = v4l2_i2c_data.command;
+#if LINUX_VERSION_CODE = KERNEL_VERSION(2, 6, 26)
v4l2_i2c_driver.probe = v4l2_i2c_data.probe;
+#else
+   v4l2_i2c_driver.probe = compat_legacy_probe;
+#endif
v4l2_i2c_driver.remove = v4l2_i2c_data.remove;
v4l2_i2c_driver.suspend = v4l2_i2c_data.suspend;
v4l2_i2c_driver.resume = v4l2_i2c_data.resume;


---

Patch is available at: 
http://linuxtv.org/hg/v4l-dvb/rev/4c4fd6b8755cc9918255876ff1010bc77374a310

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[linuxtv-commits] [hg:v4l-dvb] Simplifies Kconfig rules.

2008-05-06 Thread Patch from Mauro Carvalho Chehab
The patch number 7847 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
Simplifies Kconfig rules.


Since all tuners are dependent of I2C, move I2C dependency to MEDIA_TUNER.
Also, simplifies the dependencies for the other Kconfig items.

Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 linux/drivers/media/common/tuners/Kconfig |   20 
 1 file changed, 4 insertions(+), 16 deletions(-)

diff -r 98acaa345fce -r 60d463d16845 linux/drivers/media/common/tuners/Kconfig
--- a/linux/drivers/media/common/tuners/Kconfig Tue May 06 09:35:58 2008 -0300
+++ b/linux/drivers/media/common/tuners/Kconfig Tue May 06 09:38:24 2008 -0300
@@ -19,8 +19,8 @@ config MEDIA_ATTACH
 
 config MEDIA_TUNER
tristate
-   default DVB_CORE || VIDEO_DEV
-   depends on DVB_CORE || VIDEO_DEV
+   default VIDEO_MEDIA  I2C
+   depends on VIDEO_MEDIA  I2C
select MEDIA_TUNER_XC2028 if !MEDIA_TUNER_CUSTOMIZE
select MEDIA_TUNER_XC5000 if !MEDIA_TUNER_CUSTOMIZE
select MEDIA_TUNER_MT20XX if !MEDIA_TUNER_CUSTOMIZE
@@ -46,7 +46,6 @@ if MEDIA_TUNER_CUSTOMIZE
 
 config MEDIA_TUNER_SIMPLE
tristate Simple tuner support
-   depends on I2C
select MEDIA_TUNER_TDA9887
default m if MEDIA_TUNER_CUSTOMIZE
help
@@ -54,7 +53,6 @@ config MEDIA_TUNER_SIMPLE
 
 config MEDIA_TUNER_TDA8290
tristate TDA 8290/8295 + 8275(a)/18271 tuner combo
-   depends on I2C
select MEDIA_TUNER_TDA827X
select MEDIA_TUNER_TDA18271
default m if MEDIA_TUNER_CUSTOMIZE
@@ -63,21 +61,18 @@ config MEDIA_TUNER_TDA8290
 
 config MEDIA_TUNER_TDA827X
tristate Philips TDA827X silicon tuner
-   depends on DVB_CORE  I2C
default m if DVB_FE_CUSTOMISE
help
  A DVB-T silicon tuner module. Say Y when you want to support this 
tuner.
 
 config MEDIA_TUNER_TDA18271
tristate NXP TDA18271 silicon tuner
-   depends on I2C
default m if DVB_FE_CUSTOMISE
help
  A silicon tuner module. Say Y when you want to support this tuner.
 
 config MEDIA_TUNER_TDA9887
tristate TDA 9885/6/7 analog IF demodulator
-   depends on I2C
default m if MEDIA_TUNER_CUSTOMIZE
help
  Say Y here to include support for Philips TDA9885/6/7
@@ -85,63 +80,56 @@ config MEDIA_TUNER_TDA9887
 
 config MEDIA_TUNER_TEA5761
tristate TEA 5761 radio tuner (EXPERIMENTAL)
-   depends on I2C  EXPERIMENTAL
+   depends on EXPERIMENTAL
default m if MEDIA_TUNER_CUSTOMIZE
help
  Say Y here to include support for the Philips TEA5761 radio tuner.
 
 config MEDIA_TUNER_TEA5767
tristate TEA 5767 radio tuner
-   depends on I2C
default m if MEDIA_TUNER_CUSTOMIZE
help
  Say Y here to include support for the Philips TEA5767 radio tuner.
 
 config MEDIA_TUNER_MT20XX
tristate Microtune 2032 / 2050 tuners
-   depends on I2C
default m if MEDIA_TUNER_CUSTOMIZE
help
  Say Y here to include support for the MT2032 / MT2050 tuner.
 
 config MEDIA_TUNER_MT2060
tristate Microtune MT2060 silicon IF tuner
-   depends on I2C
default m if DVB_FE_CUSTOMISE
help
  A driver for the silicon IF tuner MT2060 from Microtune.
 
 config MEDIA_TUNER_MT2266
tristate Microtune MT2266 silicon tuner
-   depends on I2C
default m if DVB_FE_CUSTOMISE
help
  A driver for the silicon baseband tuner MT2266 from Microtune.
 
 config MEDIA_TUNER_MT2131
tristate Microtune MT2131 silicon tuner
-   depends on I2C
default m if DVB_FE_CUSTOMISE
help
  A driver for the silicon baseband tuner MT2131 from Microtune.
 
 config MEDIA_TUNER_QT1010
tristate Quantek QT1010 silicon tuner
-   depends on DVB_CORE  I2C
default m if DVB_FE_CUSTOMISE
help
  A driver for the silicon tuner QT1010 from Quantek.
 
 config MEDIA_TUNER_XC2028
tristate XCeive xc2028/xc3028 tuners
-   depends on I2C  FW_LOADER
+   depends on FW_LOADER
default m if MEDIA_TUNER_CUSTOMIZE
help
  Say Y here to include support for the xc2028/xc3028 tuners.
 
 config MEDIA_TUNER_XC5000
tristate Xceive XC5000 silicon tuner
-   depends on I2C
select FW_LOADER
default m if DVB_FE_CUSTOMISE
help


---

Patch is available at: 
http://linuxtv.org/hg/v4l-dvb/rev/60d463d16845ad35f18faf6f0e1f3138bd3b7f62

___
linuxtv-commits mailing 

[linuxtv-commits] [hg:v4l-dvb] DRX depends on HOTPLUG, due to FW_LOADER dependency

2008-05-06 Thread Patch from Mauro Carvalho Chehab
The patch number 7850 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
DRX depends on HOTPLUG, due to FW_LOADER dependency




Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 linux/drivers/media/dvb/frontends/Kconfig |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff -r 0e2199ae74fa -r 0f7c9a3a0fee linux/drivers/media/dvb/frontends/Kconfig
--- a/linux/drivers/media/dvb/frontends/Kconfig Tue May 06 10:46:12 2008 -0300
+++ b/linux/drivers/media/dvb/frontends/Kconfig Tue May 06 10:47:44 2008 -0300
@@ -137,7 +137,7 @@ config DVB_CX22702
 
 config DVB_DRX397XD
tristate Micronas DRX3975D/DRX3977D based
-   depends on DVB_CORE  I2C
+   depends on DVB_CORE  I2C  HOTPLUG
default m if DVB_FE_CUSTOMISE
select FW_LOADER
help


---

Patch is available at: 
http://linuxtv.org/hg/v4l-dvb/rev/0f7c9a3a0fee8196c3d78e755de6aecdc2f591d3

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[linuxtv-commits] [hg:v4l-dvb] Fix FW_LOADER depencency at v4l/dvb

2008-05-06 Thread Patch from Mauro Carvalho Chehab
The patch number 7851 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
Fix FW_LOADER depencency at v4l/dvb


Since:

1) FW_LOADER is defined as:

config FW_LOADER
tristate Userspace firmware loading support
depends on HOTPLUG

2) several V4L/DVB driver just selects it;

3) select is not smart enough to auto-select HOTPLUG, if select FW_LOADER.

So, All drivers that select FW_LOADER should also depend on HOTPLUG.

An easier solution (for the end-user perspective) would be to select HOTPLUG.
However, live is not simple. This would cause recursive dependency issues like
this one:

drivers/usb/Kconfig:62:error: found recursive dependency: USB - USB_OHCI_HCD
- I2C - MEDIA_TUNER - MEDIA_TUNER_XC2028 - HOTPLUG - PCCARD - PCMCIA -
USB_ARCH_HAS_HCD - MOUSE_APPLETOUCH - USB

Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 linux/drivers/media/common/tuners/Kconfig |1 +
 linux/drivers/media/dvb/bt8xx/Kconfig |1 +
 linux/drivers/media/dvb/dvb-usb/Kconfig   |1 +
 linux/drivers/media/dvb/frontends/Kconfig |   16 
 linux/drivers/media/dvb/ttpci/Kconfig |2 ++
 linux/drivers/media/dvb/ttusb-dec/Kconfig |1 +
 linux/drivers/media/video/bt8xx/Kconfig   |1 +
 linux/drivers/media/video/cx18/Kconfig|2 ++
 linux/drivers/media/video/cx23885/Kconfig |1 +
 linux/drivers/media/video/cx25840/Kconfig |1 +
 linux/drivers/media/video/ivtv/Kconfig|2 ++
 linux/drivers/media/video/pvrusb2/Kconfig |1 +
 linux/drivers/media/video/saa7134/Kconfig |1 +
 13 files changed, 23 insertions(+), 8 deletions(-)

diff -r 0f7c9a3a0fee -r 41b3f12d6ce4 linux/drivers/media/common/tuners/Kconfig
--- a/linux/drivers/media/common/tuners/Kconfig Tue May 06 10:47:44 2008 -0300
+++ b/linux/drivers/media/common/tuners/Kconfig Tue May 06 11:09:01 2008 -0300
@@ -131,6 +131,7 @@ config MEDIA_TUNER_XC2028
 
 config MEDIA_TUNER_XC5000
tristate Xceive XC5000 silicon tuner
+   depends on HOTPLUG
select FW_LOADER
default m if DVB_FE_CUSTOMISE
help
diff -r 0f7c9a3a0fee -r 41b3f12d6ce4 linux/drivers/media/dvb/bt8xx/Kconfig
--- a/linux/drivers/media/dvb/bt8xx/Kconfig Tue May 06 10:47:44 2008 -0300
+++ b/linux/drivers/media/dvb/bt8xx/Kconfig Tue May 06 11:09:01 2008 -0300
@@ -1,6 +1,7 @@ config DVB_BT8XX
 config DVB_BT8XX
tristate BT8xx based PCI cards
depends on DVB_CORE  PCI  I2C  VIDEO_BT848
+   depends on HOTPLUG  # due to FW_LOADER
select DVB_MT352 if !DVB_FE_CUSTOMISE
select DVB_SP887X if !DVB_FE_CUSTOMISE
select DVB_NXT6000 if !DVB_FE_CUSTOMISE
diff -r 0f7c9a3a0fee -r 41b3f12d6ce4 linux/drivers/media/dvb/dvb-usb/Kconfig
--- a/linux/drivers/media/dvb/dvb-usb/Kconfig   Tue May 06 10:47:44 2008 -0300
+++ b/linux/drivers/media/dvb/dvb-usb/Kconfig   Tue May 06 11:09:01 2008 -0300
@@ -1,6 +1,7 @@ config DVB_USB
 config DVB_USB
tristate Support for various USB DVB devices
depends on DVB_CORE  USB  I2C
+   depends on HOTPLUG  # due to FW_LOADER
select FW_LOADER
help
  By enabling this you will be able to choose the various supported
diff -r 0f7c9a3a0fee -r 41b3f12d6ce4 linux/drivers/media/dvb/frontends/Kconfig
--- a/linux/drivers/media/dvb/frontends/Kconfig Tue May 06 10:47:44 2008 -0300
+++ b/linux/drivers/media/dvb/frontends/Kconfig Tue May 06 11:09:01 2008 -0300
@@ -97,7 +97,7 @@ comment DVB-T (terrestrial) frontends
 
 config DVB_SP8870
tristate Spase sp8870 based
-   depends on DVB_CORE  I2C
+   depends on DVB_CORE  I2C  HOTPLUG
default m if DVB_FE_CUSTOMISE
select FW_LOADER
help
@@ -110,7 +110,7 @@ config DVB_SP8870
 
 config DVB_SP887X
tristate Spase sp887x based
-   depends on DVB_CORE  I2C
+   depends on DVB_CORE  I2C  HOTPLUG
default m if DVB_FE_CUSTOMISE
select FW_LOADER
help
@@ -158,7 +158,7 @@ config DVB_L64781
 
 config DVB_TDA1004X
tristate Philips TDA10045H/TDA10046H based
-   depends on DVB_CORE  I2C
+   depends on DVB_CORE  I2C  HOTPLUG
default m if DVB_FE_CUSTOMISE
select FW_LOADER
help
@@ -225,7 +225,7 @@ config DVB_DIB7000P
 
 config DVB_TDA10048
tristate Philips TDA10048HN based
-   depends on DVB_CORE  I2C
+   depends on DVB_CORE  I2C  HOTPLUG
default m if DVB_FE_CUSTOMISE
select FW_LOADER
help
@@ -267,7 +267,7 @@ comment ATSC (North American/Korean Ter
 
 config DVB_NXT200X
tristate NxtWave Communications NXT2002/NXT2004 based
-   

[linuxtv-commits] [hg:v4l-dvb] merge: http://linuxtv.org/hg/~gliakhovetski/v4l-dvb

2008-05-07 Thread Patch from Mauro Carvalho Chehab
The patch number 7860 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
merge: http://linuxtv.org/hg/~gliakhovetski/v4l-dvb




Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 linux/drivers/media/video/mt9m001.c |5 +
 linux/drivers/media/video/mt9v022.c |7 ++-
 2 files changed, 3 insertions(+), 9 deletions(-)

diff -r 74620b840e12 -r 0a072dd11cd8 linux/drivers/media/video/mt9m001.c
--- a/linux/drivers/media/video/mt9m001.c   Mon Apr 28 15:39:09 2008 +
+++ b/linux/drivers/media/video/mt9m001.c   Wed May 07 15:42:54 2008 -0300
@@ -12,14 +12,11 @@
 #include linux/slab.h
 #include linux/i2c.h
 #include linux/log2.h
+#include linux/gpio.h
 
 #include media/v4l2-common.h
 #include media/v4l2-chip-ident.h
 #include media/soc_camera.h
-
-#ifdef CONFIG_MT9M001_PCA9536_SWITCH
-#include asm/gpio.h
-#endif
 
 /* mt9m001 i2c address 0x5d
  * The platform has to define i2c_board_info
diff -r 74620b840e12 -r 0a072dd11cd8 linux/drivers/media/video/mt9v022.c
--- a/linux/drivers/media/video/mt9v022.c   Mon Apr 28 15:39:09 2008 +
+++ b/linux/drivers/media/video/mt9v022.c   Wed May 07 15:42:54 2008 -0300
@@ -13,14 +13,11 @@
 #include linux/i2c.h
 #include linux/delay.h
 #include linux/log2.h
+#include linux/gpio.h
 
 #include media/v4l2-common.h
 #include media/v4l2-chip-ident.h
 #include media/soc_camera.h
-
-#ifdef CONFIG_MT9M001_PCA9536_SWITCH
-#include asm/gpio.h
-#endif
 
 /* mt9v022 i2c address 0x48, 0x4c, 0x58, 0x5c
  * The platform has to define i2c_board_info
@@ -91,7 +88,7 @@ struct mt9v022 {
 struct mt9v022 {
struct i2c_client *client;
struct soc_camera_device icd;
-   int model;  /* V4L2_IDENT_MT9M001* codes from v4l2-chip-ident.h */
+   int model;  /* V4L2_IDENT_MT9V022* codes from v4l2-chip-ident.h */
int switch_gpio;
u16 chip_control;
unsigned char datawidth;


---

Patch is available at: 
http://linuxtv.org/hg/v4l-dvb/rev/0a072dd11cd82af302e061fb40494285d8534915

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[linuxtv-commits] [hg:v4l-dvb] merge: http://linuxtv.org/hg/~mkrufky/xc5000

2008-05-12 Thread Patch from Mauro Carvalho Chehab
The patch number 7894 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
merge: http://linuxtv.org/hg/~mkrufky/xc5000




Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 linux/drivers/media/common/tuners/xc5000.c  |9 +++---
 linux/drivers/media/common/tuners/xc5000.h  |   22 
 linux/drivers/media/common/tuners/xc5000_priv.h |2 +
 linux/drivers/media/video/au0828/au0828-dvb.c   |6 +---
 linux/drivers/media/video/cx23885/cx23885-dvb.c |6 +---
 linux/drivers/media/video/cx88/cx88-dvb.c   |   10 ++-
 linux/drivers/media/video/tuner-core.c  |4 +-
 7 files changed, 29 insertions(+), 30 deletions(-)

diff -r 1ef54d1daa8e -r 52dee89a50e3 linux/drivers/media/common/tuners/xc5000.c
--- a/linux/drivers/media/common/tuners/xc5000.cTue May 13 00:01:54 
2008 -0300
+++ b/linux/drivers/media/common/tuners/xc5000.cTue May 13 00:05:47 
2008 -0300
@@ -212,7 +212,7 @@ static void xc5000_TunerReset(struct dvb
dprintk(1, %s()\n, __func__);
 
if (priv-cfg-tuner_callback) {
-   ret = priv-cfg-tuner_callback(priv-cfg-priv,
+   ret = priv-cfg-tuner_callback(priv-devptr,
XC5000_TUNER_RESET, 0);
if (ret)
printk(KERN_ERR xc5000: reset failed\n);
@@ -919,9 +919,9 @@ static const struct dvb_tuner_ops xc5000
.get_status= xc5000_get_status
 };
 
-struct dvb_frontend * xc5000_attach(struct dvb_frontend *fe,
-   struct i2c_adapter *i2c,
-   struct xc5000_config *cfg)
+struct dvb_frontend *xc5000_attach(struct dvb_frontend *fe,
+  struct i2c_adapter *i2c,
+  struct xc5000_config *cfg, void *devptr)
 {
struct xc5000_priv *priv = NULL;
u16 id = 0;
@@ -935,6 +935,7 @@ struct dvb_frontend * xc5000_attach(stru
priv-cfg = cfg;
priv-bandwidth = BANDWIDTH_6_MHZ;
priv-i2c = i2c;
+   priv-devptr = devptr;
 
/* Check if firmware has been loaded. It is possible that another
   instance of the driver has loaded the firmware.
diff -r 1ef54d1daa8e -r 52dee89a50e3 linux/drivers/media/common/tuners/xc5000.h
--- a/linux/drivers/media/common/tuners/xc5000.hTue May 13 00:01:54 
2008 -0300
+++ b/linux/drivers/media/common/tuners/xc5000.hTue May 13 00:05:47 
2008 -0300
@@ -31,29 +31,31 @@ struct xc5000_config {
u8   i2c_address;
u32  if_khz;
 
-   /* For each bridge framework, when it attaches either analog or digital,
-* it has to store a reference back to its _core equivalent structure,
-* so that it can service the hardware by steering gpio's etc.
-* Each bridge implementation is different so cast priv accordingly.
-* The xc5000 driver cares not for this value, other than ensuring
-* it's passed back to a bridge during tuner_callback().
-*/
-   void *priv;
int  (*tuner_callback) (void *priv, int command, int arg);
 };
 
 /* xc5000 callback command */
 #define XC5000_TUNER_RESET 0
 
+/* For each bridge framework, when it attaches either analog or digital,
+ * it has to store a reference back to its _core equivalent structure,
+ * so that it can service the hardware by steering gpio's etc.
+ * Each bridge implementation is different so cast devptr accordingly.
+ * The xc5000 driver cares not for this value, other than ensuring
+ * it's passed back to a bridge during tuner_callback().
+ */
+
 #if defined(CONFIG_MEDIA_TUNER_XC5000) || \
 (defined(CONFIG_MEDIA_TUNER_XC5000_MODULE)  defined(MODULE))
 extern struct dvb_frontend* xc5000_attach(struct dvb_frontend *fe,
  struct i2c_adapter *i2c,
- struct xc5000_config *cfg);
+ struct xc5000_config *cfg,
+ void *devptr);
 #else
 static inline struct dvb_frontend* xc5000_attach(struct dvb_frontend *fe,
 struct i2c_adapter *i2c,
-struct xc5000_config *cfg)
+struct xc5000_config *cfg,
+void *devptr)
 {
printk(KERN_WARNING %s: driver disabled by Kconfig\n, __func__);
return NULL;
diff -r 1ef54d1daa8e -r 52dee89a50e3 
linux/drivers/media/common/tuners/xc5000_priv.h
--- 

[linuxtv-commits] [hg:v4l-dvb] remove this weird file created by changeset eb206d5b7eff

2008-05-26 Thread Patch from Mauro Carvalho Chehab
The patch number 7941 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
remove this weird file created by changeset eb206d5b7eff


Thanks to Michael Krufky for pointing this.

Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 v4l/oss |1 -
 1 file changed, 1 deletion(-)

diff -r 4061d61784b6 -r 8dd0febf8241 v4l/oss
--- a/v4l/oss   Mon May 26 12:06:54 2008 -0300
+++ /dev/null   Thu Jan 01 00:00:00 1970 +
@@ -1,1 +0,0 @@
-.
\ No newline at end of file


---

Patch is available at: 
http://linuxtv.org/hg/v4l-dvb/rev/8dd0febf82415b5f84cfebd82467591e3259df88

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[linuxtv-commits] [hg:v4l-dvb] backout changeset e30f9c367fabf6227e17c5191c62f886d55eb2d7

2008-06-03 Thread Patch from Mauro Carvalho Chehab
The patch number 7980 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
backout changeset e30f9c367fabf6227e17c5191c62f886d55eb2d7


Unfortunately, this patch were mixed with an experimental patch I'm working
with.

Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 linux/Documentation/video4linux/CARDLIST.bttv|1 
 linux/Documentation/video4linux/CARDLIST.tuner   |1 
 linux/drivers/media/common/ir-keymaps.c  |   57 +-
 linux/drivers/media/common/tuners/tuner-simple.c |2 
 linux/drivers/media/common/tuners/tuner-types.c  |   22 -
 linux/drivers/media/dvb/cinergyT2/cinergyT2.c|   46 +--
 linux/drivers/media/video/bt8xx/bttv-cards.c |   27 --
 linux/drivers/media/video/bt8xx/bttv-driver.c|5 -
 linux/drivers/media/video/bt8xx/bttv-input.c |   59 ---
 linux/drivers/media/video/bt8xx/bttv.h   |2 
 linux/include/media/ir-common.h  |1 
 linux/include/media/tuner.h  |1 
 12 files changed, 31 insertions(+), 193 deletions(-)

diff -r e30f9c367fab -r 5c4b6f89876a 
linux/Documentation/video4linux/CARDLIST.bttv
--- a/linux/Documentation/video4linux/CARDLIST.bttv Wed May 21 00:30:31 
2008 +
+++ b/linux/Documentation/video4linux/CARDLIST.bttv Tue Jun 03 14:50:32 
2008 -0300
@@ -150,4 +150,3 @@ 149 - Typhoon TV-Tuner PCI (50684)
 149 - Typhoon TV-Tuner PCI (50684)
 150 - Geovision GV-600[008a:763c]
 151 - Kozumi KTV-01C
-152 - Encore ENL TV-FM-2  [1000:1801]
diff -r e30f9c367fab -r 5c4b6f89876a 
linux/Documentation/video4linux/CARDLIST.tuner
--- a/linux/Documentation/video4linux/CARDLIST.tunerWed May 21 00:30:31 
2008 +
+++ b/linux/Documentation/video4linux/CARDLIST.tunerTue Jun 03 14:50:32 
2008 -0300
@@ -74,4 +74,3 @@ tuner=73 - Samsung TCPG 6121P30A
 tuner=73 - Samsung TCPG 6121P30A
 tuner=75 - Philips TEA5761 FM Radio
 tuner=76 - Xceive 5000 tuner
-tuner=77 - TCL tuner MF02GIP-5N-E
diff -r e30f9c367fab -r 5c4b6f89876a linux/drivers/media/common/ir-keymaps.c
--- a/linux/drivers/media/common/ir-keymaps.c   Wed May 21 00:30:31 2008 +
+++ b/linux/drivers/media/common/ir-keymaps.c   Tue Jun 03 14:50:32 2008 -0300
@@ -1842,60 +1842,11 @@ IR_KEYTAB_TYPE ir_codes_encore_enltv[IR_
[ 0x41 ] = KEY_GREEN,   /* AP2 */
[ 0x47 ] = KEY_YELLOW,  /* AP3 */
[ 0x57 ] = KEY_BLUE,/* AP4 */
-};
+
+
+};
+
 EXPORT_SYMBOL_GPL(ir_codes_encore_enltv);
-
-/* Encore ENLTV2-FM  - silver plastic - Wand Media written at the botton
-Mauro Carvalho Chehab [EMAIL PROTECTED] */
-IR_KEYTAB_TYPE ir_codes_encore_enltv2[IR_KEYTAB_SIZE] = {
-   [0x4c] = KEY_POWER2,
-   [0x4a] = KEY_TUNER,
-   [0x40] = KEY_1,
-   [0x60] = KEY_2,
-   [0x50] = KEY_3,
-   [0x70] = KEY_4,
-   [0x48] = KEY_5,
-   [0x68] = KEY_6,
-   [0x58] = KEY_7,
-   [0x78] = KEY_8,
-   [0x44] = KEY_9,
-   [0x54] = KEY_0,
-
-   [0x64] = KEY_LAST,  /* +100 */
-   [0x4e] = KEY_AGAIN, /* Recall */
-
-   [0x6c] = KEY_SWITCHVIDEOMODE,   /* Video Source */
-   [0x5e] = KEY_MENU,
-   [0x56] = KEY_SCREEN,
-   [0x7a] = KEY_SETUP,
-
-   [0x46] = KEY_MUTE,
-   [0x5c] = KEY_MODE,  /* Stereo */
-   [0x74] = KEY_INFO,
-   [0x7c] = KEY_CLEAR,
-
-   [0x55] = KEY_UP,
-   [0x49] = KEY_DOWN,
-   [0x7e] = KEY_LEFT,
-   [0x59] = KEY_RIGHT,
-   [0x6a] = KEY_ENTER,
-
-   [0x42] = KEY_VOLUMEUP,
-   [0x62] = KEY_VOLUMEDOWN,
-   [0x52] = KEY_CHANNELUP,
-   [0x72] = KEY_CHANNELDOWN,
-
-   [0x41] = KEY_RECORD,
-   [0x51] = KEY_SHUFFLE,   /* Snapshot */
-   [0x75] = KEY_TIME,  /* Timeshift */
-   [0x71] = KEY_TV2,   /* PIP */
-
-   [0x45] = KEY_REWIND,
-   [0x6f] = KEY_PAUSE,
-   [0x7d] = KEY_FORWARD,
-   [0x79] = KEY_STOP,
-};
-EXPORT_SYMBOL_GPL(ir_codes_encore_enltv2);
 
 /* for the Technotrend 1500 bundled remotes (grey and black): */
 IR_KEYTAB_TYPE ir_codes_tt_1500[IR_KEYTAB_SIZE] = {
diff -r e30f9c367fab -r 5c4b6f89876a 
linux/drivers/media/common/tuners/tuner-simple.c
--- a/linux/drivers/media/common/tuners/tuner-simple.c  Wed May 21 00:30:31 
2008 +
+++ b/linux/drivers/media/common/tuners/tuner-simple.c  Tue Jun 03 14:50:32 
2008 -0300
@@ -150,7 +150,6 @@ static inline int tuner_stereo(const int
case TUNER_PHILIPS_FM1236_MK3:
case TUNER_PHILIPS_FM1256_IH3:
case TUNER_LG_NTSC_TAPE:
-   case 

[linuxtv-commits] [hg:v4l-dvb] fix compat.h

2008-06-03 Thread Patch from Mauro Carvalho Chehab
The patch number 7991 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
fix compat.h


Thanks to e9hack [EMAIL PROTECTED] for pointing this issue.

Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 v4l/compat.h |8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff -r ce81a6baadcc -r 1e71c0c79b3a v4l/compat.h
--- a/v4l/compat.h  Tue Jun 03 18:29:45 2008 -0300
+++ b/v4l/compat.h  Tue Jun 03 19:12:00 2008 -0300
@@ -534,13 +534,13 @@ do {  
\
 #define put_unaligned_le16(r, a)   \
put_unaligned(cpu_to_le16(r), ((unsigned short *)(a)))
 #define get_unaligned_be32(a)  \
-   be32_to_cpu(get_unaligned((unsigned short *)(a)))
+   be32_to_cpu(get_unaligned((u32 *)(a)))
 #define put_unaligned_be32(r, a)   \
-   put_unaligned(cpu_to_be32(r), ((unsigned short *)(a)))
+   put_unaligned(cpu_to_be32(r), ((u32 *)(a)))
 #define get_unaligned_le32(a)  \
-   le32_to_cpu(get_unaligned((unsigned short *)(a)))
+   le32_to_cpu(get_unaligned((u32 *)(a)))
 #define put_unaligned_le32(r, a)   \
-   put_unaligned(cpu_to_le32(r), ((unsigned short *)(a)))
+   put_unaligned(cpu_to_le32(r), ((u32 *)(a)))
 #endif
 #if LINUX_VERSION_CODE  KERNEL_VERSION(2, 6, 25)
 #ifdef CONFIG_PROC_FS


---

Patch is available at: 
http://linuxtv.org/hg/v4l-dvb/rev/1e71c0c79b3aca97bd4c98ac87a704b05a7fc0bc

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[linuxtv-commits] [hg:v4l-dvb] Backport ivtv i2c changes to better work with the newer I2C code

2008-06-05 Thread Patch from Mauro Carvalho Chehab
The patch number 8003 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
Backport ivtv i2c changes to better work with the newer I2C code


Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 linux/drivers/media/video/ivtv/ivtv-i2c.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff -r d44ff2966ac6 -r e4720b547df6 linux/drivers/media/video/ivtv/ivtv-i2c.c
--- a/linux/drivers/media/video/ivtv/ivtv-i2c.c Thu Jun 05 10:24:54 2008 -0300
+++ b/linux/drivers/media/video/ivtv/ivtv-i2c.c Thu Jun 05 15:39:42 2008 -0300
@@ -145,7 +145,7 @@ static const char * const hw_devicenames
wm8775,
cs53l32a,
tveeprom,
-   saa7115,
+   saa7114,
upd64031a,
upd64083,
saa717x,


---

Patch is available at: 
http://linuxtv.org/hg/v4l-dvb/rev/e4720b547df6cc9c00143b8e63176cd4cf14d194

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[linuxtv-commits] [hg:v4l-dvb] Fix OOPS if frontend is null

2008-06-07 Thread Patch from Mauro Carvalho Chehab
The patch number 8005 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
Fix OOPS if frontend is null


Thanks to timf [EMAIL PROTECTED] and Mike Galbraith [EMAIL PROTECTED] to 
report
this issue.

Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 linux/drivers/media/video/saa7134/saa7134-dvb.c |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff -r afa24b594522 -r 24d053746e48 
linux/drivers/media/video/saa7134/saa7134-dvb.c
--- a/linux/drivers/media/video/saa7134/saa7134-dvb.c   Thu Jun 05 15:59:08 
2008 -0300
+++ b/linux/drivers/media/video/saa7134/saa7134-dvb.c   Sat Jun 07 12:54:10 
2008 -0300
@@ -1345,7 +1345,8 @@ static int dvb_init(struct saa7134_dev *
return ret;
 
 dettach_frontend:
-   dvb_frontend_detach(dev-dvb.frontend);
+   if (dev-dvb.frontend)
+   dvb_frontend_detach(dev-dvb.frontend);
dev-dvb.frontend = NULL;
 
return -1;


---

Patch is available at: 
http://linuxtv.org/hg/v4l-dvb/rev/24d053746e480bf2c44d117fa7b8330d63c382c4

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[linuxtv-commits] [hg:v4l-dvb] merge: http://linuxtv.org/hg/~anttip/v4l-dvb/

2008-06-10 Thread Patch from Mauro Carvalho Chehab
The patch number 8016 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
merge: http://linuxtv.org/hg/~anttip/v4l-dvb/




Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 linux/drivers/media/dvb/dvb-usb/gl861.c |   73 ++--
 linux/drivers/media/dvb/dvb-usb/gl861.h |2 
 2 files changed, 34 insertions(+), 41 deletions(-)

diff -r ca65777314d2 -r 2e4200f2c179 linux/drivers/media/dvb/dvb-usb/gl861.c
--- a/linux/drivers/media/dvb/dvb-usb/gl861.c   Mon Jun 09 11:59:05 2008 -0300
+++ b/linux/drivers/media/dvb/dvb-usb/gl861.c   Tue Jun 10 09:25:04 2008 -0300
@@ -1,8 +1,8 @@
 /* DVB USB compliant linux driver for GL861 USB2.0 devices.
  *
  * 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, version 2.
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation, version 2.
  *
  * see Documentation/dvb/README.dvb-usb for more information
  */
@@ -13,9 +13,9 @@
 
 /* debug */
 static int dvb_usb_gl861_debug;
-module_param_named(debug,dvb_usb_gl861_debug, int, 0644);
-MODULE_PARM_DESC(debug, set debugging level (1=rc (or-able)). 
DVB_USB_DEBUG_STATUS);
-
+module_param_named(debug, dvb_usb_gl861_debug, int, 0644);
+MODULE_PARM_DESC(debug, set debugging level (1=rc (or-able)).
+   DVB_USB_DEBUG_STATUS);
 DVB_DEFINE_MOD_OPT_ADAPTER_NR(adapter_nr);
 
 static int gl861_i2c_msg(struct dvb_usb_device *d, u8 addr,
@@ -47,6 +47,8 @@ static int gl861_i2c_msg(struct dvb_usb_
return -EINVAL;
}
 
+   msleep(1); /* avoid I2C errors */
+
return usb_control_msg(d-udev, usb_rcvctrlpipe(d-udev, 0), req, type,
   value, index, rbuf, rlen, 2000);
 }
@@ -68,7 +70,7 @@ static int gl861_i2c_xfer(struct i2c_ada
/* write/read request */
if (i+1  num  (msg[i+1].flags  I2C_M_RD)) {
if (gl861_i2c_msg(d, msg[i].addr, msg[i].buf,
- msg[i].len, msg[i+1].buf, 
msg[i+1].len)  0)
+   msg[i].len, msg[i+1].buf, msg[i+1].len)  0)
break;
i++;
} else
@@ -92,16 +94,6 @@ static struct i2c_algorithm gl861_i2c_al
 };
 
 /* Callbacks for DVB USB */
-static int gl861_identify_state(struct usb_device *udev,
-   struct dvb_usb_device_properties *props,
-   struct dvb_usb_device_description **desc,
-   int *cold)
-{
-   *cold = 0;
-
-   return 0;
-}
-
 static struct zl10353_config gl861_zl10353_config = {
.demod_address = 0x0f,
.no_tuner = 1,
@@ -110,12 +102,13 @@ static struct zl10353_config gl861_zl103
 
 static int gl861_frontend_attach(struct dvb_usb_adapter *adap)
 {
-   if ((adap-fe = dvb_attach(zl10353_attach, gl861_zl10353_config,
-  adap-dev-i2c_adap)) != NULL) {
-   return 0;
-   }
-
-   return -EIO;
+
+   adap-fe = dvb_attach(zl10353_attach, gl861_zl10353_config,
+   adap-dev-i2c_adap);
+   if (adap-fe == NULL)
+   return -EIO;
+
+   return 0;
 }
 
 static struct qt1010_config gl861_qt1010_config = {
@@ -164,7 +157,7 @@ static struct usb_device_id gl861_table 
{ USB_DEVICE(USB_VID_ALINK, USB_VID_ALINK_DTU) },
{ } /* Terminating entry */
 };
-MODULE_DEVICE_TABLE (usb, gl861_table);
+MODULE_DEVICE_TABLE(usb, gl861_table);
 
 static struct dvb_usb_device_properties gl861_properties = {
.caps = DVB_USB_IS_AN_I2C_ADAPTER,
@@ -172,7 +165,6 @@ static struct dvb_usb_device_properties 
 
.size_of_priv = 0,
 
-   .identify_state   = gl861_identify_state,
.num_adapters = 1,
.adapter = {{
 
@@ -189,24 +181,26 @@ static struct dvb_usb_device_properties 
}
}
},
-   }},
+   } },
.i2c_algo = gl861_i2c_algo,
 
.num_device_descs = 2,
.devices = {
-   {   MSI Mega Sky 55801 DVB-T USB2.0,
-   { gl861_table[0], NULL },
-   { NULL },
-   },
-   {   A-LINK DTU DVB-T USB2.0,
-   { gl861_table[1], NULL },
-   { NULL },
+   {
+   .name = MSI Mega Sky 55801 

[linuxtv-commits] [hg:v4l-dvb] Fix compilation with kernel 2.6.25

2008-06-10 Thread Patch from Mauro Carvalho Chehab
The patch number 8025 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
Fix compilation with kernel 2.6.25




Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 linux/drivers/media/video/mt9m001.c |4 
 v4l/compat.h|6 +-
 2 files changed, 9 insertions(+), 1 deletion(-)

diff -r 58b95134acb8 -r 04ddbe145932 linux/drivers/media/video/mt9m001.c
--- a/linux/drivers/media/video/mt9m001.c   Tue Jun 10 12:21:49 2008 -0300
+++ b/linux/drivers/media/video/mt9m001.c   Tue Jun 10 15:27:29 2008 -0300
@@ -694,11 +694,13 @@ static int mt9m001_remove(struct i2c_cli
return 0;
 }
 
+#if LINUX_VERSION_CODE = KERNEL_VERSION(2, 6, 26)
 static const struct i2c_device_id mt9m001_id[] = {
{ mt9m001, 0 },
{ }
 };
 MODULE_DEVICE_TABLE(i2c, mt9m001_id);
+#endif
 
 static struct i2c_driver mt9m001_i2c_driver = {
.driver = {
@@ -706,7 +708,9 @@ static struct i2c_driver mt9m001_i2c_dri
},
.probe  = mt9m001_probe,
.remove = mt9m001_remove,
+#if LINUX_VERSION_CODE = KERNEL_VERSION(2, 6, 26)
.id_table   = mt9m001_id,
+#endif
 };
 
 static int __init mt9m001_mod_init(void)
diff -r 58b95134acb8 -r 04ddbe145932 v4l/compat.h
--- a/v4l/compat.h  Tue Jun 10 12:21:49 2008 -0300
+++ b/v4l/compat.h  Tue Jun 10 15:27:29 2008 -0300
@@ -557,7 +557,11 @@ static inline struct proc_dir_entry *pro
}
return e;
 }
-
+#endif
+#endif
+
+#if LINUX_VERSION_CODE  KERNEL_VERSION(2, 6, 26)
+#ifdef CONFIG_PROC_FS
 static inline struct proc_dir_entry *proc_create_data(const char *a,
mode_t b, struct proc_dir_entry *c, const struct file_operations *d,
void *f)


---

Patch is available at: 
http://linuxtv.org/hg/v4l-dvb/rev/04ddbe145932c88e64fd1a5991aaea56090d8d8a

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[linuxtv-commits] [hg:v4l-dvb] Avoids an OOPS if dev struct can't be successfully recovered

2008-06-14 Thread Patch from Mauro Carvalho Chehab
The patch number 8026 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
Avoids an OOPS if dev struct can't be successfully recovered


On some alsa versions, it seems that snd_pcm_substream_chip(substream)
is returning a NULL pointer. This causes an OOPS, as reported by:

https://bugs.launchpad.net/ubuntu/+source/linux-ubuntu-modules-2.6.24/+bug/212271
https://bugs.launchpad.net/ubuntu/+source/alsa-driver/+bug/212960

This patch avoids the OOPS by not letting and open() succeed.

Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 linux/drivers/media/video/cx88/cx88-alsa.c   |6 ++
 linux/drivers/media/video/em28xx/em28xx-audio.c  |6 ++
 linux/drivers/media/video/saa7134/saa7134-alsa.c |8 +++-
 3 files changed, 19 insertions(+), 1 deletion(-)

diff -r 04ddbe145932 -r b978c6ede10a linux/drivers/media/video/cx88/cx88-alsa.c
--- a/linux/drivers/media/video/cx88/cx88-alsa.cTue Jun 10 15:27:29 
2008 -0300
+++ b/linux/drivers/media/video/cx88/cx88-alsa.cSat Jun 14 06:41:18 
2008 -0300
@@ -385,6 +385,12 @@ static int snd_cx88_pcm_open(struct snd_
struct snd_pcm_runtime *runtime = substream-runtime;
int err;
 
+   if (!chip) {
+   printk(KERN_ERR BUG: cx88 can't find device struct.
+Can't proceed with open\n);
+   return -ENODEV;
+   }
+
err = snd_pcm_hw_constraint_pow2(runtime, 0, 
SNDRV_PCM_HW_PARAM_PERIODS);
if (err  0)
goto _error;
diff -r 04ddbe145932 -r b978c6ede10a 
linux/drivers/media/video/em28xx/em28xx-audio.c
--- a/linux/drivers/media/video/em28xx/em28xx-audio.c   Tue Jun 10 15:27:29 
2008 -0300
+++ b/linux/drivers/media/video/em28xx/em28xx-audio.c   Sat Jun 14 06:41:18 
2008 -0300
@@ -299,6 +299,12 @@ static int snd_em28xx_capture_open(struc
 
dprintk(opening device and trying to acquire exclusive lock\n);
 
+   if (!dev) {
+   printk(KERN_ERR BUG: em28xx can't find device struct.
+Can't proceed with open\n);
+   return -ENODEV;
+   }
+
/* Sets volume, mute, etc */
 
dev-mute = 0;
diff -r 04ddbe145932 -r b978c6ede10a 
linux/drivers/media/video/saa7134/saa7134-alsa.c
--- a/linux/drivers/media/video/saa7134/saa7134-alsa.c  Tue Jun 10 15:27:29 
2008 -0300
+++ b/linux/drivers/media/video/saa7134/saa7134-alsa.c  Sat Jun 14 06:41:18 
2008 -0300
@@ -628,9 +628,15 @@ static int snd_card_saa7134_capture_open
struct snd_pcm_runtime *runtime = substream-runtime;
snd_card_saa7134_pcm_t *pcm;
snd_card_saa7134_t *saa7134 = snd_pcm_substream_chip(substream);
-   struct saa7134_dev *dev = saa7134-dev;
+   struct saa7134_dev *dev;
int amux, err;
 
+   if (!saa7134) {
+   printk(KERN_ERR BUG: saa7134 can't find device struct.
+Can't proceed with open\n);
+   return -ENODEV;
+   }
+   dev = saa7134-dev;
mutex_lock(dev-dmasound.lock);
 
dev-dmasound.read_count  = 0;


---

Patch is available at: 
http://linuxtv.org/hg/v4l-dvb/rev/b978c6ede10a831a4cc5ebdce35a75b9d1f916e9

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[linuxtv-commits] [hg:v4l-dvb] Improve error message at tda1004x_attach

2008-06-14 Thread Patch from Mauro Carvalho Chehab
The patch number 8029 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
Improve error message at tda1004x_attach



When an error occurs at firmware loading, sometimes, tda1004x stops answering.
Instead of reporting such error, attach code were assuming that the device were
answering an invalid ID (0xff). This can be seen when enabling debug options:

tda1004x: tda1004x_read_byte: reg=0x0
tda1004x: tda1004x_read_byte: error reg=0x0, ret=-5

Now, instead of reporting an invalid ID, it will report the correct error:

tda10046: chip is not answering. Giving up.
saa7133[0]/dvb: failed to attach tda10046
saa7133[0]/dvb: frontend initialization failed

A possible improvement would be trying to reset the device.

Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 linux/drivers/media/dvb/frontends/tda1004x.c |   15 +--
 1 file changed, 13 insertions(+), 2 deletions(-)

diff -r ff08424ce120 -r 000ffc33cb89 
linux/drivers/media/dvb/frontends/tda1004x.c
--- a/linux/drivers/media/dvb/frontends/tda1004x.c  Sat Jun 14 07:44:04 
2008 -0300
+++ b/linux/drivers/media/dvb/frontends/tda1004x.c  Sat Jun 14 08:27:34 
2008 -0300
@@ -1248,7 +1248,7 @@ struct dvb_frontend* tda10045_attach(con
 struct i2c_adapter* i2c)
 {
struct tda1004x_state *state;
-   u8 id;
+   int id;
 
/* allocate memory for the internal state */
state = kmalloc(sizeof(struct tda1004x_state), GFP_KERNEL);
@@ -1264,6 +1264,12 @@ struct dvb_frontend* tda10045_attach(con
 
/* check if the demod is there */
id = tda1004x_read_byte(state, TDA1004X_CHIPID);
+   if (id  0) {
+   printk(KERN_ERR tda10045: chip is not answering. Giving 
up.\n);
+   kfree(state);
+   return NULL;
+   }
+
if (id != 0x25) {
printk(KERN_ERR Invalid tda1004x ID = 0x%02x. Can't 
proceed\n, id);
kfree(state);
@@ -1312,7 +1318,7 @@ struct dvb_frontend* tda10046_attach(con
 struct i2c_adapter* i2c)
 {
struct tda1004x_state *state;
-   u8 id;
+   int id;
 
/* allocate memory for the internal state */
state = kmalloc(sizeof(struct tda1004x_state), GFP_KERNEL);
@@ -1328,6 +1334,11 @@ struct dvb_frontend* tda10046_attach(con
 
/* check if the demod is there */
id = tda1004x_read_byte(state, TDA1004X_CHIPID);
+   if (id  0) {
+   printk(KERN_ERR tda10046: chip is not answering. Giving 
up.\n);
+   kfree(state);
+   return NULL;
+   }
if (id != 0x46) {
printk(KERN_ERR Invalid tda1004x ID = 0x%02x. Can't 
proceed\n, id);
kfree(state);


---

Patch is available at: 
http://linuxtv.org/hg/v4l-dvb/rev/000ffc33cb8903713d46d53bacf9e8dfb5833415

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[linuxtv-commits] [hg:v4l-dvb] merge: http://linuxtv.org/hg/~anttip/anysee/

2008-06-15 Thread Patch from Mauro Carvalho Chehab
The patch number 8033 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
merge: http://linuxtv.org/hg/~anttip/anysee/




Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 linux/drivers/media/dvb/dvb-usb/Kconfig  |1 
 linux/drivers/media/dvb/dvb-usb/anysee.c |   22 ---
 linux/drivers/media/dvb/dvb-usb/anysee.h |4 +--
 linux/drivers/media/dvb/frontends/tda10023.c |6 -
 linux/drivers/media/dvb/frontends/tda1002x.h |   10 
 5 files changed, 28 insertions(+), 15 deletions(-)

diff -r 000ffc33cb89 -r 453706e21362 linux/drivers/media/dvb/dvb-usb/Kconfig
--- a/linux/drivers/media/dvb/dvb-usb/Kconfig   Sat Jun 14 08:27:34 2008 -0300
+++ b/linux/drivers/media/dvb/dvb-usb/Kconfig   Sun Jun 15 08:25:02 2008 -0300
@@ -244,6 +244,7 @@ config DVB_USB_ANYSEE
 config DVB_USB_ANYSEE
tristate Anysee DVB-T/C USB2.0 support
depends on DVB_USB
+   select DVB_PLL if !DVB_FE_CUSTOMISE
select DVB_MT352 if !DVB_FE_CUSTOMISE
select DVB_ZL10353 if !DVB_FE_CUSTOMISE
select DVB_TDA10023 if !DVB_FE_CUSTOMISE
diff -r 000ffc33cb89 -r 453706e21362 linux/drivers/media/dvb/dvb-usb/anysee.c
--- a/linux/drivers/media/dvb/dvb-usb/anysee.c  Sat Jun 14 08:27:34 2008 -0300
+++ b/linux/drivers/media/dvb/dvb-usb/anysee.c  Sun Jun 15 08:25:02 2008 -0300
@@ -23,8 +23,8 @@
  * Card reader in Anysee is nothing more than ISO 7816 card reader.
  * There is no hardware CAM in any Anysee device sold.
  * In my understanding it should be implemented by making own module
- * for ISO 7816 card reader, like dvb_ca_en50221 is implented. This
- * module registers serial interface that can be used to comminicate
+ * for ISO 7816 card reader, like dvb_ca_en50221 is implemented. This
+ * module registers serial interface that can be used to communicate
  * with any ISO 7816 smart card.
  *
  * Any help according to implement serial smart card reader support
@@ -227,7 +227,8 @@ static struct tda10023_config anysee_tda
.pll_m  = 11,
.pll_p  = 3,
.pll_n  = 1,
-   .deltaf = 0xfed6,
+   .output_mode = TDA10023_OUTPUT_MODE_PARALLEL_C,
+   .deltaf = 0xfeeb,
 };
 
 static struct mt352_config anysee_mt352_config = {
@@ -272,8 +273,8 @@ static int anysee_frontend_attach(struct
   1. E30MT352 02  0.2.1
   2. E30ZL10353   02  0.2.1
   3. E30 Plus   ZL10353   06  0.1.0
-  4. E30C Plus  TDA10023  0a  0.1.0
- E30C Plus  TDA10023  0f  0.1.2 (not working)
+  4. E30C Plus  TDA10023  0a  0.1.0rev 0.2
+  4. E30C Plus  TDA10023  0f  0.1.2rev 0.4
*/
 
/* Zarlink MT352 DVB-T demod inside of Samsung DNOS404ZH102A NIM */
@@ -305,13 +306,10 @@ static int anysee_frontend_attach(struct
return 0;
}
 
-   /* known not working (E30C Plus v0.1.2) */
-   if (hw_info[0] == 0x0f) {
-   info(this version of Anysee is not supported yet);
-   /* return IO port D to init value for safe */
-   ret = anysee_write_reg(adap-dev, 0xb0, io_d);
-   return -ENODEV;
-   }
+   /* IO port E - E30C rev 0.4 board requires this */
+   ret = anysee_write_reg(adap-dev, 0xb1, 0xa7);
+   if (ret)
+   return ret;
 
/* Philips TDA10023 DVB-C demod */
adap-fe = dvb_attach(tda10023_attach, anysee_tda10023_config,
diff -r 000ffc33cb89 -r 453706e21362 linux/drivers/media/dvb/dvb-usb/anysee.h
--- a/linux/drivers/media/dvb/dvb-usb/anysee.h  Sat Jun 14 08:27:34 2008 -0300
+++ b/linux/drivers/media/dvb/dvb-usb/anysee.h  Sun Jun 15 08:25:02 2008 -0300
@@ -23,8 +23,8 @@
  * Card reader in Anysee is nothing more than ISO 7816 card reader.
  * There is no hardware CAM in any Anysee device sold.
  * In my understanding it should be implemented by making own module
- * for ISO 7816 card reader, like dvb_ca_en50221 is implented. This
- * module registers serial interface that can be used to comminicate
+ * for ISO 7816 card reader, like dvb_ca_en50221 is implemented. This
+ * module registers serial interface that can be used to communicate
  * with any ISO 7816 smart card.
  *
  * Any help according to implement serial smart card reader support
diff -r 000ffc33cb89 -r 453706e21362 
linux/drivers/media/dvb/frontends/tda10023.c
--- a/linux/drivers/media/dvb/frontends/tda10023.c  Sat Jun 14 08:27:34 
2008 -0300
+++ b/linux/drivers/media/dvb/frontends/tda10023.c  Sun Jun 15 08:25:02 
2008 -0300
@@ -269,7 +269,8 @@ static int tda10023_init (struct dvb_fro
 /* 084 */ 

[linuxtv-commits] [hg:v4l-dvb] ttpci/Kconfig: Technotrend budget C-1501 needs tda10023

2008-06-17 Thread Patch from Mauro Carvalho Chehab
The patch number 8051 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
ttpci/Kconfig: Technotrend budget C-1501 needs tda10023


Auto-selects tda10023, for budget-ci, if !DVB_FE_CUSTOMISE. This is needed for
Technotrend budget C-1501 dvb board.

Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 linux/drivers/media/dvb/ttpci/Kconfig |1 +
 1 file changed, 1 insertion(+)

diff -r c7caf42ae671 -r 90a2e0b3b6f0 linux/drivers/media/dvb/ttpci/Kconfig
--- a/linux/drivers/media/dvb/ttpci/Kconfig Mon Jun 16 09:31:57 2008 -0300
+++ b/linux/drivers/media/dvb/ttpci/Kconfig Mon Jun 16 09:35:06 2008 -0300
@@ -106,6 +106,7 @@ config DVB_BUDGET_CI
select DVB_STV0299 if !DVB_FE_CUSTOMISE
select DVB_TDA1004X if !DVB_FE_CUSTOMISE
select DVB_LNBP21 if !DVB_FE_CUSTOMISE
+   select DVB_TDA10023 if !DVB_FE_CUSTOMISE
select VIDEO_IR
help
  Support for simple SAA7146 based DVB cards


---

Patch is available at: 
http://linuxtv.org/hg/v4l-dvb/rev/90a2e0b3b6f0fc5753105c67f23c6a5d1162cae5

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[linuxtv-commits] [hg:v4l-dvb] Add register get/set debug ioctls to saa7134

2008-06-17 Thread Patch from Mauro Carvalho Chehab
The patch number 8050 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
Add register get/set debug ioctls to saa7134


Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 linux/drivers/media/video/saa7134/saa7134-video.c |   30 ++
 1 file changed, 30 insertions(+)

diff -r dd848702aabe -r c7caf42ae671 
linux/drivers/media/video/saa7134/saa7134-video.c
--- a/linux/drivers/media/video/saa7134/saa7134-video.c Sun Jun 15 19:25:46 
2008 +0200
+++ b/linux/drivers/media/video/saa7134/saa7134-video.c Mon Jun 16 09:31:57 
2008 -0300
@@ -2214,6 +2214,32 @@ static int saa7134_g_parm(struct file *f
 {
return 0;
 }
+
+#ifdef CONFIG_VIDEO_ADV_DEBUG
+static int vidioc_g_register (struct file *file, void *priv,
+ struct v4l2_register *reg)
+{
+   struct saa7134_fh *fh = priv;
+   struct saa7134_dev *dev = fh-dev;
+
+   if (!v4l2_chip_match_host(reg-match_type, reg-match_chip))
+   return -EINVAL;
+   reg-val = saa_readb(reg-reg);
+   return 0;
+}
+
+static int vidioc_s_register (struct file *file, void *priv,
+   struct v4l2_register *reg)
+{
+   struct saa7134_fh *fh = priv;
+   struct saa7134_dev *dev = fh-dev;
+
+   if (!v4l2_chip_match_host(reg-match_type, reg-match_chip))
+   return -EINVAL;
+   saa_writeb(reg-reg0xff, reg-val);
+   return 0;
+}
+#endif
 
 static int radio_querycap(struct file *file, void *priv,
struct v4l2_capability *cap)
@@ -2402,6 +2428,10 @@ struct video_device saa7134_video_templa
.vidioc_g_parm  = saa7134_g_parm,
.vidioc_g_frequency = saa7134_g_frequency,
.vidioc_s_frequency = saa7134_s_frequency,
+#ifdef CONFIG_VIDEO_ADV_DEBUG
+   .vidioc_g_register  = vidioc_g_register,
+   .vidioc_s_register  = vidioc_s_register,
+#endif
.tvnorms= SAA7134_NORMS,
.current_norm   = V4L2_STD_PAL,
 };


---

Patch is available at: 
http://linuxtv.org/hg/v4l-dvb/rev/c7caf42ae671655eacdaf6f56fe2d1ed573d4021

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[linuxtv-commits] [hg:v4l-dvb] Add a tool to debug bttv registers

2008-06-17 Thread Patch from Mauro Carvalho Chehab
The patch number 8052 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
Add a tool to debug bttv registers




Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 .hgignore |4 
 v4l2-apps/util/Makefile   |   10 -
 v4l2-apps/util/bttv-dbg.c |  361 ++
 3 files changed, 372 insertions(+), 3 deletions(-)

diff -r 90a2e0b3b6f0 -r e13575ad52a0 .hgignore
--- a/.hgignore Mon Jun 16 09:35:06 2008 -0300
+++ b/.hgignore Mon Jun 16 10:01:11 2008 -0300
@@ -46,3 +46,7 @@ v4l2-apps/util/qv4l2/qv4l2$
 v4l2-apps/util/qv4l2/qv4l2$
 v4l2-apps/util/rds/rds-saa6588$
 v4l2-apps/util/v4l2-ctl$
+v4l2-apps/util/cx18-ctl$
+v4l2-apps/util/ivtv-ctl$
+v4l2-apps/util/bttv-dbg$
+
diff -r 90a2e0b3b6f0 -r e13575ad52a0 v4l2-apps/util/Makefile
--- a/v4l2-apps/util/Makefile   Mon Jun 16 09:35:06 2008 -0300
+++ b/v4l2-apps/util/Makefile   Mon Jun 16 10:01:11 2008 -0300
@@ -1,9 +1,13 @@
 # Makefile for linuxtv.org v4l2-apps/util
+
+ifeq ($(KERNEL_DIR),)
+   KERNEL_DIR = /usr
+endif
 
 CPPFLAGS += -I../../linux/include -D_GNU_SOURCE
 LDFLAGS += -lm
 
-binaries = v4l2-ctl v4l2-dbg ivtv-ctl cx18-ctl
+binaries = v4l2-ctl v4l2-dbg ivtv-ctl cx18-ctl bttv-dbg
 
 ifeq ($(prefix),)
 prefix = /usr
@@ -32,12 +36,12 @@ install:
 
 include ../Make.rules
 
-parse.h: /usr/include/linux/input.h
+parse.h: $(KERNEL_DIR)/include/linux/input.h
@echo generating parse.h
@echo -en struct parse_key {\n\tchar *name;\n\tunsigned int value;\n} 
 parse.h
@echo -en keynames[] = {\n parse.h
 
-   @more /usr/include/linux/input.h |perl -n \
+   @more $(KERNEL_DIR)/linux/input.h |perl -n \
-e 'if (m/^\#define\s+(KEY_[^\s]+)\s+(0x[\d\w]+|[\d]+)/) ' \
-e '{ printf \t{\%s\, %s},\n,$$1,$$2; }' \
-e 'if (m/^\#define\s+(BTN_[^\s]+)\s+(0x[\d\w]+|[\d]+)/) ' \
diff -r 90a2e0b3b6f0 -r e13575ad52a0 v4l2-apps/util/bttv-dbg.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +
+++ b/v4l2-apps/util/bttv-dbg.c Mon Jun 16 10:01:11 2008 -0300
@@ -0,0 +1,361 @@
+/*
+Copyright (C) 2008 Mauro Carvalho Chehab [EMAIL PROTECTED]
+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 version 2 of the License.
+
+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 unistd.h
+#include stdlib.h
+#include stdio.h
+#include string.h
+#include getopt.h
+#include fcntl.h
+#include errno.h
+#include sys/ioctl.h
+#include sys/time.h
+#include linux/types.h
+#include linux/videodev2.h
+
+struct bt8xx_regs {
+   unsigned int reg;
+   char *name;
+   int size;
+};
+
+static struct bt8xx_regs bt8xx_regs_other[] = {
+   {0x000, BT848_DSTATUS, 1},
+   {0x054, BT848_TEST, 1},
+   {0x060, BT848_ADELAY, 1},
+   {0x064, BT848_BDELAY, 1},
+   {0x07C, BT848_SRESET, 1},
+   {0x100, BT848_INT_STAT, 1},
+   {0x110, BT848_I2C, 1},
+   {0x11C, BT848_GPIO_REG_INP, 1},
+   {0x120, BT848_RISC_COUNT, 1},
+
+   /* This is also defined at bt8xx_regs with other name */
+   {0x0fc, BT848_VBI_PACK_DEL_VBI_HDELAY, 1},
+};
+
+static struct bt8xx_regs bt8xx_regs[] = {
+   {0x004, BT848_IFORM, 1},
+   {0x008, BT848_TDEC, 1},
+   {0x00C, BT848_E_CROP, 1},
+   {0x08C, BT848_O_CROP, 1},
+   {0x010, BT848_E_VDELAY_LO, 1},
+   {0x090, BT848_O_VDELAY_LO, 1},
+   {0x014, BT848_E_VACTIVE_LO, 1},
+   {0x094, BT848_O_VACTIVE_LO, 1},
+   {0x018, BT848_E_HDELAY_LO, 1},
+   {0x098, BT848_O_HDELAY_LO, 1},
+   {0x01C, BT848_E_HACTIVE_LO, 1},
+   {0x09C, BT848_O_HACTIVE_LO, 1},
+   {0x020, BT848_E_HSCALE_HI, 1},
+   {0x0A0, BT848_O_HSCALE_HI, 1},
+   {0x024, BT848_E_HSCALE_LO, 1},
+   {0x0A4, BT848_O_HSCALE_LO, 1},
+   {0x028, BT848_BRIGHT, 1},
+   {0x02C, BT848_E_CONTROL, 1},
+   {0x0AC, BT848_O_CONTROL, 1},
+   {0x030, BT848_CONTRAST_LO, 1},
+   {0x034, BT848_SAT_U_LO, 1},
+   {0x038, BT848_SAT_V_LO, 1},
+   {0x03C, BT848_HUE, 1},
+   {0x040, BT848_E_SCLOOP, 1},
+   {0x0C0, BT848_O_SCLOOP, 1},
+   {0x048, 

[linuxtv-commits] [hg:v4l-dvb] Prepare v4l-board-dbg to other chip additions

2008-06-17 Thread Patch from Mauro Carvalho Chehab
The patch number 8054 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
Prepare v4l-board-dbg to other chip additions




Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 v4l2-apps/util/bttv-dbg.h  |  131 -
 v4l2-apps/util/v4l-board-dbg.c |   96 +++-
 2 files changed, 127 insertions(+), 100 deletions(-)

diff -r 91630c6b45e9 -r b8004e41dff5 v4l2-apps/util/bttv-dbg.h
--- a/v4l2-apps/util/bttv-dbg.h Mon Jun 16 10:13:24 2008 -0300
+++ b/v4l2-apps/util/bttv-dbg.h Mon Jun 16 16:35:52 2008 -0300
@@ -18,77 +18,80 @@
 
 #define BTTV_IDENT bttv
 
+/* Register name prefix */
+#define BTTV_PREFIX BT848_
+
 static struct board_regs bt8xx_regs_other[] = {
-   {0x000, BT848_DSTATUS, 1},
-   {0x054, BT848_TEST, 1},
-   {0x060, BT848_ADELAY, 1},
-   {0x064, BT848_BDELAY, 1},
-   {0x07C, BT848_SRESET, 1},
-   {0x100, BT848_INT_STAT, 1},
-   {0x110, BT848_I2C, 1},
-   {0x11C, BT848_GPIO_REG_INP, 1},
-   {0x120, BT848_RISC_COUNT, 1},
+   {0x000, BTTV_PREFIX DSTATUS, 1},
+   {0x054, BTTV_PREFIX TEST, 1},
+   {0x060, BTTV_PREFIX ADELAY, 1},
+   {0x064, BTTV_PREFIX BDELAY, 1},
+   {0x07C, BTTV_PREFIX SRESET, 1},
+   {0x100, BTTV_PREFIX INT_STAT, 1},
+   {0x110, BTTV_PREFIX I2C, 1},
+   {0x11C, BTTV_PREFIX GPIO_REG_INP, 1},
+   {0x120, BTTV_PREFIX RISC_COUNT, 1},
 
/* This is also defined at bt8xx_regs with other name */
-   {0x0fc, BT848_VBI_PACK_DEL_VBI_HDELAY, 1},
+   {0x0fc, BTTV_PREFIX VBI_PACK_DEL_VBI_HDELAY, 1},
 };
 
 static struct board_regs bt8xx_regs[] = {
-   {0x004, BT848_IFORM, 1},
-   {0x008, BT848_TDEC, 1},
-   {0x00C, BT848_E_CROP, 1},
-   {0x08C, BT848_O_CROP, 1},
-   {0x010, BT848_E_VDELAY_LO, 1},
-   {0x090, BT848_O_VDELAY_LO, 1},
-   {0x014, BT848_E_VACTIVE_LO, 1},
-   {0x094, BT848_O_VACTIVE_LO, 1},
-   {0x018, BT848_E_HDELAY_LO, 1},
-   {0x098, BT848_O_HDELAY_LO, 1},
-   {0x01C, BT848_E_HACTIVE_LO, 1},
-   {0x09C, BT848_O_HACTIVE_LO, 1},
-   {0x020, BT848_E_HSCALE_HI, 1},
-   {0x0A0, BT848_O_HSCALE_HI, 1},
-   {0x024, BT848_E_HSCALE_LO, 1},
-   {0x0A4, BT848_O_HSCALE_LO, 1},
-   {0x028, BT848_BRIGHT, 1},
-   {0x02C, BT848_E_CONTROL, 1},
-   {0x0AC, BT848_O_CONTROL, 1},
-   {0x030, BT848_CONTRAST_LO, 1},
-   {0x034, BT848_SAT_U_LO, 1},
-   {0x038, BT848_SAT_V_LO, 1},
-   {0x03C, BT848_HUE, 1},
-   {0x040, BT848_E_SCLOOP, 1},
-   {0x0C0, BT848_O_SCLOOP, 1},
-   {0x048, BT848_OFORM, 1},
-   {0x04C, BT848_E_VSCALE_HI, 1},
-   {0x0CC, BT848_O_VSCALE_HI, 1},
-   {0x050, BT848_E_VSCALE_LO, 1},
-   {0x0D0, BT848_O_VSCALE_LO, 1},
-   {0x068, BT848_ADC, 1},
-   {0x044, BT848_WC_UP, 1},
-   {0x078, BT848_WC_DOWN, 1},
-   {0x06C, BT848_E_VTC, 1},
-   {0x080, BT848_TGCTRL, 1},
-   {0x0EC, BT848_O_VTC, 1},
-   {0x0D4, BT848_COLOR_FMT, 1},
-   {0x0B0, BT848_VTOTAL_LO, 1},
-   {0x0B4, BT848_VTOTAL_HI, 1},
-   {0x0D8, BT848_COLOR_CTL, 1},
-   {0x0DC, BT848_CAP_CTL, 1},
-   {0x0E0, BT848_VBI_PACK_SIZE, 1},
-   {0x0E4, BT848_VBI_PACK_DEL, 1},
-   {0x0E8, BT848_FCNTR, 1},
+   {0x004, BTTV_PREFIX IFORM, 1},
+   {0x008, BTTV_PREFIX TDEC, 1},
+   {0x00C, BTTV_PREFIX E_CROP, 1},
+   {0x08C, BTTV_PREFIX O_CROP, 1},
+   {0x010, BTTV_PREFIX E_VDELAY_LO, 1},
+   {0x090, BTTV_PREFIX O_VDELAY_LO, 1},
+   {0x014, BTTV_PREFIX E_VACTIVE_LO, 1},
+   {0x094, BTTV_PREFIX O_VACTIVE_LO, 1},
+   {0x018, BTTV_PREFIX E_HDELAY_LO, 1},
+   {0x098, BTTV_PREFIX O_HDELAY_LO, 1},
+   {0x01C, BTTV_PREFIX E_HACTIVE_LO, 1},
+   {0x09C, BTTV_PREFIX O_HACTIVE_LO, 1},
+   {0x020, BTTV_PREFIX E_HSCALE_HI, 1},
+   {0x0A0, BTTV_PREFIX O_HSCALE_HI, 1},
+   {0x024, BTTV_PREFIX E_HSCALE_LO, 1},
+   {0x0A4, BTTV_PREFIX O_HSCALE_LO, 1},
+   {0x028, BTTV_PREFIX BRIGHT, 1},
+   {0x02C, BTTV_PREFIX E_CONTROL, 1},
+   {0x0AC, BTTV_PREFIX O_CONTROL, 1},
+   {0x030, BTTV_PREFIX CONTRAST_LO, 1},
+   {0x034, BTTV_PREFIX SAT_U_LO, 1},
+   {0x038, BTTV_PREFIX SAT_V_LO, 1},
+   {0x03C, BTTV_PREFIX HUE, 1},
+   {0x040, BTTV_PREFIX E_SCLOOP, 1},
+   {0x0C0, BTTV_PREFIX O_SCLOOP, 1},
+   {0x048, BTTV_PREFIX OFORM, 1},
+   {0x04C, BTTV_PREFIX E_VSCALE_HI, 1},
+   {0x0CC, BTTV_PREFIX O_VSCALE_HI, 1},
+   {0x050, BTTV_PREFIX E_VSCALE_LO, 1},
+   {0x0D0, BTTV_PREFIX O_VSCALE_LO, 1},
+   {0x068, BTTV_PREFIX ADC, 1},
+   {0x044, 

[linuxtv-commits] [hg:v4l-dvb] rename bttv-dbg to v4l-board-dbg in order to make it more generic

2008-06-17 Thread Patch from Mauro Carvalho Chehab
The patch number 8053 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
rename bttv-dbg to v4l-board-dbg in order to make it more generic




Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 .hgignore  |3 
 v4l2-apps/util/Makefile|2 
 v4l2-apps/util/bttv-dbg.c  |  361 -
 v4l2-apps/util/bttv-dbg.h  |   94 
 v4l2-apps/util/v4l-board-dbg.c |  281 +
 v4l2-apps/util/v4l-board-dbg.h |   21 +
 6 files changed, 398 insertions(+), 364 deletions(-)

diff -r e13575ad52a0 -r 91630c6b45e9 .hgignore
--- a/.hgignore Mon Jun 16 10:01:11 2008 -0300
+++ b/.hgignore Mon Jun 16 10:13:24 2008 -0300
@@ -48,5 +48,4 @@ v4l2-apps/util/v4l2-ctl$
 v4l2-apps/util/v4l2-ctl$
 v4l2-apps/util/cx18-ctl$
 v4l2-apps/util/ivtv-ctl$
-v4l2-apps/util/bttv-dbg$
-
+v4l2-apps/util/v4l-board-dbg$
diff -r e13575ad52a0 -r 91630c6b45e9 v4l2-apps/util/Makefile
--- a/v4l2-apps/util/Makefile   Mon Jun 16 10:01:11 2008 -0300
+++ b/v4l2-apps/util/Makefile   Mon Jun 16 10:13:24 2008 -0300
@@ -7,7 +7,7 @@ CPPFLAGS += -I../../linux/include -D_GNU
 CPPFLAGS += -I../../linux/include -D_GNU_SOURCE
 LDFLAGS += -lm
 
-binaries = v4l2-ctl v4l2-dbg ivtv-ctl cx18-ctl bttv-dbg
+binaries = v4l2-ctl v4l2-dbg ivtv-ctl cx18-ctl v4l-board-dbg
 
 ifeq ($(prefix),)
 prefix = /usr
diff -r e13575ad52a0 -r 91630c6b45e9 v4l2-apps/util/bttv-dbg.c
--- a/v4l2-apps/util/bttv-dbg.c Mon Jun 16 10:01:11 2008 -0300
+++ /dev/null   Thu Jan 01 00:00:00 1970 +
@@ -1,361 +0,0 @@
-/*
-Copyright (C) 2008 Mauro Carvalho Chehab [EMAIL PROTECTED]
-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 version 2 of the License.
-
-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 unistd.h
-#include stdlib.h
-#include stdio.h
-#include string.h
-#include getopt.h
-#include fcntl.h
-#include errno.h
-#include sys/ioctl.h
-#include sys/time.h
-#include linux/types.h
-#include linux/videodev2.h
-
-struct bt8xx_regs {
-   unsigned int reg;
-   char *name;
-   int size;
-};
-
-static struct bt8xx_regs bt8xx_regs_other[] = {
-   {0x000, BT848_DSTATUS, 1},
-   {0x054, BT848_TEST, 1},
-   {0x060, BT848_ADELAY, 1},
-   {0x064, BT848_BDELAY, 1},
-   {0x07C, BT848_SRESET, 1},
-   {0x100, BT848_INT_STAT, 1},
-   {0x110, BT848_I2C, 1},
-   {0x11C, BT848_GPIO_REG_INP, 1},
-   {0x120, BT848_RISC_COUNT, 1},
-
-   /* This is also defined at bt8xx_regs with other name */
-   {0x0fc, BT848_VBI_PACK_DEL_VBI_HDELAY, 1},
-};
-
-static struct bt8xx_regs bt8xx_regs[] = {
-   {0x004, BT848_IFORM, 1},
-   {0x008, BT848_TDEC, 1},
-   {0x00C, BT848_E_CROP, 1},
-   {0x08C, BT848_O_CROP, 1},
-   {0x010, BT848_E_VDELAY_LO, 1},
-   {0x090, BT848_O_VDELAY_LO, 1},
-   {0x014, BT848_E_VACTIVE_LO, 1},
-   {0x094, BT848_O_VACTIVE_LO, 1},
-   {0x018, BT848_E_HDELAY_LO, 1},
-   {0x098, BT848_O_HDELAY_LO, 1},
-   {0x01C, BT848_E_HACTIVE_LO, 1},
-   {0x09C, BT848_O_HACTIVE_LO, 1},
-   {0x020, BT848_E_HSCALE_HI, 1},
-   {0x0A0, BT848_O_HSCALE_HI, 1},
-   {0x024, BT848_E_HSCALE_LO, 1},
-   {0x0A4, BT848_O_HSCALE_LO, 1},
-   {0x028, BT848_BRIGHT, 1},
-   {0x02C, BT848_E_CONTROL, 1},
-   {0x0AC, BT848_O_CONTROL, 1},
-   {0x030, BT848_CONTRAST_LO, 1},
-   {0x034, BT848_SAT_U_LO, 1},
-   {0x038, BT848_SAT_V_LO, 1},
-   {0x03C, BT848_HUE, 1},
-   {0x040, BT848_E_SCLOOP, 1},
-   {0x0C0, BT848_O_SCLOOP, 1},
-   {0x048, BT848_OFORM, 1},
-   {0x04C, BT848_E_VSCALE_HI, 1},
-   {0x0CC, BT848_O_VSCALE_HI, 1},
-   {0x050, BT848_E_VSCALE_LO, 1},
-   {0x0D0, BT848_O_VSCALE_LO, 1},
-   {0x068, BT848_ADC, 1},
-   {0x044, BT848_WC_UP, 1},
-   {0x078, BT848_WC_DOWN, 1},
-   {0x06C, BT848_E_VTC, 1},
-   {0x080, BT848_TGCTRL, 1},
-   {0x0EC, BT848_O_VTC, 1},
-   {0x0D4, BT848_COLOR_FMT, 1},
-   {0x0B0, BT848_VTOTAL_LO, 1},
-   {0x0B4, BT848_VTOTAL_HI, 1},
-   

[linuxtv-commits] [hg:v4l-dvb] v4l-board-dbg: Add support for saa7134 registers

2008-06-17 Thread Patch from Mauro Carvalho Chehab
The patch number 8055 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
v4l-board-dbg: Add support for saa7134 registers


Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 v4l2-apps/util/Makefile|3 +++
 v4l2-apps/util/v4l-board-dbg.c |   31 ---
 v4l2-apps/util/v4l-board-dbg.h |3 +++
 3 files changed, 34 insertions(+), 3 deletions(-)

diff -r b8004e41dff5 -r a2cbb6ac15cd v4l2-apps/util/Makefile
--- a/v4l2-apps/util/Makefile   Mon Jun 16 16:35:52 2008 -0300
+++ b/v4l2-apps/util/Makefile   Mon Jun 16 17:41:25 2008 -0300
@@ -54,6 +54,7 @@ keytables:
./gen_keytables.pl ../../linux/drivers/media/common/ir-keymaps.c
 
 keytable: keytable.c parse.h keytables
+v4l-board-dbg: v4l-board-dbg.c bttv-dbg.h saa7134-dbg.h
 
 v4l2-driverids.cpp: ../../linux/include/linux/i2c-id.h
@echo struct driverid { const char *name; unsigned id; } driverids[] = 
{ $@
@@ -64,3 +65,5 @@ v4l2-chipids.cpp: ../../linux/include/me
@echo struct chipid { const char *name; unsigned id; } chipids[] = { 
$@
@grep V4L2_IDENT_ $^ | sed -e 
's/.*V4L2_IDENT_\([0-9A-Z_]*\)[^=]*=[^0-9]*\([0-9]*\).*/{ \1, \2 },/' | tr 
A-Z a-z $@
@echo { 0, 0 }}; $@
+
+
diff -r b8004e41dff5 -r a2cbb6ac15cd v4l2-apps/util/v4l-board-dbg.c
--- a/v4l2-apps/util/v4l-board-dbg.cMon Jun 16 16:35:52 2008 -0300
+++ b/v4l2-apps/util/v4l-board-dbg.cMon Jun 16 17:41:25 2008 -0300
@@ -27,11 +27,12 @@
 #include linux/videodev2.h
 
 #include bttv-dbg.h
+#include saa7134-dbg.h
 
 #define ARRAY_SIZE(arr) ((int)(sizeof(arr) / sizeof((arr)[0])))
 
 struct board_list {
-   char *queryname;
+   char *name;
int prefix; /* Register prefix size */
struct board_regs *regs;
int regs_size;
@@ -41,12 +42,20 @@ struct board_list {
 
 struct board_list boards[] = {
[0] = { /* From bttv-dbg.h */
-   .queryname = BTTV_IDENT,
+   .name  = BTTV_IDENT,
.prefix= sizeof (BTTV_PREFIX),
.regs  = bt8xx_regs,
.regs_size = ARRAY_SIZE(bt8xx_regs),
.alt_regs  = bt8xx_regs_other,
.alt_regs_size = ARRAY_SIZE(bt8xx_regs_other),
+   },
+   [1] = { /* From saa7134-dbg.h */
+   .name  = SAA7134_IDENT,
+   .prefix= sizeof (SAA7134_PREFIX),
+   .regs  = saa7134_regs,
+   .regs_size = ARRAY_SIZE(saa7134_regs),
+   .alt_regs  = NULL,
+   .alt_regs_size = 0,
},
 };
 
@@ -106,6 +115,7 @@ int main(int argc, char **argv)
int i;
int fd = -1;
struct v4l2_register reg;
+   struct v4l2_capability cap;
struct board_list *curr_bd;
int board = 0;
struct option long_options[] = {
@@ -118,6 +128,7 @@ int main(int argc, char **argv)
};
 
/* FIXME: need to check for 'board' */
+board=1;
curr_bd = boards[board];
 
/* command args */
@@ -168,6 +179,20 @@ int main(int argc, char **argv)
}
free(device);
 
+   if (ioctl(fd, VIDIOC_QUERYCAP, cap)  0) {
+   printf(Error while reading capabilities\n);
+   exit(2);
+   }
+
+   for (board = ARRAY_SIZE(boards)-1; board = 0; board--) {
+   if (!strcasecmp((char *)cap.driver, boards[board].name))
+   break;
+   }
+   if (board  0) {
+   printf(This software doesn't support %s yet\n, cap.driver);
+   exit(3);
+   }
+
reg.match_type = V4L2_CHIP_MATCH_HOST;
reg.match_chip = 0;
 
@@ -176,7 +201,7 @@ int main(int argc, char **argv)
char name[256];
reg.reg = curr_bd-regs[i].reg;
if (ioctl(fd, VIDIOC_DBG_G_REGISTER, reg)  0) {
-   printf(Error while reading\n);
+   printf(Error while reading. Maybe you're not 
root?\n);
continue;
}
sprintf(name, %s:, curr_bd-regs[i].name);
diff -r b8004e41dff5 -r a2cbb6ac15cd v4l2-apps/util/v4l-board-dbg.h
--- a/v4l2-apps/util/v4l-board-dbg.hMon Jun 16 16:35:52 2008 -0300
+++ b/v4l2-apps/util/v4l-board-dbg.hMon Jun 16 17:41:25 2008 -0300
@@ -14,8 +14,11 @@
 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
+#ifndef _V4L_BOARD_DBG
+#define 

[linuxtv-commits] [hg:v4l-dvb] v4l-board-dbg: Some cleanups

2008-06-17 Thread Patch from Mauro Carvalho Chehab
The patch number 8056 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
v4l-board-dbg: Some cleanups




Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 v4l2-apps/util/v4l-board-dbg.c |   12 
 1 file changed, 4 insertions(+), 8 deletions(-)

diff -r a2cbb6ac15cd -r ef88a701e2a1 v4l2-apps/util/v4l-board-dbg.c
--- a/v4l2-apps/util/v4l-board-dbg.cMon Jun 16 17:41:25 2008 -0300
+++ b/v4l2-apps/util/v4l-board-dbg.cMon Jun 16 17:53:05 2008 -0300
@@ -43,7 +43,7 @@ struct board_list boards[] = {
 struct board_list boards[] = {
[0] = { /* From bttv-dbg.h */
.name  = BTTV_IDENT,
-   .prefix= sizeof (BTTV_PREFIX),
+   .prefix= sizeof(BTTV_PREFIX) - 1,
.regs  = bt8xx_regs,
.regs_size = ARRAY_SIZE(bt8xx_regs),
.alt_regs  = bt8xx_regs_other,
@@ -51,7 +51,7 @@ struct board_list boards[] = {
},
[1] = { /* From saa7134-dbg.h */
.name  = SAA7134_IDENT,
-   .prefix= sizeof (SAA7134_PREFIX),
+   .prefix= sizeof(SAA7134_PREFIX) - 1,
.regs  = saa7134_regs,
.regs_size = ARRAY_SIZE(saa7134_regs),
.alt_regs  = NULL,
@@ -127,10 +127,6 @@ int main(int argc, char **argv)
{0, 0, 0, 0}
};
 
-   /* FIXME: need to check for 'board' */
-board=1;
-   curr_bd = boards[board];
-
/* command args */
if (argc == 1) {
usage();
@@ -193,6 +189,8 @@ board=1;
exit(3);
}
 
+   curr_bd = boards[board];
+
reg.match_type = V4L2_CHIP_MATCH_HOST;
reg.match_chip = 0;
 
@@ -238,7 +236,6 @@ board=1;
return -1;
}
 
-
for (i = curr_bd-regs_size - 1; i =0 ; i--) {
if (!strcasecmp(reg_name, curr_bd-regs[i].name)) {
bd_reg = curr_bd-regs[i];
@@ -281,7 +278,6 @@ board=1;
}
}
 
-
if (i  0) {
printf(Register not found\n);
return -1;


---

Patch is available at: 
http://linuxtv.org/hg/v4l-dvb/rev/ef88a701e2a1d3e7ec576201f702d05c08986bb3

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[linuxtv-commits] [hg:v4l-dvb] v4l-board-dbg: Add registers for em28xx

2008-06-17 Thread Patch from Mauro Carvalho Chehab
The patch number 8058 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
v4l-board-dbg: Add registers for em28xx


Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 v4l2-apps/util/Makefile|3 -
 v4l2-apps/util/em28xx-dbg.h|   84 +
 v4l2-apps/util/v4l-board-dbg.c |9 +++
 3 files changed, 95 insertions(+), 1 deletion(-)

diff -r 29f4d60b0b87 -r 50be11af3fdb v4l2-apps/util/Makefile
--- a/v4l2-apps/util/Makefile   Mon Jun 16 18:03:41 2008 -0300
+++ b/v4l2-apps/util/Makefile   Mon Jun 16 18:04:06 2008 -0300
@@ -54,7 +54,8 @@ keytables:
./gen_keytables.pl ../../linux/drivers/media/common/ir-keymaps.c
 
 keytable: keytable.c parse.h keytables
-v4l-board-dbg: v4l-board-dbg.c bttv-dbg.h saa7134-dbg.h
+
+v4l-board-dbg: v4l-board-dbg.c bttv-dbg.h saa7134-dbg.h em28xx-dbg.h
 
 v4l2-driverids.cpp: ../../linux/include/linux/i2c-id.h
@echo struct driverid { const char *name; unsigned id; } driverids[] = 
{ $@
diff -r 29f4d60b0b87 -r 50be11af3fdb v4l2-apps/util/em28xx-dbg.h
--- /dev/null   Thu Jan 01 00:00:00 1970 +
+++ b/v4l2-apps/util/em28xx-dbg.h   Mon Jun 16 18:04:06 2008 -0300
@@ -0,0 +1,84 @@
+/*
+Copyright (C) 2008 Mauro Carvalho Chehab [EMAIL PROTECTED]
+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 version 2 of the License.
+
+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 v4l-board-dbg.h
+
+#define EM28XX_IDENT em28xx
+
+/* Register name prefix */
+#define EM2800_PREFIX EM2800_
+#define EM2880_PREFIX EM2880_
+#define EM28XX_PREFIX EM28XX_
+
+static struct board_regs em28xx_regs[] = {
+   {0x08, EM2800_PREFIX AUDIOSRC, 1},
+   {0x04, EM2880_PREFIX GPO, 1},
+   {0x08, EM28XX_PREFIX GPIO, 1},
+
+   {0x06, EM28XX_PREFIX I2C_CLK, 1},
+   {0x0a, EM28XX_PREFIX CHIPID, 1},
+   {0x0c, EM28XX_PREFIX USBSUSP, 1},
+
+   {0x0e, EM28XX_PREFIX AUDIOSRC, 1},
+   {0x0f, EM28XX_PREFIX XCLK, 1},
+
+   {0x10, EM28XX_PREFIX VINMODE, 1},
+   {0x11, EM28XX_PREFIX VINCTRL, 1},
+   {0x12, EM28XX_PREFIX VINENABLE, 1},
+
+   {0x14, EM28XX_PREFIX GAMMA, 1},
+   {0x15, EM28XX_PREFIX RGAIN, 1},
+   {0x16, EM28XX_PREFIX GGAIN, 1},
+   {0x17, EM28XX_PREFIX BGAIN, 1},
+   {0x18, EM28XX_PREFIX ROFFSET, 1},
+   {0x19, EM28XX_PREFIX GOFFSET, 1},
+   {0x1a, EM28XX_PREFIX BOFFSET, 1},
+
+   {0x1b, EM28XX_PREFIX OFLOW, 1},
+   {0x1c, EM28XX_PREFIX HSTART, 1},
+   {0x1d, EM28XX_PREFIX VSTART, 1},
+   {0x1e, EM28XX_PREFIX CWIDTH, 1},
+   {0x1f, EM28XX_PREFIX CHEIGHT, 1},
+
+   {0x20, EM28XX_PREFIX YGAIN, 1},
+   {0x21, EM28XX_PREFIX YOFFSET, 1},
+   {0x22, EM28XX_PREFIX UVGAIN, 1},
+   {0x23, EM28XX_PREFIX UOFFSET, 1},
+   {0x24, EM28XX_PREFIX VOFFSET, 1},
+   {0x25, EM28XX_PREFIX SHARPNESS, 1},
+
+   {0x26, EM28XX_PREFIX COMPR, 1},
+   {0x27, EM28XX_PREFIX OUTFMT, 1},
+
+   {0x28, EM28XX_PREFIX XMIN, 1},
+   {0x29, EM28XX_PREFIX XMAX, 1},
+   {0x2a, EM28XX_PREFIX YMIN, 1},
+   {0x2b, EM28XX_PREFIX YMAX, 1},
+
+   {0x30, EM28XX_PREFIX HSCALELOW, 1},
+   {0x31, EM28XX_PREFIX HSCALEHIGH, 1},
+   {0x32, EM28XX_PREFIX VSCALELOW, 1},
+   {0x33, EM28XX_PREFIX VSCALEHIGH, 1},
+
+   {0x40, EM28XX_PREFIX AC97LSB, 1},
+   {0x41, EM28XX_PREFIX AC97MSB, 1},
+   {0x42, EM28XX_PREFIX AC97ADDR, 1},
+   {0x43, EM28XX_PREFIX AC97BUSY, 1},
+
+   {0x02, EM28XX_PREFIX MASTER_AC97, 1},
+   {0x10, EM28XX_PREFIX LINE_IN_AC97, 1},
+   {0x14, EM28XX_PREFIX VIDEO_AC97, 1},
+};
\ No newline at end of file
diff -r 29f4d60b0b87 -r 50be11af3fdb v4l2-apps/util/v4l-board-dbg.c
--- a/v4l2-apps/util/v4l-board-dbg.cMon Jun 16 18:03:41 2008 -0300
+++ b/v4l2-apps/util/v4l-board-dbg.cMon Jun 16 18:04:06 2008 -0300
@@ -28,6 +28,7 @@
 
 #include bttv-dbg.h
 #include saa7134-dbg.h
+#include em28xx-dbg.h
 
 #define ARRAY_SIZE(arr) ((int)(sizeof(arr) / sizeof((arr)[0])))
 
@@ -57,6 +58,14 @@ struct board_list boards[] = {
.alt_regs

[linuxtv-commits] [hg:v4l-dvb] Add missing select for MEDIA_TUNER_TDA827X

2008-06-18 Thread Patch from Mauro Carvalho Chehab
The patch number 8059 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
Add missing select for MEDIA_TUNER_TDA827X



$ find linux/drivers/media/dvb -exec grep -l tda827x_attach '{}' \;
linux/drivers/media/dvb/dvb-usb/m920x.c
linux/drivers/media/dvb/ttpci/budget-ci.c

Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 linux/drivers/media/dvb/dvb-usb/Kconfig |1 +
 linux/drivers/media/dvb/ttpci/Kconfig   |1 +
 2 files changed, 2 insertions(+)

diff -r 50be11af3fdb -r a61039399bf8 linux/drivers/media/dvb/dvb-usb/Kconfig
--- a/linux/drivers/media/dvb/dvb-usb/Kconfig   Mon Jun 16 18:04:06 2008 -0300
+++ b/linux/drivers/media/dvb/dvb-usb/Kconfig   Wed Jun 18 06:27:21 2008 -0300
@@ -120,6 +120,7 @@ config DVB_USB_M920X
depends on DVB_USB
select DVB_MT352 if !DVB_FE_CUSTOMISE
select MEDIA_TUNER_QT1010 if !DVB_FE_CUSTOMISE
+   select MEDIA_TUNER_TDA827X if !DVB_FE_CUSTOMISE
help
  Say Y here to support the MSI Mega Sky 580 USB2.0 DVB-T receiver.
  Currently, only devices with a product id of
diff -r 50be11af3fdb -r a61039399bf8 linux/drivers/media/dvb/ttpci/Kconfig
--- a/linux/drivers/media/dvb/ttpci/Kconfig Mon Jun 16 18:04:06 2008 -0300
+++ b/linux/drivers/media/dvb/ttpci/Kconfig Wed Jun 18 06:27:21 2008 -0300
@@ -107,6 +107,7 @@ config DVB_BUDGET_CI
select DVB_TDA1004X if !DVB_FE_CUSTOMISE
select DVB_LNBP21 if !DVB_FE_CUSTOMISE
select DVB_TDA10023 if !DVB_FE_CUSTOMISE
+   select MEDIA_TUNER_TDA827X if !DVB_FE_CUSTOMISE
select VIDEO_IR
help
  Support for simple SAA7146 based DVB cards


---

Patch is available at: 
http://linuxtv.org/hg/v4l-dvb/rev/a61039399bf8af191fd3bfa34803378ba6cdbd3a

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[linuxtv-commits] [hg:v4l-dvb] merge: http://linuxtv.org/hg/~mkrufky/fix

2008-06-18 Thread Patch from Mauro Carvalho Chehab
The patch number 8062 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
merge: http://linuxtv.org/hg/~mkrufky/fix




Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 linux/drivers/media/common/tuners/Kconfig |1 +
 linux/drivers/media/video/cx18/Kconfig|4 ++--
 2 files changed, 3 insertions(+), 2 deletions(-)

diff -r a61039399bf8 -r 18dc384f4c0b linux/drivers/media/common/tuners/Kconfig
--- a/linux/drivers/media/common/tuners/Kconfig Wed Jun 18 06:27:21 2008 -0300
+++ b/linux/drivers/media/common/tuners/Kconfig Wed Jun 18 06:32:09 2008 -0300
@@ -34,6 +34,7 @@ menuconfig MEDIA_TUNER_CUSTOMIZE
 menuconfig MEDIA_TUNER_CUSTOMIZE
bool Customize analog and hybrid tuner modules to build
depends on MEDIA_TUNER
+   default n
help
  This allows the user to deselect tuner drivers unnecessary
  for their hardware from the build. Use this option with care
diff -r a61039399bf8 -r 18dc384f4c0b linux/drivers/media/video/cx18/Kconfig
--- a/linux/drivers/media/video/cx18/KconfigWed Jun 18 06:27:21 2008 -0300
+++ b/linux/drivers/media/video/cx18/KconfigWed Jun 18 06:32:09 2008 -0300
@@ -10,8 +10,8 @@ config VIDEO_CX18
select VIDEO_TVEEPROM
select VIDEO_CX2341X
select VIDEO_CS5345
-   select DVB_S5H1409
-   select MEDIA_TUNER_MXL5005S
+   select DVB_S5H1409 if !DVB_FE_CUSTOMISE
+   select MEDIA_TUNER_MXL5005S if !DVB_FE_CUSTOMISE
---help---
  This is a video4linux driver for Conexant cx23418 based
  PCI combo video recorder devices.


---

Patch is available at: 
http://linuxtv.org/hg/v4l-dvb/rev/18dc384f4c0b9697426f6866ebab82f5d45d9a12

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[linuxtv-commits] [hg:v4l-dvb] Add an utility to help checking for missing dependencies

2008-06-22 Thread Patch from Mauro Carvalho Chehab
The patch number 8064 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
Add an utility to help checking for missing dependencies


This tool consumes some time to run, but it is very useful on helping to check
if a dependency is missing. It will print an output like:

DVB_B2C2_FLEXCOP depends on DVB_CORE  1
DVB_B2C2_FLEXCOP_PCI depends on DVB_B2C2_FLEXCOP  1
DVB_B2C2_FLEXCOP depends on DVB_LGDT330X  1  DVB_PLL  1  DVB_MT312  1
 DVB_BCM3510  1  DVB_STV0297  1  DVB_STV0299  1  DVB_ISL6421  1
 DVB_MT352  1  DVB_CORE  1  MEDIA_TUNER_SIMPLE  1  DVB_CX24123 
1  DVB_NXT200X  1

In principle, each dependency should be associated to a depends on or
select clause, or a recursive depends on.

Warning: The result of this tool should be used just as a hint, since, due to
performance issues, the checks will use a simple grep at the .c files, instead
of a real symbol usage inspection.

Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 v4l/scripts/check_deps.pl |  228 ++
 1 file changed, 228 insertions(+)

diff -r 4012ea1a6a06 -r 123fbfbd82bb v4l/scripts/check_deps.pl
--- /dev/null   Thu Jan 01 00:00:00 1970 +
+++ b/v4l/scripts/check_deps.pl Wed Jun 18 13:22:03 2008 -0300
@@ -0,0 +1,228 @@
+#!/usr/bin/perl
+
+# Copyright (C) 2008 Mauro Carvalho Chehab [EMAIL PROTECTED]
+
+
+use strict;
+use File::Find;
+use Fcntl ':mode';
+use FileHandle;
+
+my $debug=0;
+
+my $SRC = 'linux';
+
+my %export;
+
+#
+# open_makefile were adapted from analyze_build.pl
+#   by Copyright (C) 2006 Trent Piepho [EMAIL PROTECTED]
+
+# Print out some extra checks of Makefile correctness
+my $check = 0;
+
+# Root of source tree
+my $root;
+
+# List of Makefile's opened
+my %makefiles = ();
+
+# For each module that is made up of multiple source files, list of sources
+my %multi = ();
+my $multi_count = 0;
+
+my %config;
+
+my %associate;
+
+sub open_makefile($) {
+   my $file = shift;
+
+   # only open a given Makefile once
+   return if exists $makefiles{$file};
+   $makefiles{$file} = 1;
+
+   $file =~ m|^(.*)/[^/]*$|;
+   my $dir = $1;
+
+   print opening $root$file (dir=$dir)\n if ($debug  2);
+   my $in = new FileHandle;
+   open $in, '', $root$file or die Unable to open Makefile 
'$root$file': $!;
+
+   while ($in) {
+   # print STDERR Line: $_;
+   # Skip comment and blank lines
+   next if (/^\s*(#.*)?$/);
+   m/^\s*\-?include/ and die Can't handle includes! In $file;
+
+   # Handle line continuations
+   if (/\\\n$/) {
+   $_ .= $in;
+   redo;
+   }
+   # Eat line continuations in string we will parse
+   s/\s*\\\n\s*/ /g;
+   # Eat comments
+   s/#.*$//;
+
+   if (/^\s*obj-(\S+)\s*([:+]?)=\s*(\S.*?)\s*$/) {
+   print STDERR Should use '+=' in $file:$.\n$_\n if 
($check  $2 ne '+');
+   my ($var,$targets) = ($1, $3);
+   if ($var =~ /\$\(CONFIG_(\S+)\)$/) {
+   $var = $1;
+   } elsif ($var !~ /^[ym]$/) {
+   print STDERR Confused by obj assignment '$var' 
in $file:$.\n$_;
+   }
+   foreach(split(/\s+/, $targets)) {
+   if (m|/$|) { # Ends in /, means it's a directory
+   open_makefile($dir/$_.'Makefile');
+   } elsif (/^(\S+)\.o$/) {
+   $config{$dir/$1} = $var;
+#  printf %s - %s\n, $var, $1 if $debug 
 1;
+   } else {
+   print STDERR Confused by target '$_' 
in $file:$.\n;
+   }
+   }
+   next;
+   }
+   if (/(\S+)-objs\s*([:+]?)=\s*(\S.*?)\s*$/) {
+   my @files = split(/\s+/, $3);
+   map { s|^(.*)\.o$|$dir/\1| } @files;
+   if ($2 eq '+') {
+   # Adding to files
+   print STDERR Should use ':=' in 
$file:$.\n$_\n if ($check  !exists $multi{$dir/$1});
+   push @files, @{$multi{$dir/$1}};
+   } else {
+   print STDERR Setting objects twice in 
$file:$.\n$_\n if ($check  exists 

[linuxtv-commits] [hg:v4l-dvb] merge: http://linuxtv.org/hg/~endriss/v4l-dvb

2008-06-22 Thread Patch from Mauro Carvalho Chehab
The patch number 8077 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
merge: http://linuxtv.org/hg/~endriss/v4l-dvb




Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 linux/drivers/media/dvb/frontends/stv0299.c  |   15 ++
 linux/drivers/media/dvb/frontends/tda10023.c |   20 +++
 linux/drivers/media/dvb/ttpci/av7110.c   |1 
 linux/drivers/media/dvb/ttpci/av7110.h   |1 
 linux/drivers/media/dvb/ttpci/av7110_hw.c|5 +---
 linux/drivers/media/dvb/ttpci/av7110_hw.h|3 --
 linux/drivers/media/dvb/ttpci/budget-ci.c|1 
 7 files changed, 26 insertions(+), 20 deletions(-)

diff -r b988afd327fc -r 3e0e7586d6a3 linux/drivers/media/dvb/frontends/stv0299.c
--- a/linux/drivers/media/dvb/frontends/stv0299.c   Sun Jun 22 06:32:03 
2008 -0300
+++ b/linux/drivers/media/dvb/frontends/stv0299.c   Sun Jun 22 06:37:10 
2008 -0300
@@ -63,6 +63,7 @@ struct stv0299_state {
u32 symbol_rate;
fe_code_rate_t fec_inner;
int errmode;
+   u32 ucblocks;
 };
 
 #define STATUS_BER 0
@@ -501,8 +502,10 @@ static int stv0299_read_ber(struct dvb_f
 {
struct stv0299_state* state = fe-demodulator_priv;
 
-   if (state-errmode != STATUS_BER) return 0;
-   *ber = (stv0299_readreg (state, 0x1d)  8) | stv0299_readreg (state, 
0x1e);
+   if (state-errmode != STATUS_BER)
+   return -ENOSYS;
+
+   *ber = stv0299_readreg(state, 0x1e) | (stv0299_readreg(state, 0x1d)  
8);
 
return 0;
 }
@@ -540,8 +543,12 @@ static int stv0299_read_ucblocks(struct 
 {
struct stv0299_state* state = fe-demodulator_priv;
 
-   if (state-errmode != STATUS_UCBLOCKS) *ucblocks = 0;
-   else *ucblocks = (stv0299_readreg (state, 0x1d)  8) | stv0299_readreg 
(state, 0x1e);
+   if (state-errmode != STATUS_UCBLOCKS)
+   return -ENOSYS;
+
+   state-ucblocks += stv0299_readreg(state, 0x1e);
+   state-ucblocks += (stv0299_readreg(state, 0x1d)  8);
+   *ucblocks = state-ucblocks;
 
return 0;
 }
diff -r b988afd327fc -r 3e0e7586d6a3 
linux/drivers/media/dvb/frontends/tda10023.c
--- a/linux/drivers/media/dvb/frontends/tda10023.c  Sun Jun 22 06:32:03 
2008 -0300
+++ b/linux/drivers/media/dvb/frontends/tda10023.c  Sun Jun 22 06:37:10 
2008 -0300
@@ -74,9 +74,12 @@ static u8 tda10023_readreg (struct tda10
int ret;
 
ret = i2c_transfer (state-i2c, msg, 2);
-   if (ret != 2)
-   printk(DVB: TDA10023: %s: readreg error (ret == %i)\n,
-__func__, ret);
+   if (ret != 2) {
+   int num = state-frontend.dvb ? state-frontend.dvb-num : -1;
+   printk(KERN_ERR DVB: TDA10023(%d): %s: readreg error 
+   (reg == 0x%02x, ret == %i)\n,
+   num, __func__, reg, ret);
+   }
return b1[0];
 }
 
@@ -87,11 +90,12 @@ static int tda10023_writereg (struct tda
int ret;
 
ret = i2c_transfer (state-i2c, msg, 1);
-   if (ret != 1)
-   printk(DVB: TDA10023(%d): %s, writereg error 
+   if (ret != 1) {
+   int num = state-frontend.dvb ? state-frontend.dvb-num : -1;
+   printk(KERN_ERR DVB: TDA10023(%d): %s, writereg error 
(reg == 0x%02x, val == 0x%02x, ret == %i)\n,
-   state-frontend.dvb-num, __func__, reg, data, ret);
-
+   num, __func__, reg, data, ret);
+   }
return (ret != 1) ? -EREMOTEIO : 0;
 }
 
@@ -485,7 +489,7 @@ struct dvb_frontend *tda10023_attach(con
struct tda10023_state* state = NULL;
 
/* allocate memory for the internal state */
-   state = kmalloc(sizeof(struct tda10023_state), GFP_KERNEL);
+   state = kzalloc(sizeof(struct tda10023_state), GFP_KERNEL);
if (state == NULL) goto error;
 
/* setup the state */
diff -r b988afd327fc -r 3e0e7586d6a3 linux/drivers/media/dvb/ttpci/av7110.c
--- a/linux/drivers/media/dvb/ttpci/av7110.cSun Jun 22 06:32:03 2008 -0300
+++ b/linux/drivers/media/dvb/ttpci/av7110.cSun Jun 22 06:37:10 2008 -0300
@@ -1198,7 +1198,6 @@ static int start_ts_capture(struct av711
if (budget-feeding1)
return ++budget-feeding1;
memset(budget-grabbing, 0x00, TS_HEIGHT * TS_WIDTH);
-   budget-tsf = 0xff;
budget-ttbp = 0;
SAA7146_IER_ENABLE(budget-dev, MASK_10); /* VPE */
saa7146_write(budget-dev, MC1, (MASK_04 | MASK_20)); /* DMA3 on */
diff -r b988afd327fc -r 3e0e7586d6a3 

[linuxtv-commits] [hg:v4l-dvb] merge: http://linuxtv.org/hg/~mkrufky/hvr950q

2008-06-22 Thread Patch from Mauro Carvalho Chehab
The patch number 8099 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
merge: http://linuxtv.org/hg/~mkrufky/hvr950q




Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 linux/drivers/media/common/tuners/xc5000.c  |   37 
 linux/drivers/media/common/tuners/xc5000_priv.h |1 
 linux/drivers/media/dvb/frontends/au8522.c  |6 --
 3 files changed, 32 insertions(+), 12 deletions(-)

diff -r ac6170408328 -r 7b49949141e3 linux/drivers/media/common/tuners/xc5000.c
--- a/linux/drivers/media/common/tuners/xc5000.cSat Jun 21 14:30:33 
2008 +
+++ b/linux/drivers/media/common/tuners/xc5000.cSun Jun 22 07:33:44 
2008 -0300
@@ -35,6 +35,10 @@ static int debug;
 static int debug;
 module_param(debug, int, 0644);
 MODULE_PARM_DESC(debug, Turn on/off debugging (default:off).);
+
+static int xc5000_load_fw_on_attach;
+module_param_named(init_fw, xc5000_load_fw_on_attach, int, 0644);
+MODULE_PARM_DESC(init_fw, Load firmware during driver initialization.);
 
 #define dprintk(level,fmt, arg...) if (debug = level) \
printk(KERN_INFO %s:  fmt, xc5000, ## arg)
@@ -177,6 +181,7 @@ static XC_TV_STANDARD XC5000_Standard[MA
{FM Radio-INPUT1,   0x0208, 0x9002}
 };
 
+static int  xc5000_is_firmware_loaded(struct dvb_frontend *fe);
 static int  xc5000_writeregs(struct xc5000_priv *priv, u8 *buf, u8 len);
 static int  xc5000_readregs(struct xc5000_priv *priv, u8 *buf, u8 len);
 static void xc5000_TunerReset(struct dvb_frontend *fe);
@@ -352,7 +357,7 @@ static int xc_SetTVStandard(struct xc500
 
 static int xc_shutdown(struct xc5000_priv *priv)
 {
-   return 0;
+   return XC_RESULT_SUCCESS;
/* Fixme: cannot bring tuner back alive once shutdown
 *without reloading the driver modules.
 *return xc_write_reg(priv, XREG_POWER_DOWN, 0);
@@ -704,6 +709,25 @@ static int xc5000_set_params(struct dvb_
return 0;
 }
 
+static int xc5000_is_firmware_loaded(struct dvb_frontend *fe)
+{
+   struct xc5000_priv *priv = fe-tuner_priv;
+   int ret;
+   u16 id;
+
+   ret = xc5000_readreg(priv, XREG_PRODUCT_ID, id);
+   if (ret == XC_RESULT_SUCCESS) {
+   if (id == XC_PRODUCT_ID_FW_NOT_LOADED)
+   ret = XC_RESULT_RESET_FAILURE;
+   else
+   ret = XC_RESULT_SUCCESS;
+   }
+
+   dprintk(1, %s() returns %s id = 0x%x\n, __func__,
+   ret == XC_RESULT_SUCCESS ? True : False, id);
+   return ret;
+}
+
 static int xc_load_fw_and_init_tuner(struct dvb_frontend *fe);
 
 static int xc5000_set_analog_params(struct dvb_frontend *fe,
@@ -712,7 +736,7 @@ static int xc5000_set_analog_params(stru
struct xc5000_priv *priv = fe-tuner_priv;
int ret;
 
-   if(priv-fwloaded == 0)
+   if (xc5000_is_firmware_loaded(fe) != XC_RESULT_SUCCESS)
xc_load_fw_and_init_tuner(fe);
 
dprintk(1, %s() frequency=%d (in units of 62.5khz)\n,
@@ -827,11 +851,10 @@ static int xc_load_fw_and_init_tuner(str
struct xc5000_priv *priv = fe-tuner_priv;
int ret = 0;
 
-   if (priv-fwloaded == 0) {
+   if (xc5000_is_firmware_loaded(fe) != XC_RESULT_SUCCESS) {
ret = xc5000_fwupload(fe);
if (ret != XC_RESULT_SUCCESS)
return ret;
-   priv-fwloaded = 1;
}
 
/* Start the tuner self-calibration process */
@@ -871,7 +894,6 @@ static int xc5000_sleep(struct dvb_front
return -EREMOTEIO;
}
else {
-   /* priv-fwloaded = 0; */
return XC_RESULT_SUCCESS;
}
 }
@@ -952,7 +974,6 @@ struct dvb_frontend *xc5000_attach(struc
cfg-i2c_address);
printk(KERN_INFO
xc5000: Firmware has been loaded previously\n);
-   priv-fwloaded = 1;
break;
case XC_PRODUCT_ID_FW_NOT_LOADED:
printk(KERN_INFO
@@ -960,7 +981,6 @@ struct dvb_frontend *xc5000_attach(struc
cfg-i2c_address);
printk(KERN_INFO
xc5000: Firmware has not been loaded previously\n);
-   priv-fwloaded = 0;
break;
default:
printk(KERN_ERR
@@ -975,6 +995,9 @@ struct dvb_frontend *xc5000_attach(struc
 
fe-tuner_priv = priv;
 
+   if (xc5000_load_fw_on_attach)
+   xc5000_init(fe);
+
return fe;
 }
 EXPORT_SYMBOL(xc5000_attach);
diff -r ac6170408328 -r 7b49949141e3 

[linuxtv-commits] [hg:v4l-dvb] bttv: allow debug ioctl's

2008-06-23 Thread Patch from Mauro Carvalho Chehab
The patch number 8110 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
bttv: allow debug ioctl's


Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 linux/drivers/media/video/bt8xx/bttv-driver.c |1 +
 1 file changed, 1 insertion(+)

diff -r 782b354bed5c -r 49ea64868f0c 
linux/drivers/media/video/bt8xx/bttv-driver.c
--- a/linux/drivers/media/video/bt8xx/bttv-driver.c Sun Jun 22 14:43:07 
2008 -0300
+++ b/linux/drivers/media/video/bt8xx/bttv-driver.c Mon Jun 23 09:31:29 
2008 -0300
@@ -4243,6 +4243,7 @@ static struct video_device *vdev_init(st
vfd-release = video_device_release;
 #endif
vfd-type= type;
+   vfd-debug   = bttv_debug;
snprintf(vfd-name, sizeof(vfd-name), BT%d%s %s (%s),
 btv-id, (btv-id==848  btv-revision==0x12) ? A : ,
 type_name, bttv_tvcards[btv-c.type].name);


---

Patch is available at: 
http://linuxtv.org/hg/v4l-dvb/rev/49ea64868f0c27d163c86f28f20f02cbc33e53ff

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[linuxtv-commits] [hg:v4l-dvb] Improves commit message scripts

2008-06-27 Thread Patch from Mauro Carvalho Chehab
The patch number 8119 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
Improves commit message scripts


This patch improves message description sanity rules:

- mailimport now prefers to edit using editdiff. This helps to fix
  trivial CodingStyle errors at receive patches;

- hghead.pl will now remove blank whitespaces if no body exists;

- make commit will now run hghead.pl. This will do some sanity checks
  at commit messages:
  *) Will warrant that from: metatag exists, avoiding to have patches without
 proper authorship id at someone's else tree;

  *) Will order the tags at the expected way (subject, from, body, signatures);

  *) Will warrant that one and just one blank line exists between each of the 
four
 parts of the commit message.

Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 Makefile  |2 +-
 mailimport|   20 
 v4l/scripts/hghead.pl |3 +++
 3 files changed, 20 insertions(+), 5 deletions(-)

diff -r 13319e163b80 -r 052e17686177 Makefile
--- a/Makefile  Fri Jun 27 10:30:04 2008 -0300
+++ b/Makefile  Fri Jun 27 11:19:39 2008 -0300
@@ -27,7 +27,7 @@ commit cvscommit hgcommit change changes
echo $$CHECKSUM | md5sum -c --status  \
echo *** commit message not changed. Aborting. *** \
 exit 13 || exit 0
-   grep -v '^#' $(TMP)/v4l_hg_commit.msg | hg commit -l -
+   $(BUILD_DIR)/scripts/hghead.pl $(TMP)/v4l_hg_commit.msg | grep -v '^#' 
| hg commit -l -
@echo *** PLEASE CHECK IF LOG IS OK:
@hg log -v -r -1
@echo *** If not ok, do \hg rollback\ and \make commit\ again
diff -r 13319e163b80 -r 052e17686177 mailimport
--- a/mailimportFri Jun 27 10:30:04 2008 -0300
+++ b/mailimportFri Jun 27 11:19:39 2008 -0300
@@ -34,7 +34,7 @@ edit_patch()
mv $tmp/$newfile $next;
fi
echo Editing $next
-   $EDITOR $next
+   $ED $next
 }
 
 
@@ -80,7 +80,7 @@ apply_patch () {
if [ `grep '^Bad:' $TMP2` !=  ]; then
echo *** ERROR: Patch bad formed. Please fix.
sleep 1
-   $EDITOR $next
+   $ED $next
cont=1
fi
done
@@ -214,8 +214,20 @@ if [ $TMPDIR ==  ]; then
TMPDIR=/tmp
 fi
 
-if [ $EDITOR ==  ]; then
-   EDITOR=nano -w
+if [ `which editdiff`  !=  ]; then
+   ED=editdiff
+else
+   ED=$EDITOR
+fi
+
+if [ $ED ==  ]; then
+   if [ `which nano` !=  ]; then
+   ED=nano -w
+   elif [ `which pico` !=  ]; then
+   ED=pico -w
+   else
+   ED=vi
+   fi
 fi
 
 if [ $CHECKPATCH ==  ]; then
diff -r 13319e163b80 -r 052e17686177 v4l/scripts/hghead.pl
--- a/v4l/scripts/hghead.pl Fri Jun 27 10:30:04 2008 -0300
+++ b/v4l/scripts/hghead.pl Fri Jun 27 11:19:39 2008 -0300
@@ -188,6 +188,9 @@ if (!$signed =~ m/$from/) {
 $subject=~s/^[\n\s]+//;
 $subject=~s/[\n\s]+$//;
 
+$body=~s/^[\n\s]+//;
+$body=~s/[\n\s]+$//;
+
 $body=$body\n\n$signed;
 
 $body=~s/^[\n\s]+//;


---

Patch is available at: 
http://linuxtv.org/hg/v4l-dvb/rev/052e17686177e2861351c35c6865a17f223c77cf

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[linuxtv-commits] [hg:v4l-dvb] Fix subject identification

2008-06-28 Thread Patch from Mauro Carvalho Chehab
The patch number 8127 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
Fix subject identification




Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 v4l/scripts/hghead.pl |5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff -r 43bc4d8d91d6 -r eedf4637d9c4 v4l/scripts/hghead.pl
--- a/v4l/scripts/hghead.pl Sun Jun 22 14:20:49 2008 +
+++ b/v4l/scripts/hghead.pl Sat Jun 28 11:48:04 2008 -0300
@@ -91,7 +91,8 @@ while ($line = IN) {
}
 
if ($tag =~ m/^subject:/) {
-   $subject=$arg\n;
+   $subject = $arg\n;
+   $sub_ok = 1;
next;
}
 
@@ -136,6 +137,7 @@ while ($line = IN) {
 
if ($line =~ m|^(V4L\/DVB\s*\(.+\)\s*:.*\n)|) {
$subject=$1;
+   $sub_ok = 1;
$line=\n;
}
 
@@ -147,7 +149,6 @@ while ($line = IN) {
next;
}
$sub_ok=1;
-   substr( $subject, 0, 1 ) = uc (substr ($subject, 0, 1));
if ($subject =~ m|V4L\/DVB\s*(.+)|) {
$subject=$1;
}


---

Patch is available at: 
http://linuxtv.org/hg/v4l-dvb/rev/eedf4637d9c49f6c1ce88ff05956944d0ce79358

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[linuxtv-commits] [hg:v4l-dvb] Fix compat with older kernels

2008-06-28 Thread Patch from Mauro Carvalho Chehab
The patch number 8137 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
Fix compat with older kernels


Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 v4l/compat.h |4 
 1 file changed, 4 insertions(+)

diff -r d7fe5ecf4755 -r 65d27da4b833 v4l/compat.h
--- a/v4l/compat.h  Sun Jun 22 14:19:29 2008 +
+++ b/v4l/compat.h  Sat Jun 28 12:04:12 2008 -0300
@@ -541,6 +541,10 @@ do {   
\
le32_to_cpu(get_unaligned((u32 *)(a)))
 #define put_unaligned_le32(r, a)   \
put_unaligned(cpu_to_le32(r), ((u32 *)(a)))
+#define get_unaligned_le64(a)  \
+   le64_to_cpu(get_unaligned((u64 *)(a)))
+#define put_unaligned_le64(r, a)   \
+   put_unaligned(cpu_to_le64(r), ((u64 *)(a)))
 #endif
 #if LINUX_VERSION_CODE  KERNEL_VERSION(2, 6, 25)
 #ifdef CONFIG_PROC_FS


---

Patch is available at: 
http://linuxtv.org/hg/v4l-dvb/rev/65d27da4b833dca04d4eec413bdd2f3f4520c58a

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[linuxtv-commits] [hg:v4l-dvb] Fix hghead to avoid adding bogus SOB's

2008-06-28 Thread Patch from Mauro Carvalho Chehab
The patch number 8138 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
Fix hghead to avoid adding bogus SOB's


As reported by Michael Krufky:

 sms1xxx: fix Siano board names

 From: Michael Krufky [EMAIL PROTECTED]

 Signed-off-by: Michael Krufky [EMAIL PROTECTED]
 Signed-off-by:  


 I have to hg export tip  file  nano file {remove last line}  hg
rollback  hg revert --all  hg import file to fix it.

 What went wrong?  :-/



Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 v4l/scripts/hghead.pl |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff -r 65d27da4b833 -r 4260d7ff0099 v4l/scripts/hghead.pl
--- a/v4l/scripts/hghead.pl Sat Jun 28 12:04:12 2008 -0300
+++ b/v4l/scripts/hghead.pl Sat Jun 28 14:20:12 2008 -0300
@@ -174,7 +174,8 @@ if ($from eq ) {
die;
 }
 
-if (!$maint_ok) {
+if (!$maint_ok  $maintainer_name  $maintainer_email) {
+   print #No maintainer's signature. Adding it.\n;
$signed=$signed.Signed-off-by: $maintainer_name $maintainer_email\n;
 }
 


---

Patch is available at: 
http://linuxtv.org/hg/v4l-dvb/rev/4260d7ff009934cad3218e799e11a54a89b09856

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[linuxtv-commits] [hg:v4l-dvb] Fix callback names

2008-06-28 Thread Patch from Mauro Carvalho Chehab
The patch number 8139 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
Fix callback names


Callback naming has changed. Fix to the proper convention.
CC: Dean Anderson [EMAIL PROTECTED]
CC: Greg Kroah-Hartman [EMAIL PROTECTED]


Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 linux/drivers/media/video/s2255drv.c |   18 +-
 1 file changed, 9 insertions(+), 9 deletions(-)

diff -r 4260d7ff0099 -r 34c3d4dda762 linux/drivers/media/video/s2255drv.c
--- a/linux/drivers/media/video/s2255drv.c  Sat Jun 28 14:20:12 2008 -0300
+++ b/linux/drivers/media/video/s2255drv.c  Sat Jun 28 14:42:20 2008 -0300
@@ -812,7 +812,7 @@ static int vidioc_querycap(struct file *
return 0;
 }
 
-static int vidioc_enum_fmt_cap(struct file *file, void *priv,
+static int vidioc_enum_fmt_vid_cap(struct file *file, void *priv,
   struct v4l2_fmtdesc *f)
 {
int index = 0;
@@ -828,7 +828,7 @@ static int vidioc_enum_fmt_cap(struct fi
return 0;
 }
 
-static int vidioc_g_fmt_cap(struct file *file, void *priv,
+static int vidioc_g_fmt_vid_cap(struct file *file, void *priv,
struct v4l2_format *f)
 {
struct s2255_fh *fh = priv;
@@ -843,7 +843,7 @@ static int vidioc_g_fmt_cap(struct file 
return (0);
 }
 
-static int vidioc_try_fmt_cap(struct file *file, void *priv,
+static int vidioc_try_fmt_vid_cap(struct file *file, void *priv,
  struct v4l2_format *f)
 {
const struct s2255_fmt *fmt;
@@ -949,7 +949,7 @@ static int vidioc_try_fmt_cap(struct fil
return 0;
 }
 
-static int vidioc_s_fmt_cap(struct file *file, void *priv,
+static int vidioc_s_fmt_vid_cap(struct file *file, void *priv,
struct v4l2_format *f)
 {
struct s2255_fh *fh = priv;
@@ -958,7 +958,7 @@ static int vidioc_s_fmt_cap(struct file 
int ret;
int norm;
 
-   ret = vidioc_try_fmt_cap(file, fh, f);
+   ret = vidioc_try_fmt_vid_cap(file, fh, f);
 
if (ret  0)
return (ret);
@@ -1656,10 +1656,10 @@ static struct video_device template = {
.minor = -1,
.release = video_device_release,
.vidioc_querycap = vidioc_querycap,
-   .vidioc_enum_fmt_cap = vidioc_enum_fmt_cap,
-   .vidioc_g_fmt_cap = vidioc_g_fmt_cap,
-   .vidioc_try_fmt_cap = vidioc_try_fmt_cap,
-   .vidioc_s_fmt_cap = vidioc_s_fmt_cap,
+   .vidioc_enum_fmt_vid_cap = vidioc_enum_fmt_vid_cap,
+   .vidioc_g_fmt_vid_cap = vidioc_g_fmt_vid_cap,
+   .vidioc_try_fmt_vid_cap = vidioc_try_fmt_vid_cap,
+   .vidioc_s_fmt_vid_cap = vidioc_s_fmt_vid_cap,
.vidioc_reqbufs = vidioc_reqbufs,
.vidioc_querybuf = vidioc_querybuf,
.vidioc_qbuf = vidioc_qbuf,


---

Patch is available at: 
http://linuxtv.org/hg/v4l-dvb/rev/34c3d4dda762a7fef8fe1ee04ff431c64197e138

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[linuxtv-commits] [hg:v4l-dvb] Fix s2255drv compilation against older kernels

2008-06-28 Thread Patch from Mauro Carvalho Chehab
The patch number 8140 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
Fix s2255drv compilation against older kernels



As reported by Hermann Pitton:

CC [M]  /mnt/xfer/mercurial/v4l-dvb-head/v4l-dvb/v4l/s2255drv.o
s2255drv.c: In function 'vidioc_querycap':
s2255drv.c:809: error: implicit declaration of function 'dev_name'
s2255drv.c:809: warning: passing argument 2 of 'strlcpy' makes pointer from 
integer without a cast

Tested with kernel 2.6.25.6

Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 linux/drivers/media/video/s2255drv.c |1 +
 v4l/compat.h |8 +---
 2 files changed, 6 insertions(+), 3 deletions(-)

diff -r 34c3d4dda762 -r 2e6fa2a1ea47 linux/drivers/media/video/s2255drv.c
--- a/linux/drivers/media/video/s2255drv.c  Sat Jun 28 14:42:20 2008 -0300
+++ b/linux/drivers/media/video/s2255drv.c  Sat Jun 28 21:46:22 2008 -0300
@@ -51,6 +51,7 @@
 #include media/v4l2-common.h
 #include linux/vmalloc.h
 #include linux/usb.h
+#include compat.h
 
 #define FIRMWARE_FILE_NAME f2255usb.bin
 
diff -r 34c3d4dda762 -r 2e6fa2a1ea47 v4l/compat.h
--- a/v4l/compat.h  Sat Jun 28 14:42:20 2008 -0300
+++ b/v4l/compat.h  Sat Jun 28 21:46:22 2008 -0300
@@ -592,6 +592,8 @@ static inline struct proc_dir_entry *pro
 ( h ), \
 ( x ) ) )
 
-#endif
-
-#endif
+#define dev_name(dev)  ((dev)-bus_id)
+
+#endif
+
+#endif


---

Patch is available at: 
http://linuxtv.org/hg/v4l-dvb/rev/2e6fa2a1ea471f3318f911314a0008bd57c35ffa

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[linuxtv-commits] [hg:v4l-dvb] ttpci: tda827x.h is at drivers/media/common

2008-06-29 Thread Patch from Mauro Carvalho Chehab
The patch number 8142 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
ttpci: tda827x.h is at drivers/media/common


As reported by Stephen Rothwell [EMAIL PROTECTED]:

drivers/media/dvb/ttpci/budget-ci.c:50:21: error: tda827x.h: No such file or 
directory

Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 linux/drivers/media/dvb/ttpci/Makefile |1 +
 1 file changed, 1 insertion(+)

diff -r 5f0a28190c33 -r 464acd5f79db linux/drivers/media/dvb/ttpci/Makefile
--- a/linux/drivers/media/dvb/ttpci/MakefileSun Jun 29 05:24:56 2008 -0300
+++ b/linux/drivers/media/dvb/ttpci/MakefileSun Jun 29 05:29:00 2008 -0300
@@ -14,6 +14,7 @@ obj-$(CONFIG_DVB_AV7110) += dvb-ttpci.o
 obj-$(CONFIG_DVB_AV7110) += dvb-ttpci.o
 
 EXTRA_CFLAGS += -Idrivers/media/dvb/dvb-core/ -Idrivers/media/dvb/frontends/
+EXTRA_CFLAGS += -Idrivers/media/common/tuners
 
 hostprogs-y:= fdump
 


---

Patch is available at: 
http://linuxtv.org/hg/v4l-dvb/rev/464acd5f79db3e828382ad514bf21688c1ae03a8

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[linuxtv-commits] [hg:v4l-dvb] em28xx-dvb: Fix in-kernel compilation

2008-06-29 Thread Patch from Mauro Carvalho Chehab
The patch number 8141 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
em28xx-dvb: Fix in-kernel compilation




Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 linux/drivers/media/video/em28xx/em28xx-dvb.c |2 ++
 1 file changed, 2 insertions(+)

diff -r 2e6fa2a1ea47 -r 5f0a28190c33 
linux/drivers/media/video/em28xx/em28xx-dvb.c
--- a/linux/drivers/media/video/em28xx/em28xx-dvb.c Sat Jun 28 21:46:22 
2008 -0300
+++ b/linux/drivers/media/video/em28xx/em28xx-dvb.c Sun Jun 29 05:24:56 
2008 -0300
@@ -28,7 +28,9 @@
 
 #include lgdt330x.h
 #include zl10353.h
+#ifdef EM28XX_DRX397XD_SUPPORT
 #include drx397xD.h
+#endif
 
 MODULE_DESCRIPTION(driver for em28xx based DVB cards);
 MODULE_AUTHOR(Mauro Carvalho Chehab [EMAIL PROTECTED]);


---

Patch is available at: 
http://linuxtv.org/hg/v4l-dvb/rev/5f0a28190c335972d0dbee5dd61d45e7ef322644

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[linuxtv-commits] [hg:v4l-dvb] Fix compilation for mt9v022

2008-06-29 Thread Patch from Mauro Carvalho Chehab
The patch number 8143 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
Fix compilation for mt9v022




Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 linux/drivers/media/video/mt9v022.c |5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

diff -r 464acd5f79db -r be35f18457b9 linux/drivers/media/video/mt9v022.c
--- a/linux/drivers/media/video/mt9v022.c   Sun Jun 29 05:29:00 2008 -0300
+++ b/linux/drivers/media/video/mt9v022.c   Sun Jun 29 05:41:19 2008 -0300
@@ -815,12 +815,13 @@ static int mt9v022_remove(struct i2c_cli
 
return 0;
 }
-
+#if LINUX_VERSION_CODE = KERNEL_VERSION(2, 6, 26)
 static const struct i2c_device_id mt9v022_id[] = {
{ mt9v022, 0 },
{ }
 };
 MODULE_DEVICE_TABLE(i2c, mt9v022_id);
+#endif
 
 static struct i2c_driver mt9v022_i2c_driver = {
.driver = {
@@ -828,7 +829,9 @@ static struct i2c_driver mt9v022_i2c_dri
},
.probe  = mt9v022_probe,
.remove = mt9v022_remove,
+#if LINUX_VERSION_CODE = KERNEL_VERSION(2, 6, 26)
.id_table   = mt9v022_id,
+#endif
 };
 
 static int __init mt9v022_mod_init(void)


---

Patch is available at: 
http://linuxtv.org/hg/v4l-dvb/rev/be35f18457b9261cc908de7db2b9d576e83c81bb

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[linuxtv-commits] [hg:v4l-dvb] README.patches Add a new practice accepted on kernel

2008-06-29 Thread Patch from Mauro Carvalho Chehab
The patch number 8144 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
README.patches Add a new practice accepted on kernel


On Jun 3, kernel commit adbd5886da5f467148b26cca3728ab0e672b3fcc added a new
rule to help patch merging from maintainers, at
Documentation/SubmittingPatches:

If you are a subsystem or branch maintainer, sometimes you need to slightly
 modify patches you receive in order to merge them, because the code is not
 exactly the same in your tree and the submitters'. If you stick strictly to
 rule (c), you should ask the submitter to rediff, but this is a totally
 counter-productive waste of time and energy. Rule (b) allows you to adjust
 the code, but then it is very impolite to change one submitter's code and
 make him endorse your bugs. To solve this problem, it is recommended that
 you add a line between the last Signed-off-by header and yours, indicating
 the nature of your changes. While there is nothing mandatory about this, it
 seems like prepending the description with your mail and/or name, all
 enclosed in square brackets, is noticeable enough to make it obvious that
 you are responsible for last-minute changes. Example :

Signed-off-by: Random J Developer [EMAIL PROTECTED]
[EMAIL PROTECTED]: struct foo moved from foo.c to foo.h]
Signed-off-by: Lucky K Maintainer [EMAIL PROTECTED]

 This practise is particularly helpful if you maintain a stable branch and
 want at the same time to credit the author, track changes, merge the fix,
 and protect the submitter from complaints. Note that under no circumstances
 can you change the author's identity (the From header), as it is the one
 which appears in the changelog.

This patch adds a quick description at this rule under README.patches. This is
particularly important when merging mercurial tree with -git one.

Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 README.patches |   12 +++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff -r be35f18457b9 -r 196be6985dba README.patches
--- a/README.patchesSun Jun 29 05:41:19 2008 -0300
+++ b/README.patchesSun Jun 29 06:03:11 2008 -0300
@@ -1,5 +1,5 @@ Mauro Carvalho Chehab mchehab at infrad
 Mauro Carvalho Chehab mchehab at infradead dot org
-   Updated on 2008 February, 14
+   Updated on 2008 June, 29
 
 This file describes the general procedures used by the LinuxTV team (*)
 and by the v4l-dvb community.
@@ -355,6 +355,16 @@ m) Commit earlier and commit often. Th
committed at kernel at the proper time. It also means that the one
changeset should ideally address just one issue. So, mixing different
things at the same patch should be avoided.
+
+n) Sometimes, the maintainer may need to slightly modify patches you receive
+   in order to merge them, because the code is not exactly the same in your
+   tree and the submitters'. In order to save time, it may do the changes and
+   add a line before his SOB, as stated on Documentation/SubmittingPatches,
+   describing what he did to merge it. Something like:
+
+Signed-off-by: Random J Developer [EMAIL PROTECTED]
+[EMAIL PROTECTED]: struct foo moved from foo.c to foo.h]
+Signed-off-by: Lucky K Maintainer [EMAIL PROTECTED]
 
 5. Knowing about newer patches committed at master hg repository
=


---

Patch is available at: 
http://linuxtv.org/hg/v4l-dvb/rev/196be6985dba4c44cb70c3302e78169118195be2

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[linuxtv-commits] [hg:v4l-dvb] Fix whitespace diffs between -git and mercurial

2008-06-29 Thread Patch from Mauro Carvalho Chehab
The patch number 8145 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
Fix whitespace diffs between -git and mercurial


Kernel-sync:

Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 linux/drivers/media/common/ir-keymaps.c |1 -
 linux/drivers/media/video/cx18/cx18-cards.h |2 +-
 linux/drivers/media/video/videodev.c|4 ++--
 3 files changed, 3 insertions(+), 4 deletions(-)

diff -r 196be6985dba -r 9a947bb6b25c linux/drivers/media/common/ir-keymaps.c
--- a/linux/drivers/media/common/ir-keymaps.c   Sun Jun 29 06:03:11 2008 -0300
+++ b/linux/drivers/media/common/ir-keymaps.c   Sun Jun 29 06:49:26 2008 -0300
@@ -2289,4 +2289,3 @@ IR_KEYTAB_TYPE ir_codes_avermedia_a16d[I
[0x2a] = KEY_MENU,
 };
 EXPORT_SYMBOL_GPL(ir_codes_avermedia_a16d);
-
diff -r 196be6985dba -r 9a947bb6b25c linux/drivers/media/video/cx18/cx18-cards.h
--- a/linux/drivers/media/video/cx18/cx18-cards.h   Sun Jun 29 06:03:11 
2008 -0300
+++ b/linux/drivers/media/video/cx18/cx18-cards.h   Sun Jun 29 06:49:26 
2008 -0300
@@ -130,7 +130,7 @@ struct cx18_card {
u8 xceive_pin;  /* XCeive tuner GPIO reset pin */
struct cx18_gpio_initgpio_init;
struct cx18_gpio_i2c_slave_reset gpio_i2c_slave_reset;
-   struct cx18_gpio_audio_inputgpio_audio_input;
+   struct cx18_gpio_audio_inputgpio_audio_input;
 
struct cx18_card_tuner tuners[CX18_CARD_MAX_TUNERS];
struct cx18_card_tuner_i2c *i2c;
diff -r 196be6985dba -r 9a947bb6b25c linux/drivers/media/video/videodev.c
--- a/linux/drivers/media/video/videodev.c  Sun Jun 29 06:03:11 2008 -0300
+++ b/linux/drivers/media/video/videodev.c  Sun Jun 29 06:49:26 2008 -0300
@@ -413,8 +413,8 @@ static ssize_t show_dev(struct class_dev
 }
 
 static DEVICE_ATTR(dev, S_IRUGO, show_dev, NULL);
-#endif
-
+
+#endif
 struct video_device *video_device_alloc(void)
 {
struct video_device *vfd;


---

Patch is available at: 
http://linuxtv.org/hg/v4l-dvb/rev/9a947bb6b25caf4d5743abe0240477b7aa9b3297

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[linuxtv-commits] [hg:v4l-dvb] merge: http://linuxtv.org/hg/~mkrufky/cxusb

2008-06-29 Thread Patch from Mauro Carvalho Chehab
The patch number 8148 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
merge: http://linuxtv.org/hg/~mkrufky/cxusb




Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 linux/drivers/media/dvb/dvb-usb/cxusb.c   |  146 +-
 linux/drivers/media/dvb/dvb-usb/cxusb.h   |3 
 linux/drivers/media/dvb/dvb-usb/dvb-usb-ids.h |5 
 linux/drivers/media/dvb/frontends/lgdt330x.c  |   24 ++
 4 files changed, 169 insertions(+), 9 deletions(-)

diff -r 9a947bb6b25c -r 2dba6fb73892 linux/drivers/media/dvb/dvb-usb/cxusb.c
--- a/linux/drivers/media/dvb/dvb-usb/cxusb.c   Sun Jun 29 06:49:26 2008 -0300
+++ b/linux/drivers/media/dvb/dvb-usb/cxusb.c   Sun Jun 29 07:19:06 2008 -0300
@@ -34,6 +34,7 @@
 #include zl10353.h
 #include tuner-xc2028.h
 #include tuner-simple.h
+#include mxl5005s.h
 
 /* debug */
 static int dvb_usb_cxusb_debug;
@@ -42,9 +43,8 @@ MODULE_PARM_DESC(debug, set debugging l
 
 DVB_DEFINE_MOD_OPT_ADAPTER_NR(adapter_nr);
 
-#define deb_info(args...)   dprintk(dvb_usb_cxusb_debug,0x01,args)
-#define deb_i2c(args...)if (d-udev-descriptor.idVendor == 
USB_VID_MEDION) \
-   dprintk(dvb_usb_cxusb_debug,0x01,args)
+#define deb_info(args...)   dprintk(dvb_usb_cxusb_debug, 0x03, args)
+#define deb_i2c(args...)dprintk(dvb_usb_cxusb_debug, 0x02, args)
 
 static int cxusb_ctrl_msg(struct dvb_usb_device *d,
  u8 cmd, u8 *wbuf, int wlen, u8 *rbuf, int rlen)
@@ -201,6 +201,46 @@ static int cxusb_power_ctrl(struct dvb_u
return cxusb_ctrl_msg(d, CMD_POWER_OFF, b, 1, NULL, 0);
 }
 
+static int cxusb_aver_power_ctrl(struct dvb_usb_device *d, int onoff)
+{
+   int ret;
+   if (!onoff)
+   return cxusb_ctrl_msg(d, CMD_POWER_OFF, NULL, 0, NULL, 0);
+   if (d-state == DVB_USB_STATE_INIT 
+   usb_set_interface(d-udev, 0, 0)  0)
+   err(set interface failed);
+   do; while (!(ret = cxusb_ctrl_msg(d, CMD_POWER_ON, NULL, 0, NULL, 0)) 
+  !(ret = cxusb_ctrl_msg(d, 0x15, NULL, 0, NULL, 0)) 
+  !(ret = cxusb_ctrl_msg(d, 0x17, NULL, 0, NULL, 0))  0);
+   if (!ret) {
+   /* FIXME: We don't know why, but we need to configure the
+* lgdt3303 with the register settings below on resume */
+   int i;
+   u8 buf, bufs[] = {
+   0x0e, 0x2, 0x00, 0x7f,
+   0x0e, 0x2, 0x02, 0xfe,
+   0x0e, 0x2, 0x02, 0x01,
+   0x0e, 0x2, 0x00, 0x03,
+   0x0e, 0x2, 0x0d, 0x40,
+   0x0e, 0x2, 0x0e, 0x87,
+   0x0e, 0x2, 0x0f, 0x8e,
+   0x0e, 0x2, 0x10, 0x01,
+   0x0e, 0x2, 0x14, 0xd7,
+   0x0e, 0x2, 0x47, 0x88,
+   };
+   msleep(20);
+   for (i = 0; i  sizeof(bufs)/sizeof(u8); i += 4/sizeof(u8)) {
+   ret = cxusb_ctrl_msg(d, CMD_I2C_WRITE,
+bufs+i, 4, buf, 1);
+   if (ret)
+   break;
+   if (buf != 0x8)
+   return -EREMOTEIO;
+   }
+   }
+   return ret;
+}
+
 static int cxusb_bluebird_power_ctrl(struct dvb_usb_device *d, int onoff)
 {
u8 b = 0;
@@ -229,6 +269,16 @@ static int cxusb_streaming_ctrl(struct d
else
cxusb_ctrl_msg(adap-dev, CMD_STREAMING_OFF, NULL, 0, NULL, 0);
 
+   return 0;
+}
+
+static int cxusb_aver_streaming_ctrl(struct dvb_usb_adapter *adap, int onoff)
+{
+   if (onoff)
+   cxusb_ctrl_msg(adap-dev, CMD_AVER_STREAM_ON, NULL, 0, NULL, 0);
+   else
+   cxusb_ctrl_msg(adap-dev, CMD_AVER_STREAM_OFF,
+  NULL, 0, NULL, 0);
return 0;
 }
 
@@ -422,6 +472,12 @@ static struct lgdt330x_config cxusb_lgdt
.demod_chip= LGDT3303,
 };
 
+static struct lgdt330x_config cxusb_aver_lgdt3303_config = {
+   .demod_address   = 0x0e,
+   .demod_chip  = LGDT3303,
+   .clock_polarity_flip = 2,
+};
+
 static struct mt352_config cxusb_dee1601_config = {
.demod_address = 0x0f,
.demod_init= cxusb_dee1601_demod_init,
@@ -450,6 +506,24 @@ static struct mt352_config cxusb_mt352_x
.if2 = 4560,
.no_tuner = 1,
.demod_init = cxusb_mt352_demod_init,
+};
+
+/* FIXME: needs tweaking */
+static struct mxl5005s_config aver_a868r_tuner = {
+   

[linuxtv-commits] [hg:v4l-dvb] merge: http://linuxtv.org/hg/~jfrancois/gspca/

2008-06-30 Thread Patch from Mauro Carvalho Chehab
The patch number 8160 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
merge: http://linuxtv.org/hg/~jfrancois/gspca/


Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 README.patches|6 
 linux/Documentation/video4linux/gspca.txt |  240 
 linux/drivers/media/video/Kconfig |2 
 linux/drivers/media/video/Makefile|1 
 linux/drivers/media/video/gspca/Kconfig   |   13 
 linux/drivers/media/video/gspca/Makefile  |   29 
 linux/drivers/media/video/gspca/conex.c   | 1059 +++
 linux/drivers/media/video/gspca/etoms.c   | 1068 +++
 linux/drivers/media/video/gspca/gspca.c   | 2016 +
 linux/drivers/media/video/gspca/gspca.h   |  200 
 linux/drivers/media/video/gspca/jpeg.h|  301 
 linux/drivers/media/video/gspca/mars.c|  455 +
 linux/drivers/media/video/gspca/ov519.c   | 2228 ++
 linux/drivers/media/video/gspca/pac207.c  |  943 ++
 linux/drivers/media/video/gspca/pac7311.c |  770 ++
 linux/drivers/media/video/gspca/sonixb.c  |  887 ++
 linux/drivers/media/video/gspca/sonixj.c  | 1650 
 linux/drivers/media/video/gspca/spca500.c | 1212 +++
 linux/drivers/media/video/gspca/spca501.c | 2230 ++
 linux/drivers/media/video/gspca/spca505.c | 1002 ++
 linux/drivers/media/video/gspca/spca506.c |  830 ++
 linux/drivers/media/video/gspca/spca508.c | 1812 +
 linux/drivers/media/video/gspca/spca561.c | 1025 ++
 linux/drivers/media/video/gspca/stk014.c  |  588 +
 linux/drivers/media/video/gspca/sunplus.c | 1669 
 linux/drivers/media/video/gspca/t613.c| 1049 +++
 linux/drivers/media/video/gspca/tv8532.c  |  722 ++
 linux/drivers/media/video/gspca/vc032x.c  | 2013 +
 linux/drivers/media/video/gspca/zc3xx.c   | 7588 ++
 linux/include/asm-arm/arch-pxa/pxa-regs.h |   12 
 linux/include/linux/videodev2.h   |2 
 v4l/scripts/check_deps.pl |8 
 32 files changed, 33617 insertions(+), 13 deletions(-)

diff discarded since it is too big

---

Patch is available at: 
http://linuxtv.org/hg/v4l-dvb/rev/92f844f35c39535f235a39979037263d21e2304e

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[linuxtv-commits] [hg:v4l-dvb] merge: http://www.linuxtv.org/hg/~hverkuil/v4l-dvb-no-saa71xx

2008-07-01 Thread Patch from Mauro Carvalho Chehab
The patch number 8174 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
merge: http://www.linuxtv.org/hg/~hverkuil/v4l-dvb-no-saa71xx


Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 linux/drivers/media/video/saa711x.c |  618 
 1 file changed, 618 deletions(-)

diff -r 682760d4b111 -r 3a045147cfad linux/drivers/media/video/saa711x.c
--- a/linux/drivers/media/video/saa711x.c   Tue Jul 01 17:16:09 2008 -0300
+++ /dev/null   Thu Jan 01 00:00:00 1970 +
@@ -1,618 +0,0 @@
-/*
- * saa711x - Philips SAA711x video decoder driver version 0.0.1
- *
- * To do: Now, it handles only saa7113/7114. Should be improved to
- * handle all Philips saa711x devices.
- *
- * Based on saa7113 driver from Dave Perks [EMAIL PROTECTED]
- *
- * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-#include linux/module.h
-#include linux/init.h
-#include linux/delay.h
-#include linux/errno.h
-#include linux/fs.h
-#include linux/kernel.h
-#include linux/major.h
-#include linux/slab.h
-#include linux/mm.h
-#include linux/signal.h
-#include asm/io.h
-#include asm/pgtable.h
-#include asm/page.h
-#include linux/types.h
-#include asm/uaccess.h
-#include compat.h
-#include linux/videodev.h
-
-MODULE_DESCRIPTION(Philips SAA711x video decoder driver);
-MODULE_AUTHOR(Dave Perks, Jose Ignacio Gijon, Joerg Heckenbach, Mark 
McClelland, Dwaine Garden);
-MODULE_LICENSE(GPL);
-
-#include linux/i2c.h
-#if LINUX_VERSION_CODE  KERNEL_VERSION(2,5,0)
-#include i2c-compat.h
-#endif
-
-#define I2C_NAME(s) (s)-name
-
-#include linux/video_decoder.h
-
-static int debug;
-module_param(debug, int, 0644);
-MODULE_PARM_DESC(debug,  Set the default Debug level.  Default: 0 (Off) - 
(0-1));
-
-
-#define dprintk(num, format, args...) \
-   do { \
-   if (debug = num) \
-   printk(format, ##args); \
-   } while (0)
-
-/* --- */
-
-struct saa711x {
-   unsigned char reg[32];
-
-   int norm;
-   int input;
-   int enable;
-   int bright;
-   int contrast;
-   int hue;
-   int sat;
-};
-
-#define   I2C_SAA71130x4A
-#define   I2C_SAA71140x42
-
-/* --- */
-
-static inline int
-saa711x_write (struct i2c_client *client,
-  u8 reg,
-  u8 value)
-{
-   struct saa711x *decoder = i2c_get_clientdata(client);
-
-   decoder-reg[reg] = value;
-   return i2c_smbus_write_byte_data(client, reg, value);
-}
-
-static int
-saa711x_write_block (struct i2c_client *client,
-const u8  *data,
-unsigned int   len)
-{
-   int ret = -1;
-   u8 reg;
-
-   /* the saa711x has an autoincrement function, use it if
-* the adapter understands raw I2C */
-   if (i2c_check_functionality(client-adapter, I2C_FUNC_I2C)) {
-   /* do raw I2C, not smbus compatible */
-   struct saa711x *decoder = i2c_get_clientdata(client);
-   struct i2c_msg msg;
-   u8 block_data[32];
-
-   msg.addr = client-addr;
-   msg.flags = 0;
-   while (len = 2) {
-   msg.buf = (char *) block_data;
-   msg.len = 0;
-   block_data[msg.len++] = reg = data[0];
-   do {
-   block_data[msg.len++] =
-   decoder-reg[reg++] = data[1];
-   len -= 2;
-   data += 2;
-   } while (len = 2  data[0] == reg 
-msg.len  32);
-   if ((ret = i2c_transfer(client-adapter,
-   msg, 1))  0)
- 

[linuxtv-commits] [hg:v4l-dvb] merge: http://linuxtv.org/hg/~mcisely/pvrusb2

2008-07-01 Thread Patch from Mauro Carvalho Chehab
The patch number 8177 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
merge: http://linuxtv.org/hg/~mcisely/pvrusb2


Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 linux/drivers/media/video/pvrusb2/pvrusb2-hdw.c |   34 +++-
 1 file changed, 25 insertions(+), 9 deletions(-)

diff -r 3a045147cfad -r d51bf59f63b5 
linux/drivers/media/video/pvrusb2/pvrusb2-hdw.c
--- a/linux/drivers/media/video/pvrusb2/pvrusb2-hdw.c   Tue Jul 01 17:18:54 
2008 -0300
+++ b/linux/drivers/media/video/pvrusb2/pvrusb2-hdw.c   Tue Jul 01 17:20:13 
2008 -0300
@@ -2477,21 +2477,37 @@ static int pvr2_hdw_commit_execute(struc
struct pvr2_ctrl *cptr;
int disruptive_change;
 
-   /* When video standard changes, reset the hres and vres values -
-  but if the user has pending changes there, then let the changes
-  take priority. */
+   /* Handle some required side effects when the video standard is
+  changed */
if (hdw-std_dirty) {
+   int nvres;
+   int gop_size;
+   if (hdw-std_mask_cur  V4L2_STD_525_60) {
+   nvres = 480;
+   gop_size = 15;
+   } else {
+   nvres = 576;
+   gop_size = 12;
+   }
/* Rewrite the vertical resolution to be appropriate to the
   video standard that has been selected. */
-   int nvres;
-   if (hdw-std_mask_cur  V4L2_STD_525_60) {
-   nvres = 480;
-   } else {
-   nvres = 576;
-   }
if (nvres != hdw-res_ver_val) {
hdw-res_ver_val = nvres;
hdw-res_ver_dirty = !0;
+   }
+   /* Rewrite the GOP size to be appropriate to the video
+  standard that has been selected. */
+   if (gop_size != hdw-enc_ctl_state.video_gop_size) {
+   struct v4l2_ext_controls cs;
+   struct v4l2_ext_control c1;
+   memset(cs, 0, sizeof(cs));
+   memset(c1, 0, sizeof(c1));
+   cs.controls = c1;
+   cs.count = 1;
+   c1.id = V4L2_CID_MPEG_VIDEO_GOP_SIZE;
+   c1.value = gop_size;
+   cx2341x_ext_ctrls(hdw-enc_ctl_state, 0, cs,
+ VIDIOC_S_EXT_CTRLS);
}
}
 


---

Patch is available at: 
http://linuxtv.org/hg/v4l-dvb/rev/d51bf59f63b5681df5e811fb1f5e70dc2f861a6b

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[linuxtv-commits] [hg:v4l-dvb] uvc: Fix compilation breakage for the other drivers, if uvc is selected

2008-07-02 Thread Patch from Mauro Carvalho Chehab
The patch number 8178 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
uvc: Fix compilation breakage for the other drivers, if uvc is selected


UVC makefile defines obj as:
obj-$(CONFIG_USB_VIDEO_CLASS) := uvcvideo.o
Instead of:
obj-$(CONFIG_USB_VIDEO_CLASS) += uvcvideo.o

Due to that, if uvc is selected, all obj-y or obj-m that were added to
compilation were forget. This breaks a proper kernel build.

CC: Laurent Pinchart [EMAIL PROTECTED]
Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 linux/drivers/media/video/uvc/Makefile |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff -r d51bf59f63b5 -r 02cda7958a05 linux/drivers/media/video/uvc/Makefile
--- a/linux/drivers/media/video/uvc/MakefileTue Jul 01 17:20:13 2008 -0300
+++ b/linux/drivers/media/video/uvc/MakefileWed Jul 02 08:03:33 2008 -0300
@@ -1,3 +1,3 @@ uvcvideo-objs  := uvc_driver.o uvc_queue
 uvcvideo-objs  := uvc_driver.o uvc_queue.o uvc_v4l2.o uvc_video.o uvc_ctrl.o \
  uvc_status.o uvc_isight.o
-obj-$(CONFIG_USB_VIDEO_CLASS) := uvcvideo.o
+obj-$(CONFIG_USB_VIDEO_CLASS) += uvcvideo.o


---

Patch is available at: 
http://linuxtv.org/hg/v4l-dvb/rev/02cda7958a05b568b2851aeb88b57dba8fb77eb9

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[linuxtv-commits] [hg:v4l-dvb] merge: http://linuxtv.org/hg/~jfrancois/gspca/

2008-07-07 Thread Patch from Mauro Carvalho Chehab
The patch number 8206 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
merge: http://linuxtv.org/hg/~jfrancois/gspca/


Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 linux/drivers/media/video/gspca/conex.c   |  187 +++---
 linux/drivers/media/video/gspca/etoms.c   |  639 +-
 linux/drivers/media/video/gspca/gspca.c   |  167 +
 linux/drivers/media/video/gspca/gspca.h   |   39 -
 linux/drivers/media/video/gspca/mars.c|   79 +-
 linux/drivers/media/video/gspca/ov519.c   |   90 +--
 linux/drivers/media/video/gspca/pac207.c  |  396 ++---
 linux/drivers/media/video/gspca/pac7311.c |  121 ++--
 linux/drivers/media/video/gspca/sonixb.c  |   90 ++-
 linux/drivers/media/video/gspca/sonixj.c  |  192 +++---
 linux/drivers/media/video/gspca/spca500.c |  375 ++--
 linux/drivers/media/video/gspca/spca501.c |   51 +
 linux/drivers/media/video/gspca/spca505.c |   60 +-
 linux/drivers/media/video/gspca/spca506.c |   52 +
 linux/drivers/media/video/gspca/spca508.c |  100 +--
 linux/drivers/media/video/gspca/spca561.c |   62 +-
 linux/drivers/media/video/gspca/stk014.c  |   50 -
 linux/drivers/media/video/gspca/sunplus.c |   86 ++
 linux/drivers/media/video/gspca/t613.c|  257 +---
 linux/drivers/media/video/gspca/tv8532.c  |   53 -
 linux/drivers/media/video/gspca/vc032x.c  |  118 ++--
 linux/drivers/media/video/gspca/zc3xx.c   |  318 +-
 linux/include/linux/videodev2.h   |4 
 23 files changed, 1725 insertions(+), 1861 deletions(-)

diff discarded since it is too big

---

Patch is available at: 
http://linuxtv.org/hg/v4l-dvb/rev/e937406381c0334c58b7e4a44f69eb1b65e8bb37

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[linuxtv-commits] [hg:v4l-dvb] merge: http://www.linuxtv.org/hg/~tmerle/v4l2-library

2008-07-08 Thread Patch from Mauro Carvalho Chehab
The patch number 8230 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
merge: http://www.linuxtv.org/hg/~tmerle/v4l2-library


Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 v4l/scripts/strip-trailing-whitespaces.sh|6 
 v4l2-apps/lib/libv4l/ChangeLog   |  165 
 v4l2-apps/lib/libv4l/Makefile|   16 
 v4l2-apps/lib/libv4l/README  |  141 
 v4l2-apps/lib/libv4l/README.multi-threading  |   12 
 v4l2-apps/lib/libv4l/TODO|   12 
 v4l2-apps/lib/libv4l/appl-patches/camorama-0.19-fixes.patch  |   90 
 v4l2-apps/lib/libv4l/appl-patches/kdenetwork-4.0.85-kopete.patch |   12 
 v4l2-apps/lib/libv4l/appl-patches/vlc-0.8.6-libv4l1.patch|  319 +
 v4l2-apps/lib/libv4l/appl-patches/xawtv-3.95-fixes.patch |   29 
 v4l2-apps/lib/libv4l/include/libv4l1.h   |   67 
 v4l2-apps/lib/libv4l/include/libv4l2.h   |  104 
 v4l2-apps/lib/libv4l/include/libv4lconvert.h |   67 
 v4l2-apps/lib/libv4l/libv4l1/Makefile|   56 
 v4l2-apps/lib/libv4l/libv4l1/libv4l1-priv.h  |   74 
 v4l2-apps/lib/libv4l/libv4l1/libv4l1.c   |  831 +++
 v4l2-apps/lib/libv4l/libv4l1/log.c   |  138 
 v4l2-apps/lib/libv4l/libv4l1/v4l1compat.c|  117 
 v4l2-apps/lib/libv4l/libv4l2/Makefile|   55 
 v4l2-apps/lib/libv4l/libv4l2/libv4l2-priv.h  |  103 
 v4l2-apps/lib/libv4l/libv4l2/libv4l2.c   | 1049 
 v4l2-apps/lib/libv4l/libv4l2/log.c   |  138 
 v4l2-apps/lib/libv4l/libv4l2/v4l2convert.c   |  152 
 v4l2-apps/lib/libv4l/libv4lconvert/Makefile  |   50 
 v4l2-apps/lib/libv4l/libv4lconvert/bayer.c   |  597 ++
 v4l2-apps/lib/libv4l/libv4lconvert/jidctflt.c|  286 +
 v4l2-apps/lib/libv4l/libv4lconvert/libv4lconvert-priv.h  |   90 
 v4l2-apps/lib/libv4l/libv4lconvert/libv4lconvert.c   |  374 +
 v4l2-apps/lib/libv4l/libv4lconvert/pac207.c  |  418 +
 v4l2-apps/lib/libv4l/libv4lconvert/rgbyuv.c  |   82 
 v4l2-apps/lib/libv4l/libv4lconvert/sn9c10x.c |  287 +
 v4l2-apps/lib/libv4l/libv4lconvert/spca501.c |   67 
 v4l2-apps/lib/libv4l/libv4lconvert/spca561-decompress.c  | 1002 
 v4l2-apps/lib/libv4l/libv4lconvert/tinyjpeg-internal.h   |  121 
 v4l2-apps/lib/libv4l/libv4lconvert/tinyjpeg.c| 2164 
++
 v4l2-apps/lib/libv4l/libv4lconvert/tinyjpeg.h|   73 
 36 files changed, 9364 insertions(+)

diff discarded since it is too big

---

Patch is available at: 
http://linuxtv.org/hg/v4l-dvb/rev/7485e46c30e9b2b06a9e76ccb162311696ac35f0

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[linuxtv-commits] [hg:v4l-dvb] merge: http://linuxtv.org/hg/~jfrancois/gspca/

2008-07-08 Thread Patch from Mauro Carvalho Chehab
The patch number 8233 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
merge: http://linuxtv.org/hg/~jfrancois/gspca/


Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 linux/drivers/media/video/gspca/etoms.c  |2 
 linux/drivers/media/video/gspca/gspca.c  |  205 +--
 linux/drivers/media/video/gspca/gspca.h  |2 
 linux/drivers/media/video/gspca/sonixb.c |2 
 linux/drivers/media/video/gspca/sonixj.c |4 
 linux/drivers/media/video/gspca/vc032x.c |   16 -
 linux/drivers/media/video/gspca/zc3xx.c  |   23 +-
 7 files changed, 85 insertions(+), 169 deletions(-)

diff -r 7485e46c30e9 -r 28ab9f5b4d3e linux/drivers/media/video/gspca/etoms.c
--- a/linux/drivers/media/video/gspca/etoms.c   Tue Jul 08 07:20:50 2008 -0300
+++ b/linux/drivers/media/video/gspca/etoms.c   Tue Jul 08 07:25:08 2008 -0300
@@ -918,7 +918,9 @@ static struct sd_desc sd_desc = {
 /* -- module initialisation -- */
 #define DVNM(name) .driver_info = (kernel_ulong_t) name
 static __devinitdata struct usb_device_id device_table[] = {
+#ifndef CONFIG_USB_ET61X251
{USB_DEVICE(0x102c, 0x6151), DVNM(Qcam Sangha CIF)},
+#endif
{USB_DEVICE(0x102c, 0x6251), DVNM(Qcam xx VGA)},
{}
 };
diff -r 7485e46c30e9 -r 28ab9f5b4d3e linux/drivers/media/video/gspca/gspca.c
--- a/linux/drivers/media/video/gspca/gspca.c   Tue Jul 08 07:20:50 2008 -0300
+++ b/linux/drivers/media/video/gspca/gspca.c   Tue Jul 08 07:25:08 2008 -0300
@@ -36,15 +36,14 @@
 #include gspca.h
 
 /* global values */
-#define DEF_NURBS 2/* default number of URBs (mmap) */
-#define USR_NURBS 5/* default number of URBs (userptr) */
+#define DEF_NURBS 2/* default number of URBs */
 
 MODULE_AUTHOR(Jean-Francois Moine http://moinejf.free.fr);
 MODULE_DESCRIPTION(GSPCA USB Camera Driver);
 MODULE_LICENSE(GPL);
 
-#define DRIVER_VERSION_NUMBER  KERNEL_VERSION(2, 1, 5)
-static const char version[] = 2.1.5;
+#define DRIVER_VERSION_NUMBER  KERNEL_VERSION(2, 1, 6)
+static const char version[] = 2.1.6;
 
 static int video_nr = -1;
 
@@ -153,7 +152,6 @@ static void fill_frame(struct gspca_dev 
}
 
/* resubmit the URB */
-/*fixme: don't do that when userptr and too many URBs sent*/
urb-status = 0;
st = usb_submit_urb(urb, GFP_ATOMIC);
if (st  0)
@@ -163,18 +161,9 @@ static void fill_frame(struct gspca_dev 
 /*
  * ISOC message interrupt from the USB device
  *
- * Analyse each packet and call the subdriver for copy
- * to the frame buffer.
- *
- * There are 2 functions:
- * - the first one (isoc_irq_mmap) is used when the application
- *   buffers are mapped. The frame detection and copy is done
- *   at interrupt level.
- * - the second one (isoc_irq_user) is used when the application
- *   buffers are in user space (userptr). The frame detection
- *   and copy is done by the application.
+ * Analyse each packet and call the subdriver for copy to the frame buffer.
  */
-static void isoc_irq_mmap(struct urb *urb
+static void isoc_irq(struct urb *urb
 #if LINUX_VERSION_CODE  KERNEL_VERSION(2, 6, 19)
, struct pt_regs *regs
 #endif
@@ -188,59 +177,11 @@ static void isoc_irq_mmap(struct urb *ur
fill_frame(gspca_dev, urb);
 }
 
-static void isoc_irq_user(struct urb *urb
-#if LINUX_VERSION_CODE  KERNEL_VERSION(2, 6, 19)
-   , struct pt_regs *regs
-#endif
-)
-{
-   struct gspca_dev *gspca_dev = (struct gspca_dev *) urb-context;
-   int i;
-
-   PDEBUG(D_PACK, isoc irq user);
-   if (!gspca_dev-streaming)
-   return;
-
-   i = gspca_dev-urb_in % gspca_dev-nurbs;
-   if (urb != gspca_dev-urb[i]) {
-   PDEBUG(D_ERR|D_PACK, urb out of sequence);
-   return; /* should never occur */
-   }
-
-   gspca_dev-urb_in++;
-   atomic_inc(gspca_dev-nevent); /* new event */
-   wake_up_interruptible(gspca_dev-wq);
-/*fixme: submit a new URBs until urb_in == urb_out (% nurbs)*/
-}
-
-/*
- * treat the isoc messages
- *
- * This routine is called by the application (case userptr).
- */
-static void isoc_transfer(struct gspca_dev *gspca_dev)
-{
-   struct urb *urb;
-   int i;
-
-   for (;;) {
-   i = gspca_dev-urb_out;
-   PDEBUG(D_PACK, isoc transf i:%d o:%d, gspca_dev-urb_in, i);
-   if (i == gspca_dev-urb_in) /* isoc message to read */
-   break;  /* no (more) message */
-   atomic_dec(gspca_dev-nevent);

[linuxtv-commits] [hg:v4l-dvb] merge: http://linuxtv.org/hg/~mkrufky/fusionhdtv7

2008-07-09 Thread Patch from Mauro Carvalho Chehab
The patch number 8237 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
merge: http://linuxtv.org/hg/~mkrufky/fusionhdtv7


Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 linux/drivers/media/video/cx23885/Kconfig   |1 +
 linux/drivers/media/video/cx23885/cx23885-dvb.c |   15 +++
 2 files changed, 16 insertions(+)

diff -r 9ff62c80bf4c -r 235a576fd9b7 linux/drivers/media/video/cx23885/Kconfig
--- a/linux/drivers/media/video/cx23885/Kconfig Mon Jul 07 23:41:40 2008 +
+++ b/linux/drivers/media/video/cx23885/Kconfig Wed Jul 09 22:42:07 2008 -0300
@@ -14,6 +14,7 @@ config VIDEO_CX23885
select DVB_DIB7000P if !DVB_FE_CUSTOMISE
select MEDIA_TUNER_MT2131 if !DVB_FE_CUSTOMISE
select DVB_S5H1409 if !DVB_FE_CUSTOMISE
+   select DVB_S5H1411 if !DVB_FE_CUSTOMISE
select DVB_LGDT330X if !DVB_FE_CUSTOMISE
select MEDIA_TUNER_XC2028 if !DVB_FE_CUSTOMIZE
select MEDIA_TUNER_TDA8290 if !DVB_FE_CUSTOMIZE
diff -r 9ff62c80bf4c -r 235a576fd9b7 
linux/drivers/media/video/cx23885/cx23885-dvb.c
--- a/linux/drivers/media/video/cx23885/cx23885-dvb.c   Mon Jul 07 23:41:40 
2008 +
+++ b/linux/drivers/media/video/cx23885/cx23885-dvb.c   Wed Jul 09 22:42:07 
2008 -0300
@@ -32,6 +32,7 @@
 #include media/v4l2-common.h
 
 #include s5h1409.h
+#include s5h1411.h
 #include mt2131.h
 #include tda8290.h
 #include tda18271.h
@@ -173,6 +174,16 @@ static struct s5h1409_config dvico_s5h14
.inversion = S5H1409_INVERSION_OFF,
.status_mode   = S5H1409_DEMODLOCKING,
.mpeg_timing   = S5H1409_MPEGTIMING_CONTINOUS_NONINVERTING_CLOCK,
+};
+
+static struct s5h1411_config dvico_s5h1411_config = {
+   .output_mode   = S5H1411_SERIAL_OUTPUT,
+   .gpio  = S5H1411_GPIO_ON,
+   .qam_if= S5H1411_IF_44000,
+   .vsb_if= S5H1411_IF_44000,
+   .inversion = S5H1411_INVERSION_OFF,
+   .status_mode   = S5H1411_DEMODLOCKING,
+   .mpeg_timing   = S5H1411_MPEGTIMING_CONTINOUS_NONINVERTING_CLOCK,
 };
 
 static struct xc5000_config hauppauge_hvr1500q_tunerconfig = {
@@ -476,6 +487,10 @@ static int dvb_register(struct cx23885_t
port-dvb.frontend = dvb_attach(s5h1409_attach,
dvico_s5h1409_config,
i2c_bus-i2c_adap);
+   if (port-dvb.frontend == NULL)
+   port-dvb.frontend = dvb_attach(s5h1411_attach,
+   dvico_s5h1411_config,
+   i2c_bus-i2c_adap);
if (port-dvb.frontend != NULL)
dvb_attach(xc5000_attach, port-dvb.frontend,
i2c_bus-i2c_adap,


---

Patch is available at: 
http://linuxtv.org/hg/v4l-dvb/rev/235a576fd9b718f1181c4e26fa36d1831a33b217

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[linuxtv-commits] [hg:v4l-dvb] Update checkpatch.pl with the latest one

2008-07-12 Thread Patch from Mauro Carvalho Chehab
The patch number 8321 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
Update checkpatch.pl with the latest one




Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 v4l/scripts/checkpatch.pl |  427 +-
 1 file changed, 289 insertions(+), 138 deletions(-)

diff -r 8160bf751a86 -r 32b730f9f8da v4l/scripts/checkpatch.pl
--- a/v4l/scripts/checkpatch.pl Sat Jul 12 10:24:29 2008 -0300
+++ b/v4l/scripts/checkpatch.pl Sat Jul 12 16:42:59 2008 -0300
@@ -9,7 +9,7 @@ my $P = $0;
 my $P = $0;
 $P =~ [EMAIL PROTECTED]/@@g;
 
-my $V = '0.16';
+my $V = '0.19';
 
 use Getopt::Long qw(:config no_auto_abbrev);
 
@@ -115,6 +115,7 @@ our $Attribute  = qr{
__kprobes|
__(?:mem|cpu|dev|)(?:initdata|init)
  }x;
+our $Modifier;
 our $Inline= qr{inline|__always_inline|noinline};
 our $Member= qr{-$Ident|\.$Ident|\[[^]]*\]};
 our $Lval  = qr{$Ident(?:$Member)*};
@@ -131,19 +132,30 @@ our $Type;
 our $Type;
 our $Declare;
 
+our $UTF8  = qr {
+   [\x09\x0A\x0D\x20-\x7E]  # ASCII
+   | [\xC2-\xDF][\x80-\xBF] # non-overlong 2-byte
+   |  \xE0[\xA0-\xBF][\x80-\xBF]# excluding overlongs
+   | [\xE1-\xEC\xEE\xEF][\x80-\xBF]{2}  # straight 3-byte
+   |  \xED[\x80-\x9F][\x80-\xBF]# excluding surrogates
+   |  \xF0[\x90-\xBF][\x80-\xBF]{2} # planes 1-3
+   | [\xF1-\xF3][\x80-\xBF]{3}  # planes 4-15
+   |  \xF4[\x80-\x8F][\x80-\xBF]{2} # plane 16
+}x;
+
 our @typeList = (
qr{void},
-   qr{char},
-   qr{short},
-   qr{int},
-   qr{long},
+   qr{(?:unsigned\s+)?char},
+   qr{(?:unsigned\s+)?short},
+   qr{(?:unsigned\s+)?int},
+   qr{(?:unsigned\s+)?long},
+   qr{(?:unsigned\s+)?long\s+int},
+   qr{(?:unsigned\s+)?long\s+long},
+   qr{(?:unsigned\s+)?long\s+long\s+int},
qr{unsigned},
qr{float},
qr{double},
qr{bool},
-   qr{long\s+int},
-   qr{long\s+long},
-   qr{long\s+long\s+int},
qr{(?:__)?(?:u|s|be|le)(?:8|16|32|64)},
qr{struct\s+$Ident},
qr{union\s+$Ident},
@@ -152,26 +164,29 @@ our @typeList = (
qr{${Ident}_handler},
qr{${Ident}_handler_fn},
 );
+our @modifierList = (
+   qr{fastcall},
+);
 
 sub build_types {
+   my $mods = (?:  \n . join(|\n  , @modifierList) . \n);
my $all = (?:  \n . join(|\n  , @typeList) . \n);
$NonptrType = qr{
-   \b
(?:const\s+)?
-   (?:unsigned\s+)?
+   (?:$mods\s+)?
(?:
-   $all|
-   (?:typeof|__typeof__)\s*\(\s*\**\s*$Ident\s*\)
+   (?:typeof|__typeof__)\s*\(\s*\**\s*$Ident\s*\)|
+   (?:${all}\b)
)
(?:\s+$Sparse|\s+const)*
-   \b
  }x;
$Type   = qr{
-   \b$NonptrType\b
+   $NonptrType
(?:\s*\*+\s*const|\s*\*+|(?:\s*\[\s*\])+)?
-   (?:\s+$Inline|\s+$Sparse|\s+$Attribute)*
+   (?:\s+$Inline|\s+$Sparse|\s+$Attribute|\s+$mods)*
  }x;
$Declare= qr{(?:$Storage\s+)?$Type};
+   $Modifier   = qr{(?:$Attribute|$Sparse|$mods)};
 }
 build_types();
 
@@ -318,7 +333,7 @@ sub sanitise_line {
$off++;
next;
}
-   if (substr($line, $off, 2) eq $sanitise_quote) {
+   if (substr($line, $off, 2) eq '*/') {
$sanitise_quote = '';
substr($res, $off, 2, $;$;);
$off++;
@@ -355,14 +370,14 @@ sub sanitise_line {
}
 
# The pathname on a #include may be surrounded by '' and ''.
-   if ($res =~ /^.#\s*include\s+\(.*)\/) {
+   if ($res =~ /^.\s*\#\s*include\s+\(.*)\/) {
my $clean = 'X' x length($1);
$res =~ [EMAIL PROTECTED].*\@$clean@;
 
# The whole of a #error is a string.
-   } elsif ($res =~ /^.#\s*(?:error|warning)\s+(.*)\b/) {
+   } elsif ($res =~ /^.\s*\#\s*(?:error|warning)\s+(.*)\b/) {
my $clean = 'X' x length($1);
-   $res =~ s@(#\s*(?:error|warning)\s+)[EMAIL PROTECTED]@;
+   $res =~ s@(\#\s*(?:error|warning)\s+)[EMAIL PROTECTED]@;

[linuxtv-commits] [hg:v4l-dvb] Don't increment if a patch were renamed

2008-07-17 Thread Patch from Mauro Carvalho Chehab
The patch number 8345 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
Don't increment if a patch were renamed


Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 hgimport |3 +++
 1 file changed, 3 insertions(+)

diff -r 95a1b4af3882 -r 5d98b43bc613 hgimport
--- a/hgimport  Thu Jul 17 10:34:11 2008 -0300
+++ b/hgimport  Thu Jul 17 10:58:44 2008 -0300
@@ -68,6 +68,9 @@ for i in $CS; do
echo -e \t\tNode parents $parents
echo -e \t\tRenamed to $newname
mv $name $newname
+
+   # Avoids incrementing if rename happens
+   j=$((j-1))
fi
else
last=`hg log -r -1|grep changeset`


---

Patch is available at: 
http://linuxtv.org/hg/v4l-dvb/rev/5d98b43bc613deda5d4464ab9626eea698ec48ce

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[linuxtv-commits] [hg:v4l-dvb] gspca: Real names of the zc3xx registers.

2008-07-17 Thread Patch from Mauro Carvalho Chehab
The patch number 8359 was added via Jean-Francois Moine [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
gspca: Real names of the zc3xx registers.


Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]
Signed-off-by: Jean-Francois Moine [EMAIL PROTECTED]


---

 linux/drivers/media/video/gspca/zc3xx.c | 8184 
 1 file changed, 4102 insertions(+), 4082 deletions(-)

diff discarded since it is too big

---

Patch is available at: 
http://linuxtv.org/hg/v4l-dvb/rev/afdd8e33a645444101f662feca0e1d456be29f7e

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[linuxtv-commits] [hg:v4l-dvb] merge: http://linuxtv.org/hg/~jfrancois/gspca/

2008-07-17 Thread Patch from Mauro Carvalho Chehab
The patch number 8375 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
merge: http://linuxtv.org/hg/~jfrancois/gspca/


Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 linux/Documentation/video4linux/gspca.txt|6 
 linux/drivers/media/video/gspca/conex.c  |  421 
 linux/drivers/media/video/gspca/etoms.c  |  493 
 linux/drivers/media/video/gspca/gspca.c  |  252 
 linux/drivers/media/video/gspca/gspca.h  |3 
 linux/drivers/media/video/gspca/mars.c   |  180 
 linux/drivers/media/video/gspca/ov519.c  |   21 
 linux/drivers/media/video/gspca/pac207.c |   91 
 linux/drivers/media/video/gspca/pac7311.c|  355 
 linux/drivers/media/video/gspca/sonixb.c |  873 -
 linux/drivers/media/video/gspca/sonixj.c |  590 
 linux/drivers/media/video/gspca/spca500.c|  285 
 linux/drivers/media/video/gspca/spca501.c|   35 
 linux/drivers/media/video/gspca/spca505.c|   26 
 linux/drivers/media/video/gspca/spca506.c|   37 
 linux/drivers/media/video/gspca/spca508.c|   39 
 linux/drivers/media/video/gspca/spca561.c|  121 
 linux/drivers/media/video/gspca/stk014.c |   86 
 linux/drivers/media/video/gspca/sunplus.c|  305 
 linux/drivers/media/video/gspca/t613.c   |  222 
 linux/drivers/media/video/gspca/tv8532.c |  400 
 linux/drivers/media/video/gspca/vc032x.c |  130 
 linux/drivers/media/video/gspca/zc3xx-reg.h  |  261 
 linux/drivers/media/video/gspca/zc3xx.c  | 8394 +--
 linux/drivers/media/video/sn9c102/sn9c102_devtable.h |2 
 25 files changed, 7213 insertions(+), 6415 deletions(-)

diff discarded since it is too big

---

Patch is available at: 
http://linuxtv.org/hg/v4l-dvb/rev/e43f5566fa03433d3a4d2686f50786e778751ccb

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[linuxtv-commits] [hg:v4l-dvb] Firmware compilation is not working yet. Disable at makefile

2008-07-17 Thread Patch from Mauro Carvalho Chehab
The patch number 8412 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
Firmware compilation is not working yet. Disable at makefile


Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 v4l/Makefile |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff -r 91b64238b184 -r bb7e1607aba0 v4l/Makefile
--- a/v4l/Makefile  Fri Jul 18 01:14:44 2008 -0300
+++ b/v4l/Makefile  Fri Jul 18 01:18:19 2008 -0300
@@ -39,7 +39,7 @@ endif # TOPDIR
 #
 # default compilation rule
 
-default:: config-compat.h Makefile.media links oss firmware
+default:: config-compat.h Makefile.media links oss # firmware
@echo Kernel build directory is $(OUTDIR)
$(MAKE) -C $(OUTDIR) SUBDIRS=$(PWD) $(MYCFLAGS) modules
./scripts/rmmod.pl check


---

Patch is available at: 
http://linuxtv.org/hg/v4l-dvb/rev/bb7e1607aba0a9d7ea1bded33823da3fdae357c5

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[linuxtv-commits] [hg:v4l-dvb] merge: http://www.linuxtv.org/hg/~hverkuil/v4l-dvb

2008-07-17 Thread Patch from Mauro Carvalho Chehab
The patch number 8413 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
merge: http://www.linuxtv.org/hg/~hverkuil/v4l-dvb


Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 linux/drivers/media/video/sh_mobile_ceu_camera.c |6 +++---
 linux/drivers/media/video/videobuf-dma-contig.c  |2 ++
 v4l/compat.h |3 +++
 3 files changed, 8 insertions(+), 3 deletions(-)

diff -r bb7e1607aba0 -r 911df1a096a3 
linux/drivers/media/video/sh_mobile_ceu_camera.c
--- a/linux/drivers/media/video/sh_mobile_ceu_camera.c  Fri Jul 18 01:18:19 
2008 -0300
+++ b/linux/drivers/media/video/sh_mobile_ceu_camera.c  Fri Jul 18 01:19:27 
2008 -0300
@@ -142,7 +142,7 @@ static void free_buffer(struct videobuf_
 {
struct soc_camera_device *icd = vq-priv_data;
 
-   dev_dbg(icd-dev, %s (vb=0x%p) 0x%08lx %d\n, __func__,
+   dev_dbg(icd-dev, %s (vb=0x%p) 0x%08lx %zd\n, __func__,
buf-vb, buf-vb.baddr, buf-vb.bsize);
 
if (in_interrupt())
@@ -179,7 +179,7 @@ static int sh_mobile_ceu_videobuf_prepar
 
buf = container_of(vb, struct sh_mobile_ceu_buffer, vb);
 
-   dev_dbg(icd-dev, %s (vb=0x%p) 0x%08lx %d\n, __func__,
+   dev_dbg(icd-dev, %s (vb=0x%p) 0x%08lx %zd\n, __func__,
vb, vb-baddr, vb-bsize);
 
/* Added list head initialization on alloc */
@@ -232,7 +232,7 @@ static void sh_mobile_ceu_videobuf_queue
struct sh_mobile_ceu_dev *pcdev = ici-priv;
unsigned long flags;
 
-   dev_dbg(icd-dev, %s (vb=0x%p) 0x%08lx %d\n, __func__,
+   dev_dbg(icd-dev, %s (vb=0x%p) 0x%08lx %zd\n, __func__,
vb, vb-baddr, vb-bsize);
 
vb-state = VIDEOBUF_ACTIVE;
diff -r bb7e1607aba0 -r 911df1a096a3 
linux/drivers/media/video/videobuf-dma-contig.c
--- a/linux/drivers/media/video/videobuf-dma-contig.c   Fri Jul 18 01:18:19 
2008 -0300
+++ b/linux/drivers/media/video/videobuf-dma-contig.c   Fri Jul 18 01:19:27 
2008 -0300
@@ -16,8 +16,10 @@
 
 #include linux/init.h
 #include linux/module.h
+#include linux/mm.h
 #include linux/dma-mapping.h
 #include media/videobuf-dma-contig.h
+#include compat.h
 
 struct videobuf_dma_contig_memory {
u32 magic;
diff -r bb7e1607aba0 -r 911df1a096a3 v4l/compat.h
--- a/v4l/compat.h  Fri Jul 18 01:18:19 2008 -0300
+++ b/v4l/compat.h  Fri Jul 18 01:19:27 2008 -0300
@@ -114,6 +114,9 @@ do {
\
p-length = sz; \
p-offset = off;\
 } while (0)
+
+#define pr_err(fmt, arg...) \
+   printk(KERN_ERR fmt, ##arg)
 #endif
 
 #ifndef BIT_MASK


---

Patch is available at: 
http://linuxtv.org/hg/v4l-dvb/rev/911df1a096a339ae7417abd63af04d8b04612051

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[linuxtv-commits] [hg:v4l-dvb] backport commit 4d2acfbfdf68257e846aaa355edd10fc35ba0feb

2008-07-17 Thread Patch from Mauro Carvalho Chehab
The patch number 8408 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
backport commit 4d2acfbfdf68257e846aaa355edd10fc35ba0feb


Author: David Woodhouse [EMAIL PROTECTED]
Date:   Fri May 23 13:58:12 2008 +0100

firmware: Add CONFIG_EXTRA_FIRMWARE option

This allows arbitrary firmware files to be included in the static kernel
where the firmware loader can find them without requiring userspace to
be alive.

(Updated and CONFIG_EXTRA_FIRMWARE_DIR added with lots of help from
Johannes Berg).

kernel-sync:

This patch will need some extra changes at the building system to allow the
static link of the firmwares.

Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 linux/firmware/Makefile |   88 
 1 file changed, 88 insertions(+)

diff -r a908550d3112 -r d723928fcc19 linux/firmware/Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +
+++ b/linux/firmware/Makefile   Thu Jul 17 23:43:10 2008 -0300
@@ -0,0 +1,88 @@
+#
+# kbuild file for firmware/
+#
+
+# Create $(fwabs) from $(CONFIG_EXTRA_FIRMWARE_DIR) -- if it doesn't have a
+# leading /, it's relative to $(srctree).
+fwdir := $(subst ,,$(CONFIG_EXTRA_FIRMWARE_DIR))
+fwabs := $(addprefix $(srctree)/,$(filter-out /%,$(fwdir)))$(filter 
/%,$(fwdir))
+
+fw-external-y := $(subst ,,$(CONFIG_EXTRA_FIRMWARE))
+
+firmware-y:= $(fw-external-y) $(fw-shipped-y)
+firmware-dirs := $(sort $(patsubst %,$(objtree)/$(obj)/%/,$(dir $(firmware-y) 
$(fw-shipped-
+
+quiet_cmd_mkdir = MKDIR   $(patsubst $(objtree)/%,%,$@)
+  cmd_mkdir = mkdir -p $@
+
+quiet_cmd_ihex  = IHEX$@
+  cmd_ihex  = $(OBJCOPY) -Iihex -Obinary $ $@
+
+quiet_cmd_fwbin = MK_FW   $@
+  cmd_fwbin = FWNAME=$(patsubst firmware/%.gen.S,%,$@);   \
+ FWSTR=$(subst /,_,$(subst .,_,$(subst -,_,$(patsubst  \
+   firmware/%.gen.S,%,$@;  \
+ ASM_WORD=$(if $(CONFIG_64BIT),.quad,.long);\
+ ASM_ALIGN=$(if $(CONFIG_64BIT),3,2);   \
+ PROGBITS=$(if $(CONFIG_ARM),%,@)progbits;  \
+ echo /* Generated by firmware/Makefile */$@;\
+ echo .section .rodata   $@;\
+ echo .p2align $${ASM_ALIGN} $@;\
+ echo _fw_$${FWSTR}_bin: $@;\
+ echo .incbin \$(2)\   $@;\
+ echo _fw_end:   $@;\
+ echo.section .rodata.str,\aMS\,$${PROGBITS},1 $@;\
+ echo .p2align $${ASM_ALIGN} $@;\
+ echo _fw_$${FWSTR}_name:$@;\
+ echo .string \$$FWNAME\   $@;\
+ echo .section .builtin_fw,\a\,$${PROGBITS}$@;\
+ echo .p2align $${ASM_ALIGN} $@;\
+ echo $${ASM_WORD} _fw_$${FWSTR}_name$@;\
+ echo $${ASM_WORD} _fw_$${FWSTR}_bin $@;\
+ echo $${ASM_WORD} _fw_end - _fw_$${FWSTR}_bin   $@;
+
+# One of these files will change, or come into existence, whenever
+# the configuration changes between 32-bit and 64-bit. The .S files
+# need to change when that happens.
+wordsize_deps := $(wildcard include/config/64bit.h include/config/32bit.h \
+   include/config/ppc32.h include/config/ppc64.h \
+   include/config/superh32.h include/config/superh64.h \
+   include/config/x86_32.h include/config/x86_64.h)
+
+# Workaround for make  3.81, where .SECONDEXPANSION doesn't work.
+# It'll end up depending on these targets, so make them a PHONY rule which
+# depends on _all_ the directories in $(firmware-dirs), and it'll work out OK.
+PHONY += $(objtree)/$$(%) $(objtree)/$(obj)/$$(%)
+$(objtree)/$$(%) $(objtree)/$(obj)/$$(%): $(firmware-dirs)
+   @true
+
+# For the $$(dir %) trick, where we need % to be expanded first.
+.SECONDEXPANSION:
+
+$(patsubst %,$(obj)/%.gen.S, $(fw-shipped-y)): %: $(wordsize_deps) \
+   | $(objtree)/$$(dir %)
+   $(call cmd,fwbin,$(patsubst %.gen.S,%,$@))
+$(patsubst %,$(obj)/%.gen.S, $(fw-external-y)): %: $(wordsize_deps) \
+   include/config/builtin/firmware/dir.h | $(objtree)/$$(dir %)
+   $(call cmd,fwbin,$(fwabs)/$(patsubst $(obj)/%.gen.S,%,$@))
+
+# The .o files depend on 

[linuxtv-commits] [hg:v4l-dvb] merge: http://linuxtv.org/hg/~jfrancois/gspca/

2008-07-18 Thread Patch from Mauro Carvalho Chehab
The patch number 8416 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
merge: http://linuxtv.org/hg/~jfrancois/gspca/


Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 linux/drivers/media/video/gspca/etoms.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff -r ffbf7bb96b21 -r 1f08e05739b2 linux/drivers/media/video/gspca/etoms.c
--- a/linux/drivers/media/video/gspca/etoms.c   Fri Jul 18 12:07:10 2008 +0200
+++ b/linux/drivers/media/video/gspca/etoms.c   Fri Jul 18 08:11:59 2008 -0300
@@ -292,7 +292,7 @@ static int i2c_w(struct gspca_dev *gspca
 static int i2c_w(struct gspca_dev *gspca_dev,
 __u8 reg,
 const __u8 *buffer,
-__u16 len, __u8 mode)
+int len, __u8 mode)
 {
/* buffer should be [D0..D7] */
__u8 ptchcount;


---

Patch is available at: 
http://linuxtv.org/hg/v4l-dvb/rev/1f08e05739b2fd5975ff1173fce89113910ffef9

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[linuxtv-commits] [hg:v4l-dvb] A few improvements at firmware build

2008-07-18 Thread Patch from Mauro Carvalho Chehab
The patch number 8417 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
A few improvements at firmware build


make firmware will now create the firmware files, using .ihex, .HEX and .H16
target files, under linux/firmware.

TODO:
   - use the right names for those firmwares;
   - link them with the module, if desired by enduser.

Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 v4l/Makefile  |   10 --
 v4l/firmware/Makefile |   27 +++
 2 files changed, 31 insertions(+), 6 deletions(-)

diff -r 1f08e05739b2 -r 3d8874db4b49 v4l/Makefile
--- a/v4l/Makefile  Fri Jul 18 08:11:59 2008 -0300
+++ b/v4l/Makefile  Fri Jul 18 08:35:40 2008 -0300
@@ -45,8 +45,9 @@ default:: config-compat.h Makefile.media
./scripts/rmmod.pl check
 #  $(MAKE) checkpatch
 
-firmware:: firmlinks
-   $(MAKE) -C $(OUTDIR) SUBDIRS=$(PWD)/firmware $(MYCFLAGS) modules
+firmware::
+   $(MAKE) -C firmware
+
 #
 # Object specific rules
 
@@ -252,10 +253,6 @@ links::
@find ../linux/drivers/media -name '*.[ch]' -type f -print0 | xargs -0n 
255 ln -sf --target-directory=.
@find ../linux/sound -name '*.[ch]' -type f -print0 | xargs -0n 255 ln 
-sf --target-directory=.
 
-firmlinks::
-   for i in `find ../linux/firmware/ -type d|sed s,../linux/firmware,,`; 
do mkdir -p firmware/$$i; done /dev/null
-   for i in `find ../linux/firmware/ -type f|sed s,../linux/firmware,,`; 
do ln -sf $(PWD)/../linux/firmware/$$i firmware/$$i; done
-
 # This link is so code with #include oss/*.h will find its header files
 oss:
ln -sf . oss
@@ -280,6 +277,7 @@ clean::
@find . -name '*.h' -type l -exec rm '{}' \;
-rm -f *~ *.o *.ko .*.o.cmd .*.ko.cmd *.mod.c av7110_firm.h fdump \
config-compat.h Module.symvers
+   make -C firmware clean
 
 distclean:: clean
-rm -f .version .*.o.flags .*.o.d Makefile.media \
diff -r 1f08e05739b2 -r 3d8874db4b49 v4l/firmware/Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +
+++ b/v4l/firmware/Makefile Fri Jul 18 08:35:40 2008 -0300
@@ -0,0 +1,27 @@
+TARGETS = ihex2fw ttusb-budget vicam.fw dabusb_bitstream dabusb.fw stv0672_v4
+
+default: $(TARGETS)
+
+clean:
+   -rm $(TARGETS)
+
+
+ihex2fw: ../../linux/firmware/ihex2fw.c
+   gcc -Wall -o $@ $
+
+vicam.fw: ../../linux/firmware/vicam/firmware.H16
+   ./ihex2fw -w $ $@
+
+dabusb.fw: ../../linux/firmware/dabusb/firmware.HEX
+   ./ihex2fw $ $@
+
+ttusb-budget: ../../linux/firmware/ttusb-budget/dspbootcode.bin.ihex
+   objcopy -Iihex -Obinary $ $@
+
+
+dabusb_bitstream: ../../linux/firmware/dabusb/bitstream.bin.ihex
+   objcopy -Iihex -Obinary $ $@
+
+stv0672_v4: ../../linux/firmware/cpia2/stv0672_vp4.bin.ihex
+   objcopy -Iihex -Obinary $ $@
+


---

Patch is available at: 
http://linuxtv.org/hg/v4l-dvb/rev/3d8874db4b49394a29c3828fc5a2afcbc42dfdb4

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[linuxtv-commits] [hg:v4l-dvb] backport commit 9ad46a6ac5422882d9f9a7f0d77ca0766f56bb6e

2008-07-19 Thread Patch from Mauro Carvalho Chehab
The patch number 8419 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
backport commit 9ad46a6ac5422882d9f9a7f0d77ca0766f56bb6e


Author: David Woodhouse [EMAIL PROTECTED]
Date:   Fri May 23 23:58:24 2008 +0100

cx25840: treat firmware data as const

kernel-sync:

Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 linux/drivers/media/video/cx25840/cx25840-firmware.c |   27 ---
 1 file changed, 11 insertions(+), 16 deletions(-)

diff -r 0595660d059e -r 2e1b00693b1b 
linux/drivers/media/video/cx25840/cx25840-firmware.c
--- a/linux/drivers/media/video/cx25840/cx25840-firmware.c  Sat Jul 19 
23:53:41 2008 -0300
+++ b/linux/drivers/media/video/cx25840/cx25840-firmware.c  Sun Jul 20 
00:00:30 2008 -0300
@@ -80,7 +80,7 @@ static int check_fw_load(struct i2c_clie
return 0;
 }
 
-static int fw_write(struct i2c_client *client, u8 *data, int size)
+static int fw_write(struct i2c_client *client, const u8 *data, int size)
 {
if (i2c_master_send(client, data, size)  size) {
v4l_err(client, firmware load i2c failure\n);
@@ -94,7 +94,8 @@ int cx25840_loadfw(struct i2c_client *cl
 {
struct cx25840_state *state = i2c_get_clientdata(client);
const struct firmware *fw = NULL;
-   u8 buffer[4], *ptr;
+   u8 buffer[FWSEND];
+   const u8 *ptr;
int size, retval;
 
if (state-is_cx23885)
@@ -109,29 +110,23 @@ int cx25840_loadfw(struct i2c_client *cl
 
buffer[0] = 0x08;
buffer[1] = 0x02;
-   buffer[2] = fw-data[0];
-   buffer[3] = fw-data[1];
-   retval = fw_write(client, buffer, 4);
 
-   if (retval  0) {
-   release_firmware(fw);
-   return retval;
-   }
-
-   size = fw-size - 2;
+   size = fw-size;
ptr = fw-data;
while (size  0) {
-   ptr[0] = 0x08;
-   ptr[1] = 0x02;
-   retval = fw_write(client, ptr, min(FWSEND, size + 2));
+   int len = min(FWSEND - 2, size);
+
+   memcpy(buffer + 2, ptr, len);
+
+   retval = fw_write(client, buffer, len + 2);
 
if (retval  0) {
release_firmware(fw);
return retval;
}
 
-   size -= FWSEND - 2;
-   ptr += FWSEND - 2;
+   size -= len;
+   ptr += len;
}
 
end_fw_load(client);


---

Patch is available at: 
http://linuxtv.org/hg/v4l-dvb/rev/2e1b00693b1b9ab3685b7793a9eaaff14f37a8ef

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[linuxtv-commits] [hg:v4l-dvb] Complete firmware compilation scripts

2008-07-19 Thread Patch from Mauro Carvalho Chehab
The patch number 8420 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
Complete firmware compilation scripts


This patch completes firmware compilation scripts:

- linux/firmware/Makefile is just a copy of kernel script make file. It is not
  currently used by the building system;

- Added two new targets for firmware compilation and instalation;

- Fixes the COPYING file to explicitly state that the firmwares aren't covered
  by GPL;

- make distclean will also cleanup the firmwares.
Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 COPYING |7 +
 INSTALL |9 +++
 linux/firmware/Makefile |   47 
 v4l/Makefile|6 -
 v4l/firmware/Makefile   |   30 -
 5 files changed, 92 insertions(+), 7 deletions(-)

diff -r 2e1b00693b1b -r a609b798c204 COPYING
--- a/COPYING   Sun Jul 20 00:00:30 2008 -0300
+++ b/COPYING   Sun Jul 20 00:37:25 2008 -0300
@@ -1,3 +1,10 @@
+   NOTE! This copyright does *not* cover the firmware hex files contained
+ under linux/firmware and v4l/firmware directories. Those firmwares are here 
+ just as a convenience to make easier to develop and test V4L/DVB drivers.
+
+   Mauro Carvalho Chehab
+
+
 
NOTE! This copyright does *not* cover user programs that use kernel
  services by normal system calls - this is merely considered normal use
diff -r 2e1b00693b1b -r a609b798c204 INSTALL
--- a/INSTALL   Sun Jul 20 00:00:30 2008 -0300
+++ b/INSTALL   Sun Jul 20 00:37:25 2008 -0300
@@ -35,6 +35,15 @@ rminstall- cleans previous installation
 
 sound-install  - installs the sound modules related to V4L/DVB
  tree.
+
+==
+Firmware rules:
+
+firmware   - Create the firmware files that are enclosed at the
+ tree.
+ Notice: Only a very few firmwares are currently here
+
+firmware_install- Install firmware files under /lib/firmware
 
 ===
 Module selection rules:
diff -r 2e1b00693b1b -r a609b798c204 linux/firmware/Makefile
--- a/linux/firmware/Makefile   Sun Jul 20 00:00:30 2008 -0300
+++ b/linux/firmware/Makefile   Sun Jul 20 00:37:25 2008 -0300
@@ -20,8 +20,55 @@ fw-external-y := $(subst ,,$(CONFIG_EXT
 # accurate. In the latter case it doesn't matter -- it'll use 
$(fw-shipped-all).
 # But be aware that the config file might not be included at all.
 
+fw-shipped-$(CONFIG_ATARI_DSP56K) += dsp56k/bootstrap.bin
+fw-shipped-$(CONFIG_ATM_AMBASSADOR) += atmsar11.fw
+fw-shipped-$(CONFIG_COMPUTONE) += intelliport2.bin
 fw-shipped-$(CONFIG_DVB_TTUSB_BUDGET) += ttusb-budget/dspbootcode.bin
+fw-shipped-$(CONFIG_SMCTR) += tr_smctr.bin
+fw-shipped-$(CONFIG_SND_KORG1212) += korg/k1212.dsp
+fw-shipped-$(CONFIG_SND_MAESTRO3) += ess/maestro3_assp_kernel.fw \
+ess/maestro3_assp_minisrc.fw
+fw-shipped-$(CONFIG_SND_SB16_CSP) += sb16/mulaw_main.csp sb16/alaw_main.csp \
+sb16/ima_adpcm_init.csp \
+sb16/ima_adpcm_playback.csp \
+sb16/ima_adpcm_capture.csp
+fw-shipped-$(CONFIG_SND_YMFPCI) += yamaha/ds1_ctrl.fw yamaha/ds1_dsp.fw \
+  yamaha/ds1e_ctrl.fw
 fw-shipped-$(CONFIG_USB_DABUSB) += dabusb/firmware.fw dabusb/bitstream.bin
+fw-shipped-$(CONFIG_USB_EMI26) += emi26/loader.fw emi26/firmware.fw \
+ emi26/bitstream.fw
+fw-shipped-$(CONFIG_USB_EMI62) += emi62/loader.fw emi62/bitstream.fw \
+ emi62/spdif.fw emi62/midi.fw
+fw-shipped-$(CONFIG_USB_KAWETH) += kaweth/new_code.bin kaweth/trigger_code.bin 
\
+  kaweth/new_code_fix.bin \
+  kaweth/trigger_code_fix.bin
+ifdef CONFIG_FIRMWARE_IN_KERNEL
+fw-shipped-$(CONFIG_USB_SERIAL_KEYSPAN_MPR) += keyspan/mpr.fw
+fw-shipped-$(CONFIG_USB_SERIAL_KEYSPAN_USA18X) += keyspan/usa18x.fw
+fw-shipped-$(CONFIG_USB_SERIAL_KEYSPAN_USA19) += keyspan/usa19.fw
+fw-shipped-$(CONFIG_USB_SERIAL_KEYSPAN_USA19QI) += keyspan/usa19qi.fw
+fw-shipped-$(CONFIG_USB_SERIAL_KEYSPAN_USA19QW) += keyspan/usa19qw.fw
+fw-shipped-$(CONFIG_USB_SERIAL_KEYSPAN_USA19W) += keyspan/usa19w.fw
+fw-shipped-$(CONFIG_USB_SERIAL_KEYSPAN_USA28) += keyspan/usa28.fw
+fw-shipped-$(CONFIG_USB_SERIAL_KEYSPAN_USA28XA) += keyspan/usa28xa.fw
+fw-shipped-$(CONFIG_USB_SERIAL_KEYSPAN_USA28XB) += keyspan/usa28xb.fw

[linuxtv-commits] [hg:v4l-dvb] merge: http://linuxtv.org/hg/~gliakhovetski/v4l-dvb

2008-07-20 Thread Patch from Mauro Carvalho Chehab
The patch number 8426 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
merge: http://linuxtv.org/hg/~gliakhovetski/v4l-dvb




Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 linux/drivers/media/video/sh_mobile_ceu_camera.c |1 +
 linux/drivers/media/video/videobuf-dma-contig.c  |8 
 2 files changed, 5 insertions(+), 4 deletions(-)

diff -r dbf11a308e97 -r 57fdbaeec956 
linux/drivers/media/video/sh_mobile_ceu_camera.c
--- a/linux/drivers/media/video/sh_mobile_ceu_camera.c  Sun Jul 20 08:31:29 
2008 -0300
+++ b/linux/drivers/media/video/sh_mobile_ceu_camera.c  Sun Jul 20 08:33:59 
2008 -0300
@@ -91,6 +91,7 @@ struct sh_mobile_ceu_dev {
void __iomem *base;
unsigned long video_limit;
 
+   /* lock used to protect videobuf */
spinlock_t lock;
struct list_head capture;
struct videobuf_buffer *active;
diff -r dbf11a308e97 -r 57fdbaeec956 
linux/drivers/media/video/videobuf-dma-contig.c
--- a/linux/drivers/media/video/videobuf-dma-contig.c   Sun Jul 20 08:31:29 
2008 -0300
+++ b/linux/drivers/media/video/videobuf-dma-contig.c   Sun Jul 20 08:33:59 
2008 -0300
@@ -29,10 +29,10 @@ struct videobuf_dma_contig_memory {
 };
 
 #define MAGIC_DC_MEM 0x0733ac61
-#define MAGIC_CHECK(is, should)
\
-   if (unlikely((is) != (should))) {   \
-   pr_err(magic mismatch: %x expected %x\n, is, should); \
-   BUG();  \
+#define MAGIC_CHECK(is, should)
\
+   if (unlikely((is) != (should))) {   \
+   pr_err(magic mismatch: %x expected %x\n, (is), (should)); \
+   BUG();  \
}
 
 static void


---

Patch is available at: 
http://linuxtv.org/hg/v4l-dvb/rev/57fdbaeec956cedb940fbd785e324969225507f1

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[linuxtv-commits] [hg:v4l-dvb] merge: http://www.linuxtv.org/hg/~hverkuil/v4l-dvb

2008-07-20 Thread Patch from Mauro Carvalho Chehab
The patch number 8424 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
merge: http://www.linuxtv.org/hg/~hverkuil/v4l-dvb




Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 linux/drivers/media/video/cs5345.c |2 
 linux/drivers/media/video/cx18/cx18-firmware.c |   54 -
 2 files changed, 14 insertions(+), 42 deletions(-)

diff -r 2a87f885fc36 -r dbf11a308e97 linux/drivers/media/video/cs5345.c
--- a/linux/drivers/media/video/cs5345.cSun Jul 20 08:05:50 2008 -0300
+++ b/linux/drivers/media/video/cs5345.cSun Jul 20 08:31:29 2008 -0300
@@ -117,7 +117,7 @@ static int cs5345_command(struct i2c_cli
if (cmd == VIDIOC_DBG_G_REGISTER)
reg-val = cs5345_read(client, reg-reg  0x1f);
else
-   cs5345_write(client, reg-reg  0x1f, reg-val  0x1f);
+   cs5345_write(client, reg-reg  0x1f, reg-val  0xff);
break;
}
 #endif
diff -r 2a87f885fc36 -r dbf11a308e97 
linux/drivers/media/video/cx18/cx18-firmware.c
--- a/linux/drivers/media/video/cx18/cx18-firmware.cSun Jul 20 08:05:50 
2008 -0300
+++ b/linux/drivers/media/video/cx18/cx18-firmware.cSun Jul 20 08:31:29 
2008 -0300
@@ -86,10 +86,6 @@
 
 #define CX18_DSP0_INTERRUPT_MASK   0xd0004C
 
-/* Encoder/decoder firmware sizes */
-#define CX18_FW_CPU_SIZE   (158332)
-#define CX18_FW_APU_SIZE   (141200)
-
 #define APU_ROM_SYNC1 0x6D676553 /* mgeS */
 #define APU_ROM_SYNC2 0x72646548 /* rdeH */
 
@@ -100,35 +96,22 @@ struct cx18_apu_rom_seghdr {
u32 size;
 };
 
-static int load_cpu_fw_direct(const char *fn, u8 __iomem *mem, struct cx18 
*cx, long size)
+static int load_cpu_fw_direct(const char *fn, u8 __iomem *mem, struct cx18 *cx)
 {
const struct firmware *fw = NULL;
-   int retries = 3;
int i, j;
+   unsigned size;
u32 __iomem *dst = (u32 __iomem *)mem;
const u32 *src;
 
-retry:
-   if (!retries || request_firmware(fw, fn, cx-dev-dev)) {
-   CX18_ERR(Unable to open firmware %s (must be %ld bytes)\n,
-   fn, size);
+   if (request_firmware(fw, fn, cx-dev-dev)) {
+   CX18_ERR(Unable to open firmware %s\n, fn);
CX18_ERR(Did you put the firmware in the hotplug firmware 
directory?\n);
return -ENOMEM;
}
 
src = (const u32 *)fw-data;
 
-   if (fw-size != size) {
-   /* Due to race conditions in firmware loading (esp. with
-  udev 0.95) the wrong file was sometimes loaded. So we check
-  filesizes to see if at least the right-sized file was
-  loaded. If not, then we retry. */
-   CX18_INFO(retry: file loaded was not %s (expected size %ld, 
got %zd)\n,
-   fn, size, fw-size);
-   release_firmware(fw);
-   retries--;
-   goto retry;
-   }
for (i = 0; i  fw-size; i += 4096) {
setup_page(i);
for (j = i; j  fw-size  j  i + 4096; j += 4) {
@@ -145,15 +128,16 @@ retry:
}
if (!test_bit(CX18_F_I_LOADED_FW, cx-i_flags))
CX18_INFO(loaded %s firmware (%zd bytes)\n, fn, fw-size);
+   size = fw-size;
release_firmware(fw);
return size;
 }
 
-static int load_apu_fw_direct(const char *fn, u8 __iomem *dst, struct cx18 
*cx, long size)
+static int load_apu_fw_direct(const char *fn, u8 __iomem *dst, struct cx18 *cx)
 {
const struct firmware *fw = NULL;
-   int retries = 3;
int i, j;
+   unsigned size;
const u32 *src;
struct cx18_apu_rom_seghdr seghdr;
const u8 *vers;
@@ -161,10 +145,8 @@ static int load_apu_fw_direct(const char
u32 apu_version = 0;
int sz;
 
-retry:
-   if (!retries || request_firmware(fw, fn, cx-dev-dev)) {
-   CX18_ERR(unable to open firmware %s (must be %ld bytes)\n,
-   fn, size);
+   if (request_firmware(fw, fn, cx-dev-dev)) {
+   CX18_ERR(unable to open firmware %s\n, fn);
CX18_ERR(did you put the firmware in the hotplug firmware 
directory?\n);
return -ENOMEM;
}
@@ -173,19 +155,8 @@ retry:
vers = fw-data + sizeof(seghdr);
sz = fw-size;
 
-   if (fw-size != size) {
-   /* Due to race conditions in firmware loading (esp. with
-  udev 0.95) the wrong file was sometimes loaded. 

[linuxtv-commits] [hg:v4l-dvb] Some few kernel syncs: update i2c-id.h and cleans whitespace on a Kconfig file

2008-07-20 Thread Patch from Mauro Carvalho Chehab
The patch number 8432 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
Some few kernel syncs: update i2c-id.h and cleans whitespace on a Kconfig file


kernel-sync:

Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 linux/drivers/media/video/Kconfig |4 ++--
 linux/include/linux/i2c-id.h  |3 ---
 2 files changed, 2 insertions(+), 5 deletions(-)

diff -r a99bafdac5a7 -r 527f3e1f973c linux/drivers/media/video/Kconfig
--- a/linux/drivers/media/video/Kconfig Sun Jul 20 09:36:07 2008 -0300
+++ b/linux/drivers/media/video/Kconfig Sun Jul 20 09:39:24 2008 -0300
@@ -641,8 +641,8 @@ config VIDEO_ZORAN_ZR36060
depends on VIDEO_ZORAN
help
  Say Y to support Zoran boards based on 36060 chips.
- This includes Iomega Bus, Pinnacle DC10, Linux media Labs 33 
- and 33 R10 and AverMedia 6 boards. 
+ This includes Iomega Bus, Pinnacle DC10, Linux media Labs 33
+ and 33 R10 and AverMedia 6 boards.
 
 config VIDEO_ZORAN_BUZ
tristate Iomega Buz support
diff -r a99bafdac5a7 -r 527f3e1f973c linux/include/linux/i2c-id.h
--- a/linux/include/linux/i2c-id.h  Sun Jul 20 09:36:07 2008 -0300
+++ b/linux/include/linux/i2c-id.h  Sun Jul 20 09:39:24 2008 -0300
@@ -84,8 +84,6 @@
 #define I2C_DRIVERID_M5279095  /* Mitsubishi M52790SP/FP AV switch */
 #define I2C_DRIVERID_CS534596  /* cs5345 audio processor   */
 
-#define I2C_DRIVERID_I2CDEV900
-
 #define I2C_DRIVERID_OV7670 1048   /* Omnivision 7670 camera */
 
 /*
@@ -104,7 +102,6 @@
 #define I2C_HW_B_RIVA  0x010010 /* Riva based graphics cards */
 #define I2C_HW_B_IOC   0x010011 /* IOC bit-wiggling */
 #define I2C_HW_B_IXP2000   0x010016 /* GPIO on IXP2000 systems */
-#define I2C_HW_B_S3VIA 0x010018 /* S3Via ProSavage adapter */
 #define I2C_HW_B_ZR36067   0x010019 /* Zoran-36057/36067 based boards */
 #define I2C_HW_B_PCILYNX   0x01001a /* TI PCILynx I2C adapter */
 #define I2C_HW_B_CX2388x   0x01001b /* connexant 2388x based tv cards */


---

Patch is available at: 
http://linuxtv.org/hg/v4l-dvb/rev/527f3e1f973c187c5c00340490dfd4808c276c5c

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[linuxtv-commits] [hg:v4l-dvb] backport commit e282959ef3ebae0d72ac0b24242c376fa34da585

2008-07-24 Thread Patch from Mauro Carvalho Chehab
The patch number 8444 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
backport commit e282959ef3ebae0d72ac0b24242c376fa34da585


Author: Greg Kroah-Hartman [EMAIL PROTECTED]
 Date:   Wed May 21 12:52:33 2008 -0700

device create: dvb: convert device_create to device_create_drvdata

device_create() is race-prone, so use the race-free
device_create_drvdata() instead as device_create() is going away.

kernel-sync:

Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 linux/drivers/media/dvb/dvb-core/dvbdev.c |6 ++
 1 file changed, 6 insertions(+)

diff -r 08d83bd597d4 -r 439cdc0fc36a linux/drivers/media/dvb/dvb-core/dvbdev.c
--- a/linux/drivers/media/dvb/dvb-core/dvbdev.c Thu Jul 24 12:35:53 2008 -0300
+++ b/linux/drivers/media/dvb/dvb-core/dvbdev.c Thu Jul 24 12:46:11 2008 -0300
@@ -242,9 +242,15 @@ int dvb_register_device(struct dvb_adapt
 
mutex_unlock(dvbdev_register_lock);
 
+#if LINUX_VERSION_CODE  KERNEL_VERSION(2, 6, 26)
+   clsdev = device_create_drvdata(dvb_class, adap-device,
+  MKDEV(DVB_MAJOR, nums2minor(adap-num, type, 
id)),
+  NULL, dvb%d.%s%d, adap-num, dnames[type], id);
+#else
clsdev = device_create(dvb_class, adap-device,
   MKDEV(DVB_MAJOR, nums2minor(adap-num, type, 
id)),
   dvb%d.%s%d, adap-num, dnames[type], id);
+#endif
if (IS_ERR(clsdev)) {
printk(KERN_ERR %s: failed to create device dvb%d.%s%d 
(%ld)\n,
   __func__, adap-num, dnames[type], id, PTR_ERR(clsdev));


---

Patch is available at: 
http://linuxtv.org/hg/v4l-dvb/rev/439cdc0fc36a0852f66a34beb2d8d9676db9b896

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[linuxtv-commits] [hg:v4l-dvb] backport commit b9e40857682ecfc5bcd0356a23ff409883ffb982

2008-07-24 Thread Patch from Mauro Carvalho Chehab
The patch number 8445 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
backport commit b9e40857682ecfc5bcd0356a23ff409883ffb982


Author: David S. Miller [EMAIL PROTECTED]
Date:   Tue Jul 15 00:15:08 2008 -0700

netdev: Do not use TX lock to protect address lists.

Now that we have a specific lock to protect the network
device unicast and multicast lists, remove extraneous
grabs of the TX lock in cases where the code only needs
address list protection.

Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 linux/drivers/media/dvb/dvb-core/dvb_net.c |8 
 1 file changed, 8 insertions(+)

diff -r 439cdc0fc36a -r 978801a35c13 linux/drivers/media/dvb/dvb-core/dvb_net.c
--- a/linux/drivers/media/dvb/dvb-core/dvb_net.cThu Jul 24 12:46:11 
2008 -0300
+++ b/linux/drivers/media/dvb/dvb-core/dvb_net.cThu Jul 24 12:53:50 
2008 -0300
@@ -1165,7 +1165,11 @@ static void wq_set_multicast_list (struc
 #ifdef OLD_XMIT_LOCK   /* Kernels equal or lower than 2.6.17 */
spin_lock_bh(dev-xmit_lock);
 #else
+#if LINUX_VERSION_CODE = KERNEL_VERSION(2, 6, 26)
netif_tx_lock_bh(dev);
+#else
+   netif_addr_lock_bh(dev);
+#endif
 #endif
 
if (dev-flags  IFF_PROMISC) {
@@ -1194,7 +1198,11 @@ static void wq_set_multicast_list (struc
 #ifdef OLD_XMIT_LOCK   /* Kernels equal or lower than 2.6.17 */
spin_unlock_bh(dev-xmit_lock);
 #else
+#if LINUX_VERSION_CODE = KERNEL_VERSION(2, 6, 26)
netif_tx_unlock_bh(dev);
+#else
+   netif_addr_unlock_bh(dev);
+#endif
 #endif
dvb_net_feed_start(dev);
 }


---

Patch is available at: 
http://linuxtv.org/hg/v4l-dvb/rev/978801a35c13a7b41d1431c72867a37d5f3fb3c5

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[linuxtv-commits] [hg:v4l-dvb] backport commit a81792f668c20540c336af4242ba1400763eb14f

2008-07-24 Thread Patch from Mauro Carvalho Chehab
The patch number 8443 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
backport commit a81792f668c20540c336af4242ba1400763eb14f


Author: Johannes Berg [EMAIL PROTECTED]
Date:   Tue Jul 8 19:00:25 2008 +0200

remove mention of CONFIG_KMOD from documentation

kernel-sync:

Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 linux/Documentation/video4linux/w9968cf.txt |3 ---
 1 file changed, 3 deletions(-)

diff -r f445674ce0d2 -r 08d83bd597d4 linux/Documentation/video4linux/w9968cf.txt
--- a/linux/Documentation/video4linux/w9968cf.txt   Tue Jul 22 10:35:10 
2008 +0200
+++ b/linux/Documentation/video4linux/w9968cf.txt   Thu Jul 24 12:35:53 
2008 -0300
@@ -193,9 +193,6 @@ Description: Automatic 'ovcamchip' m
 loads that module automatically. This action is performed as
 once soon as the 'w9968cf' module is loaded into memory.
 Default: 1
-Note:The kernel must be compiled with the CONFIG_KMOD option
-enabled for the 'ovcamchip' module to be loaded and for
-this parameter to be present.
 ---
 Name:   simcams
 Type:   int


---

Patch is available at: 
http://linuxtv.org/hg/v4l-dvb/rev/08d83bd597d40c843378386ce36dcbc07db374d0

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[linuxtv-commits] [hg:v4l-dvb] merge: http://www.linuxtv.org/hg/~hverkuil/v4l-dvb-fixes

2008-07-26 Thread Patch from Mauro Carvalho Chehab
The patch number 8481 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
merge: http://www.linuxtv.org/hg/~hverkuil/v4l-dvb-fixes




Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 linux/drivers/media/video/ivtv/ivtv-driver.c |5 
 linux/drivers/media/video/tveeprom.c |   16 
 linux/include/media/tveeprom.h   |7 
 v4l2-apps/Make.rules |2 
 v4l2-apps/test/capture_example.c |  448 ---
 v4l2-apps/util/Makefile  |6 
 v4l2-apps/util/em28xx-dbg.h  |2 
 v4l2-apps/util/qv4l2/general-tab.cpp |8 
 v4l2-apps/util/v4l-board-dbg.h   |2 
 v4l2-apps/util/v4l2-ctl.cpp  |   18 
 v4l2-apps/util/v4l2-dbg.cpp  |   12 
 11 files changed, 251 insertions(+), 275 deletions(-)

diff -r 3dd0e7f3ef1f -r 95db31d9d8a6 
linux/drivers/media/video/ivtv/ivtv-driver.c
--- a/linux/drivers/media/video/ivtv/ivtv-driver.c  Sat Jul 26 06:41:37 
2008 -0300
+++ b/linux/drivers/media/video/ivtv/ivtv-driver.c  Sat Jul 26 06:44:30 
2008 -0300
@@ -465,9 +465,8 @@ static void ivtv_process_eeprom(struct i
if (itv-options.radio == -1)
itv-options.radio = (tv.has_radio != 0);
/* only enable newi2c if an IR blaster is present */
-   /* FIXME: for 2.6.20 the test against 2 should be removed */
-   if (itv-options.newi2c == -1  tv.has_ir != -1  tv.has_ir != 2) {
-   itv-options.newi2c = (tv.has_ir  2) ? 1 : 0;
+   if (itv-options.newi2c == -1  tv.has_ir) {
+   itv-options.newi2c = (tv.has_ir  4) ? 1 : 0;
if (itv-options.newi2c) {
IVTV_INFO(Reopen i2c bus for IR-blaster support\n);
exit_ivtv_i2c(itv);
diff -r 3dd0e7f3ef1f -r 95db31d9d8a6 linux/drivers/media/video/tveeprom.c
--- a/linux/drivers/media/video/tveeprom.c  Sat Jul 26 06:41:37 2008 -0300
+++ b/linux/drivers/media/video/tveeprom.c  Sat Jul 26 06:44:30 2008 -0300
@@ -486,7 +486,7 @@ void tveeprom_hauppauge_analog(struct i2
tvee-has_radio = eeprom_data[i+len-1];
/* old style tag, don't know how to detect
IR presence, mark as unknown. */
-   tvee-has_ir = -1;
+   tvee-has_ir = 0;
tvee-model =
eeprom_data[i+8] +
(eeprom_data[i+9]  8);
@@ -606,7 +606,7 @@ void tveeprom_hauppauge_analog(struct i2
 
case 0x0f:
/* tag 'IRInfo' */
-   tvee-has_ir = eeprom_data[i+1];
+   tvee-has_ir = 1 | (eeprom_data[i+1]  1);
break;
 
/* case 0x10: tag 'VBIInfo' */
@@ -706,14 +706,14 @@ void tveeprom_hauppauge_analog(struct i2
tveeprom_info(decoder processor is %s (idx %d)\n,
STRM(decoderIC, tvee-decoder_processor),
tvee-decoder_processor);
-   if (tvee-has_ir == -1)
+   if (tvee-has_ir)
+   tveeprom_info(has %sradio, has %sIR receiver, has %sIR 
transmitter\n,
+   tvee-has_radio ?  : no ,
+   (tvee-has_ir  2) ?  : no ,
+   (tvee-has_ir  4) ?  : no );
+   else
tveeprom_info(has %sradio\n,
tvee-has_radio ?  : no );
-   else
-   tveeprom_info(has %sradio, has %sIR receiver, has %sIR 
transmitter\n,
-   tvee-has_radio ?  : no ,
-   (tvee-has_ir  1) ?  : no ,
-   (tvee-has_ir  2) ?  : no );
 }
 EXPORT_SYMBOL(tveeprom_hauppauge_analog);
 
diff -r 3dd0e7f3ef1f -r 95db31d9d8a6 linux/include/media/tveeprom.h
--- a/linux/include/media/tveeprom.hSat Jul 26 06:41:37 2008 -0300
+++ b/linux/include/media/tveeprom.hSat Jul 26 06:44:30 2008 -0300
@@ -3,7 +3,12 @@
 
 struct tveeprom {
u32 has_radio;
-   u32 has_ir; /* bit 0: IR receiver present, bit 1: IR transmitter 
(blaster) present. -1 == unknown */
+   /* If has_ir == 0, then it is unknown what the IR capabilities are,
+  otherwise:
+  bit 0: 1 (= IR capabilities are known)
+  bit 1: IR receiver present
+  bit 2: IR transmitter (blaster) present */
+   u32 has_ir;
u32 has_MAC_address; /* 0: no MAC, 1: MAC present, 2: unknown */
 
u32 

[linuxtv-commits] [hg:v4l-dvb] Fix compat for stkcam

2008-07-26 Thread Patch from Mauro Carvalho Chehab
The patch number 8503 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
Fix compat for stkcam




Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 v4l/compat.h |9 -
 1 file changed, 8 insertions(+), 1 deletion(-)

diff -r 35178277a0b3 -r 1cd705dcc929 v4l/compat.h
--- a/v4l/compat.h  Sat Jul 26 13:53:46 2008 -0300
+++ b/v4l/compat.h  Sat Jul 26 14:45:09 2008 -0300
@@ -228,4 +228,11 @@ typedef unsigned long uintptr_t;
 typedef unsigned long uintptr_t;
 #endif
 
-#endif
+#if LINUX_VERSION_CODE  KERNEL_VERSION(2, 6, 26)
+static inline int list_is_singular(const struct list_head *head)
+{
+return !list_empty(head)  (head-next == head-prev);
+}
+#endif
+
+#endif


---

Patch is available at: 
http://linuxtv.org/hg/v4l-dvb/rev/1cd705dcc9290036c033723019c7f4d579bbcfda

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[linuxtv-commits] [hg:v4l-dvb] videodev2.h: CodingStyle cleanups

2008-07-26 Thread Patch from Mauro Carvalho Chehab
The patch number 8502 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
videodev2.h: CodingStyle cleanups



Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 linux/include/linux/videodev2.h |  380 ++--
 1 file changed, 167 insertions(+), 213 deletions(-)

diff -r c8df7652241d -r 35178277a0b3 linux/include/linux/videodev2.h
--- a/linux/include/linux/videodev2.h   Sat Jul 26 13:20:36 2008 -0300
+++ b/linux/include/linux/videodev2.h   Sat Jul 26 13:53:46 2008 -0300
@@ -91,8 +91,8 @@
  */
 
 /*  Four-character-code (FOURCC) */
-#define v4l2_fourcc(a,b,c,d)\
-   (((__u32)(a)0)|((__u32)(b)8)|((__u32)(c)16)|((__u32)(d)24))
+#define v4l2_fourcc(a, b, c, d)\
+   ((__u32)(a) | ((__u32)(b)  8) | ((__u32)(c)  16) | ((__u32)(d)  
24))
 
 /*
  * E N U M S
@@ -226,8 +226,7 @@ struct v4l2_fract {
 /*
  * D R I V E R   C A P A B I L I T I E S
  */
-struct v4l2_capability
-{
+struct v4l2_capability {
__u8driver[16]; /* i.e. bttv */
__u8card[32];   /* i.e. Hauppauge WinTV */
__u8bus_info[32];   /* PCI: + pci_name(pci_dev) */
@@ -259,8 +258,7 @@ struct v4l2_capability
 /*
  * V I D E O   I M A G E   F O R M A T
  */
-struct v4l2_pix_format
-{
+struct v4l2_pix_format {
__u32   width;
__u32   height;
__u32   pixelformat;
@@ -272,68 +270,67 @@ struct v4l2_pix_format
 };
 
 /*  Pixel format FOURCCdepth  Description  
*/
-#define V4L2_PIX_FMT_RGB332  v4l2_fourcc('R','G','B','1') /*  8  RGB-3-3-2 
*/
-#define V4L2_PIX_FMT_RGB444  v4l2_fourcc('R','4','4','4') /* 16   
 */
-#define V4L2_PIX_FMT_RGB555  v4l2_fourcc('R','G','B','O') /* 16  RGB-5-5-5 
*/
-#define V4L2_PIX_FMT_RGB565  v4l2_fourcc('R','G','B','P') /* 16  RGB-5-6-5 
*/
-#define V4L2_PIX_FMT_RGB555X v4l2_fourcc('R','G','B','Q') /* 16  RGB-5-5-5 BE  
*/
-#define V4L2_PIX_FMT_RGB565X v4l2_fourcc('R','G','B','R') /* 16  RGB-5-6-5 BE  
*/
-#define V4L2_PIX_FMT_BGR24   v4l2_fourcc('B','G','R','3') /* 24  BGR-8-8-8 
*/
-#define V4L2_PIX_FMT_RGB24   v4l2_fourcc('R','G','B','3') /* 24  RGB-8-8-8 
*/
-#define V4L2_PIX_FMT_BGR32   v4l2_fourcc('B','G','R','4') /* 32  BGR-8-8-8-8   
*/
-#define V4L2_PIX_FMT_RGB32   v4l2_fourcc('R','G','B','4') /* 32  RGB-8-8-8-8   
*/
-#define V4L2_PIX_FMT_GREYv4l2_fourcc('G','R','E','Y') /*  8  Greyscale 
*/
-#define V4L2_PIX_FMT_Y16 v4l2_fourcc('Y','1','6',' ') /* 16  Greyscale 
*/
-#define V4L2_PIX_FMT_PAL8v4l2_fourcc('P','A','L','8') /*  8  8-bit palette 
*/
-#define V4L2_PIX_FMT_YVU410  v4l2_fourcc('Y','V','U','9') /*  9  YVU 4:1:0 
*/
-#define V4L2_PIX_FMT_YVU420  v4l2_fourcc('Y','V','1','2') /* 12  YVU 4:2:0 
*/
-#define V4L2_PIX_FMT_YUYVv4l2_fourcc('Y','U','Y','V') /* 16  YUV 4:2:2 
*/
-#define V4L2_PIX_FMT_UYVYv4l2_fourcc('U','Y','V','Y') /* 16  YUV 4:2:2 
*/
-#define V4L2_PIX_FMT_YUV422P v4l2_fourcc('4','2','2','P') /* 16  YVU422 planar 
*/
-#define V4L2_PIX_FMT_YUV411P v4l2_fourcc('4','1','1','P') /* 16  YVU411 planar 
*/
-#define V4L2_PIX_FMT_Y41Pv4l2_fourcc('Y','4','1','P') /* 12  YUV 4:1:1 
*/
-#define V4L2_PIX_FMT_YUV444  v4l2_fourcc('Y','4','4','4') /* 16   
 */
-#define V4L2_PIX_FMT_YUV555  v4l2_fourcc('Y','U','V','O') /* 16  YUV-5-5-5 
*/
-#define V4L2_PIX_FMT_YUV565  v4l2_fourcc('Y','U','V','P') /* 16  YUV-5-6-5 
*/
-#define V4L2_PIX_FMT_YUV32   v4l2_fourcc('Y','U','V','4') /* 32  YUV-8-8-8-8   
*/
+#define V4L2_PIX_FMT_RGB332  v4l2_fourcc('R', 'G', 'B', '1') /*  8  RGB-3-3-2  
   */
+#define V4L2_PIX_FMT_RGB444  v4l2_fourcc('R', '4', '4', '4') /* 16   
 */
+#define V4L2_PIX_FMT_RGB555  v4l2_fourcc('R', 'G', 'B', 'O') /* 16  RGB-5-5-5  
   */
+#define V4L2_PIX_FMT_RGB565  v4l2_fourcc('R', 'G', 'B', 'P') /* 16  RGB-5-6-5  
   */
+#define V4L2_PIX_FMT_RGB555X v4l2_fourcc('R', 'G', 'B', 'Q') /* 16  RGB-5-5-5 
BE  */
+#define V4L2_PIX_FMT_RGB565X v4l2_fourcc('R', 'G', 'B', 'R') /* 16  RGB-5-6-5 
BE  */
+#define V4L2_PIX_FMT_BGR24   v4l2_fourcc('B', 'G', 'R', '3') /* 24  BGR-8-8-8  
   */
+#define V4L2_PIX_FMT_RGB24   v4l2_fourcc('R', 'G', 'B', '3') /* 24  RGB-8-8-8  
   */
+#define V4L2_PIX_FMT_BGR32   v4l2_fourcc('B', 'G', 'R', '4') /* 32  
BGR-8-8-8-8   */
+#define V4L2_PIX_FMT_RGB32   v4l2_fourcc('R', 'G', 'B', '4') /* 32  
RGB-8-8-8-8   */
+#define V4L2_PIX_FMT_GREYv4l2_fourcc('G', 'R', 'E', 'Y') /*  8  Greyscale  
   */
+#define V4L2_PIX_FMT_Y16 v4l2_fourcc('Y', '1', '6', ' ') /* 16  

[linuxtv-commits] [hg:v4l-dvb] merge: http://www.linuxtv.org/hg/~hverkuil/v4l-dvb-empress

2008-07-27 Thread Patch from Mauro Carvalho Chehab
The patch number 8508 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
merge: http://www.linuxtv.org/hg/~hverkuil/v4l-dvb-empress


Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 linux/drivers/media/video/saa7134/saa7134-empress.c |   32 +---
 linux/drivers/media/video/saa7134/saa7134-video.c   |   46 
 linux/drivers/media/video/saa7134/saa7134.h |6 -
 v4l2-apps/util/v4l2-ctl.cpp |8 +-
 4 files changed, 62 insertions(+), 30 deletions(-)

diff -r a3d6b67b2484 -r c279c49e81e7 
linux/drivers/media/video/saa7134/saa7134-empress.c
--- a/linux/drivers/media/video/saa7134/saa7134-empress.c   Sun Jul 27 
11:30:21 2008 +0200
+++ b/linux/drivers/media/video/saa7134/saa7134-empress.c   Sun Jul 27 
08:21:28 2008 -0300
@@ -89,14 +89,14 @@ static int ts_open(struct inode *inode, 
err = -EBUSY;
if (!mutex_trylock(dev-empress_tsq.vb_lock))
goto done;
-   if (dev-empress_users)
+   if (atomic_read(dev-empress_users))
goto done_up;
 
/* Unmute audio */
saa_writeb(SAA7134_AUDIO_MUTE_CTRL,
saa_readb(SAA7134_AUDIO_MUTE_CTRL)  ~(1  6));
 
-   dev-empress_users++;
+   atomic_inc(dev-empress_users);
file-private_data = dev;
err = 0;
 
@@ -110,8 +110,6 @@ static int ts_release(struct inode *inod
 {
struct saa7134_dev *dev = file-private_data;
 
-   mutex_lock(dev-empress_tsq.vb_lock);
-
videobuf_stop(dev-empress_tsq);
videobuf_mmap_free(dev-empress_tsq);
 
@@ -122,9 +120,7 @@ static int ts_release(struct inode *inod
saa_writeb(SAA7134_AUDIO_MUTE_CTRL,
saa_readb(SAA7134_AUDIO_MUTE_CTRL) | (1  6));
 
-   dev-empress_users--;
-
-   mutex_unlock(dev-empress_tsq.vb_lock);
+   atomic_dec(dev-empress_users);
 
return 0;
 }
@@ -331,6 +327,22 @@ static int empress_g_ext_ctrls(struct fi
if (ctrls-ctrl_class != V4L2_CTRL_CLASS_MPEG)
return -EINVAL;
return saa7134_i2c_call_saa6752(dev, VIDIOC_G_EXT_CTRLS, ctrls);
+}
+
+static int empress_g_ctrl(struct file *file, void *priv,
+   struct v4l2_control *c)
+{
+   struct saa7134_dev *dev = file-private_data;
+
+   return saa7134_g_ctrl_internal(dev, NULL, c);
+}
+
+static int empress_s_ctrl(struct file *file, void *priv,
+   struct v4l2_control *c)
+{
+   struct saa7134_dev *dev = file-private_data;
+
+   return saa7134_s_ctrl_internal(dev, NULL, c);
 }
 
 static int empress_queryctrl(struct file *file, void *priv,
@@ -419,8 +431,8 @@ static const struct v4l2_ioctl_ops ts_io
 
.vidioc_queryctrl   = empress_queryctrl,
.vidioc_querymenu   = empress_querymenu,
-   .vidioc_g_ctrl  = saa7134_g_ctrl,
-   .vidioc_s_ctrl  = saa7134_s_ctrl,
+   .vidioc_g_ctrl  = empress_g_ctrl,
+   .vidioc_s_ctrl  = empress_s_ctrl,
 };
 
 /* --- */
@@ -455,7 +467,7 @@ static void empress_signal_update(struct
ts_reset_encoder(dev);
} else {
dprintk(video signal acquired\n);
-   if (dev-empress_users)
+   if (atomic_read(dev-empress_users))
ts_init_encoder(dev);
}
 }
diff -r a3d6b67b2484 -r c279c49e81e7 
linux/drivers/media/video/saa7134/saa7134-video.c
--- a/linux/drivers/media/video/saa7134/saa7134-video.c Sun Jul 27 11:30:21 
2008 +0200
+++ b/linux/drivers/media/video/saa7134/saa7134-video.c Sun Jul 27 08:21:28 
2008 -0300
@@ -1112,10 +1112,8 @@ static struct videobuf_queue_ops video_q
 
 /* -- */
 
-int saa7134_g_ctrl(struct file *file, void *priv, struct v4l2_control *c)
-{
-   struct saa7134_fh *fh = priv;
-   struct saa7134_dev *dev = fh-dev;
+int saa7134_g_ctrl_internal(struct saa7134_dev *dev, struct saa7134_fh *fh, 
struct v4l2_control *c)
+{
const struct v4l2_queryctrl* ctrl;
 
ctrl = ctrl_by_id(c-id);
@@ -1160,20 +1158,31 @@ int saa7134_g_ctrl(struct file *file, vo
}
return 0;
 }
-EXPORT_SYMBOL_GPL(saa7134_g_ctrl);
-
-int saa7134_s_ctrl(struct file *file, void *f, struct v4l2_control *c)
+EXPORT_SYMBOL_GPL(saa7134_g_ctrl_internal);
+
+static int saa7134_g_ctrl(struct file *file, void *priv, struct v4l2_control 
*c)
+{
+   struct saa7134_fh *fh = priv;
+
+  

[linuxtv-commits] [hg:v4l-dvb] merge: http://linuxtv.org/hg/~mkrufky/hvr19x0

2008-07-27 Thread Patch from Mauro Carvalho Chehab
The patch number 8510 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
merge: http://linuxtv.org/hg/~mkrufky/hvr19x0


Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 linux/drivers/media/video/pvrusb2/pvrusb2-devattr.c |6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff -r c279c49e81e7 -r 4c83c5492a93 
linux/drivers/media/video/pvrusb2/pvrusb2-devattr.c
--- a/linux/drivers/media/video/pvrusb2/pvrusb2-devattr.c   Sun Jul 27 
08:21:28 2008 -0300
+++ b/linux/drivers/media/video/pvrusb2/pvrusb2-devattr.c   Sun Jul 27 
08:34:48 2008 -0300
@@ -330,7 +330,7 @@ static const char *pvr2_fw1_names_73xxx[
 };
 
 static const struct pvr2_device_desc pvr2_device_73xxx = {
-   .description = WinTV PVR USB2 Model Category 73xxx,
+   .description = WinTV HVR-1900 Model Category 73xxx,
.shortname = 73xxx,
.client_modules.lst = pvr2_client_73xxx,
.client_modules.cnt = ARRAY_SIZE(pvr2_client_73xxx),
@@ -439,7 +439,7 @@ static const char *pvr2_fw1_names_75xxx[
 };
 
 static const struct pvr2_device_desc pvr2_device_750xx = {
-   .description = WinTV PVR USB2 Model Category 750xx,
+   .description = WinTV HVR-1950 Model Category 750xx,
.shortname = 750xx,
.client_modules.lst = pvr2_client_75xxx,
.client_modules.cnt = ARRAY_SIZE(pvr2_client_75xxx),
@@ -461,7 +461,7 @@ static const struct pvr2_device_desc pvr
 };
 
 static const struct pvr2_device_desc pvr2_device_751xx = {
-   .description = WinTV PVR USB2 Model Category 751xx,
+   .description = WinTV HVR-1950 Model Category 751xx,
.shortname = 751xx,
.client_modules.lst = pvr2_client_75xxx,
.client_modules.cnt = ARRAY_SIZE(pvr2_client_75xxx),


---

Patch is available at: 
http://linuxtv.org/hg/v4l-dvb/rev/4c83c5492a9340b322cb9cc1933b49bcb817a04a

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[linuxtv-commits] [hg:v4l-dvb] videodev2: Fix merge conflict

2008-07-27 Thread Patch from Mauro Carvalho Chehab
The patch number 8522 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
videodev2: Fix merge conflict




Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 linux/drivers/media/video/gspca/conex.c   |4 
 linux/drivers/media/video/gspca/etoms.c   |   25 -
 linux/drivers/media/video/gspca/gspca.c   |   11 
 linux/drivers/media/video/gspca/mars.c|4 
 linux/drivers/media/video/gspca/ov519.c   |   28 -
 linux/drivers/media/video/gspca/pac207.c  |   19 -
 linux/drivers/media/video/gspca/pac7311.c |   17 -
 linux/drivers/media/video/gspca/sonixb.c  |  134 +++-
 linux/drivers/media/video/gspca/sonixj.c  |  245 ++-
 linux/drivers/media/video/gspca/spca500.c |  134 +---
 linux/drivers/media/video/gspca/spca501.c |   70 
 linux/drivers/media/video/gspca/spca505.c |  135 +---
 linux/drivers/media/video/gspca/spca506.c |  116 +--
 linux/drivers/media/video/gspca/spca508.c |  159 +
 linux/drivers/media/video/gspca/spca561.c |   57 +--
 linux/drivers/media/video/gspca/stk014.c  |4 
 linux/drivers/media/video/gspca/sunplus.c |  356 --
 linux/drivers/media/video/gspca/t613.c|   17 -
 linux/drivers/media/video/gspca/tv8532.c  |   12 
 linux/drivers/media/video/gspca/vc032x.c  |   39 --
 linux/drivers/media/video/gspca/zc3xx.c   |  126 +++
 linux/include/linux/videodev2.h   |2 
 22 files changed, 431 insertions(+), 1283 deletions(-)

diff discarded since it is too big

---

Patch is available at: 
http://linuxtv.org/hg/v4l-dvb/rev/679674c40564837835d627f24aa0376afd54a3ac

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[linuxtv-commits] [hg:v4l-dvb] merge: http://www.linuxtv.org/hg/~hverkuil/v4l-dvb-videodev

2008-07-27 Thread Patch from Mauro Carvalho Chehab
The patch number 8527 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
merge: http://www.linuxtv.org/hg/~hverkuil/v4l-dvb-videodev


Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 README.patches|2 
 linux/drivers/media/common/saa7146_fops.c |2 
 linux/drivers/media/common/saa7146_video.c|   17 +++
 linux/drivers/media/radio/dsbr100.c   |1 
 linux/drivers/media/radio/miropcm20-radio.c   |1 
 linux/drivers/media/radio/radio-aimslab.c |1 
 linux/drivers/media/radio/radio-aztech.c  |1 
 linux/drivers/media/radio/radio-cadet.c   |1 
 linux/drivers/media/radio/radio-gemtek-pci.c  |1 
 linux/drivers/media/radio/radio-gemtek.c  |1 
 linux/drivers/media/radio/radio-maestro.c |1 
 linux/drivers/media/radio/radio-maxiradio.c   |1 
 linux/drivers/media/radio/radio-rtrack2.c |1 
 linux/drivers/media/radio/radio-sf16fmi.c |1 
 linux/drivers/media/radio/radio-sf16fmr2.c|1 
 linux/drivers/media/radio/radio-si470x.c  |1 
 linux/drivers/media/radio/radio-terratec.c|1 
 linux/drivers/media/radio/radio-trust.c   |1 
 linux/drivers/media/radio/radio-typhoon.c |1 
 linux/drivers/media/radio/radio-zoltrix.c |1 
 linux/drivers/media/video/bt8xx/bttv-driver.c |   23 ++
 linux/drivers/media/video/bw-qcam.c   |1 
 linux/drivers/media/video/c-qcam.c|1 
 linux/drivers/media/video/cafe_ccic.c |2 
 linux/drivers/media/video/cpia.c  |1 
 linux/drivers/media/video/cpia2/cpia2_v4l.c   |3 -
 linux/drivers/media/video/cx18/cx18-streams.c |3 -
 linux/drivers/media/video/cx23885/cx23885-417.c   |4 -
 linux/drivers/media/video/cx23885/cx23885-video.c |   15 +++---
 linux/drivers/media/video/cx88/cx88-blackbird.c   |2 
 linux/drivers/media/video/cx88/cx88-video.c   |3 -
 linux/drivers/media/video/em28xx/em28xx-video.c   |   14 +-
 linux/drivers/media/video/et61x251/et61x251_core.c|1 
 linux/drivers/media/video/gspca/gspca.c   |1 
 linux/drivers/media/video/ivtv/ivtv-streams.c |5 --
 linux/drivers/media/video/meye.c  |1 
 linux/drivers/media/video/ov511.c |1 
 linux/drivers/media/video/pms.c   |1 
 linux/drivers/media/video/pvrusb2/pvrusb2-v4l2.c  |4 -
 linux/drivers/media/video/pwc/pwc-if.c|1 
 linux/drivers/media/video/s2255drv.c  |1 
 linux/drivers/media/video/saa5246a.c  |1 
 linux/drivers/media/video/saa5249.c   |1 
 linux/drivers/media/video/saa7134/saa7134-core.c  |9 +--
 linux/drivers/media/video/saa7134/saa7134-empress.c   |2 
 linux/drivers/media/video/saa7134/saa7134-video.c |3 -
 linux/drivers/media/video/se401.c |1 
 linux/drivers/media/video/sn9c102/sn9c102_core.c  |1 
 linux/drivers/media/video/soc_camera.c|1 
 linux/drivers/media/video/stk-webcam.c|2 
 linux/drivers/media/video/stradis.c   |1 
 linux/drivers/media/video/stv680.c|1 
 linux/drivers/media/video/usbvideo/usbvideo.c |1 
 linux/drivers/media/video/usbvideo/vicam.c|1 
 linux/drivers/media/video/usbvision/usbvision-video.c |3 -
 linux/drivers/media/video/uvc/uvc_driver.c|2 
 linux/drivers/media/video/v4l2-dev.c  |1 
 linux/drivers/media/video/videobuf-vmalloc.c  |2 
 linux/drivers/media/video/vino.c  |2 
 linux/drivers/media/video/vivi.c  |1 
 linux/drivers/media/video/w9966.c |1 
 linux/drivers/media/video/w9968cf.c   |1 
 linux/drivers/media/video/zc0301/zc0301_core.c|1 
 linux/drivers/media/video/zoran_driver.c  |2 
 linux/drivers/media/video/zr364xx.c   |1 
 linux/include/linux/videodev.h|   15 ++
 linux/include/linux/videodev2.h   |6 ++
 linux/include/media/v4l2-dev.h|7 +--
 linux/sound/i2c/other/tea575x-tuner.c | 

[linuxtv-commits] [hg:v4l-dvb] backport commit 27ac792ca0b0a1e7e65f20342260650516c95864

2008-07-27 Thread Patch from Mauro Carvalho Chehab
The patch number 8535 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
backport commit 27ac792ca0b0a1e7e65f20342260650516c95864


kernel-sync:
Author: Andrea Righi [EMAIL PROTECTED]
Date:   Wed Jul 23 21:28:13 2008 -0700

PAGE_ALIGN(): correctly handle 64-bit values on 32-bit architectures

On 32-bit architectures PAGE_ALIGN() truncates 64-bit values to the 32-bit
boundary. For example:

u64 val = PAGE_ALIGN(size);

always returns a value  4GB even if size is greater than 4GB.

The problem resides in PAGE_MASK definition (from include/asm-x86/page.h for
example):

#define PAGE_SHIFT  12
#define PAGE_SIZE   (_AC(1,UL)  PAGE_SHIFT)
#define PAGE_MASK   (~(PAGE_SIZE-1))
...
#define PAGE_ALIGN(addr)   (((addr)+PAGE_SIZE-1)PAGE_MASK)

The ~ is performed on a 32-bit value, so everything in and with
PAGE_MASK greater than 4GB will be truncated to the 32-bit boundary.
Using the ALIGN() macro seems to be the right way, because it uses
typeof(addr) for the mask.

Also move the PAGE_ALIGN() definitions out of include/asm-*/page.h in
include/linux/mm.h.

See also lkml discussion: http://lkml.org/lkml/2008/6/11/237

[EMAIL PROTECTED]: fix drivers/media/video/uvc/uvc_queue.c]
[EMAIL PROTECTED]: fix v850]
[EMAIL PROTECTED]: fix powerpc]
[EMAIL PROTECTED]: fix arm]
[EMAIL PROTECTED]: fix mips]
[EMAIL PROTECTED]: fix drivers/media/video/pvrusb2/pvrusb2-dvb.c]
[EMAIL PROTECTED]: fix drivers/mtd/maps/uclinux.c]
[EMAIL PROTECTED]: fix powerpc]

Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 linux/drivers/media/video/pvrusb2/pvrusb2-dvb.c|1 +
 linux/drivers/media/video/pvrusb2/pvrusb2-ioread.c |1 +
 linux/drivers/media/video/uvc/uvc_queue.c  |1 +
 linux/drivers/media/video/videobuf-core.c  |1 +
 4 files changed, 4 insertions(+)

diff -r 750f02af7bb2 -r 154bbd7aca47 
linux/drivers/media/video/pvrusb2/pvrusb2-dvb.c
--- a/linux/drivers/media/video/pvrusb2/pvrusb2-dvb.c   Sun Jul 27 13:04:55 
2008 +
+++ b/linux/drivers/media/video/pvrusb2/pvrusb2-dvb.c   Sun Jul 27 12:33:36 
2008 -0300
@@ -24,6 +24,7 @@
 #else
 #include linux/freezer.h
 #endif
+#include linux/mm.h
 #include compat.h
 #include dvbdev.h
 #include pvrusb2-debug.h
diff -r 750f02af7bb2 -r 154bbd7aca47 
linux/drivers/media/video/pvrusb2/pvrusb2-ioread.c
--- a/linux/drivers/media/video/pvrusb2/pvrusb2-ioread.cSun Jul 27 
13:04:55 2008 +
+++ b/linux/drivers/media/video/pvrusb2/pvrusb2-ioread.cSun Jul 27 
12:33:36 2008 -0300
@@ -22,6 +22,7 @@
 #include pvrusb2-debug.h
 #include linux/errno.h
 #include linux/string.h
+#include linux/mm.h
 #include linux/slab.h
 #include linux/mutex.h
 #include asm/uaccess.h
diff -r 750f02af7bb2 -r 154bbd7aca47 linux/drivers/media/video/uvc/uvc_queue.c
--- a/linux/drivers/media/video/uvc/uvc_queue.c Sun Jul 27 13:04:55 2008 +
+++ b/linux/drivers/media/video/uvc/uvc_queue.c Sun Jul 27 12:33:36 2008 -0300
@@ -13,6 +13,7 @@
 
 #include linux/kernel.h
 #include linux/version.h
+#include linux/mm.h
 #include linux/list.h
 #include linux/module.h
 #include linux/usb.h
diff -r 750f02af7bb2 -r 154bbd7aca47 linux/drivers/media/video/videobuf-core.c
--- a/linux/drivers/media/video/videobuf-core.c Sun Jul 27 13:04:55 2008 +
+++ b/linux/drivers/media/video/videobuf-core.c Sun Jul 27 12:33:36 2008 -0300
@@ -16,6 +16,7 @@
 #include linux/init.h
 #include linux/module.h
 #include linux/moduleparam.h
+#include linux/mm.h
 #include linux/slab.h
 #include linux/interrupt.h
 


---

Patch is available at: 
http://linuxtv.org/hg/v4l-dvb/rev/154bbd7aca47b02221603b0b70c3732130f93213

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[linuxtv-commits] [hg:v4l-dvb] pwc: Fix compilation

2008-07-27 Thread Patch from Mauro Carvalho Chehab
The patch number 8548 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
pwc: Fix compilation




Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 linux/drivers/media/video/pwc/pwc.h |1 +
 1 file changed, 1 insertion(+)

diff -r a06612ae3d22 -r 69dca10a19f4 linux/drivers/media/video/pwc/pwc.h
--- a/linux/drivers/media/video/pwc/pwc.h   Sun Jul 27 17:56:15 2008 -0300
+++ b/linux/drivers/media/video/pwc/pwc.h   Sun Jul 27 19:02:30 2008 -0300
@@ -32,6 +32,7 @@
 #include linux/smp_lock.h
 #include linux/version.h
 #include linux/mutex.h
+#include linux/mm.h
 #include asm/errno.h
 #include compat.h
 #include linux/videodev.h


---

Patch is available at: 
http://linuxtv.org/hg/v4l-dvb/rev/69dca10a19f42ab369c165841b365b228447641f

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[linuxtv-commits] [hg:v4l-dvb] mxl5007: Fix an error at include file

2008-07-27 Thread Patch from Mauro Carvalho Chehab
The patch number 8549 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
mxl5007: Fix an error at include file


mxl5007 was forcing for its compilation:

In file included from 
drivers/media/common/tuners/mxl5007t.c:25:drivers/media/common/tuners/mxl5007t.h:80:1:
 warning: CONFIG_MEDIA_TUNER_MXL5007T redefined
In file included from command-line:0:
./include/linux/autoconf.h:2782:1: warning: this is the location of the 
previous definition

Probably, some temporary hack for testing.

CC: Michael Krufky [EMAIL PROTECTED]
Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 linux/drivers/media/common/tuners/mxl5007t.h |1 -
 1 file changed, 1 deletion(-)

diff -r 69dca10a19f4 -r 42e3970c09aa 
linux/drivers/media/common/tuners/mxl5007t.h
--- a/linux/drivers/media/common/tuners/mxl5007t.h  Sun Jul 27 19:02:30 
2008 -0300
+++ b/linux/drivers/media/common/tuners/mxl5007t.h  Sun Jul 27 19:30:46 
2008 -0300
@@ -77,7 +77,6 @@ struct mxl5007t_config {
unsigned int clk_out_enable:1;
 };
 
-#define CONFIG_MEDIA_TUNER_MXL5007T
 #if defined(CONFIG_MEDIA_TUNER_MXL5007T) || 
(defined(CONFIG_MEDIA_TUNER_MXL5007T_MODULE)  defined(MODULE))
 extern struct dvb_frontend *mxl5007t_attach(struct dvb_frontend *fe,
struct i2c_adapter *i2c, u8 addr,


---

Patch is available at: 
http://linuxtv.org/hg/v4l-dvb/rev/42e3970c09aac2fce10ed3d06db4b70c03b9ccab

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[linuxtv-commits] [hg:v4l-dvb] media/video/Kconfig: get rid of a select

2008-07-28 Thread Patch from Mauro Carvalho Chehab
The patch number 8553 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
media/video/Kconfig: get rid of a select


Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 linux/drivers/media/video/Kconfig |3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff -r e9a442d3b53a -r 9f4432068197 linux/drivers/media/video/Kconfig
--- a/linux/drivers/media/video/Kconfig Mon Jul 28 12:52:27 2008 +0200
+++ b/linux/drivers/media/video/Kconfig Mon Jul 28 12:58:53 2008 -0300
@@ -822,8 +822,7 @@ config VIDEO_OVCAMCHIP
 
 config USB_W9968CF
tristate USB W996[87]CF JPEG Dual Mode Camera support
-   depends on VIDEO_V4L1  I2C
-   select VIDEO_OVCAMCHIP
+   depends on VIDEO_V4L1  I2C  VIDEO_OVCAMCHIP
---help---
  Say Y here if you want support for cameras based on OV681 or
  Winbond W9967CF/W9968CF JPEG USB Dual Mode Camera Chips.


---

Patch is available at: 
http://linuxtv.org/hg/v4l-dvb/rev/9f4432068197a06daba2f35de85d4e26816eea58

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[linuxtv-commits] [hg:v4l-dvb] media/video/Kconfig: cosmetic changes and convert select into depends on

2008-07-28 Thread Patch from Mauro Carvalho Chehab
The patch number 8554 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
media/video/Kconfig: cosmetic changes and convert select into depends on

It seems cosmetically better to let USB drivers be the last one.

Also, two SOC drivers were using select, instead of depends on SOC_CAMERA.

Since select has some drawbacks when checking for dependencies, convert those
two into depends on.




CC: Guennadi Liakhovetski [EMAIL PROTECTED]
Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 linux/drivers/media/video/Kconfig |  118 ++
 1 file changed, 58 insertions(+), 60 deletions(-)

diff -r 9f4432068197 -r e12f6a50ac05 linux/drivers/media/video/Kconfig
--- a/linux/drivers/media/video/Kconfig Mon Jul 28 12:58:53 2008 -0300
+++ b/linux/drivers/media/video/Kconfig Mon Jul 28 13:07:42 2008 -0300
@@ -784,6 +784,64 @@ config VIDEO_CAFE_CCIC
  CMOS camera controller.  This is the controller found on first-
  generation OLPC systems.
 
+config SOC_CAMERA
+   tristate SoC camera support
+   depends on VIDEO_V4L2  HAS_DMA
+   select VIDEOBUF_GEN
+   help
+ SoC Camera is a common API to several cameras, not connecting
+ over a bus like PCI or USB. For example some i2c camera connected
+ directly to the data bus of an SoC.
+
+config SOC_CAMERA_MT9M001
+   tristate mt9m001 support
+   depends on SOC_CAMERA  I2C
+   select GPIO_PCA953X if MT9M001_PCA9536_SWITCH
+   help
+ This driver supports MT9M001 cameras from Micron, monochrome
+ and colour models.
+
+config MT9M001_PCA9536_SWITCH
+   bool pca9536 datawidth switch for mt9m001
+   depends on SOC_CAMERA_MT9M001  GENERIC_GPIO
+   help
+ Select this if your MT9M001 camera uses a PCA9536 I2C GPIO
+ extender to switch between 8 and 10 bit datawidth modes
+
+config SOC_CAMERA_MT9V022
+   tristate mt9v022 support
+   depends on SOC_CAMERA  I2C
+   select GPIO_PCA953X if MT9V022_PCA9536_SWITCH
+   help
+ This driver supports MT9V022 cameras from Micron
+
+config MT9V022_PCA9536_SWITCH
+   bool pca9536 datawidth switch for mt9v022
+   depends on SOC_CAMERA_MT9V022  GENERIC_GPIO
+   help
+ Select this if your MT9V022 camera uses a PCA9536 I2C GPIO
+ extender to switch between 8 and 10 bit datawidth modes
+
+config SOC_CAMERA_PLATFORM
+   tristate platform camera support
+   depends on SOC_CAMERA
+   help
+ This is a generic SoC camera platform driver, useful for testing
+
+config VIDEO_PXA27x
+   tristate PXA27x Quick Capture Interface driver
+   depends on VIDEO_DEV  PXA27x  SOC_CAMERA
+   select VIDEOBUF_DMA_SG
+   ---help---
+ This is a v4l2 driver for the PXA27x Quick Capture Interface
+
+config VIDEO_SH_MOBILE_CEU
+   tristate SuperH Mobile CEU Interface driver
+   depends on VIDEO_DEV  SOC_CAMERA
+   select VIDEOBUF_DMA_CONTIG
+   ---help---
+ This is a v4l2 driver for the SuperH Mobile CEU Interface
+
 #
 # USB Multimedia device configuration
 #
@@ -913,64 +971,4 @@ config USB_S2255
 
 endif # V4L_USB_DRIVERS
 
-config SOC_CAMERA
-   tristate SoC camera support
-   depends on VIDEO_V4L2  HAS_DMA
-   select VIDEOBUF_GEN
-   help
- SoC Camera is a common API to several cameras, not connecting
- over a bus like PCI or USB. For example some i2c camera connected
- directly to the data bus of an SoC.
-
-config SOC_CAMERA_MT9M001
-   tristate mt9m001 support
-   depends on SOC_CAMERA  I2C
-   select GPIO_PCA953X if MT9M001_PCA9536_SWITCH
-   help
- This driver supports MT9M001 cameras from Micron, monochrome
- and colour models.
-
-config MT9M001_PCA9536_SWITCH
-   bool pca9536 datawidth switch for mt9m001
-   depends on SOC_CAMERA_MT9M001  GENERIC_GPIO
-   help
- Select this if your MT9M001 camera uses a PCA9536 I2C GPIO
- extender to switch between 8 and 10 bit datawidth modes
-
-config SOC_CAMERA_MT9V022
-   tristate mt9v022 support
-   depends on SOC_CAMERA  I2C
-   select GPIO_PCA953X if MT9V022_PCA9536_SWITCH
-   help
- This driver supports MT9V022 cameras from Micron
-
-config MT9V022_PCA9536_SWITCH
-   bool pca9536 datawidth switch for mt9v022
-   depends on SOC_CAMERA_MT9V022  GENERIC_GPIO
-   help
- Select this if your MT9V022 camera uses a PCA9536 I2C GPIO
- extender to switch between 8 and 10 bit datawidth modes
-
-config SOC_CAMERA_PLATFORM
-   

[linuxtv-commits] [hg:v4l-dvb] media/video/Kconfig: fix a typo

2008-07-28 Thread Patch from Mauro Carvalho Chehab
The patch number 8558 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
media/video/Kconfig: fix a typo


Thanks to Hermann Gausterer for pointing this issue.

Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 linux/drivers/media/video/Kconfig |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff -r 737a00109ede -r 02bfc69e3849 linux/drivers/media/video/Kconfig
--- a/linux/drivers/media/video/Kconfig Mon Jul 28 13:10:41 2008 -0300
+++ b/linux/drivers/media/video/Kconfig Mon Jul 28 18:07:35 2008 -0300
@@ -630,7 +630,7 @@ config VIDEO_ZORAN_ZR36060
depends on VIDEO_ZORAN
help
  Say Y to support Zoran boards based on 36060 chips.
- This includes Iomega Bus, Pinnacle DC10, Linux media Labs 33
+ This includes Iomega Buz, Pinnacle DC10, Linux media Labs 33
  and 33 R10 and AverMedia 6 boards.
 
 config VIDEO_ZORAN_BUZ


---

Patch is available at: 
http://linuxtv.org/hg/v4l-dvb/rev/02bfc69e384986b9ce6f5a87333a692245e3fa85

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[linuxtv-commits] [hg:v4l-dvb] merge: http://www.linuxtv.org/hg/~hverkuil/v4l-dvb-fixes

2008-07-29 Thread Patch from Mauro Carvalho Chehab
The patch number 8566 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
merge: http://www.linuxtv.org/hg/~hverkuil/v4l-dvb-fixes




Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 linux/drivers/media/video/tvmixer.c |1 -
 1 file changed, 1 deletion(-)

diff -r fb79cf57892c -r 47f980c488e2 linux/drivers/media/video/tvmixer.c
--- a/linux/drivers/media/video/tvmixer.c   Tue Jul 29 08:30:58 2008 +
+++ b/linux/drivers/media/video/tvmixer.c   Tue Jul 29 13:19:54 2008 -0300
@@ -16,7 +16,6 @@
 #include linux/sound.h
 #include linux/soundcard.h
 
-#include asm/semaphore.h
 #include asm/uaccess.h
 
 #define DEV_MAX  4


---

Patch is available at: 
http://linuxtv.org/hg/v4l-dvb/rev/47f980c488e28caef8edb97c8256b7727d733691

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[linuxtv-commits] [hg:v4l-dvb] Add support for TCL tuner MF02GIP-5N-E

2008-08-05 Thread Patch from Mauro Carvalho Chehab
The patch number 8626 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
Add support for TCL tuner MF02GIP-5N-E



Thanks to Sistema Fenix (http://www.sistemafenix.com.br/) and CDI Brasil
(www.cdibrasil.com.br/) for sponsoring this development.

Signed-off-by: Gilberto [EMAIL PROTECTED]
Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]

Priority: normal

Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 linux/Documentation/video4linux/CARDLIST.tuner   |1 
 linux/drivers/media/common/tuners/tuner-simple.c |2 +
 linux/drivers/media/common/tuners/tuner-types.c  |   22 +++
 linux/include/media/tuner.h  |1 
 4 files changed, 26 insertions(+)

diff -r 0514410c6ed4 -r ee0abb695a76 
linux/Documentation/video4linux/CARDLIST.tuner
--- a/linux/Documentation/video4linux/CARDLIST.tunerTue Aug 05 10:03:17 
2008 -0300
+++ b/linux/Documentation/video4linux/CARDLIST.tunerTue Aug 05 10:11:25 
2008 -0300
@@ -74,3 +74,4 @@ tuner=73 - Samsung TCPG 6121P30A
 tuner=73 - Samsung TCPG 6121P30A
 tuner=75 - Philips TEA5761 FM Radio
 tuner=76 - Xceive 5000 tuner
+tuner=77 - TCL tuner MF02GIP-5N-E
diff -r 0514410c6ed4 -r ee0abb695a76 
linux/drivers/media/common/tuners/tuner-simple.c
--- a/linux/drivers/media/common/tuners/tuner-simple.c  Tue Aug 05 10:03:17 
2008 -0300
+++ b/linux/drivers/media/common/tuners/tuner-simple.c  Tue Aug 05 10:11:25 
2008 -0300
@@ -143,6 +143,7 @@ static inline int tuner_stereo(const int
case TUNER_PHILIPS_FM1236_MK3:
case TUNER_PHILIPS_FM1256_IH3:
case TUNER_LG_NTSC_TAPE:
+   case TUNER_TCL_MF02GIP_5N:
return ((status  TUNER_SIGNAL) == TUNER_STEREO_MK3);
default:
return status  TUNER_STEREO;
@@ -514,6 +515,7 @@ static int simple_radio_bandswitch(struc
case TUNER_PHILIPS_FMD1216ME_MK3:
case TUNER_LG_NTSC_TAPE:
case TUNER_PHILIPS_FM1256_IH3:
+   case TUNER_TCL_MF02GIP_5N:
buffer[3] = 0x19;
break;
case TUNER_TNF_5335MF:
diff -r 0514410c6ed4 -r ee0abb695a76 
linux/drivers/media/common/tuners/tuner-types.c
--- a/linux/drivers/media/common/tuners/tuner-types.c   Tue Aug 05 10:03:17 
2008 -0300
+++ b/linux/drivers/media/common/tuners/tuner-types.c   Tue Aug 05 10:11:25 
2008 -0300
@@ -1217,6 +1217,23 @@ static struct tuner_params tuner_samsung
},
 };
 
+/*  TUNER_TCL_MF02GIP-5N-E - TCL MF02GIP-5N  */
+
+static struct tuner_range tuner_tcl_mf02gip_5n_ntsc_ranges[] = {
+   { 16 * 172.00 /*MHz*/, 0x8e, 0x01, },
+   { 16 * 448.00 /*MHz*/, 0x8e, 0x02, },
+   { 16 * 999.99, 0x8e, 0x04, },
+};
+
+static struct tuner_params tuner_tcl_mf02gip_5n_params[] = {
+   {
+   .type   = TUNER_PARAM_TYPE_NTSC,
+   .ranges = tuner_tcl_mf02gip_5n_ntsc_ranges,
+   .count  = ARRAY_SIZE(tuner_tcl_mf02gip_5n_ntsc_ranges),
+   .cb_first_if_lower_freq = 1,
+   },
+};
+
 /* - */
 
 struct tunertype tuners[] = {
@@ -1642,6 +1659,11 @@ struct tunertype tuners[] = {
.name   = Xceive 5000 tuner,
/* see xc5000.c for details */
},
+   [TUNER_TCL_MF02GIP_5N] = { /* TCL tuner MF02GIP-5N-E */
+   .name   = TCL tuner MF02GIP-5N-E,
+   .params = tuner_tcl_mf02gip_5n_params,
+   .count  = ARRAY_SIZE(tuner_tcl_mf02gip_5n_params),
+   },
 };
 EXPORT_SYMBOL(tuners);
 
diff -r 0514410c6ed4 -r ee0abb695a76 linux/include/media/tuner.h
--- a/linux/include/media/tuner.h   Tue Aug 05 10:03:17 2008 -0300
+++ b/linux/include/media/tuner.h   Tue Aug 05 10:11:25 2008 -0300
@@ -122,6 +122,7 @@
 #define TUNER_TDA9887   74  /* This tuner should be used 
only internally */
 #define TUNER_TEA5761  75  /* Only FM Radio Tuner */
 #define TUNER_XC5000   76  /* Xceive Silicon Tuner */
+#define TUNER_TCL_MF02GIP_5N   77  /* TCL MF02GIP_5N */
 
 /* tv card specific */
 #define TDA9887_PRESENT(10)


---

Patch is available at: 
http://linuxtv.org/hg/v4l-dvb/rev/ee0abb695a764c5b9bbbc07aeedde1e4c32d0cca

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[linuxtv-commits] [hg:v4l-dvb] saa7134: Add NEC prococol IR decoding capability

2008-08-05 Thread Patch from Mauro Carvalho Chehab
The patch number 8625 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
saa7134: Add NEC prococol IR decoding capability


This patch adds the capability of decoding NEC protocol, received via GPIO18 
line.
This GPIO port can trigger saa7134 IRQ.

A future improvement would be to make it a little more generic to work also
with GPIO16 line.

A pure IRQ code didn't work, since some delays were introduced on the tests we
did.

A possible approach would be to use polling at a rate of 2.5 ms or less. If a
new code were taken, a code similar to nec_task() could be used. However, this
would add an extra overhead to kernel, and will consume more power.

Due to that, we took an hybrid approach: an IRQ upper half to trigger when a
new key is received and a bottom half to convert pulse-distance into a keycode.

The bottom half is polling based, to improve performance. During the bottom
half proccess, GPIO18 IRQ line is disabled, preventing IRQ reentrancy and
improving performance a little bit.

Thanks to Sistema Fenix (http://www.sistemafenix.com.br/) for sponsoring this
development.

Priority: normal

Signed-off-by: Gilberto [EMAIL PROTECTED]
Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 linux/drivers/media/video/saa7134/saa7134-input.c |  144 +-
 linux/include/media/ir-common.h   |5 
 2 files changed, 143 insertions(+), 6 deletions(-)

diff -r 7c739269c8b3 -r 0514410c6ed4 
linux/drivers/media/video/saa7134/saa7134-input.c
--- a/linux/drivers/media/video/saa7134/saa7134-input.c Tue Aug 05 10:00:02 
2008 -0300
+++ b/linux/drivers/media/video/saa7134/saa7134-input.c Tue Aug 05 10:03:17 
2008 -0300
@@ -62,8 +62,11 @@ MODULE_PARM_DESC(disable_other_ir, disa
 #define i2cdprintk(fmt, arg...)if (ir_debug) \
printk(KERN_DEBUG %s/ir:  fmt, ir-c.name , ## arg)
 
-/** rc5 functions */
+/* Helper functions for RC5 and NEC decoding at GPIO16 or GPIO18 */
 static int saa7134_rc5_irq(struct saa7134_dev *dev);
+static int saa7134_nec_irq(struct saa7134_dev *dev);
+static void nec_task(unsigned long data);
+static void saa7134_nec_timer(unsigned long data);
 
 /*  GPIO generic keycode builder  */
 
@@ -280,7 +283,9 @@ void saa7134_input_irq(struct saa7134_de
 {
struct card_ir *ir = dev-remote;
 
-   if (!ir-polling  !ir-rc5_gpio) {
+   if (ir-nec_gpio) {
+   saa7134_nec_irq(dev);
+   } else if (!ir-polling  !ir-rc5_gpio) {
build_key(dev);
} else if (ir-rc5_gpio) {
saa7134_rc5_irq(dev);
@@ -316,6 +321,10 @@ void saa7134_ir_start(struct saa7134_dev
ir-addr = 0x17;
ir-rc5_key_timeout = ir_rc5_key_timeout;
ir-rc5_remote_gap = ir_rc5_remote_gap;
+   } else if (ir-nec_gpio) {
+   setup_timer(ir-timer_keyup, saa7134_nec_timer,
+   (unsigned long)dev);
+   tasklet_init(ir-tlet, nec_task, (unsigned long)dev);
}
 }
 
@@ -335,6 +344,7 @@ int saa7134_input_init1(struct saa7134_d
u32 mask_keyup   = 0;
int polling  = 0;
int rc5_gpio = 0;
+   int nec_gpio = 0;
int ir_type  = IR_TYPE_OTHER;
int err;
 
@@ -533,6 +543,7 @@ int saa7134_input_init1(struct saa7134_d
ir-mask_keyup   = mask_keyup;
ir-polling  = polling;
ir-rc5_gpio = rc5_gpio;
+   ir-nec_gpio = nec_gpio;
 
/* init input device */
snprintf(ir-name, sizeof(ir-name), saa7134 IR (%s),
@@ -679,8 +690,129 @@ static int saa7134_rc5_irq(struct saa713
return 1;
 }
 
-/* --
- * Local variables:
- * c-basic-offset: 8
- * End:
+
+/* On NEC protocol, One has 2.25 ms, and zero has 1.125 ms
+   The first pulse (start) has 9 + 4.5 ms
  */
+
+static void saa7134_nec_timer(unsigned long data)
+{
+   struct saa7134_dev *dev = (struct saa7134_dev *) data;
+   struct card_ir *ir = dev-remote;
+
+   dprintk(Cancel key repeat\n);
+
+   ir_input_nokey(ir-dev, ir-ir);
+}
+
+static void nec_task(unsigned long data)
+{
+   struct saa7134_dev *dev = (struct saa7134_dev *) data;
+   struct card_ir *ir;
+   struct timeval tv;
+   int count, pulse, oldpulse, gap;
+   u32 ircode = 0, not_code = 0;
+   int ngap = 0;
+
+   if (!data) {
+   printk(KERN_ERR saa713x/ir: Can't recover dev struct\n);
+   /* GPIO will be kept disabled */
+   return;
+   }
+
+   ir = 

[linuxtv-commits] [hg:v4l-dvb] merge: http://www.linuxtv.org/hg/~stoth/v4l-dvb

2008-08-09 Thread Patch from Mauro Carvalho Chehab
The patch number 8647 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
merge: http://www.linuxtv.org/hg/~stoth/v4l-dvb



Priority: normal

Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 linux/Documentation/video4linux/CARDLIST.cx23885  |1 
 linux/drivers/media/video/cx23885/cx23885-cards.c |   46 ++--
 linux/drivers/media/video/cx23885/cx23885-dvb.c   |   78 +++---
 linux/drivers/media/video/cx23885/cx23885.h   |1 
 4 files changed, 82 insertions(+), 44 deletions(-)

diff -r deeb5dfb37a1 -r 405d3e926ffd 
linux/Documentation/video4linux/CARDLIST.cx23885
--- a/linux/Documentation/video4linux/CARDLIST.cx23885  Fri Aug 08 20:47:07 
2008 +0200
+++ b/linux/Documentation/video4linux/CARDLIST.cx23885  Sat Aug 09 09:21:15 
2008 -0300
@@ -9,3 +9,4 @@
   8 - Hauppauge WinTV-HVR1700 [0070:8101]
   9 - Hauppauge WinTV-HVR1400 [0070:8010]
  10 - DViCO FusionHDTV7 Dual Express  [18ac:d618]
+ 11 - DViCO FusionHDTV DVB-T Dual Express [18ac:db78]
diff -r deeb5dfb37a1 -r 405d3e926ffd 
linux/drivers/media/video/cx23885/cx23885-cards.c
--- a/linux/drivers/media/video/cx23885/cx23885-cards.c Fri Aug 08 20:47:07 
2008 +0200
+++ b/linux/drivers/media/video/cx23885/cx23885-cards.c Sat Aug 09 09:21:15 
2008 -0300
@@ -27,6 +27,7 @@
 
 #include compat.h
 #include cx23885.h
+#include tuner-xc2028.h
 
 /* -- */
 /* board config info  */
@@ -149,6 +150,11 @@ struct cx23885_board cx23885_boards[] = 
.portb  = CX23885_MPEG_DVB,
.portc  = CX23885_MPEG_DVB,
},
+   [CX23885_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL_EXP] = {
+   .name   = DViCO FusionHDTV DVB-T Dual Express,
+   .portb  = CX23885_MPEG_DVB,
+   .portc  = CX23885_MPEG_DVB,
+   },
 };
 const unsigned int cx23885_bcount = ARRAY_SIZE(cx23885_boards);
 
@@ -220,6 +226,10 @@ struct cx23885_subid cx23885_subids[] = 
.subvendor = 0x18ac,
.subdevice = 0xd618,
.card  = CX23885_BOARD_DVICO_FUSIONHDTV_7_DUAL_EXP,
+   },{
+   .subvendor = 0x18ac,
+   .subdevice = 0xdb78,
+   .card  = CX23885_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL_EXP,
},
 };
 const unsigned int cx23885_idcount = ARRAY_SIZE(cx23885_subids);
@@ -320,14 +330,14 @@ static void hauppauge_eeprom(struct cx23
dev-name, tv.model);
 }
 
-/* Tuner callback function for cx23885 boards. Currently only needed
- * for HVR1500Q, which has an xc5000 tuner.
- */
 int cx23885_tuner_callback(void *priv, int command, int arg)
 {
-   struct cx23885_i2c *bus = priv;
-   struct cx23885_dev *dev = bus-dev;
+   struct cx23885_tsport *port = priv;
+   struct cx23885_dev *dev = port-dev;
u32 bitmask = 0;
+
+   if (command == XC2028_RESET_CLK)
+   return 0;
 
if (command != 0) {
printk(KERN_ERR %s(): Unknown command 0x%x.\n,
@@ -336,19 +346,22 @@ int cx23885_tuner_callback(void *priv, i
}
 
switch(dev-board) {
+   case CX23885_BOARD_HAUPPAUGE_HVR1400:
+   case CX23885_BOARD_HAUPPAUGE_HVR1500:
case CX23885_BOARD_HAUPPAUGE_HVR1500Q:
-   /* Tuner Reset Command from xc5000 */
+   /* Tuner Reset Command */
if (command == 0)
bitmask = 0x04;
break;
case CX23885_BOARD_DVICO_FUSIONHDTV_7_DUAL_EXP:
+   case CX23885_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL_EXP:
if (command == 0) {
 
/* Two identical tuners on two different i2c buses,
 * we need to reset the correct gpio. */
-   if (bus-nr == 0)
+   if (port-nr == 0)
bitmask = 0x01;
-   else if (bus-nr == 1)
+   else if (port-nr == 1)
bitmask = 0x04;
}
break;
@@ -458,6 +471,19 @@ void cx23885_gpio_setup(struct cx23885_d
/* GPIO-1 s5h1409 demod reset i2c bus 0 */
/* GPIO-2 xc5000 tuner reset i2c bus 1 */
/* GPIO-3 s5h1409 demod reset i2c bus 0 */
+
+   /* Put the parts into reset and back */
+   cx_set(GP0_IO, 0x000f);
+   mdelay(20);
+ 

[linuxtv-commits] [hg:v4l-dvb] Syncronize checkpatch.pl with the latest kernel version

2008-08-14 Thread Patch from Mauro Carvalho Chehab
The patch number 8652 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
Syncronize checkpatch.pl with the latest kernel version


kernel-sync:
Priority: normal

Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 v4l/scripts/checkpatch.pl |  314 --
 1 file changed, 236 insertions(+), 78 deletions(-)

diff -r 10f0f3658ec7 -r 854e68543830 v4l/scripts/checkpatch.pl
--- a/v4l/scripts/checkpatch.pl Tue Aug 12 19:06:12 2008 +0200
+++ b/v4l/scripts/checkpatch.pl Thu Aug 14 07:24:51 2008 -0300
@@ -9,7 +9,7 @@ my $P = $0;
 my $P = $0;
 $P =~ [EMAIL PROTECTED]/@@g;
 
-my $V = '0.19';
+my $V = '0.21';
 
 use Getopt::Long qw(:config no_auto_abbrev);
 
@@ -17,7 +17,6 @@ my $tree = 1;
 my $tree = 1;
 my $chk_signoff = 1;
 my $chk_patch = 1;
-my $tst_type = 0;
 my $tst_only;
 my $emacs = 0;
 my $terse = 0;
@@ -44,7 +43,6 @@ GetOptions(
'summary-file!' = \$summary_file,
 
'debug=s'   = \%debug,
-   'test-type!'= \$tst_type,
'test-only=s'   = \$tst_only,
 ) or exit;
 
@@ -67,6 +65,7 @@ if ($#ARGV  0) {
 
 my $dbg_values = 0;
 my $dbg_possible = 0;
+my $dbg_type = 0;
 for my $key (keys %debug) {
eval \${dbg_$key} = '$debug{$key}';
 }
@@ -169,24 +168,23 @@ our @modifierList = (
 );
 
 sub build_types {
-   my $mods = (?:  \n . join(|\n  , @modifierList) . \n);
-   my $all = (?:  \n . join(|\n  , @typeList) . \n);
+   my $mods = (?x:  \n . join(|\n  , @modifierList) . \n);
+   my $all = (?x:  \n . join(|\n  , @typeList) . \n);
+   $Modifier   = qr{(?:$Attribute|$Sparse|$mods)};
$NonptrType = qr{
-   (?:const\s+)?
-   (?:$mods\s+)?
+   (?:$Modifier\s+|const\s+)*
(?:
(?:typeof|__typeof__)\s*\(\s*\**\s*$Ident\s*\)|
(?:${all}\b)
)
-   (?:\s+$Sparse|\s+const)*
+   (?:\s+$Modifier|\s+const)*
  }x;
$Type   = qr{
$NonptrType
(?:\s*\*+\s*const|\s*\*+|(?:\s*\[\s*\])+)?
-   (?:\s+$Inline|\s+$Sparse|\s+$Attribute|\s+$mods)*
+   (?:\s+$Inline|\s+$Modifier)*
  }x;
$Declare= qr{(?:$Storage\s+)?$Type};
-   $Modifier   = qr{(?:$Attribute|$Sparse|$mods)};
 }
 build_types();
 
@@ -470,7 +468,9 @@ sub ctx_statement_block {
}
$off++;
}
+   # We are truly at the end, so shuffle to the next line.
if ($off == $len) {
+   $loff = $len + 1;
$line++;
$remain--;
}
@@ -631,7 +631,7 @@ sub ctx_locate_comment {
my ($first_line, $end_line) = @_;
 
# Catch a comment on the end of the line itself.
-   my ($current_comment) = ($rawlines[$end_line - 1] =~ [EMAIL 
PROTECTED](/\*.*\*/)\s*$@);
+   my ($current_comment) = ($rawlines[$end_line - 1] =~ [EMAIL 
PROTECTED](/\*.*\*/)\s*(?:\\\s*)?$@);
return $current_comment if (defined $current_comment);
 
# Look through the context and try and figure out if there is a
@@ -689,17 +689,20 @@ my $av_preprocessor = 0;
 my $av_preprocessor = 0;
 my $av_pending;
 my @av_paren_type;
+my $av_pend_colon;
 
 sub annotate_reset {
$av_preprocessor = 0;
$av_pending = '_';
@av_paren_type = ('E');
+   $av_pend_colon = 'O';
 }
 
 sub annotate_values {
my ($stream, $type) = @_;
 
my $res;
+   my $var = '_' x length($stream);
my $cur = $stream;
 
print $stream\n if ($dbg_values  1);
@@ -715,8 +718,12 @@ sub annotate_values {
$av_preprocessor = 0;
}
 
-   } elsif ($cur =~ /^($Type)/) {
+   } elsif ($cur =~ /^($Type)\s*(?:$Ident|,|\)|\()/) {
print DECLARE($1)\n if ($dbg_values  1);
+   $type = 'T';
+
+   } elsif ($cur =~ /^($Modifier)\s*/) {
+   print MODIFIER($1)\n if ($dbg_values  1);
$type = 'T';
 
} elsif ($cur =~ /^(\#\s*define\s*$Ident)(\(?)/o) {
@@ -780,7 +787,12 @@ sub annotate_values {
$av_pending = 'N';
$type = 'N';
 
-   } elsif ($cur =~/^(return|case|else)/o) {
+   } elsif ($cur =~/^(case)/o) {
+   print CASE($1)\n if ($dbg_values  1);
+

[linuxtv-commits] [hg:v4l-dvb] merge: http://linuxtv.org/hg/~jfrancois/gspca/

2008-08-14 Thread Patch from Mauro Carvalho Chehab
The patch number 8676 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
merge: http://linuxtv.org/hg/~jfrancois/gspca/



Priority: normal

Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 linux/Documentation/video4linux/gspca.txt |1 
 linux/drivers/media/video/gspca/etoms.c   |4 
 linux/drivers/media/video/gspca/gspca.h   |1 
 linux/drivers/media/video/gspca/pac207.c  |1 
 linux/drivers/media/video/gspca/pac7311.c |  708 --
 linux/drivers/media/video/gspca/sonixj.c  |  257 ++-
 linux/drivers/media/video/gspca/spca561.c |  628 ---
 linux/drivers/media/video/gspca/zc3xx.c   |   31 
 linux/include/linux/videodev2.h   |1 
 9 files changed, 1041 insertions(+), 591 deletions(-)

diff discarded since it is too big

---

Patch is available at: 
http://linuxtv.org/hg/v4l-dvb/rev/9085febc91ab25027301b93e19f78842ba82839b

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[linuxtv-commits] [hg:v4l-dvb] Properly handles commit messages with date: field

2008-08-16 Thread Patch from Mauro Carvalho Chehab
The patch number 8677 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
Properly handles commit messages with date: field


This patch allows a better support for third party patches. Now, it will
properly recognize and proccess messages with the following format:

Date: some date
From: some developer
Subject: patch subject

body

This will help to better proccess messages received via email.

Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 Makefile |   13 +
 v4l/scripts/do_commit.sh |   36 
 v4l/scripts/hghead.pl|   12 +++-
 3 files changed, 40 insertions(+), 21 deletions(-)

diff -r 9085febc91ab -r 16dd2e9c4d3b Makefile
--- a/Makefile  Thu Aug 14 08:13:50 2008 -0300
+++ b/Makefile  Sat Aug 16 10:24:21 2008 -0300
@@ -19,18 +19,7 @@ install:
$(MAKE) -C $(BUILD_DIR) $(MAKECMDGOALS)
 
 commit cvscommit hgcommit change changes changelog:: whitespace
-   @cd $(BUILD_DIR); scripts/cardlist; cd ..
-   @v4l/scripts/prep_commit_msg.pl $(TMP)/v4l_hg_whitespace  \
-   $(TMP)/v4l_hg_commit.msg
-   @CHECKSUM=`md5sum $(TMP)/v4l_hg_commit.msg`; \
-   $(EDITOR) $(TMP)/v4l_hg_commit.msg || exit $?; \
-   echo $$CHECKSUM | md5sum -c --status  \
-   echo *** commit message not changed. Aborting. *** \
-exit 13 || exit 0
-   $(BUILD_DIR)/scripts/hghead.pl $(TMP)/v4l_hg_commit.msg | grep -v '^#' 
| hg commit -l -
-   @echo *** PLEASE CHECK IF LOG IS OK:
-   @hg log -v -r -1
-   @echo *** If not ok, do \hg rollback\ and \make commit\ again
+   @cd $(BUILD_DIR); scripts/cardlist; scripts/do_commit.sh $(EDITOR) 
$(TMP)/v4l_hg_whitespace; cd ..
 
 qrefresh: Q=q
 qrefresh:: whitespace
diff -r 9085febc91ab -r 16dd2e9c4d3b v4l/scripts/do_commit.sh
--- /dev/null   Thu Jan 01 00:00:00 1970 +
+++ b/v4l/scripts/do_commit.sh  Sat Aug 16 10:24:21 2008 -0300
@@ -0,0 +1,36 @@
+#!/bin/bash
+
+EDITOR=$1
+WHITESPCE=$2
+
+if [ $WHITESPCE ==  ]; then
+   exit 13
+fi
+
+TMPMSG=$1
+
+scripts/cardlist
+scripts/prep_commit_msg.pl $WHITESPCE   $TMPMSG
+
+#trap 'rm -rf $TMPMSG' EXIT
+
+CHECKSUM=`md5sum $TMPMSG`
+$EDITOR $TMPMSG || exit $?
+echo $CHECKSUM | md5sum -c --status  echo *** commit message not changed. 
Aborting. ***   exit 13
+DATE=`scripts/hghead.pl $TMPMSG|perl -ne 'if (m/\#[dD]ate:\s+(.*)/) { print 
$1; }'`
+
+if [ $DATE !=  ]; then
+   echo Patch date is $DATE
+   scripts/hghead.pl $TMPMSG| grep -v '^#' | hg commit -d $DATE -l -
+else
+   scripts/hghead.pl $TMPMSG| grep -v '^#' | hg commit -l -
+fi
+
+if [ $? != 0 ]; then
+   echo Couldn't apply the patch
+   exit 13
+fi
+
+echo *** PLEASE CHECK IF LOG IS OK:
+hg log -v -r -1
+echo *** If not ok, do \hg rollback\ and \make commit\ again
diff -r 9085febc91ab -r 16dd2e9c4d3b v4l/scripts/hghead.pl
--- a/v4l/scripts/hghead.pl Thu Aug 14 08:13:50 2008 -0300
+++ b/v4l/scripts/hghead.pl Sat Aug 16 10:24:21 2008 -0300
@@ -1,6 +1,5 @@
 #!/usr/bin/perl
 use strict;
-use Date::Parse;
 
 #
 # analyse diffs
@@ -46,18 +45,13 @@ while ($line = IN) {
last;
}
 
-   if ($line =~ m/^# Date\s*(.*)/) {
+   if ($line =~ m/^#\s*Date\s*(.*)/) {
print #Date: $1\n;
+   next;
}
 
if ($line =~ m/^Date:\s*(.*)/) {
-   my $time = str2time($1);
-
-   if ($time) {
-   print #Date: $time 0\n;
-   } else {
-   print #Date: $1\n;
-   }
+   print #Date: $1\n;
next;
}
 


---

Patch is available at: 
http://linuxtv.org/hg/v4l-dvb/rev/16dd2e9c4d3b63a7b76fe3fd1caf6a4306765944

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[linuxtv-commits] [hg:v4l-dvb] merge: http://linuxtv.org/hg/~gliakhovetski/v4l-dvb

2008-08-22 Thread Patch from Mauro Carvalho Chehab
The patch number 8688 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
merge: http://linuxtv.org/hg/~gliakhovetski/v4l-dvb




Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 linux/drivers/media/video/Kconfig|6 
 linux/drivers/media/video/Makefile   |1 
 linux/drivers/media/video/mt9m001.c  |   61 
 linux/drivers/media/video/mt9m111.c  |  973 +++
 linux/drivers/media/video/mt9v022.c  |   52 
 linux/drivers/media/video/pxa_camera.c   |   24 
 linux/drivers/media/video/sh_mobile_ceu_camera.c |5 
 linux/include/asm-arm/arch-pxa/camera.h  |2 
 linux/include/media/sh_mobile_ceu.h  |2 
 linux/include/media/soc_camera.h |3 
 linux/include/media/v4l2-chip-ident.h|1 
 11 files changed, 1065 insertions(+), 65 deletions(-)

diff discarded since it is too big

---

Patch is available at: 
http://linuxtv.org/hg/v4l-dvb/rev/7ca73655dadb01aa791f71dde7e08a932cda4278

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[linuxtv-commits] [hg:v4l-dvb] merge: http://www.linuxtv.org/hg/~hverkuil/v4l-dvb

2008-08-22 Thread Patch from Mauro Carvalho Chehab
The patch number 8700 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
merge: http://www.linuxtv.org/hg/~hverkuil/v4l-dvb


Priority: normal

Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 linux/drivers/media/radio/Kconfig |   32 
 linux/drivers/media/video/Kconfig |   22 
 linux/drivers/media/video/Makefile|2 
 linux/drivers/media/video/dpc7146.c   |  409 --
 linux/drivers/media/video/pxa_camera.c|5 
 linux/drivers/media/video/tuner-3036.c|  215 -
 linux/drivers/media/video/usbvideo/usbvideo.c |7 
 linux/include/linux/i2c-id.h  |1 
 linux/sound/oss/aci.c |  713 --
 linux/sound/oss/aci.h |   57 -
 v4l/Kconfig.sound |   17 
 v4l/Makefile  |4 
 v4l/Makefile.sound|   19 
 v4l/scripts/make_kconfig.pl   |3 
 v4l2-apps/test/capture_example.c  |  115 +-
 v4l2-apps/util/v4l2-ctl.cpp   |  275 +++---
 16 files changed, 225 insertions(+), 1671 deletions(-)

diff discarded since it is too big

---

Patch is available at: 
http://linuxtv.org/hg/v4l-dvb/rev/ba53c96b4b19d092888e8f63f7c114ac4aa89dab

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[linuxtv-commits] [hg:v4l-dvb] merge: http://linuxtv.org/hg/~awalls/v4l-dvb-critical

2008-08-22 Thread Patch from Mauro Carvalho Chehab
The patch number 8702 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
merge: http://linuxtv.org/hg/~awalls/v4l-dvb-critical




Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 linux/drivers/media/video/cx18/cx18-irq.c   |2 -
 linux/drivers/media/video/cx18/cx18-queue.c |   23 +++-
 linux/drivers/media/video/cx18/cx18-queue.h |2 -
 3 files changed, 15 insertions(+), 12 deletions(-)

diff -r ba53c96b4b19 -r 0c912139c932 linux/drivers/media/video/cx18/cx18-irq.c
--- a/linux/drivers/media/video/cx18/cx18-irq.c Fri Aug 22 10:02:43 2008 -0300
+++ b/linux/drivers/media/video/cx18/cx18-irq.c Fri Aug 22 10:09:25 2008 -0300
@@ -61,7 +61,7 @@ static void epu_dma_done(struct cx18 *cx
CX18_WARN(Ack struct = %d for %s\n,
mb-args[2], s-name);
id = read_enc(off);
-   buf = cx18_queue_find_buf(s, id, read_enc(off + 4));
+   buf = cx18_queue_get_buf_irq(s, id, read_enc(off + 4));
CX18_DEBUG_HI_DMA(DMA DONE for %s (buffer %d)\n, s-name, id);
if (buf) {
cx18_buf_sync_for_cpu(s, buf);
diff -r ba53c96b4b19 -r 0c912139c932 linux/drivers/media/video/cx18/cx18-queue.c
--- a/linux/drivers/media/video/cx18/cx18-queue.c   Fri Aug 22 10:02:43 
2008 -0300
+++ b/linux/drivers/media/video/cx18/cx18-queue.c   Fri Aug 22 10:09:25 
2008 -0300
@@ -78,12 +78,13 @@ struct cx18_buffer *cx18_dequeue(struct 
return buf;
 }
 
-struct cx18_buffer *cx18_queue_find_buf(struct cx18_stream *s, u32 id,
+struct cx18_buffer *cx18_queue_get_buf_irq(struct cx18_stream *s, u32 id,
u32 bytesused)
 {
struct cx18 *cx = s-cx;
struct list_head *p;
 
+   spin_lock(s-qlock);
list_for_each(p, s-q_free.list) {
struct cx18_buffer *buf =
list_entry(p, struct cx18_buffer, list);
@@ -92,17 +93,19 @@ struct cx18_buffer *cx18_queue_find_buf(
continue;
buf-bytesused = bytesused;
/* the transport buffers are handled differently,
-  so there is no need to move them to the full queue */
-   if (s-type == CX18_ENC_STREAM_TYPE_TS)
-   return buf;
-   s-q_free.buffers--;
-   s-q_free.length -= s-buf_size;
-   s-q_full.buffers++;
-   s-q_full.length += s-buf_size;
-   s-q_full.bytesused += buf-bytesused;
-   list_move_tail(buf-list, s-q_full.list);
+  they are not moved to the full queue */
+   if (s-type != CX18_ENC_STREAM_TYPE_TS) {
+   s-q_free.buffers--;
+   s-q_free.length -= s-buf_size;
+   s-q_full.buffers++;
+   s-q_full.length += s-buf_size;
+   s-q_full.bytesused += buf-bytesused;
+   list_move_tail(buf-list, s-q_full.list);
+   }
+   spin_unlock(s-qlock);
return buf;
}
+   spin_unlock(s-qlock);
CX18_ERR(Cannot find buffer %d for stream %s\n, id, s-name);
return NULL;
 }
diff -r ba53c96b4b19 -r 0c912139c932 linux/drivers/media/video/cx18/cx18-queue.h
--- a/linux/drivers/media/video/cx18/cx18-queue.h   Fri Aug 22 10:02:43 
2008 -0300
+++ b/linux/drivers/media/video/cx18/cx18-queue.h   Fri Aug 22 10:09:25 
2008 -0300
@@ -46,7 +46,7 @@ void cx18_enqueue(struct cx18_stream *s,
 void cx18_enqueue(struct cx18_stream *s, struct cx18_buffer *buf,
struct cx18_queue *q);
 struct cx18_buffer *cx18_dequeue(struct cx18_stream *s, struct cx18_queue *q);
-struct cx18_buffer *cx18_queue_find_buf(struct cx18_stream *s, u32 id,
+struct cx18_buffer *cx18_queue_get_buf_irq(struct cx18_stream *s, u32 id,
u32 bytesused);
 void cx18_flush_queues(struct cx18_stream *s);
 


---

Patch is available at: 
http://linuxtv.org/hg/v4l-dvb/rev/0c912139c93289f84f5a75f0fbe8457dfbeaa85b

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[linuxtv-commits] [hg:v4l-dvb] merge: http://linuxtv.org/hg/~jfrancois/gspca/

2008-08-22 Thread Patch from Mauro Carvalho Chehab
The patch number 8721 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
merge: http://linuxtv.org/hg/~jfrancois/gspca/


Priority: normal

Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 linux/Documentation/video4linux/gspca.txt |   26 +-
 linux/drivers/media/video/gspca/conex.c   |4 
 linux/drivers/media/video/gspca/etoms.c   |4 
 linux/drivers/media/video/gspca/gspca.c   |   37 ++-
 linux/drivers/media/video/gspca/gspca.h   |   11 +
 linux/drivers/media/video/gspca/mars.c|4 
 linux/drivers/media/video/gspca/ov519.c   |4 
 linux/drivers/media/video/gspca/pac207.c  |4 
 linux/drivers/media/video/gspca/pac7311.c |  185 +++--
 linux/drivers/media/video/gspca/sonixb.c  |4 
 linux/drivers/media/video/gspca/sonixj.c  |  234 +++---
 linux/drivers/media/video/gspca/spca500.c |4 
 linux/drivers/media/video/gspca/spca501.c |4 
 linux/drivers/media/video/gspca/spca505.c |4 
 linux/drivers/media/video/gspca/spca506.c |4 
 linux/drivers/media/video/gspca/spca508.c |4 
 linux/drivers/media/video/gspca/spca561.c |  108 +-
 linux/drivers/media/video/gspca/stk014.c  |4 
 linux/drivers/media/video/gspca/sunplus.c |4 
 linux/drivers/media/video/gspca/t613.c|8 
 linux/drivers/media/video/gspca/tv8532.c  |4 
 linux/drivers/media/video/gspca/vc032x.c  |4 
 linux/drivers/media/video/gspca/zc3xx.c   |   35 ++-
 linux/include/linux/videodev2.h   |5 
 24 files changed, 492 insertions(+), 217 deletions(-)

diff discarded since it is too big

---

Patch is available at: 
http://linuxtv.org/hg/v4l-dvb/rev/0b626a7dbc9bb8e871834249411d38cb885cfe84

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[linuxtv-commits] [hg:v4l-dvb] merge: http://linuxtv.org/hg/~mkrufky/sms1xxx

2008-08-22 Thread Patch from Mauro Carvalho Chehab
The patch number 8723 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
merge: http://linuxtv.org/hg/~mkrufky/sms1xxx




Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 linux/drivers/media/dvb/siano/sms-cards.c  |2 +-
 linux/drivers/media/dvb/siano/sms-cards.h  |2 +-
 linux/drivers/media/dvb/siano/smscoreapi.c |2 +-
 linux/drivers/media/dvb/siano/smscoreapi.h |2 +-
 linux/drivers/media/dvb/siano/smsdvb.c |2 +-
 linux/drivers/media/dvb/siano/smsusb.c |2 +-
 6 files changed, 6 insertions(+), 6 deletions(-)

diff -r 0b626a7dbc9b -r 379113ef4d27 linux/drivers/media/dvb/siano/sms-cards.c
--- a/linux/drivers/media/dvb/siano/sms-cards.c Fri Aug 22 10:22:44 2008 -0300
+++ b/linux/drivers/media/dvb/siano/sms-cards.c Fri Aug 22 10:34:29 2008 -0300
@@ -4,7 +4,7 @@
  *  Copyright (c) 2008 Michael Krufky [EMAIL PROTECTED]
  *
  *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License version 3 as
+ *  it under the terms of the GNU General Public License version 2 as
  *  published by the Free Software Foundation;
  *
  *  Software distributed under the License is distributed on an AS IS
diff -r 0b626a7dbc9b -r 379113ef4d27 linux/drivers/media/dvb/siano/sms-cards.h
--- a/linux/drivers/media/dvb/siano/sms-cards.h Fri Aug 22 10:22:44 2008 -0300
+++ b/linux/drivers/media/dvb/siano/sms-cards.h Fri Aug 22 10:34:29 2008 -0300
@@ -4,7 +4,7 @@
  *  Copyright (c) 2008 Michael Krufky [EMAIL PROTECTED]
  *
  *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License version 3 as
+ *  it under the terms of the GNU General Public License version 2 as
  *  published by the Free Software Foundation;
  *
  *  Software distributed under the License is distributed on an AS IS
diff -r 0b626a7dbc9b -r 379113ef4d27 linux/drivers/media/dvb/siano/smscoreapi.c
--- a/linux/drivers/media/dvb/siano/smscoreapi.cFri Aug 22 10:22:44 
2008 -0300
+++ b/linux/drivers/media/dvb/siano/smscoreapi.cFri Aug 22 10:34:29 
2008 -0300
@@ -8,7 +8,7 @@
  *  Copyright (c), 2005-2008 Siano Mobile Silicon, Inc.
  *
  *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License version 3 as
+ *  it under the terms of the GNU General Public License version 2 as
  *  published by the Free Software Foundation;
  *
  *  Software distributed under the License is distributed on an AS IS
diff -r 0b626a7dbc9b -r 379113ef4d27 linux/drivers/media/dvb/siano/smscoreapi.h
--- a/linux/drivers/media/dvb/siano/smscoreapi.hFri Aug 22 10:22:44 
2008 -0300
+++ b/linux/drivers/media/dvb/siano/smscoreapi.hFri Aug 22 10:34:29 
2008 -0300
@@ -6,7 +6,7 @@
  *  Copyright (c), 2005-2008 Siano Mobile Silicon, Inc.
  *
  *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License version 3 as
+ *  it under the terms of the GNU General Public License version 2 as
  *  published by the Free Software Foundation;
  *
  *  Software distributed under the License is distributed on an AS IS
diff -r 0b626a7dbc9b -r 379113ef4d27 linux/drivers/media/dvb/siano/smsdvb.c
--- a/linux/drivers/media/dvb/siano/smsdvb.cFri Aug 22 10:22:44 2008 -0300
+++ b/linux/drivers/media/dvb/siano/smsdvb.cFri Aug 22 10:34:29 2008 -0300
@@ -6,7 +6,7 @@
  *  Copyright (c), 2005-2008 Siano Mobile Silicon, Inc.
  *
  *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License version 3 as
+ *  it under the terms of the GNU General Public License version 2 as
  *  published by the Free Software Foundation;
  *
  *  Software distributed under the License is distributed on an AS IS
diff -r 0b626a7dbc9b -r 379113ef4d27 linux/drivers/media/dvb/siano/smsusb.c
--- a/linux/drivers/media/dvb/siano/smsusb.cFri Aug 22 10:22:44 2008 -0300
+++ b/linux/drivers/media/dvb/siano/smsusb.cFri Aug 22 10:34:29 2008 -0300
@@ -6,7 +6,7 @@
  *  Copyright (c), 2005-2008 Siano Mobile Silicon, Inc.
  *
  *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License version 3 as
+ *  it under the terms of the GNU General Public License version 2 as
  *  published by the Free Software Foundation;
  *
  *  Software distributed under the License is distributed on an AS IS


---

Patch is available at: 

[linuxtv-commits] [hg:v4l-dvb] drx397xD: fix compilation error caused by changeset 71046dfb0853

2008-08-22 Thread Patch from Mauro Carvalho Chehab
The patch number 8730 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
drx397xD: fix compilation error caused by changeset 71046dfb0853


Priority: Normal

Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 linux/drivers/media/dvb/frontends/drx397xD.c |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff -r 8e25a33f8d63 -r ff4248363f57 
linux/drivers/media/dvb/frontends/drx397xD.c
--- a/linux/drivers/media/dvb/frontends/drx397xD.c  Wed Aug 20 16:44:53 
2008 -0700
+++ b/linux/drivers/media/dvb/frontends/drx397xD.c  Fri Aug 22 13:31:59 
2008 -0300
@@ -1577,13 +1577,13 @@ struct dvb_frontend *drx397xD_attach(con
memcpy(state-config, config, sizeof(struct drx397xD_config));
 
/* check if the demod is there */
-   if (RD16(s, 0x2410019)  0)
+   if (RD16(state, 0x2410019)  0)
goto error;
 
/* create dvb_frontend */
memcpy(state-frontend.ops, drx397x_ops,
sizeof(struct dvb_frontend_ops));
-   state-frontend.demodulator_priv = s;
+   state-frontend.demodulator_priv = state;
 
return state-frontend;
 error:


---

Patch is available at: 
http://linuxtv.org/hg/v4l-dvb/rev/ff4248363f57898b04ad2a7c9243d77cb281b2ac

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[linuxtv-commits] [hg:v4l-dvb] Improve script to work with pine/alpine folders

2008-08-24 Thread Patch from Mauro Carvalho Chehab
The patch number 8747 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
Improve script to work with pine/alpine folders


Priority: normal

Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 mailimport |6 ++
 1 file changed, 6 insertions(+)

diff -r 213824ef624c -r 3611380bc74c mailimport
--- a/mailimportFri Aug 22 22:12:08 2008 +0200
+++ b/mailimportSun Aug 24 10:34:01 2008 -0300
@@ -165,6 +165,12 @@ proccess_patch ()
 {
i=$_
 
+   CHECK=`cat $i| perl -ne 'if (m/^Subject:.*FOLDER INTERNAL DATA/) { 
print -1; }'`
+
+   if [ $CHECK !=  ]; then
+   return
+   fi
+
echo $i
if [ `diffstat -p1 -l $i` ==  ]; then
echo *** ERROR nothing to commit


---

Patch is available at: 
http://linuxtv.org/hg/v4l-dvb/rev/3611380bc74c4192a9f0903ff502318ffaf83f3b

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[linuxtv-commits] [hg:v4l-dvb] Fix error code, when camera is not turned on by sonypi

2008-08-24 Thread Patch from Mauro Carvalho Chehab
The patch number 8749 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
Fix error code, when camera is not turned on by sonypi


Priority: normal

Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 linux/drivers/media/video/meye.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff -r 84bf437bf32b -r 15a17b462b1b linux/drivers/media/video/meye.c
--- a/linux/drivers/media/video/meye.c  Fri Aug 22 22:13:05 2008 +0200
+++ b/linux/drivers/media/video/meye.c  Sun Aug 24 10:41:53 2008 -0300
@@ -1816,6 +1816,7 @@ static int __devinit meye_probe(struct p
memcpy(meye.video_dev, meye_template, sizeof(meye_template));
meye.video_dev-parent = meye.mchip_dev-dev;
 
+   ret = -EIO;
if ((ret = sony_pic_camera_command(SONY_PIC_COMMAND_SETCAMERA, 1))) {
printk(KERN_ERR meye: unable to power on the camera\n);
printk(KERN_ERR meye: did you enable the camera in 
@@ -1823,7 +1824,6 @@ static int __devinit meye_probe(struct p
goto outsonypienable;
}
 
-   ret = -EIO;
if ((ret = pci_enable_device(meye.mchip_dev))) {
printk(KERN_ERR meye: pci_enable_device failed\n);
goto outenabledev;


---

Patch is available at: 
http://linuxtv.org/hg/v4l-dvb/rev/15a17b462b1b254aeb03cc62f0e7b73b61462868

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[linuxtv-commits] [hg:v4l-dvb] vivi: Fix some issues at vivi register routine

2008-08-24 Thread Patch from Mauro Carvalho Chehab
The patch number 8751 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
vivi: Fix some issues at vivi register routine


This patch fixes several small issues at vivi register routines:

1) minor and n_devs should be unsigned;
2) n_devs = 0 were not properly handled;
3) if n_devs specify a high number, the driver would just roll back and
won't register any device. The proper behaviour is to keep all succeded
devices registered;
4) both n_devs and minor were using 0 as permissions. Better to have
them with 0444.

With the current patch, if n_devs specify a very large value, it will
register all possible devices. For example, on a machine without any
other V4L drivers loaded, with this patch, we will have something like:

vivi: V4L2 device registered as /dev/video0
vivi: V4L2 device registered as /dev/video1
vivi: V4L2 device registered as /dev/video2
...
vivi: V4L2 device registered as /dev/video31
video_register_device_index: get_index failed
Video Technology Magazine Virtual Video Capture Board ver 0.5.0 successfully 
loaded.

5) The number of allocated devices on success is now kept at n_devs:

$ cat /sys/module/vivi/parameters/n_devs
32

Priority: high

Thanks to Henne [EMAIL PROTECTED] for pointing that there were
some issues at vivi.

CC: Henne [EMAIL PROTECTED]
Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 linux/drivers/media/video/vivi.c |   44 +--
 1 file changed, 36 insertions(+), 8 deletions(-)

diff -r b634ecc09d9c -r a4843e1304e6 linux/drivers/media/video/vivi.c
--- a/linux/drivers/media/video/vivi.c  Fri Aug 22 21:41:03 2008 +0200
+++ b/linux/drivers/media/video/vivi.c  Sun Aug 24 12:28:11 2008 -0300
@@ -1112,18 +1112,28 @@ static struct video_device vivi_template
Initialization and module stuff
--*/
 
+/* This routine allocates from 1 to n_devs virtual drivers.
+
+   The real maximum number of virtual drivers will depend on how many drivers
+   will succeed. This is limited to the maximum number of devices that
+   videodev supports. Since there are 64 minors for video grabbers, this is
+   currently the theoretical maximum limit. However, a further limit does
+   exist at videodev that forbids any driver to register more than 32 video
+   grabbers.
+ */
 static int __init vivi_init(void)
 {
int ret = -ENOMEM, i;
struct vivi_dev *dev;
struct video_device *vfd;
 
+   if (n_devs = 0)
+   n_devs = 1;
+
for (i = 0; i  n_devs; i++) {
dev = kzalloc(sizeof(*dev), GFP_KERNEL);
-   if (NULL == dev)
+   if (!dev)
break;
-
-   list_add_tail(dev-vivi_devlist, vivi_devlist);
 
/* init video dma queues */
INIT_LIST_HEAD(dev-vidq.active);
@@ -1134,14 +1144,27 @@ static int __init vivi_init(void)
mutex_init(dev-mutex);
 
vfd = video_device_alloc();
-   if (NULL == vfd)
+   if (!vfd) {
+   kfree(dev);
break;
+   }
 
*vfd = vivi_template;
 
ret = video_register_device(vfd, VFL_TYPE_GRABBER, video_nr);
-   if (ret  0)
+   if (ret  0) {
+   video_device_release(vfd);
+   kfree(dev);
+
+   /* If some registers succeeded, keep driver */
+   if (i)
+   ret = 0;
+
break;
+   }
+
+   /* Now that everything is fine, let's add it to device list */
+   list_add_tail(dev-vivi_devlist, vivi_devlist);
 
snprintf(vfd-name, sizeof(vfd-name), %s (%i),
 vivi_template.name, vfd-minor);
@@ -1157,11 +1180,16 @@ static int __init vivi_init(void)
if (ret  0) {
vivi_release();
printk(KERN_INFO Error %d while loading vivi driver\n, ret);
-   } else
+   } else {
printk(KERN_INFO Video Technology Magazine Virtual Video 
Capture Board ver %u.%u.%u successfully loaded.\n,
(VIVI_VERSION  16)  0xFF, (VIVI_VERSION  8)  0xFF,
VIVI_VERSION  0xFF);
+
+   /* n_devs will reflect the actual number of allocated devices */
+   n_devs = i;
+   }
+
return ret;
 }
 
@@ -1177,10 +1205,10 @@ MODULE_AUTHOR(Mauro Carvalho Chehab, Te
 

[linuxtv-commits] [hg:v4l-dvb] merge: http://linuxtv.org/hg/~hgoede/v4l-dvb

2008-08-29 Thread Patch from Mauro Carvalho Chehab
The patch number 8768 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
merge: http://linuxtv.org/hg/~hgoede/v4l-dvb




Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 v4l2-apps/lib/libv4l/ChangeLog  |   14 
 v4l2-apps/lib/libv4l/Makefile   |2 
 v4l2-apps/lib/libv4l/include/libv4l1.h  |   22 
 v4l2-apps/lib/libv4l/include/libv4l2.h  |   28 
 v4l2-apps/lib/libv4l/include/libv4lconvert.h|   23 
 v4l2-apps/lib/libv4l/libv4l1/Makefile   |6 
 v4l2-apps/lib/libv4l/libv4l1/libv4l1.c  |3 
 v4l2-apps/lib/libv4l/libv4l1/log.c  |7 
 v4l2-apps/lib/libv4l/libv4l1/v4l1compat.c   |   28 
 v4l2-apps/lib/libv4l/libv4l2/Makefile   |6 
 v4l2-apps/lib/libv4l/libv4l2/libv4l2.c  |  147 ++--
 v4l2-apps/lib/libv4l/libv4l2/log.c  |6 
 v4l2-apps/lib/libv4l/libv4l2/v4l2convert.c  |   27 
 v4l2-apps/lib/libv4l/libv4lconvert/Makefile |8 
 v4l2-apps/lib/libv4l/libv4lconvert/flip.c   |  107 ++
 v4l2-apps/lib/libv4l/libv4lconvert/jidctflt.c   |4 
 v4l2-apps/lib/libv4l/libv4lconvert/libv4lconvert-priv.h |   22 
 v4l2-apps/lib/libv4l/libv4lconvert/libv4lconvert.c  |  150 +++-
 v4l2-apps/lib/libv4l/libv4lconvert/pac207.c |2 
 v4l2-apps/lib/libv4l/libv4lconvert/rgbyuv.c |2 
 v4l2-apps/lib/libv4l/libv4lconvert/sn9c10x.c|2 
 v4l2-apps/lib/libv4l/libv4lconvert/spca561-decompress.c |1 
 v4l2-apps/lib/libv4l/libv4lconvert/tinyjpeg.c   |  360 +-
 v4l2-apps/lib/libv4l/libv4lconvert/tinyjpeg.h   |1 
 24 files changed, 787 insertions(+), 191 deletions(-)

diff discarded since it is too big

---

Patch is available at: 
http://linuxtv.org/hg/v4l-dvb/rev/b3f843ea3306ff45a2357d7f0e2a56f5ba3f4f57

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[linuxtv-commits] [hg:v4l-dvb] merge: http://linuxtv.org/hg/~awalls/v4l-dvb

2008-08-29 Thread Patch from Mauro Carvalho Chehab
The patch number 8775 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
merge: http://linuxtv.org/hg/~awalls/v4l-dvb




Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 linux/drivers/media/video/cx18/cx18-driver.h  |6 
 linux/drivers/media/video/cx18/cx18-fileops.c |   51 +--
 linux/drivers/media/video/cx18/cx18-ioctl.c   |   20 ++
 linux/drivers/media/video/cx18/cx18-mailbox.c |1 
 linux/drivers/media/video/cx18/cx18-queue.c   |  122 +++---
 linux/drivers/media/video/cx18/cx18-streams.c |   21 ++-
 linux/drivers/media/video/cx18/cx23418.h  |2 
 7 files changed, 95 insertions(+), 128 deletions(-)

diff -r b3f843ea3306 -r 308121fcdc32 
linux/drivers/media/video/cx18/cx18-driver.h
--- a/linux/drivers/media/video/cx18/cx18-driver.h  Fri Aug 29 14:46:21 
2008 -0300
+++ b/linux/drivers/media/video/cx18/cx18-driver.h  Fri Aug 29 14:50:35 
2008 -0300
@@ -216,8 +216,7 @@ struct cx18_buffer {
 
 struct cx18_queue {
struct list_head list;
-   u32 buffers;
-   u32 length;
+   atomic_t buffers;
u32 bytesused;
 };
 
@@ -237,6 +236,8 @@ struct cx18; /* forward reference */
 struct cx18;/* forward reference */
 struct cx18_scb; /* forward reference */
 
+#define CX18_INVALID_TASK_HANDLE 0x
+
 struct cx18_stream {
/* These first four fields are always set, even if the stream
   is not actually created. */
@@ -259,7 +260,6 @@ struct cx18_stream {
/* Buffer Stats */
u32 buffers;
u32 buf_size;
-   u32 buffers_stolen;
 
/* Buffer Queues */
struct cx18_queue q_free;   /* free buffers */
diff -r b3f843ea3306 -r 308121fcdc32 
linux/drivers/media/video/cx18/cx18-fileops.c
--- a/linux/drivers/media/video/cx18/cx18-fileops.c Fri Aug 29 14:46:21 
2008 -0300
+++ b/linux/drivers/media/video/cx18/cx18-fileops.c Fri Aug 29 14:50:35 
2008 -0300
@@ -132,6 +132,7 @@ static void cx18_dualwatch(struct cx18 *
u16 new_stereo_mode;
const u16 stereo_mask = 0x0300;
const u16 dual = 0x0200;
+   u32 h;
 
new_stereo_mode = cx-params.audio_properties  stereo_mask;
memset(vt, 0, sizeof(vt));
@@ -143,13 +144,21 @@ static void cx18_dualwatch(struct cx18 *
if (new_stereo_mode == cx-dualwatch_stereo_mode)
return;
 
-   new_bitmap = new_stereo_mode | (cx-params.audio_properties  
~stereo_mask);
-
-   CX18_DEBUG_INFO(dualwatch: change stereo flag from 0x%x to 0x%x. new 
audio_bitmask=0x%ux\n,
-  cx-dualwatch_stereo_mode, new_stereo_mode, 
new_bitmap);
-
-   if (cx18_vapi(cx, CX18_CPU_SET_AUDIO_PARAMETERS, 2,
-   cx18_find_handle(cx), new_bitmap) == 0) {
+   new_bitmap = new_stereo_mode
+   | (cx-params.audio_properties  ~stereo_mask);
+
+   CX18_DEBUG_INFO(dualwatch: change stereo flag from 0x%x to 0x%x. 
+   new audio_bitmask=0x%ux\n,
+   cx-dualwatch_stereo_mode, new_stereo_mode, new_bitmap);
+
+   h = cx18_find_handle(cx);
+   if (h == CX18_INVALID_TASK_HANDLE) {
+   CX18_DEBUG_INFO(dualwatch: can't find valid task handle\n);
+   return;
+   }
+
+   if (cx18_vapi(cx,
+ CX18_CPU_SET_AUDIO_PARAMETERS, 2, h, new_bitmap) == 0) {
cx-dualwatch_stereo_mode = new_stereo_mode;
return;
}
@@ -258,7 +267,7 @@ static struct cx18_buffer *cx18_get_buff
prepare_to_wait(s-waitq, wait, TASK_INTERRUPTIBLE);
/* New buffers might have become available before we were added
   to the waitqueue */
-   if (!s-q_full.buffers)
+   if (!atomic_read(s-q_full.buffers))
schedule();
finish_wait(s-waitq, wait);
if (signal_pending(current)) {
@@ -544,7 +553,7 @@ unsigned int cx18_v4l2_enc_poll(struct f
CX18_DEBUG_HI_FILE(Encoder poll\n);
poll_wait(filp, s-waitq, wait);
 
-   if (s-q_full.length || s-q_io.length)
+   if (atomic_read(s-q_full.buffers) || atomic_read(s-q_io.buffers))
return POLLIN | POLLRDNORM;
if (eof)
return POLLHUP;
@@ -730,20 +739,28 @@ int cx18_v4l2_open(struct inode *inode, 
 
 void cx18_mute(struct cx18 *cx)
 {
-   if (atomic_read(cx-ana_capturing))
-   cx18_vapi(cx, CX18_CPU_SET_AUDIO_MUTE, 2,
-   cx18_find_handle(cx), 1);
+   u32 h;
+   if 

[linuxtv-commits] [hg:v4l-dvb] merge: http://www.linuxtv.org/hg/~hverkuil/v4l-dvb-dev

2008-08-29 Thread Patch from Mauro Carvalho Chehab
The patch number 8793 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
merge: http://www.linuxtv.org/hg/~hverkuil/v4l-dvb-dev


Priority: normal

Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 linux/drivers/media/common/saa7146_fops.c |2 
 linux/drivers/media/radio/dsbr100.c   |   16 -
 linux/drivers/media/radio/radio-aimslab.c |   39 +--
 linux/drivers/media/radio/radio-aztech.c  |   45 ++-
 linux/drivers/media/radio/radio-cadet.c   |3 
 linux/drivers/media/radio/radio-gemtek-pci.c  |   44 ++-
 linux/drivers/media/radio/radio-gemtek.c  |   42 ++-
 linux/drivers/media/radio/radio-maestro.c |   37 +--
 linux/drivers/media/radio/radio-maxiradio.c   |   44 ++-
 linux/drivers/media/radio/radio-rtrack2.c |   37 +--
 linux/drivers/media/radio/radio-sf16fmi.c |   36 +-
 linux/drivers/media/radio/radio-sf16fmr2.c|   34 +-
 linux/drivers/media/radio/radio-si470x.c  |   26 +-
 linux/drivers/media/radio/radio-terratec.c|   37 +--
 linux/drivers/media/radio/radio-trust.c   |   20 +
 linux/drivers/media/radio/radio-typhoon.c |   35 +-
 linux/drivers/media/radio/radio-zoltrix.c |   37 +--
 linux/drivers/media/video/arv.c   |   29 +-
 linux/drivers/media/video/bw-qcam.c   |   25 +-
 linux/drivers/media/video/bw-qcam.h   |1 
 linux/drivers/media/video/c-qcam.c|   26 +-
 linux/drivers/media/video/cpia.c  |   15 -
 linux/drivers/media/video/cpia2/cpia2_v4l.c   |   19 -
 linux/drivers/media/video/et61x251/et61x251_core.c|   14 -
 linux/drivers/media/video/meye.c  |   18 -
 linux/drivers/media/video/meye.h  |1 
 linux/drivers/media/video/pms.c   |   23 +
 linux/drivers/media/video/pwc/pwc-if.c|   12 
 linux/drivers/media/video/pwc/pwc-v4l.c   |2 
 linux/drivers/media/video/s2255drv.c  |2 
 linux/drivers/media/video/saa5246a.c  |   56 +---
 linux/drivers/media/video/saa5249.c   |   70 ++---
 linux/drivers/media/video/saa7115.c   |5 
 linux/drivers/media/video/se401.c |3 
 linux/drivers/media/video/sn9c102/sn9c102_core.c  |   14 -
 linux/drivers/media/video/stk-webcam.c|4 
 linux/drivers/media/video/stradis.c   |1 
 linux/drivers/media/video/stv680.c|2 
 linux/drivers/media/video/usbvideo/usbvideo.c |6 
 linux/drivers/media/video/usbvideo/vicam.c|   13 -
 linux/drivers/media/video/usbvision/usbvision-video.c |  122 ++
 linux/drivers/media/video/uvc/uvc_v4l2.c  |   13 -
 linux/drivers/media/video/v4l2-dev.c  |   77 +-
 linux/drivers/media/video/vino.c  |   18 -
 linux/drivers/media/video/w9966.c |   33 +-
 linux/drivers/media/video/wm8739.c|4 
 linux/drivers/media/video/zc0301/zc0301_core.c|   14 -
 linux/include/media/v4l2-dev.h|   70 +++--
 linux/include/sound/tea575x-tuner.h   |1 
 linux/sound/i2c/other/tea575x-tuner.c |   37 ++-
 50 files changed, 676 insertions(+), 608 deletions(-)

diff discarded since it is too big

---

Patch is available at: 
http://linuxtv.org/hg/v4l-dvb/rev/3cca4cda1e3fd08386ba5a0064ea781467adc102

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[linuxtv-commits] [hg:v4l-dvb] merge? http://www.linuxtv.org/hg/~hverkuil/v4l-dvb-empress

2008-08-29 Thread Patch from Mauro Carvalho Chehab
The patch number 8798 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
merge? http://www.linuxtv.org/hg/~hverkuil/v4l-dvb-empress


Priority: normal

Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 linux/drivers/media/video/saa7134/saa6752hs.c   |   17 ++-
 linux/drivers/media/video/saa7134/saa7134-core.c|4 
 linux/drivers/media/video/saa7134/saa7134-empress.c |   15 ++-
 linux/drivers/media/video/saa7134/saa7134-ts.c  |   58 +---
 linux/drivers/media/video/saa7134/saa7134.h |8 +
 5 files changed, 77 insertions(+), 25 deletions(-)

diff -r 002496a68970 -r 86f8ab9468e6 
linux/drivers/media/video/saa7134/saa6752hs.c
--- a/linux/drivers/media/video/saa7134/saa6752hs.c Mon Aug 25 15:45:09 
2008 -0600
+++ b/linux/drivers/media/video/saa7134/saa6752hs.c Fri Aug 29 18:35:43 
2008 -0300
@@ -654,7 +654,7 @@ static int saa6752hs_qmenu(struct saa675
return v4l2_ctrl_query_menu(qmenu, qctrl, NULL);
 }
 
-static int saa6752hs_init(struct i2c_client* client)
+static int saa6752hs_init(struct i2c_client *client, u32 leading_null_bytes)
 {
unsigned char buf[9], buf2[4];
struct saa6752hs_state *h;
@@ -705,6 +705,12 @@ static int saa6752hs_init(struct i2c_cli
buf[0] = 0xB0;
buf[1] = 0x05;
i2c_master_send(client,buf,2);
+
+   /* Set leading null byte for TS */
+   buf[0] = 0xF6;
+   buf[1] = (leading_null_bytes  8)  0xff;
+   buf[2] = leading_null_bytes  0xff;
+   i2c_master_send(client, buf, 3);
 
/* compute PAT */
memcpy(localPAT, PAT, sizeof(PAT));
@@ -813,14 +819,13 @@ saa6752hs_command(struct i2c_client *cli
int i;
 
switch (cmd) {
+   case VIDIOC_INT_INIT:
+   /* apply settings and start encoder */
+   saa6752hs_init(client, *(u32 *)arg);
+   break;
case VIDIOC_S_EXT_CTRLS:
if (ctrls-ctrl_class != V4L2_CTRL_CLASS_MPEG)
return -EINVAL;
-   if (ctrls-count == 0) {
-   /* apply settings and start encoder */
-   saa6752hs_init(client);
-   break;
-   }
/* fall through */
case VIDIOC_TRY_EXT_CTRLS:
case VIDIOC_G_EXT_CTRLS:
diff -r 002496a68970 -r 86f8ab9468e6 
linux/drivers/media/video/saa7134/saa7134-core.c
--- a/linux/drivers/media/video/saa7134/saa7134-core.c  Mon Aug 25 15:45:09 
2008 -0600
+++ b/linux/drivers/media/video/saa7134/saa7134-core.c  Fri Aug 29 18:35:43 
2008 -0300
@@ -465,9 +465,7 @@ int saa7134_set_dmabits(struct saa7134_d
/* TS capture -- dma 5 */
if (dev-ts_q.curr) {
ctrl |= SAA7134_MAIN_CTRL_TE5;
-   irq  |= SAA7134_IRQ1_INTE_RA2_3 |
-   SAA7134_IRQ1_INTE_RA2_2 |
-   SAA7134_IRQ1_INTE_RA2_1 |
+   irq  |= SAA7134_IRQ1_INTE_RA2_1 |
SAA7134_IRQ1_INTE_RA2_0;
}
 
diff -r 002496a68970 -r 86f8ab9468e6 
linux/drivers/media/video/saa7134/saa7134-empress.c
--- a/linux/drivers/media/video/saa7134/saa7134-empress.c   Mon Aug 25 
15:45:09 2008 -0600
+++ b/linux/drivers/media/video/saa7134/saa7134-empress.c   Fri Aug 29 
18:35:43 2008 -0300
@@ -64,10 +64,19 @@ static void ts_reset_encoder(struct saa7
 
 static int ts_init_encoder(struct saa7134_dev* dev)
 {
-   struct v4l2_ext_controls ctrls = { V4L2_CTRL_CLASS_MPEG, 0 };
-
+   u32 leading_null_bytes = 0;
+
+   /* If more cards start to need this, then this
+  should probably be added to the card definitions. */
+   switch (dev-board) {
+   case SAA7134_BOARD_BEHOLD_M6:
+   case SAA7134_BOARD_BEHOLD_M63:
+   case SAA7134_BOARD_BEHOLD_M6_EXTRA:
+   leading_null_bytes = 1;
+   break;
+   }
ts_reset_encoder(dev);
-   saa7134_i2c_call_clients(dev, VIDIOC_S_EXT_CTRLS, ctrls);
+   saa7134_i2c_call_clients(dev, VIDIOC_INT_INIT, leading_null_bytes);
dev-empress_started = 1;
return 0;
 }
diff -r 002496a68970 -r 86f8ab9468e6 
linux/drivers/media/video/saa7134/saa7134-ts.c
--- a/linux/drivers/media/video/saa7134/saa7134-ts.cMon Aug 25 15:45:09 
2008 -0600
+++ b/linux/drivers/media/video/saa7134/saa7134-ts.cFri Aug 29 18:35:43 
2008 -0300
@@ -66,11 +66,29 @@ static int buffer_activate(struct saa713
saa7134_set_dmabits(dev);
 
mod_timer(dev-ts_q.timeout, jiffies+BUFFER_TIMEOUT);
+
+   if (dev-ts_state == SAA7134_TS_BUFF_DONE) {
+   /* Clear TS cache */

  1   2   3   4   5   6   7   8   9   10   >