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

2009-12-12 Thread Patch from Mauro Carvalho Chehab
The patch number 13620 was added via Mauro Carvalho Chehab mche...@redhat.com
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:
Linux Media Mailing List linux-me...@vger.kernel.org

--

From: Mauro Carvalho Chehab  mche...@redhat.com
merge: http://www.linuxtv.org/hg/~hverkuil/v4l-dvb


Signed-off-by: Mauro Carvalho Chehab mche...@redhat.com


---

 linux/Documentation/DocBook/v4l/vidioc-g-std.xml|6 +
 linux/Documentation/DocBook/v4l/vidioc-querystd.xml |6 +
 linux/drivers/media/video/v4l2-common.c |   47 
 linux/include/media/v4l2-common.h   |2 
 4 files changed, 60 insertions(+), 1 deletion(-)

diff -r c4056d1a350d -r 3d36715a68ce 
linux/Documentation/DocBook/v4l/vidioc-g-std.xml
--- a/linux/Documentation/DocBook/v4l/vidioc-g-std.xml  Fri Dec 11 12:20:59 
2009 -0200
+++ b/linux/Documentation/DocBook/v4l/vidioc-g-std.xml  Sat Dec 12 12:07:45 
2009 -0200
@@ -86,6 +86,12 @@
 constantVIDIOC_S_STD/constant parameter was unsuitable./para
/listitem
   /varlistentry
+  varlistentry
+   termerrorcodeEBUSY/errorcode/term
+   listitem
+ paraThe device is busy and therefore can not change the 
standard/para
+   /listitem
+  /varlistentry
 /variablelist
   /refsect1
 /refentry
diff -r c4056d1a350d -r 3d36715a68ce 
linux/Documentation/DocBook/v4l/vidioc-querystd.xml
--- a/linux/Documentation/DocBook/v4l/vidioc-querystd.xml   Fri Dec 11 
12:20:59 2009 -0200
+++ b/linux/Documentation/DocBook/v4l/vidioc-querystd.xml   Sat Dec 12 
12:07:45 2009 -0200
@@ -70,6 +70,12 @@
  paraThis ioctl is not supported./para
/listitem
   /varlistentry
+  varlistentry
+   termerrorcodeEBUSY/errorcode/term
+   listitem
+ paraThe device is busy and therefore can not detect the 
standard/para
+   /listitem
+  /varlistentry
 /variablelist
   /refsect1
 /refentry
diff -r c4056d1a350d -r 3d36715a68ce linux/drivers/media/video/v4l2-common.c
--- a/linux/drivers/media/video/v4l2-common.c   Fri Dec 11 12:20:59 2009 -0200
+++ b/linux/drivers/media/video/v4l2-common.c   Sat Dec 12 12:07:45 2009 -0200
@@ -1142,3 +1142,50 @@
}
 }
 EXPORT_SYMBOL_GPL(v4l_bound_align_image);
+
+/**
+ * v4l_fill_dv_preset_info - fill description of a digital video preset
+ * @preset - preset value
+ * @info - pointer to struct v4l2_dv_enum_preset
+ *
+ * drivers can use this helper function to fill description of dv preset
+ * in info.
+ */
+int v4l_fill_dv_preset_info(u32 preset, struct v4l2_dv_enum_preset *info)
+{
+   static const struct v4l2_dv_preset_info {
+   u16 width;
+   u16 height;
+   const char *name;
+   } dv_presets[] = {
+   { 0, 0, Invalid },/* V4L2_DV_INVALID */
+   { 720,  480, 4...@59.94 },/* V4L2_DV_480P59_94 */
+   { 720,  576, 5...@50 },   /* V4L2_DV_576P50 */
+   { 1280, 720, 7...@24 },   /* V4L2_DV_720P24 */
+   { 1280, 720, 7...@25 },   /* V4L2_DV_720P25 */
+   { 1280, 720, 7...@30 },   /* V4L2_DV_720P30 */
+   { 1280, 720, 7...@50 },   /* V4L2_DV_720P50 */
+   { 1280, 720, 7...@59.94 },/* V4L2_DV_720P59_94 */
+   { 1280, 720, 7...@60 },   /* V4L2_DV_720P60 */
+   { 1920, 1080, 10...@29.97 },  /* V4L2_DV_1080I29_97 */
+   { 1920, 1080, 10...@30 }, /* V4L2_DV_1080I30 */
+   { 1920, 1080, 10...@25 }, /* V4L2_DV_1080I25 */
+   { 1920, 1080, 10...@50 }, /* V4L2_DV_1080I50 */
+   { 1920, 1080, 10...@60 }, /* V4L2_DV_1080I60 */
+   { 1920, 1080, 10...@24 }, /* V4L2_DV_1080P24 */
+   { 1920, 1080, 10...@25 }, /* V4L2_DV_1080P25 */
+   { 1920, 1080, 10...@30 }, /* V4L2_DV_1080P30 */
+   { 1920, 1080, 10...@50 }, /* V4L2_DV_1080P50 */
+   { 1920, 1080, 10...@60 }, /* V4L2_DV_1080P60 */
+   };
+
+   if (info == NULL || preset = ARRAY_SIZE(dv_presets))
+   return -EINVAL;
+
+   info-preset = preset;
+   info-width = dv_presets[preset].width;
+   info-height = dv_presets[preset].height;
+   strlcpy(info-name, dv_presets[preset].name, sizeof(info-name));
+   return 0;
+}
+EXPORT_SYMBOL_GPL(v4l_fill_dv_preset_info);
diff -r c4056d1a350d -r 3d36715a68ce linux/include/media/v4l2-common.h
--- a/linux/include/media/v4l2-common.h Fri Dec 11 12:20:59 2009 -0200
+++ b/linux/include/media/v4l2-common.h Sat Dec 12 12:07:45 2009 -0200
@@ -219,5 +219,5 @@
   unsigned int *h, unsigned int hmin,
   

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

2009-12-05 Thread Patch from Mauro Carvalho Chehab
The patch number 13548 was added via Mauro Carvalho Chehab mche...@redhat.com
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:
Linux Media Mailing List linux-me...@vger.kernel.org

--

From: Mauro Carvalho Chehab  mche...@redhat.com
merge: http://www.linuxtv.org/hg/~hverkuil/v4l-dvb


Signed-off-by: Mauro Carvalho Chehab mche...@redhat.com


---

 linux/drivers/media/radio/radio-aimslab.c|4 
 linux/drivers/media/radio/radio-aztech.c |4 
 linux/drivers/media/radio/radio-gemtek-pci.c |4 
 linux/drivers/media/radio/radio-maestro.c|4 
 linux/drivers/media/radio/radio-maxiradio.c  |4 
 linux/drivers/media/radio/radio-mr800.c  |4 
 linux/drivers/media/radio/radio-rtrack2.c|4 
 linux/drivers/media/radio/radio-sf16fmi.c|4 
 linux/drivers/media/radio/radio-sf16fmr2.c   |4 
 linux/drivers/media/radio/radio-tea5764.c|4 +++-
 linux/drivers/media/radio/radio-terratec.c   |4 
 linux/drivers/media/radio/radio-trust.c  |4 
 linux/drivers/media/radio/radio-typhoon.c|4 
 linux/drivers/media/radio/radio-zoltrix.c|4 
 14 files changed, 55 insertions(+), 1 deletion(-)

diff -r 309f16461cf4 -r 54755be3ffe9 linux/drivers/media/radio/radio-aimslab.c
--- a/linux/drivers/media/radio/radio-aimslab.c Sat Dec 05 10:34:21 2009 -0200
+++ b/linux/drivers/media/radio/radio-aimslab.c Sat Dec 05 17:39:00 2009 -0200
@@ -269,6 +269,8 @@
 {
struct rtrack *rt = video_drvdata(file);
 
+   if (f-tuner != 0 || f-type != V4L2_TUNER_RADIO)
+   return -EINVAL;
rt_setfreq(rt, f-frequency);
return 0;
 }
