[linuxtv-commits] [hg:v4l-dvb] Fix header export of videodev2.h, ivtv.h, ivtvfb.h

2008-08-22 Thread Patch from David Woodhouse
The patch number 8679 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: David Woodhouse  [EMAIL PROTECTED]
Fix header export of videodev2.h, ivtv.h, ivtvfb.h


The exported copy of videodev2.h contains this line:

#define #include sys/time.h

This is because for some reason it defines __user for itself -- despite
the fact that we remove all instances of __user when exporting headers.
_All_ pointers in userspace are user pointers. Fix it by removing the
unnecessary '#define __user' from the file.

The new headers ivtv.h and ivtvfb.h would have the same problem... if
whoever put them there had actually remembered to add them to the Kbuild
file while he was at it. Fix those too, and export them as was
presumably intended.

Note that includes of linux/compiler.h are also stripped by the header
export process, so those don't need to be conditional.

kernel-sync:

[mchehab.infradead.org: This is the backported version without the changes at 
include/linux/Kbuild, to be applied only at -hg]

Signed-off-by: David Woodhouse [EMAIL PROTECTED]
Signed-off-by: Hans Verkuil [EMAIL PROTECTED]
Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 linux/include/linux/ivtv.h  |6 +-
 linux/include/linux/ivtvfb.h|6 +-
 linux/include/linux/videodev2.h |4 ++--
 3 files changed, 4 insertions(+), 12 deletions(-)

diff -r cc624bf7489c -r 34c4828595af linux/include/linux/ivtv.h
--- a/linux/include/linux/ivtv.hTue Aug 05 21:00:11 2008 +0300
+++ b/linux/include/linux/ivtv.hSat Aug 16 11:55:04 2008 +0100
@@ -21,11 +21,7 @@
 #ifndef __LINUX_IVTV_H__
 #define __LINUX_IVTV_H__
 
-#ifdef __KERNEL__
-#include linux/compiler.h /* need __user */
-#else
-#define __user
-#endif
+#include linux/compiler.h
 #include linux/types.h
 
 /* ivtv knows several distinct output modes: MPEG streaming,
diff -r cc624bf7489c -r 34c4828595af linux/include/linux/ivtvfb.h
--- a/linux/include/linux/ivtvfb.h  Tue Aug 05 21:00:11 2008 +0300
+++ b/linux/include/linux/ivtvfb.h  Sat Aug 16 11:55:04 2008 +0100
@@ -21,11 +21,7 @@
 #ifndef __LINUX_IVTVFB_H__
 #define __LINUX_IVTVFB_H__
 
-#ifdef __KERNEL__
-#include linux/compiler.h /* need __user */
-#else
-#define __user
-#endif
+#include linux/compiler.h
 #include linux/types.h
 
 /* Framebuffer external API */
diff -r cc624bf7489c -r 34c4828595af linux/include/linux/videodev2.h
--- a/linux/include/linux/videodev2.h   Tue Aug 05 21:00:11 2008 +0300
+++ b/linux/include/linux/videodev2.h   Sat Aug 16 11:55:04 2008 +0100
@@ -55,13 +55,13 @@
  */
 #ifndef __LINUX_VIDEODEV2_H
 #define __LINUX_VIDEODEV2_H
+
 #ifdef __KERNEL__
 #include linux/time.h /* need struct timeval */
-#include linux/compiler.h /* need __user */
 #else
-#define __user
 #include sys/time.h
 #endif
+#include linux/compiler.h
 #include linux/ioctl.h
 #include linux/types.h
 


---

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

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


[linuxtv-commits] [hg:v4l-dvb] saa7134-core.c: fix warning

2008-08-22 Thread Patch from Alexander Beregalov
The patch number 8680 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: Alexander Beregalov  [EMAIL PROTECTED]
saa7134-core.c: fix warning


drivers/media/video/saa7134/saa7134-core.c:366: warning:
'saa7134_buffer_requeue' defined but not used

Signed-off-by: Alexander Beregalov [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 linux/drivers/media/video/saa7134/saa7134-core.c |   52 +++
 1 file changed, 26 insertions(+), 26 deletions(-)

diff -r 34c4828595af -r 532502a293eb 
linux/drivers/media/video/saa7134/saa7134-core.c
--- a/linux/drivers/media/video/saa7134/saa7134-core.c  Sat Aug 16 11:55:04 
2008 +0100
+++ b/linux/drivers/media/video/saa7134/saa7134-core.c  Wed Aug 20 16:44:54 
2008 -0700
@@ -406,32 +406,6 @@ void saa7134_buffer_timeout(unsigned lon
}
saa7134_buffer_next(dev,q);
spin_unlock_irqrestore(dev-slock,flags);
-}
-
-/* resends a current buffer in queue after resume */
-
-static int saa7134_buffer_requeue(struct saa7134_dev *dev,
- struct saa7134_dmaqueue *q)
-{
-   struct saa7134_buf *buf, *next;
-
-   assert_spin_locked(dev-slock);
-
-   buf  = q-curr;
-   next = buf;
-   dprintk(buffer_requeue\n);
-
-   if (!buf)
-   return 0;
-
-   dprintk(buffer_requeue : resending active buffers \n);
-
-   if (!list_empty(q-queue))
-   next = list_entry(q-queue.next, struct saa7134_buf,
- vb.queue);
-   buf-activate(dev, buf, next);
-
-   return 0;
 }
 
 /* -- */
@@ -1203,6 +1177,32 @@ static void __devexit saa7134_finidev(st
 }
 
 #ifdef CONFIG_PM
+
+/* resends a current buffer in queue after resume */
+static int saa7134_buffer_requeue(struct saa7134_dev *dev,
+ struct saa7134_dmaqueue *q)
+{
+   struct saa7134_buf *buf, *next;
+
+   assert_spin_locked(dev-slock);
+
+   buf  = q-curr;
+   next = buf;
+   dprintk(buffer_requeue\n);
+
+   if (!buf)
+   return 0;
+
+   dprintk(buffer_requeue : resending active buffers \n);
+
+   if (!list_empty(q-queue))
+   next = list_entry(q-queue.next, struct saa7134_buf,
+ vb.queue);
+   buf-activate(dev, buf, next);
+
+   return 0;
+}
+
 static int saa7134_suspend(struct pci_dev *pci_dev , pm_message_t state)
 {
 


---

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

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


[linuxtv-commits] [hg:v4l-dvb] v4l2-ioctl.c: fix warning

2008-08-22 Thread Patch from Alexander Beregalov
The patch number 8681 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: Alexander Beregalov  [EMAIL PROTECTED]
v4l2-ioctl.c: fix warning


drivers/media/video/v4l2-ioctl.c:496: warning: format '%08ld' expects
type 'long int', but argument 5 has type 'suseconds_t'

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


---

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

diff -r 532502a293eb -r ff2baf516e1c linux/drivers/media/video/v4l2-ioctl.c
--- a/linux/drivers/media/video/v4l2-ioctl.cWed Aug 20 16:44:54 2008 -0700
+++ b/linux/drivers/media/video/v4l2-ioctl.cThu Aug 21 19:09:42 2008 -0300
@@ -500,7 +500,7 @@ static void dbgbuf(unsigned int cmd, str
p-timestamp.tv_sec / 3600,
(int)(p-timestamp.tv_sec / 60) % 60,
(int)(p-timestamp.tv_sec % 60),
-   p-timestamp.tv_usec,
+   (long)p-timestamp.tv_usec,
p-index,
prt_names(p-type, v4l2_type_names),
p-bytesused, p-flags,


---

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

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


[linuxtv-commits] [hg:v4l-dvb] Add Micron mt9m111 chip ID in V4L2 identifiers

2008-08-22 Thread Patch added by Robert Jarzmik
The patch number 8683 was added via Robert Jarzmik [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]

--

Add Micron mt9m111 chip ID in V4L2 identifiers
Signed-off-by: Robert Jarzmik [EMAIL PROTECTED]
Signed-off-by: Guennadi Liakhovetski [EMAIL PROTECTED]
---
 include/media/v4l2-chip-ident.h |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)


---

 linux/include/media/v4l2-chip-ident.h |1 +
 1 file changed, 1 insertion(+)

diff -r 9085febc91ab -r a8322d9a88fd linux/include/media/v4l2-chip-ident.h
--- a/linux/include/media/v4l2-chip-ident.h Thu Aug 14 08:13:50 2008 -0300
+++ b/linux/include/media/v4l2-chip-ident.h Thu Aug 14 16:36:37 2008 +0200
@@ -165,6 +165,7 @@ enum {
/* Micron CMOS sensor chips: 45000-45099 */
V4L2_IDENT_MT9M001C12ST = 45000,
V4L2_IDENT_MT9M001C12STM= 45005,
+   V4L2_IDENT_MT9M111  = 45007,
V4L2_IDENT_MT9V022IX7ATC= 45010, /* No way to detect normal 
I77ATx */
V4L2_IDENT_MT9V022IX7ATM= 45015, /* and lead free IA7ATx 
chips */
 };


---

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

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


[linuxtv-commits] [hg:v4l-dvb] mt9m001, mt9v022: Simplify return code checking

2008-08-22 Thread Patch added by Guennadi Liakhovetski
The patch number 8685 was added via Guennadi Liakhovetski [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]

--

mt9m001, mt9v022: Simplify return code checking
i2c_smbus_write_word_data() returns 0 or a negative error, hence no need to
check for  0.

Signed-off-by: Guennadi Liakhovetski [EMAIL PROTECTED]
---
 drivers/media/video/mt9m001.c |   24 
 drivers/media/video/mt9v022.c |   28 ++--
 2 files changed, 26 insertions(+), 26 deletions(-)


---

 linux/drivers/media/video/mt9m001.c |   30 ++--
 linux/drivers/media/video/mt9v022.c |   28 +-
 2 files changed, 29 insertions(+), 29 deletions(-)

diff -r 6e80ab7d4104 -r 5ce9b5ee0f4e linux/drivers/media/video/mt9m001.c
--- a/linux/drivers/media/video/mt9m001.c   Thu Aug 14 17:02:51 2008 +0200
+++ b/linux/drivers/media/video/mt9m001.c   Thu Aug 14 17:03:18 2008 +0200
@@ -119,16 +119,16 @@ static int mt9m001_init(struct soc_camer
 {
int ret;
 
+   dev_dbg(icd-vdev-parent, %s\n, __func__);
+
+   ret = reg_write(icd, MT9M001_RESET, 1);
+   if (!ret)
+   ret = reg_write(icd, MT9M001_RESET, 0);
/* Disable chip, synchronous option update */
-   dev_dbg(icd-vdev-parent, %s\n, __func__);
-
-   ret = reg_write(icd, MT9M001_RESET, 1);
-   if (ret = 0)
-   ret = reg_write(icd, MT9M001_RESET, 0);
-   if (ret = 0)
+   if (!ret)
ret = reg_write(icd, MT9M001_OUTPUT_CONTROL, 0);
 
-   return ret = 0 ? 0 : -EIO;
+   return ret;
 }
 
 static int mt9m001_release(struct soc_camera_device *icd)
@@ -267,24 +267,24 @@ static int mt9m001_set_fmt_cap(struct so
 
/* Blanking and start values - default... */
ret = reg_write(icd, MT9M001_HORIZONTAL_BLANKING, hblank);
-   if (ret = 0)
+   if (!ret)
ret = reg_write(icd, MT9M001_VERTICAL_BLANKING, vblank);
 
/* The caller provides a supported format, as verified per
 * call to icd-try_fmt_cap() */
-   if (ret = 0)
+   if (!ret)
ret = reg_write(icd, MT9M001_COLUMN_START, rect-left);
-   if (ret = 0)
+   if (!ret)
ret = reg_write(icd, MT9M001_ROW_START, rect-top);
-   if (ret = 0)
+   if (!ret)
ret = reg_write(icd, MT9M001_WINDOW_WIDTH, rect-width - 1);
-   if (ret = 0)
+   if (!ret)
ret = reg_write(icd, MT9M001_WINDOW_HEIGHT,
rect-height + icd-y_skip_top - 1);
-   if (ret = 0  mt9m001-autoexposure) {
+   if (!ret  mt9m001-autoexposure) {
ret = reg_write(icd, MT9M001_SHUTTER_WIDTH,
rect-height + icd-y_skip_top + vblank);
-   if (ret = 0) {
+   if (!ret) {
const struct v4l2_queryctrl *qctrl =
soc_camera_find_qctrl(icd-ops,
  V4L2_CID_EXPOSURE);
@@ -295,7 +295,7 @@ static int mt9m001_set_fmt_cap(struct so
}
}
 
-   return ret  0 ? ret : 0;
+   return ret;
 }
 
 static int mt9m001_try_fmt_cap(struct soc_camera_device *icd,
diff -r 6e80ab7d4104 -r 5ce9b5ee0f4e linux/drivers/media/video/mt9v022.c
--- a/linux/drivers/media/video/mt9v022.c   Thu Aug 14 17:02:51 2008 +0200
+++ b/linux/drivers/media/video/mt9v022.c   Thu Aug 14 17:03:18 2008 +0200
@@ -141,22 +141,22 @@ static int mt9v022_init(struct soc_camer
 * plus snapshot mode to disable scan for now */
mt9v022-chip_control |= 0x10;
ret = reg_write(icd, MT9V022_CHIP_CONTROL, mt9v022-chip_control);
-   if (ret = 0)
-   reg_write(icd, MT9V022_READ_MODE, 0x300);
+   if (!ret)
+   ret = reg_write(icd, MT9V022_READ_MODE, 0x300);
 
/* All defaults */
-   if (ret = 0)
+   if (!ret)
/* AEC, AGC on */
ret = reg_set(icd, MT9V022_AEC_AGC_ENABLE, 0x3);
-   if (ret = 0)
+   if (!ret)
ret = reg_write(icd, MT9V022_MAX_TOTAL_SHUTTER_WIDTH, 480);
-   if (ret = 0)
+   if (!ret)
/* default - auto */
ret = reg_clear(icd, MT9V022_BLACK_LEVEL_CALIB_CTRL, 1);
-   if (ret = 0)
+   if (!ret)
ret = reg_write(icd, MT9V022_DIGITAL_TEST_PATTERN, 0);
 
-   return ret = 0 ? 0 : -EIO;
+   return ret;
 }
 
 static int mt9v022_release(struct soc_camera_device *icd)
@@ -352,21 +352,21 @@ static int mt9v022_set_fmt_cap(struct so
rect-height + icd-y_skip_top + 43);
}

[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] i2c-id: remove obsolete SAB3036 driver ID

2008-08-22 Thread Patch from Hans Verkuil
The patch number 8691 was added via Hans Verkuil [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: Hans Verkuil  [EMAIL PROTECTED]
i2c-id: remove obsolete SAB3036 driver ID


Priority: normal

Signed-off-by: Hans Verkuil [EMAIL PROTECTED]


---

 linux/include/linux/i2c-id.h |1 -
 1 file changed, 1 deletion(-)

diff -r 145b308376bf -r 66b6541983e4 linux/include/linux/i2c-id.h
--- a/linux/include/linux/i2c-id.h  Sat Aug 16 12:56:12 2008 +0200
+++ b/linux/include/linux/i2c-id.h  Sat Aug 16 13:33:14 2008 +0200
@@ -42,7 +42,6 @@
 #define I2C_DRIVERID_MGATVO23  /* Matrox TVOut */
 #define I2C_DRIVERID_SAA5249   24  /* SAA5249 and compatibles  */
 #define I2C_DRIVERID_PCF8583   25  /* real time clock  */
-#define I2C_DRIVERID_SAB3036   26  /* SAB3036 tuner*/
 #define I2C_DRIVERID_TDA7432   27  /* Stereo sound processor   */
 #define I2C_DRIVERID_TVMIXER28  /* Mixer driver for tv cards*/
 #define I2C_DRIVERID_TVAUDIO29  /* Generic TV sound driver  */


---

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

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


[linuxtv-commits] [hg:v4l-dvb] dpc7146: remove dpc7146 demonstration board driver

2008-08-22 Thread Patch from Hans Verkuil
The patch number 8689 was added via Hans Verkuil [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: Hans Verkuil  [EMAIL PROTECTED]
dpc7146: remove dpc7146 demonstration board driver


Old driver for the dpc7146 demonstration board that is no longer
relevant. The last time this was tested on actual hardware was
probably around 2002. Since this is a driver for a demonstration
board the decision was made (after discussing this with the original
author, Michael Hunold) to remove it rather than spending a
lot of effort continually updating this driver to stay in sync
with the latest internal V4L2 or I2C API.

Priority: normal

Signed-off-by: Hans Verkuil [EMAIL PROTECTED]
Signed-off-by: Michael Hunold [EMAIL PROTECTED]


---

 linux/drivers/media/video/Kconfig   |   15 -
 linux/drivers/media/video/Makefile  |1 
 linux/drivers/media/video/dpc7146.c |  409 
 3 files changed, 425 deletions(-)

diff -r 9085febc91ab -r 4fb38b441560 linux/drivers/media/video/Kconfig
--- a/linux/drivers/media/video/Kconfig Thu Aug 14 08:13:50 2008 -0300
+++ b/linux/drivers/media/video/Kconfig Sat Aug 16 12:50:23 2008 +0200
@@ -709,21 +709,6 @@ config VIDEO_MXB
  To compile this driver as a module, choose M here: the
  module will be called mxb.
 
-config VIDEO_DPC
-   tristate Philips-Semiconductors 'dpc7146 demonstration board'
-   depends on PCI  VIDEO_V4L1  I2C
-   select VIDEO_SAA7146_VV
-   select VIDEO_SAA7111 if VIDEO_HELPER_CHIPS_AUTO
-   ---help---
- This is a video4linux driver for the 'dpc7146 demonstration
- board' by Philips-Semiconductors. It's the reference design
- for SAA7146 bases boards, so if you have some unsupported
- saa7146 based, analog video card, chances are good that it
- will work with this skeleton driver.
-
- To compile this driver as a module, choose M here: the
- module will be called dpc7146.
-
 config VIDEO_HEXIUM_ORION
tristate Hexium HV-PCI6 and Orion frame grabber
depends on PCI  VIDEO_V4L2  I2C
diff -r 9085febc91ab -r 4fb38b441560 linux/drivers/media/video/Makefile
--- a/linux/drivers/media/video/MakefileThu Aug 14 08:13:50 2008 -0300
+++ b/linux/drivers/media/video/MakefileSat Aug 16 12:50:23 2008 +0200
@@ -83,7 +83,6 @@ obj-$(CONFIG_VIDEO_MXB) += mxb.o
 obj-$(CONFIG_VIDEO_MXB) += mxb.o
 obj-$(CONFIG_VIDEO_HEXIUM_ORION) += hexium_orion.o
 obj-$(CONFIG_VIDEO_HEXIUM_GEMINI) += hexium_gemini.o
-obj-$(CONFIG_VIDEO_DPC) += dpc7146.o
 obj-$(CONFIG_TUNER_3036) += tuner-3036.o
 
 obj-$(CONFIG_VIDEO_TUNER) += tuner.o
diff -r 9085febc91ab -r 4fb38b441560 linux/drivers/media/video/dpc7146.c
--- a/linux/drivers/media/video/dpc7146.c   Thu Aug 14 08:13:50 2008 -0300
+++ /dev/null   Thu Jan 01 00:00:00 1970 +
@@ -1,409 +0,0 @@
-/*
-dpc7146.c - v4l2 driver for the dpc7146 demonstration board
-
-Copyright (C) 2000-2003 Michael Hunold [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.
-*/
-
-#define DEBUG_VARIABLE debug
-
-#include media/saa7146_vv.h
-#include linux/video_decoder.h   /* for saa7111a */
-#include compat.h
-
-#define I2C_SAA7111A0x24
-
-/* All unused bytes are reserverd. */
-#define SAA711X_CHIP_VERSION0x00
-#define SAA711X_ANALOG_INPUT_CONTROL_1  0x02
-#define SAA711X_ANALOG_INPUT_CONTROL_2  0x03
-#define SAA711X_ANALOG_INPUT_CONTROL_3  0x04
-#define SAA711X_ANALOG_INPUT_CONTROL_4  0x05
-#define SAA711X_HORIZONTAL_SYNC_START   0x06
-#define SAA711X_HORIZONTAL_SYNC_STOP0x07
-#define SAA711X_SYNC_CONTROL0x08
-#define SAA711X_LUMINANCE_CONTROL   0x09
-#define SAA711X_LUMINANCE_BRIGHTNESS0x0A
-#define SAA711X_LUMINANCE_CONTRAST  0x0B
-#define SAA711X_CHROMA_SATURATION   0x0C
-#define SAA711X_CHROMA_HUE_CONTROL  0x0D
-#define SAA711X_CHROMA_CONTROL  0x0E
-#define SAA711X_FORMAT_DELAY_CONTROL0x10
-#define SAA711X_OUTPUT_CONTROL_10x11
-#define 

[linuxtv-commits] [hg:v4l-dvb] capture_example: Don't change the format by default

2008-08-22 Thread Patch from Jean Delvare
The patch number 8698 was added via Hans Verkuil [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: Jean Delvare  [EMAIL PROTECTED]
capture_example: Don't change the format by default


Don't change the capture format by default. This lets the user select
the capture pixel format and resolution using v4l2-ctl. The old
behavior (forcing the format to 640x480 YUYV) can still be obtained by
passing -f.

Priority: normal

Signed-off-by: Jean Delvare [EMAIL PROTECTED]
Signed-off-by: Hans Verkuil [EMAIL PROTECTED]


---

 v4l2-apps/test/capture_example.c |   35 +--
 1 file changed, 24 insertions(+), 11 deletions(-)

diff -r f4b89c281096 -r 11e9bbf1d6c2 v4l2-apps/test/capture_example.c
--- a/v4l2-apps/test/capture_example.c  Tue Aug 19 11:58:32 2008 +0200
+++ b/v4l2-apps/test/capture_example.c  Wed Aug 20 09:07:22 2008 +0200
@@ -46,6 +46,7 @@ struct buffer * buffers 
 struct buffer * buffers = NULL;
 static unsigned int n_buffers   = 0;
 static int out_buf = 0;
+static int  force_format;
 
 static void errno_exit(const char *s)
 {
@@ -500,16 +501,22 @@ static void init_device(void)
 
CLEAR(fmt);
 
-   fmt.type= V4L2_BUF_TYPE_VIDEO_CAPTURE;
-   fmt.fmt.pix.width   = 640;
-   fmt.fmt.pix.height  = 480;
-   fmt.fmt.pix.pixelformat = V4L2_PIX_FMT_YUYV;
-   fmt.fmt.pix.field   = V4L2_FIELD_INTERLACED;
-
-   if (-1 == xioctl(fd, VIDIOC_S_FMT, fmt))
-   errno_exit(VIDIOC_S_FMT);
-
-   /* Note VIDIOC_S_FMT may change width and height. */
+   fmt.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
+   if (force_format) {
+   fmt.fmt.pix.width   = 640;
+   fmt.fmt.pix.height  = 480;
+   fmt.fmt.pix.pixelformat = V4L2_PIX_FMT_YUYV;
+   fmt.fmt.pix.field   = V4L2_FIELD_INTERLACED;
+
+   if (-1 == xioctl(fd, VIDIOC_S_FMT, fmt))
+   errno_exit(VIDIOC_S_FMT);
+
+   /* Note VIDIOC_S_FMT may change width and height. */
+   } else {
+   /* Preserve original settings as set by v4l2-ctl for example */
+   if (-1 == xioctl(fd, VIDIOC_G_FMT, fmt))
+   errno_exit(VIDIOC_G_FMT);
+   }
 
/* Buggy driver paranoia. */
min = fmt.fmt.pix.width * 2;
@@ -577,11 +584,12 @@ static void usage(FILE *fp, int argc, ch
 -r | --read  Use read() calls\n
 -u | --userp Use application allocated buffers\n
 -o | --outputOutputs stream to stdout\n
+-f | --formatForce format to 640x480 YUYV\n
 ,
 argv[0]);
 }
 
-static const char short_options [] = d:hmruo;
+static const char short_options[] = d:hmruof;
 
 static const struct option
 long_options [] = {
@@ -591,6 +599,7 @@ long_options [] = {
{ read,   no_argument,NULL,   'r' },
{ userp,  no_argument,NULL,   'u' },
{ output, no_argument,NULL,   'o' },
+   { format, no_argument,NULL,   'f' },
{ 0, 0, 0, 0 }
 };
 
@@ -635,6 +644,10 @@ int main(int argc, char **argv)
 
case 'o':
out_buf++;
+   break;
+
+   case 'f':
+   force_format++;
break;
 
default:


---

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

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


[linuxtv-commits] [hg:v4l-dvb] usbvideo: add proper error check and add release function

2008-08-22 Thread Patch from Hans Verkuil
The patch number 8695 was added via Hans Verkuil [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: Hans Verkuil  [EMAIL PROTECTED]
usbvideo: add proper error check and add release function


Priority: normal

Signed-off-by: Hans Verkuil [EMAIL PROTECTED]


---

 linux/drivers/media/video/usbvideo/usbvideo.c |7 ++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff -r a6dd11e159f4 -r c6f0865bb076 
linux/drivers/media/video/usbvideo/usbvideo.c
--- a/linux/drivers/media/video/usbvideo/usbvideo.c Mon Aug 18 09:46:12 
2008 +0200
+++ b/linux/drivers/media/video/usbvideo/usbvideo.c Mon Aug 18 09:48:42 
2008 +0200
@@ -1006,6 +1006,10 @@ allocate_done:
 
 EXPORT_SYMBOL(usbvideo_AllocateDevice);
 
+static void usbvideo_dummy_release(struct video_device *vfd)
+{
+}
+
 int usbvideo_RegisterVideoDevice(struct uvd *uvd)
 {
char tmp1[20], tmp2[20];/* Buffers for printing */
@@ -1039,7 +1043,8 @@ int usbvideo_RegisterVideoDevice(struct 
return -EINVAL;
}
uvd-vdev.parent = uvd-dev-dev;
-   if (video_register_device(uvd-vdev, VFL_TYPE_GRABBER, video_nr) == 
-1) {
+   uvd-vdev.release = usbvideo_dummy_release;
+   if (video_register_device(uvd-vdev, VFL_TYPE_GRABBER, video_nr)  0) {
err(%s: video_register_device failed, __func__);
return -EPIPE;
}


---

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

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


[linuxtv-commits] [hg:v4l-dvb] tuner-3036: remove driver

2008-08-22 Thread Patch from Hans Verkuil
The patch number 8690 was added via Hans Verkuil [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: Hans Verkuil  [EMAIL PROTECTED]
tuner-3036: remove driver


This driver is for VERY old i2c-over-parallel port teletext receiver
boxes. Rather then spending effort on converting this driver to V4L2,
and since it is extremely unlikely that anyone still uses one of these
devices, it was decided to drop it (after discussing this as well with
the original author, Phil Blundell).

Priority: normal

Signed-off-by: Hans Verkuil [EMAIL PROTECTED]
Signed-off-by: Phil Blundell [EMAIL PROTECTED]


---

 linux/drivers/media/video/Kconfig  |7 
 linux/drivers/media/video/Makefile |1 
 linux/drivers/media/video/tuner-3036.c |  215 -
 3 files changed, 223 deletions(-)

diff -r 4fb38b441560 -r 145b308376bf linux/drivers/media/video/Kconfig
--- a/linux/drivers/media/video/Kconfig Sat Aug 16 12:50:23 2008 +0200
+++ b/linux/drivers/media/video/Kconfig Sat Aug 16 12:56:12 2008 +0200
@@ -578,13 +578,6 @@ config VIDEO_SAA5249
 
  To compile this driver as a module, choose M here: the
  module will be called saa5249.
-
-config TUNER_3036
-   tristate SAB3036 tuner
-   depends on I2C  VIDEO_V4L1
-   help
- Say Y here to include support for Philips SAB3036 compatible tuners.
- If in doubt, say N.
 
 config VIDEO_VINO
tristate SGI Vino Video For Linux (EXPERIMENTAL)
diff -r 4fb38b441560 -r 145b308376bf linux/drivers/media/video/Makefile
--- a/linux/drivers/media/video/MakefileSat Aug 16 12:50:23 2008 +0200
+++ b/linux/drivers/media/video/MakefileSat Aug 16 12:56:12 2008 +0200
@@ -83,7 +83,6 @@ obj-$(CONFIG_VIDEO_MXB) += mxb.o
 obj-$(CONFIG_VIDEO_MXB) += mxb.o
 obj-$(CONFIG_VIDEO_HEXIUM_ORION) += hexium_orion.o
 obj-$(CONFIG_VIDEO_HEXIUM_GEMINI) += hexium_gemini.o
-obj-$(CONFIG_TUNER_3036) += tuner-3036.o
 
 obj-$(CONFIG_VIDEO_TUNER) += tuner.o
 
diff -r 4fb38b441560 -r 145b308376bf linux/drivers/media/video/tuner-3036.c
--- a/linux/drivers/media/video/tuner-3036.cSat Aug 16 12:50:23 2008 +0200
+++ /dev/null   Thu Jan 01 00:00:00 1970 +
@@ -1,215 +0,0 @@
-/*
- * Driver for Philips SAB3036 CITAC tuner control chip.
- *
- * Author: Phil Blundell [EMAIL PROTECTED]
- *
- * The SAB3036 is just about different enough from the chips that
- * tuner.c copes with to make it not worth the effort to crowbar
- * the support into that file.  So instead we have a separate driver.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version
- * 2 of the License, or (at your option) any later version.
- */
-
-#include linux/module.h
-#include linux/kernel.h
-#include linux/sched.h
-#include linux/string.h
-#include linux/timer.h
-#include linux/delay.h
-#include linux/errno.h
-#include linux/slab.h
-#include linux/init.h
-
-#include linux/i2c.h
-#include compat.h
-#include linux/videodev.h
-#include media/v4l2-common.h
-
-#include media/tuner.h
-
-static int debug;  /* insmod parameter */
-static int this_adap;
-
-static struct i2c_client client_template;
-
-/* Addresses to scan */
-static unsigned short normal_i2c[] = { 0x60, 0x61, I2C_CLIENT_END };
-static unsigned short ignore = I2C_CLIENT_END;
-
-static struct i2c_client_address_data addr_data = {
-   .normal_i2c = normal_i2c,
-   .probe  = ignore,
-   .ignore = ignore,
-};
-
-/* -- */
-
-static unsigned char
-tuner_getstatus (struct i2c_client *c)
-{
-   unsigned char byte;
-   if (i2c_master_recv(c, byte, 1) != 1)
-   printk(KERN_ERR tuner-3036: I/O error.\n);
-   return byte;
-}
-
-#define TUNER_FL0x80
-
-static int
-tuner_islocked (struct i2c_client *c)
-{
-   return (tuner_getstatus(c)  TUNER_FL);
-}
-
-/* -- */
-
-static void
-set_tv_freq(struct i2c_client *c, int freq)
-{
-   u16 div = ((freq * 20) / 16);
-   unsigned long give_up = jiffies + HZ;
-   unsigned char buffer[2];
-
-   if (debug)
-   printk(KERN_DEBUG tuner: setting frequency %dMHz, divisor 
%x\n, freq / 16, div);
-
-   /* Select high tuning current */
-   buffer[0] = 0x29;
-   buffer[1] = 0x3e;
-
-   if (i2c_master_send(c, buffer, 2) != 2)
-   printk(tuner: i2c i/o error 1\n);
-
-   buffer[0] = 0x80 | ((div8)  0x7f);
-   buffer[1] = div  0xff;
-
-   if (i2c_master_send(c, buffer, 2) 

[linuxtv-commits] [hg:v4l-dvb] v4l2-ctl: added support to set the pixelformat

2008-08-22 Thread Patch from Hans Verkuil
The patch number 8696 was added via Hans Verkuil [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: Hans Verkuil  [EMAIL PROTECTED]
v4l2-ctl: added support to set the pixelformat


Priority: normal

Signed-off-by: Hans Verkuil [EMAIL PROTECTED]


---

 v4l2-apps/util/v4l2-ctl.cpp |   37 +++-
 1 file changed, 32 insertions(+), 5 deletions(-)

diff -r c6f0865bb076 -r 128289a6c1ca v4l2-apps/util/v4l2-ctl.cpp
--- a/v4l2-apps/util/v4l2-ctl.cpp   Mon Aug 18 09:48:42 2008 +0200
+++ b/v4l2-apps/util/v4l2-ctl.cpp   Tue Aug 19 11:44:07 2008 +0200
@@ -160,6 +160,7 @@ static const flag_def service_def[] = {
 #define FmtHeight  (1L1)
 #define FmtChromaKey   (1L2)
 #define FmtGlobalAlpha (1L3)
+#define FmtPixelFormat (1L4)
 
 /* crop specified */
 #define CropWidth  (1L0)
@@ -286,8 +287,10 @@ static void usage(void)
printf(  --list-formats display supported video formats 
[VIDIOC_ENUM_FMT]\n);
printf(  -V, --get-fmt-video\n);
printf( query the video capture format 
[VIDIOC_G_FMT]\n);
-   printf(  -v, --set-fmt-video=width=w,height=h\n);
+   printf(  -v, --set-fmt-video=width=w,height=h,pixelformat=f\n);
printf( set the video capture format 
[VIDIOC_S_FMT]\n);
+   printf( pixelformat is either the format index as 
reported by\n);
+   printf( --list-formats, or the fourcc value as a 
string\n);
printf(  --verbose  turn on verbose ioctl error reporting.\n);
printf(\n);
printf(Uncommon options:\n);
@@ -701,7 +704,7 @@ static void printfbuf(const struct v4l2_
printf(\tBase  : 0x%p\n, fb.base);
printf(\tWidth : %d\n, fb.fmt.width);
printf(\tHeight: %d\n, fb.fmt.height);
-   printf(\tPixel Format  : %s\n, fcc2s(fb.fmt.pixelformat).c_str());
+   printf(\tPixel Format  : '%s'\n, fcc2s(fb.fmt.pixelformat).c_str());
if (!is_ext) {
printf(\tBytes per Line: %d\n, fb.fmt.bytesperline);
printf(\tSize image: %d\n, fb.fmt.sizeimage);
@@ -740,7 +743,7 @@ static void printfmt(struct v4l2_format 
case V4L2_BUF_TYPE_VIDEO_CAPTURE:
case V4L2_BUF_TYPE_VIDEO_OUTPUT:
printf(\tWidth/Height  : %u/%u\n, vfmt.fmt.pix.width, 
vfmt.fmt.pix.height);
-   printf(\tPixel Format  : %s\n, 
fcc2s(vfmt.fmt.pix.pixelformat).c_str());
+   printf(\tPixel Format  : '%s'\n, 
fcc2s(vfmt.fmt.pix.pixelformat).c_str());
printf(\tField : %s\n, 
field2s(vfmt.fmt.pix.field).c_str());
printf(\tBytes per Line: %u\n, vfmt.fmt.pix.bytesperline);
printf(\tSize Image: %u\n, vfmt.fmt.pix.sizeimage);
@@ -798,8 +801,9 @@ static void print_video_formats(int fd, 
fmt.index = 0;
fmt.type = type;
while (ioctl(fd, VIDIOC_ENUM_FMT, fmt) = 0) {
+   printf(\tIndex   : %d\n, fmt.index);
printf(\tType: %s\n, buftype2s(type).c_str());
-   printf(\tPixelformat : %s, fcc2s(fmt.pixelformat).c_str());
+   printf(\tPixel Format: '%s', fcc2s(fmt.pixelformat).c_str());
if (fmt.flags)
printf( (compressed));
printf(\n);
@@ -1239,6 +1243,7 @@ int main(int argc, char **argv)
static const char *const subopts[] = {
width,
height,
+   pixelformat,
NULL
};
 
@@ -1250,6 +1255,15 @@ int main(int argc, char **argv)
case 1:
vfmt.fmt.pix.height = strtol(value, 0L, 
0);
set_fmts |= FmtHeight;
+   break;
+   case 2:
+   if (strlen(value) == 4)
+   vfmt.fmt.pix.pixelformat =
+   v4l2_fourcc(value[0], 
value[1],
+   value[2], value[3]);
+   else
+   vfmt.fmt.pix.pixelformat = 
strtol(value, 0L, 0);
+   set_fmts |= FmtPixelFormat;
break;
 

[linuxtv-commits] [hg:v4l-dvb] aci: remove obsolete sources

2008-08-22 Thread Patch from Hans Verkuil
The patch number 8693 was added via Hans Verkuil [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: Hans Verkuil  [EMAIL PROTECTED]
aci: remove obsolete sources


The aci.c and aci.h files were copied from the kernel for a Miro radio
card. That driver has been removed, so these supported sources can
also be removed. In addition some remaining traces of the Miro driver
were also deleted.

Priority: normal

Signed-off-by: Hans Verkuil [EMAIL PROTECTED]


---

 linux/drivers/media/radio/Kconfig |   32 -
 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 
 7 files changed, 9 insertions(+), 836 deletions(-)

diff -r a2d7e2ace4ec -r 4e372fa8e9c5 linux/drivers/media/radio/Kconfig
--- a/linux/drivers/media/radio/Kconfig Sat Aug 16 15:49:09 2008 +0200
+++ b/linux/drivers/media/radio/Kconfig Sat Aug 16 15:55:33 2008 +0200
@@ -195,38 +195,6 @@ config RADIO_MAESTRO
  To compile this driver as a module, choose M here: the
  module will be called radio-maestro.
 
-config RADIO_MIROPCM20
-   tristate miroSOUND PCM20 radio
-   depends on ISA  VIDEO_V4L1  SOUND_ACI_MIXER
-   ---help---
- Choose Y here if you have this FM radio card. You also need to say Y
- to ACI mixer (miroSOUND PCM1-pro/PCM12/PCM20 radio) (in Sound)
- for this to work.
-
- In order to control your radio card, you will need to use programs
- that are compatible with the Video For Linux API.  Information on
- this API and pointers to v4l programs may be found at
- file:Documentation/video4linux/API.html.
-
- To compile this driver as a module, choose M here: the
- module will be called miropcm20.
-
-config RADIO_MIROPCM20_RDS
-   tristate miroSOUND PCM20 radio RDS user interface (EXPERIMENTAL)
-   depends on RADIO_MIROPCM20  EXPERIMENTAL
-   ---help---
- Choose Y here if you want to see RDS/RBDS information like
- RadioText, Programme Service name, Clock Time and date, Programme
- Type and Traffic Announcement/Programme identification.
-
- It's not possible to read the raw RDS packets from the device, so
- the driver cant provide an V4L interface for this.  But the
- availability of RDS is reported over V4L by the basic driver
- already.  Here RDS can be read from files in /dev/v4l/rds.
-
- To compile this driver as a module, choose M here: the
- module will be called miropcm20-rds.
-
 config RADIO_SF16FMI
tristate SF16FMI Radio
depends on ISA  VIDEO_V4L2
diff -r a2d7e2ace4ec -r 4e372fa8e9c5 linux/sound/oss/aci.c
--- a/linux/sound/oss/aci.c Sat Aug 16 15:49:09 2008 +0200
+++ /dev/null   Thu Jan 01 00:00:00 1970 +
@@ -1,713 +0,0 @@
-/*
- * Audio Command Interface (ACI) driver (sound/aci.c)
- *
- * ACI is a protocol used to communicate with the microcontroller on
- * some sound cards produced by miro, e.g. the miroSOUND PCM12 and
- * PCM20. The ACI has been developed for miro by Norberto Pellicci
- * [EMAIL PROTECTED]. Special thanks to both him and miro for
- * providing the ACI specification.
- *
- * The main function of the ACI is to control the mixer and to get a
- * product identification. On the PCM20, ACI also controls the radio
- * tuner on this card, this is supported in the Video for Linux
- * miropcm20 driver.
- * -
- * This is a fullfeatured implementation. Unsupported features
- * are bugs... (:
- *
- * It is not longer necessary to load the mad16 module first. The
- * user is currently responsible to set the mad16 mixer correctly.
- *
- * To toggle the solo mode for full duplex operation just use the OSS
- * record switch for the pcm ('wave') controller.   Robert
- * -
- *
- * Revision history:
- *
- *   1995-11-10  Markus Kuhn [EMAIL PROTECTED]
- *First version written.
- *   1995-12-31  Markus Kuhn
- *Second revision, general code cleanup.
- *   1996-05-16 Hannu Savolainen
- *   Integrated with other parts of the driver.
- *   1996-05-28  Markus Kuhn
- *Initialize CS4231A mixer, make ACI first mixer,
- *use new private mixer API for solo mode.
- *   1998-08-18  Ruurd Reitsma [EMAIL PROTECTED]
- *   Small modification to export ACI functions and
- *   complete modularisation.
- *   2000-06-20  Robert Siemer [EMAIL PROTECTED]
- *Don't initialize the CS4231A mixer anymore, so the code is
- *working again, 

[linuxtv-commits] [hg:v4l-dvb] pxa: fix build error for 2.6.27.

2008-08-22 Thread Patch from Hans Verkuil
The patch number 8694 was added via Hans Verkuil [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: Hans Verkuil  [EMAIL PROTECTED]
pxa: fix build error for 2.6.27.


Priority: normal

Signed-off-by: Hans Verkuil [EMAIL PROTECTED]


---

 linux/drivers/media/video/pxa_camera.c |5 +
 1 file changed, 5 insertions(+)

diff -r 4e372fa8e9c5 -r a6dd11e159f4 linux/drivers/media/video/pxa_camera.c
--- a/linux/drivers/media/video/pxa_camera.cSat Aug 16 15:55:33 2008 +0200
+++ b/linux/drivers/media/video/pxa_camera.cMon Aug 18 09:46:12 2008 +0200
@@ -36,8 +36,13 @@
 #include linux/videodev2.h
 
 #include asm/dma.h
+#if LINUX_VERSION_CODE = KERNEL_VERSION(2, 6, 27)
+#include mach/pxa-regs.h
+#include mach/camera.h
+#else
 #include asm/arch/pxa-regs.h
 #include asm/arch/camera.h
+#endif
 
 #define PXA_CAM_VERSION_CODE KERNEL_VERSION(0, 0, 5)
 #define PXA_CAM_DRV_NAME pxa27x-camera


---

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

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


[linuxtv-commits] [hg:v4l-dvb] capture_example: code cleanups

2008-08-22 Thread Patch from Hans Verkuil
The patch number 8699 was added via Hans Verkuil [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: Hans Verkuil  [EMAIL PROTECTED]
capture_example: code cleanups


Just fixed a bunch of checkpatch warnings and tightened up the code.

Priority: normal

Signed-off-by: Hans Verkuil [EMAIL PROTECTED]


---

 v4l2-apps/test/capture_example.c |   82 +++
 1 file changed, 31 insertions(+), 51 deletions(-)

diff -r 11e9bbf1d6c2 -r 7ff930a1268f v4l2-apps/test/capture_example.c
--- a/v4l2-apps/test/capture_example.c  Wed Aug 20 09:07:22 2008 +0200
+++ b/v4l2-apps/test/capture_example.c  Wed Aug 20 09:08:10 2008 +0200
@@ -36,23 +36,21 @@ typedef enum {
 } io_method;
 
 struct buffer {
-   void *  start;
-   size_t  length;
+   void   *start;
+   size_t  length;
 };
 
-static char *   dev_name= NULL;
-static io_methodio  = IO_METHOD_MMAP;
-static int  fd  = -1;
-struct buffer * buffers = NULL;
-static unsigned int n_buffers   = 0;
-static int out_buf = 0;
+static char*dev_name;
+static io_methodio = IO_METHOD_MMAP;
+static int  fd = -1;
+struct buffer  *buffers;
+static unsigned int n_buffers;
+static int out_buf;
 static int  force_format;
 
 static void errno_exit(const char *s)
 {
-   fprintf(stderr, %s error %d, %s\n,
-s, errno, strerror(errno));
-
+   fprintf(stderr, %s error %d, %s\n, s, errno, strerror(errno));
exit(EXIT_FAILURE);
 }
 
@@ -100,7 +98,6 @@ static int read_frame(void)
}
 
process_image(buffers[0].start, buffers[0].length);
-
break;
 
case IO_METHOD_MMAP:
@@ -130,7 +127,6 @@ static int read_frame(void)
 
if (-1 == xioctl(fd, VIDIOC_QBUF, buf))
errno_exit(VIDIOC_QBUF);
-
break;
 
case IO_METHOD_USERPTR:
@@ -155,17 +151,16 @@ static int read_frame(void)
}
 
for (i = 0; i  n_buffers; ++i)
-   if (buf.m.userptr == (unsigned long) buffers[i].start
+   if (buf.m.userptr == (unsigned long)buffers[i].start
 buf.length == buffers[i].length)
break;
 
assert(i  n_buffers);
 
-   process_image((void *) buf.m.userptr, buf.bytesused);
+   process_image((void *)buf.m.userptr, buf.bytesused);
 
if (-1 == xioctl(fd, VIDIOC_QBUF, buf))
errno_exit(VIDIOC_QBUF);
-
break;
}
 
@@ -196,7 +191,6 @@ static void mainloop(void)
if (-1 == r) {
if (EINTR == errno)
continue;
-
errno_exit(select);
}
 
@@ -207,7 +201,6 @@ static void mainloop(void)
 
if (read_frame())
break;
-
/* EAGAIN - continue select loop. */
}
}
@@ -225,10 +218,8 @@ static void stop_capturing(void)
case IO_METHOD_MMAP:
case IO_METHOD_USERPTR:
type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
-
if (-1 == xioctl(fd, VIDIOC_STREAMOFF, type))
errno_exit(VIDIOC_STREAMOFF);
-
break;
}
 }
@@ -248,20 +239,16 @@ static void start_capturing(void)
struct v4l2_buffer buf;
 
CLEAR(buf);
-
-   buf.type= V4L2_BUF_TYPE_VIDEO_CAPTURE;
-   buf.memory  = V4L2_MEMORY_MMAP;
-   buf.index   = i;
+   buf.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
+   buf.memory = V4L2_MEMORY_MMAP;
+   buf.index = i;
 
if (-1 == xioctl(fd, VIDIOC_QBUF, buf))
errno_exit(VIDIOC_QBUF);
}
-
type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
-
if (-1 == xioctl(fd, VIDIOC_STREAMON, type))
errno_exit(VIDIOC_STREAMON);
-
break;
 
case IO_METHOD_USERPTR:
@@ -269,22 +256,18 @@ static void start_capturing(void)
struct v4l2_buffer buf;
 
CLEAR(buf);
-
-   buf.type= V4L2_BUF_TYPE_VIDEO_CAPTURE;
-   buf.memory  = 

[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] cx18: Add missing lock for when the irq handler manipulates the queues

2008-08-22 Thread Patch from Andy Walls
The patch number 8701 was added via Andy Walls [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: Andy Walls  [EMAIL PROTECTED]
cx18: Add missing lock for when the irq handler manipulates the queues


cx18: Add missing lock for when the irq handler manipulates the queues.  This
was a potential source of stream queue corruption.  Also changed the name of
cx18_queue_find_buf() to cx18_queue_get_buf_irq().

Priority: high

Signed-off-by: Andy Walls [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 cc624bf7489c -r 9f66e0729854 linux/drivers/media/video/cx18/cx18-irq.c
--- a/linux/drivers/media/video/cx18/cx18-irq.c Tue Aug 05 21:00:11 2008 +0300
+++ b/linux/drivers/media/video/cx18/cx18-irq.c Sun Aug 17 22:13:31 2008 -0400
@@ -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 cc624bf7489c -r 9f66e0729854 linux/drivers/media/video/cx18/cx18-queue.c
--- a/linux/drivers/media/video/cx18/cx18-queue.c   Tue Aug 05 21:00:11 
2008 +0300
+++ b/linux/drivers/media/video/cx18/cx18-queue.c   Sun Aug 17 22:13:31 
2008 -0400
@@ -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 cc624bf7489c -r 9f66e0729854 linux/drivers/media/video/cx18/cx18-queue.h
--- a/linux/drivers/media/video/cx18/cx18-queue.h   Tue Aug 05 21:00:11 
2008 +0300
+++ b/linux/drivers/media/video/cx18/cx18-queue.h   Sun Aug 17 22:13:31 
2008 -0400
@@ -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/9f66e072985404209adcb926183fa880ee671897

___
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] gspca: Adjust some control limits in spca561.

2008-08-22 Thread Patch from Jean-Francois Moine
The patch number 8705 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: Jean-Francois Moine  [EMAIL PROTECTED]
gspca: Adjust some control limits in spca561.


Priority: high

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


---

 linux/drivers/media/video/gspca/spca561.c |   35 +-
 1 file changed, 8 insertions(+), 27 deletions(-)

diff -r dd41c051bb53 -r 3150979f31c7 linux/drivers/media/video/gspca/spca561.c
--- a/linux/drivers/media/video/gspca/spca561.c Thu Aug 14 17:46:18 2008 +0200
+++ b/linux/drivers/media/video/gspca/spca561.c Thu Aug 14 19:53:33 2008 +0200
@@ -38,9 +38,9 @@ struct sd {
 #define CONTRAST_MAX 0x3fff
 
__u16 exposure; /* rev12a only */
-#define EXPOSURE_MIN 0x2001
-#define EXPOSURE_DEF 0x20ae
-#define EXPOSURE_MAX 0x421d
+#define EXPOSURE_MIN 0
+#define EXPOSURE_DEF 200
+#define EXPOSURE_MAX 762
 
__u8 brightness;/* rev72a only */
 #define BRIGHTNESS_MIN 0
@@ -48,7 +48,7 @@ struct sd {
 #define BRIGHTNESS_MAX 63
 
__u8 white; /* rev12a only */
-#define WHITE_MIN 0
+#define WHITE_MIN 1
 #define WHITE_DEF 0x40
 #define WHITE_MAX 0x7f
 
@@ -604,28 +604,11 @@ static void setcontrast(struct gspca_dev
break;
default: {
 /* case Rev012A: { */
-#if 1
static const __u8 Reg8391[] =
{ 0x92, 0x30, 0x20, 0x00, 0x0c, 0x00, 0x00, 0x00 };
 
reg_w_buf(gspca_dev, 0x8391, Reg8391, 8);
reg_w_buf(gspca_dev, 0x8390, Reg8391, 8);
-#else
-   int expotimes;
-   __u8 Reg8391[] =
-   { 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00 };
-
-/*fixme: does not work..*/
-   /* Write camera sensor settings */
-   expotimes = sd-contrast  5;
-   /* exposure is in 8309 2b, range 0120 - 5720 */
-   Reg8391[0] = expotimes; /* exposure */
-   Reg8391[1] = 0x18 | (expotimes  8);
-   Reg8391[2] = sd-brightness;/* gain */
-   /* gain in 8335, 2b range  - 2400 */
-   reg_w_buf(gspca_dev, 0x8391, Reg8391, 8);
-   reg_w_buf(gspca_dev, 0x8390, Reg8391, 8);
-#endif
break;
}
}
@@ -639,10 +622,6 @@ static void setwhite(struct gspca_dev *g
__u8 reg8614, reg8616;
 
white = sd-white;
-   if (sd-white == 0) {
-   PDEBUG(D_CONF, Discarding null whiteness);
-   return;
-   }
/* try to emulate MS-win as possible */
reg8616 = 0x90 - white * 5 / 8;
reg_w_val(gspca_dev-dev, 0x8616, reg8616);
@@ -654,10 +633,12 @@ static void setexposure(struct gspca_dev
 static void setexposure(struct gspca_dev *gspca_dev)
 {
struct sd *sd = (struct sd *) gspca_dev;
+   int expo;
__u8 data[2];
 
-   data[0] = sd-exposure;
-   data[1] = sd-exposure  8;
+   expo = sd-exposure + 0x20a8;   /* from test */
+   data[0] = expo;
+   data[1] = expo  8;
reg_w_buf(gspca_dev, 0x8309, data, 2);
 }
 


---

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

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


[linuxtv-commits] [hg:v4l-dvb] gspca: Colors, hflip and vflip controls added for pac7302.

2008-08-22 Thread Patch from Jean-Francois Moine
The patch number 8707 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: Jean-Francois Moine  [EMAIL PROTECTED]
gspca: Colors, hflip and vflip controls added for pac7302.


Priority: high

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


---

 linux/drivers/media/video/gspca/pac7311.c |  107 +-
 1 file changed, 105 insertions(+), 2 deletions(-)

diff -r 3d24cecdb5a1 -r aba49c1e512d linux/drivers/media/video/gspca/pac7311.c
--- a/linux/drivers/media/video/gspca/pac7311.c Fri Aug 15 11:54:57 2008 +0200
+++ b/linux/drivers/media/video/gspca/pac7311.c Fri Aug 15 19:10:10 2008 +0200
@@ -40,6 +40,8 @@ struct sd {
unsigned char contrast;
unsigned char colors;
unsigned char autogain;
+   __u8 hflip;
+   __u8 vflip;
 
char tosof; /* number of bytes before next start of frame */
signed char ag_cnt;
@@ -59,6 +61,10 @@ static int sd_getcolors(struct gspca_dev
 static int sd_getcolors(struct gspca_dev *gspca_dev, __s32 *val);
 static int sd_setautogain(struct gspca_dev *gspca_dev, __s32 val);
 static int sd_getautogain(struct gspca_dev *gspca_dev, __s32 *val);
+static int sd_sethflip(struct gspca_dev *gspca_dev, __s32 val);
+static int sd_gethflip(struct gspca_dev *gspca_dev, __s32 *val);
+static int sd_setvflip(struct gspca_dev *gspca_dev, __s32 val);
+static int sd_getvflip(struct gspca_dev *gspca_dev, __s32 *val);
 
 static struct ctrl sd_ctrls[] = {
{
@@ -97,7 +103,8 @@ static struct ctrl sd_ctrls[] = {
.type= V4L2_CTRL_TYPE_INTEGER,
.name= Saturation,
.minimum = 0,
-   .maximum = 255,
+#define COLOR_MAX 255
+   .maximum = COLOR_MAX,
.step= 1,
 #define COLOR_DEF 127
.default_value = COLOR_DEF,
@@ -118,6 +125,35 @@ static struct ctrl sd_ctrls[] = {
},
.set = sd_setautogain,
.get = sd_getautogain,
+   },
+/* next controls work with pac7302 only */
+   {
+   {
+   .id  = V4L2_CID_HFLIP,
+   .type= V4L2_CTRL_TYPE_BOOLEAN,
+   .name= Mirror,
+   .minimum = 0,
+   .maximum = 1,
+   .step= 1,
+#define HFLIP_DEF 0
+   .default_value = HFLIP_DEF,
+   },
+   .set = sd_sethflip,
+   .get = sd_gethflip,
+   },
+   {
+   {
+   .id  = V4L2_CID_VFLIP,
+   .type= V4L2_CTRL_TYPE_BOOLEAN,
+   .name= Vflip,
+   .minimum = 0,
+   .maximum = 1,
+   .step= 1,
+#define VFLIP_DEF 0
+   .default_value = VFLIP_DEF,
+   },
+   .set = sd_setvflip,
+   .get = sd_getvflip,
},
 };
 
@@ -493,8 +529,25 @@ static void setcolors(struct gspca_dev *
 {
struct sd *sd = (struct sd *) gspca_dev;
 
-   if (sd-sensor == SENSOR_PAC7302)
+   if (sd-sensor == SENSOR_PAC7302) {
+   int i, v;
+   static const int a[9] =
+   {217, -212, 0, -101, 170, -67, -38, -315, 355};
+   static const int b[9] =
+   {19, 106, 0, 19, 106, 1, 19, 106, 1};
+
+   reg_w(gspca_dev, 0xff, 0x03);   /* page 3 */
+   reg_w(gspca_dev, 0x11, 0x01);
+   reg_w(gspca_dev, 0xff, 0x00);   /* page 0 */
+   reg_w(gspca_dev, 0xff, 0x00);   /* page 0 */
+   for (i = 0; i  9; i++) {
+   v = a[i] * sd-colors / COLOR_MAX + b[i];
+   reg_w(gspca_dev, 0x0f + 2 * i, (v  8)  0x07);
+   reg_w(gspca_dev, 0x0f + 2 * i + 1, v);
+   }
+   reg_w(gspca_dev, 0xdc, 0x01);
return;
+   }
reg_w(gspca_dev, 0xff, 0x01);
reg_w(gspca_dev, 0x10, sd-colors);
/* load registers to sensor (Bit 0, auto clear) */
@@ -512,6 +565,19 @@ static void setautogain(struct gspca_dev
} else {
sd-ag_cnt = -1;
}
+}
+
+/* this function is used by pac7302 only */
+static void sethvflip(struct gspca_dev *gspca_dev)
+{
+   struct sd *sd = (struct sd *) gspca_dev;
+   __u8 data;
+
+   reg_w(gspca_dev, 0xff, 0x03);   /* page 3 */
+   data = (sd-hflip ? 0x00 : 0x08)
+   | (sd-vflip ? 0x04 : 0x00);
+   reg_w(gspca_dev, 0x21, data);
+   reg_w(gspca_dev, 0x11, 0x01);
 }
 
 /* this function is called at open time */
@@ -574,6 +640,7 @@ static void sd_start(struct gspca_dev *g
/* start stream */

[linuxtv-commits] [hg:v4l-dvb] merge: v4l-dvb

2008-08-22 Thread Patch added by Jean-Francois Moine
The patch number 8704 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]

--

merge: v4l-dvb


---

 linux/drivers/media/dvb/dvb-usb/Kconfig   |2 
 linux/drivers/media/dvb/dvb-usb/cxusb.c   |  495 ++
 linux/drivers/media/dvb/dvb-usb/dvb-usb-ids.h |3 
 linux/drivers/media/dvb/frontends/Kconfig |7 
 linux/drivers/media/dvb/frontends/Makefile|1 
 linux/drivers/media/dvb/frontends/dib0070.h   |8 
 linux/drivers/media/dvb/frontends/dib7000p.c  |3 
 linux/drivers/media/dvb/frontends/dib7000p.h  |   41 +
 linux/drivers/media/dvb/frontends/lgs8gl5.c   |  478 +
 linux/drivers/media/dvb/frontends/lgs8gl5.h   |   45 +
 linux/drivers/media/video/ivtv/ivtv-driver.c  |2 
 linux/drivers/media/video/ivtv/ivtv-driver.h  |1 
 linux/drivers/media/video/ivtv/ivtv-irq.c |   29 -
 linux/drivers/media/video/ivtv/ivtv-queue.h   |2 
 linux/drivers/media/video/ivtv/ivtv-streams.c |2 
 linux/drivers/media/video/ivtv/ivtv-vbi.c |4 
 linux/drivers/media/video/v4l2-common.c   |3 
 linux/drivers/media/video/v4l2-dev.c  |2 
 linux/include/linux/videodev2.h   |3 
 v4l/scripts/checkpatch.pl |  314 ---
 v4l/scripts/make_kconfig.pl   |   68 --
 v4l/versions.txt  |4 
 22 files changed, 1336 insertions(+), 181 deletions(-)

diff discarded since it is too big

---

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

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


[linuxtv-commits] [hg:v4l-dvb] gspca: Fix initialization and controls of sn9x110 - ov7630.

2008-08-22 Thread Patch from Jean-Francois Moine
The patch number 8709 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: Jean-Francois Moine  [EMAIL PROTECTED]
gspca: Fix initialization and controls of sn9x110 - ov7630.


Priority: high

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


---

 linux/drivers/media/video/gspca/sonixj.c |  203 ---
 1 file changed, 106 insertions(+), 97 deletions(-)

diff -r 1da7166882de -r a8779025e7e8 linux/drivers/media/video/gspca/sonixj.c
--- a/linux/drivers/media/video/gspca/sonixj.c  Sun Aug 17 09:09:20 2008 +0200
+++ b/linux/drivers/media/video/gspca/sonixj.c  Mon Aug 18 11:12:43 2008 +0200
@@ -59,6 +59,7 @@ struct sd {
 #define SENSOR_OV7648 5
 #define SENSOR_OV7660 6
unsigned char i2c_base;
+   __u8 regf1;
 };
 
 /* V4L2 controls supported by the driver */
@@ -78,7 +79,8 @@ static struct ctrl sd_ctrls[] = {
.type= V4L2_CTRL_TYPE_INTEGER,
.name= Brightness,
.minimum = 0,
-   .maximum = 0x,
+#define BRIGHTNESS_MAX 0x
+   .maximum = BRIGHTNESS_MAX,
.step= 1,
 #define BRIGHTNESS_DEF 0x7fff
.default_value = BRIGHTNESS_DEF,
@@ -92,7 +94,8 @@ static struct ctrl sd_ctrls[] = {
.type= V4L2_CTRL_TYPE_INTEGER,
.name= Contrast,
.minimum = 0,
-   .maximum = 127,
+#define CONTRAST_MAX 127
+   .maximum = CONTRAST_MAX,
.step= 1,
 #define CONTRAST_DEF 63
.default_value = CONTRAST_DEF,
@@ -252,27 +255,20 @@ static const __u8 *sn_tb[] = {
sn_ov7660
 };
 
-static const __u8 regsn20[] = {
+static const __u8 gamma_def[] = {
0x00, 0x2d, 0x46, 0x5a, 0x6c, 0x7c, 0x8b, 0x99,
0xa6, 0xb2, 0xbf, 0xca, 0xd5, 0xe0, 0xeb, 0xf5, 0xff
-};
-static const __u8 regsn20_sn9c325[] = {
-   0x0a, 0x3a, 0x56, 0x6c, 0x7e, 0x8d, 0x9a, 0xa4,
-   0xaf, 0xbb, 0xc5, 0xcd, 0xd5, 0xde, 0xe8, 0xed, 0xf5
 };
 
 static const __u8 reg84[] = {
0x14, 0x00, 0x27, 0x00, 0x07, 0x00, 0xe5, 0x0f,
0xe4, 0x0f, 0x38, 0x00, 0x3e, 0x00, 0xc3, 0x0f,
-/* 0x00, 0x00, 0x00, 0x00, 0x00 */
+#if 1
+   0xf7, 0x0f, 0x00, 0x00, 0x00
+#else
0xf7, 0x0f, 0x0a, 0x00, 0x00
-};
-static const __u8 reg84_sn9c325[] = {
-   0x14, 0x00, 0x27, 0x00, 0x07, 0x00, 0xe4, 0x0f,
-   0xd3, 0x0f, 0x4b, 0x00, 0x48, 0x00, 0xc0, 0x0f,
-   0xf8, 0x0f, 0x00, 0x00, 0x00
-};
-
+#endif
+};
 static const __u8 hv7131r_sensor_init[][8] = {
{0xC1, 0x11, 0x01, 0x08, 0x01, 0x00, 0x00, 0x10},
{0xB1, 0x11, 0x34, 0x17, 0x7F, 0x00, 0x00, 0x10},
@@ -423,7 +419,7 @@ static const __u8 ov7630_sensor_init[][8
{0xa1, 0x21, 0x12, 0xc8, 0x00, 0x00, 0x00, 0x10},
 /* win: delay 20ms */
{0xa1, 0x21, 0x12, 0x48, 0x00, 0x00, 0x00, 0x10},
-/* win: loop on 2 wwrite, 1 read */
+/* win: i2c_r from 00 to 80 */
{0xd1, 0x21, 0x03, 0x80, 0x10, 0x20, 0x80, 0x10},
{0xb1, 0x21, 0x0c, 0x20, 0x20, 0x00, 0x00, 0x10},
{0xd1, 0x21, 0x11, 0x00, 0x48, 0xc0, 0x00, 0x10},
@@ -458,9 +454,11 @@ static const __u8 ov7630_sensor_init[][8
{0xa1, 0x21, 0x10, 0x32, 0x00, 0x00, 0x00, 0x10},
{0xa1, 0x21, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10},
{0xb1, 0x21, 0x01, 0x80, 0x80, 0x00, 0x00, 0x10},
+/* */
{0xa1, 0x21, 0x11, 0x00, 0x00, 0x00, 0x00, 0x10},
{0xa1, 0x21, 0x2a, 0x88, 0x00, 0x00, 0x00, 0x10},
{0xa1, 0x21, 0x2b, 0x34, 0x00, 0x00, 0x00, 0x10},
+/* */
{0xa1, 0x21, 0x10, 0x83, 0x00, 0x00, 0x00, 0x10},
{0xb1, 0x21, 0x01, 0x88, 0x70, 0x00, 0x00, 0x10},
{}
@@ -790,7 +788,11 @@ static int configure_gpio(struct gspca_d
static const __u8 regd4[] = {0x60, 0x00, 0x00};
 
reg_w1(gspca_dev, 0xf1, 0x00);
-   reg_w1(gspca_dev, 0x01, 0x00);  /*jfm was sn9c1xx[1] in v1*/
+#if 1
+   reg_w1(gspca_dev, 0x01, sn9c1xx[1]);
+#else
+   reg_w1(gspca_dev, 0x01, 0x00);  /*jfm: in some win traces*/
+#endif
 
/* configure gpio */
reg_w(gspca_dev, 0x01, sn9c1xx[1], 2);
@@ -817,12 +819,13 @@ static int configure_gpio(struct gspca_d
reg_w1(gspca_dev, 0x17, 0x64);
reg_w1(gspca_dev, 0x01, 0x42);
break;
-#if 0
+#if 1
 /*jfm: from win trace */
case SENSOR_OV7630:
reg_w1(gspca_dev, 0x01, 0x61);
reg_w1(gspca_dev, 0x17, 0xe2);
reg_w1(gspca_dev, 0x01, 0x60);
+   reg_w1(gspca_dev, 0x01, 0x40);
break;
 #endif
case SENSOR_OV7648:
@@ -898,9 +901,20 @@ static void 

[linuxtv-commits] [hg:v4l-dvb] gspca: Do controls work for spca561 revision 12a.

2008-08-22 Thread Patch from Jean-Francois Moine
The patch number 8703 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: Jean-Francois Moine  [EMAIL PROTECTED]
gspca: Do controls work for spca561 revision 12a.


Priority: high

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


---

 linux/drivers/media/video/gspca/spca561.c |   77 +-
 1 file changed, 48 insertions(+), 29 deletions(-)

diff -r c56617ab9548 -r 4d54bbf878af linux/drivers/media/video/gspca/spca561.c
--- a/linux/drivers/media/video/gspca/spca561.c Thu Aug 14 10:50:14 2008 +0200
+++ b/linux/drivers/media/video/gspca/spca561.c Thu Aug 14 13:37:28 2008 +0200
@@ -38,9 +38,9 @@ struct sd {
 #define CONTRAST_MAX 0x3fff
 
__u16 exposure; /* rev12a only */
-#define EXPOSURE_MIN 0x0120
+#define EXPOSURE_MIN 0x2001
 #define EXPOSURE_DEF 0x20ae
-#define EXPOSURE_MAX 0x5720
+#define EXPOSURE_MAX 0x421d
 
__u8 brightness;/* rev72a only */
 #define BRIGHTNESS_MIN 0
@@ -61,6 +61,9 @@ struct sd {
 #define GAIN_MIN 0x0
 #define GAIN_DEF 0x24
 #define GAIN_MAX 0x24
+
+#define EXPO12A_DEF 3
+   __u8 expo12a;   /* expo/gain? for rev 12a */
 
__u8 chip_revision;
 #define Rev012A 0
@@ -567,6 +570,7 @@ static int sd_config(struct gspca_dev *g
sd-exposure = EXPOSURE_DEF;
sd-autogain = AUTOGAIN_DEF;
sd-gain = GAIN_DEF;
+   sd-expo12a = EXPO12A_DEF;
return 0;
 }
 
@@ -640,12 +644,9 @@ static void setwhite(struct gspca_dev *g
return;
}
/* try to emulate MS-win as possible */
-   if (white  0x45)
-   reg8616 = white;
-   else
-   reg8616 = 0x93 + (white  2);
-   reg8614 = 0x28 + (white  4);
+   reg8616 = 0x90 - white * 5 / 8;
reg_w_val(gspca_dev-dev, 0x8616, reg8616);
+   reg8614 = 0x20 + white * 3 / 8;
reg_w_val(gspca_dev-dev, 0x8614, reg8614);
 }
 
@@ -653,30 +654,32 @@ static void setexposure(struct gspca_dev
 static void setexposure(struct gspca_dev *gspca_dev)
 {
struct sd *sd = (struct sd *) gspca_dev;
-   struct usb_device *dev = gspca_dev-dev;
-
-   reg_w_val(dev, 0x8309, sd-gain);
+   __u8 data[2];
+
+   data[0] = sd-exposure;
+   data[1] = sd-exposure  8;
+   reg_w_buf(gspca_dev, 0x8309, data, 2);
 }
 
 /* rev 12a only */
 static void setgain(struct gspca_dev *gspca_dev)
 {
struct sd *sd = (struct sd *) gspca_dev;
-   struct usb_device *dev = gspca_dev-dev;
-
-   reg_w_val(dev, 0x8335, sd-gain);
+   __u8 data[2];
+
+   data[0] = sd-gain;
+   data[1] = 0;
+   reg_w_buf(gspca_dev, 0x8335, data, 2);
 }
 
 static void setautogain(struct gspca_dev *gspca_dev)
 {
struct sd *sd = (struct sd *) gspca_dev;
 
-   if (sd-chip_revision == Rev072A) {
-   if (sd-autogain)
-   sd-ag_cnt = AG_CNT_START;
-   else
-   sd-ag_cnt = -1;
-   }
+   if (sd-autogain)
+   sd-ag_cnt = AG_CNT_START;
+   else
+   sd-ag_cnt = -1;
 }
 
 static void sd_start_12a(struct gspca_dev *gspca_dev)
@@ -715,6 +718,7 @@ static void sd_start_12a(struct gspca_de
reg_w_val(gspca_dev-dev, 0x850b, 0x03);
setcontrast(gspca_dev);
setwhite(gspca_dev);
+   setautogain(gspca_dev);
 }
 static void sd_start_72a(struct gspca_dev *gspca_dev)
 {
@@ -744,12 +748,24 @@ static void sd_start_72a(struct gspca_de
 
 static void sd_stopN(struct gspca_dev *gspca_dev)
 {
-   reg_w_val(gspca_dev-dev, 0x8112, 0x20);
-   reg_w_val(gspca_dev-dev, 0x8102, 0x00); /* white balance - new */
+   struct sd *sd = (struct sd *) gspca_dev;
+
+   if (sd-chip_revision == Rev012A) {
+   reg_w_val(gspca_dev-dev, 0x8112, 0x0e);
+   } else {
+   reg_w_val(gspca_dev-dev, 0x8112, 0x20);
+/* reg_w_val(gspca_dev-dev, 0x8102, 0x00); ?? */
+   }
 }
 
 static void sd_stop0(struct gspca_dev *gspca_dev)
 {
+   struct sd *sd = (struct sd *) gspca_dev;
+
+   if (sd-chip_revision == Rev012A) {
+   reg_w_val(gspca_dev-dev, 0x8118, 0x29);
+   reg_w_val(gspca_dev-dev, 0x8114, 0x08);
+   }
 }
 
 /* this function is called at close time */
@@ -758,7 +774,6 @@ static void sd_close(struct gspca_dev *g
reg_w_val(gspca_dev-dev, 0x8114, 0);
 }
 
-/* rev72a only */
 static void do_autogain(struct gspca_dev *gspca_dev)
 {
struct sd *sd = (struct sd *) gspca_dev;
@@ -770,6 +785,7 @@ static void do_autogain(struct gspca_dev
__u8 luma_mean = 110;
__u8 luma_delta = 20;
__u8 spring = 4;
+   __u8 reg8339[2];

[linuxtv-commits] [hg:v4l-dvb] gspca: Bad controls and quantization table of pac7311.

2008-08-22 Thread Patch from Jean-Francois Moine
The patch number 8711 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: Jean-Francois Moine  [EMAIL PROTECTED]
gspca: Bad controls and quantization table of pac7311.


Patch adapted from a gspca v1 patch by Thomas Kaiser.

Priority: high

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


---

 linux/drivers/media/video/gspca/pac7311.c |   31 --
 1 file changed, 17 insertions(+), 14 deletions(-)

diff -r c18ab496c00f -r 122c84cc5724 linux/drivers/media/video/gspca/pac7311.c
--- a/linux/drivers/media/video/gspca/pac7311.c Mon Aug 18 11:45:13 2008 +0200
+++ b/linux/drivers/media/video/gspca/pac7311.c Mon Aug 18 19:40:11 2008 +0200
@@ -42,6 +42,7 @@ struct sd {
unsigned char autogain;
__u8 hflip;
__u8 vflip;
+   __u8 qindex;
 
char tosof; /* number of bytes before next start of frame */
signed char ag_cnt;
@@ -462,6 +463,9 @@ static int sd_config(struct gspca_dev *g
sd-contrast = CONTRAST_DEF;
sd-colors = COLOR_DEF;
sd-autogain = AUTOGAIN_DEF;
+   sd-hflip = HFLIP_DEF;
+   sd-vflip = VFLIP_DEF;
+   sd-qindex = 3;
sd-ag_cnt = -1;
return 0;
 }
@@ -505,6 +509,7 @@ static void setbrightness(struct gspca_d
 /*jfm: inverted?*/
brightness = BRIGHTNESS_MAX - sd-brightness;
reg_w(gspca_dev, 0xff, 0x04);
+   reg_w(gspca_dev, 0x0e, 0x00);
reg_w(gspca_dev, 0x0f, brightness);
/* load registers to sensor (Bit 0, auto clear) */
reg_w(gspca_dev, 0x11, 0x01);
@@ -520,7 +525,7 @@ static void setcontrast(struct gspca_dev
return;
}
reg_w(gspca_dev, 0xff, 0x01);
-   reg_w(gspca_dev, 0x80, sd-contrast);
+   reg_w(gspca_dev, 0x10, sd-contrast);
/* load registers to sensor (Bit 0, auto clear) */
reg_w(gspca_dev, 0x11, 0x01);
 }
@@ -549,7 +554,7 @@ static void setcolors(struct gspca_dev *
return;
}
reg_w(gspca_dev, 0xff, 0x01);
-   reg_w(gspca_dev, 0x10, sd-colors);
+   reg_w(gspca_dev, 0x80, sd-colors);
/* load registers to sensor (Bit 0, auto clear) */
reg_w(gspca_dev, 0x11, 0x01);
PDEBUG(D_CONF|D_STREAM, color: %i, sd-colors);
@@ -583,7 +588,7 @@ static void sethvflip(struct gspca_dev *
 /* this function is called at open time */
 static int sd_open(struct gspca_dev *gspca_dev)
 {
-   reg_w(gspca_dev, 0x78, 0x00);   /* Turn on LED */
+   reg_w(gspca_dev, 0x78, 0x44);   /* Turn on LED */
return 0;
 }
 
@@ -612,27 +617,24 @@ static void sd_start(struct gspca_dev *g
reg_w(gspca_dev, 0x08, 0x09);
reg_w(gspca_dev, 0x17, 0x20);
reg_w(gspca_dev, 0x1b, 0x00);
-/* reg_w(gspca_dev, 0x80, 0x69); */
reg_w(gspca_dev, 0x87, 0x10);
break;
case 1: /* 320x240 pac7311 */
reg_w(gspca_dev, 0xff, 0x04);
-   reg_w(gspca_dev, 0x02, 0x03);
+   reg_w(gspca_dev, 0x02, 0x07);
reg_w(gspca_dev, 0xff, 0x01);
reg_w(gspca_dev, 0x08, 0x09);
reg_w(gspca_dev, 0x17, 0x30);
-/* reg_w(gspca_dev, 0x80, 0x3f); */
reg_w(gspca_dev, 0x87, 0x11);
break;
case 0: /* 640x480 */
if (sd-sensor == SENSOR_PAC7302)
break;
reg_w(gspca_dev, 0xff, 0x04);
-   reg_w(gspca_dev, 0x02, 0x03);
+   reg_w(gspca_dev, 0x02, 0x07);
reg_w(gspca_dev, 0xff, 0x01);
reg_w(gspca_dev, 0x08, 0x08);
reg_w(gspca_dev, 0x17, 0x00);
-/* reg_w(gspca_dev, 0x80, 0x1c); */
reg_w(gspca_dev, 0x87, 0x12);
break;
}
@@ -645,8 +647,8 @@ static void sd_start(struct gspca_dev *g
reg_w(gspca_dev, 0xff, 0x01);
reg_w(gspca_dev, 0x78, 0x01);
} else {
-   reg_w(gspca_dev, 0x78, 0x04);
-   reg_w(gspca_dev, 0x78, 0x05);
+   reg_w(gspca_dev, 0x78, 0x44);
+   reg_w(gspca_dev, 0x78, 0x45);
}
 }
 
@@ -666,7 +668,7 @@ static void sd_stopN(struct gspca_dev *g
reg_w(gspca_dev, 0x2a, 0x0e);
reg_w(gspca_dev, 0xff, 0x01);
reg_w(gspca_dev, 0x3e, 0x20);
-   reg_w(gspca_dev, 0x78, 0x04); /* Bit_0=start stream, Bit_7=LED */
+   reg_w(gspca_dev, 0x78, 0x44); /* Bit_0=start stream, Bit_7=LED */
reg_w(gspca_dev, 0x78, 0x44); /* Bit_0=start stream, Bit_7=LED */

[linuxtv-commits] [hg:v4l-dvb] gspca: Bad start of sonixj webcams since changeset a8779025e7e8.

2008-08-22 Thread Patch from Jean-Francois Moine
The patch number 8712 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: Jean-Francois Moine  [EMAIL PROTECTED]
gspca: Bad start of sonixj webcams since changeset a8779025e7e8.


Priority: high

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


---

 linux/drivers/media/video/gspca/sonixj.c |6 ++
 1 file changed, 2 insertions(+), 4 deletions(-)

diff -r 122c84cc5724 -r 91dbe202b646 linux/drivers/media/video/gspca/sonixj.c
--- a/linux/drivers/media/video/gspca/sonixj.c  Mon Aug 18 19:40:11 2008 +0200
+++ b/linux/drivers/media/video/gspca/sonixj.c  Tue Aug 19 11:31:08 2008 +0200
@@ -59,7 +59,6 @@ struct sd {
 #define SENSOR_OV7648 5
 #define SENSOR_OV7660 6
unsigned char i2c_base;
-   __u8 regf1;
 };
 
 /* V4L2 controls supported by the driver */
@@ -959,7 +958,6 @@ static int sd_config(struct gspca_dev *g
sd-bridge = id-driver_info  16;
sd-sensor = id-driver_info  8;
sd-i2c_base = id-driver_info;
-   sd-regf1 = 0;  /*jfm: was 1 in v1*/
 
sd-qindex = 4; /* set the quantization table */
sd-brightness = BRIGHTNESS_DEF;
@@ -1012,7 +1010,7 @@ static int sd_open(struct gspca_dev *gsp
break;
}
 
-   reg_w1(gspca_dev, 0xf1, sd-regf1);
+   reg_w1(gspca_dev, 0xf1, 0x01);
 
 #if 1 /*jfm: from win trace*/
return 0;
@@ -1401,7 +1399,7 @@ static void sd_stopN(struct gspca_dev *g
reg_w1(gspca_dev, 0x17, sn9c1xx[0x17]);
reg_w1(gspca_dev, 0x01, sn9c1xx[1]);
reg_w1(gspca_dev, 0x01, data);
-   reg_w1(gspca_dev, 0xf1, sd-regf1);
+   reg_w1(gspca_dev, 0xf1, 0x00);
 }
 
 static void sd_stop0(struct gspca_dev *gspca_dev)


---

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

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


[linuxtv-commits] [hg:v4l-dvb] gspca: Change the name of some webcam in the gspca doc.

2008-08-22 Thread Patch from Jean-Francois Moine
The patch number 8715 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: Jean-Francois Moine  [EMAIL PROTECTED]
gspca: Change the name of some webcam in the gspca doc.


Priority: normal

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


---

 linux/Documentation/video4linux/gspca.txt |   26 +++---
 1 file changed, 13 insertions(+), 13 deletions(-)

diff -r f800c71df243 -r e9931f509cef linux/Documentation/video4linux/gspca.txt
--- a/linux/Documentation/video4linux/gspca.txt Tue Aug 19 18:17:37 2008 +0200
+++ b/linux/Documentation/video4linux/gspca.txt Wed Aug 20 15:39:38 2008 +0200
@@ -88,14 +88,14 @@ zc3xx   0471:0326   Philips SPC 300 NC
 zc3xx  0471:0326   Philips SPC 300 NC
 sonixj 0471:0327   Philips SPC 600 NC
 sonixj 0471:0328   Philips SPC 700 NC
-zc3xx  0471:032d   Philips spc210nc
-zc3xx  0471:032e   Philips spc315nc
-sonixj 0471:0330   Philips SPC 710NC
+zc3xx  0471:032d   Philips SPC 210 NC
+zc3xx  0471:032e   Philips SPC 315 NC
+sonixj 0471:0330   Philips SPC 710 NC
 spca5010497:c001   Smile International
 sunplus04a5:3003   Benq DC 1300
 sunplus04a5:3008   Benq DC 1500
-sunplus04a5:300a   Benq DC3410
-spca50004a5:300c   Benq DC1016
+sunplus04a5:300a   Benq DC 3410
+spca50004a5:300c   Benq DC 1016
 sunplus04f1:1001   JVC GC A50
 spca56104fc:0561   Flexcam 100
 sunplus04fc:500c   Sunplus CA500C
@@ -175,18 +175,18 @@ tv85320923:010f   ICM532 cams
 tv8532 0923:010f   ICM532 cams
 mars   093a:050f   Mars-Semi Pc-Camera
 pac207 093a:2460   PAC207 Qtec Webcam 100
-pac207 093a:2463   Philips spc200nc pac207
+pac207 093a:2463   Philips SPC 220 NC
 pac207 093a:2464   Labtec Webcam 1200
 pac207 093a:2468   PAC207
 pac207 093a:2470   Genius GF112
-pac207 093a:2471   PAC207 Genius VideoCam ge111
-pac207 093a:2472   PAC207 Genius VideoCam ge110
+pac207 093a:2471   Genius VideoCam ge111
+pac207 093a:2472   Genius VideoCam ge110
 pac7311093a:2600   PAC7311 Typhoon
-pac7311093a:2601   PAC7311 Phillips SPC610NC
+pac7311093a:2601   Philips SPC 610 NC
 pac7311093a:2603   PAC7312
-pac7311093a:2608   PAC7311 Trust WB-3300p
-pac7311093a:260e   PAC7311 Gigaware VGA PC Camera, Trust 
WB-3350p, SIGMA cam 2350
-pac7311093a:260f   PAC7311 SnakeCam
+pac7311093a:2608   Trust WB-3300p
+pac7311093a:260e   Gigaware VGA PC Camera, Trust WB-3350p, 
SIGMA cam 2350
+pac7311093a:260f   SnakeCam
 pac7311093a:2621   PAC731x
 zc3xx  0ac8:0302   Z-star Vimicro zc0302
 vc032x 0ac8:0321   Vimicro generic vc0321
@@ -235,7 +235,7 @@ spca561 10fd:7e50   FlyCam Usb 100
 spca56110fd:7e50   FlyCam Usb 100
 zc3xx  10fd:8050   Typhoon Webshot II USB 300k
 spca5011776:501c   Arowana 300K CMOS Camera
-t613   17a1:0128   T613/TAS5130A
+t613   17a1:0128   TASCORP JPEG Webcam, NGS Cyclops
 vc032x 17ef:4802   Lenovo Vc0323+MI1310_SOC
 pac207 2001:f115   D-Link DSB-C120
 spca5002899:012c   Toptro Industrial


---

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

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


[linuxtv-commits] [hg:v4l-dvb] gspca: Bad start of sn9c110 and sensor ov7630.

2008-08-22 Thread Patch from Jean-Francois Moine
The patch number 8716 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: Jean-Francois Moine  [EMAIL PROTECTED]
gspca: Bad start of sn9c110 and sensor ov7630.


Priority: high

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


---

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

diff -r e9931f509cef -r d397f6d6d973 linux/drivers/media/video/gspca/sonixj.c
--- a/linux/drivers/media/video/gspca/sonixj.c  Wed Aug 20 15:39:38 2008 +0200
+++ b/linux/drivers/media/video/gspca/sonixj.c  Thu Aug 21 09:00:48 2008 +0200
@@ -1297,7 +1297,7 @@ static void sd_start(struct gspca_dev *g
case SENSOR_OV7630:
ov7630_InitSensor(gspca_dev);
reg17 = 0xe2;
-   reg1 = 0x40;
+   reg1 = 0x44;
break;
case SENSOR_OV7648:
ov7648_InitSensor(gspca_dev);


---

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

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


[linuxtv-commits] [hg:v4l-dvb] gspca: Have VIDIOC_QUERYCTRL more compliant to the spec.

2008-08-22 Thread Patch from Jean-Francois Moine
The patch number 8719 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: Jean-Francois Moine  [EMAIL PROTECTED]
gspca: Have VIDIOC_QUERYCTRL more compliant to the spec.


- return -EINVAL when control not supported.
- start the private controls at V4L2_CID_PRIVATE_BASE.

Priority: normal

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


---

 linux/drivers/media/video/gspca/gspca.c |5 -
 linux/drivers/media/video/gspca/t613.c  |2 +-
 2 files changed, 1 insertion(+), 6 deletions(-)

diff -r 6dabcd798cd2 -r fa8b5750b2bd linux/drivers/media/video/gspca/gspca.c
--- a/linux/drivers/media/video/gspca/gspca.c   Thu Aug 21 16:25:31 2008 +0200
+++ b/linux/drivers/media/video/gspca/gspca.c   Thu Aug 21 19:11:16 2008 +0200
@@ -890,11 +890,6 @@ static int vidioc_queryctrl(struct file 
sizeof *q_ctrl);
return 0;
}
-   }
-   if (id = V4L2_CID_BASE
-id = V4L2_CID_LASTP1) {
-   q_ctrl-flags |= V4L2_CTRL_FLAG_DISABLED;
-   return 0;
}
return -EINVAL;
 }
diff -r 6dabcd798cd2 -r fa8b5750b2bd linux/drivers/media/video/gspca/t613.c
--- a/linux/drivers/media/video/gspca/t613.cThu Aug 21 16:25:31 2008 +0200
+++ b/linux/drivers/media/video/gspca/t613.cThu Aug 21 19:11:16 2008 +0200
@@ -30,7 +30,7 @@
 
 #define MAX_GAMMA 0x10 /* 0 to 15 */
 
-#define V4L2_CID_EFFECTS (V4L2_CID_PRIVATE_BASE + 3)
+#define V4L2_CID_EFFECTS (V4L2_CID_PRIVATE_BASE + 0)
 
 MODULE_AUTHOR(Leandro Costantino [EMAIL PROTECTED]);
 MODULE_DESCRIPTION(GSPCA/T613 (JPEG Compliance) USB Camera Driver);


---

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

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


[linuxtv-commits] [hg:v4l-dvb] gspca: suspend/resume added.

2008-08-22 Thread Patch from Jean-Francois Moine
The patch number 8718 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: Jean-Francois Moine  [EMAIL PROTECTED]
gspca: suspend/resume added.


Priority: high

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


---

 linux/drivers/media/video/gspca/conex.c   |4 ++
 linux/drivers/media/video/gspca/etoms.c   |4 ++
 linux/drivers/media/video/gspca/gspca.c   |   30 +-
 linux/drivers/media/video/gspca/gspca.h   |7 +
 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 |4 ++
 linux/drivers/media/video/gspca/sonixb.c  |4 ++
 linux/drivers/media/video/gspca/sonixj.c  |4 ++
 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 |4 ++
 linux/drivers/media/video/gspca/stk014.c  |4 ++
 linux/drivers/media/video/gspca/sunplus.c |4 ++
 linux/drivers/media/video/gspca/t613.c|4 ++
 linux/drivers/media/video/gspca/tv8532.c  |4 ++
 linux/drivers/media/video/gspca/vc032x.c  |4 ++
 linux/drivers/media/video/gspca/zc3xx.c   |4 ++
 22 files changed, 116 insertions(+), 1 deletion(-)

diff -r c320f01f5964 -r 6dabcd798cd2 linux/drivers/media/video/gspca/conex.c
--- a/linux/drivers/media/video/gspca/conex.c   Thu Aug 21 09:16:41 2008 +0200
+++ b/linux/drivers/media/video/gspca/conex.c   Thu Aug 21 16:25:31 2008 +0200
@@ -1026,6 +1026,10 @@ static struct usb_driver sd_driver = {
.id_table = device_table,
.probe = sd_probe,
.disconnect = gspca_disconnect,
+#ifdef CONFIG_PM
+   .suspend = gspca_suspend,
+   .resume = gspca_resume,
+#endif
 };
 
 /* -- module insert / remove -- */
diff -r c320f01f5964 -r 6dabcd798cd2 linux/drivers/media/video/gspca/etoms.c
--- a/linux/drivers/media/video/gspca/etoms.c   Thu Aug 21 09:16:41 2008 +0200
+++ b/linux/drivers/media/video/gspca/etoms.c   Thu Aug 21 16:25:31 2008 +0200
@@ -932,6 +932,10 @@ static struct usb_driver sd_driver = {
.id_table = device_table,
.probe = sd_probe,
.disconnect = gspca_disconnect,
+#ifdef CONFIG_PM
+   .suspend = gspca_suspend,
+   .resume = gspca_resume,
+#endif
 };
 
 /* -- module insert / remove -- */
diff -r c320f01f5964 -r 6dabcd798cd2 linux/drivers/media/video/gspca/gspca.c
--- a/linux/drivers/media/video/gspca/gspca.c   Thu Aug 21 09:16:41 2008 +0200
+++ b/linux/drivers/media/video/gspca/gspca.c   Thu Aug 21 16:25:31 2008 +0200
@@ -118,7 +118,8 @@ static void fill_frame(struct gspca_dev 
cam_pkt_op pkt_scan;
 
if (urb-status != 0) {
-   PDEBUG(D_ERR|D_PACK, urb status: %d, urb-status);
+   if (!gspca_dev-frozen)
+   PDEBUG(D_ERR|D_PACK, urb status: %d, urb-status);
return; /* disconnection ? */
}
pkt_scan = gspca_dev-sd_desc-pkt_scan;
@@ -1815,6 +1816,33 @@ void gspca_disconnect(struct usb_interfa
 }
 EXPORT_SYMBOL(gspca_disconnect);
 
+#ifdef CONFIG_PM
+int gspca_suspend(struct usb_interface *intf, pm_message_t message)
+{
+   struct gspca_dev *gspca_dev = usb_get_intfdata(intf);
+
+   if (!gspca_dev-streaming)
+   return 0;
+   gspca_dev-frozen = 1;  /* avoid urb error messages */
+   gspca_dev-sd_desc-stopN(gspca_dev);
+   destroy_urbs(gspca_dev);
+   gspca_set_alt0(gspca_dev);
+   gspca_dev-sd_desc-stop0(gspca_dev);
+   return 0;
+}
+EXPORT_SYMBOL(gspca_suspend);
+
+int gspca_resume(struct usb_interface *intf)
+{
+   struct gspca_dev *gspca_dev = usb_get_intfdata(intf);
+
+   gspca_dev-frozen = 0;
+   if (!gspca_dev-streaming)
+   return 0;
+   return gspca_init_transfer(gspca_dev);
+}
+EXPORT_SYMBOL(gspca_resume);
+#endif
 /* -- cam driver utility functions -- */
 
 /* auto gain and exposure algorithm based on the knee algorithm described here:
diff -r c320f01f5964 -r 6dabcd798cd2 linux/drivers/media/video/gspca/gspca.h
--- a/linux/drivers/media/video/gspca/gspca.h   Thu Aug 21 09:16:41 2008 +0200
+++ b/linux/drivers/media/video/gspca/gspca.h   Thu Aug 21 16:25:31 2008 +0200
@@ -154,6 +154,9 @@ struct gspca_dev {
struct mutex queue_lock;/* ISOC queue protection */
__u32 sequence; /* frame sequence number */
char streaming;
+#ifdef 

[linuxtv-commits] [hg:v4l-dvb] gspca: Bad start of sn9c110 and sensor om6802.

2008-08-22 Thread Patch from Jean-Francois Moine
The patch number 8714 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: Jean-Francois Moine  [EMAIL PROTECTED]
gspca: Bad start of sn9c110 and sensor om6802.


Priority: high

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


---

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

diff -r 57535fa8aaff -r f800c71df243 linux/drivers/media/video/gspca/sonixj.c
--- a/linux/drivers/media/video/gspca/sonixj.c  Tue Aug 19 12:25:03 2008 +0200
+++ b/linux/drivers/media/video/gspca/sonixj.c  Tue Aug 19 18:17:37 2008 +0200
@@ -813,7 +813,7 @@ static int configure_gpio(struct gspca_d
 
switch (sd-sensor) {
case SENSOR_OM6802:
-   reg_w1(gspca_dev, 0x02, 0x73);  /* was 71 */
+   reg_w1(gspca_dev, 0x02, 0x71);
reg_w1(gspca_dev, 0x01, 0x42);
reg_w1(gspca_dev, 0x17, 0x64);
reg_w1(gspca_dev, 0x01, 0x42);


---

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

___
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] sms1xxx: fix typo in license header

2008-08-22 Thread Patch from Michael Krufky
The patch number 8722 was added via Michael Krufky [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: Michael Krufky  [EMAIL PROTECTED]
sms1xxx: fix typo in license header


This should have read, GNU General Public License version 2
rather than, GNU General Public License version 3

This was actually a typo mass-blunder -- this is not a change in licence,
as the code was always GPLv2.

Priority: high

Signed-off-by: Uri Shkolnik [EMAIL PROTECTED]
Signed-off-by: Michael Krufky [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 3c3beb36d599 -r 3772f47a6774 linux/drivers/media/dvb/siano/sms-cards.c
--- a/linux/drivers/media/dvb/siano/sms-cards.c Sat Jul 26 05:47:42 2008 -0300
+++ b/linux/drivers/media/dvb/siano/sms-cards.c Thu Aug 21 21:37:10 2008 -0400
@@ -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 3c3beb36d599 -r 3772f47a6774 linux/drivers/media/dvb/siano/sms-cards.h
--- a/linux/drivers/media/dvb/siano/sms-cards.h Sat Jul 26 05:47:42 2008 -0300
+++ b/linux/drivers/media/dvb/siano/sms-cards.h Thu Aug 21 21:37:10 2008 -0400
@@ -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 3c3beb36d599 -r 3772f47a6774 linux/drivers/media/dvb/siano/smscoreapi.c
--- a/linux/drivers/media/dvb/siano/smscoreapi.cSat Jul 26 05:47:42 
2008 -0300
+++ b/linux/drivers/media/dvb/siano/smscoreapi.cThu Aug 21 21:37:10 
2008 -0400
@@ -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 3c3beb36d599 -r 3772f47a6774 linux/drivers/media/dvb/siano/smscoreapi.h
--- a/linux/drivers/media/dvb/siano/smscoreapi.hSat Jul 26 05:47:42 
2008 -0300
+++ b/linux/drivers/media/dvb/siano/smscoreapi.hThu Aug 21 21:37:10 
2008 -0400
@@ -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 3c3beb36d599 -r 3772f47a6774 linux/drivers/media/dvb/siano/smsdvb.c
--- a/linux/drivers/media/dvb/siano/smsdvb.cSat Jul 26 05:47:42 2008 -0300
+++ b/linux/drivers/media/dvb/siano/smsdvb.cThu Aug 21 21:37:10 2008 -0400
@@ -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 3c3beb36d599 -r 3772f47a6774 linux/drivers/media/dvb/siano/smsusb.c
--- a/linux/drivers/media/dvb/siano/smsusb.cSat Jul 26 05:47:42 2008 -0300
+++ b/linux/drivers/media/dvb/siano/smsusb.cThu Aug 21 21:37:10 2008 -0400
@@ -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 

[linuxtv-commits] [hg:v4l-dvb] dvb: drx397xD: checkpatch.pl cleanups

2008-08-22 Thread Patch from Felipe Balbi
The patch number 8724 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: Felipe Balbi  [EMAIL PROTECTED]
dvb: drx397xD: checkpatch.pl cleanups


This driver sure needs some rework. For now, let's
try to clean it up a bit before start reimplementing
anything.

checkpatch.pl still not happy with this driver after
this patch, but the most annoying errors are gone,
comments now use C-style only, labels are well placed
and some other minor fixes.

Some more clean up patches will come as I work on this
driver. Please review it carefully.

Priority: normal

Cc: Mauro Carvalho Chehab [EMAIL PROTECTED]
Cc: Henk Vergonet [EMAIL PROTECTED]
Signed-off-by: Felipe Balbi [EMAIL PROTECTED]
[EMAIL PROTECTED]: Manually fixed some conflicts with a previous patch]
Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 linux/drivers/media/dvb/frontends/drx397xD.c |  258 ++-
 1 file changed, 137 insertions(+), 121 deletions(-)

diff -r 379113ef4d27 -r 71046dfb0853 
linux/drivers/media/dvb/frontends/drx397xD.c
--- a/linux/drivers/media/dvb/frontends/drx397xD.c  Fri Aug 22 10:34:29 
2008 -0300
+++ b/linux/drivers/media/dvb/frontends/drx397xD.c  Wed Aug 20 02:40:30 
2008 +0300
@@ -39,35 +39,32 @@ static const char mod_name[] = drx397xD
 #define F_SET_0D0h 1
 #define F_SET_0D4h 2
 
-typedef enum fw_ix {
+enum fw_ix {
 #define _FW_ENTRY(a, b)b
 #include drx397xD_fw.h
-} fw_ix_t;
+};
 
 /* chip specifics */
 struct drx397xD_state {
struct i2c_adapter *i2c;
struct dvb_frontend frontend;
struct drx397xD_config config;
-   fw_ix_t chip_rev;
+   enum fw_ix chip_rev;
int flags;
u32 bandwidth_parm; /* internal bandwidth conversions */
u32 f_osc;  /* w90: actual osc frequency [Hz] */
 };
 
-/***
- * Firmware
- 
**/
-
+/* Firmware */
 static const char *blob_name[] = {
 #define _BLOB_ENTRY(a, b)  a
 #include drx397xD_fw.h
 };
 
-typedef enum blob_ix {
+enum blob_ix {
 #define _BLOB_ENTRY(a, b)  b
 #include drx397xD_fw.h
-} blob_ix_t;
+};
 
 static struct {
const char *name;
@@ -86,7 +83,7 @@ static struct {
 };
 
 /* use only with writer lock aquired */
-static void _drx_release_fw(struct drx397xD_state *s, fw_ix_t ix)
+static void _drx_release_fw(struct drx397xD_state *s, enum fw_ix ix)
 {
memset(fw[ix].data[0], 0, sizeof(fw[0].data));
if (fw[ix].file)
@@ -95,7 +92,7 @@ static void _drx_release_fw(struct drx39
 
 static void drx_release_fw(struct drx397xD_state *s)
 {
-   fw_ix_t ix = s-chip_rev;
+   enum fw_ix ix = s-chip_rev;
 
pr_debug(%s\n, __func__);
 
@@ -108,7 +105,7 @@ static void drx_release_fw(struct drx397
write_unlock(fw[ix].lock);
 }
 
-static int drx_load_fw(struct drx397xD_state *s, fw_ix_t ix)
+static int drx_load_fw(struct drx397xD_state *s, enum fw_ix ix)
 {
const u8 *data;
size_t size, len;
@@ -176,26 +173,28 @@ static int drx_load_fw(struct drx397xD_s
goto exit_corrupt;
}
} while (i  size);
-  exit_corrupt:
+
+exit_corrupt:
printk(KERN_ERR %s: Firmware is corrupt\n, mod_name);
-  exit_err:
+exit_err:
_drx_release_fw(s, ix);
fw[ix].refcnt--;
-  exit_ok:
+exit_ok:
fw[ix].refcnt++;
write_unlock(fw[ix].lock);
+
return rc;
 }
 
-/***
- * i2c bus IO
- 
**/
-
-static int write_fw(struct drx397xD_state *s, blob_ix_t ix)
-{
-   struct i2c_msg msg = {.addr = s-config.demod_address,.flags = 0 };
+/* i2c bus IO */
+static int write_fw(struct drx397xD_state *s, enum blob_ix ix)
+{
const u8 *data;
int len, rc = 0, i = 0;
+   struct i2c_msg msg = {
+   .addr = s-config.demod_address,
+   .flags = 0
+   };
 
if (ix  0 || ix = ARRAY_SIZE(blob_name)) {
pr_debug(%s drx_fw_ix_t out of range\n, __func__);
@@ -230,8 +229,9 @@ static int write_fw(struct drx397xD_stat
goto exit_rc;
}
}
-  exit_rc:
+exit_rc:
read_unlock(fw[s-chip_rev].lock);
+
return 0;
 }
 
@@ -243,17 +243,16 @@ static int _read16(struct drx397xD_state
u16 v;
struct i2c_msg msg[2] = {
{
-.addr = 

[linuxtv-commits] [hg:v4l-dvb] 1-make-pms-not-autoprobe-when-builtin update

2008-08-22 Thread Patch from Rene Herman
The patch number 8728 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: Rene Herman  [EMAIL PROTECTED]
1-make-pms-not-autoprobe-when-builtin update


On 10-08-08 23:37, Alan Cox wrote:

 Would probably make the printk pms: not enabled, use pms.enable=1 to
 probe

 So you know
 a) What is wittering about not being probed
 b) How to undo it.

 But thats trivia really.

Signed-off-by: Rene Herman [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

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

diff -r 9762a657a988 -r 1ab1128f04f5 linux/drivers/media/video/pms.c
--- a/linux/drivers/media/video/pms.c   Wed Aug 20 16:44:51 2008 -0700
+++ b/linux/drivers/media/video/pms.c   Wed Aug 20 16:44:52 2008 -0700
@@ -1031,7 +1031,8 @@ static int __init init_pms_cards(void)
 
 #ifndef MODULE
if (!enable) {
-   printk(KERN_INFO Not enabled\n);
+   printk(KERN_INFO PMS: not enabled, use pms.enable=1 to 
+probe\n);
return -ENODEV;
}
 #endif


---

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

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


[linuxtv-commits] [hg:v4l-dvb] link tuner before saa7134

2008-08-22 Thread Patch from Simon Arlott
The patch number 8726 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: Simon Arlott  [EMAIL PROTECTED]
link tuner before saa7134


If saa7134_init is run before v4l2_i2c_drv_init (tuner), then
saa7134_board_init2 will try to set the tuner type for devices that don't
exist yet.  This moves tuner to before all of the device-specific drivers
so that it's loaded early enough on boot.

Signed-off-by: Simon Arlott [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 linux/drivers/media/video/Makefile |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff -r 795b26154d97 -r a3aff4d28993 linux/drivers/media/video/Makefile
--- a/linux/drivers/media/video/MakefileWed Aug 20 16:44:50 2008 -0700
+++ b/linux/drivers/media/video/MakefileWed Aug 20 16:44:50 2008 -0700
@@ -19,6 +19,8 @@ ifeq ($(CONFIG_VIDEO_V4L1_COMPAT),y)
 ifeq ($(CONFIG_VIDEO_V4L1_COMPAT),y)
   obj-$(CONFIG_VIDEO_DEV) += v4l1-compat.o
 endif
+
+obj-$(CONFIG_VIDEO_TUNER) += tuner.o
 
 obj-$(CONFIG_VIDEO_BT848) += bt8xx/
 obj-$(CONFIG_VIDEO_IR_I2C)  += ir-kbd-i2c.o
@@ -84,8 +86,6 @@ obj-$(CONFIG_VIDEO_HEXIUM_ORION) += hexi
 obj-$(CONFIG_VIDEO_HEXIUM_ORION) += hexium_orion.o
 obj-$(CONFIG_VIDEO_HEXIUM_GEMINI) += hexium_gemini.o
 
-obj-$(CONFIG_VIDEO_TUNER) += tuner.o
-
 obj-$(CONFIG_VIDEOBUF_GEN) += videobuf-core.o
 obj-$(CONFIG_VIDEOBUF_DMA_SG) += videobuf-dma-sg.o
 obj-$(CONFIG_VIDEOBUF_DMA_CONTIG) += videobuf-dma-contig.o


---

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

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


[linuxtv-commits] [hg:v4l-dvb] V4L1: make PMS not autoprobe when builtin.

2008-08-22 Thread Patch from Rene Herman
The patch number 8727 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: Rene Herman  [EMAIL PROTECTED]
V4L1: make PMS not autoprobe when builtin.


The old Mediavision Pro Movie Studio legacy ISA V4L1 driver was found to
hang the boot during Ingo Molnar's testing of randconfig kernels.  Have it
require a pms.enable=1 kernel parameter to enable the driver when
builtin which avoids such problems.

This is a deprecated and, very likely, unused driver.  Nothing changes
modular behaviour moreover.

Signed-off-by: Rene Herman [EMAIL PROTECTED]
Acked-by: Alan Cox [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 linux/drivers/media/video/pms.c |   12 
 1 file changed, 12 insertions(+)

diff -r a3aff4d28993 -r 9762a657a988 linux/drivers/media/video/pms.c
--- a/linux/drivers/media/video/pms.c   Wed Aug 20 16:44:50 2008 -0700
+++ b/linux/drivers/media/video/pms.c   Wed Aug 20 16:44:51 2008 -0700
@@ -1020,9 +1020,21 @@ static int init_mediavision(void)
  * Initialization and module stuff
  */
 
+#ifndef MODULE
+static int enable;
+module_param(enable, int, 0);
+#endif
+
 static int __init init_pms_cards(void)
 {
printk(KERN_INFO Mediavision Pro Movie Studio driver 0.02\n);
+
+#ifndef MODULE
+   if (!enable) {
+   printk(KERN_INFO Not enabled\n);
+   return -ENODEV;
+   }
+#endif
 
data_port = io_port +1;
 


---

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

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


[linuxtv-commits] [hg:v4l-dvb] drx397xD.c sparse annotations

2008-08-22 Thread Patch from Harvey Harrison
The patch number 8725 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: Harvey Harrison  [EMAIL PROTECTED]
drx397xD.c sparse annotations


Signed-off-by: Harvey Harrison [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 linux/drivers/media/dvb/frontends/drx397xD.c |   14 +++---
 linux/drivers/media/dvb/frontends/drx397xD.h |4 ++--
 2 files changed, 9 insertions(+), 9 deletions(-)

diff -r 71046dfb0853 -r 795b26154d97 
linux/drivers/media/dvb/frontends/drx397xD.c
--- a/linux/drivers/media/dvb/frontends/drx397xD.c  Wed Aug 20 02:40:30 
2008 +0300
+++ b/linux/drivers/media/dvb/frontends/drx397xD.c  Wed Aug 20 16:44:50 
2008 -0700
@@ -236,11 +236,11 @@ exit_rc:
 }
 
 /* Function is not endian safe, use the RD16 wrapper below */
-static int _read16(struct drx397xD_state *s, u32 i2c_adr)
+static int _read16(struct drx397xD_state *s, __le32 i2c_adr)
 {
int rc;
u8 a[4];
-   u16 v;
+   __le16 v;
struct i2c_msg msg[2] = {
{
.addr = s-config.demod_address,
@@ -250,12 +250,12 @@ static int _read16(struct drx397xD_state
}, {
.addr = s-config.demod_address,
.flags = I2C_M_RD,
-   .buf = (u8 *) v,
+   .buf = (u8 *)v,
.len = sizeof(v)
}
};
 
-   *(u32 *) a = i2c_adr;
+   *(__le32 *) a = i2c_adr;
 
rc = i2c_transfer(s-i2c, msg, 2);
if (rc != 2)
@@ -265,7 +265,7 @@ static int _read16(struct drx397xD_state
 }
 
 /* Function is not endian safe, use the WR16.. wrappers below */
-static int _write16(struct drx397xD_state *s, u32 i2c_adr, u16 val)
+static int _write16(struct drx397xD_state *s, __le32 i2c_adr, __le16 val)
 {
u8 a[6];
int rc;
@@ -276,8 +276,8 @@ static int _write16(struct drx397xD_stat
.len = sizeof(a)
};
 
-   *(u32 *) a = i2c_adr;
-   *(u16 *) a[4] = val;
+   *(__le32 *)a = i2c_adr;
+   *(__le16 *)a[4] = val;
 
rc = i2c_transfer(s-i2c, msg, 1);
if (rc != 1)
diff -r 71046dfb0853 -r 795b26154d97 
linux/drivers/media/dvb/frontends/drx397xD.h
--- a/linux/drivers/media/dvb/frontends/drx397xD.h  Wed Aug 20 02:40:30 
2008 +0300
+++ b/linux/drivers/media/dvb/frontends/drx397xD.h  Wed Aug 20 16:44:50 
2008 -0700
@@ -28,7 +28,7 @@
 #define DRX_F_OFFSET   3600
 
 #define I2C_ADR_C0(x) \
-(  (u32)cpu_to_le32( \
+(  cpu_to_le32( \
(u32)( \
(((u32)(x)  (u32)0x00ffUL)  ) | \
(((u32)(x)  (u32)0xff00UL)  16) | \
@@ -38,7 +38,7 @@
 )
 
 #define I2C_ADR_E0(x) \
-(  (u32)cpu_to_le32( \
+(  cpu_to_le32( \
(u32)( \
(((u32)(x)  (u32)0x00ffUL)  ) | \
(((u32)(x)  (u32)0xff00UL)  16) | \


---

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

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


[linuxtv-commits] [hg:v4l-dvb] Use DIV_ROUND_UP

2008-08-22 Thread Patch from Julia Lawall
The patch number 8729 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: Julia Lawall  [EMAIL PROTECTED]
Use DIV_ROUND_UP


The kernel.h macro DIV_ROUND_UP performs the computation (((n) + (d) - 1) /
(d)) but is perhaps more readable.

An extract of the semantic patch that makes this change is as follows:
(http://www.emn.fr/x-info/coccinelle/)

// smpl
@haskernel@
@@


@depends on haskernel@
expression n,d;
@@

(
- (n + d - 1) / d
+ DIV_ROUND_UP(n,d)
|
- (n + (d - 1)) / d
+ DIV_ROUND_UP(n,d)
)

@depends on haskernel@
expression n,d;
@@

- DIV_ROUND_UP((n),d)
+ DIV_ROUND_UP(n,d)

@depends on haskernel@
expression n,d;
@@

- DIV_ROUND_UP(n,(d))
+ DIV_ROUND_UP(n,d)
// /smpl

Signed-off-by: Julia Lawall [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 linux/drivers/media/video/bw-qcam.c   |4 ++--
 linux/drivers/media/video/uvc/uvc_video.c |2 +-
 linux/drivers/media/video/zoran_device.c  |4 ++--
 3 files changed, 5 insertions(+), 5 deletions(-)

diff -r 1ab1128f04f5 -r 8e25a33f8d63 linux/drivers/media/video/bw-qcam.c
--- a/linux/drivers/media/video/bw-qcam.c   Wed Aug 20 16:44:52 2008 -0700
+++ b/linux/drivers/media/video/bw-qcam.c   Wed Aug 20 16:44:53 2008 -0700
@@ -496,7 +496,7 @@ static void qc_set(struct qcam_device *q
val2 = (((q-port_mode  QC_MODE_MASK) == QC_BIDIR) ? 24 : 8) *
q-transfer_scale;
}
-   val = (val + val2 - 1) / val2;
+   val = DIV_ROUND_UP(val, val2);
qc_command(q, 0x13);
qc_command(q, val);
 
@@ -652,7 +652,7 @@ static long qc_capture(struct qcam_devic
transperline = q-width * q-bpp;
divisor = (((q-port_mode  QC_MODE_MASK) == QC_BIDIR) ? 24 : 8) *
q-transfer_scale;
-   transperline = (transperline + divisor - 1) / divisor;
+   transperline = DIV_ROUND_UP(transperline, divisor);
 
for (i = 0, yield = yieldlines; i  linestotrans; i++)
{
diff -r 1ab1128f04f5 -r 8e25a33f8d63 linux/drivers/media/video/uvc/uvc_video.c
--- a/linux/drivers/media/video/uvc/uvc_video.c Wed Aug 20 16:44:52 2008 -0700
+++ b/linux/drivers/media/video/uvc/uvc_video.c Wed Aug 20 16:44:53 2008 -0700
@@ -655,7 +655,7 @@ static int uvc_init_video_isoc(struct uv
if (size  UVC_MAX_FRAME_SIZE)
return -EINVAL;
 
-   npackets = (size + psize - 1) / psize;
+   npackets = DIV_ROUND_UP(size, psize);
if (npackets  UVC_MAX_ISO_PACKETS)
npackets = UVC_MAX_ISO_PACKETS;
 
diff -r 1ab1128f04f5 -r 8e25a33f8d63 linux/drivers/media/video/zoran_device.c
--- a/linux/drivers/media/video/zoran_device.c  Wed Aug 20 16:44:52 2008 -0700
+++ b/linux/drivers/media/video/zoran_device.c  Wed Aug 20 16:44:53 2008 -0700
@@ -378,7 +378,7 @@ zr36057_set_vfe (struct zoran   
 
/* horizontal */
VidWinWid = video_width;
-   X = (VidWinWid * 64 + tvn-Wa - 1) / tvn-Wa;
+   X = DIV_ROUND_UP(VidWinWid * 64, tvn-Wa);
We = (VidWinWid * 64) / X;
HorDcm = 64 - X;
hcrop1 = 2 * ((tvn-Wa - We) / 4);
@@ -404,7 +404,7 @@ zr36057_set_vfe (struct zoran   
/* Vertical */
DispMode = !(video_height  BUZ_MAX_HEIGHT / 2);
VidWinHt = DispMode ? video_height : video_height / 2;
-   Y = (VidWinHt * 64 * 2 + tvn-Ha - 1) / tvn-Ha;
+   Y = DIV_ROUND_UP(VidWinHt * 64 * 2, tvn-Ha);
He = (VidWinHt * 64) / Y;
VerDcm = 64 - Y;
vcrop1 = (tvn-Ha / 2 - He) / 2;


---

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

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


[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] zr364xx: remove BKL

2008-08-22 Thread Patch from Antoine Jacquet
The patch number 8731 was added via Antoine Jacquet [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: Antoine Jacquet  [EMAIL PROTECTED]
zr364xx: remove BKL


Remove the Big Kernel Lock from zr364xx driver after pushdown.
Now using an internal locking mecanism on open().

Priority: normal

Signed-off-by: Antoine Jacquet [EMAIL PROTECTED]


---

 linux/drivers/media/video/zr364xx.c |   25 +++--
 1 file changed, 11 insertions(+), 14 deletions(-)

diff -r 405d3e926ffd -r 909abb7376f6 linux/drivers/media/video/zr364xx.c
--- a/linux/drivers/media/video/zr364xx.c   Sat Aug 09 09:21:15 2008 -0300
+++ b/linux/drivers/media/video/zr364xx.c   Mon Aug 18 22:09:53 2008 +0200
@@ -642,25 +642,23 @@ static int zr364xx_open(struct inode *in
 
DBG(zr364xx_open);
 
+   mutex_lock(cam-lock);
+
cam-skip = 2;
 
-   lock_kernel();
err = video_exclusive_open(inode, file);
-   if (err  0) {
-   unlock_kernel();
-   return err;
-   }
+   if (err  0)
+   goto out;
 
if (!cam-framebuf) {
cam-framebuf = vmalloc_32(MAX_FRAME_SIZE * FRAMES);
if (!cam-framebuf) {
info(vmalloc_32 failed!);
-   unlock_kernel();
-   return -ENOMEM;
+   err = -ENOMEM;
+   goto out;
}
}
 
-   mutex_lock(cam-lock);
for (i = 0; init[cam-method][i].size != -1; i++) {
err =
send_control_msg(udev, 1, init[cam-method][i].value,
@@ -668,9 +666,7 @@ static int zr364xx_open(struct inode *in
 init[cam-method][i].size);
if (err  0) {
info(error during open sequence: %d, i);
-   mutex_unlock(cam-lock);
-   unlock_kernel();
-   return err;
+   goto out;
}
}
 
@@ -680,10 +676,11 @@ static int zr364xx_open(struct inode *in
 * like Ekiga does during its startup, can crash the webcam
 */
mdelay(100);
-
+   err = 0;
+
+out:
mutex_unlock(cam-lock);
-   unlock_kernel();
-   return 0;
+   return err;
 }
 
 


---

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

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


[linuxtv-commits] [hg:v4l-dvb] zr364xx: handle video exclusive open internaly

2008-08-22 Thread Patch from Antoine Jacquet
The patch number 8732 was added via Antoine Jacquet [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: Antoine Jacquet  [EMAIL PROTECTED]
zr364xx: handle video exclusive open internaly


Count the users and do not use video_exclusive_open() anymore.

Priority: normal

Signed-off-by: Antoine Jacquet [EMAIL PROTECTED]


---

 linux/drivers/media/video/zr364xx.c |   26 +++---
 1 file changed, 15 insertions(+), 11 deletions(-)

diff -r 909abb7376f6 -r d6f58085b1bc linux/drivers/media/video/zr364xx.c
--- a/linux/drivers/media/video/zr364xx.c   Mon Aug 18 22:09:53 2008 +0200
+++ b/linux/drivers/media/video/zr364xx.c   Mon Aug 18 22:14:30 2008 +0200
@@ -117,6 +117,7 @@ struct zr364xx_camera {
int height;
int method;
struct mutex lock;
+   int users;
 };
 
 
@@ -644,11 +645,10 @@ static int zr364xx_open(struct inode *in
 
mutex_lock(cam-lock);
 
-   cam-skip = 2;
-
-   err = video_exclusive_open(inode, file);
-   if (err  0)
+   if (cam-users) {
+   err = -EBUSY;
goto out;
+   }
 
if (!cam-framebuf) {
cam-framebuf = vmalloc_32(MAX_FRAME_SIZE * FRAMES);
@@ -670,6 +670,8 @@ static int zr364xx_open(struct inode *in
}
}
 
+   cam-skip = 2;
+   cam-users++;
file-private_data = vdev;
 
/* Added some delay here, since opening/closing the camera quickly,
@@ -701,6 +703,10 @@ static int zr364xx_release(struct inode 
udev = cam-udev;
 
mutex_lock(cam-lock);
+
+   cam-users--;
+   file-private_data = NULL;
+
for (i = 0; i  2; i++) {
err =
send_control_msg(udev, 1, init[cam-method][i].value,
@@ -708,21 +714,19 @@ static int zr364xx_release(struct inode 
 init[cam-method][i].size);
if (err  0) {
info(error during release sequence);
-   mutex_unlock(cam-lock);
-   return err;
+   goto out;
}
}
-
-   file-private_data = NULL;
-   video_exclusive_release(inode, file);
 
/* Added some delay here, since opening/closing the camera quickly,
 * like Ekiga does during its startup, can crash the webcam
 */
mdelay(100);
-
+   err = 0;
+
+out:
mutex_unlock(cam-lock);
-   return 0;
+   return err;
 }
 
 


---

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

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


[linuxtv-commits] [hg:v4l-dvb] merge: v4l-dvb

2008-08-22 Thread Patch from Antoine Jacquet
The patch number 8733 was added via Antoine Jacquet [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: Antoine Jacquet  [EMAIL PROTECTED]
merge: v4l-dvb


Priority: normal

Signed-off-by: Antoine Jacquet [EMAIL PROTECTED]


---

 Makefile   |   13 
 linux/Documentation/video4linux/gspca.txt  |1 
 linux/drivers/media/dvb/dvb-usb/Kconfig|2 
 linux/drivers/media/dvb/dvb-usb/cxusb.c|  495 +++
 linux/drivers/media/dvb/dvb-usb/dvb-usb-ids.h  |3 
 linux/drivers/media/dvb/frontends/Kconfig  |7 
 linux/drivers/media/dvb/frontends/Makefile |1 
 linux/drivers/media/dvb/frontends/dib0070.h|8 
 linux/drivers/media/dvb/frontends/dib7000p.c   |3 
 linux/drivers/media/dvb/frontends/dib7000p.h   |   41 
 linux/drivers/media/dvb/frontends/lgs8gl5.c|  478 +++
 linux/drivers/media/dvb/frontends/lgs8gl5.h|   45 +
 linux/drivers/media/radio/Makefile |4 
 linux/drivers/media/radio/miropcm20-radio.c|  267 --
 linux/drivers/media/radio/miropcm20-rds-core.c |  212 -
 linux/drivers/media/radio/miropcm20-rds-core.h |   19 
 linux/drivers/media/radio/miropcm20-rds.c  |  140 ---
 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/drivers/media/video/ivtv/ivtv-driver.c   |2 
 linux/drivers/media/video/ivtv/ivtv-driver.h   |1 
 linux/drivers/media/video/ivtv/ivtv-irq.c  |   29 
 linux/drivers/media/video/ivtv/ivtv-queue.h|2 
 linux/drivers/media/video/ivtv/ivtv-streams.c  |2 
 linux/drivers/media/video/ivtv/ivtv-vbi.c  |4 
 linux/drivers/media/video/v4l2-common.c|3 
 linux/drivers/media/video/v4l2-dev.c   |2 
 linux/include/linux/videodev2.h|4 
 v4l/scripts/checkpatch.pl  |  314 +--
 v4l/scripts/do_commit.sh   |   36 
 v4l/scripts/hghead.pl  |   12 
 v4l/scripts/make_kconfig.pl|   68 -
 v4l/versions.txt   |4 
 38 files changed, 2417 insertions(+), 1435 deletions(-)

diff discarded since it is too big

---

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

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


[linuxtv-commits] [hg:v4l-dvb] Initial support for AME DTV-5100 USB2.0 DVB-T

2008-08-22 Thread Patch from Antoine Jacquet
The patch number 8734 was added via Antoine Jacquet [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: Antoine Jacquet  [EMAIL PROTECTED]
Initial support for AME DTV-5100 USB2.0 DVB-T


Basic support for AME DTV-5100 USB2.0 DVB-T using the qt1010 tuner and a dummy 
frontend.

Priority: normal

Signed-off-by: Antoine Jacquet [EMAIL PROTECTED]


---

 linux/drivers/media/dvb/dvb-usb/Kconfig  |7 
 linux/drivers/media/dvb/dvb-usb/Makefile |3 
 linux/drivers/media/dvb/dvb-usb/dtv5100-fe.c |  147 
 linux/drivers/media/dvb/dvb-usb/dtv5100.c|  217 +++
 linux/drivers/media/dvb/dvb-usb/dtv5100.h|  128 +++
 5 files changed, 502 insertions(+)

diff -r 405d3e926ffd -r 81f5f11c0845 linux/drivers/media/dvb/dvb-usb/Kconfig
--- a/linux/drivers/media/dvb/dvb-usb/Kconfig   Sat Aug 09 09:21:15 2008 -0300
+++ b/linux/drivers/media/dvb/dvb-usb/Kconfig   Mon Aug 11 18:12:19 2008 +0200
@@ -262,3 +262,10 @@ config DVB_USB_ANYSEE
help
  Say Y here to support the Anysee E30, Anysee E30 Plus or
  Anysee E30 C Plus DVB USB2.0 receiver.
+
+config DVB_USB_DTV5100
+   tristate AME DTV-5100 USB2.0 DVB-T support
+   depends on DVB_USB
+   select MEDIA_TUNER_QT1010 if !DVB_FE_CUSTOMISE
+   help
+ Say Y here to support the AME DTV-5100 USB2.0 DVB-T receiver.
diff -r 405d3e926ffd -r 81f5f11c0845 linux/drivers/media/dvb/dvb-usb/Makefile
--- a/linux/drivers/media/dvb/dvb-usb/Makefile  Sat Aug 09 09:21:15 2008 -0300
+++ b/linux/drivers/media/dvb/dvb-usb/Makefile  Mon Aug 11 18:12:19 2008 +0200
@@ -67,6 +67,9 @@ dvb-usb-dw2102-objs = dw2102.o
 dvb-usb-dw2102-objs = dw2102.o
 obj-$(CONFIG_DVB_USB_DW2102) += dvb-usb-dw2102.o
 
+dvb-usb-dtv5100-objs = dtv5100.o dtv5100-fe.o
+obj-$(CONFIG_DVB_USB_DTV5100) += dvb-usb-dtv5100.o
+
 EXTRA_CFLAGS += -Idrivers/media/dvb/dvb-core/ -Idrivers/media/dvb/frontends/
 # due to tuner-xc3028
 EXTRA_CFLAGS += -Idrivers/media/common/tuners
diff -r 405d3e926ffd -r 81f5f11c0845 
linux/drivers/media/dvb/dvb-usb/dtv5100-fe.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +
+++ b/linux/drivers/media/dvb/dvb-usb/dtv5100-fe.c  Mon Aug 11 18:12:19 
2008 +0200
@@ -0,0 +1,147 @@
+/*
+ * DVB USB Linux driver for AME DTV-5100 USB2.0 DVB-T
+ *
+ * Copyright (C) 2008  Antoine Jacquet [EMAIL PROTECTED]
+ * http://royale.zerezo.com/dtv5100/
+ *
+ * Inspired by dvb_dummy_fe.c
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ */
+
+#include dvb-usb.h
+#include qt1010_priv.h
+
+struct dtv5100_fe_state {
+   struct dvb_frontend frontend;
+};
+
+static int dtv5100_fe_read_status(struct dvb_frontend* fe, fe_status_t* status)
+{
+   *status = FE_HAS_SIGNAL
+   | FE_HAS_CARRIER
+   | FE_HAS_VITERBI
+   | FE_HAS_SYNC
+   | FE_HAS_LOCK;
+
+   return 0;
+}
+
+static int dtv5100_fe_read_ber(struct dvb_frontend* fe, u32* ber)
+{
+   *ber = 0;
+   return 0;
+}
+
+static int dtv5100_fe_read_signal_strength(struct dvb_frontend* fe, u16* 
strength)
+{
+   *strength = 0;
+   return 0;
+}
+
+static int dtv5100_fe_read_snr(struct dvb_frontend* fe, u16* snr)
+{
+   *snr = 0;
+   return 0;
+}
+
+static int dtv5100_fe_read_ucblocks(struct dvb_frontend* fe, u32* ucblocks)
+{
+   *ucblocks = 0;
+   return 0;
+}
+
+static int dtv5100_fe_get_frontend(struct dvb_frontend* fe, struct 
dvb_frontend_parameters *p)
+{
+   return 0;
+}
+
+static int dtv5100_fe_set_frontend(struct dvb_frontend* fe, struct 
dvb_frontend_parameters *p)
+{
+   if (fe-ops.tuner_ops.set_params) {
+   fe-ops.tuner_ops.set_params(fe, p);
+   if (fe-ops.i2c_gate_ctrl) fe-ops.i2c_gate_ctrl(fe, 0);
+   }
+
+   return 0;
+}
+
+static int dtv5100_fe_sleep(struct dvb_frontend* fe)
+{
+   return 0;
+}
+
+static int dtv5100_fe_init(struct dvb_frontend* fe)
+{
+   return 0;
+}
+
+static void dtv5100_fe_release(struct dvb_frontend* fe)
+{
+   struct 

[linuxtv-commits] [hg:v4l-dvb] merge: v4l-dvb

2008-08-22 Thread Patch from Antoine Jacquet
The patch number 8737 was added via Antoine Jacquet [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: Antoine Jacquet  [EMAIL PROTECTED]
merge: v4l-dvb


Priority: normal

Signed-off-by: Antoine Jacquet [EMAIL PROTECTED]


---

 Makefile   |   13 
 linux/Documentation/video4linux/gspca.txt  |1 
 linux/drivers/media/dvb/dvb-usb/Kconfig|2 
 linux/drivers/media/dvb/dvb-usb/cxusb.c|  495 +++
 linux/drivers/media/dvb/dvb-usb/dvb-usb-ids.h  |3 
 linux/drivers/media/dvb/frontends/Kconfig  |7 
 linux/drivers/media/dvb/frontends/Makefile |1 
 linux/drivers/media/dvb/frontends/dib0070.h|8 
 linux/drivers/media/dvb/frontends/dib7000p.c   |3 
 linux/drivers/media/dvb/frontends/dib7000p.h   |   41 
 linux/drivers/media/dvb/frontends/lgs8gl5.c|  478 +++
 linux/drivers/media/dvb/frontends/lgs8gl5.h|   45 +
 linux/drivers/media/radio/Makefile |4 
 linux/drivers/media/radio/miropcm20-radio.c|  267 --
 linux/drivers/media/radio/miropcm20-rds-core.c |  212 -
 linux/drivers/media/radio/miropcm20-rds-core.h |   19 
 linux/drivers/media/radio/miropcm20-rds.c  |  140 ---
 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/drivers/media/video/ivtv/ivtv-driver.c   |2 
 linux/drivers/media/video/ivtv/ivtv-driver.h   |1 
 linux/drivers/media/video/ivtv/ivtv-irq.c  |   29 
 linux/drivers/media/video/ivtv/ivtv-queue.h|2 
 linux/drivers/media/video/ivtv/ivtv-streams.c  |2 
 linux/drivers/media/video/ivtv/ivtv-vbi.c  |4 
 linux/drivers/media/video/v4l2-common.c|3 
 linux/drivers/media/video/v4l2-dev.c   |2 
 linux/include/linux/videodev2.h|4 
 v4l/scripts/checkpatch.pl  |  314 +--
 v4l/scripts/do_commit.sh   |   36 
 v4l/scripts/hghead.pl  |   12 
 v4l/scripts/make_kconfig.pl|   68 -
 v4l/versions.txt   |4 
 38 files changed, 2417 insertions(+), 1435 deletions(-)

diff discarded since it is too big

---

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

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


[linuxtv-commits] [hg:v4l-dvb] dtv5100: CodingStyle cleanups

2008-08-22 Thread Patch from Antoine Jacquet
The patch number 8736 was added via Antoine Jacquet [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: Antoine Jacquet  [EMAIL PROTECTED]
dtv5100: CodingStyle cleanups


Priority: normal

Signed-off-by: Antoine Jacquet [EMAIL PROTECTED]


---

 linux/drivers/media/dvb/dvb-usb/dtv5100.c |   15 +++
 1 file changed, 7 insertions(+), 8 deletions(-)

diff -r 9aa51e502808 -r ca1b2066990e linux/drivers/media/dvb/dvb-usb/dtv5100.c
--- a/linux/drivers/media/dvb/dvb-usb/dtv5100.c Tue Aug 12 00:21:33 2008 +0200
+++ b/linux/drivers/media/dvb/dvb-usb/dtv5100.c Tue Aug 12 21:56:34 2008 +0200
@@ -32,7 +32,7 @@ DVB_DEFINE_MOD_OPT_ADAPTER_NR(adapter_nr
 DVB_DEFINE_MOD_OPT_ADAPTER_NR(adapter_nr);
 
 static int dtv5100_i2c_msg(struct dvb_usb_device *d, u8 addr,
- u8 *wbuf, u16 wlen, u8 *rbuf, u16 rlen)
+  u8 *wbuf, u16 wlen, u8 *rbuf, u16 rlen)
 {
u8 request;
u8 type;
@@ -44,14 +44,14 @@ static int dtv5100_i2c_msg(struct dvb_us
/* write { reg }, read { value } */
request = (addr == DTV5100_DEMOD_ADDR ? DTV5100_DEMOD_READ :
DTV5100_TUNER_READ);
-   type = USB_TYPE_VENDOR|USB_DIR_IN;
+   type = USB_TYPE_VENDOR | USB_DIR_IN;
value = 0;
break;
case 2:
/* write { reg, value } */
request = (addr == DTV5100_DEMOD_ADDR ? DTV5100_DEMOD_WRITE :
DTV5100_TUNER_WRITE);
-   type = USB_TYPE_VENDOR|USB_DIR_OUT;
+   type = USB_TYPE_VENDOR | USB_DIR_OUT;
value = wbuf[1];
break;
default:
@@ -68,7 +68,7 @@ static int dtv5100_i2c_msg(struct dvb_us
 
 /* I2C */
 static int dtv5100_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg msg[],
-  int num)
+   int num)
 {
struct dvb_usb_device *d = i2c_get_adapdata(adap);
int i;
@@ -116,7 +116,7 @@ static int dtv5100_frontend_attach(struc
 static int dtv5100_frontend_attach(struct dvb_usb_adapter *adap)
 {
adap-fe = dvb_attach(zl10353_attach, dtv5100_zl10353_config,
-   adap-dev-i2c_adap);
+ adap-dev-i2c_adap);
if (adap-fe == NULL)
return -EIO;
 
@@ -147,11 +147,10 @@ static int dtv5100_probe(struct usb_inte
struct usb_device *udev = interface_to_usbdev(intf);
 
/* initialize non qt1010/zl10353 part? */
-   for (i = 0; dtv5100_init[i].request; i++)
-   {
+   for (i = 0; dtv5100_init[i].request; i++) {
ret = usb_control_msg(udev, usb_rcvctrlpipe(udev, 0),
  dtv5100_init[i].request,
- USB_TYPE_VENDOR|USB_DIR_OUT,
+ USB_TYPE_VENDOR | USB_DIR_OUT,
  dtv5100_init[i].value,
  dtv5100_init[i].index, NULL, 0,
  DTV5100_USB_TIMEOUT);


---

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

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


[linuxtv-commits] [hg:v4l-dvb] dtv5100: remove old definition from header

2008-08-22 Thread Patch from Antoine Jacquet
The patch number 8738 was added via Antoine Jacquet [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: Antoine Jacquet  [EMAIL PROTECTED]
dtv5100: remove old definition from header


Priority: normal

Signed-off-by: Antoine Jacquet [EMAIL PROTECTED]


---

 linux/drivers/media/dvb/dvb-usb/dtv5100.h |2 --
 1 file changed, 2 deletions(-)

diff -r bbdb0ca9b275 -r 171d06ddd5ed linux/drivers/media/dvb/dvb-usb/dtv5100.h
--- a/linux/drivers/media/dvb/dvb-usb/dtv5100.h Mon Aug 18 23:17:40 2008 +0200
+++ b/linux/drivers/media/dvb/dvb-usb/dtv5100.h Mon Aug 18 23:22:00 2008 +0200
@@ -48,6 +48,4 @@ static struct {
{ } /* Terminating entry */
 };
 
-extern struct dvb_frontend* dtv5100_fe_attach(void);
-
 #endif


---

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

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


[linuxtv-commits] [hg:v4l-dvb] pvrusb2: use proper byteorder interface

2008-08-22 Thread Patch from Harvey Harrison
The patch number 8742 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: Harvey Harrison  [EMAIL PROTECTED]
pvrusb2: use proper byteorder interface


___swab32 is an internal detail of the implementation.

Signed-off-by: Harvey Harrison [EMAIL PROTECTED]
Acked-By: Mike Isely [EMAIL PROTECTED]
Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 linux/drivers/media/video/pvrusb2/pvrusb2-hdw.c |3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff -r e593534bff2c -r 045c0d9bb888 
linux/drivers/media/video/pvrusb2/pvrusb2-hdw.c
--- a/linux/drivers/media/video/pvrusb2/pvrusb2-hdw.c   Fri Aug 22 13:53:04 
2008 -0300
+++ b/linux/drivers/media/video/pvrusb2/pvrusb2-hdw.c   Mon Aug 18 13:38:01 
2008 -0700
@@ -1324,8 +1324,7 @@ int pvr2_upload_firmware2(struct pvr2_hd
memcpy(fw_ptr, fw_entry-data + fw_done, bcnt);
/* Usbsnoop log shows that we must swap bytes... */
for (icnt = 0; icnt  bcnt/4 ; icnt++)
-   ((u32 *)fw_ptr)[icnt] =
-   ___swab32(((u32 *)fw_ptr)[icnt]);
+   ((u32 *)fw_ptr)[icnt] = swab32(((u32 *)fw_ptr)[icnt]);
 
ret |= usb_bulk_msg(hdw-usb_dev, pipe, fw_ptr,bcnt,
actual_length, HZ);


---

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

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


[linuxtv-commits] [hg:v4l-dvb] mt9m111: fix compile error and warning when compiling for kernel 2.6.25.

2008-08-22 Thread Patch from Hans Verkuil
The patch number 8743 was added via Hans Verkuil [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: Hans Verkuil  [EMAIL PROTECTED]
mt9m111: fix compile error and warning when compiling for kernel 2.6.25.


Priority: normal

Signed-off-by: Hans Verkuil [EMAIL PROTECTED]


---

 linux/drivers/media/video/mt9m111.c |8 
 1 file changed, 8 insertions(+)

diff -r 045c0d9bb888 -r 07dd20702610 linux/drivers/media/video/mt9m111.c
--- a/linux/drivers/media/video/mt9m111.c   Mon Aug 18 13:38:01 2008 -0700
+++ b/linux/drivers/media/video/mt9m111.c   Fri Aug 22 21:50:59 2008 +0200
@@ -879,8 +879,12 @@ static void mt9m111_video_remove(struct 
soc_camera_video_stop(mt9m111-icd);
 }
 
+#if LINUX_VERSION_CODE  KERNEL_VERSION(2, 6, 26)
+static int mt9m111_probe(struct i2c_client *client)
+#else
 static int mt9m111_probe(struct i2c_client *client,
 const struct i2c_device_id *did)
+#endif
 {
struct mt9m111 *mt9m111;
struct soc_camera_device *icd;
@@ -940,11 +944,13 @@ static int mt9m111_remove(struct i2c_cli
return 0;
 }
 
+#if LINUX_VERSION_CODE = KERNEL_VERSION(2, 6, 26)
 static const struct i2c_device_id mt9m111_id[] = {
{ mt9m111, 0 },
{ }
 };
 MODULE_DEVICE_TABLE(i2c, mt9m111_id);
+#endif
 
 static struct i2c_driver mt9m111_i2c_driver = {
.driver = {
@@ -952,7 +958,9 @@ static struct i2c_driver mt9m111_i2c_dri
},
.probe  = mt9m111_probe,
.remove = mt9m111_remove,
+#if LINUX_VERSION_CODE = KERNEL_VERSION(2, 6, 26)
.id_table   = mt9m111_id,
+#endif
 };
 
 static int __init mt9m111_mod_init(void)


---

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

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


[linuxtv-commits] [hg:v4l-dvb] v4l2: fix a bunch of compile warnings.

2008-08-22 Thread Patch from Hans Verkuil
The patch number 8745 was added via Hans Verkuil [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: Hans Verkuil  [EMAIL PROTECTED]
v4l2: fix a bunch of compile warnings.


Priority: normal

Signed-off-by: Hans Verkuil [EMAIL PROTECTED]


---

 linux/drivers/media/common/saa7146_core.c|2 +-
 linux/drivers/media/dvb/b2c2/flexcop-dma.c   |2 +-
 linux/drivers/media/video/btcx-risc.c|2 +-
 linux/drivers/media/video/saa7134/saa7134-core.c |2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

diff -r 64453c85baa0 -r 6f588bc6ff59 linux/drivers/media/common/saa7146_core.c
--- a/linux/drivers/media/common/saa7146_core.c Fri Aug 22 21:56:32 2008 +0200
+++ b/linux/drivers/media/common/saa7146_core.c Fri Aug 22 22:01:45 2008 +0200
@@ -234,7 +234,7 @@ int saa7146_pgtable_alloc(struct pci_dev
 int saa7146_pgtable_alloc(struct pci_dev *pci, struct saa7146_pgtable *pt)
 {
__le32   *cpu;
-   dma_addr_t   dma_addr;
+   dma_addr_t   dma_addr = 0;
 
cpu = pci_alloc_consistent(pci, PAGE_SIZE, dma_addr);
if (NULL == cpu) {
diff -r 64453c85baa0 -r 6f588bc6ff59 linux/drivers/media/dvb/b2c2/flexcop-dma.c
--- a/linux/drivers/media/dvb/b2c2/flexcop-dma.cFri Aug 22 21:56:32 
2008 +0200
+++ b/linux/drivers/media/dvb/b2c2/flexcop-dma.cFri Aug 22 22:01:45 
2008 +0200
@@ -10,7 +10,7 @@ int flexcop_dma_allocate(struct pci_dev 
 int flexcop_dma_allocate(struct pci_dev *pdev, struct flexcop_dma *dma, u32 
size)
 {
u8 *tcpu;
-   dma_addr_t tdma;
+   dma_addr_t tdma = 0;
 
if (size % 2) {
err(dma buffersize has to be even.);
diff -r 64453c85baa0 -r 6f588bc6ff59 linux/drivers/media/video/btcx-risc.c
--- a/linux/drivers/media/video/btcx-risc.c Fri Aug 22 21:56:32 2008 +0200
+++ b/linux/drivers/media/video/btcx-risc.c Fri Aug 22 22:01:45 2008 +0200
@@ -65,7 +65,7 @@ int btcx_riscmem_alloc(struct pci_dev *p
   unsigned int size)
 {
__le32 *cpu;
-   dma_addr_t dma;
+   dma_addr_t dma = 0;
 
if (NULL != risc-cpu  risc-size  size)
btcx_riscmem_free(pci,risc);
diff -r 64453c85baa0 -r 6f588bc6ff59 
linux/drivers/media/video/saa7134/saa7134-core.c
--- a/linux/drivers/media/video/saa7134/saa7134-core.c  Fri Aug 22 21:56:32 
2008 +0200
+++ b/linux/drivers/media/video/saa7134/saa7134-core.c  Fri Aug 22 22:01:45 
2008 +0200
@@ -264,7 +264,7 @@ int saa7134_pgtable_alloc(struct pci_dev
 int saa7134_pgtable_alloc(struct pci_dev *pci, struct saa7134_pgtable *pt)
 {
__le32   *cpu;
-   dma_addr_t   dma_addr;
+   dma_addr_t   dma_addr = 0;
 
cpu = pci_alloc_consistent(pci, SAA7134_PGTABLE_SIZE, dma_addr);
if (NULL == cpu)


---

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

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


[linuxtv-commits] [hg:v4l-dvb] compat.h: add DIV_ROUND_UP for kernels = 2.6.18

2008-08-22 Thread Patch from Hans Verkuil
The patch number 8744 was added via Hans Verkuil [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: Hans Verkuil  [EMAIL PROTECTED]
compat.h: add DIV_ROUND_UP for kernels = 2.6.18


Priority: normal

Signed-off-by: Hans Verkuil [EMAIL PROTECTED]


---

 v4l/compat.h |   17 +++--
 1 file changed, 7 insertions(+), 10 deletions(-)

diff -r 07dd20702610 -r 64453c85baa0 v4l/compat.h
--- a/v4l/compat.h  Fri Aug 22 21:50:59 2008 +0200
+++ b/v4l/compat.h  Fri Aug 22 21:56:32 2008 +0200
@@ -52,14 +52,11 @@
 #endif
 
 #if LINUX_VERSION_CODE  KERNEL_VERSION(2,6,19)
-# define PCIAGP_FAIL 0
-
+#define DIV_ROUND_UP(n, d) (((n) + (d) - 1) / (d))
+#define PCIAGP_FAIL 0
 #define vmalloc_32_user(a) vmalloc_32(a)
 
-#endif
-
 /* bool type and enum-based definition of true and false was added in 2.6.19 */
-#if LINUX_VERSION_CODE  KERNEL_VERSION(2,6,19)
 typedef int bool;
 #define true 1
 #define false 0
@@ -231,8 +228,8 @@ typedef unsigned long uintptr_t;
 #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
+   return !list_empty(head)  (head-next == head-prev);
+}
+#endif
+
+#endif


---

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

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


[linuxtv-commits] [hg:v4l-dvb] v4l-dvb: fix compile warnings.

2008-08-22 Thread Patch from Hans Verkuil
The patch number 8746 was added via Hans Verkuil [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: Hans Verkuil  [EMAIL PROTECTED]
v4l-dvb: fix compile warnings.


Priority: normal

Signed-off-by: Hans Verkuil [EMAIL PROTECTED]


---

 linux/drivers/media/dvb/frontends/nxt200x.c |4 ++--
 linux/drivers/media/dvb/frontends/or51211.c |2 +-
 linux/drivers/media/video/vino.c|6 +++---
 3 files changed, 6 insertions(+), 6 deletions(-)

diff -r 6f588bc6ff59 -r 213824ef624c linux/drivers/media/dvb/frontends/nxt200x.c
--- a/linux/drivers/media/dvb/frontends/nxt200x.c   Fri Aug 22 22:01:45 
2008 +0200
+++ b/linux/drivers/media/dvb/frontends/nxt200x.c   Fri Aug 22 22:12:08 
2008 +0200
@@ -81,7 +81,7 @@ static int i2c_writebytes (struct nxt200
return 0;
 }
 
-static u8 i2c_readbytes (struct nxt200x_state* state, u8 addr, u8* buf, u8 len)
+static int i2c_readbytes(struct nxt200x_state *state, u8 addr, u8 *buf, u8 len)
 {
int err;
struct i2c_msg msg = { .addr = addr, .flags = I2C_M_RD, .buf = buf, 
.len = len };
@@ -112,7 +112,7 @@ static int nxt200x_writebytes (struct nx
return 0;
 }
 
-static u8 nxt200x_readbytes (struct nxt200x_state* state, u8 reg, u8* buf, u8 
len)
+static int nxt200x_readbytes(struct nxt200x_state *state, u8 reg, u8 *buf, u8 
len)
 {
u8 reg2 [] = { reg };
 
diff -r 6f588bc6ff59 -r 213824ef624c linux/drivers/media/dvb/frontends/or51211.c
--- a/linux/drivers/media/dvb/frontends/or51211.c   Fri Aug 22 22:01:45 
2008 +0200
+++ b/linux/drivers/media/dvb/frontends/or51211.c   Fri Aug 22 22:12:08 
2008 +0200
@@ -88,7 +88,7 @@ static int i2c_writebytes (struct or5121
return 0;
 }
 
-static u8 i2c_readbytes (struct or51211_state* state, u8 reg, u8* buf, int len)
+static int i2c_readbytes(struct or51211_state *state, u8 reg, u8 *buf, int len)
 {
int err;
struct i2c_msg msg;
diff -r 6f588bc6ff59 -r 213824ef624c linux/drivers/media/video/vino.c
--- a/linux/drivers/media/video/vino.c  Fri Aug 22 22:01:45 2008 +0200
+++ b/linux/drivers/media/video/vino.c  Fri Aug 22 22:12:08 2008 +0200
@@ -809,7 +809,7 @@ static void vino_free_buffer_with_count(
dprintk(vino_free_buffer_with_count(): count = %d\n, count);
 
for (i = 0; i  count; i++) {
-   ClearPageReserved(virt_to_page(fb-desc_table.virtual[i]));
+   ClearPageReserved(virt_to_page((void 
*)fb-desc_table.virtual[i]));
dma_unmap_single(NULL,
 fb-desc_table.dma_cpu[VINO_PAGE_RATIO * i],
 PAGE_SIZE, DMA_FROM_DEVICE);
@@ -887,7 +887,7 @@ static int vino_allocate_buffer(struct v
dma_data_addr + VINO_PAGE_SIZE * j;
}
 
-   SetPageReserved(virt_to_page(fb-desc_table.virtual[i]));
+   SetPageReserved(virt_to_page((void 
*)fb-desc_table.virtual[i]));
}
 
/* page_count needs to be set anyway, because the descriptor table has
@@ -974,7 +974,7 @@ static int vino_prepare_user_buffer(stru
dma_data_addr + VINO_PAGE_SIZE * j;
}
 
-   SetPageReserved(virt_to_page(fb-desc_table.virtual[i]));
+   SetPageReserved(virt_to_page((void 
*)fb-desc_table.virtual[i]));
}
 
/* page_count needs to be set anyway, because the descriptor table has


---

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

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