@@ -278,6 +280,8 @@
 {
struct rtrack *rt = video_drvdata(file);
 
+   if (f-tuner != 0)
+   return -EINVAL;
f-type = V4L2_TUNER_RADIO;
f-frequency = rt-curfreq;
return 0;
diff -r 309f16461cf4 -r 54755be3ffe9 linux/drivers/media/radio/radio-aztech.c
--- a/linux/drivers/media/radio/radio-aztech.c  Sat Dec 05 10:34:21 2009 -0200
+++ b/linux/drivers/media/radio/radio-aztech.c  Sat Dec 05 17:39:00 2009 -0200
@@ -255,6 +255,8 @@
 {
struct aztech *az = video_drvdata(file);
 
+   if (f-tuner != 0 || f-type != V4L2_TUNER_RADIO)
+   return -EINVAL;
az_setfreq(az, f-frequency);
return 0;
 }
@@ -264,6 +266,8 @@
 {
struct aztech *az = video_drvdata(file);
 
+   if (f-tuner != 0)
+   return -EINVAL;
f-type = V4L2_TUNER_RADIO;
f-frequency = az-curfreq;
return 0;
diff -r 309f16461cf4 -r 54755be3ffe9 
linux/drivers/media/radio/radio-gemtek-pci.c
--- a/linux/drivers/media/radio/radio-gemtek-pci.c  Sat Dec 05 10:34:21 
2009 -0200
+++ b/linux/drivers/media/radio/radio-gemtek-pci.c  Sat Dec 05 17:39:00 
2009 -0200
@@ -241,6 +241,8 @@
 {
struct gemtek_pci *card = video_drvdata(file);
 
+   if (f-tuner != 0 || f-type != V4L2_TUNER_RADIO)
+   return -EINVAL;
if (f-frequency  GEMTEK_PCI_RANGE_LOW ||
f-frequency  GEMTEK_PCI_RANGE_HIGH)
return -EINVAL;
@@ -254,6 +256,8 @@
 {
struct gemtek_pci *card = video_drvdata(file);
 
+   if (f-tuner != 0)
+   return -EINVAL;
f-type = V4L2_TUNER_RADIO;
f-frequency = card-current_frequency;
return 0;
diff -r 309f16461cf4 -r 54755be3ffe9 linux/drivers/media/radio/radio-maestro.c
--- a/linux/drivers/media/radio/radio-maestro.c Sat Dec 05 10:34:21 2009 -0200
+++ b/linux/drivers/media/radio/radio-maestro.c Sat Dec 05 17:39:00 2009 -0200
@@ -201,6 +201,8 @@
 {
struct maestro *dev = video_drvdata(file);
 
+   if (f-tuner != 0 || f-type != V4L2_TUNER_RADIO)
+   return -EINVAL;
if (f-frequency  FREQ_LO || f-frequency  FREQ_HI)
return -EINVAL;
mutex_lock(dev-lock);
@@ -214,6 +216,8 @@
 {
struct maestro *dev = video_drvdata(file);
 
+   if (f-tuner != 0)
+   return -EINVAL;
f-type = V4L2_TUNER_RADIO;
mutex_lock(dev-lock);
f-frequency = BITS2FREQ(radio_bits_get(dev));
diff -r 309f16461cf4 -r 54755be3ffe9 linux/drivers/media/radio/radio-maxiradio.c
--- a/linux/drivers/media/radio/radio-maxiradio.c   Sat Dec 05 10:34:21 
2009 -0200
+++ b/linux/drivers/media/radio/radio-maxiradio.c   Sat Dec 05 17:39:00 
2009 -0200
@@ -263,6 +263,8 @@
 {
struct maxiradio *dev = video_drvdata(file);
 
+   if (f-tuner != 0 || f-type != V4L2_TUNER_RADIO)
+   return -EINVAL;
if (f-frequency  FREQ_LO || f-frequency  FREQ_HI) {
dprintk(dev, 1, radio freq (%d.%02d MHz) out of range 
(%d-%d)\n,

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

2009-12-05 Thread Patch from Mauro Carvalho Chehab
The patch number 13574 was added via Mauro Carvalho Chehab mche...@redhat.com
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:
Linux Media Mailing List linux-me...@vger.kernel.org

--

From: Mauro Carvalho Chehab  mche...@redhat.com
merge: http://www.linuxtv.org/hg/~hverkuil/v4l-dvb-timings


Signed-off-by: Mauro Carvalho Chehab mche...@redhat.com


---

 linux/Documentation/DocBook/media-entities.tmpl|   18 
 linux/Documentation/DocBook/media-indices.tmpl |4 
 linux/Documentation/DocBook/v4l/common.xml |   35 +
 linux/Documentation/DocBook/v4l/compat.xml |   16 
 linux/Documentation/DocBook/v4l/v4l2.xml   |   26 +
 linux/Documentation/DocBook/v4l/videodev2.h.xml|  116 
 linux/Documentation/DocBook/v4l/vidioc-enum-dv-presets.xml |  238 ++
 linux/Documentation/DocBook/v4l/vidioc-enuminput.xml   |   36 +
 linux/Documentation/DocBook/v4l/vidioc-enumoutput.xml  |   36 +
 linux/Documentation/DocBook/v4l/vidioc-g-dv-preset.xml |  111 
 linux/Documentation/DocBook/v4l/vidioc-g-dv-timings.xml|  224 +
 linux/Documentation/DocBook/v4l/vidioc-query-dv-preset.xml |   85 +++
 linux/drivers/media/video/v4l2-compat-ioctl32.c|6 
 linux/drivers/media/video/v4l2-ioctl.c |  147 ++
 linux/include/linux/videodev2.h|  116 
 linux/include/media/v4l2-ioctl.h   |   15 
 linux/include/media/v4l2-subdev.h  |   21 
 media-specs/Makefile   |   14 
 18 files changed, 1252 insertions(+), 12 deletions(-)

diff discarded since it is too big

---

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

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


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

2009-11-25 Thread Patch from Mauro Carvalho Chehab
The patch number 13510 was added via Mauro Carvalho Chehab mche...@redhat.com
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:
Linux Media Mailing List linux-me...@vger.kernel.org

--

From: Mauro Carvalho Chehab  mche...@redhat.com
merge: http://www.linuxtv.org/hg/~hverkuil/v4l-dvb-pms


Signed-off-by: Mauro Carvalho Chehab mche...@redhat.com


---

 linux/drivers/media/video/Kconfig |2 
 linux/drivers/media/video/pms.c   | 1428 +++---
 2 files changed, 752 insertions(+), 678 deletions(-)

diff discarded since it is too big

---

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

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


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

2009-11-25 Thread Patch from Mauro Carvalho Chehab
The patch number 13520 was added via Mauro Carvalho Chehab mche...@redhat.com
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:
Linux Media Mailing List linux-me...@vger.kernel.org

--

From: Mauro Carvalho Chehab  mche...@redhat.com
merge: http://www.linuxtv.org/hg/~hverkuil/v4l-dvb


Signed-off-by: Mauro Carvalho Chehab mche...@redhat.com


---

 linux/Documentation/DocBook/v4l/videodev2.h.xml| 1096 ++---
 linux/drivers/media/video/davinci/vpif_capture.c   | 2168 ++
 linux/drivers/media/video/davinci/vpif_capture.h   |  165 
 linux/linux/drivers/media/video/davinci/vpif_capture.c | 2168 --
 linux/linux/drivers/media/video/davinci/vpif_capture.h |  165 
 v4l/scripts/strip-trailing-whitespaces.sh  |4 
 6 files changed, 2883 insertions(+), 2883 deletions(-)

diff discarded since it is too big

---

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

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


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

2009-11-24 Thread Patch from Mauro Carvalho Chehab
The patch number 13459 was added via Mauro Carvalho Chehab mche...@redhat.com
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:
Linux Media Mailing List linux-me...@vger.kernel.org

--

From: Mauro Carvalho Chehab  mche...@redhat.com
merge: http://www.linuxtv.org/hg/~hverkuil/v4l-dvb-staging


Signed-off-by: Mauro Carvalho Chehab mche...@redhat.com


---

 linux/drivers/staging/go7007/Makefile|4 
 linux/drivers/staging/go7007/go7007-driver.c |   30 
 linux/drivers/staging/go7007/go7007-priv.h   |8 
 linux/drivers/staging/go7007/go7007-usb.c|6 
 linux/drivers/staging/go7007/go7007-v4l2.c   |  109 +--
 linux/drivers/staging/go7007/s2250-board.c   |  576 +--
 linux/drivers/staging/go7007/s2250-loader.c  |   12 
 linux/drivers/staging/go7007/s2250-loader.h  |   24 
 8 files changed, 366 insertions(+), 403 deletions(-)

diff discarded since it is too big

---

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

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


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

2009-09-17 Thread Patch from Mauro Carvalho Chehab
The patch number 12949 was added via Mauro Carvalho Chehab mche...@redhat.com
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:
Linux Media Mailing List linux-me...@vger.kernel.org

--

From: Mauro Carvalho Chehab  mche...@redhat.com
merge: http://www.linuxtv.org/hg/~hverkuil/v4l-dvb


Signed-off-by: Mauro Carvalho Chehab mche...@redhat.com


---

 linux/drivers/media/video/v4l1-compat.c |   14 ++
 1 file changed, 6 insertions(+), 8 deletions(-)

diff -r 0e0e97d47fb5 -r 0fb27357a365 linux/drivers/media/video/v4l1-compat.c
--- a/linux/drivers/media/video/v4l1-compat.c   Thu Sep 17 10:01:48 2009 -0300
+++ b/linux/drivers/media/video/v4l1-compat.c   Thu Sep 17 10:06:23 2009 -0300
@@ -565,10 +565,9 @@
break;
}
chan-norm = 0;
-   err = drv(file, VIDIOC_G_STD, sid);
-   if (err  0)
-   dprintk(VIDIOCGCHAN / VIDIOC_G_STD: %ld\n, err);
-   if (err == 0) {
+   /* Note: G_STD might not be present for radio receivers,
+* so we should ignore any errors. */
+   if (drv(file, VIDIOC_G_STD, sid) == 0) {
if (sid  V4L2_STD_PAL)
chan-norm = VIDEO_MODE_PAL;
if (sid  V4L2_STD_NTSC)
@@ -777,10 +776,9 @@
tun-flags |= VIDEO_TUNER_SECAM;
}
 
-   err = drv(file, VIDIOC_G_STD, sid);
-   if (err  0)
-   dprintk(VIDIOCGTUNER / VIDIOC_G_STD: %ld\n, err);
-   if (err == 0) {
+   /* Note: G_STD might not be present for radio receivers,
+* so we should ignore any errors. */
+   if (drv(file, VIDIOC_G_STD, sid) == 0) {
if (sid  V4L2_STD_PAL)
tun-mode = VIDEO_MODE_PAL;
if (sid  V4L2_STD_NTSC)


---

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

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


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

2009-09-13 Thread Patch from Mauro Carvalho Chehab
The patch number 12726 was added via Mauro Carvalho Chehab mche...@redhat.com
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:
Linux Media Mailing List linux-me...@vger.kernel.org

--

From: Mauro Carvalho Chehab  mche...@redhat.com
merge: http://www.linuxtv.org/hg/~hverkuil/v4l-dvb-core


Signed-off-by: Mauro Carvalho Chehab mche...@redhat.com


---

 linux/Documentation/video4linux/v4l2-framework.txt |   26 ++-
 linux/drivers/media/video/cx18/cx18-driver.c   |2 
 linux/drivers/media/video/cx18/cx18-streams.c  |4 
 linux/drivers/media/video/ivtv/ivtv-driver.c   |2 
 linux/drivers/media/video/ivtv/ivtv-streams.c  |4 
 linux/drivers/media/video/v4l2-dev.c   |  103 ++---
 linux/include/media/v4l2-dev.h |4 
 7 files changed, 111 insertions(+), 34 deletions(-)

diff -r 10eeedd29d04 -r 72d703d38e6f 
linux/Documentation/video4linux/v4l2-framework.txt
--- a/linux/Documentation/video4linux/v4l2-framework.txtSun Sep 13 
10:32:04 2009 -0300
+++ b/linux/Documentation/video4linux/v4l2-framework.txtSun Sep 13 
10:49:39 2009 -0300
@@ -486,17 +486,27 @@
 VFL_TYPE_VTX: vtxX for teletext devices (deprecated, don't use)
 
 The last argument gives you a certain amount of control over the device
-kernel number used (i.e. the X in videoX). Normally you will pass -1 to
-let the v4l2 framework pick the first free number. But if a driver creates
-many devices, then it can be useful to have different video devices in
-separate ranges. For example, video capture devices start at 0, video
-output devices start at 16.
+device node number used (i.e. the X in videoX). Normally you will pass -1
+to let the v4l2 framework pick the first free number. But sometimes users
+want to select a specific node number. It is common that drivers allow
+the user to select a specific device node number through a driver module
+option. That number is then passed to this function and video_register_device
+will attempt to select that device node number. If that number was already
+in use, then the next free device node number will be selected and it
+will send a warning to the kernel log.
 
-So you can use the last argument to specify a minimum kernel number and
-the v4l2 framework will try to pick the first free number that is equal
+Another use-case is if a driver creates many devices. In that case it can
+be useful to place different video devices in separate ranges. For example,
+video capture devices start at 0, video output devices start at 16.
+So you can use the last argument to specify a minimum device node number
+and the v4l2 framework will try to pick the first free number that is equal
 or higher to what you passed. If that fails, then it will just pick the
 first free number.
 
+Since in this case you do not care about a warning about not being able
+to select the specified device node number, you can call the function
+video_register_device_no_warn() instead.
+
 Whenever a device node is created some attributes are also created for you.
 If you look in /sys/class/video4linux you see the devices. Go into e.g.
 video0 and you will see 'name' and 'index' attributes. The 'name' attribute
@@ -513,7 +523,7 @@
 
 - vfl_type: the device type passed to video_register_device.
 - minor: the assigned device minor number.
-- num: the device kernel number (i.e. the X in videoX).
+- num: the device node number (i.e. the X in videoX).
 - index: the device index number.
 
 If the registration failed, then you need to call video_device_release()
diff -r 10eeedd29d04 -r 72d703d38e6f 
linux/drivers/media/video/cx18/cx18-driver.c
--- a/linux/drivers/media/video/cx18/cx18-driver.c  Sun Sep 13 10:32:04 
2009 -0300
+++ b/linux/drivers/media/video/cx18/cx18-driver.c  Sun Sep 13 10:49:39 
2009 -0300
@@ -231,7 +231,7 @@
 Number of encoder PCM buffers\n
 \t\t\tDefault is computed from other enc_pcm_* parameters);
 
-MODULE_PARM_DESC(cx18_first_minor, Set kernel number assigned to first card);
+MODULE_PARM_DESC(cx18_first_minor, Set device node number assigned to first 
card);
 
 MODULE_AUTHOR(Hans Verkuil);
 MODULE_DESCRIPTION(CX23418 driver);
diff -r 10eeedd29d04 -r 72d703d38e6f 
linux/drivers/media/video/cx18/cx18-streams.c
--- a/linux/drivers/media/video/cx18/cx18-streams.c Sun Sep 13 10:32:04 
2009 -0300
+++ b/linux/drivers/media/video/cx18/cx18-streams.c Sun Sep 13 10:49:39 
2009 -0300
@@ -250,9 +250,9 @@
video_set_drvdata(s-video_dev, s);
 
/* Register device. First try the desired minor, then any free one. */
-   ret = video_register_device(s-video_dev, vfl_type, num);
+   ret = 

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

2009-09-13 Thread Patch from Mauro Carvalho Chehab
The patch number 12729 was added via Mauro Carvalho Chehab mche...@redhat.com
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:
Linux Media Mailing List linux-me...@vger.kernel.org

--

From: Mauro Carvalho Chehab  mche...@redhat.com
merge: http://www.linuxtv.org/hg/~hverkuil/v4l-dvb-go7007-new


Signed-off-by: Mauro Carvalho Chehab mche...@redhat.com


---

 linux/drivers/staging/go7007/Kconfig  |   37 
 linux/drivers/staging/go7007/Makefile |   27 
 linux/drivers/staging/go7007/README   |   11 
 linux/drivers/staging/go7007/go7007-driver.c  |  682 ++
 linux/drivers/staging/go7007/go7007-fw.c  | 1638 +++
 linux/drivers/staging/go7007/go7007-i2c.c |  225 ++
 linux/drivers/staging/go7007/go7007-priv.h|  282 ++
 linux/drivers/staging/go7007/go7007-usb.c | 1287 
 linux/drivers/staging/go7007/go7007-v4l2.c| 1876 ++
 linux/drivers/staging/go7007/go7007.h |  114 +
 linux/drivers/staging/go7007/go7007.txt   |  481 
 linux/drivers/staging/go7007/s2250-board.c|  620 +
 linux/drivers/staging/go7007/s2250-loader.c   |  189 +
 linux/drivers/staging/go7007/s2250-loader.h   |   24 
 linux/drivers/staging/go7007/saa7134-go7007.c |  532 +
 linux/drivers/staging/go7007/snd-go7007.c |  305 ++
 linux/drivers/staging/go7007/wis-i2c.h|   47 
 linux/drivers/staging/go7007/wis-ov7640.c |  107 +
 linux/drivers/staging/go7007/wis-saa7113.c|  335 +++
 linux/drivers/staging/go7007/wis-saa7115.c|  468 
 linux/drivers/staging/go7007/wis-sony-tuner.c |  719 ++
 linux/drivers/staging/go7007/wis-tw2804.c |  358 +++
 linux/drivers/staging/go7007/wis-tw9903.c |  339 +++
 linux/drivers/staging/go7007/wis-uda1342.c|  113 +
 v4l/Kconfig.staging   |   66 
 v4l/Makefile  |2 
 v4l/Makefile.staging  |   39 
 v4l/scripts/make_kconfig.pl   |1 
 28 files changed, 10924 insertions(+)

diff discarded since it is too big

---

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

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


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

2009-09-06 Thread Patch from Mauro Carvalho Chehab
The patch number 12689 was added via Mauro Carvalho Chehab mche...@redhat.com
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:
Linux Media Mailing List linux-me...@vger.kernel.org

--

From: Mauro Carvalho Chehab  mche...@redhat.com
merge: http://www.linuxtv.org/hg/~hverkuil/v4l-dvb


Signed-off-by: Mauro Carvalho Chehab mche...@redhat.com


---

 linux/drivers/media/video/vino.c |1 +
 1 file changed, 1 insertion(+)

diff -r 6fd2bdff3299 -r 208cdab4092e linux/drivers/media/video/vino.c
--- a/linux/drivers/media/video/vino.c  Mon Sep 07 00:01:14 2009 -0300
+++ b/linux/drivers/media/video/vino.c  Mon Sep 07 00:03:49 2009 -0300
@@ -50,6 +50,7 @@
 #include asm/sgi/ip22.h
 #include asm/sgi/mc.h
 
+#include compat.h
 #include vino.h
 #include saa7191.h
 #include indycam.h


---

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

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


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

2009-08-26 Thread Patch from Mauro Carvalho Chehab
The patch number 12542 was added via Mauro Carvalho Chehab mche...@redhat.com
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:
Linux Media Mailing List linux-me...@vger.kernel.org

--

From: Mauro Carvalho Chehab  mche...@redhat.com
merge: http://www.linuxtv.org/hg/~hverkuil/v4l-dvb-core2


Signed-off-by: Mauro Carvalho Chehab mche...@redhat.com


---

 linux/Documentation/video4linux/v4l2-framework.txt  |   33 --
 linux/drivers/media/video/au0828/au0828-cards.c |4 
 linux/drivers/media/video/bt8xx/bttv-cards.c|   44 +--
 linux/drivers/media/video/cafe_ccic.c   |2 
 linux/drivers/media/video/cx18/cx18-i2c.c   |   14 -
 linux/drivers/media/video/cx231xx/cx231xx-cards.c   |4 
 linux/drivers/media/video/cx23885/cx23885-cards.c   |2 
 linux/drivers/media/video/cx23885/cx23885-video.c   |6 
 linux/drivers/media/video/cx88/cx88-cards.c |   14 -
 linux/drivers/media/video/cx88/cx88-video.c |6 
 linux/drivers/media/video/davinci/vpif_display.c|4 
 linux/drivers/media/video/em28xx/em28xx-cards.c |   34 +-
 linux/drivers/media/video/ivtv/ivtv-i2c.c   |   18 -
 linux/drivers/media/video/mxb.c |   14 -
 linux/drivers/media/video/pvrusb2/pvrusb2-hdw.c |   10 
 linux/drivers/media/video/saa7134/saa7134-cards.c   |   12 
 linux/drivers/media/video/saa7134/saa7134-core.c|6 
 linux/drivers/media/video/usbvision/usbvision-i2c.c |   12 
 linux/drivers/media/video/v4l2-common.c |  157 
 linux/drivers/media/video/v4l2-dev.c|   55 +---
 linux/drivers/media/video/vino.c|8 
 linux/drivers/media/video/w9968cf.c |4 
 linux/drivers/media/video/zoran/zoran_card.c|8 
 linux/include/media/v4l2-common.h   |   30 --
 linux/include/media/v4l2-dev.h  |2 
 25 files changed, 151 insertions(+), 352 deletions(-)

diff discarded since it is too big

---

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

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


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

2009-08-16 Thread Patch from Mauro Carvalho Chehab
The patch number 12456 was added via Mauro Carvalho Chehab mche...@redhat.com
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:
Linux Media Mailing List linux-me...@vger.kernel.org

--

From: Mauro Carvalho Chehab  mche...@redhat.com
merge: http://www.linuxtv.org/hg/~hverkuil/v4l-dvb-misc


Signed-off-by: Mauro Carvalho Chehab mche...@redhat.com


---

 linux/drivers/media/radio/Kconfig |   10 --
 1 file changed, 10 deletions(-)

diff -r ee10174e07fe -r b8a3c0123c4e linux/drivers/media/radio/Kconfig
--- a/linux/drivers/media/radio/Kconfig Sun Aug 16 21:09:23 2009 -0300
+++ b/linux/drivers/media/radio/Kconfig Sun Aug 16 21:50:36 2009 -0300
@@ -288,16 +288,6 @@
  To compile this driver as a module, choose M here: the
  module will be called radio-typhoon.
 
-config RADIO_TYPHOON_PROC_FS
-   bool Support for /proc/radio-typhoon
-   depends on PROC_FS  RADIO_TYPHOON
-   help
- Say Y here if you want the typhoon radio card driver to write
- status information (frequency, volume, muted, mute frequency,
- base address) to /proc/radio-typhoon. The file can be viewed with
- your favorite pager (i.e. use more /proc/radio-typhoon or less
- /proc/radio-typhoon or simply cat /proc/radio-typhoon).
-
 config RADIO_TYPHOON_PORT
hex Typhoon I/O port (0x316 or 0x336)
depends on RADIO_TYPHOON=y


---

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

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


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

2009-08-11 Thread Patch from Mauro Carvalho Chehab
The patch number 12431 was added via Mauro Carvalho Chehab mche...@redhat.com
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:
Linux Media Mailing List linux-me...@vger.kernel.org

--

From: Mauro Carvalho Chehab  mche...@redhat.com
merge: http://www.linuxtv.org/hg/~hverkuil/v4l-dvb-misc


Signed-off-by: Mauro Carvalho Chehab mche...@redhat.com


---

 linux/drivers/media/dvb/frontends/cx24113.c   |6 
 linux/drivers/media/video/hdpvr/hdpvr-video.c |2 
 linux/drivers/media/video/pvrusb2/pvrusb2-audio.c |5 
 linux/drivers/media/video/v4l2-ioctl.c|   15 +-
 v4l2-apps/util/v4l2-ctl.cpp   |   98 +++---
 5 files changed, 101 insertions(+), 25 deletions(-)

diff -r 1d7fea812926 -r 95f1cff44e9e linux/drivers/media/dvb/frontends/cx24113.c
--- a/linux/drivers/media/dvb/frontends/cx24113.c   Tue Aug 11 10:05:30 
2009 -0300
+++ b/linux/drivers/media/dvb/frontends/cx24113.c   Tue Aug 11 11:46:42 
2009 -0300
@@ -303,6 +303,7 @@
 {
s32 N;
s64 F;
+   u64 dividend;
u8 R, r;
u8 vcodiv;
u8 factor;
@@ -346,7 +347,10 @@
F = freq_hz;
F *= (u64) (R * vcodiv * 262144);
dprintk(1 N: %d, F: %lld, R: %d\n, N, (long long)F, R);
-   do_div(F, state-config-xtal_khz*1000 * factor * 2);
+   /* do_div needs an u64 as first argument */
+   dividend = F;
+   do_div(dividend, state-config-xtal_khz * 1000 * factor * 2);
+   F = dividend;
dprintk(2 N: %d, F: %lld, R: %d\n, N, (long long)F, R);
F -= (N + 32) * 262144;
 
diff -r 1d7fea812926 -r 95f1cff44e9e 
linux/drivers/media/video/hdpvr/hdpvr-video.c
--- a/linux/drivers/media/video/hdpvr/hdpvr-video.c Tue Aug 11 10:05:30 
2009 -0300
+++ b/linux/drivers/media/video/hdpvr/hdpvr-video.c Tue Aug 11 11:46:42 
2009 -0300
@@ -1222,6 +1222,8 @@
V4L2_STD_PAL_G | V4L2_STD_PAL_H | V4L2_STD_PAL_I |
V4L2_STD_PAL_D | V4L2_STD_PAL_M | V4L2_STD_PAL_N |
V4L2_STD_PAL_60,
+   .current_norm   = V4L2_STD_NTSC | V4L2_STD_PAL_M |
+   V4L2_STD_PAL_60,
 };
 
 int hdpvr_register_videodev(struct hdpvr_device *dev, struct device *parent,
diff -r 1d7fea812926 -r 95f1cff44e9e 
linux/drivers/media/video/pvrusb2/pvrusb2-audio.c
--- a/linux/drivers/media/video/pvrusb2/pvrusb2-audio.c Tue Aug 11 10:05:30 
2009 -0300
+++ b/linux/drivers/media/video/pvrusb2/pvrusb2-audio.c Tue Aug 11 11:46:42 
2009 -0300
@@ -66,9 +66,10 @@
u32 input;
 
pvr2_trace(PVR2_TRACE_CHIPS, subdev msp3400 v4l2 set_stereo);
+   sp = (sid  ARRAY_SIZE(routing_schemes)) ?
+   routing_schemes[sid] : NULL;
 
-   if ((sid  ARRAY_SIZE(routing_schemes)) 
-   ((sp = routing_schemes[sid]) != NULL) 
+   if ((sp != NULL) 
(hdw-input_val = 0) 
(hdw-input_val  sp-cnt)) {
input = sp-def[hdw-input_val];
diff -r 1d7fea812926 -r 95f1cff44e9e linux/drivers/media/video/v4l2-ioctl.c
--- a/linux/drivers/media/video/v4l2-ioctl.cTue Aug 11 10:05:30 2009 -0300
+++ b/linux/drivers/media/video/v4l2-ioctl.cTue Aug 11 11:46:42 2009 -0300
@@ -1088,8 +1088,10 @@
/* Calls the specific handler */
if (ops-vidioc_g_std)
ret = ops-vidioc_g_std(file, fh, id);
+   else if (vfd-current_norm)
+   *id = vfd-current_norm;
else
-   *id = vfd-current_norm;
+   ret = -EINVAL;
 
if (!ret)
dbgarg(cmd, std=0x%08Lx\n, (long long unsigned)*id);
@@ -1560,12 +1562,19 @@
break;
ret = ops-vidioc_g_parm(file, fh, p);
} else {
+   v4l2_std_id std = vfd-current_norm;
+
if (p-type != V4L2_BUF_TYPE_VIDEO_CAPTURE)
return -EINVAL;
 
-   v4l2_video_std_frame_period(vfd-current_norm,
+   ret = 0;
+   if (ops-vidioc_g_std)
+   ret = ops-vidioc_g_std(file, fh, std);
+   else if (std == 0)
+   ret = -EINVAL;
+   if (ret == 0)
+   v4l2_video_std_frame_period(std,

p-parm.capture.timeperframe);
-   ret = 0;
}
 
dbgarg(cmd, type=%d\n, p-type);
diff -r 1d7fea812926 -r 95f1cff44e9e v4l2-apps/util/v4l2-ctl.cpp
--- 

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

2009-07-20 Thread Patch from Mauro Carvalho Chehab
The patch number 12299 was added via Mauro Carvalho Chehab mche...@redhat.com
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:
Linux Media Mailing List linux-me...@vger.kernel.org

--

From: Mauro Carvalho Chehab  mche...@redhat.com
merge: http://www.linuxtv.org/hg/~hverkuil/v4l-dvb-misc


Signed-off-by: Mauro Carvalho Chehab mche...@redhat.com


---

 linux/drivers/media/dvb/frontends/mt312.c |1 
 v4l/versions.txt  |6 ++--
 v4l2-apps/util/v4l2-ctl.cpp   |   33 ++
 3 files changed, 38 insertions(+), 2 deletions(-)

diff -r 9ebb6e8b085e -r ec4ea62dbde4 linux/drivers/media/dvb/frontends/mt312.c
--- a/linux/drivers/media/dvb/frontends/mt312.c Mon Jul 20 21:34:47 2009 -0300
+++ b/linux/drivers/media/dvb/frontends/mt312.c Mon Jul 20 21:36:49 2009 -0300
@@ -35,6 +35,7 @@
 #include dvb_frontend.h
 #include mt312_priv.h
 #include mt312.h
+#include compat.h
 
 
 struct mt312_state {
diff -r 9ebb6e8b085e -r ec4ea62dbde4 v4l/versions.txt
--- a/v4l/versions.txt  Mon Jul 20 21:34:47 2009 -0300
+++ b/v4l/versions.txt  Mon Jul 20 21:36:49 2009 -0300
@@ -26,11 +26,13 @@ SOC_CAMERA_MT9V022
 SOC_CAMERA_MT9V022
 SOC_CAMERA_MT9M001
 
+[2.6.24]
+# Some freezer routines
+USB_GSPCA_SN9C20X_EVDEV
+
 [2.6.23]
 # Needs field intf_assoc in struct usb_host_config
 VIDEO_CX231XX
-# Some freezer routines
-USB_GSPCA_SN9C20X_EVDEV
 
 [2.6.22]
 #This driver requires I2C probe/remove fields
diff -r 9ebb6e8b085e -r ec4ea62dbde4 v4l2-apps/util/v4l2-ctl.cpp
--- a/v4l2-apps/util/v4l2-ctl.cpp   Mon Jul 20 21:34:47 2009 -0300
+++ b/v4l2-apps/util/v4l2-ctl.cpp   Mon Jul 20 21:36:49 2009 -0300
@@ -147,6 +147,7 @@ typedef std::vectorstruct v4l2_ext_cont
 typedef std::vectorstruct v4l2_ext_control ctrl_list;
 static ctrl_list user_ctrls;
 static ctrl_list mpeg_ctrls;
+static ctrl_list camera_ctrls;
 
 typedef std::mapstd::string, unsigned ctrl_strmap;
 static ctrl_strmap ctrl_str2id;
@@ -2187,6 +2188,8 @@ set_vid_fmt_error:
ctrl.value = strtol(iter-second.c_str(), NULL, 0);
if (V4L2_CTRL_ID2CLASS(ctrl.id) == V4L2_CTRL_CLASS_MPEG)
mpeg_ctrls.push_back(ctrl);
+   else if (V4L2_CTRL_ID2CLASS(ctrl.id) == 
V4L2_CTRL_CLASS_CAMERA)
+   camera_ctrls.push_back(ctrl);
else
user_ctrls.push_back(ctrl);
}
@@ -2213,6 +2216,22 @@ set_vid_fmt_error:
else {
fprintf(stderr, %s: %s\n,

ctrl_id2str[mpeg_ctrls[ctrls.error_idx].id].c_str(),
+   strerror(errno));
+   }
+   }
+   }
+   if (camera_ctrls.size()) {
+   ctrls.ctrl_class = V4L2_CTRL_CLASS_CAMERA;
+   ctrls.count = camera_ctrls.size();
+   ctrls.controls = camera_ctrls[0];
+   if (doioctl(fd, VIDIOC_S_EXT_CTRLS, ctrls, 
VIDIOC_S_EXT_CTRLS)) {
+   if (ctrls.error_idx = ctrls.count) {
+   fprintf(stderr, Error setting CAMERA 
controls: %s\n,
+   strerror(errno));
+   }
+   else {
+   fprintf(stderr, %s: %s\n,
+   
ctrl_id2str[camera_ctrls[ctrls.error_idx].id].c_str(),
strerror(errno));
}
}
@@ -2432,6 +2451,7 @@ set_vid_fmt_error:
struct v4l2_ext_controls ctrls = { 0 };
 
mpeg_ctrls.clear();
+   camera_ctrls.clear();
user_ctrls.clear();
for (ctrl_get_list::iterator iter = get_ctrls.begin();
iter != get_ctrls.end(); ++iter) {
@@ -2440,6 +2460,8 @@ set_vid_fmt_error:
ctrl.id = ctrl_str2id[*iter];
if (V4L2_CTRL_ID2CLASS(ctrl.id) == V4L2_CTRL_CLASS_MPEG)
mpeg_ctrls.push_back(ctrl);
+   else if (V4L2_CTRL_ID2CLASS(ctrl.id) == 
V4L2_CTRL_CLASS_CAMERA)
+   camera_ctrls.push_back(ctrl);
else
user_ctrls.push_back(ctrl);
}
@@ -2457,6 +2479,17 @@ set_vid_fmt_error:
doioctl(fd, VIDIOC_G_EXT_CTRLS, 

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

2009-07-20 Thread Patch from Mauro Carvalho Chehab
The patch number 12301 was added via Mauro Carvalho Chehab mche...@redhat.com
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:
Linux Media Mailing List linux-me...@vger.kernel.org

--

From: Mauro Carvalho Chehab  mche...@redhat.com
merge: http://www.linuxtv.org/hg/~hverkuil/v4l-dvb-bttv


Signed-off-by: Mauro Carvalho Chehab mche...@redhat.com


---

 linux/drivers/media/video/bt8xx/bttv-cards.c  |  284 +-
 linux/drivers/media/video/bt8xx/bttv-driver.c |1 
 linux/drivers/media/video/bt8xx/bttv.h|1 
 3 files changed, 146 insertions(+), 140 deletions(-)

diff -r ec4ea62dbde4 -r b53e8f8496af 
linux/drivers/media/video/bt8xx/bttv-cards.c
--- a/linux/drivers/media/video/bt8xx/bttv-cards.c  Mon Jul 20 21:36:49 
2009 -0300
+++ b/linux/drivers/media/video/bt8xx/bttv-cards.c  Mon Jul 20 21:38:10 
2009 -0300
@@ -3362,8 +3362,6 @@ void __devinit bttv_init_card1(struct bt
 /* initialization part two -- after registering i2c bus */
 void __devinit bttv_init_card2(struct bttv *btv)
 {
-   int addr=ADDR_UNSET;
-
btv-tuner_type = UNSET;
 
if (BTTV_BOARD_UNKNOWN == btv-c.type) {
@@ -3508,9 +3506,6 @@ void __devinit bttv_init_card2(struct bt
btv-pll.pll_current = -1;
 
/* tuner configuration (from card list / autodetect / insmod option) */
-   if (ADDR_UNSET != bttv_tvcards[btv-c.type].tuner_addr)
-   addr = bttv_tvcards[btv-c.type].tuner_addr;
-
if (UNSET != bttv_tvcards[btv-c.type].tuner_type)
if (UNSET == btv-tuner_type)
btv-tuner_type = bttv_tvcards[btv-c.type].tuner_type;
@@ -3533,6 +3528,150 @@ void __devinit bttv_init_card2(struct bt
 
if (UNSET == btv-tuner_type)
btv-tuner_type = TUNER_ABSENT;
+
+   btv-dig = bttv_tvcards[btv-c.type].has_dig_in ?
+  bttv_tvcards[btv-c.type].video_inputs - 1 : UNSET;
+   btv-svhs = bttv_tvcards[btv-c.type].svhs == NO_SVHS ?
+   UNSET : bttv_tvcards[btv-c.type].svhs;
+   if (svhs[btv-c.nr] != UNSET)
+   btv-svhs = svhs[btv-c.nr];
+   if (remote[btv-c.nr] != UNSET)
+   btv-has_remote = remote[btv-c.nr];
+
+   if (bttv_tvcards[btv-c.type].has_radio)
+   btv-has_radio = 1;
+   if (bttv_tvcards[btv-c.type].has_remote)
+   btv-has_remote = 1;
+   if (!bttv_tvcards[btv-c.type].no_gpioirq)
+   btv-gpioirq = 1;
+   if (bttv_tvcards[btv-c.type].volume_gpio)
+   btv-volume_gpio = bttv_tvcards[btv-c.type].volume_gpio;
+   if (bttv_tvcards[btv-c.type].audio_mode_gpio)
+   btv-audio_mode_gpio = 
bttv_tvcards[btv-c.type].audio_mode_gpio;
+
+   if (btv-tuner_type == TUNER_ABSENT)
+   return;  /* no tuner or related drivers to load */
+
+   if (btv-has_saa6588 || saa6588[btv-c.nr]) {
+   /* Probe for RDS receiver chip */
+   static const unsigned short addrs[] = {
+   0x20  1,
+   0x22  1,
+   I2C_CLIENT_END
+   };
+   struct v4l2_subdev *sd;
+
+   sd = v4l2_i2c_new_probed_subdev(btv-c.v4l2_dev,
+   btv-c.i2c_adap, saa6588, saa6588, addrs);
+   btv-has_saa6588 = (sd != NULL);
+   }
+
+   /* try to detect audio/fader chips */
+
+   /* First check if the user specified the audio chip via a module
+  option. */
+
+   switch (audiodev[btv-c.nr]) {
+   case -1:
+   return; /* do not load any audio module */
+
+   case 0: /* autodetect */
+   break;
+
+   case 1: {
+   /* The user specified that we should probe for msp3400 */
+   static const unsigned short addrs[] = {
+   I2C_ADDR_MSP3400  1,
+   I2C_ADDR_MSP3400_ALT  1,
+   I2C_CLIENT_END
+   };
+
+   btv-sd_msp34xx = v4l2_i2c_new_probed_subdev(btv-c.v4l2_dev,
+   btv-c.i2c_adap, msp3400, msp3400, addrs);
+   if (btv-sd_msp34xx)
+   return;
+   goto no_audio;
+   }
+
+   case 2: {
+   /* The user specified that we should probe for tda7432 */
+   static const unsigned short addrs[] = {
+   I2C_ADDR_TDA7432  1,
+   I2C_CLIENT_END
+   };
+
+   if (v4l2_i2c_new_probed_subdev(btv-c.v4l2_dev,
+   btv-c.i2c_adap, tda7432, tda7432, addrs))
+   return;
+   goto no_audio;
+   }
+
+   case 3: {
+   /* 

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

2009-07-20 Thread Patch from Mauro Carvalho Chehab
The patch number 12321 was added via Mauro Carvalho Chehab mche...@redhat.com
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:
Linux Media Mailing List linux-me...@vger.kernel.org

--

From: Mauro Carvalho Chehab  mche...@redhat.com
merge: http://www.linuxtv.org/hg/~hverkuil/v4l-dvb-rds


Signed-off-by: Mauro Carvalho Chehab mche...@redhat.com


---

 linux/include/linux/videodev2.h   |2 ++
 v4l2-apps/test/Makefile   |2 +-
 v4l2-apps/util/v4l2-ctl.cpp   |4 
 v4l2-spec/common.sgml |2 +-
 v4l2-spec/compat.sgml |3 +++
 v4l2-spec/dev-radio.sgml  |   14 --
 v4l2-spec/dev-rds.sgml|   20 ++--
 v4l2-spec/pixfmt.sgml |5 +
 v4l2-spec/v4l2.sgml   |3 ++-
 v4l2-spec/vidioc-g-modulator.sgml |5 +
 v4l2-spec/vidioc-querycap.sgml|   14 +++---
 11 files changed, 56 insertions(+), 18 deletions(-)

diff -r 3c41023b73bc -r 824d2ff85bd5 linux/include/linux/videodev2.h
--- a/linux/include/linux/videodev2.h   Mon Jul 20 21:49:25 2009 -0300
+++ b/linux/include/linux/videodev2.h   Mon Jul 20 21:52:44 2009 -0300
@@ -252,10 +252,12 @@ struct v4l2_capability {
 #define V4L2_CAP_RDS_CAPTURE   0x0100  /* RDS data capture */
 #define V4L2_CAP_VIDEO_OUTPUT_OVERLAY  0x0200  /* Can do video output 
overlay */
 #define V4L2_CAP_HW_FREQ_SEEK  0x0400  /* Can do hardware 
frequency seek  */
+#define V4L2_CAP_RDS_OUTPUT0x0800  /* Is an RDS encoder */
 
 #define V4L2_CAP_TUNER 0x0001  /* has a tuner */
 #define V4L2_CAP_AUDIO 0x0002  /* has audio support */
 #define V4L2_CAP_RADIO 0x0004  /* is a radio device */
+#define V4L2_CAP_MODULATOR 0x0008  /* has a modulator */
 
 #define V4L2_CAP_READWRITE  0x0100  /* read/write systemcalls 
*/
 #define V4L2_CAP_ASYNCIO0x0200  /* async I/O */
diff -r 3c41023b73bc -r 824d2ff85bd5 v4l2-apps/test/Makefile
--- a/v4l2-apps/test/Makefile   Mon Jul 20 21:49:25 2009 -0300
+++ b/v4l2-apps/test/Makefile   Mon Jul 20 21:52:44 2009 -0300
@@ -34,6 +34,6 @@ pixfmt-test: pixfmt-test.o
$(CC) $(LDFLAGS) $^ $(LOADLIBES) $(LDLIBS) -o $@ -lX11
 
 v4l2grab: v4l2grab.o
-   $(CC) $(LDFLAGS) $^ -o $@ ../libv4l/libv4l2/libv4l2.so
+   $(CC) $(LDFLAGS) $^ -o $@ -L ../libv4l/libv4l2 -L 
../libv4l/libv4lconvert -lv4l2 -lv4lconvert
 
 include ../Make.rules
diff -r 3c41023b73bc -r 824d2ff85bd5 v4l2-apps/util/v4l2-ctl.cpp
--- a/v4l2-apps/util/v4l2-ctl.cpp   Mon Jul 20 21:49:25 2009 -0300
+++ b/v4l2-apps/util/v4l2-ctl.cpp   Mon Jul 20 21:52:44 2009 -0300
@@ -1020,8 +1020,12 @@ static std::string cap2s(unsigned cap)
s += \t\tSliced VBI Output\n;
if (cap  V4L2_CAP_RDS_CAPTURE)
s += \t\tRDS Capture\n;
+   if (cap  V4L2_CAP_RDS_OUTPUT)
+   s += \t\tRDS Output\n;
if (cap  V4L2_CAP_TUNER)
s += \t\tTuner\n;
+   if (cap  V4L2_CAP_MODULATOR)
+   s += \t\tModulator\n;
if (cap  V4L2_CAP_AUDIO)
s += \t\tAudio\n;
if (cap  V4L2_CAP_RADIO)
diff -r 3c41023b73bc -r 824d2ff85bd5 v4l2-spec/common.sgml
--- a/v4l2-spec/common.sgml Mon Jul 20 21:49:25 2009 -0300
+++ b/v4l2-spec/common.sgml Mon Jul 20 21:52:44 2009 -0300
@@ -491,7 +491,7 @@ the VIDIOC-G-MODULATOR; and VIDIOC-S-M
 constantVIDIOC_S_MODULATOR/constant does not switch the current
 modulator, when there is more than one at all. The modulator is solely
 determined by the current video output. Drivers must support both
-ioctls and set the constantV4L2_CAP_TUNER/constant (sic) flag in
+ioctls and set the constantV4L2_CAP_MODULATOR/constant flag in
 the v4l2-capability; returned by the VIDIOC-QUERYCAP; ioctl when the
 device has one or more modulators./para
 /section
diff -r 3c41023b73bc -r 824d2ff85bd5 v4l2-spec/compat.sgml
--- a/v4l2-spec/compat.sgml Mon Jul 20 21:49:25 2009 -0300
+++ b/v4l2-spec/compat.sgml Mon Jul 20 21:52:44 2009 -0300
@@ -2300,6 +2300,9 @@ was renamed to structname id=v4l2-chip-
  paraFinalized the RDS capture API. See xref linkend=rds for
 more information./para
/listitem
+   listitem
+ paraAdded new capabilities for modulators and RDS encoders./para
+   /listitem
/orderedlist
  /section
/section
diff -r 3c41023b73bc -r 824d2ff85bd5 v4l2-spec/dev-radio.sgml
--- a/v4l2-spec/dev-radio.sgml  Mon Jul 20 21:49:25 2009 -0300
+++ b/v4l2-spec/dev-radio.sgml  Mon Jul 20 21:52:44 2009 -0300
@@ -1,7 +1,7 @@
   titleRadio Interface/title
 
   paraThis interface is intended for 

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

2009-07-10 Thread Patch from Mauro Carvalho Chehab
The patch number 12220 was added via Mauro Carvalho Chehab mche...@redhat.com
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:
Linux Media Mailing List linux-me...@vger.kernel.org

--

From: Mauro Carvalho Chehab  mche...@redhat.com
merge: http://www.linuxtv.org/hg/~hverkuil/v4l-dvb-rds


Signed-off-by: Mauro Carvalho Chehab mche...@redhat.com


---

 linux/drivers/media/radio/radio-cadet.c   |6 
 linux/drivers/media/radio/radio-si470x.c  |9 
 linux/drivers/media/video/bt8xx/bttv-driver.c |2 
 linux/drivers/media/video/saa6588.c   |   60 +++-
 linux/drivers/media/video/saa7134/saa7134-core.c  |4 
 linux/drivers/media/video/saa7134/saa7134-video.c |2 
 linux/drivers/media/video/saa7134/saa7134.h   |1 
 linux/include/linux/videodev2.h   |   23 +
 v4l2-apps/util/v4l2-ctl.cpp   |4 
 v4l2-spec/biblio.sgml |   53 
 v4l2-spec/compat.sgml |   14 -
 v4l2-spec/dev-rds.sgml|  170 +++---
 v4l2-spec/v4l2.sgml   |7 
 v4l2-spec/vidioc-g-tuner.sgml |   17 +
 v4l2-spec/vidioc-querycap.sgml|2 
 15 files changed, 280 insertions(+), 94 deletions(-)

diff -r c300798213a9 -r f7cd45d09625 linux/drivers/media/radio/radio-cadet.c
--- a/linux/drivers/media/radio/radio-cadet.c   Sun Jul 05 19:08:55 2009 -0300
+++ b/linux/drivers/media/radio/radio-cadet.c   Fri Jul 10 17:05:19 2009 -0300
@@ -386,7 +386,8 @@ static int vidioc_querycap(struct file *
strlcpy(v-card, ADS Cadet, sizeof(v-card));
strlcpy(v-bus_info, ISA, sizeof(v-bus_info));
v-version = CADET_VERSION;
-   v-capabilities = V4L2_CAP_TUNER | V4L2_CAP_RADIO | V4L2_CAP_READWRITE;
+   v-capabilities = V4L2_CAP_TUNER | V4L2_CAP_RADIO |
+ V4L2_CAP_READWRITE | V4L2_CAP_RDS_CAPTURE;
return 0;
 }
 
@@ -399,7 +400,7 @@ static int vidioc_g_tuner(struct file *f
switch (v-index) {
case 0:
strlcpy(v-name, FM, sizeof(v-name));
-   v-capability = V4L2_TUNER_CAP_STEREO;
+   v-capability = V4L2_TUNER_CAP_STEREO | V4L2_TUNER_CAP_RDS;
v-rangelow = 1400; /* 87.5 MHz */
v-rangehigh = 1728;/* 108.0 MHz */
v-rxsubchans = cadet_getstereo(dev);
@@ -413,6 +414,7 @@ static int vidioc_g_tuner(struct file *f
default:
break;
}
+   v-rxsubchans |= V4L2_TUNER_SUB_RDS;
break;
case 1:
strlcpy(v-name, AM, sizeof(v-name));
diff -r c300798213a9 -r f7cd45d09625 linux/drivers/media/radio/radio-si470x.c
--- a/linux/drivers/media/radio/radio-si470x.c  Sun Jul 05 19:08:55 2009 -0300
+++ b/linux/drivers/media/radio/radio-si470x.c  Fri Jul 10 17:05:19 2009 -0300
@@ -1254,7 +1254,7 @@ static int si470x_vidioc_querycap(struct
usb_make_path(radio-usbdev, capability-bus_info, 
sizeof(capability-bus_info));
capability-version = DRIVER_KERNEL_VERSION;
capability-capabilities = V4L2_CAP_HW_FREQ_SEEK |
-   V4L2_CAP_TUNER | V4L2_CAP_RADIO;
+   V4L2_CAP_TUNER | V4L2_CAP_RADIO | V4L2_CAP_RDS_CAPTURE;
 
return 0;
 }
@@ -1413,7 +1413,8 @@ static int si470x_vidioc_g_tuner(struct 
/* driver constants */
strcpy(tuner-name, FM);
tuner-type = V4L2_TUNER_RADIO;
-   tuner-capability = V4L2_TUNER_CAP_LOW | V4L2_TUNER_CAP_STEREO;
+   tuner-capability = V4L2_TUNER_CAP_LOW | V4L2_TUNER_CAP_STEREO |
+   V4L2_TUNER_CAP_RDS;
 
/* range limits */
switch ((radio-registers[SYSCONFIG2]  SYSCONFIG2_BAND)  6) {
@@ -1439,6 +1440,10 @@ static int si470x_vidioc_g_tuner(struct 
tuner-rxsubchans = V4L2_TUNER_SUB_MONO;
else
tuner-rxsubchans = V4L2_TUNER_SUB_MONO | V4L2_TUNER_SUB_STEREO;
+   /* If there is a reliable method of detecting an RDS channel,
+  then this code should check for that before setting this
+  RDS subchannel. */
+   tuner-rxsubchans |= V4L2_TUNER_SUB_RDS;
 
/* mono/stereo selector */
if ((radio-registers[POWERCFG]  POWERCFG_MONO) == 0)
diff -r c300798213a9 -r f7cd45d09625 
linux/drivers/media/video/bt8xx/bttv-driver.c
--- a/linux/drivers/media/video/bt8xx/bttv-driver.c Sun Jul 05 19:08:55 
2009 -0300
+++ b/linux/drivers/media/video/bt8xx/bttv-driver.c Fri Jul 10 17:05:19 
2009 -0300
@@ -2679,6 +2679,8 @@ static int bttv_querycap(struct file *fi
V4L2_CAP_VBI_CAPTURE |

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

2009-06-30 Thread Patch from Mauro Carvalho Chehab
The patch number 12154 was added via Mauro Carvalho Chehab mche...@redhat.com
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:
Linux Media Mailing List linux-me...@vger.kernel.org

--

From: Mauro Carvalho Chehab  mche...@redhat.com
merge: http://www.linuxtv.org/hg/~hverkuil/v4l-dvb-misc


Signed-off-by: Mauro Carvalho Chehab mche...@redhat.com


---

 linux/drivers/media/dvb/ttpci/Kconfig |1 +
 linux/drivers/media/video/em28xx/em28xx-i2c.c |2 +-
 linux/drivers/media/video/v4l2-common.c   |2 +-
 v4l2-spec/pixfmt.sgml |7 ++-
 4 files changed, 9 insertions(+), 3 deletions(-)

diff -r 998a5e929c53 -r 363ee1ff6469 linux/drivers/media/dvb/ttpci/Kconfig
--- a/linux/drivers/media/dvb/ttpci/Kconfig Tue Jun 30 16:14:17 2009 -0300
+++ b/linux/drivers/media/dvb/ttpci/Kconfig Tue Jun 30 16:16:36 2009 -0300
@@ -1,5 +1,6 @@ config TTPCI_EEPROM
 config TTPCI_EEPROM
tristate
+   depends on I2C
default n
 
 config DVB_AV7110
diff -r 998a5e929c53 -r 363ee1ff6469 
linux/drivers/media/video/em28xx/em28xx-i2c.c
--- a/linux/drivers/media/video/em28xx/em28xx-i2c.c Tue Jun 30 16:14:17 
2009 -0300
+++ b/linux/drivers/media/video/em28xx/em28xx-i2c.c Tue Jun 30 16:16:36 
2009 -0300
@@ -461,7 +461,7 @@ static struct i2c_algorithm em28xx_algo 
 
 static struct i2c_adapter em28xx_adap_template = {
.owner = THIS_MODULE,
-#if LINUX_VERSION_CODE  KERNEL_VERSION(2, 6, 22)
+#if LINUX_VERSION_CODE  KERNEL_VERSION(2, 6, 26)
.class = I2C_CLASS_TV_ANALOG,
 #endif
.name = em28xx,
diff -r 998a5e929c53 -r 363ee1ff6469 linux/drivers/media/video/v4l2-common.c
--- a/linux/drivers/media/video/v4l2-common.c   Tue Jun 30 16:14:17 2009 -0300
+++ b/linux/drivers/media/video/v4l2-common.c   Tue Jun 30 16:16:36 2009 -0300
@@ -1066,7 +1066,7 @@ struct v4l2_subdev *v4l2_i2c_new_subdev_
u8 addr, const unsigned short *probe_addrs)
 {
struct v4l2_subdev *sd = NULL;
-   struct i2c_client *client;
+   struct i2c_client *client = NULL;
 
BUG_ON(!v4l2_dev);
 
diff -r 998a5e929c53 -r 363ee1ff6469 v4l2-spec/pixfmt.sgml
--- a/v4l2-spec/pixfmt.sgml Tue Jun 30 16:14:17 2009 -0300
+++ b/v4l2-spec/pixfmt.sgml Tue Jun 30 16:16:36 2009 -0300
@@ -724,9 +724,14 @@ kernel sources in the file filenameDoc
entry'M310'/entry
entryCompressed BGGR Bayer format used by the gspca 
driver./entry
  /row
+ row id=V4L2-PIX-FMT-OV511
+   entryconstantV4L2_PIX_FMT_OV511/constant/entry
+   entry'O511'/entry
+   entryOV511 JPEG format used by the gspca driver./entry
+ /row
  row id=V4L2-PIX-FMT-OV518
entryconstantV4L2_PIX_FMT_OV518/constant/entry
-   entry'0518'/entry
+   entry'O518'/entry
entryOV518 JPEG format used by the gspca driver./entry
  /row
  row id=V4L2-PIX-FMT-PJPG


---

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

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


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

2009-06-23 Thread Patch from Mauro Carvalho Chehab
The patch number 12129 was added via Mauro Carvalho Chehab mche...@redhat.com
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:
Linux Media Mailing List linux-me...@vger.kernel.org

--

From: Mauro Carvalho Chehab  mche...@redhat.com
merge: http://www.linuxtv.org/hg/~hverkuil/v4l-dvb-subdev2


Signed-off-by: Mauro Carvalho Chehab mche...@redhat.com


---

 linux/Documentation/video4linux/v4l2-framework.txt |   24 +
 linux/drivers/media/video/v4l2-common.c|  166 +
 linux/drivers/media/video/v4l2-device.c|4 
 linux/include/media/v4l2-common.h  |   18 +
 linux/include/media/v4l2-subdev.h  |7 
 v4l/compat.h   |6 
 6 files changed, 222 insertions(+), 3 deletions(-)

diff -r 57f76a6d4f1c -r e66472ac0f9f 
linux/Documentation/video4linux/v4l2-framework.txt
--- a/linux/Documentation/video4linux/v4l2-framework.txtSun Jun 21 
22:37:12 2009 -0300
+++ b/linux/Documentation/video4linux/v4l2-framework.txtTue Jun 23 
03:06:49 2009 -0300
@@ -390,6 +390,30 @@ To see which chip variants are supported
 To see which chip variants are supported you can look in the i2c driver code
 for the i2c_device_id table. This lists all the possibilities.
 
+There are two more helper functions:
+
+v4l2_i2c_new_subdev_cfg: this function adds new irq and platform_data
+arguments and has both 'addr' and 'probed_addrs' arguments: if addr is not
+0 then that will be used (non-probing variant), otherwise the probed_addrs
+are probed.
+
+For example: this will probe for address 0x10:
+
+struct v4l2_subdev *sd = v4l2_i2c_new_subdev_cfg(v4l2_dev, adapter,
+  module_foo, chipid, 0, NULL, 0, I2C_ADDRS(0x10));
+
+v4l2_i2c_new_subdev_board uses an i2c_board_info struct which is passed
+to the i2c driver and replaces the irq, platform_data and addr arguments.
+
+If the subdev supports the s_config core ops, then that op is called with
+the irq and platform_data arguments after the subdev was setup. The older
+v4l2_i2c_new_(probed_)subdev functions will call s_config as well, but with
+irq set to 0 and platform_data set to NULL.
+
+Note that in the next kernel release the functions v4l2_i2c_new_subdev,
+v4l2_i2c_new_probed_subdev and v4l2_i2c_new_probed_subdev_addr will all be
+replaced by a single v4l2_i2c_new_subdev that is identical to
+v4l2_i2c_new_subdev_cfg but without the irq and platform_data arguments.
 
 struct video_device
 ---
diff -r 57f76a6d4f1c -r e66472ac0f9f linux/drivers/media/video/v4l2-common.c
--- a/linux/drivers/media/video/v4l2-common.c   Sun Jun 21 22:37:12 2009 -0300
+++ b/linux/drivers/media/video/v4l2-common.c   Tue Jun 23 03:06:49 2009 -0300
@@ -868,6 +868,17 @@ struct v4l2_subdev *v4l2_i2c_new_subdev(
/* Decrease the module use count to match the first try_module_get. */
module_put(client-driver-driver.owner);
 
+   if (sd) {
+   /* We return errors from v4l2_subdev_call only if we have the
+  callback as the .s_config is not mandatory */
+   int err = v4l2_subdev_call(sd, core, s_config, 0, NULL);
+
+   if (err  err != -ENOIOCTLCMD) {
+   v4l2_device_unregister_subdev(sd);
+   sd = NULL;
+   }
+   }
+
 error:
 #if LINUX_VERSION_CODE = KERNEL_VERSION(2, 6, 26)
/* If we have a client but no subdev, then something went wrong and
@@ -931,6 +942,17 @@ struct v4l2_subdev *v4l2_i2c_new_probed_
/* Decrease the module use count to match the first try_module_get. */
module_put(client-driver-driver.owner);
 
+   if (sd) {
+   /* We return errors from v4l2_subdev_call only if we have the
+  callback as the .s_config is not mandatory */
+   int err = v4l2_subdev_call(sd, core, s_config, 0, NULL);
+
+   if (err  err != -ENOIOCTLCMD) {
+   v4l2_device_unregister_subdev(sd);
+   sd = NULL;
+   }
+   }
+
 error:
 #if LINUX_VERSION_CODE = KERNEL_VERSION(2, 6, 26)
/* If we have a client but no subdev, then something went wrong and
@@ -952,6 +974,150 @@ struct v4l2_subdev *v4l2_i2c_new_probed_
module_name, client_type, addrs);
 }
 EXPORT_SYMBOL_GPL(v4l2_i2c_new_probed_subdev_addr);
+
+/* Load an i2c sub-device. */
+#if LINUX_VERSION_CODE = KERNEL_VERSION(2, 6, 26)
+struct v4l2_subdev *v4l2_i2c_new_subdev_board(struct v4l2_device *v4l2_dev,
+   struct i2c_adapter *adapter, const char *module_name,
+   struct i2c_board_info *info, const unsigned short *probe_addrs)
+{
+   struct v4l2_subdev 

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

2009-06-15 Thread Patch from Mauro Carvalho Chehab
The patch number 11968 was added via Mauro Carvalho Chehab mche...@redhat.com
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:
Linux Media Mailing List linux-me...@vger.kernel.org

--

From: Mauro Carvalho Chehab  mche...@redhat.com
merge: http://www.linuxtv.org/hg/~hverkuil/v4l-dvb


Signed-off-by: Mauro Carvalho Chehab mche...@redhat.com


---

 linux/drivers/media/video/Makefile |   70 +++--
 linux/drivers/media/video/saa7134/Makefile |3 
 2 files changed, 38 insertions(+), 35 deletions(-)

diff -r 44cecc059229 -r efe2f2fa1c36 linux/drivers/media/video/Makefile
--- a/linux/drivers/media/video/MakefileMon Jun 15 10:04:00 2009 -0300
+++ b/linux/drivers/media/video/MakefileMon Jun 15 10:04:17 2009 -0300
@@ -12,6 +12,8 @@ omap2cam-objs :=  omap24xxcam.o omap24xxc
 
 videodev-objs  :=  v4l2-dev.o v4l2-ioctl.o v4l2-device.o
 
+# V4L2 core modules
+
 obj-$(CONFIG_VIDEO_DEV) += videodev.o v4l2-int-device.o
 ifeq ($(CONFIG_COMPAT),y)
   obj-$(CONFIG_VIDEO_DEV) += v4l2-compat-ioctl32.o
@@ -23,21 +25,15 @@ ifeq ($(CONFIG_VIDEO_V4L1_COMPAT),y)
   obj-$(CONFIG_VIDEO_DEV) += v4l1-compat.o
 endif
 
+# All i2c modules must come first:
+
 obj-$(CONFIG_VIDEO_TUNER) += tuner.o
-
-obj-$(CONFIG_VIDEO_BT848) += bt8xx/
-obj-$(CONFIG_VIDEO_IR_I2C)  += ir-kbd-i2c.o
 obj-$(CONFIG_VIDEO_TVAUDIO) += tvaudio.o
 obj-$(CONFIG_VIDEO_TDA7432) += tda7432.o
 obj-$(CONFIG_VIDEO_TDA9875) += tda9875.o
-
 obj-$(CONFIG_VIDEO_SAA6588) += saa6588.o
 obj-$(CONFIG_VIDEO_SAA5246A) += saa5246a.o
 obj-$(CONFIG_VIDEO_SAA5249) += saa5249.o
-obj-$(CONFIG_VIDEO_CQCAM) += c-qcam.o
-obj-$(CONFIG_VIDEO_BWQCAM) += bw-qcam.o
-obj-$(CONFIG_VIDEO_W9966) += w9966.o
-
 obj-$(CONFIG_VIDEO_TDA9840) += tda9840.o
 obj-$(CONFIG_VIDEO_TEA6415C) += tea6415c.o
 obj-$(CONFIG_VIDEO_TEA6420) += tea6420.o
@@ -56,11 +52,40 @@ obj-$(CONFIG_VIDEO_BT866) += bt866.o
 obj-$(CONFIG_VIDEO_BT866) += bt866.o
 obj-$(CONFIG_VIDEO_KS0127) += ks0127.o
 obj-$(CONFIG_VIDEO_THS7303) += ths7303.o
+obj-$(CONFIG_VIDEO_VINO) += indycam.o
+obj-$(CONFIG_VIDEO_TVP5150) += tvp5150.o
+obj-$(CONFIG_VIDEO_TVP514X) += tvp514x.o
+obj-$(CONFIG_VIDEO_MSP3400) += msp3400.o
+obj-$(CONFIG_VIDEO_CS5345) += cs5345.o
+obj-$(CONFIG_VIDEO_CS53L32A) += cs53l32a.o
+obj-$(CONFIG_VIDEO_M52790) += m52790.o
+obj-$(CONFIG_VIDEO_TLV320AIC23B) += tlv320aic23b.o
+obj-$(CONFIG_VIDEO_WM8775) += wm8775.o
+obj-$(CONFIG_VIDEO_WM8739) += wm8739.o
+obj-$(CONFIG_VIDEO_VP27SMPX) += vp27smpx.o
+obj-$(CONFIG_VIDEO_CX25840) += cx25840/
+obj-$(CONFIG_VIDEO_UPD64031A) += upd64031a.o
+obj-$(CONFIG_VIDEO_UPD64083) += upd64083.o
+obj-$(CONFIG_VIDEO_OV7670) += ov7670.o
+obj-$(CONFIG_VIDEO_TCM825X) += tcm825x.o
+obj-$(CONFIG_VIDEO_TVEEPROM) += tveeprom.o
 
+obj-$(CONFIG_SOC_CAMERA_MT9M001)   += mt9m001.o
+obj-$(CONFIG_SOC_CAMERA_MT9M111)   += mt9m111.o
+obj-$(CONFIG_SOC_CAMERA_MT9T031)   += mt9t031.o
+obj-$(CONFIG_SOC_CAMERA_MT9V022)   += mt9v022.o
+obj-$(CONFIG_SOC_CAMERA_OV772X)+= ov772x.o
+obj-$(CONFIG_SOC_CAMERA_TW9910)+= tw9910.o
+
+# And now the v4l2 drivers:
+
+obj-$(CONFIG_VIDEO_BT848) += bt8xx/
 obj-$(CONFIG_VIDEO_ZORAN) += zoran/
-
+obj-$(CONFIG_VIDEO_CQCAM) += c-qcam.o
+obj-$(CONFIG_VIDEO_BWQCAM) += bw-qcam.o
+obj-$(CONFIG_VIDEO_W9966) += w9966.o
 obj-$(CONFIG_VIDEO_PMS) += pms.o
-obj-$(CONFIG_VIDEO_VINO) += vino.o indycam.o
+obj-$(CONFIG_VIDEO_VINO) += vino.o
 obj-$(CONFIG_VIDEO_STRADIS) += stradis.o
 obj-$(CONFIG_VIDEO_CPIA) += cpia.o
 obj-$(CONFIG_VIDEO_CPIA_PP) += cpia_pp.o
@@ -71,17 +96,7 @@ obj-$(CONFIG_VIDEO_EM28XX) += em28xx/
 obj-$(CONFIG_VIDEO_EM28XX) += em28xx/
 obj-$(CONFIG_VIDEO_CX231XX) += cx231xx/
 obj-$(CONFIG_VIDEO_USBVISION) += usbvision/
-obj-$(CONFIG_VIDEO_TVP5150) += tvp5150.o
-obj-$(CONFIG_VIDEO_TVP514X) += tvp514x.o
 obj-$(CONFIG_VIDEO_PVRUSB2) += pvrusb2/
-obj-$(CONFIG_VIDEO_MSP3400) += msp3400.o
-obj-$(CONFIG_VIDEO_CS5345) += cs5345.o
-obj-$(CONFIG_VIDEO_CS53L32A) += cs53l32a.o
-obj-$(CONFIG_VIDEO_M52790) += m52790.o
-obj-$(CONFIG_VIDEO_TLV320AIC23B) += tlv320aic23b.o
-obj-$(CONFIG_VIDEO_WM8775) += wm8775.o
-obj-$(CONFIG_VIDEO_WM8739) += wm8739.o
-obj-$(CONFIG_VIDEO_VP27SMPX) += vp27smpx.o
 obj-$(CONFIG_VIDEO_OVCAMCHIP) += ovcamchip/
 obj-$(CONFIG_VIDEO_CPIA2) += cpia2/
 obj-$(CONFIG_VIDEO_MXB) += mxb.o
@@ -94,19 +109,12 @@ obj-$(CONFIG_VIDEOBUF_VMALLOC) += videob
 obj-$(CONFIG_VIDEOBUF_VMALLOC) += videobuf-vmalloc.o
 obj-$(CONFIG_VIDEOBUF_DVB) += videobuf-dvb.o
 obj-$(CONFIG_VIDEO_BTCX)  += btcx-risc.o
-obj-$(CONFIG_VIDEO_TVEEPROM) += tveeprom.o
 
 obj-$(CONFIG_VIDEO_M32R_AR_M64278) += arv.o
 
-obj-$(CONFIG_VIDEO_CX25840) += cx25840/
-obj-$(CONFIG_VIDEO_UPD64031A) += upd64031a.o
-obj-$(CONFIG_VIDEO_UPD64083) += 

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

2009-04-05 Thread Patch from Mauro Carvalho Chehab
The patch number 11385 was added via Mauro Carvalho Chehab mche...@redhat.com
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:
Linux Media Mailing List linux-me...@vger.kernel.org

--

From: Mauro Carvalho Chehab  mche...@redhat.com
merge: http://www.linuxtv.org/hg/~hverkuil/v4l-dvb


Signed-off-by: Mauro Carvalho Chehab mche...@redhat.com


---

 linux/Documentation/video4linux/v4l2-framework.txt  |   19 
 linux/drivers/media/common/saa7146_i2c.c|6 
 linux/drivers/media/dvb/frontends/au8522_decoder.c  |   18 
 linux/drivers/media/video/Makefile  |2 
 linux/drivers/media/video/adv7170.c |   29 -
 linux/drivers/media/video/adv7175.c |   21 -
 linux/drivers/media/video/au0828/au0828-cards.c |8 
 linux/drivers/media/video/au0828/au0828-video.c |   12 
 linux/drivers/media/video/bt819.c   |   25 -
 linux/drivers/media/video/bt856.c   |   19 
 linux/drivers/media/video/bt866.c   |   15 
 linux/drivers/media/video/bt8xx/bttv-cards.c|   70 +--
 linux/drivers/media/video/bt8xx/bttv-driver.c   |   25 -
 linux/drivers/media/video/bt8xx/bttv-i2c.c  |4 
 linux/drivers/media/video/bt8xx/bttvp.h |2 
 linux/drivers/media/video/cafe_ccic.c   |2 
 linux/drivers/media/video/cs5345.c  |   19 
 linux/drivers/media/video/cs53l32a.c|   15 
 linux/drivers/media/video/cx18/cx18-audio.c |9 
 linux/drivers/media/video/cx18/cx18-av-core.c   |   78 +--
 linux/drivers/media/video/cx18/cx18-av-core.h   |5 
 linux/drivers/media/video/cx18/cx18-driver.c|4 
 linux/drivers/media/video/cx18/cx18-fileops.c   |2 
 linux/drivers/media/video/cx18/cx18-gpio.c  |6 
 linux/drivers/media/video/cx18/cx18-i2c.c   |   16 
 linux/drivers/media/video/cx18/cx18-ioctl.c |   12 
 linux/drivers/media/video/cx18/cx18-video.c |   16 
 linux/drivers/media/video/cx231xx/cx231xx-cards.c   |   15 
 linux/drivers/media/video/cx231xx/cx231xx-video.c   |   11 
 linux/drivers/media/video/cx23885/cx23885-417.c |2 
 linux/drivers/media/video/cx23885/cx23885-cards.c   |5 
 linux/drivers/media/video/cx23885/cx23885-core.c|2 
 linux/drivers/media/video/cx23885/cx23885-dvb.c |2 
 linux/drivers/media/video/cx23885/cx23885-i2c.c |2 
 linux/drivers/media/video/cx23885/cx23885-video.c   |   22 -
 linux/drivers/media/video/cx23885/cx23885.h |2 
 linux/drivers/media/video/cx25840/cx25840-core.c|   26 -
 linux/drivers/media/video/cx88/cx88-cards.c |   17 
 linux/drivers/media/video/cx88/cx88-core.c  |2 
 linux/drivers/media/video/cx88/cx88-dvb.c   |2 
 linux/drivers/media/video/cx88/cx88-i2c.c   |2 
 linux/drivers/media/video/cx88/cx88-video.c |   27 -
 linux/drivers/media/video/cx88/cx88.h   |2 
 linux/drivers/media/video/em28xx/em28xx-cards.c |   36 -
 linux/drivers/media/video/em28xx/em28xx-core.c  |   11 
 linux/drivers/media/video/em28xx/em28xx-video.c |   23 -
 linux/drivers/media/video/indycam.c |2 
 linux/drivers/media/video/ivtv/ivtv-driver.c|9 
 linux/drivers/media/video/ivtv/ivtv-fileops.c   |   17 
 linux/drivers/media/video/ivtv/ivtv-gpio.c  |   34 -
 linux/drivers/media/video/ivtv/ivtv-i2c.c   |   21 -
 linux/drivers/media/video/ivtv/ivtv-ioctl.c |   16 
 linux/drivers/media/video/ivtv/ivtv-routing.c   |   66 +--
 linux/drivers/media/video/ks0127.c  |   23 -
 linux/drivers/media/video/m52790.c  |   15 
 linux/drivers/media/video/msp3400-driver.c  |   44 +-
 linux/drivers/media/video/msp3400-driver.h  |3 
 linux/drivers/media/video/msp3400-kthreads.c|6 
 linux/drivers/media/video/mxb.c |  148 +++
 linux/drivers/media/video/ovcamchip/ovcamchip_core.c|2 
 linux/drivers/media/video/pvrusb2/pvrusb2-audio.c   |8 
 linux/drivers/media/video/pvrusb2/pvrusb2-cs53l32a.c|7 
 linux/drivers/media/video/pvrusb2/pvrusb2-cx2584x-v4l.c |9 
 linux/drivers/media/video/pvrusb2/pvrusb2-hdw.c |8 
 linux/drivers/media/video/pvrusb2/pvrusb2-video-v4l.c   |8 
 linux/drivers/media/video/pvrusb2/pvrusb2-wm8775.c  |   12 
 linux/drivers/media/video/saa5246a.c  

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

2009-03-30 Thread Patch from Mauro Carvalho Chehab
The patch number 11317 was added via Mauro Carvalho Chehab mche...@redhat.com
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:
Linux Media Mailing List linux-me...@vger.kernel.org

--

From: Mauro Carvalho Chehab  mche...@redhat.com
merge: http://www.linuxtv.org/hg/~hverkuil/v4l-dvb


Signed-off-by: Mauro Carvalho Chehab mche...@redhat.com


---

 linux/drivers/media/dvb/frontends/au8522_decoder.c |1 
 linux/drivers/media/video/cx18/cx18-av-audio.c |  138 ++--
 linux/drivers/media/video/cx18/cx18-av-core.c  |   29 -
 linux/drivers/media/video/cx18/cx18-av-core.h  |9 
 linux/drivers/media/video/cx18/cx18-av-vbi.c   |  361 ++---
 linux/drivers/media/video/cx25840/cx25840-audio.c  |  129 ++--
 linux/drivers/media/video/cx25840/cx25840-core.c   |   26 
 linux/drivers/media/video/cx25840/cx25840-core.h   |8 
 linux/drivers/media/video/cx25840/cx25840-vbi.c|  354 ++--
 linux/drivers/media/video/ks0127.c |   23 
 linux/drivers/media/video/saa7115.c|4 
 linux/drivers/media/video/saa7191.c|1 
 linux/drivers/media/video/tuner-core.c |  146 -
 linux/drivers/media/video/tvp5150.c|8 
 linux/drivers/media/video/vpx3220.c|8 
 linux/include/media/v4l2-subdev.h  |2 
 16 files changed, 530 insertions(+), 717 deletions(-)

diff discarded since it is too big

---

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

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


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

2009-03-29 Thread Patch from Mauro Carvalho Chehab
The patch number 11257 was added via Mauro Carvalho Chehab mche...@redhat.com
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:
Linux Media Mailing List linux-me...@vger.kernel.org

--

From: Mauro Carvalho Chehab  mche...@redhat.com
merge: http://www.linuxtv.org/hg/~hverkuil/v4l-dvb


Signed-off-by: Mauro Carvalho Chehab mche...@redhat.com


---

 linux/drivers/media/dvb/bt8xx/dst_ca.c  |9 +
 linux/drivers/media/video/cs53l32a.c|   10 +++---
 linux/drivers/media/video/dabusb.c  |2 +-
 linux/drivers/media/video/saa7134/saa6752hs.c   |2 +-
 linux/drivers/media/video/saa7134/saa7134-cards.c   |8 
 linux/drivers/media/video/saa7134/saa7134-core.c|5 +++--
 linux/drivers/media/video/saa7134/saa7134-empress.c |3 +--
 linux/drivers/media/video/saa7134/saa7134.h |1 +
 8 files changed, 23 insertions(+), 17 deletions(-)

diff -r d6aeae810c55 -r e5e3c5df85be linux/drivers/media/dvb/bt8xx/dst_ca.c
--- a/linux/drivers/media/dvb/bt8xx/dst_ca.cSun Mar 29 04:37:46 2009 -0300
+++ b/linux/drivers/media/dvb/bt8xx/dst_ca.cSun Mar 29 05:34:18 2009 -0300
@@ -650,16 +650,17 @@ free_mem_and_exit:
 
 static long dst_ca_ioctl(struct file *file, unsigned int cmd, unsigned long 
ioctl_arg)
 {
-   lock_kernel();
-
-   struct dvb_device* dvbdev = (struct dvb_device*) file-private_data;
-   struct dst_state* state = (struct dst_state*) dvbdev-priv;
+   struct dvb_device *dvbdev;
+   struct dst_state *state;
struct ca_slot_info *p_ca_slot_info;
struct ca_caps *p_ca_caps;
struct ca_msg *p_ca_message;
void __user *arg = (void __user *)ioctl_arg;
int result = 0;
 
+   lock_kernel();
+   dvbdev = (struct dvb_device *)file-private_data;
+   state = (struct dst_state *)dvbdev-priv;
p_ca_message = kmalloc(sizeof (struct ca_msg), GFP_KERNEL);
p_ca_slot_info = kmalloc(sizeof (struct ca_slot_info), GFP_KERNEL);
p_ca_caps = kmalloc(sizeof (struct ca_caps), GFP_KERNEL);
diff -r d6aeae810c55 -r e5e3c5df85be linux/drivers/media/video/cs53l32a.c
--- a/linux/drivers/media/video/cs53l32a.c  Sun Mar 29 04:37:46 2009 -0300
+++ b/linux/drivers/media/video/cs53l32a.c  Sun Mar 29 05:34:18 2009 -0300
@@ -29,7 +29,7 @@
 #include linux/videodev2.h
 #include media/v4l2-device.h
 #include media/v4l2-chip-ident.h
-#include media/v4l2-i2c-drv-legacy.h
+#include media/v4l2-i2c-drv.h
 #include compat.h
 
 MODULE_DESCRIPTION(i2c device driver for cs53l32a Audio ADC);
@@ -42,9 +42,11 @@ module_param(debug, bool, 0644);
 
 MODULE_PARM_DESC(debug, Debugging messages, 0=Off (default), 1=On);
 
+#if LINUX_VERSION_CODE  KERNEL_VERSION(2, 6, 22)
 static unsigned short normal_i2c[] = { 0x22  1, I2C_CLIENT_END };
 
 I2C_CLIENT_INSMOD;
+#endif
 
 /* --- */
 
@@ -121,11 +123,6 @@ static int cs53l32a_log_status(struct v4
(m  0xC0) ?  (muted) : );
v4l2_info(sd, Volume: %d dB\n, vol);
return 0;
-}
-
-static int cs53l32a_command(struct i2c_client *client, unsigned cmd, void *arg)
-{
-   return v4l2_subdev_command(i2c_get_clientdata(client), cmd, arg);
 }
 
 /* --- */
@@ -225,7 +222,6 @@ MODULE_DEVICE_TABLE(i2c, cs53l32a_id);
 #endif
 static struct v4l2_i2c_driver_data v4l2_i2c_data = {
.name = cs53l32a,
-   .command = cs53l32a_command,
.remove = cs53l32a_remove,
.probe = cs53l32a_probe,
 #if LINUX_VERSION_CODE = KERNEL_VERSION(2, 6, 26)
diff -r d6aeae810c55 -r e5e3c5df85be linux/drivers/media/video/dabusb.c
--- a/linux/drivers/media/video/dabusb.cSun Mar 29 04:37:46 2009 -0300
+++ b/linux/drivers/media/video/dabusb.cSun Mar 29 05:34:18 2009 -0300
@@ -736,7 +736,6 @@ static int dabusb_release (struct inode 
 
 static long dabusb_ioctl (struct file *file, unsigned int cmd, unsigned long 
arg)
 {
-   lock_kernel();
pdabusb_t s = (pdabusb_t) file-private_data;
pbulk_transfer_t pbulk;
int ret = 0;
@@ -744,6 +743,7 @@ static long dabusb_ioctl (struct file *f
 
dbg(dabusb_ioctl);
 
+   lock_kernel();
if (s-remove_pending) {
unlock_kernel();
return -EIO;
diff -r d6aeae810c55 -r e5e3c5df85be 
linux/drivers/media/video/saa7134/saa6752hs.c
--- a/linux/drivers/media/video/saa7134/saa6752hs.c Sun Mar 29 04:37:46 
2009 -0300
+++ b/linux/drivers/media/video/saa7134/saa6752hs.c Sun Mar 29 05:34:18 
2009 -0300
@@ -48,7 +48,7 @@
 
 #if LINUX_VERSION_CODE  KERNEL_VERSION(2, 6, 22)
 /* Addresses to 

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

2009-03-29 Thread Patch from Mauro Carvalho Chehab
The patch number 11280 was added via Mauro Carvalho Chehab mche...@redhat.com
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:
Linux Media Mailing List linux-me...@vger.kernel.org

--

From: Mauro Carvalho Chehab  mche...@redhat.com
merge: http://www.linuxtv.org/hg/~hverkuil/v4l-dvb-bttv


Signed-off-by: Mauro Carvalho Chehab mche...@redhat.com


---

 linux/drivers/media/video/bt8xx/Kconfig   |1 
 linux/drivers/media/video/bt8xx/bttv-cards.c  |  187 +++---
 linux/drivers/media/video/bt8xx/bttv-driver.c |   43 +---
 linux/drivers/media/video/bt8xx/bttv-i2c.c|   52 -
 linux/drivers/media/video/bt8xx/bttv.h|7 
 linux/drivers/media/video/bt8xx/bttvp.h   |5 
 linux/drivers/media/video/tvaudio.c   |  158 ++-
 7 files changed, 341 insertions(+), 112 deletions(-)

diff -r 055d56e8f2d1 -r df7a51ffa2ba linux/drivers/media/video/bt8xx/Kconfig
--- a/linux/drivers/media/video/bt8xx/Kconfig   Sun Mar 29 05:51:18 2009 -0300
+++ b/linux/drivers/media/video/bt8xx/Kconfig   Sun Mar 29 05:58:58 2009 -0300
@@ -10,7 +10,6 @@ config VIDEO_BT848
select VIDEO_MSP3400 if VIDEO_HELPER_CHIPS_AUTO
select VIDEO_TVAUDIO if VIDEO_HELPER_CHIPS_AUTO
select VIDEO_TDA7432 if VIDEO_HELPER_CHIPS_AUTO
-   select VIDEO_TDA9875 if VIDEO_HELPER_CHIPS_AUTO
---help---
  Support for BT848 based frame grabber/overlay boards. This includes
  the Miro, Hauppauge and STB boards. Please read the material in
diff -r 055d56e8f2d1 -r df7a51ffa2ba 
linux/drivers/media/video/bt8xx/bttv-cards.c
--- a/linux/drivers/media/video/bt8xx/bttv-cards.c  Sun Mar 29 05:51:18 
2009 -0300
+++ b/linux/drivers/media/video/bt8xx/bttv-cards.c  Sun Mar 29 05:58:58 
2009 -0300
@@ -97,12 +97,10 @@ static unsigned int tuner[BTTV_MAX]  = {
 static unsigned int tuner[BTTV_MAX]  = { [ 0 ... (BTTV_MAX-1) ] = UNSET };
 static unsigned int svhs[BTTV_MAX]   = { [ 0 ... (BTTV_MAX-1) ] = UNSET };
 static unsigned int remote[BTTV_MAX] = { [ 0 ... (BTTV_MAX-1) ] = UNSET };
+static unsigned int audiodev[BTTV_MAX];
+static unsigned int saa6588[BTTV_MAX];
 static struct bttv  *master[BTTV_MAX] = { [ 0 ... (BTTV_MAX-1) ] = NULL };
-#ifdef MODULE
-static unsigned int autoload = 1;
-#else
-static unsigned int autoload;
-#endif
+static unsigned int autoload = UNSET;
 static unsigned int gpiomask = UNSET;
 static unsigned int audioall = UNSET;
 static unsigned int audiomux[5] = { [ 0 ... 4 ] = UNSET };
@@ -121,6 +119,7 @@ module_param_array(tuner,int, NULL, 
 module_param_array(tuner,int, NULL, 0444);
 module_param_array(svhs, int, NULL, 0444);
 module_param_array(remote,   int, NULL, 0444);
+module_param_array(audiodev, int, NULL, 0444);
 module_param_array(audiomux, int, NULL, 0444);
 
 MODULE_PARM_DESC(triton1,set ETBF pci config bit 
@@ -131,7 +130,14 @@ MODULE_PARM_DESC(card,specify TV/grabbe
 MODULE_PARM_DESC(card,specify TV/grabber card model, see CARDLIST file for a 
list);
 MODULE_PARM_DESC(pll,specify installed crystal (0=none, 28=28 MHz, 35=35 
MHz));
 MODULE_PARM_DESC(tuner,specify installed tuner type);
-MODULE_PARM_DESC(autoload,automatically load i2c modules like tuner.o, 
default is 1 (yes));
+MODULE_PARM_DESC(autoload, obsolete option, please do not use anymore);
+MODULE_PARM_DESC(audiodev, specify audio device:\n
+   \t\t-1 = no audio\n
+   \t\t 0 = autodetect (default)\n
+   \t\t 1 = msp3400\n
+   \t\t 2 = tda7432\n
+   \t\t 3 = tvaudio);
+MODULE_PARM_DESC(saa6588, if 1, then load the saa6588 RDS module, default (0) 
is to use the card definition.);
 MODULE_PARM_DESC(no_overlay,allow override overlay default (0 disables, 1 
enables)
 [some VIA/SIS chipsets are known to have problem with 
overlay]);
 
@@ -3356,6 +3362,17 @@ void __devinit bttv_init_card1(struct bt
 /* initialization part two -- after registering i2c bus */
 void __devinit bttv_init_card2(struct bttv *btv)
 {
+   static const unsigned short tvaudio_addrs[] = {
+   I2C_ADDR_TDA84251,
+   I2C_ADDR_TEA63001,
+   I2C_ADDR_TEA64201,
+   I2C_ADDR_TDA98401,
+   I2C_ADDR_TDA985x_L  1,
+   I2C_ADDR_TDA985x_H  1,
+   I2C_ADDR_TDA98741,
+   I2C_ADDR_PIC16C54   1,
+   I2C_CLIENT_END
+   };
int addr=ADDR_UNSET;
 
btv-tuner_type = UNSET;
@@ -3519,6 +3536,12 @@ void __devinit bttv_init_card2(struct bt
printk(KERN_INFO bttv%d: tuner type=%d\n, btv-c.nr,
   btv-tuner_type);
 
+   if (autoload != UNSET) {
+   printk(KERN_WARNING bttv%d: 

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

2009-03-29 Thread Patch from Mauro Carvalho Chehab
The patch number 11299 was added via Mauro Carvalho Chehab mche...@redhat.com
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:
Linux Media Mailing List linux-me...@vger.kernel.org

--

From: Mauro Carvalho Chehab  mche...@redhat.com
merge: http://www.linuxtv.org/hg/~hverkuil/v4l-dvb-cx23885


Signed-off-by: Mauro Carvalho Chehab mche...@redhat.com


---

 linux/drivers/media/video/cx23885/cx23885-417.c   |   25 +---
 linux/drivers/media/video/cx23885/cx23885-cards.c |4 
 linux/drivers/media/video/cx23885/cx23885-core.c  |   19 +--
 linux/drivers/media/video/cx23885/cx23885-dvb.c   |2 
 linux/drivers/media/video/cx23885/cx23885-i2c.c   |   87 +-
 linux/drivers/media/video/cx23885/cx23885-video.c |   68 ++
 linux/drivers/media/video/cx23885/cx23885.h   |   14 +-
 linux/drivers/media/video/cx25840/cx25840-core.c  |   31 +---
 8 files changed, 90 insertions(+), 160 deletions(-)

diff -r 4e08533a91b6 -r 870b915a49ea 
linux/drivers/media/video/cx23885/cx23885-417.c
--- a/linux/drivers/media/video/cx23885/cx23885-417.c   Sun Mar 29 22:46:14 
2009 -0300
+++ b/linux/drivers/media/video/cx23885/cx23885-417.c   Sun Mar 29 22:48:51 
2009 -0300
@@ -896,7 +896,7 @@ static int cx23885_load_firmware(struct 
if (retval != 0) {
printk(KERN_ERR
ERROR: Hotplug firmware request failed (%s).\n,
-   CX2341X_FIRM_ENC_FILENAME);
+   CX23885_FIRM_IMAGE_NAME);
printk(KERN_ERR Please fix your hotplug setup, the board will 
not work without firmware loaded!\n);
return -1;
@@ -1194,8 +1194,7 @@ static int vidioc_s_std(struct file *fil
 * This will likely need to be enabled for non NTSC
 * formats.
 */
-   cx23885_call_i2c_clients(dev-i2c_bus[0], VIDIOC_S_STD, id);
-   cx23885_call_i2c_clients(dev-i2c_bus[1], VIDIOC_S_STD, id);
+   call_all(dev, tuner, s_std, id);
 #endif
return 0;
 }
@@ -1259,8 +1258,7 @@ static int vidioc_g_tuner(struct file *f
if (0 != t-index)
return -EINVAL;
strcpy(t-name, Television);
-   cx23885_call_i2c_clients(dev-i2c_bus[2], VIDIOC_G_TUNER, t);
-   cx23885_call_i2c_clients(dev-i2c_bus[1], VIDIOC_G_TUNER, t);
+   call_all(dev, tuner, g_tuner, t);
 
dprintk(1, VIDIOC_G_TUNER: tuner type %d\n, t-type);
 
@@ -1277,7 +1275,7 @@ static int vidioc_s_tuner(struct file *f
return -EINVAL;
 
/* Update the A/V core */
-   cx23885_call_i2c_clients(dev-i2c_bus[2], VIDIOC_S_TUNER, t);
+   call_all(dev, tuner, s_tuner, t);
 
return 0;
 }
@@ -1293,8 +1291,7 @@ static int vidioc_g_frequency(struct fil
f-type = V4L2_TUNER_ANALOG_TV;
f-frequency = dev-freq;
 
-   /* Assumption that tuner is always on bus 1 */
-   cx23885_call_i2c_clients(dev-i2c_bus[1], VIDIOC_G_FREQUENCY, f);
+   call_all(dev, tuner, g_frequency, f);
 
return 0;
 }
@@ -1321,8 +1318,7 @@ static int vidioc_s_frequency(struct fil
return -EINVAL;
dev-freq = f-frequency;
 
-   /* Assumption that tuner is always on bus 1 */
-   cx23885_call_i2c_clients(dev-i2c_bus[1], VIDIOC_S_FREQUENCY, f);
+   call_all(dev, tuner, s_frequency, f);
 
cx23885_initialize_codec(dev);
 
@@ -1336,7 +1332,7 @@ static int vidioc_s_ctrl(struct file *fi
struct cx23885_dev *dev = fh-dev;
 
/* Update the A/V core */
-   cx23885_call_i2c_clients(dev-i2c_bus[2], VIDIOC_S_CTRL, ctl);
+   call_all(dev, core, s_ctrl, ctl);
return 0;
 }
 
@@ -1532,12 +1528,7 @@ static int vidioc_log_status(struct file
printk(KERN_INFO
%s/2:   START LOG STATUS  \n,
   dev-name);
-   cx23885_call_i2c_clients(dev-i2c_bus[0], VIDIOC_LOG_STATUS,
-   NULL);
-   cx23885_call_i2c_clients(dev-i2c_bus[1], VIDIOC_LOG_STATUS,
-   NULL);
-   cx23885_call_i2c_clients(dev-i2c_bus[2], VIDIOC_LOG_STATUS,
-   NULL);
+   call_all(dev, core, log_status);
cx2341x_log_status(dev-mpeg_params, name);
printk(KERN_INFO
%s/2: =  END LOG STATUS  =\n,
diff -r 4e08533a91b6 -r 870b915a49ea 
linux/drivers/media/video/cx23885/cx23885-cards.c
--- a/linux/drivers/media/video/cx23885/cx23885-cards.c Sun Mar 29 22:46:14 
2009 -0300
+++ b/linux/drivers/media/video/cx23885/cx23885-cards.c Sun Mar 29 22:48:51 
2009 -0300
@@ -740,7 +740,9 @@ void cx23885_card_setup(struct cx23885_d
case CX23885_BOARD_LEADTEK_WINFAST_PXDVR3200_H:
case CX23885_BOARD_COMPRO_VIDEOMATE_E650F:

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

2009-03-29 Thread Patch from Mauro Carvalho Chehab
The patch number 11306 was added via Mauro Carvalho Chehab mche...@redhat.com
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:
Linux Media Mailing List linux-me...@vger.kernel.org

--

From: Mauro Carvalho Chehab  mche...@redhat.com
merge: http://www.linuxtv.org/hg/~hverkuil/v4l-dvb-cx88


Signed-off-by: Mauro Carvalho Chehab mche...@redhat.com


---

 linux/drivers/media/video/cs5345.c   |7 -
 linux/drivers/media/video/cx88/cx88-blackbird.c  |4 
 linux/drivers/media/video/cx88/cx88-cards.c  |   48 ---
 linux/drivers/media/video/cx88/cx88-core.c   |7 +
 linux/drivers/media/video/cx88/cx88-dvb.c|2 
 linux/drivers/media/video/cx88/cx88-i2c.c|   39 
 linux/drivers/media/video/cx88/cx88-video.c  |   44 +++---
 linux/drivers/media/video/cx88/cx88.h|   14 ++-
 linux/drivers/media/video/m52790.c   |6 -
 linux/drivers/media/video/ovcamchip/ovcamchip_core.c |6 -
 linux/drivers/media/video/saa717x.c  |7 -
 linux/drivers/media/video/tda7432.c  |   10 --
 linux/drivers/media/video/tda9875.c  |   10 --
 linux/drivers/media/video/tlv320aic23b.c |6 -
 linux/drivers/media/video/upd64031a.c|6 -
 linux/drivers/media/video/upd64083.c |6 -
 linux/drivers/media/video/vp27smpx.c |6 -
 linux/drivers/media/video/wm8739.c   |6 -
 linux/drivers/media/video/wm8775.c   |   11 --
 19 files changed, 102 insertions(+), 143 deletions(-)

diff -r 870b915a49ea -r f86c84534cb4 linux/drivers/media/video/cs5345.c
--- a/linux/drivers/media/video/cs5345.cSun Mar 29 22:48:51 2009 -0300
+++ b/linux/drivers/media/video/cs5345.cSun Mar 29 22:54:35 2009 -0300
@@ -147,11 +147,6 @@ static int cs5345_log_status(struct v4l2
return 0;
 }
 
-static int cs5345_command(struct i2c_client *client, unsigned cmd, void *arg)
-{
-   return v4l2_subdev_command(i2c_get_clientdata(client), cmd, arg);
-}
-
 /* --- */
 
 static const struct v4l2_subdev_core_ops cs5345_core_ops = {
@@ -222,8 +217,6 @@ MODULE_DEVICE_TABLE(i2c, cs5345_id);
 #endif
 static struct v4l2_i2c_driver_data v4l2_i2c_data = {
.name = cs5345,
-   .driverid = I2C_DRIVERID_CS5345,
-   .command = cs5345_command,
.probe = cs5345_probe,
.remove = cs5345_remove,
 #if LINUX_VERSION_CODE = KERNEL_VERSION(2, 6, 26)
diff -r 870b915a49ea -r f86c84534cb4 
linux/drivers/media/video/cx88/cx88-blackbird.c
--- a/linux/drivers/media/video/cx88/cx88-blackbird.c   Sun Mar 29 22:48:51 
2009 -0300
+++ b/linux/drivers/media/video/cx88/cx88-blackbird.c   Sun Mar 29 22:54:35 
2009 -0300
@@ -934,7 +934,7 @@ static int vidioc_log_status (struct fil
snprintf(name, sizeof(name), %s/2, core-name);
printk(%s/2:   START LOG STATUS  \n,
core-name);
-   cx88_call_i2c_clients(core, VIDIOC_LOG_STATUS, NULL);
+   call_all(core, core, log_status);
cx2341x_log_status(dev-params, name);
printk(%s/2: =  END LOG STATUS  =\n,
core-name);
@@ -989,7 +989,7 @@ static int vidioc_g_frequency (struct fi
 
f-type = V4L2_TUNER_ANALOG_TV;
f-frequency = core-freq;
-   cx88_call_i2c_clients(core,VIDIOC_G_FREQUENCY,f);
+   call_all(core, tuner, g_frequency, f);
 
return 0;
 }
diff -r 870b915a49ea -r f86c84534cb4 linux/drivers/media/video/cx88/cx88-cards.c
--- a/linux/drivers/media/video/cx88/cx88-cards.c   Sun Mar 29 22:48:51 
2009 -0300
+++ b/linux/drivers/media/video/cx88/cx88-cards.c   Sun Mar 29 22:54:35 
2009 -0300
@@ -733,6 +733,8 @@ static const struct cx88_board cx88_boar
.radio_type = UNSET,
.tuner_addr = ADDR_UNSET,
.radio_addr = ADDR_UNSET,
+   /* Some variants use a tda9874 and so need the tvaudio module. 
*/
+   .audio_chip = V4L2_IDENT_TVAUDIO,
.input  = {{
.type   = CX88_VMUX_TELEVISION,
.vmux   = 0,
@@ -3018,7 +3020,7 @@ static void cx88_card_setup(struct cx88_
tea5767_cfg.tuner = TUNER_TEA5767;
tea5767_cfg.priv  = ctl;
 
-   cx88_call_i2c_clients(core, TUNER_SET_CONFIG, tea5767_cfg);
+   call_all(core, tuner, s_config, tea5767_cfg);
break;
}
case  CX88_BOARD_TEVII_S420:
@@ -3043,7 +3045,7 @@ static void 

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

2009-03-19 Thread Patch from Mauro Carvalho Chehab
The patch number 11121 was added via Mauro Carvalho Chehab mche...@redhat.com
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:
Linux Media Mailing List linux-me...@vger.kernel.org

--

From: Mauro Carvalho Chehab  mche...@redhat.com
merge: http://www.linuxtv.org/hg/~hverkuil/v4l-dvb-cafe


Signed-off-by: Mauro Carvalho Chehab mche...@redhat.com


---

 linux/drivers/media/video/cafe_ccic.c   |  446 ---
 linux/drivers/media/video/ov7670.c  |  711 ++--
 linux/drivers/media/video/v4l2-subdev.c |8 
 linux/include/media/v4l2-chip-ident.h   |   27 
 linux/include/media/v4l2-subdev.h   |6 
 v4l2-apps/util/v4l2-dbg.cpp |   10 
 6 files changed, 492 insertions(+), 716 deletions(-)

diff discarded since it is too big

---

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

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


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

2009-03-13 Thread Patch from Mauro Carvalho Chehab
The patch number 11023 was added via Mauro Carvalho Chehab mche...@redhat.com
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:
Linux Media Mailing List linux-me...@vger.kernel.org

--

From: Mauro Carvalho Chehab  mche...@redhat.com
merge: http://www.linuxtv.org/hg/~hverkuil/v4l-dvb-notify


Signed-off-by: Mauro Carvalho Chehab mche...@redhat.com


---

 linux/Documentation/video4linux/v4l2-framework.txt |   10 +++
 linux/drivers/media/video/bt819.c  |   14 -
 linux/drivers/media/video/zoran/zoran_card.c   |   22 ++-
 linux/drivers/media/video/zoran/zoran_device.c |   36 -
 linux/drivers/media/video/zoran/zoran_device.h |3 -
 linux/drivers/media/video/zoran/zoran_driver.c |   12 ++--
 linux/include/media/bt819.h|   33 +++
 linux/include/media/v4l2-device.h  |3 +
 linux/include/media/v4l2-subdev.h  |5 +
 9 files changed, 90 insertions(+), 48 deletions(-)

diff -r 63310889b4a1 -r 929182116e67 
linux/Documentation/video4linux/v4l2-framework.txt
--- a/linux/Documentation/video4linux/v4l2-framework.txtFri Mar 13 
18:17:30 2009 -0300
+++ b/linux/Documentation/video4linux/v4l2-framework.txtFri Mar 13 
20:00:50 2009 -0300
@@ -93,6 +93,11 @@ usb_device or platform_device. It is rar
 usb_device or platform_device. It is rare for dev to be NULL, but it happens
 with ISA devices or when one device creates multiple PCI devices, thus making
 it impossible to associate v4l2_dev with a particular parent.
+
+You can also supply a notify() callback that can be called by sub-devices to
+notify you of events. Whether you need to set this depends on the sub-device.
+Any notifications a sub-device supports must be defined in a header in
+include/media/subdevice.h.
 
 You unregister with:
 
@@ -280,6 +285,11 @@ e.g. AUDIO_CONTROLLER and specify that a
 e.g. AUDIO_CONTROLLER and specify that as the group ID value when calling
 v4l2_device_call_all(). That ensures that it will only go to the subdev
 that needs it.
+
+If the sub-device needs to notify its v4l2_device parent of an event, then
+it can call v4l2_subdev_notify(sd, notification, arg). This macro checks
+whether there is a notify() callback defined and returns -ENODEV if not.
+Otherwise the result of the notify() call is returned.
 
 The advantage of using v4l2_subdev is that it is a generic struct and does
 not contain any knowledge about the underlying hardware. So a driver might
diff -r 63310889b4a1 -r 929182116e67 linux/drivers/media/video/bt819.c
--- a/linux/drivers/media/video/bt819.c Fri Mar 13 18:17:30 2009 -0300
+++ b/linux/drivers/media/video/bt819.c Fri Mar 13 20:00:50 2009 -0300
@@ -32,13 +32,14 @@
 #include linux/types.h
 #include linux/ioctl.h
 #include linux/delay.h
-#include asm/uaccess.h
+#include linux/uaccess.h
 #include linux/i2c.h
 #include linux/i2c-id.h
 #include linux/videodev2.h
 #include media/v4l2-device.h
 #include media/v4l2-chip-ident.h
 #include media/v4l2-i2c-drv.h
+#include media/bt819.h
 #include compat.h
 
 MODULE_DESCRIPTION(Brooktree-819 video decoder driver);
@@ -256,7 +257,11 @@ static int bt819_s_std(struct v4l2_subde
 
v4l2_dbg(1, debug, sd, set norm %llx\n, (unsigned long long)std);
 
+   if (sd-v4l2_dev == NULL || sd-v4l2_dev-notify == NULL)
+   v4l2_err(sd, no notify found!\n);
+
if (std  V4L2_STD_NTSC) {
+   v4l2_subdev_notify(sd, BT819_FIFO_RESET_LOW, 0);
bt819_setbit(decoder, 0x01, 0, 1);
bt819_setbit(decoder, 0x01, 1, 0);
bt819_setbit(decoder, 0x01, 5, 0);
@@ -265,6 +270,7 @@ static int bt819_s_std(struct v4l2_subde
/* bt819_setbit(decoder, 0x1a,  5, 1); */
timing = timing_data[1];
} else if (std  V4L2_STD_PAL) {
+   v4l2_subdev_notify(sd, BT819_FIFO_RESET_LOW, 0);
bt819_setbit(decoder, 0x01, 0, 1);
bt819_setbit(decoder, 0x01, 1, 1);
bt819_setbit(decoder, 0x01, 5, 1);
@@ -289,6 +295,7 @@ static int bt819_s_std(struct v4l2_subde
bt819_write(decoder, 0x08, (timing-hscale  8)  0xff);
bt819_write(decoder, 0x09, timing-hscale  0xff);
decoder-norm = std;
+   v4l2_subdev_notify(sd, BT819_FIFO_RESET_HIGH, 0);
return 0;
 }
 
@@ -301,7 +308,11 @@ static int bt819_s_routing(struct v4l2_s
if (route-input  0 || route-input  7)
return -EINVAL;
 
+   if (sd-v4l2_dev == NULL || sd-v4l2_dev-notify == NULL)
+   v4l2_err(sd, no notify found!\n);
+
if (decoder-input != route-input) {
+   v4l2_subdev_notify(sd, BT819_FIFO_RESET_LOW, 0);
  

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

2009-03-09 Thread Patch from Mauro Carvalho Chehab
The patch number 10869 was added via Mauro Carvalho Chehab mche...@redhat.com
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:
Linux Media Mailing List linux-me...@vger.kernel.org

--

From: Mauro Carvalho Chehab  mche...@redhat.com
merge: http://www.linuxtv.org/hg/~hverkuil/v4l-dvb-vino


Signed-off-by: Mauro Carvalho Chehab mche...@redhat.com


---

 linux/drivers/media/video/Kconfig |1 
 linux/drivers/media/video/indycam.c   |  399 ++-
 linux/drivers/media/video/indycam.h   |   19 
 linux/drivers/media/video/saa7191.c   |  648 ---
 linux/drivers/media/video/saa7191.h   |   26 
 linux/drivers/media/video/vino.c  | 1471 ++
 linux/include/media/v4l2-chip-ident.h |6 
 7 files changed, 1053 insertions(+), 1517 deletions(-)

diff discarded since it is too big

---

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

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


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

2009-03-09 Thread Patch from Mauro Carvalho Chehab
The patch number 10875 was added via Mauro Carvalho Chehab mche...@redhat.com
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:
Linux Media Mailing List linux-me...@vger.kernel.org

--

From: Mauro Carvalho Chehab  mche...@redhat.com
merge: http://www.linuxtv.org/hg/~hverkuil/v4l-dvb-wf


Signed-off-by: Mauro Carvalho Chehab mche...@redhat.com


---

 linux/drivers/media/video/ovcamchip/ovcamchip_core.c |  258 +--
 linux/drivers/media/video/ovcamchip/ovcamchip_priv.h |7 
 linux/drivers/media/video/w9968cf.c  |  137 +
 linux/drivers/media/video/w9968cf.h  |   24 -
 4 files changed, 186 insertions(+), 240 deletions(-)

diff -r 6ef036bffeaf -r 28c6c0a3343e 
linux/drivers/media/video/ovcamchip/ovcamchip_core.c
--- a/linux/drivers/media/video/ovcamchip/ovcamchip_core.c  Mon Mar 09 
22:21:16 2009 -0300
+++ b/linux/drivers/media/video/ovcamchip/ovcamchip_core.c  Mon Mar 09 
22:25:16 2009 -0300
@@ -15,6 +15,9 @@
 #include linux/module.h
 #include linux/slab.h
 #include linux/delay.h
+#include linux/i2c.h
+#include media/v4l2-device.h
+#include media/v4l2-i2c-drv.h
 #include ovcamchip_priv.h
 
 #define DRIVER_VERSION v2.27 for Linux 2.6
@@ -43,6 +46,20 @@ MODULE_AUTHOR(DRIVER_AUTHOR);
 MODULE_AUTHOR(DRIVER_AUTHOR);
 MODULE_DESCRIPTION(DRIVER_DESC);
 MODULE_LICENSE(GPL);
+
+#if LINUX_VERSION_CODE  KERNEL_VERSION(2, 6, 22)
+static unsigned short normal_i2c[] = {
+   /* ov7xxx */
+   0x42  1, 0x46  1, 0x4a  1, 0x4e  1,
+   0x52  1, 0x56  1, 0x5a  1, 0x5e  1,
+   /* ov6xxx */
+   0xc0  1, 0xc4  1, 0xc8  1, 0xcc  1,
+   0xd0  1, 0xd4  1, 0xd8  1, 0xdc  1,
+   I2C_CLIENT_END
+};
+
+I2C_CLIENT_INSMOD;
+#endif
 
 /* Registers common to all chips, that are needed for detection */
 #define GENERIC_REG_ID_HIGH   0x1C /* manufacturer ID MSB */
@@ -60,10 +77,6 @@ static char *chip_names[NUM_CC_TYPES] = 
[CC_OV6630AE]   = OV6630AE,
[CC_OV6630AF]   = OV6630AF,
 };
-
-/* Forward declarations */
-static struct i2c_driver driver;
-static struct i2c_client client_template;
 
 /* --- */
 
@@ -253,112 +266,36 @@ static int ovcamchip_detect(struct i2c_c
 
/* Test for 7xx0 */
PDEBUG(3, Testing for 0V7xx0);
-   c-addr = OV7xx0_SID;
-   if (init_camchip(c)  0) {
-   /* Test for 6xx0 */
-   PDEBUG(3, Testing for 0V6xx0);
-   c-addr = OV6xx0_SID;
-   if (init_camchip(c)  0) {
-   return -ENODEV;
-   } else {
-   if (ov6xx0_detect(c)  0) {
-   PERROR(Failed to init OV6xx0);
-   return -EIO;
-   }
-   }
-   } else {
+   if (init_camchip(c)  0)
+   return -ENODEV;
+   /* 7-bit addresses with bit 0 set are for the OV7xx0 */
+   if (c-addr  1) {
if (ov7xx0_detect(c)  0) {
PERROR(Failed to init OV7xx0);
return -EIO;
}
-   }
-
-   return 0;
-}
-
-/* --- */
-
-static int ovcamchip_attach(struct i2c_adapter *adap)
-{
-   int rc = 0;
-   struct ovcamchip *ov;
-   struct i2c_client *c;
-
-   /* I2C is not a PnP bus, so we can never be certain that we're talking
-* to the right chip. To prevent damage to EEPROMS and such, only
-* attach to adapters that are known to contain OV camera chips. */
-
-   switch (adap-id) {
-   case I2C_HW_SMBUS_OV511:
-   case I2C_HW_SMBUS_OV518:
-   case I2C_HW_SMBUS_W9968CF:
-   PDEBUG(1, Adapter ID 0x%06x accepted, adap-id);
-   break;
-   default:
-   PDEBUG(1, Adapter ID 0x%06x rejected, adap-id);
-   return -ENODEV;
-   }
-
-   c = kmalloc(sizeof *c, GFP_KERNEL);
-   if (!c) {
-   rc = -ENOMEM;
-   goto no_client;
-   }
-   memcpy(c, client_template, sizeof *c);
-   c-adapter = adap;
-   strcpy(c-name, OV);
-
-   ov = kzalloc(sizeof *ov, GFP_KERNEL);
-   if (!ov) {
-   rc = -ENOMEM;
-   goto no_ov;
-   }
-   i2c_set_clientdata(c, ov);
-
-   rc = ovcamchip_detect(c);
-   if (rc  0)
-   goto error;
-
-   strcpy(c-name, chip_names[ov-subtype]);
-
-   PDEBUG(1, Camera chip detection complete);
-
-   i2c_attach_client(c);
-
-   return rc;
-error:
-   kfree(ov);
-no_ov:
-   kfree(c);
-no_client:
-   PDEBUG(1, returning %d, rc);
-   return rc;

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

2009-03-09 Thread Patch from Mauro Carvalho Chehab
The patch number 10895 was added via Mauro Carvalho Chehab mche...@redhat.com
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:
Linux Media Mailing List linux-me...@vger.kernel.org

--

From: Mauro Carvalho Chehab  mche...@redhat.com
merge: http://www.linuxtv.org/hg/~hverkuil/v4l-dvb-radio


Signed-off-by: Mauro Carvalho Chehab mche...@redhat.com


---

 linux/drivers/media/radio/radio-aimslab.c|  456 +--
 linux/drivers/media/radio/radio-aztech.c |  489 ++--
 linux/drivers/media/radio/radio-cadet.c  |  723 +--
 linux/drivers/media/radio/radio-gemtek-pci.c |  442 +--
 linux/drivers/media/radio/radio-gemtek.c |  475 +---
 linux/drivers/media/radio/radio-maestro.c|  396 +-
 linux/drivers/media/radio/radio-maxiradio.c  |  457 +---
 linux/drivers/media/radio/radio-rtrack2.c|  360 -
 linux/drivers/media/radio/radio-sf16fmi.c|  372 -
 linux/drivers/media/radio/radio-sf16fmr2.c   |  452 +--
 linux/drivers/media/radio/radio-terratec.c   |  408 +-
 linux/drivers/media/radio/radio-trust.c  |  425 +--
 linux/drivers/media/radio/radio-typhoon.c|  412 --
 linux/drivers/media/radio/radio-zoltrix.c|  495 ++---
 v4l/compat.h |6 
 15 files changed, 3069 insertions(+), 3299 deletions(-)

diff discarded since it is too big

---

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

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


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

2009-02-26 Thread Patch from Mauro Carvalho Chehab
The patch number 10690 was added via Mauro Carvalho Chehab mche...@redhat.com
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:
Linux Media Mailing List linux-me...@vger.kernel.org

--

From: Mauro Carvalho Chehab  mche...@redhat.com
merge: http://www.linuxtv.org/hg/~hverkuil/v4l-dvb


Signed-off-by: Mauro Carvalho Chehab mche...@redhat.com


---

 linux/drivers/media/video/v4l2-common.c |   43 +++-
 linux/include/linux/videodev2.h |1 
 v4l/scripts/make_config_compat.pl   |7 +
 v4l2-apps/util/v4l2-ctl.cpp |  123 +++-
 v4l2-spec/compat.sgml   |   11 ++
 v4l2-spec/controls.sgml |   33 +++---
 v4l2-spec/vidioc-queryctrl.sgml |   15 ++
 7 files changed, 209 insertions(+), 24 deletions(-)

diff -r aacca3f9c580 -r f546b826a749 linux/drivers/media/video/v4l2-common.c
--- a/linux/drivers/media/video/v4l2-common.c   Thu Feb 26 15:35:40 2009 -0300
+++ b/linux/drivers/media/video/v4l2-common.c   Thu Feb 26 15:41:03 2009 -0300
@@ -333,6 +333,12 @@ const char **v4l2_ctrl_get_menu(u32 id)
Manual Mode,
Shutter Priority Mode,
Aperture Priority Mode,
+   NULL
+   };
+   static const char *colorfx[] = {
+   None,
+   Black  White,
+   Sepia,
NULL
};
 
@@ -371,6 +377,8 @@ const char **v4l2_ctrl_get_menu(u32 id)
return camera_power_line_frequency;
case V4L2_CID_EXPOSURE_AUTO:
return camera_exposure_auto;
+   case V4L2_CID_COLORFX:
+   return colorfx;
default:
return NULL;
}
@@ -383,16 +391,16 @@ const char *v4l2_ctrl_get_name(u32 id)
switch (id) {
/* USER controls */
case V4L2_CID_USER_CLASS:   return User Controls;
-   case V4L2_CID_AUDIO_VOLUME: return Volume;
-   case V4L2_CID_AUDIO_MUTE:   return Mute;
-   case V4L2_CID_AUDIO_BALANCE:return Balance;
-   case V4L2_CID_AUDIO_BASS:   return Bass;
-   case V4L2_CID_AUDIO_TREBLE: return Treble;
-   case V4L2_CID_AUDIO_LOUDNESS:   return Loudness;
case V4L2_CID_BRIGHTNESS:   return Brightness;
case V4L2_CID_CONTRAST: return Contrast;
case V4L2_CID_SATURATION:   return Saturation;
case V4L2_CID_HUE:  return Hue;
+   case V4L2_CID_AUDIO_VOLUME: return Volume;
+   case V4L2_CID_AUDIO_BALANCE:return Balance;
+   case V4L2_CID_AUDIO_BASS:   return Bass;
+   case V4L2_CID_AUDIO_TREBLE: return Treble;
+   case V4L2_CID_AUDIO_MUTE:   return Mute;
+   case V4L2_CID_AUDIO_LOUDNESS:   return Loudness;
case V4L2_CID_BLACK_LEVEL:  return Black Level;
case V4L2_CID_AUTO_WHITE_BALANCE:   return White Balance, 
Automatic;
case V4L2_CID_DO_WHITE_BALANCE: return Do White Balance;
@@ -413,6 +421,7 @@ const char *v4l2_ctrl_get_name(u32 id)
case V4L2_CID_BACKLIGHT_COMPENSATION:   return Backlight Compensation;
case V4L2_CID_CHROMA_AGC:   return Chroma AGC;
case V4L2_CID_COLOR_KILLER: return Color Killer;
+   case V4L2_CID_COLORFX:  return Color Effects;
 
/* MPEG controls */
case V4L2_CID_MPEG_CLASS:   return MPEG Encoder Controls;
@@ -491,15 +500,24 @@ int v4l2_ctrl_query_fill(struct v4l2_que
case V4L2_CID_HFLIP:
case V4L2_CID_VFLIP:
case V4L2_CID_HUE_AUTO:
+   case V4L2_CID_CHROMA_AGC:
+   case V4L2_CID_COLOR_KILLER:
case V4L2_CID_MPEG_AUDIO_MUTE:
case V4L2_CID_MPEG_VIDEO_MUTE:
case V4L2_CID_MPEG_VIDEO_GOP_CLOSURE:
case V4L2_CID_MPEG_VIDEO_PULLDOWN:
case V4L2_CID_EXPOSURE_AUTO_PRIORITY:
+   case V4L2_CID_FOCUS_AUTO:
case V4L2_CID_PRIVACY:
qctrl-type = V4L2_CTRL_TYPE_BOOLEAN;
min = 0;
max = step = 1;
+   break;
+   case V4L2_CID_PAN_RESET:
+   case V4L2_CID_TILT_RESET:
+   qctrl-type = V4L2_CTRL_TYPE_BUTTON;
+   qctrl-flags |= V4L2_CTRL_FLAG_WRITE_ONLY;
+   min = max = step = def = 0;
break;
case V4L2_CID_POWER_LINE_FREQUENCY:
case V4L2_CID_MPEG_AUDIO_SAMPLING_FREQ:
@@ -518,6 +536,7 @@ int v4l2_ctrl_query_fill(struct v4l2_que
case V4L2_CID_MPEG_STREAM_TYPE:
case 

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

2009-02-26 Thread Patch from Mauro Carvalho Chehab
The patch number 10693 was added via Mauro Carvalho Chehab mche...@redhat.com
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:
Linux Media Mailing List linux-me...@vger.kernel.org

--

From: Mauro Carvalho Chehab  mche...@redhat.com
merge: http://www.linuxtv.org/hg/~hverkuil/v4l-dvb-usbvision


Signed-off-by: Mauro Carvalho Chehab mche...@redhat.com


---

 linux/drivers/media/video/usbvision/usbvision-core.c  |2 
 linux/drivers/media/video/usbvision/usbvision-i2c.c   |  153 ++
 linux/drivers/media/video/usbvision/usbvision-video.c |   63 +---
 linux/drivers/media/video/usbvision/usbvision.h   |8 
 linux/drivers/media/video/v4l2-common.c   |9 
 linux/include/media/v4l2-common.h |2 
 6 files changed, 89 insertions(+), 148 deletions(-)

diff -r f546b826a749 -r a169633cd720 
linux/drivers/media/video/usbvision/usbvision-core.c
--- a/linux/drivers/media/video/usbvision/usbvision-core.c  Thu Feb 26 
15:41:03 2009 -0300
+++ b/linux/drivers/media/video/usbvision/usbvision-core.c  Thu Feb 26 
16:31:15 2009 -0300
@@ -2654,7 +2654,7 @@ int usbvision_muxsel(struct usb_usbvisio
}
route.input = mode[channel];
route.output = 0;
-   call_i2c_clients(usbvision, VIDIOC_INT_S_VIDEO_ROUTING,route);
+   call_all(usbvision, video, s_routing, route);
usbvision_set_audio(usbvision, audio[channel]);
return 0;
 }
diff -r f546b826a749 -r a169633cd720 
linux/drivers/media/video/usbvision/usbvision-i2c.c
--- a/linux/drivers/media/video/usbvision/usbvision-i2c.c   Thu Feb 26 
15:41:03 2009 -0300
+++ b/linux/drivers/media/video/usbvision/usbvision-i2c.c   Thu Feb 26 
16:31:15 2009 -0300
@@ -206,72 +206,78 @@ static struct i2c_algorithm usbvision_al
 };
 
 
-/*
- * registering functions to load algorithms at runtime
- */
-static int usbvision_i2c_usb_add_bus(struct i2c_adapter *adap)
-{
-   PDEBUG(DBG_I2C, I2C   debugging is enabled [i2c]);
-   PDEBUG(DBG_I2C, ALGO   debugging is enabled [i2c]);
-
-   /* register new adapter to i2c module... */
-
-   adap-algo = usbvision_algo;
-
-   adap-timeout = 100;/* default values, should   */
-   adap-retries = 3;  /* be replaced by defines   */
-
-   i2c_add_adapter(adap);
-
-   PDEBUG(DBG_I2C,i2c bus for %s registered, adap-name);
-
-   return 0;
-}
-
 /* --- */
 /* usbvision specific I2C functions*/
 /* --- */
 static struct i2c_adapter i2c_adap_template;
-static struct i2c_client i2c_client_template;
 
 int usbvision_i2c_register(struct usb_usbvision *usbvision)
 {
+   static unsigned short saa711x_addrs[] = {
+   0x4a  1, 0x48  1,   /* SAA7111, SAA7111A and SAA7113 */
+   0x42  1, 0x40  1,   /* SAA7114, SAA7115 and SAA7118 */
+   I2C_CLIENT_END };
+
memcpy(usbvision-i2c_adap, i2c_adap_template,
   sizeof(struct i2c_adapter));
-   memcpy(usbvision-i2c_client, i2c_client_template,
-  sizeof(struct i2c_client));
 
sprintf(usbvision-i2c_adap.name + strlen(usbvision-i2c_adap.name),
 #%d, usbvision-vdev-num);
PDEBUG(DBG_I2C,Adaptername: %s, usbvision-i2c_adap.name);
usbvision-i2c_adap.dev.parent = usbvision-dev-dev;
 
-   i2c_set_adapdata(usbvision-i2c_adap, usbvision);
-   i2c_set_clientdata(usbvision-i2c_client, usbvision);
-
-   usbvision-i2c_client.adapter = usbvision-i2c_adap;
+   i2c_set_adapdata(usbvision-i2c_adap, usbvision-v4l2_dev);
 
if (usbvision_write_reg(usbvision, USBVISION_SER_MODE, 
USBVISION_IIC_LRNACK)  0) {
printk(KERN_ERR usbvision_register: can't write reg\n);
return -EBUSY;
}
 
-#ifdef CONFIG_MODULES
+   PDEBUG(DBG_I2C, I2C   debugging is enabled [i2c]);
+   PDEBUG(DBG_I2C, ALGO   debugging is enabled [i2c]);
+
+   /* register new adapter to i2c module... */
+
+   usbvision-i2c_adap.algo = usbvision_algo;
+
+   usbvision-i2c_adap.timeout = 100;  /* default values, should   
*/
+   usbvision-i2c_adap.retries = 3;/* be replaced by defines   
*/
+
+   i2c_add_adapter(usbvision-i2c_adap);
+
+   PDEBUG(DBG_I2C, i2c bus for %s registered, usbvision-i2c_adap.name);
+
/* Request the load of the i2c modules we need */
switch (usbvision_device_data[usbvision-DevModel].Codec) {
case CODEC_SAA7113:
-   request_module(saa7115);
+   case CODEC_SAA7111:
+   

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

2009-02-26 Thread Patch from Mauro Carvalho Chehab
The patch number 10699 was added via Mauro Carvalho Chehab mche...@redhat.com
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:
Linux Media Mailing List linux-me...@vger.kernel.org

--

From: Mauro Carvalho Chehab  mche...@redhat.com
merge: http://www.linuxtv.org/hg/~hverkuil/v4l-dvb-fill-std


Signed-off-by: Mauro Carvalho Chehab mche...@redhat.com


---

 linux/drivers/media/video/cx18/cx18-av-core.c   |7 
 linux/drivers/media/video/cx2341x.c |  110 +++--
 linux/drivers/media/video/cx25840/cx25840-core.c|7 
 linux/drivers/media/video/msp3400-driver.c  |   26 +-
 linux/drivers/media/video/saa7115.c |4 
 linux/drivers/media/video/saa7134/saa6752hs.c   |   12 -
 linux/drivers/media/video/saa7134/saa7134-empress.c |2 
 linux/drivers/media/video/tda7432.c |6 
 linux/drivers/media/video/tda9875.c |3 
 linux/drivers/media/video/tvaudio.c |   19 -
 linux/drivers/media/video/tvp514x.c |5 
 linux/drivers/media/video/v4l2-common.c |  142 
 linux/include/media/v4l2-common.h   |1 
 13 files changed, 143 insertions(+), 201 deletions(-)

diff -r f88e18becfe7 -r 158339754843 
linux/drivers/media/video/cx18/cx18-av-core.c
--- a/linux/drivers/media/video/cx18/cx18-av-core.c Thu Feb 26 16:35:44 
2009 -0300
+++ b/linux/drivers/media/video/cx18/cx18-av-core.c Thu Feb 26 18:27:06 
2009 -0300
@@ -788,10 +788,12 @@ int cx18_av_cmd(struct cx18 *cx, unsigne
 
switch (qc-id) {
case V4L2_CID_BRIGHTNESS:
+   return v4l2_ctrl_query_fill(qc, 0, 255, 1, 128);
case V4L2_CID_CONTRAST:
case V4L2_CID_SATURATION:
+   return v4l2_ctrl_query_fill(qc, 0, 127, 1, 64);
case V4L2_CID_HUE:
-   return v4l2_ctrl_query_fill_std(qc);
+   return v4l2_ctrl_query_fill(qc, -128, 127, 1, 0);
default:
break;
}
@@ -801,10 +803,11 @@ int cx18_av_cmd(struct cx18 *cx, unsigne
return v4l2_ctrl_query_fill(qc, 0, 65535,
65535 / 100, state-default_volume);
case V4L2_CID_AUDIO_MUTE:
+   return v4l2_ctrl_query_fill(qc, 0, 1, 1, 0);
case V4L2_CID_AUDIO_BALANCE:
case V4L2_CID_AUDIO_BASS:
case V4L2_CID_AUDIO_TREBLE:
-   return v4l2_ctrl_query_fill_std(qc);
+   return v4l2_ctrl_query_fill(qc, 0, 65535, 65535 / 100, 
32768);
default:
return -EINVAL;
}
diff -r f88e18becfe7 -r 158339754843 linux/drivers/media/video/cx2341x.c
--- a/linux/drivers/media/video/cx2341x.c   Thu Feb 26 16:35:44 2009 -0300
+++ b/linux/drivers/media/video/cx2341x.c   Thu Feb 26 18:27:06 2009 -0300
@@ -501,6 +501,29 @@ int cx2341x_ctrl_query(const struct cx23
int err;
 
switch (qctrl-id) {
+   case V4L2_CID_MPEG_STREAM_TYPE:
+   return v4l2_ctrl_query_fill(qctrl,
+   V4L2_MPEG_STREAM_TYPE_MPEG2_PS,
+   V4L2_MPEG_STREAM_TYPE_MPEG2_SVCD, 1,
+   V4L2_MPEG_STREAM_TYPE_MPEG2_PS);
+
+   case V4L2_CID_MPEG_STREAM_VBI_FMT:
+   if (params-capabilities  CX2341X_CAP_HAS_SLICED_VBI)
+   return v4l2_ctrl_query_fill(qctrl,
+   V4L2_MPEG_STREAM_VBI_FMT_NONE,
+   V4L2_MPEG_STREAM_VBI_FMT_IVTV, 1,
+   V4L2_MPEG_STREAM_VBI_FMT_NONE);
+   return cx2341x_ctrl_query_fill(qctrl,
+   V4L2_MPEG_STREAM_VBI_FMT_NONE,
+   V4L2_MPEG_STREAM_VBI_FMT_NONE, 1,
+   default_params.stream_vbi_fmt);
+
+   case V4L2_CID_MPEG_AUDIO_SAMPLING_FREQ:
+   return v4l2_ctrl_query_fill(qctrl,
+   V4L2_MPEG_AUDIO_SAMPLING_FREQ_44100,
+   V4L2_MPEG_AUDIO_SAMPLING_FREQ_32000, 1,
+   V4L2_MPEG_AUDIO_SAMPLING_FREQ_48000);
+
case V4L2_CID_MPEG_AUDIO_ENCODING:
if (params-capabilities  CX2341X_CAP_HAS_AC3) {
/*
@@ -532,9 +555,36 @@ int cx2341x_ctrl_query(const struct cx23
qctrl-flags |= V4L2_CTRL_FLAG_INACTIVE;
return 0;
 
-   case V4L2_CID_MPEG_AUDIO_L1_BITRATE:
-   case 

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

2009-02-26 Thread Patch from Mauro Carvalho Chehab
The patch number 10734 was added via Mauro Carvalho Chehab mche...@redhat.com
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:
Linux Media Mailing List linux-me...@vger.kernel.org

--

From: Mauro Carvalho Chehab  mche...@redhat.com
merge: http://www.linuxtv.org/hg/~hverkuil/v4l-dvb-zoran


Signed-off-by: Mauro Carvalho Chehab mche...@redhat.com


---

 linux/drivers/media/common/tuners/mt20xx.c |2 
 linux/drivers/media/common/tuners/tda8290.c|2 
 linux/drivers/media/common/tuners/tea5761.c|2 
 linux/drivers/media/common/tuners/tea5767.c|2 
 linux/drivers/media/video/Kconfig  |   32 
 linux/drivers/media/video/Makefile |2 
 linux/drivers/media/video/adv7170.c|  406 -
 linux/drivers/media/video/adv7175.c|  385 -
 linux/drivers/media/video/bt819.c  |  574 +-
 linux/drivers/media/video/bt856.c  |  352 -
 linux/drivers/media/video/bt866.c  |  309 -
 linux/drivers/media/video/ks0127.c |  721 +--
 linux/drivers/media/video/ks0127.h |2 
 linux/drivers/media/video/saa6588.c|2 
 linux/drivers/media/video/saa7110.c|  545 +-
 linux/drivers/media/video/saa7111.c|  497 --
 linux/drivers/media/video/saa7114.c| 1073 
 linux/drivers/media/video/saa7115.c|   54 
 linux/drivers/media/video/saa7127.c|1 
 linux/drivers/media/video/saa7185.c|  288 -
 linux/drivers/media/video/tvaudio.c|2 
 linux/drivers/media/video/tvmixer.c|2 
 linux/drivers/media/video/vpx3220.c|  600 +-
 linux/drivers/media/video/zoran/Kconfig|8 
 linux/drivers/media/video/zoran/videocodec.h   |   11 
 linux/drivers/media/video/zoran/zoran.h|   40 
 linux/drivers/media/video/zoran/zoran_card.c   |  425 -
 linux/drivers/media/video/zoran/zoran_card.h   |3 
 linux/drivers/media/video/zoran/zoran_device.c |  553 +-
 linux/drivers/media/video/zoran/zoran_device.h |   15 
 linux/drivers/media/video/zoran/zoran_driver.c | 3861 ++---
 linux/drivers/media/video/zoran/zoran_procfs.c |2 
 linux/drivers/media/video/zoran/zr36016.c  |5 
 linux/drivers/media/video/zoran/zr36050.c  |4 
 linux/drivers/media/video/zoran/zr36060.c  |4 
 linux/include/media/v4l2-chip-ident.h  |   34 
 linux/include/sound/tea575x-tuner.h|2 
 37 files changed, 3994 insertions(+), 6828 deletions(-)

diff discarded since it is too big

---

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

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


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

2009-02-17 Thread Patch from Mauro Carvalho Chehab
The patch number 10648 was added via Mauro Carvalho Chehab mche...@redhat.com
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:
Linux Media Mailing List linux-me...@vger.kernel.org

--

From: Mauro Carvalho Chehab  mche...@redhat.com
merge: http://www.linuxtv.org/hg/~hverkuil/v4l-dvb


Priority: normal

Signed-off-by: Mauro Carvalho Chehab mche...@redhat.com


---

 linux/Documentation/video4linux/v4l2-framework.txt |   12 
 linux/drivers/media/video/v4l2-dev.c   |   25 -
 linux/drivers/media/video/v4l2-device.c|   47 +
 linux/drivers/media/video/vivi.c   |  323 ++---
 linux/include/media/v4l2-device.h  |   31 -
 linux/include/media/v4l2-subdev.h  |4 
 6 files changed, 232 insertions(+), 210 deletions(-)

diff -r 4f6c3f9efa58 -r e471b963bef6 
linux/Documentation/video4linux/v4l2-framework.txt
--- a/linux/Documentation/video4linux/v4l2-framework.txtTue Feb 17 
23:32:03 2009 -0300
+++ b/linux/Documentation/video4linux/v4l2-framework.txtTue Feb 17 
23:44:45 2009 -0300
@@ -84,12 +84,14 @@ You must register the device instance:
v4l2_device_register(struct device *dev, struct v4l2_device *v4l2_dev);
 
 Registration will initialize the v4l2_device struct and link dev-driver_data
-to v4l2_dev. Registration will also set v4l2_dev-name to a value derived from
-dev (driver name followed by the bus_id, to be precise). You may change the
-name after registration if you want.
+to v4l2_dev. If v4l2_dev-name is empty then it will be set to a value derived
+from dev (driver name followed by the bus_id, to be precise). If you set it
+up before calling v4l2_device_register then it will be untouched. If dev is
+NULL, then you *must* setup v4l2_dev-name before calling v4l2_device_register.
 
 The first 'dev' argument is normally the struct device pointer of a pci_dev,
-usb_device or platform_device.
+usb_device or platform_device. It is rare for dev to be NULL, but it happens
+with ISA devices, for example.
 
 You unregister with:
 
@@ -266,7 +268,7 @@ errors (except -ENOIOCTLCMD) occured, th
 
 The second argument to both calls is a group ID. If 0, then all subdevs are
 called. If non-zero, then only those whose group ID match that value will
-be called. Before a bridge driver registers a subdev it can set subdev-grp_id
+be called. Before a bridge driver registers a subdev it can set sd-grp_id
 to whatever value it wants (it's 0 by default). This value is owned by the
 bridge driver and the sub-device driver will never modify or use it.
 
diff -r 4f6c3f9efa58 -r e471b963bef6 linux/drivers/media/video/v4l2-dev.c
--- a/linux/drivers/media/video/v4l2-dev.c  Tue Feb 17 23:32:03 2009 -0300
+++ b/linux/drivers/media/video/v4l2-dev.c  Tue Feb 17 23:44:45 2009 -0300
@@ -326,37 +326,38 @@ static const struct file_operations v4l2
  */
 static int get_index(struct video_device *vdev, int num)
 {
-   u32 used = 0;
-   const int max_index = sizeof(used) * 8 - 1;
+   /* This can be static since this function is called with the global
+  videodev_lock held. */
+   static DECLARE_BITMAP(used, VIDEO_NUM_DEVICES);
int i;
 
-   /* Currently a single v4l driver instance cannot create more than
-  32 devices.
-  Increase to u64 or an array of u32 if more are needed. */
-   if (num  max_index) {
+   if (num = VIDEO_NUM_DEVICES) {
printk(KERN_ERR videodev: %s num is too large\n, __func__);
return -EINVAL;
}
 
-   /* Some drivers do not set the parent. In that case always return 0. */
+   /* Some drivers do not set the parent. In that case always return
+  num or 0. */
if (vdev-parent == NULL)
-   return 0;
+   return num = 0 ? num : 0;
+
+   bitmap_zero(used, VIDEO_NUM_DEVICES);
 
for (i = 0; i  VIDEO_NUM_DEVICES; i++) {
if (video_device[i] != NULL 
video_device[i]-parent == vdev-parent) {
-   used |= 1  video_device[i]-index;
+   set_bit(video_device[i]-index, used);
}
}
 
if (num = 0) {
-   if (used  (1  num))
+   if (test_bit(num, used))
return -ENFILE;
return num;
}
 
-   i = ffz(used);
-   return i  max_index ? -ENFILE : i;
+   i = find_first_zero_bit(used, VIDEO_NUM_DEVICES);
+   return i == VIDEO_NUM_DEVICES ? -ENFILE : i;
 }
 
 int video_register_device(struct video_device *vdev, int type, int nr)
diff -r 4f6c3f9efa58 -r e471b963bef6 linux/drivers/media/video/v4l2-device.c
--- 

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

2009-02-13 Thread Patch from Mauro Carvalho Chehab
The patch number 10541 was added via Mauro Carvalho Chehab mche...@redhat.com
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:
Linux Media Mailing List linux-me...@vger.kernel.org

--

From: Mauro Carvalho Chehab  mche...@redhat.com
merge: http://www.linuxtv.org/hg/~hverkuil/v4l-dvb-rds


Signed-off-by: Mauro Carvalho Chehab mche...@redhat.com


---

 linux/drivers/media/video/cx2341x.c   |2 
 linux/drivers/media/video/saa6588.c   |  209 +-
 linux/include/media/v4l2-chip-ident.h |3 
 3 files changed, 114 insertions(+), 100 deletions(-)

diff -r 597ef8287239 -r 9a8fa2bd8bd7 linux/drivers/media/video/cx2341x.c
--- a/linux/drivers/media/video/cx2341x.c   Fri Feb 13 11:31:03 2009 -0200
+++ b/linux/drivers/media/video/cx2341x.c   Fri Feb 13 11:35:32 2009 -0200
@@ -46,12 +46,12 @@ const u32 cx2341x_mpeg_ctrls[] = {
V4L2_CID_MPEG_AUDIO_SAMPLING_FREQ,
V4L2_CID_MPEG_AUDIO_ENCODING,
V4L2_CID_MPEG_AUDIO_L2_BITRATE,
-   V4L2_CID_MPEG_AUDIO_AC3_BITRATE,
V4L2_CID_MPEG_AUDIO_MODE,
V4L2_CID_MPEG_AUDIO_MODE_EXTENSION,
V4L2_CID_MPEG_AUDIO_EMPHASIS,
V4L2_CID_MPEG_AUDIO_CRC,
V4L2_CID_MPEG_AUDIO_MUTE,
+   V4L2_CID_MPEG_AUDIO_AC3_BITRATE,
V4L2_CID_MPEG_VIDEO_ENCODING,
V4L2_CID_MPEG_VIDEO_ASPECT,
V4L2_CID_MPEG_VIDEO_B_FRAMES,
diff -r 597ef8287239 -r 9a8fa2bd8bd7 linux/drivers/media/video/saa6588.c
--- a/linux/drivers/media/video/saa6588.c   Fri Feb 13 11:31:03 2009 -0200
+++ b/linux/drivers/media/video/saa6588.c   Fri Feb 13 11:35:32 2009 -0200
@@ -32,6 +32,9 @@
 #include asm/uaccess.h
 
 #include media/rds.h
+#include media/v4l2-device.h
+#include media/v4l2-chip-ident.h
+#include media/v4l2-i2c-drv-legacy.h
 #include compat.h
 
 /* Addresses to scan */
@@ -73,7 +76,7 @@ MODULE_LICENSE(GPL);
 #define dprintk if (debug) printk
 
 struct saa6588 {
-   struct i2c_client client;
+   struct v4l2_subdev sd;
struct work_struct work;
struct timer_list timer;
spinlock_t lock;
@@ -87,8 +90,10 @@ struct saa6588 {
int data_available_for_read;
 };
 
-static struct i2c_driver driver;
-static struct i2c_client client_template;
+static inline struct saa6588 *to_saa6588(struct v4l2_subdev *sd)
+{
+   return container_of(sd, struct saa6588, sd);
+}
 
 /* -- */
 
@@ -259,6 +264,7 @@ static void block_to_buf(struct saa6588 
 
 static void saa6588_i2c_poll(struct saa6588 *s)
 {
+   struct i2c_client *client = v4l2_get_subdevdata(s-sd);
unsigned long flags;
unsigned char tmpbuf[6];
unsigned char blocknum;
@@ -266,7 +272,7 @@ static void saa6588_i2c_poll(struct saa6
 
/* Although we only need 3 bytes, we have to read at least 6.
   SAA6588 returns garbage otherwise */
-   if (6 != i2c_master_recv(s-client, tmpbuf[0], 6)) {
+   if (6 != i2c_master_recv(client, tmpbuf[0], 6)) {
if (debug  1)
dprintk(PREFIX read error!\n);
return;
@@ -342,6 +348,7 @@ static void saa6588_work(struct work_str
 
 static int saa6588_configure(struct saa6588 *s)
 {
+   struct i2c_client *client = v4l2_get_subdevdata(s-sd);
unsigned char buf[3];
int rc;
 
@@ -389,7 +396,8 @@ static int saa6588_configure(struct saa6
dprintk(PREFIX writing: 0w=0x%02x 1w=0x%02x 2w=0x%02x\n,
buf[0], buf[1], buf[2]);
 
-   if (3 != (rc = i2c_master_send(s-client, buf, 3)))
+   rc = i2c_master_send(client, buf, 3);
+   if (rc != 3)
printk(PREFIX i2c i/o error: rc == %d (should be 3)\n, rc);
 
return 0;
@@ -397,38 +405,101 @@ static int saa6588_configure(struct saa6
 
 /* -- */
 
-static int saa6588_attach(struct i2c_adapter *adap, int addr, int kind)
+static long saa6588_ioctl(struct v4l2_subdev *sd, unsigned int cmd, void *arg)
+{
+   struct saa6588 *s = to_saa6588(sd);
+   struct rds_command *a = arg;
+
+   switch (cmd) {
+   /* --- open() for /dev/radio --- */
+   case RDS_CMD_OPEN:
+   a-result = 0;  /* return error if chip doesn't work ??? */
+   break;
+   /* --- close() for /dev/radio --- */
+   case RDS_CMD_CLOSE:
+   s-data_available_for_read = 1;
+   wake_up_interruptible(s-read_queue);
+   a-result = 0;
+   break;
+   /* --- read() for /dev/radio --- */
+   case RDS_CMD_READ:
+   read_from_buf(s, a);
+   break;
+   /* --- poll() for 

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

2009-02-13 Thread Patch from Mauro Carvalho Chehab
The patch number 10543 was added via Mauro Carvalho Chehab mche...@redhat.com
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:
Linux Media Mailing List linux-me...@vger.kernel.org

--

From: Mauro Carvalho Chehab  mche...@redhat.com
merge: http://www.linuxtv.org/hg/~hverkuil/v4l-dvb


Priority: normal

Signed-off-by: Mauro Carvalho Chehab mche...@redhat.com


---

 linux/drivers/media/video/v4l2-subdev.c |4 
 linux/include/media/v4l2-common.h   |3 +++
 linux/include/media/v4l2-subdev.h   |2 ++
 3 files changed, 9 insertions(+)

diff -r 9a8fa2bd8bd7 -r 84cbcf049b92 linux/drivers/media/video/v4l2-subdev.c
--- a/linux/drivers/media/video/v4l2-subdev.c   Fri Feb 13 11:35:32 2009 -0200
+++ b/linux/drivers/media/video/v4l2-subdev.c   Fri Feb 13 18:19:36 2009 -0200
@@ -104,6 +104,10 @@ int v4l2_subdev_command(struct v4l2_subd
return v4l2_subdev_call(sd, video, g_fmt, arg);
case VIDIOC_INT_S_STD_OUTPUT:
return v4l2_subdev_call(sd, video, s_std_output, *(v4l2_std_id 
*)arg);
+   case VIDIOC_QUERYSTD:
+   return v4l2_subdev_call(sd, video, querystd, arg);
+   case VIDIOC_INT_G_INPUT_STATUS:
+   return v4l2_subdev_call(sd, video, g_input_status, arg);
case VIDIOC_STREAMON:
return v4l2_subdev_call(sd, video, s_stream, 1);
case VIDIOC_STREAMOFF:
diff -r 9a8fa2bd8bd7 -r 84cbcf049b92 linux/include/media/v4l2-common.h
--- a/linux/include/media/v4l2-common.h Fri Feb 13 11:35:32 2009 -0200
+++ b/linux/include/media/v4l2-common.h Fri Feb 13 18:19:36 2009 -0200
@@ -297,4 +297,7 @@ struct v4l2_crystal_freq {
a v4l2_gpio struct if a direction is also needed. */
 #define VIDIOC_INT_S_GPIO  _IOW('d', 117, u32)
 
+/* Get input status. Same as the status field in the v4l2_input struct. */
+#define VIDIOC_INT_G_INPUT_STATUS  _IOR('d', 118, u32)
+
 #endif /* V4L2_COMMON_H_ */
diff -r 9a8fa2bd8bd7 -r 84cbcf049b92 linux/include/media/v4l2-subdev.h
--- a/linux/include/media/v4l2-subdev.h Fri Feb 13 11:35:32 2009 -0200
+++ b/linux/include/media/v4l2-subdev.h Fri Feb 13 18:19:36 2009 -0200
@@ -115,6 +115,8 @@ struct v4l2_subdev_video_ops {
int (*g_vbi_data)(struct v4l2_subdev *sd, struct v4l2_sliced_vbi_data 
*vbi_data);
int (*g_sliced_vbi_cap)(struct v4l2_subdev *sd, struct 
v4l2_sliced_vbi_cap *cap);
int (*s_std_output)(struct v4l2_subdev *sd, v4l2_std_id std);
+   int (*querystd)(struct v4l2_subdev *sd, v4l2_std_id *std);
+   int (*g_input_status)(struct v4l2_subdev *sd, u32 *status);
int (*s_stream)(struct v4l2_subdev *sd, int enable);
int (*s_fmt)(struct v4l2_subdev *sd, struct v4l2_format *fmt);
int (*g_fmt)(struct v4l2_subdev *sd, struct v4l2_format *fmt);


---

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

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


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

2009-02-13 Thread Patch from Mauro Carvalho Chehab
The patch number 10545 was added via Mauro Carvalho Chehab mche...@redhat.com
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:
Linux Media Mailing List linux-me...@vger.kernel.org

--

From: Mauro Carvalho Chehab  mche...@redhat.com
merge: http://www.linuxtv.org/hg/~hverkuil/v4l-dvb-rds


Signed-off-by: Mauro Carvalho Chehab mche...@redhat.com


---

 linux/drivers/media/video/cx18/cx18-controls.c  |1 +
 linux/drivers/media/video/cx2341x.c |1 +
 linux/drivers/media/video/cx23885/cx23885-video.c   |1 +
 linux/drivers/media/video/cx88/cx88-video.c |1 +
 linux/drivers/media/video/ivtv/ivtv-controls.c  |1 +
 linux/drivers/media/video/saa7134/saa7134-empress.c |2 ++
 linux/drivers/media/video/v4l2-common.c |2 +-
 linux/include/media/v4l2-common.h   |5 +
 8 files changed, 13 insertions(+), 1 deletion(-)

diff -r 84cbcf049b92 -r 136dc4d0e38a 
linux/drivers/media/video/cx18/cx18-controls.c
--- a/linux/drivers/media/video/cx18/cx18-controls.cFri Feb 13 18:19:36 
2009 -0200
+++ b/linux/drivers/media/video/cx18/cx18-controls.cFri Feb 13 18:21:14 
2009 -0200
@@ -30,6 +30,7 @@
 #include cx18-mailbox.h
 #include cx18-controls.h
 
+/* Must be sorted from low to high control ID! */
 static const u32 user_ctrls[] = {
V4L2_CID_USER_CLASS,
V4L2_CID_BRIGHTNESS,
diff -r 84cbcf049b92 -r 136dc4d0e38a linux/drivers/media/video/cx2341x.c
--- a/linux/drivers/media/video/cx2341x.c   Fri Feb 13 18:19:36 2009 -0200
+++ b/linux/drivers/media/video/cx2341x.c   Fri Feb 13 18:21:14 2009 -0200
@@ -39,6 +39,7 @@ module_param(debug, int, 0644);
 module_param(debug, int, 0644);
 MODULE_PARM_DESC(debug, Debug level (0-1));
 
+/* Must be sorted from low to high control ID! */
 const u32 cx2341x_mpeg_ctrls[] = {
V4L2_CID_MPEG_CLASS,
V4L2_CID_MPEG_STREAM_TYPE,
diff -r 84cbcf049b92 -r 136dc4d0e38a 
linux/drivers/media/video/cx23885/cx23885-video.c
--- a/linux/drivers/media/video/cx23885/cx23885-video.c Fri Feb 13 18:19:36 
2009 -0200
+++ b/linux/drivers/media/video/cx23885/cx23885-video.c Fri Feb 13 18:21:14 
2009 -0200
@@ -276,6 +276,7 @@ static struct cx23885_ctrl cx23885_ctls[
 };
 static const int CX23885_CTLS = ARRAY_SIZE(cx23885_ctls);
 
+/* Must be sorted from low to high control ID! */
 static const u32 cx23885_user_ctrls[] = {
V4L2_CID_USER_CLASS,
V4L2_CID_BRIGHTNESS,
diff -r 84cbcf049b92 -r 136dc4d0e38a linux/drivers/media/video/cx88/cx88-video.c
--- a/linux/drivers/media/video/cx88/cx88-video.c   Fri Feb 13 18:19:36 
2009 -0200
+++ b/linux/drivers/media/video/cx88/cx88-video.c   Fri Feb 13 18:21:14 
2009 -0200
@@ -299,6 +299,7 @@ static struct cx88_ctrl cx8800_ctls[] = 
 };
 static const int CX8800_CTLS = ARRAY_SIZE(cx8800_ctls);
 
+/* Must be sorted from low to high control ID! */
 const u32 cx88_user_ctrls[] = {
V4L2_CID_USER_CLASS,
V4L2_CID_BRIGHTNESS,
diff -r 84cbcf049b92 -r 136dc4d0e38a 
linux/drivers/media/video/ivtv/ivtv-controls.c
--- a/linux/drivers/media/video/ivtv/ivtv-controls.cFri Feb 13 18:19:36 
2009 -0200
+++ b/linux/drivers/media/video/ivtv/ivtv-controls.cFri Feb 13 18:21:14 
2009 -0200
@@ -26,6 +26,7 @@
 #include ivtv-mailbox.h
 #include ivtv-controls.h
 
+/* Must be sorted from low to high control ID! */
 static const u32 user_ctrls[] = {
V4L2_CID_USER_CLASS,
V4L2_CID_BRIGHTNESS,
diff -r 84cbcf049b92 -r 136dc4d0e38a 
linux/drivers/media/video/saa7134/saa7134-empress.c
--- a/linux/drivers/media/video/saa7134/saa7134-empress.c   Fri Feb 13 
18:19:36 2009 -0200
+++ b/linux/drivers/media/video/saa7134/saa7134-empress.c   Fri Feb 13 
18:21:14 2009 -0200
@@ -352,6 +352,7 @@ static int empress_queryctrl(struct file
 static int empress_queryctrl(struct file *file, void *priv,
struct v4l2_queryctrl *c)
 {
+   /* Must be sorted from low to high control ID! */
static const u32 user_ctrls[] = {
V4L2_CID_USER_CLASS,
V4L2_CID_BRIGHTNESS,
@@ -364,6 +365,7 @@ static int empress_queryctrl(struct file
0
};
 
+   /* Must be sorted from low to high control ID! */
static const u32 mpeg_ctrls[] = {
V4L2_CID_MPEG_CLASS,
V4L2_CID_MPEG_STREAM_TYPE,
diff -r 84cbcf049b92 -r 136dc4d0e38a linux/drivers/media/video/v4l2-common.c
--- a/linux/drivers/media/video/v4l2-common.c   Fri Feb 13 18:19:36 2009 -0200
+++ b/linux/drivers/media/video/v4l2-common.c   Fri Feb 13 18:21:14 2009 -0200
@@ -750,7 +750,7 @@ EXPORT_SYMBOL(v4l2_ctrl_query_menu_valid
 /* ctrl_classes points to an array of u32 pointers, the last 

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

2009-02-13 Thread Patch from Mauro Carvalho Chehab
The patch number 10553 was added via Mauro Carvalho Chehab mche...@redhat.com
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:
Linux Media Mailing List linux-me...@vger.kernel.org

--

From: Mauro Carvalho Chehab  mche...@redhat.com
merge: http://www.linuxtv.org/hg/~hverkuil/v4l-dvb-lib


Signed-off-by: Mauro Carvalho Chehab mche...@redhat.com


---

 .hgignore   |   12 
 v4l2-apps/Makefile  |3 
 v4l2-apps/lib/COPYING.LIB   |  510 --
 v4l2-apps/lib/Makefile  |   33 
 v4l2-apps/lib/TODO  |   81 
 v4l2-apps/lib/frequencies.c | 1502 --
 v4l2-apps/lib/libv4l/COPYING.LIB|  510 --
 v4l2-apps/lib/libv4l/ChangeLog  |  247 -
 v4l2-apps/lib/libv4l/Makefile   |   16 
 v4l2-apps/lib/libv4l/README |  141 
 v4l2-apps/lib/libv4l/README.multi-threading |   12 
 v4l2-apps/lib/libv4l/TODO   |   12 
 v4l2-apps/lib/libv4l/include/libv4l1.h  |   73 
 v4l2-apps/lib/libv4l/include/libv4l2.h  |  110 
 v4l2-apps/lib/libv4l/include/libv4lconvert.h|   88 
 v4l2-apps/lib/libv4l/libv4l1/Makefile   |   83 
 v4l2-apps/lib/libv4l/libv4l1/libv4l1-priv.h |   83 
 v4l2-apps/lib/libv4l/libv4l1/libv4l1.c  |  837 ---
 v4l2-apps/lib/libv4l/libv4l1/log.c  |  145 
 v4l2-apps/lib/libv4l/libv4l1/v4l1compat.c   |  127 
 v4l2-apps/lib/libv4l/libv4l2/Makefile   |   82 
 v4l2-apps/lib/libv4l/libv4l2/libv4l2-priv.h |   95 
 v4l2-apps/lib/libv4l/libv4l2/libv4l2.c  | 1145 
 v4l2-apps/lib/libv4l/libv4l2/log.c  |  148 
 v4l2-apps/lib/libv4l/libv4l2/v4l2convert.c  |  166 
 v4l2-apps/lib/libv4l/libv4lconvert/Makefile |   70 
 v4l2-apps/lib/libv4l/libv4lconvert/bayer.c  |  613 --
 v4l2-apps/lib/libv4l/libv4lconvert/flip.c   |  107 
 v4l2-apps/lib/libv4l/libv4lconvert/jidctflt.c   |  286 -
 v4l2-apps/lib/libv4l/libv4lconvert/libv4lconvert-priv.h |  166 
 v4l2-apps/lib/libv4l/libv4lconvert/libv4lconvert.c  |  737 --
 v4l2-apps/lib/libv4l/libv4lconvert/pac207.c |  418 -
 v4l2-apps/lib/libv4l/libv4lconvert/rgbyuv.c |  316 -
 v4l2-apps/lib/libv4l/libv4lconvert/sn9c10x.c|  287 -
 v4l2-apps/lib/libv4l/libv4lconvert/spca501.c|  126 
 v4l2-apps/lib/libv4l/libv4lconvert/spca561-decompress.c | 1003 
 v4l2-apps/lib/libv4l/libv4lconvert/tinyjpeg-internal.h  |  121 
 v4l2-apps/lib/libv4l/libv4lconvert/tinyjpeg.c   | 2463 --
 v4l2-apps/lib/libv4l/libv4lconvert/tinyjpeg.h   |   74 
 v4l2-apps/lib/v4l2.h|   45 
 v4l2-apps/lib/v4l2_driver.c |  804 ---
 v4l2-apps/lib/v4l2_driver.h |   81 
 v4l2-apps/libv4l/COPYING.LIB|  510 ++
 v4l2-apps/libv4l/ChangeLog  |  247 +
 v4l2-apps/libv4l/Makefile   |   16 
 v4l2-apps/libv4l/README |  141 
 v4l2-apps/libv4l/README.multi-threading |   12 
 v4l2-apps/libv4l/TODO   |   12 
 v4l2-apps/libv4l/include/libv4l1.h  |   73 
 v4l2-apps/libv4l/include/libv4l2.h  |  110 
 v4l2-apps/libv4l/include/libv4lconvert.h|   88 
 v4l2-apps/libv4l/libv4l1/Makefile   |   83 
 v4l2-apps/libv4l/libv4l1/libv4l1-priv.h |   83 
 v4l2-apps/libv4l/libv4l1/libv4l1.c  |  837 +++
 v4l2-apps/libv4l/libv4l1/log.c  |  145 
 v4l2-apps/libv4l/libv4l1/v4l1compat.c   |  127 
 v4l2-apps/libv4l/libv4l2/Makefile   |   82 
 v4l2-apps/libv4l/libv4l2/libv4l2-priv.h |   95 
 v4l2-apps/libv4l/libv4l2/libv4l2.c  | 1145 
 v4l2-apps/libv4l/libv4l2/log.c  |  148 
 v4l2-apps/libv4l/libv4l2/v4l2convert.c  |  166 
 v4l2-apps/libv4l/libv4lconvert/Makefile |   70 
 v4l2-apps/libv4l/libv4lconvert/bayer.c  |  613 ++
 v4l2-apps/libv4l/libv4lconvert/flip.c   |  107 
 v4l2-apps/libv4l/libv4lconvert/jidctflt.c   |  286 +
 v4l2-apps/libv4l/libv4lconvert/libv4lconvert-priv.h |  166 
 

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

2009-02-09 Thread Patch from Mauro Carvalho Chehab
The patch number 10495 was added via Mauro Carvalho Chehab mche...@redhat.com
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:
Linux Media Mailing List linux-me...@vger.kernel.org

--

From: Mauro Carvalho Chehab  mche...@redhat.com
merge: http://www.linuxtv.org/hg/~hverkuil/v4l-dvb-spec


Priority: normal

Signed-off-by: Mauro Carvalho Chehab mche...@redhat.com


---

 .hgignore  |6 
 README.patches |   61 ++---
 2 files changed, 39 insertions(+), 28 deletions(-)

diff -r e3896c8892a5 -r d76f0c9b75fd .hgignore
--- a/.hgignore Tue Feb 10 01:31:47 2009 +0100
+++ b/.hgignore Tue Feb 10 04:47:31 2009 -0200
@@ -63,3 +63,9 @@ v4l2-spec/v4l2$
 v4l2-spec/v4l2$
 v4l2-spec/v4l2.pdf$
 v4l2-spec/videodev2.h.sgml$
+v4l/firmware/cpia2/stv0672_vp4.bin
+v4l/firmware/dabusb/bitstream.bin
+v4l/firmware/dabusb/firmware.fw
+v4l/firmware/ihex2fw
+v4l/firmware/ttusb-budget/dspbootcode.bin
+v4l/firmware/vicam/firmware.fw
diff -r e3896c8892a5 -r d76f0c9b75fd README.patches
--- a/README.patchesTue Feb 10 01:31:47 2009 +0100
+++ b/README.patchesTue Feb 10 04:47:31 2009 -0200
@@ -1,5 +1,5 @@ Mauro Carvalho Chehab mchehab at infrad
 Mauro Carvalho Chehab mchehab at infradead dot org
-   Updated on 2009 January 8
+   Updated on 2009 February 9
 
 This file describes the general procedures used by the LinuxTV team (*)
 and by the v4l-dvb community.
@@ -255,30 +255,35 @@ g) Another kernel's practice that is agr
Reviewed-by: My Name myem...@mysite.com
This is particularly important for Kernel to userspace ABI changes.
 
-h)  If the patch also affects other parts of kernel (like Alsa
-or i2c), it is required that, when submitting upstream, the patch
-also goes to the maintainers of that subsystem. To do this, the
-developer shall copy the interested parties.
-
-At mercurial tree, this can be handled automatically by the LinuxTV
-scripts, by using the cc: meta tag, together with the Signed-off-by
-lines. Something like:
+h) If the patch also affects other parts of kernel (like Alsa
+   or i2c), it is required that, when submitting upstream, the patch
+   also goes to the maintainers of that subsystem. To do this, the
+   developer shall copy the interested parties.
+
+   At mercurial tree, this can be handled automatically by the LinuxTV
+   scripts, by using the cc: meta tag, together with the Signed-off-by
+   lines. Something like:
 
CC: someotherkerneldevelo...@someplace
Signed-off-by: nowhere nowh...@noplace.org
 
-This way, when a patch arrives mercurial hg tree, a mailbomb script
-will copy the proper interested parties.
-
-When submitting a patch via e-mail, it is better to copy all interested
-parties directly, by adding them as cc's to the email itself.
-
-Please note that those changes generally require ack from the
-other subsystem maintainers. So, the best practice is to first ask
-for their acks, then commit to the development tree or send the
-patch via email with their Acked-by: already included.
-
-i) Sometimes, mainstream changes affect the v4l-dvb tree, and mast be
+   This way, when a patch arrives mercurial hg tree, a mailbomb script
+   will copy the proper interested parties.
+
+   When submitting a patch via e-mail, it is better to copy all interested
+   parties directly, by adding them as cc's to the email itself.
+
+   Please note that those changes generally require ack from the
+   other subsystem maintainers. So, the best practice is to first ask
+   for their acks, then commit to the development tree or send the
+   patch via email with their Acked-by: already included.
+
+i) If the patch modifies the include/linux/videodev2.h file, then you
+   must also run 'make spec' to verify that the V4L2 specification
+   document still builds. Of course, any changes you make to the public
+   V4L2 API must be documented anyway.
+
+j) Sometimes, mainstream changes affect the v4l-dvb tree, and mast be
backported to the v4l-dvb tree. This kind of commit to the mercurial
tree should follow the rules above and should also have the line:
 
@@ -286,7 +291,7 @@ i) Sometimes, mainstream changes affect 
 
Patches with this line will not be submitted upstream.
 
-j) Sometimes it is necessary to introduce some testing code inside a
+k) Sometimes it is necessary to introduce some testing code inside a
module or remove parts that are not yet finished. Also, compatibility
tests may be required to provide backporting.
 
@@ -319,8 +324,8 @@ j) Sometimes it is necessary to introduc
 
#include 

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

2009-02-01 Thread Patch from Mauro Carvalho Chehab
The patch number 10410 was added via Mauro Carvalho Chehab mche...@redhat.com
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:
Linux Media Mailing List linux-me...@vger.kernel.org

--

From: Mauro Carvalho Chehab  mche...@redhat.com
merge: http://www.linuxtv.org/hg/~hverkuil/v4l-dvb


Priority: normal

Signed-off-by: Mauro Carvalho Chehab mche...@redhat.com


---

 linux/drivers/media/video/cs53l32a.c |1 -
 linux/drivers/media/video/cx18/cx18-av-core.c|2 +-
 linux/drivers/media/video/cx25840/cx25840-core.c |2 +-
 linux/drivers/media/video/gspca/t613.c   |2 +-
 linux/drivers/media/video/m52790.c   |1 -
 linux/drivers/media/video/saa5246a.c |1 -
 linux/drivers/media/video/saa5249.c  |1 -
 linux/drivers/media/video/saa7115.c  |2 +-
 linux/drivers/media/video/saa717x.c  |3 +--
 linux/drivers/media/video/tda7432.c  |1 -
 linux/drivers/media/video/tda9840.c  |1 -
 linux/drivers/media/video/tda9875.c  |1 -
 linux/drivers/media/video/tea6415c.c |1 -
 linux/drivers/media/video/tea6420.c  |1 -
 linux/drivers/media/video/tlv320aic23b.c |1 -
 linux/drivers/media/video/tvmixer.c  |1 -
 linux/drivers/media/video/tvp5150.c  |1 -
 linux/drivers/media/video/upd64031a.c|1 -
 linux/drivers/media/video/upd64083.c |1 -
 linux/drivers/media/video/vp27smpx.c |1 -
 linux/drivers/media/video/wm8739.c   |1 -
 v4l/versions.txt |4 
 22 files changed, 9 insertions(+), 22 deletions(-)

diff -r 138cb0226301 -r afc6afc946c7 linux/drivers/media/video/cs53l32a.c
--- a/linux/drivers/media/video/cs53l32a.c  Sat Jan 31 09:14:24 2009 -0200
+++ b/linux/drivers/media/video/cs53l32a.c  Sun Feb 01 10:24:06 2009 -0200
@@ -225,7 +225,6 @@ MODULE_DEVICE_TABLE(i2c, cs53l32a_id);
 #endif
 static struct v4l2_i2c_driver_data v4l2_i2c_data = {
.name = cs53l32a,
-   .driverid = I2C_DRIVERID_CS53L32A,
.command = cs53l32a_command,
.remove = cs53l32a_remove,
.probe = cs53l32a_probe,
diff -r 138cb0226301 -r afc6afc946c7 
linux/drivers/media/video/cx18/cx18-av-core.c
--- a/linux/drivers/media/video/cx18/cx18-av-core.c Sat Jan 31 09:14:24 
2009 -0200
+++ b/linux/drivers/media/video/cx18/cx18-av-core.c Sun Feb 01 10:24:06 
2009 -0200
@@ -548,7 +548,7 @@ static int set_v4lctrl(struct cx18 *cx, 
break;
 
case V4L2_CID_HUE:
-   if (ctrl-value  -127 || ctrl-value  127) {
+   if (ctrl-value  -128 || ctrl-value  127) {
CX18_ERR(invalid hue setting %d\n, ctrl-value);
return -ERANGE;
}
diff -r 138cb0226301 -r afc6afc946c7 
linux/drivers/media/video/cx25840/cx25840-core.c
--- a/linux/drivers/media/video/cx25840/cx25840-core.c  Sat Jan 31 09:14:24 
2009 -0200
+++ b/linux/drivers/media/video/cx25840/cx25840-core.c  Sun Feb 01 10:24:06 
2009 -0200
@@ -782,7 +782,7 @@ static int cx25840_s_ctrl(struct v4l2_su
break;
 
case V4L2_CID_HUE:
-   if (ctrl-value  -127 || ctrl-value  127) {
+   if (ctrl-value  -128 || ctrl-value  127) {
v4l_err(client, invalid hue setting %d\n, 
ctrl-value);
return -ERANGE;
}
diff -r 138cb0226301 -r afc6afc946c7 linux/drivers/media/video/gspca/t613.c
--- a/linux/drivers/media/video/gspca/t613.cSat Jan 31 09:14:24 2009 -0200
+++ b/linux/drivers/media/video/gspca/t613.cSun Feb 01 10:24:06 2009 -0200
@@ -635,7 +635,7 @@ static int sd_init(struct gspca_dev *gsp
struct sd *sd = (struct sd *) gspca_dev;
int i;
u16 sensor_id;
-   u8 test_byte;
+   u8 test_byte = 0;
u16 reg80, reg8e;
 
static const u8 read_indexs[] =
diff -r 138cb0226301 -r afc6afc946c7 linux/drivers/media/video/m52790.c
--- a/linux/drivers/media/video/m52790.cSat Jan 31 09:14:24 2009 -0200
+++ b/linux/drivers/media/video/m52790.cSun Feb 01 10:24:06 2009 -0200
@@ -222,7 +222,6 @@ MODULE_DEVICE_TABLE(i2c, m52790_id);
 #endif
 static struct v4l2_i2c_driver_data v4l2_i2c_data = {
.name = m52790,
-   .driverid = I2C_DRIVERID_M52790,
.command = m52790_command,
.probe = m52790_probe,
.remove = m52790_remove,
diff -r 138cb0226301 -r afc6afc946c7 linux/drivers/media/video/saa5246a.c
--- a/linux/drivers/media/video/saa5246a.c  Sat Jan 31 09:14:24 2009 -0200
+++ 

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

2009-01-27 Thread Patch from Mauro Carvalho Chehab
The patch number 10315 was added via Mauro Carvalho Chehab mche...@redhat.com
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:
Linux Media Mailing List linux-me...@vger.kernel.org

--

From: Mauro Carvalho Chehab  mche...@redhat.com
merge: http://www.linuxtv.org/hg/~hverkuil/v4l-dvb-saa7146


Priority: normal

Signed-off-by: Mauro Carvalho Chehab mche...@redhat.com


---

 linux/drivers/media/common/saa7146_fops.c|7 +--
 linux/drivers/media/video/cx25840/cx25840-core.c |2 +-
 2 files changed, 6 insertions(+), 3 deletions(-)

diff -r 92603e53d49e -r 8038735d2781 linux/drivers/media/common/saa7146_fops.c
--- a/linux/drivers/media/common/saa7146_fops.c Tue Jan 27 22:16:53 2009 -0200
+++ b/linux/drivers/media/common/saa7146_fops.c Tue Jan 27 22:30:35 2009 -0200
@@ -512,6 +512,7 @@ int saa7146_register_device(struct video
struct saa7146_vv *vv = dev-vv_data;
struct video_device *vfd;
int err;
+   int i;
 
DEB_EE((dev:%p, name:'%s', type:%d\n,dev,name,type));
 
@@ -521,9 +522,11 @@ int saa7146_register_device(struct video
return -ENOMEM;
 
vfd-fops = video_fops;
-   vfd-ioctl_ops = dev-ext_vv_data ? dev-ext_vv_data-ops :
-   saa7146_video_ioctl_ops;
+   vfd-ioctl_ops = dev-ext_vv_data-ops;
vfd-release = video_device_release;
+   vfd-tvnorms = 0;
+   for (i = 0; i  dev-ext_vv_data-num_stds; i++)
+   vfd-tvnorms |= dev-ext_vv_data-stds[i].id;
strlcpy(vfd-name, name, sizeof(vfd-name));
video_set_drvdata(vfd, dev);
 
diff -r 92603e53d49e -r 8038735d2781 
linux/drivers/media/video/cx25840/cx25840-core.c
--- a/linux/drivers/media/video/cx25840/cx25840-core.c  Tue Jan 27 22:16:53 
2009 -0200
+++ b/linux/drivers/media/video/cx25840/cx25840-core.c  Tue Jan 27 22:30:35 
2009 -0200
@@ -1412,7 +1412,7 @@ static int cx25840_command(struct i2c_cl
 static int cx25840_command(struct i2c_client *client, unsigned cmd, void *arg)
 {
/* ignore this command */
-   if (cmd == TUNER_SET_TYPE_ADDR)
+   if (cmd == TUNER_SET_TYPE_ADDR || cmd == TUNER_SET_CONFIG)
return 0;
 
/* Old-style drivers rely on initialization on first use, so


---

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

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


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

2009-01-22 Thread Patch from Mauro Carvalho Chehab
The patch number 10273 was added via Mauro Carvalho Chehab mche...@redhat.com
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:
Linux Media Mailing List linux-me...@vger.kernel.org

--

From: Mauro Carvalho Chehab  mche...@redhat.com
merge: http://www.linuxtv.org/hg/~hverkuil/v4l-dvb-saa7146-2


Priority: normal

Signed-off-by: Mauro Carvalho Chehab mche...@redhat.com


---

 linux/drivers/media/common/saa7146_fops.c  |   36 
 linux/drivers/media/common/saa7146_video.c | 1377 ++---
 linux/drivers/media/dvb/ttpci/av7110_v4l.c |  538 
 linux/drivers/media/dvb/ttpci/budget-av.c  |   88 -
 linux/drivers/media/video/hexium_gemini.c  |  292 ++--
 linux/drivers/media/video/hexium_orion.c   |  103 -
 linux/drivers/media/video/mxb.c|  703 +-
 linux/include/media/saa7146_vv.h   |   17 
 8 files changed, 1525 insertions(+), 1629 deletions(-)

diff discarded since it is too big

---

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

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


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

2009-01-22 Thread Patch from Mauro Carvalho Chehab
The patch number 10292 was added via Mauro Carvalho Chehab mche...@redhat.com
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:
Linux Media Mailing List linux-me...@vger.kernel.org

--

From: Mauro Carvalho Chehab  mche...@redhat.com
merge: http://www.linuxtv.org/hg/~hverkuil/v4l-dvb


Priority: normal

Signed-off-by: Mauro Carvalho Chehab mche...@redhat.com


---

 .hgignore   |3 ++-
 linux/drivers/media/video/em28xx/em28xx-video.c |7 ++-
 2 files changed, 8 insertions(+), 2 deletions(-)

diff -r 0a855ae09ce1 -r abb4add20e7b .hgignore
--- a/.hgignore Thu Jan 22 20:52:03 2009 -0200
+++ b/.hgignore Thu Jan 22 20:59:21 2009 -0200
@@ -28,6 +28,7 @@ v4l/.myconfig$
 v4l/.myconfig$
 v4l/.snapshot$
 v4l2-apps/lib/.*\.so$
+v4l2-apps/include
 v4l2-apps/test/driver-test$
 v4l2-apps/test/v4lgrab$
 v4l2-apps/test/ioctl-test$
@@ -38,7 +39,7 @@ v4l2-apps/test/pixfmt-test$
 v4l2-apps/test/pixfmt-test$
 v4l2-apps/util/v4l2-dbg$
 v4l2-apps/util/v4l2-chipids.cpp$
-v4l2-apps/util/v4l2-driverids.cpp$
+v4l2-apps/util/v4l2-compliance$
 v4l2-apps/util/keycodes/.*
 v4l2-apps/util/keytable$
 v4l2-apps/util/parse.h$
diff -r 0a855ae09ce1 -r abb4add20e7b 
linux/drivers/media/video/em28xx/em28xx-video.c
--- a/linux/drivers/media/video/em28xx/em28xx-video.c   Thu Jan 22 20:52:03 
2009 -0200
+++ b/linux/drivers/media/video/em28xx/em28xx-video.c   Thu Jan 22 20:59:21 
2009 -0200
@@ -1018,8 +1018,13 @@ static int vidioc_g_ctrl(struct file *fi
 
if (dev-board.has_msp34xx)
em28xx_i2c_call_clients(dev, VIDIOC_G_CTRL, ctrl);
-   else
+   else {
rc = em28xx_get_ctrl(dev, ctrl);
+   if (rc  0) {
+   em28xx_i2c_call_clients(dev, VIDIOC_G_CTRL, ctrl);
+   rc = 0;
+   }
+   }
 
mutex_unlock(dev-lock);
return rc;


---

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

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


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

2009-01-18 Thread Patch from Mauro Carvalho Chehab
The patch number 10253 was added via Mauro Carvalho Chehab mche...@redhat.com
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:
Linux Media Mailing List linux-me...@vger.kernel.org

--

From: Mauro Carvalho Chehab  mche...@redhat.com
merge: http://www.linuxtv.org/hg/~hverkuil/v4l-dvb-cx25840


Priority: normal

Signed-off-by: Mauro Carvalho Chehab mche...@redhat.com


---

 linux/Documentation/video4linux/v4l2-framework.txt |6 
 linux/drivers/media/video/cx25840/cx25840-core.c   |   18 +
 linux/include/media/cx25840.h  |   12 
 3 files changed, 36 insertions(+)

diff -r aedffebec498 -r 2913087bd96e 
linux/Documentation/video4linux/v4l2-framework.txt
--- a/linux/Documentation/video4linux/v4l2-framework.txtSun Jan 18 
23:37:59 2009 +0100
+++ b/linux/Documentation/video4linux/v4l2-framework.txtSun Jan 18 
22:28:51 2009 -0200
@@ -340,6 +340,12 @@ is called. This will unregister the sub-
 is called. This will unregister the sub-device from the bridge driver. It is
 safe to call this even if the sub-device was never registered.
 
+You need to do this because when the bridge driver destroys the i2c adapter
+the remove() callbacks are called of the i2c devices on that adapter.
+After that the corresponding v4l2_subdev structures are invalid, so they
+have to be unregistered first. Calling v4l2_device_unregister_subdev(sd)
+from the remove() callback ensures that this is always done correctly.
+
 
 The bridge driver also has some helper functions it can use:
 
diff -r aedffebec498 -r 2913087bd96e 
linux/drivers/media/video/cx25840/cx25840-core.c
--- a/linux/drivers/media/video/cx25840/cx25840-core.c  Sun Jan 18 23:37:59 
2009 +0100
+++ b/linux/drivers/media/video/cx25840/cx25840-core.c  Sun Jan 18 22:28:51 
2009 -0200
@@ -1120,6 +1120,16 @@ static void log_audio_status(struct i2c_
 
 /* --- */
 
+/* This init operation must be called to load the driver's firmware.
+   Without this the audio standard detection will fail and you will
+   only get mono.
+
+   Since loading the firmware is often problematic when the driver is
+   compiled into the kernel I recommend postponing calling this function
+   until the first open of the video device. Another reason for
+   postponing it is that loading this firmware takes a long time (seconds)
+   due to the slow i2c bus speed. So it will speed up the boot process if
+   you can avoid loading the fw as long as the video device isn't used.  */
 static int cx25840_init(struct v4l2_subdev *sd, u32 val)
 {
struct cx25840_state *state = to_state(sd);
@@ -1401,6 +1411,14 @@ static int cx25840_log_status(struct v4l
 
 static int cx25840_command(struct i2c_client *client, unsigned cmd, void *arg)
 {
+   /* ignore this command */
+   if (cmd == TUNER_SET_TYPE_ADDR)
+   return 0;
+
+   /* Old-style drivers rely on initialization on first use, so
+  call the init whenever a command is issued to this driver.
+  New-style drivers using v4l2_subdev should call init explicitly. */
+   cx25840_init(i2c_get_clientdata(client), 0);
return v4l2_subdev_command(i2c_get_clientdata(client), cmd, arg);
 }
 
diff -r aedffebec498 -r 2913087bd96e linux/include/media/cx25840.h
--- a/linux/include/media/cx25840.h Sun Jan 18 23:37:59 2009 +0100
+++ b/linux/include/media/cx25840.h Sun Jan 18 22:28:51 2009 -0200
@@ -20,6 +20,18 @@
 
 #ifndef _CX25840_H_
 #define _CX25840_H_
+
+/* Note that the cx25840 driver requires that the bridge driver calls the
+   v4l2_subdev's init operation in order to load the driver's firmware.
+   Without this the audio standard detection will fail and you will
+   only get mono.
+
+   Since loading the firmware is often problematic when the driver is
+   compiled into the kernel I recommend postponing calling this function
+   until the first open of the video device. Another reason for
+   postponing it is that loading this firmware takes a long time (seconds)
+   due to the slow i2c bus speed. So it will speed up the boot process if
+   you can avoid loading the fw as long as the video device isn't used. */
 
 enum cx25840_video_input {
/* Composite video inputs In1-In8 */


---

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

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


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

2009-01-13 Thread Patch from Mauro Carvalho Chehab
The patch number 10232 was added via Mauro Carvalho Chehab mche...@redhat.com
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:
Linux Media Mailing List linux-me...@vger.kernel.org

--

From: Mauro Carvalho Chehab  mche...@redhat.com
merge:  http://www.linuxtv.org/hg/~hverkuil/v4l-dvb-saa7134


Priority: normal

Signed-off-by: Mauro Carvalho Chehab mche...@redhat.com


---

 linux/drivers/media/video/ivtv/ivtv-driver.c |4 +++-
 linux/drivers/media/video/v4l2-subdev.c  |6 ++
 linux/include/media/v4l2-device.h|8 
 linux/include/media/v4l2-subdev.h|3 +++
 4 files changed, 16 insertions(+), 5 deletions(-)

diff -r b09b5128742f -r 1e1c3851abe8 
linux/drivers/media/video/ivtv/ivtv-driver.c
--- a/linux/drivers/media/video/ivtv/ivtv-driver.c  Mon Jan 12 22:50:52 
2009 -0200
+++ b/linux/drivers/media/video/ivtv/ivtv-driver.c  Wed Jan 14 01:46:23 
2009 -0200
@@ -953,8 +953,10 @@ static int __devinit ivtv_probe(struct p
itv-instance = atomic_inc_return(ivtv_instance) - 1;
 
retval = v4l2_device_register(dev-dev, itv-device);
-   if (retval)
+   if (retval) {
+   kfree(itv);
return retval;
+   }
/* ivtv + PCI ID is a bit of a mouthful, so use
   ivtv + instance instead. */
snprintf(itv-device.name, sizeof(itv-device.name),
diff -r b09b5128742f -r 1e1c3851abe8 linux/drivers/media/video/v4l2-subdev.c
--- a/linux/drivers/media/video/v4l2-subdev.c   Mon Jan 12 22:50:52 2009 -0200
+++ b/linux/drivers/media/video/v4l2-subdev.c   Wed Jan 14 01:46:23 2009 -0200
@@ -33,6 +33,12 @@ int v4l2_subdev_command(struct v4l2_subd
return v4l2_subdev_call(sd, core, g_ctrl, arg);
case VIDIOC_S_CTRL:
return v4l2_subdev_call(sd, core, s_ctrl, arg);
+   case VIDIOC_G_EXT_CTRLS:
+   return v4l2_subdev_call(sd, core, g_ext_ctrls, arg);
+   case VIDIOC_S_EXT_CTRLS:
+   return v4l2_subdev_call(sd, core, s_ext_ctrls, arg);
+   case VIDIOC_TRY_EXT_CTRLS:
+   return v4l2_subdev_call(sd, core, try_ext_ctrls, arg);
case VIDIOC_QUERYMENU:
return v4l2_subdev_call(sd, core, queryctrl, arg);
case VIDIOC_LOG_STATUS:
diff -r b09b5128742f -r 1e1c3851abe8 linux/include/media/v4l2-device.h
--- a/linux/include/media/v4l2-device.h Mon Jan 12 22:50:52 2009 -0200
+++ b/linux/include/media/v4l2-device.h Wed Jan 14 01:46:23 2009 -0200
@@ -94,16 +94,16 @@ void v4l2_device_unregister_subdev(struc
 /* Call the specified callback for all subdevs matching grp_id (if 0, then
match them all). Ignore any errors. Note that you cannot add or delete
a subdev while walking the subdevs list. */
-#define v4l2_device_call_all(dev, grp_id, o, f, args...)   \
+#define v4l2_device_call_all(dev, grpid, o, f, args...)\
__v4l2_device_call_subdevs(dev, \
-   !(grp_id) || sd-grp_id == (grp_id), o, f , ##args)
+   !(grpid) || sd-grp_id == (grpid), o, f , ##args)
 
 /* Call the specified callback for all subdevs matching grp_id (if 0, then
match them all). If the callback returns an error other than 0 or
-ENOIOCTLCMD, then return with that error code. Note that you cannot
add or delete a subdev while walking the subdevs list. */
-#define v4l2_device_call_until_err(dev, grp_id, o, f, args...) 
\
+#define v4l2_device_call_until_err(dev, grpid, o, f, args...)  \
__v4l2_device_call_subdevs_until_err(dev,   \
-  !(grp_id) || sd-grp_id == (grp_id), o, f , ##args)
+  !(grpid) || sd-grp_id == (grpid), o, f , ##args)
 
 #endif
diff -r b09b5128742f -r 1e1c3851abe8 linux/include/media/v4l2-subdev.h
--- a/linux/include/media/v4l2-subdev.h Mon Jan 12 22:50:52 2009 -0200
+++ b/linux/include/media/v4l2-subdev.h Wed Jan 14 01:46:23 2009 -0200
@@ -78,6 +78,9 @@ struct v4l2_subdev_core_ops {
int (*queryctrl)(struct v4l2_subdev *sd, struct v4l2_queryctrl *qc);
int (*g_ctrl)(struct v4l2_subdev *sd, struct v4l2_control *ctrl);
int (*s_ctrl)(struct v4l2_subdev *sd, struct v4l2_control *ctrl);
+   int (*g_ext_ctrls)(struct v4l2_subdev *sd, struct v4l2_ext_controls 
*ctrls);
+   int (*s_ext_ctrls)(struct v4l2_subdev *sd, struct v4l2_ext_controls 
*ctrls);
+   int (*try_ext_ctrls)(struct v4l2_subdev *sd, struct v4l2_ext_controls 
*ctrls);
int (*querymenu)(struct v4l2_subdev *sd, struct v4l2_querymenu *qm);
long (*ioctl)(struct v4l2_subdev *sd, unsigned int cmd, void *arg);
 #ifdef CONFIG_VIDEO_ADV_DEBUG



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

2009-01-11 Thread Patch from Mauro Carvalho Chehab
The patch number 10217 was added via Mauro Carvalho Chehab mche...@redhat.com
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:
Linux Media Mailing List linux-me...@vger.kernel.org

--

From: Mauro Carvalho Chehab  mche...@redhat.com
merge: http://www.linuxtv.org/hg/~hverkuil/v4l-dvb


Signed-off-by: Mauro Carvalho Chehab mche...@redhat.com


---

 linux/drivers/media/dvb/frontends/stb0899_algo.c |3 
 linux/drivers/media/video/saa7127.c  |   68 ---
 v4l/versions.txt |6 -
 3 files changed, 45 insertions(+), 32 deletions(-)

diff -r e485a740bd54 -r 8ba654b57802 
linux/drivers/media/dvb/frontends/stb0899_algo.c
--- a/linux/drivers/media/dvb/frontends/stb0899_algo.c  Sun Jan 11 13:04:30 
2009 -0200
+++ b/linux/drivers/media/dvb/frontends/stb0899_algo.c  Mon Jan 12 03:30:56 
2009 -0200
@@ -31,6 +31,8 @@ inline u32 stb0899_do_div(u64 n, u32 d)
return n;
 }
 
+#if 0 /* keep */
+/* These functions are currently unused */
 /*
  * stb0899_calc_srate
  * Compute symbol rate
@@ -63,6 +65,7 @@ static u32 stb0899_get_srate(struct stb0
 
return stb0899_calc_srate(internal-master_clk, sfr);
 }
+#endif
 
 /*
  * stb0899_set_srate
diff -r e485a740bd54 -r 8ba654b57802 linux/drivers/media/video/saa7127.c
--- a/linux/drivers/media/video/saa7127.c   Sun Jan 11 13:04:30 2009 -0200
+++ b/linux/drivers/media/video/saa7127.c   Mon Jan 12 03:30:56 2009 -0200
@@ -155,7 +155,7 @@ static const struct i2c_reg_value saa712
{ SAA7127_REG_COPYGEN_0,0x77 },
{ SAA7127_REG_COPYGEN_1,0x41 },
{ SAA7127_REG_COPYGEN_2,0x00 }, /* Macrovision 
enable/disable */
-   { SAA7127_REG_OUTPUT_PORT_CONTROL,  0x9e },
+   { SAA7127_REG_OUTPUT_PORT_CONTROL,  0xbf },
{ SAA7127_REG_GAIN_LUMINANCE_RGB,   0x00 },
{ SAA7127_REG_GAIN_COLORDIFF_RGB,   0x00 },
{ SAA7127_REG_INPUT_PORT_CONTROL_1, 0x80 }, /* for color 
bars */
@@ -494,12 +494,18 @@ static int saa7127_set_output_type(struc
break;
 
case SAA7127_OUTPUT_TYPE_COMPOSITE:
-   state-reg_2d = 0x08;   /* 1000 CVBS only, RGB DAC's off 
(high impedance mode) */
+   if (state-ident == V4L2_IDENT_SAA7129)
+   state-reg_2d = 0x20;   /* CVBS only */
+   else
+   state-reg_2d = 0x08;   /* 1000 CVBS only, RGB 
DAC's off (high impedance mode) */
state-reg_3a = 0x13;   /* by default switch YUV to RGB-matrix 
on */
break;
 
case SAA7127_OUTPUT_TYPE_SVIDEO:
-   state-reg_2d = 0xff;   /*   croma - R, luma - CVBS + 
G + B */
+   if (state-ident == V4L2_IDENT_SAA7129)
+   state-reg_2d = 0x18;   /* Y + C */
+   else
+   state-reg_2d = 0xff;   /*  croma - R, luma - 
CVBS + G + B */
state-reg_3a = 0x13;   /* by default switch YUV to RGB-matrix 
on */
break;
 
@@ -514,7 +520,10 @@ static int saa7127_set_output_type(struc
break;
 
case SAA7127_OUTPUT_TYPE_BOTH:
-   state-reg_2d = 0xbf;
+   if (state-ident == V4L2_IDENT_SAA7129)
+   state-reg_2d = 0x38;
+   else
+   state-reg_2d = 0xbf;
state-reg_3a = 0x13;   /* by default switch YUV to RGB-matrix 
on */
break;
 
@@ -741,7 +750,31 @@ static int saa7127_probe(struct i2c_clie
return -ENODEV;
}
 
-   /* Configure Encoder */
+#if LINUX_VERSION_CODE = KERNEL_VERSION(2, 6, 26)
+   if (id-driver_data) {  /* Chip type is already known */
+   state-ident = id-driver_data;
+   } else {/* Needs detection */
+#else
+   {
+#endif
+   int read_result;
+
+   /* Detect if it's an saa7129 */
+   read_result = saa7127_read(sd, SAA7129_REG_FADE_KEY_COL2);
+   saa7127_write(sd, SAA7129_REG_FADE_KEY_COL2, 0xaa);
+   if (saa7127_read(sd, SAA7129_REG_FADE_KEY_COL2) == 0xaa) {
+   saa7127_write(sd, SAA7129_REG_FADE_KEY_COL2,
+   read_result);
+   state-ident = V4L2_IDENT_SAA7129;
+   strlcpy(client-name, saa7129, I2C_NAME_SIZE);
+   } else {
+   state-ident = V4L2_IDENT_SAA7127;
+   strlcpy(client-name, saa7127, I2C_NAME_SIZE);
+   }
+   }
+
+   v4l2_info(sd, %s 

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

2008-12-30 Thread Patch from Mauro Carvalho Chehab
The patch number 10146 was added via Mauro Carvalho Chehab mche...@redhat.com
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:
v4l-dvb-maintai...@linuxtv.org

--

From: Mauro Carvalho Chehab  mche...@redhat.com
merge: http://www.linuxtv.org/hg/~hverkuil/v4l-dvb-backport


Signed-off-by: Mauro Carvalho Chehab mche...@redhat.com


---

 linux/drivers/media/dvb/frontends/af9013.c |1 
 linux/drivers/media/video/mt9t031.c|8 ++
 linux/drivers/media/video/tw9910.c |8 ++
 v4l/compat.h   |   61 -
 4 files changed, 76 insertions(+), 2 deletions(-)

diff -r e9c7ced9f4b9 -r 1e8776bf9900 linux/drivers/media/dvb/frontends/af9013.c
--- a/linux/drivers/media/dvb/frontends/af9013.cTue Dec 30 22:40:00 
2008 +0300
+++ b/linux/drivers/media/dvb/frontends/af9013.cTue Dec 30 19:38:11 
2008 -0200
@@ -33,6 +33,7 @@
 #include dvb_frontend.h
 #include af9013_priv.h
 #include af9013.h
+#include compat.h
 
 int af9013_debug;
 
diff -r e9c7ced9f4b9 -r 1e8776bf9900 linux/drivers/media/video/mt9t031.c
--- a/linux/drivers/media/video/mt9t031.c   Tue Dec 30 22:40:00 2008 +0300
+++ b/linux/drivers/media/video/mt9t031.c   Tue Dec 30 19:38:11 2008 -0200
@@ -632,8 +632,12 @@ static void mt9t031_video_remove(struct 
soc_camera_video_stop(icd);
 }
 
+#if LINUX_VERSION_CODE  KERNEL_VERSION(2, 6, 26)
+static int mt9t031_probe(struct i2c_client *client)
+#else
 static int mt9t031_probe(struct i2c_client *client,
 const struct i2c_device_id *did)
+#endif
 {
struct mt9t031 *mt9t031;
struct soc_camera_device *icd;
@@ -703,19 +707,23 @@ static int mt9t031_remove(struct i2c_cli
return 0;
 }
 
+#if LINUX_VERSION_CODE = KERNEL_VERSION(2, 6, 26)
 static const struct i2c_device_id mt9t031_id[] = {
{ mt9t031, 0 },
{ }
 };
 MODULE_DEVICE_TABLE(i2c, mt9t031_id);
 
+#endif
 static struct i2c_driver mt9t031_i2c_driver = {
.driver = {
.name = mt9t031,
},
.probe  = mt9t031_probe,
.remove = mt9t031_remove,
+#if LINUX_VERSION_CODE = KERNEL_VERSION(2, 6, 26)
.id_table   = mt9t031_id,
+#endif
 };
 
 static int __init mt9t031_mod_init(void)
diff -r e9c7ced9f4b9 -r 1e8776bf9900 linux/drivers/media/video/tw9910.c
--- a/linux/drivers/media/video/tw9910.cTue Dec 30 22:40:00 2008 +0300
+++ b/linux/drivers/media/video/tw9910.cTue Dec 30 19:38:11 2008 -0200
@@ -837,8 +837,12 @@ static struct soc_camera_ops tw9910_ops 
  * i2c_driver function
  */
 
+#if LINUX_VERSION_CODE  KERNEL_VERSION(2, 6, 26)
+static int tw9910_probe(struct i2c_client *client)
+#else
 static int tw9910_probe(struct i2c_client *client,
const struct i2c_device_id *did)
+#endif
 
 {
struct tw9910_priv *priv;
@@ -915,19 +919,23 @@ static int tw9910_remove(struct i2c_clie
return 0;
 }
 
+#if LINUX_VERSION_CODE = KERNEL_VERSION(2, 6, 26)
 static const struct i2c_device_id tw9910_id[] = {
{ tw9910, 0 },
{ }
 };
 MODULE_DEVICE_TABLE(i2c, tw9910_id);
 
+#endif
 static struct i2c_driver tw9910_i2c_driver = {
.driver = {
.name = tw9910,
},
.probe= tw9910_probe,
.remove   = tw9910_remove,
+#if LINUX_VERSION_CODE = KERNEL_VERSION(2, 6, 26)
.id_table = tw9910_id,
+#endif
 };
 
 /*
diff -r e9c7ced9f4b9 -r 1e8776bf9900 v4l/compat.h
--- a/v4l/compat.h  Tue Dec 30 22:40:00 2008 +0300
+++ b/v4l/compat.h  Tue Dec 30 19:38:11 2008 -0200
@@ -280,8 +280,8 @@ static inline int dummy_algo_control(str
 #define PCI_DEVICE_ID_MARVELL_88ALP01_CCIC 0x4102
 #endif
 
+#ifdef __LINUX_USB_H
 #if LINUX_VERSION_CODE  KERNEL_VERSION(2, 6, 19)
-#ifdef __LINUX_USB_H
 /*
  * usb_endpoint_* functions
  *
@@ -328,9 +328,66 @@ usb_endpoint_is_int_in(const struct usb_
 {
return usb_endpoint_xfer_int(epd)  usb_endpoint_dir_in(epd);
 }
+
+static inline int usb_endpoint_dir_out(
+   const struct usb_endpoint_descriptor *epd)
+{
+   return ((epd-bEndpointAddress  USB_ENDPOINT_DIR_MASK) == USB_DIR_OUT);
+}
+
+static inline int usb_endpoint_is_bulk_in(
+   const struct usb_endpoint_descriptor *epd)
+{
+   return (usb_endpoint_xfer_bulk(epd)  usb_endpoint_dir_in(epd));
+}
+
+static inline int usb_endpoint_is_bulk_out(
+   const struct usb_endpoint_descriptor *epd)
+{
+   return (usb_endpoint_xfer_bulk(epd)  usb_endpoint_dir_out(epd));
+}
+
+static inline int usb_endpoint_is_int_out(
+   const struct usb_endpoint_descriptor *epd)
+{
+   

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

2008-12-23 Thread Patch from Mauro Carvalho Chehab
The patch number 9968 was added via Mauro Carvalho Chehab mche...@redhat.com
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:
v4l-dvb-maintai...@linuxtv.org

--

From: Mauro Carvalho Chehab  mche...@redhat.com
merge: http://www.linuxtv.org/hg/~hverkuil/v4l-dvb-subdev


Signed-off-by: Mauro Carvalho Chehab mche...@redhat.com


---

 linux/drivers/media/video/cs5345.c |  239 ++--
 linux/drivers/media/video/msp3400-driver.c |2 
 linux/drivers/media/video/tda7432.c|  313 ++
 linux/drivers/media/video/tda9840.c|  212 ++--
 linux/drivers/media/video/tda9875.c|  420 +++-
 linux/drivers/media/video/tea6415c.c   |   53 -
 linux/drivers/media/video/tea6420.c|   51 
 linux/drivers/media/video/tlv320aic23b.c   |  151 +-
 linux/drivers/media/video/tuner-core.c |2 
 linux/drivers/media/video/tvaudio.c|  749 +++---
 linux/drivers/media/video/tvp5150.c| 1081 +
 linux/drivers/media/video/v4l2-subdev.c|   10 
 linux/include/media/v4l2-subdev.h  |3 
 13 files changed, 1692 insertions(+), 1594 deletions(-)

diff discarded since it is too big

---

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

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


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

2008-12-23 Thread Patch from Mauro Carvalho Chehab
The patch number 9976 was added via Mauro Carvalho Chehab mche...@redhat.com
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:
v4l-dvb-maintai...@linuxtv.org

--

From: Mauro Carvalho Chehab  mche...@redhat.com
merge: http://www.linuxtv.org/hg/~hverkuil/v4l-dvb


Signed-off-by: Mauro Carvalho Chehab mche...@redhat.com


---

 linux/drivers/media/video/ivtv/ivtv-streams.c |2 
 linux/drivers/media/video/v4l2-dev.c  |  462 --
 linux/include/media/v4l2-dev.h|   55 +-
 v4l/compat.h  |1 
 4 files changed, 362 insertions(+), 158 deletions(-)

diff -r 9ab145288ffe -r 94592e006b95 
linux/drivers/media/video/ivtv/ivtv-streams.c
--- a/linux/drivers/media/video/ivtv/ivtv-streams.c Tue Dec 23 01:38:23 
2008 +
+++ b/linux/drivers/media/video/ivtv/ivtv-streams.c Tue Dec 23 11:08:23 
2008 -0200
@@ -209,7 +209,7 @@ static int ivtv_prep_dev(struct ivtv *it
itv-device.name, s-name);
 
s-v4l2dev-num = num;
-   s-v4l2dev-parent = itv-dev-dev;
+   s-v4l2dev-v4l2_dev = itv-device;
s-v4l2dev-fops = ivtv_stream_info[type].fops;
s-v4l2dev-release = video_device_release;
s-v4l2dev-tvnorms = V4L2_STD_ALL;
diff -r 9ab145288ffe -r 94592e006b95 linux/drivers/media/video/v4l2-dev.c
--- a/linux/drivers/media/video/v4l2-dev.c  Tue Dec 23 01:38:23 2008 +
+++ b/linux/drivers/media/video/v4l2-dev.c  Tue Dec 23 11:08:23 2008 -0200
@@ -30,6 +30,7 @@
 #include asm/system.h
 
 #include media/v4l2-common.h
+#include media/v4l2-device.h
 #include compat.h
 
 #define VIDEO_NUM_DEVICES  256
@@ -43,17 +44,17 @@ static ssize_t show_index(struct device 
 static ssize_t show_index(struct device *cd,
 struct device_attribute *attr, char *buf)
 {
-   struct video_device *vfd = container_of(cd, struct video_device, dev);
-
-   return sprintf(buf, %i\n, vfd-index);
+   struct video_device *vdev = to_video_device(cd);
+
+   return sprintf(buf, %i\n, vdev-index);
 }
 
 static ssize_t show_name(struct device *cd,
 struct device_attribute *attr, char *buf)
 {
-   struct video_device *vfd = container_of(cd, struct video_device, dev);
-
-   return sprintf(buf, %.*s\n, (int)sizeof(vfd-name), vfd-name);
+   struct video_device *vdev = to_video_device(cd);
+
+   return sprintf(buf, %.*s\n, (int)sizeof(vdev-name), vdev-name);
 }
 
 static struct device_attribute video_device_attrs[] = {
@@ -64,16 +65,16 @@ static struct device_attribute video_dev
 #else
 static ssize_t show_index(struct class_device *cd, char *buf)
 {
-   struct video_device *vfd = container_of(cd, struct video_device, dev);
-
-   return sprintf(buf, %i\n, vfd-index);
+   struct video_device *vdev = to_video_device(cd);
+
+   return sprintf(buf, %i\n, vdev-index);
 }
 
 static ssize_t show_name(struct class_device *cd, char *buf)
 {
-   struct video_device *vfd = container_of(cd, struct video_device, dev);
-
-   return sprintf(buf, %.*s\n, (int)sizeof(vfd-name), vfd-name);
+   struct video_device *vdev = to_video_device(cd);
+
+   return sprintf(buf, %.*s\n, (int)sizeof(vdev-name), vdev-name);
 }
 
 static CLASS_DEVICE_ATTR(index, S_IRUGO, show_index, NULL);
@@ -93,71 +94,77 @@ struct video_device *video_device_alloc(
 }
 EXPORT_SYMBOL(video_device_alloc);
 
-void video_device_release(struct video_device *vfd)
-{
-   kfree(vfd);
+void video_device_release(struct video_device *vdev)
+{
+   kfree(vdev);
 }
 EXPORT_SYMBOL(video_device_release);
 
-void video_device_release_empty(struct video_device *vfd)
+void video_device_release_empty(struct video_device *vdev)
 {
/* Do nothing */
/* Only valid when the video_device struct is a static. */
 }
 EXPORT_SYMBOL(video_device_release_empty);
 
-/* Called when the last user of the character device is gone. */
-static void v4l2_chardev_release(struct kobject *kobj)
-{
-   struct video_device *vfd = container_of(kobj, struct video_device, 
cdev.kobj);
+static inline void video_get(struct video_device *vdev)
+{
+#if LINUX_VERSION_CODE  KERNEL_VERSION(2, 6, 19)
+   class_device_get(vdev-dev);
+#else
+   get_device(vdev-dev);
+#endif
+}
+
+static inline void video_put(struct video_device *vdev)
+{
+#if LINUX_VERSION_CODE  KERNEL_VERSION(2, 6, 19)
+   class_device_put(vdev-dev);
+#else
+   put_device(vdev-dev);
+#endif
+}
+
+/* Called when the last user of the video device exits. */
+#if LINUX_VERSION_CODE  KERNEL_VERSION(2, 6, 19)
+static void v4l2_device_release(struct class_device *cd)
+#else
+static void v4l2_device_release(struct device *cd)
+#endif
+{
+ 

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

2008-12-17 Thread Patch from Mauro Carvalho Chehab
The patch number 9836 was added via Mauro Carvalho Chehab mche...@redhat.com
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:
v4l-dvb-maintai...@linuxtv.org

--

From: Mauro Carvalho Chehab  mche...@redhat.com
merge: http://www.linuxtv.org/hg/~hverkuil/v4l-dvb-ng


Priority: normal

Signed-off-by: Mauro Carvalho Chehab mche...@redhat.com


---

 linux/Documentation/video4linux/v4l2-framework.txt   |  362 
 linux/drivers/media/video/Makefile   |2 
 linux/drivers/media/video/cs53l32a.c |  204 +-
 linux/drivers/media/video/cx25840/cx25840-audio.c|   14 
 linux/drivers/media/video/cx25840/cx25840-core.c |  537 +++---
 linux/drivers/media/video/cx25840/cx25840-core.h |7 
 linux/drivers/media/video/cx25840/cx25840-firmware.c |2 
 linux/drivers/media/video/cx25840/cx25840-vbi.c  |2 
 linux/drivers/media/video/ivtv/ivtv-controls.c   |   16 
 linux/drivers/media/video/ivtv/ivtv-driver.c |  222 --
 linux/drivers/media/video/ivtv/ivtv-driver.h |   52 
 linux/drivers/media/video/ivtv/ivtv-fileops.c|   46 
 linux/drivers/media/video/ivtv/ivtv-gpio.c   |  364 ++--
 linux/drivers/media/video/ivtv/ivtv-gpio.h   |3 
 linux/drivers/media/video/ivtv/ivtv-i2c.c|  354 
 linux/drivers/media/video/ivtv/ivtv-i2c.h|   13 
 linux/drivers/media/video/ivtv/ivtv-ioctl.c  |   73 
 linux/drivers/media/video/ivtv/ivtv-routing.c|   12 
 linux/drivers/media/video/ivtv/ivtv-streams.c|   13 
 linux/drivers/media/video/ivtv/ivtv-vbi.c|   17 
 linux/drivers/media/video/ivtv/ivtvfb.c  |   91 -
 linux/drivers/media/video/m52790.c   |  196 +-
 linux/drivers/media/video/msp3400-driver.c   |  454 +++--
 linux/drivers/media/video/msp3400-driver.h   |7 
 linux/drivers/media/video/msp3400-kthreads.c |   34 
 linux/drivers/media/video/saa7115.c  |  877 +--
 linux/drivers/media/video/saa7127.c  |  473 +++--
 linux/drivers/media/video/saa717x.c  |  680 
 linux/drivers/media/video/tuner-core.c   |  433 +++--
 linux/drivers/media/video/upd64031a.c|  213 +-
 linux/drivers/media/video/upd64083.c |  198 +-
 linux/drivers/media/video/v4l2-common.c  |  172 ++
 linux/drivers/media/video/v4l2-device.c  |   86 +
 linux/drivers/media/video/v4l2-subdev.c  |  108 +
 linux/drivers/media/video/vp27smpx.c |  144 +
 linux/drivers/media/video/wm8739.c   |  222 +-
 linux/drivers/media/video/wm8775.c   |  229 +-
 linux/include/media/v4l2-common.h|   41 
 linux/include/media/v4l2-device.h|  109 +
 linux/include/media/v4l2-subdev.h|  188 ++
 40 files changed, 4343 insertions(+), 2927 deletions(-)

diff discarded since it is too big

---

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

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


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

2008-12-17 Thread Patch from Mauro Carvalho Chehab
The patch number 9907 was added via Mauro Carvalho Chehab mche...@redhat.com
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:
v4l-dvb-maintai...@linuxtv.org

--

From: Mauro Carvalho Chehab  mche...@redhat.com
merge: http://www.linuxtv.org/hg/~hverkuil/v4l-dvb


Priority: normal

Signed-off-by: Mauro Carvalho Chehab mche...@redhat.com


---

 linux/drivers/media/video/sh_mobile_ceu_camera.c |2 +-
 linux/drivers/media/video/v4l2-compat-ioctl32.c  |4 +++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff -r 086c580cf0e7 -r e8cd8ab9a036 
linux/drivers/media/video/sh_mobile_ceu_camera.c
--- a/linux/drivers/media/video/sh_mobile_ceu_camera.c  Tue Dec 16 10:46:32 
2008 +0100
+++ b/linux/drivers/media/video/sh_mobile_ceu_camera.c  Tue Dec 16 15:28:02 
2008 -0200
@@ -448,7 +448,7 @@ static int sh_mobile_ceu_set_fmt(struct 
 static int sh_mobile_ceu_set_fmt(struct soc_camera_device *icd,
 __u32 pixfmt, struct v4l2_rect *rect)
 {
-   const struct soc_camera_data_format *cam_fmt;
+   const struct soc_camera_data_format *cam_fmt = NULL;
int ret;
 
/*
diff -r 086c580cf0e7 -r e8cd8ab9a036 
linux/drivers/media/video/v4l2-compat-ioctl32.c
--- a/linux/drivers/media/video/v4l2-compat-ioctl32.c   Tue Dec 16 10:46:32 
2008 +0100
+++ b/linux/drivers/media/video/v4l2-compat-ioctl32.c   Tue Dec 16 15:28:02 
2008 -0200
@@ -887,7 +887,7 @@ long v4l_compat_ioctl32(struct file *fil
 {
int ret = -ENOIOCTLCMD;
 
-   if (!file-f_op-ioctl)
+   if (!file-f_op-ioctl  !file-f_op-unlocked_ioctl)
return ret;
 
switch (cmd) {
@@ -977,6 +977,8 @@ long v4l_compat_ioctl32(struct file *fil
 #endif
default:
v4l_print_ioctl(compat_ioctl32, cmd);
+   printk(KERN_CONT \n);
+   break;
}
return ret;
 }


---

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

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


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

2008-11-11 Thread Patch added by Mauro Carvalho Chehab
The patch number 9575 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]

--

merge: http://www.linuxtv.org/hg/~hverkuil/v4l-dvb-backport


---

 v4l/versions.txt |1 +
 1 file changed, 1 insertion(+)

diff -r 1251a4091b89 -r d5e211683345 v4l/versions.txt
--- a/v4l/versions.txt  Tue Nov 11 07:39:53 2008 -0200
+++ b/v4l/versions.txt  Tue Nov 11 07:42:37 2008 -0200
@@ -45,6 +45,7 @@ VIDEO_USBVISION
 VIDEO_USBVISION
 # Uses supports_autosuspend
 USB_MR800
+USB_DSBR
 
 # Uses remap_vmalloc_range()
 [2.6.18]


---

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

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


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

2008-11-05 Thread Patch from Mauro Carvalho Chehab
The patch number 9509 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/common/saa7146_fops.c |2 
 linux/drivers/media/common/saa7146_video.c|   10 ---
 linux/drivers/media/dvb/dvb-core/dvbdev.c |2 
 linux/drivers/media/dvb/dvb-usb/cinergyT2.h   |4 +
 linux/drivers/media/video/Kconfig |8 +--
 linux/drivers/media/video/arv.c   |5 -
 linux/drivers/media/video/bw-qcam.c   |5 -
 linux/drivers/media/video/c-qcam.c|9 +--
 linux/drivers/media/video/cpia.c  |   11 +---
 linux/drivers/media/video/cpia2/cpia2_v4l.c   |   15 ++---
 linux/drivers/media/video/cx18/cx18-driver.c  |4 -
 linux/drivers/media/video/cx25840/Kconfig |2 
 linux/drivers/media/video/ivtv/ivtv-cards.c   |   17 --
 linux/drivers/media/video/ivtv/ivtv-driver.c  |   26 +-
 linux/drivers/media/video/ov511.c |5 -
 linux/drivers/media/video/ov772x.c|   14 +++--
 linux/drivers/media/video/pms.c   |5 -
 linux/drivers/media/video/pvrusb2/pvrusb2-v4l2.c  |   13 +
 linux/drivers/media/video/pwc/pwc-if.c|2 
 linux/drivers/media/video/pwc/pwc-v4l.c   |3 -
 linux/drivers/media/video/pwc/pwc.h   |3 -
 linux/drivers/media/video/saa5246a.c  |5 -
 linux/drivers/media/video/saa5249.c   |5 -
 linux/drivers/media/video/se401.c |5 -
 linux/drivers/media/video/stv680.c|5 -
 linux/drivers/media/video/usbvideo/usbvideo.c |5 -
 linux/drivers/media/video/usbvision/usbvision-video.c |4 -
 linux/drivers/media/video/uvc/uvc_v4l2.c  |   13 +
 linux/drivers/media/video/v4l2-ioctl.c|8 +--
 linux/drivers/media/video/vino.c  |5 -
 linux/drivers/media/video/w9966.c |5 -
 linux/drivers/media/video/zoran/zoran_driver.c|8 ---
 linux/include/media/saa7146_vv.h  |3 -
 linux/include/media/v4l2-ioctl.h  |6 --
 34 files changed, 97 insertions(+), 145 deletions(-)

diff discarded since it is too big

---

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

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


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

2008-10-30 Thread Patch from Mauro Carvalho Chehab
The patch number 9487 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/video/Makefile  |2 
 linux/drivers/media/video/compat_ioctl32.c  | 1000 
 linux/drivers/media/video/ivtv/Kconfig  |5 
 linux/drivers/media/video/v4l2-compat-ioctl32.c |  991 +++
 v4l/obsolete.txt|3 
 5 files changed, 997 insertions(+), 1004 deletions(-)

diff discarded since it is too big

---

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

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


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

2008-10-15 Thread Patch from Mauro Carvalho Chehab
The patch number 9210 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-zoran


Priority: normal

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


---

 linux/drivers/media/video/adv7170.c  |  289 ++---
 linux/drivers/media/video/adv7175.c  |  293 ++---
 linux/drivers/media/video/bt819.c|  363 +++-
 linux/drivers/media/video/bt856.c|  264 ++--
 linux/drivers/media/video/bt866.c|  311 +++---
 linux/drivers/media/video/ks0127.c   |  566 ---
 linux/drivers/media/video/saa7110.c  |  272 ++---
 linux/drivers/media/video/saa7111.c  |  262 ++--
 linux/drivers/media/video/saa7114.c  |  394 -
 linux/drivers/media/video/saa7185.c  |  244 ++--
 linux/drivers/media/video/vpx3220.c  |  378 +++-
 linux/drivers/media/video/zoran/zoran_card.c |1 
 linux/include/media/v4l2-i2c-drv-legacy.h|   11 
 linux/include/media/v4l2-i2c-drv.h   |   11 
 14 files changed, 1221 insertions(+), 2438 deletions(-)

diff discarded since it is too big

---

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

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


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

2008-10-15 Thread Patch from Mauro Carvalho Chehab
The patch number 9212 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]


---

 v4l/versions.txt |4 
 1 file changed, 4 insertions(+)

diff -r 14bf94ec23de -r f8f30dd71191 v4l/versions.txt
--- a/v4l/versions.txt  Wed Oct 15 20:26:21 2008 -0200
+++ b/v4l/versions.txt  Wed Oct 15 20:27:27 2008 -0200
@@ -28,6 +28,8 @@ USB_SI470X
 USB_SI470X
 # use of struct delayed_work
 USB_GSPCA_FINEPIX
+# uses linux/hid.h and struct delayed_work
+USB_SI470X
 
 [2.6.19]
 #This driver were developed at kernel 2.6.19, requiring 
vmalloc_user/remap_vmalloc_range
@@ -41,6 +43,8 @@ USB_STV680
 USB_STV680
 USB_S2255
 VIDEO_USBVISION
+# Uses supports_autosuspend
+USB_MR800
 
 # Uses remap_vmalloc_range()
 [2.6.18]


---

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

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


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

2008-10-11 Thread Patch from Mauro Carvalho Chehab
The patch number 9130 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-move-zoran


Priority: normal

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


---

 linux/drivers/media/video/Kconfig  |   74 
 linux/drivers/media/video/Makefile |6 
 linux/drivers/media/video/videocodec.c |  408 -
 linux/drivers/media/video/videocodec.h |  359 -
 linux/drivers/media/video/zoran.h  |  510 -
 linux/drivers/media/video/zoran/Kconfig|   73 
 linux/drivers/media/video/zoran/Makefile   |6 
 linux/drivers/media/video/zoran/videocodec.c   |  408 +
 linux/drivers/media/video/zoran/videocodec.h   |  359 +
 linux/drivers/media/video/zoran/zoran.h|  510 +
 linux/drivers/media/video/zoran/zoran_card.c   | 1671 ++
 linux/drivers/media/video/zoran/zoran_card.h   |   55 
 linux/drivers/media/video/zoran/zoran_device.c | 1753 ++
 linux/drivers/media/video/zoran/zoran_device.h |  103 
 linux/drivers/media/video/zoran/zoran_driver.c | 4714 +
 linux/drivers/media/video/zoran/zoran_procfs.c |  235 
 linux/drivers/media/video/zoran/zoran_procfs.h |   36 
 linux/drivers/media/video/zoran/zr36016.c  |  530 +
 linux/drivers/media/video/zoran/zr36016.h  |  111 
 linux/drivers/media/video/zoran/zr36050.c  |  904 +++
 linux/drivers/media/video/zoran/zr36050.h  |  184 
 linux/drivers/media/video/zoran/zr36057.h  |  168 
 linux/drivers/media/video/zoran/zr36060.c  | 1014 +++
 linux/drivers/media/video/zoran/zr36060.h  |  220 
 linux/drivers/media/video/zoran_card.c | 1671 --
 linux/drivers/media/video/zoran_card.h |   55 
 linux/drivers/media/video/zoran_device.c   | 1753 --
 linux/drivers/media/video/zoran_device.h   |  103 
 linux/drivers/media/video/zoran_driver.c   | 4714 -
 linux/drivers/media/video/zoran_procfs.c   |  235 
 linux/drivers/media/video/zoran_procfs.h   |   36 
 linux/drivers/media/video/zr36016.c|  530 -
 linux/drivers/media/video/zr36016.h|  111 
 linux/drivers/media/video/zr36050.c|  904 ---
 linux/drivers/media/video/zr36050.h|  184 
 linux/drivers/media/video/zr36057.h|  168 
 linux/drivers/media/video/zr36060.c| 1014 ---
 linux/drivers/media/video/zr36060.h|  220 
 38 files changed, 13056 insertions(+), 13053 deletions(-)

diff discarded since it is too big

---

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

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


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

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

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

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

--

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


Priority: normal

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


---

 linux/drivers/media/video/Kconfig   |9 +
 linux/drivers/media/video/cx18/cx18-driver.c|4 
 linux/drivers/media/video/cx18/cx18-streams.c   |   41 +++---
 linux/drivers/media/video/em28xx/em28xx-video.c |8 -
 linux/drivers/media/video/ivtv/ivtv-driver.c|6 
 linux/drivers/media/video/ivtv/ivtv-streams.c   |   40 +++---
 linux/drivers/media/video/v4l2-dev.c|  100 ++--
 linux/include/media/v4l2-dev.h  |   12 -
 v4l/scripts/make_kconfig.pl |1 
 9 files changed, 131 insertions(+), 90 deletions(-)

diff -r b064509ec4af -r 9abfea2b7f56 linux/drivers/media/video/Kconfig
--- a/linux/drivers/media/video/Kconfig Sat Oct 04 18:09:41 2008 -0400
+++ b/linux/drivers/media/video/Kconfig Sat Oct 11 12:31:04 2008 -0300
@@ -71,6 +71,15 @@ config VIDEO_ADV_DEBUG
  Say Y here to enable advanced debugging functionality on some
  V4L devices.
  In doubt, say N.
+
+config VIDEO_FIXED_MINOR_RANGES
+   bool Enable old-style fixed minor ranges for video devices
+   default n
+   ---help---
+ Say Y here to enable the old-style fixed-range minor assignments.
+ Only useful if you rely on the old behavior and use mknod instead of 
udev.
+
+ When in doubt, say N.
 
 config VIDEO_HELPER_CHIPS_AUTO
bool Autoselect pertinent encoders/decoders and other helper chips
diff -r b064509ec4af -r 9abfea2b7f56 
linux/drivers/media/video/cx18/cx18-driver.c
--- a/linux/drivers/media/video/cx18/cx18-driver.c  Sat Oct 04 18:09:41 
2008 -0400
+++ b/linux/drivers/media/video/cx18/cx18-driver.c  Sat Oct 11 12:31:04 
2008 -0300
@@ -175,7 +175,7 @@ MODULE_PARM_DESC(enc_pcm_buffers,
 Encoder PCM buffers (in MB)\n
 \t\t\tDefault:  __stringify(CX18_DEFAULT_ENC_PCM_BUFFERS));
 
-MODULE_PARM_DESC(cx18_first_minor, Set minor assigned to first card);
+MODULE_PARM_DESC(cx18_first_minor, Set kernel number assigned to first card);
 
 MODULE_AUTHOR(Hans Verkuil);
 MODULE_DESCRIPTION(CX23418 driver);
@@ -959,7 +959,7 @@ static int module_start(void)
 
/* Validate parameters */
if (cx18_first_minor  0 || cx18_first_minor = CX18_MAX_CARDS) {
-   printk(KERN_ERR cx18:  Exiting, ivtv_first_minor must be 
between 0 and %d\n,
+   printk(KERN_ERR cx18:  Exiting, cx18_first_minor must be 
between 0 and %d\n,
 CX18_MAX_CARDS - 1);
return -1;
}
diff -r b064509ec4af -r 9abfea2b7f56 
linux/drivers/media/video/cx18/cx18-streams.c
--- a/linux/drivers/media/video/cx18/cx18-streams.c Sat Oct 04 18:09:41 
2008 -0400
+++ b/linux/drivers/media/video/cx18/cx18-streams.c Sat Oct 11 12:31:04 
2008 -0300
@@ -57,7 +57,7 @@ static struct {
 static struct {
const char *name;
int vfl_type;
-   int minor_offset;
+   int num_offset;
int dma;
enum v4l2_buf_type buf_type;
struct file_operations *fops;
@@ -144,8 +144,8 @@ static int cx18_prep_dev(struct cx18 *cx
 {
struct cx18_stream *s = cx-streams[type];
u32 cap = cx-v4l2_cap;
-   int minor_offset = cx18_stream_info[type].minor_offset;
-   int minor;
+   int num_offset = cx18_stream_info[type].num_offset;
+   int num = cx-num + cx18_first_minor + num_offset;
 
/* These four fields are always initialized. If v4l2dev == NULL, then
   this stream is not in use. In that case no other fields but these
@@ -164,9 +164,6 @@ static int cx18_prep_dev(struct cx18 *cx
!(cap  (V4L2_CAP_VBI_CAPTURE | V4L2_CAP_SLICED_VBI_CAPTURE)))
return 0;
 
-   /* card number + user defined offset + device offset */
-   minor = cx-num + cx18_first_minor + minor_offset;
-
/* User explicitly selected 0 buffers for these streams, so don't
   create them. */
if (cx18_stream_info[type].dma != PCI_DMA_NONE 
@@ -177,7 +174,7 @@ static int cx18_prep_dev(struct cx18 *cx
 
cx18_stream_init(cx, type);
 
-   if (minor_offset == -1)
+   if (num_offset == -1)
return 0;
 
/* allocate and initialize the v4l2 video device structure */
@@ -191,7 +188,7 @@ static int cx18_prep_dev(struct cx18 *cx
snprintf(s-v4l2dev-name, sizeof(s-v4l2dev-name), cx18-%d,
cx-num);
 
-  

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

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

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

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

--

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




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


---

 linux/drivers/media/dvb/dvb-usb/af9005-remote.c|2 
 linux/drivers/media/dvb/dvb-usb/af9005-script.h|2 
 linux/drivers/media/dvb/dvb-usb/af9005.c   |   23 ++-
 linux/drivers/media/dvb/frontends/cx24110.h|   15 +++-
 linux/drivers/media/dvb/frontends/dib7000m.c   |3 
 linux/drivers/media/dvb/frontends/dvb_dummy_fe.c   |4 -
 linux/drivers/media/dvb/frontends/sp887x.c |3 
 linux/drivers/media/dvb/ttpci/av7110.c |   18 ++---
 linux/drivers/media/video/cpia2/cpia2_core.c   |   10 +--
 linux/drivers/media/video/cpia2/cpia2_usb.c|2 
 linux/drivers/media/video/cx23885/cx23885-417.c|2 
 linux/drivers/media/video/cx23885/cx23885-vbi.c|9 +-
 linux/drivers/media/video/cx23885/cx23885-video.c  |   31 +++---
 linux/drivers/media/video/cx88/cx88-blackbird.c|1 
 linux/drivers/media/video/em28xx/em28xx-dvb.c  |2 
 linux/drivers/media/video/em28xx/em28xx-i2c.c  |7 +-
 linux/drivers/media/video/em28xx/em28xx.h  |4 -
 linux/drivers/media/video/gspca/sonixb.c   |2 
 linux/drivers/media/video/gspca/vc032x.c   |1 
 linux/drivers/media/video/ov511.c  |2 
 linux/drivers/media/video/ovcamchip/ovcamchip_core.c   |6 -
 linux/drivers/media/video/ovcamchip/ovcamchip_priv.h   |6 +
 linux/drivers/media/video/pvrusb2/pvrusb2-i2c-core.c   |2 
 linux/drivers/media/video/s2255drv.c   |2 
 linux/drivers/media/video/sn9c102/sn9c102_core.c   |   20 ++
 linux/drivers/media/video/sn9c102/sn9c102_devtable.h   |   20 --
 linux/drivers/media/video/sn9c102/sn9c102_hv7131d.c|1 
 linux/drivers/media/video/sn9c102/sn9c102_hv7131r.c|1 
 linux/drivers/media/video/sn9c102/sn9c102_mi0343.c |1 
 linux/drivers/media/video/sn9c102/sn9c102_mi0360.c |1 
 linux/drivers/media/video/sn9c102/sn9c102_mt9v111.c|1 
 linux/drivers/media/video/sn9c102/sn9c102_ov7630.c |1 
 linux/drivers/media/video/sn9c102/sn9c102_ov7660.c |1 
 linux/drivers/media/video/sn9c102/sn9c102_pas106b.c|1 
 linux/drivers/media/video/sn9c102/sn9c102_pas202bcb.c  |1 
 linux/drivers/media/video/sn9c102/sn9c102_tas5110c1b.c |1 
 linux/drivers/media/video/sn9c102/sn9c102_tas5110d.c   |1 
 linux/drivers/media/video/sn9c102/sn9c102_tas5130d1b.c |1 
 linux/drivers/media/video/zoran_device.c   |2 
 linux/drivers/media/video/zoran_device.h   |8 ++
 linux/drivers/media/video/zoran_driver.c   |6 -
 v4l2-apps/util/v4l2-ctl.cpp|   16 ++---
 42 files changed, 127 insertions(+), 116 deletions(-)

diff discarded since it is too big

---

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

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


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

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

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

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

--

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


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


---

 linux/drivers/media/video/bt856.c   |8 ++---
 linux/drivers/media/video/cpia.c|1 
 v4l/compat.h|   11 +--
 v4l/firmware/Makefile   |   11 +++
 v4l/scripts/headers_convert.pl  |   30 
 v4l2-apps/Makefile  |   17 ++-
 v4l2-apps/lib/Makefile  |2 -
 v4l2-apps/lib/frequencies.c |2 -
 v4l2-apps/lib/libv4l/libv4l1/Makefile   |2 -
 v4l2-apps/lib/libv4l/libv4l2/Makefile   |2 -
 v4l2-apps/lib/libv4l/libv4lconvert/Makefile |2 -
 v4l2-apps/test/Makefile |2 -
 v4l2-apps/test/ioctl-test.c |2 -
 v4l2-apps/util/Makefile |   10 +++---
 v4l2-apps/util/qv4l2/qv4l2.pro  |2 -
 v4l2-apps/util/rds/Makefile |2 -
 v4l2-apps/util/xc3028-firmware/Makefile |2 -
 17 files changed, 78 insertions(+), 30 deletions(-)

diff -r c825b93c54fe -r 32044c2a0440 linux/drivers/media/video/bt856.c
--- a/linux/drivers/media/video/bt856.c Fri Aug 29 22:57:10 2008 +0200
+++ b/linux/drivers/media/video/bt856.c Sat Aug 30 07:06:39 2008 -0300
@@ -69,8 +69,8 @@ MODULE_PARM_DESC(debug, Debug level (0-
 
 /* --- */
 
-#define REG_OFFSET 0xDA
-#define BT856_NR_REG   6
+#define BT856_REG_OFFSET   0xDA
+#define BT856_NR_REG   6
 
 struct bt856 {
unsigned char reg[BT856_NR_REG];
@@ -90,7 +90,7 @@ bt856_write (struct i2c_client *client,
 {
struct bt856 *encoder = i2c_get_clientdata(client);
 
-   encoder-reg[reg - REG_OFFSET] = value;
+   encoder-reg[reg - BT856_REG_OFFSET] = value;
return i2c_smbus_write_byte_data(client, reg, value);
 }
 
@@ -104,7 +104,7 @@ bt856_setbit (struct i2c_client *client,
 
return bt856_write(client, reg,
   (encoder-
-   reg[reg - REG_OFFSET]  ~(1  bit)) |
+   reg[reg - BT856_REG_OFFSET]  ~(1  bit)) |
(value ? (1  bit) : 0));
 }
 
diff -r c825b93c54fe -r 32044c2a0440 linux/drivers/media/video/cpia.c
--- a/linux/drivers/media/video/cpia.c  Fri Aug 29 22:57:10 2008 +0200
+++ b/linux/drivers/media/video/cpia.c  Sat Aug 30 07:06:39 2008 -0300
@@ -44,6 +44,7 @@
 #endif
 
 #include cpia.h
+#include compat.h
 
 static int video_nr = -1;
 
diff -r c825b93c54fe -r 32044c2a0440 v4l/compat.h
--- a/v4l/compat.h  Fri Aug 29 22:57:10 2008 +0200
+++ b/v4l/compat.h  Sat Aug 30 07:06:39 2008 -0300
@@ -230,6 +230,11 @@ static inline int list_is_singular(const
 {
return !list_empty(head)  (head-next == head-prev);
 }
-#endif
-
-#endif
+
+#endif
+
+#if LINUX_VERSION_CODE  KERNEL_VERSION(2, 6, 27)
+#define current_uid() (current-uid)
+#endif
+
+#endif
diff -r c825b93c54fe -r 32044c2a0440 v4l/firmware/Makefile
--- a/v4l/firmware/Makefile Fri Aug 29 22:57:10 2008 +0200
+++ b/v4l/firmware/Makefile Sat Aug 30 07:06:39 2008 -0300
@@ -7,27 +7,26 @@ default: $(TARGETS)
 default: $(TARGETS)
 
 clean:
-   @for i in $(TARGETS); do if [ -e $$i ]; then rm $$i; fi; done
+   -rm -f $(TARGETS)
 
 distclean: clean
-   @for i in $(DIR); do if [ -d $$i ]; then rmdir $$i; fi; done
+   -for i in $(DIRS); do if [ -d $$i ]; then rmdir $$i; fi; done
 
 install: default
-   -for i in $(DIRS); do if mkdir /lib/firmware/$$i; done
+   -for i in $(DIRS); do if [ ! -d /lib/firmware/$$i ]; then mkdir -p 
/lib/firmware/$$i; fi; done
-for i in $(TARGETS); do cp $$i /lib/firmware/$$i; done
-   
+
 
 ##
 
 mkdir:
-   -mkdir $(DIRS)
+   -for i in $(DIRS); do if [ ! -d $$i ]; then mkdir -p $$i; fi; done
 
 
 ihex2fw: ../../linux/firmware/ihex2fw.c
gcc -Wall -o $@ $
 
 vicam/firmware.fw: ../../linux/firmware/vicam/firmware.H16 mkdir
-   -mkdir vicam
./ihex2fw -w $ $@
 
 dabusb/firmware.fw: ../../linux/firmware/dabusb/firmware.HEX mkdir
diff -r c825b93c54fe -r 32044c2a0440 v4l/scripts/headers_convert.pl
--- /dev/null   Thu Jan 01 00:00:00 1970 +
+++ b/v4l/scripts/headers_convert.plSat Aug 30 07:06:39 2008 -0300
@@ -0,0 +1,30 @@
+#!/usr/bin/perl
+#
+# headers_install prepare the listed header files for use in
+# user space and copy the files to their destination.
+#
+

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

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

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

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

--

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


Priority: normal

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


---

 linux/drivers/media/common/saa7146_fops.c |2 
 linux/drivers/media/radio/dsbr100.c   |   16 -
 linux/drivers/media/radio/radio-aimslab.c |   39 +--
 linux/drivers/media/radio/radio-aztech.c  |   45 ++-
 linux/drivers/media/radio/radio-cadet.c   |3 
 linux/drivers/media/radio/radio-gemtek-pci.c  |   44 ++-
 linux/drivers/media/radio/radio-gemtek.c  |   42 ++-
 linux/drivers/media/radio/radio-maestro.c |   37 +--
 linux/drivers/media/radio/radio-maxiradio.c   |   44 ++-
 linux/drivers/media/radio/radio-rtrack2.c |   37 +--
 linux/drivers/media/radio/radio-sf16fmi.c |   36 +-
 linux/drivers/media/radio/radio-sf16fmr2.c|   34 +-
 linux/drivers/media/radio/radio-si470x.c  |   26 +-
 linux/drivers/media/radio/radio-terratec.c|   37 +--
 linux/drivers/media/radio/radio-trust.c   |   20 +
 linux/drivers/media/radio/radio-typhoon.c |   35 +-
 linux/drivers/media/radio/radio-zoltrix.c |   37 +--
 linux/drivers/media/video/arv.c   |   29 +-
 linux/drivers/media/video/bw-qcam.c   |   25 +-
 linux/drivers/media/video/bw-qcam.h   |1 
 linux/drivers/media/video/c-qcam.c|   26 +-
 linux/drivers/media/video/cpia.c  |   15 -
 linux/drivers/media/video/cpia2/cpia2_v4l.c   |   19 -
 linux/drivers/media/video/et61x251/et61x251_core.c|   14 -
 linux/drivers/media/video/meye.c  |   18 -
 linux/drivers/media/video/meye.h  |1 
 linux/drivers/media/video/pms.c   |   23 +
 linux/drivers/media/video/pwc/pwc-if.c|   12 
 linux/drivers/media/video/pwc/pwc-v4l.c   |2 
 linux/drivers/media/video/s2255drv.c  |2 
 linux/drivers/media/video/saa5246a.c  |   56 +---
 linux/drivers/media/video/saa5249.c   |   70 ++---
 linux/drivers/media/video/saa7115.c   |5 
 linux/drivers/media/video/se401.c |3 
 linux/drivers/media/video/sn9c102/sn9c102_core.c  |   14 -
 linux/drivers/media/video/stk-webcam.c|4 
 linux/drivers/media/video/stradis.c   |1 
 linux/drivers/media/video/stv680.c|2 
 linux/drivers/media/video/usbvideo/usbvideo.c |6 
 linux/drivers/media/video/usbvideo/vicam.c|   13 -
 linux/drivers/media/video/usbvision/usbvision-video.c |  122 ++
 linux/drivers/media/video/uvc/uvc_v4l2.c  |   13 -
 linux/drivers/media/video/v4l2-dev.c  |   77 +-
 linux/drivers/media/video/vino.c  |   18 -
 linux/drivers/media/video/w9966.c |   33 +-
 linux/drivers/media/video/wm8739.c|4 
 linux/drivers/media/video/zc0301/zc0301_core.c|   14 -
 linux/include/media/v4l2-dev.h|   70 +++--
 linux/include/sound/tea575x-tuner.h   |1 
 linux/sound/i2c/other/tea575x-tuner.c |   37 ++-
 50 files changed, 676 insertions(+), 608 deletions(-)

diff discarded since it is too big

---

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

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


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

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

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

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

--

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


Priority: normal

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


---

 linux/drivers/media/video/saa7134/saa6752hs.c   |   17 ++-
 linux/drivers/media/video/saa7134/saa7134-core.c|4 
 linux/drivers/media/video/saa7134/saa7134-empress.c |   15 ++-
 linux/drivers/media/video/saa7134/saa7134-ts.c  |   58 +---
 linux/drivers/media/video/saa7134/saa7134.h |8 +
 5 files changed, 77 insertions(+), 25 deletions(-)

diff -r 002496a68970 -r 86f8ab9468e6 
linux/drivers/media/video/saa7134/saa6752hs.c
--- a/linux/drivers/media/video/saa7134/saa6752hs.c Mon Aug 25 15:45:09 
2008 -0600
+++ b/linux/drivers/media/video/saa7134/saa6752hs.c Fri Aug 29 18:35:43 
2008 -0300
@@ -654,7 +654,7 @@ static int saa6752hs_qmenu(struct saa675
return v4l2_ctrl_query_menu(qmenu, qctrl, NULL);
 }
 
-static int saa6752hs_init(struct i2c_client* client)
+static int saa6752hs_init(struct i2c_client *client, u32 leading_null_bytes)
 {
unsigned char buf[9], buf2[4];
struct saa6752hs_state *h;
@@ -705,6 +705,12 @@ static int saa6752hs_init(struct i2c_cli
buf[0] = 0xB0;
buf[1] = 0x05;
i2c_master_send(client,buf,2);
+
+   /* Set leading null byte for TS */
+   buf[0] = 0xF6;
+   buf[1] = (leading_null_bytes  8)  0xff;
+   buf[2] = leading_null_bytes  0xff;
+   i2c_master_send(client, buf, 3);
 
/* compute PAT */
memcpy(localPAT, PAT, sizeof(PAT));
@@ -813,14 +819,13 @@ saa6752hs_command(struct i2c_client *cli
int i;
 
switch (cmd) {
+   case VIDIOC_INT_INIT:
+   /* apply settings and start encoder */
+   saa6752hs_init(client, *(u32 *)arg);
+   break;
case VIDIOC_S_EXT_CTRLS:
if (ctrls-ctrl_class != V4L2_CTRL_CLASS_MPEG)
return -EINVAL;
-   if (ctrls-count == 0) {
-   /* apply settings and start encoder */
-   saa6752hs_init(client);
-   break;
-   }
/* fall through */
case VIDIOC_TRY_EXT_CTRLS:
case VIDIOC_G_EXT_CTRLS:
diff -r 002496a68970 -r 86f8ab9468e6 
linux/drivers/media/video/saa7134/saa7134-core.c
--- a/linux/drivers/media/video/saa7134/saa7134-core.c  Mon Aug 25 15:45:09 
2008 -0600
+++ b/linux/drivers/media/video/saa7134/saa7134-core.c  Fri Aug 29 18:35:43 
2008 -0300
@@ -465,9 +465,7 @@ int saa7134_set_dmabits(struct saa7134_d
/* TS capture -- dma 5 */
if (dev-ts_q.curr) {
ctrl |= SAA7134_MAIN_CTRL_TE5;
-   irq  |= SAA7134_IRQ1_INTE_RA2_3 |
-   SAA7134_IRQ1_INTE_RA2_2 |
-   SAA7134_IRQ1_INTE_RA2_1 |
+   irq  |= SAA7134_IRQ1_INTE_RA2_1 |
SAA7134_IRQ1_INTE_RA2_0;
}
 
diff -r 002496a68970 -r 86f8ab9468e6 
linux/drivers/media/video/saa7134/saa7134-empress.c
--- a/linux/drivers/media/video/saa7134/saa7134-empress.c   Mon Aug 25 
15:45:09 2008 -0600
+++ b/linux/drivers/media/video/saa7134/saa7134-empress.c   Fri Aug 29 
18:35:43 2008 -0300
@@ -64,10 +64,19 @@ static void ts_reset_encoder(struct saa7
 
 static int ts_init_encoder(struct saa7134_dev* dev)
 {
-   struct v4l2_ext_controls ctrls = { V4L2_CTRL_CLASS_MPEG, 0 };
-
+   u32 leading_null_bytes = 0;
+
+   /* If more cards start to need this, then this
+  should probably be added to the card definitions. */
+   switch (dev-board) {
+   case SAA7134_BOARD_BEHOLD_M6:
+   case SAA7134_BOARD_BEHOLD_M63:
+   case SAA7134_BOARD_BEHOLD_M6_EXTRA:
+   leading_null_bytes = 1;
+   break;
+   }
ts_reset_encoder(dev);
-   saa7134_i2c_call_clients(dev, VIDIOC_S_EXT_CTRLS, ctrls);
+   saa7134_i2c_call_clients(dev, VIDIOC_INT_INIT, leading_null_bytes);
dev-empress_started = 1;
return 0;
 }
diff -r 002496a68970 -r 86f8ab9468e6 
linux/drivers/media/video/saa7134/saa7134-ts.c
--- a/linux/drivers/media/video/saa7134/saa7134-ts.cMon Aug 25 15:45:09 
2008 -0600
+++ b/linux/drivers/media/video/saa7134/saa7134-ts.cFri Aug 29 18:35:43 
2008 -0300
@@ -66,11 +66,29 @@ static int buffer_activate(struct saa713
saa7134_set_dmabits(dev);
 
mod_timer(dev-ts_q.timeout, jiffies+BUFFER_TIMEOUT);
+
+   if (dev-ts_state == SAA7134_TS_BUFF_DONE) {
+   /* Clear TS cache */

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

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

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

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

--

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


Priority: normal

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


---

 linux/drivers/media/radio/Kconfig |   32 
 linux/drivers/media/video/Kconfig |   22 
 linux/drivers/media/video/Makefile|2 
 linux/drivers/media/video/dpc7146.c   |  409 --
 linux/drivers/media/video/pxa_camera.c|5 
 linux/drivers/media/video/tuner-3036.c|  215 -
 linux/drivers/media/video/usbvideo/usbvideo.c |7 
 linux/include/linux/i2c-id.h  |1 
 linux/sound/oss/aci.c |  713 --
 linux/sound/oss/aci.h |   57 -
 v4l/Kconfig.sound |   17 
 v4l/Makefile  |4 
 v4l/Makefile.sound|   19 
 v4l/scripts/make_kconfig.pl   |3 
 v4l2-apps/test/capture_example.c  |  115 +-
 v4l2-apps/util/v4l2-ctl.cpp   |  275 +++---
 16 files changed, 225 insertions(+), 1671 deletions(-)

diff discarded since it is too big

---

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

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


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

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

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

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

--

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




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


---

 linux/drivers/media/video/tvmixer.c |1 -
 1 file changed, 1 deletion(-)

diff -r fb79cf57892c -r 47f980c488e2 linux/drivers/media/video/tvmixer.c
--- a/linux/drivers/media/video/tvmixer.c   Tue Jul 29 08:30:58 2008 +
+++ b/linux/drivers/media/video/tvmixer.c   Tue Jul 29 13:19:54 2008 -0300
@@ -16,7 +16,6 @@
 #include linux/sound.h
 #include linux/soundcard.h
 
-#include asm/semaphore.h
 #include asm/uaccess.h
 
 #define DEV_MAX  4


---

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

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


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

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

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

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

--

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


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


---

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

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

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

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

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

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

--

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


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


---

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

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

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

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

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

--

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




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


---

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

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

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

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

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

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

--

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




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


---

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

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

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

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

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

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

--

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


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


---

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

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


---

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

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


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

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

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

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

--

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


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


---

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

diff -r 682760d4b111 -r 3a045147cfad linux/drivers/media/video/saa711x.c
--- a/linux/drivers/media/video/saa711x.c   Tue Jul 01 17:16:09 2008 -0300
+++ /dev/null   Thu Jan 01 00:00:00 1970 +
@@ -1,618 +0,0 @@
-/*
- * saa711x - Philips SAA711x video decoder driver version 0.0.1
- *
- * To do: Now, it handles only saa7113/7114. Should be improved to
- * handle all Philips saa711x devices.
- *
- * Based on saa7113 driver from Dave Perks [EMAIL PROTECTED]
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-#include linux/module.h
-#include linux/init.h
-#include linux/delay.h
-#include linux/errno.h
-#include linux/fs.h
-#include linux/kernel.h
-#include linux/major.h
-#include linux/slab.h
-#include linux/mm.h
-#include linux/signal.h
-#include asm/io.h
-#include asm/pgtable.h
-#include asm/page.h
-#include linux/types.h
-#include asm/uaccess.h
-#include compat.h
-#include linux/videodev.h
-
-MODULE_DESCRIPTION(Philips SAA711x video decoder driver);
-MODULE_AUTHOR(Dave Perks, Jose Ignacio Gijon, Joerg Heckenbach, Mark 
McClelland, Dwaine Garden);
-MODULE_LICENSE(GPL);
-
-#include linux/i2c.h
-#if LINUX_VERSION_CODE  KERNEL_VERSION(2,5,0)
-#include i2c-compat.h
-#endif
-
-#define I2C_NAME(s) (s)-name
-
-#include linux/video_decoder.h
-
-static int debug;
-module_param(debug, int, 0644);
-MODULE_PARM_DESC(debug,  Set the default Debug level.  Default: 0 (Off) - 
(0-1));
-
-
-#define dprintk(num, format, args...) \
-   do { \
-   if (debug = num) \
-   printk(format, ##args); \
-   } while (0)
-
-/* --- */
-
-struct saa711x {
-   unsigned char reg[32];
-
-   int norm;
-   int input;
-   int enable;
-   int bright;
-   int contrast;
-   int hue;
-   int sat;
-};
-
-#define   I2C_SAA71130x4A
-#define   I2C_SAA71140x42
-
-/* --- */
-
-static inline int
-saa711x_write (struct i2c_client *client,
-  u8 reg,
-  u8 value)
-{
-   struct saa711x *decoder = i2c_get_clientdata(client);
-
-   decoder-reg[reg] = value;
-   return i2c_smbus_write_byte_data(client, reg, value);
-}
-
-static int
-saa711x_write_block (struct i2c_client *client,
-const u8  *data,
-unsigned int   len)
-{
-   int ret = -1;
-   u8 reg;
-
-   /* the saa711x has an autoincrement function, use it if
-* the adapter understands raw I2C */
-   if (i2c_check_functionality(client-adapter, I2C_FUNC_I2C)) {
-   /* do raw I2C, not smbus compatible */
-   struct saa711x *decoder = i2c_get_clientdata(client);
-   struct i2c_msg msg;
-   u8 block_data[32];
-
-   msg.addr = client-addr;
-   msg.flags = 0;
-   while (len = 2) {
-   msg.buf = (char *) block_data;
-   msg.len = 0;
-   block_data[msg.len++] = reg = data[0];
-   do {
-   block_data[msg.len++] =
-   decoder-reg[reg++] = data[1];
-   len -= 2;
-   data += 2;
-   } while (len = 2  data[0] == reg 
-msg.len  32);
-   if ((ret = i2c_transfer(client-adapter,
-   msg, 1))  0)
-