<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://purl.org/rss/1.0/" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:syn="http://purl.org/rss/1.0/modules/syndication/" xmlns:admin="http://webns.net/mvcb/">
  <channel about="http://blog.gmane.org/gmane.comp.video.video4linux">
    <title>gmane.comp.video.video4linux</title>
    <link>http://blog.gmane.org/gmane.comp.video.video4linux</link>
    <description/>
    <syn:updatePeriod>hourly</syn:updatePeriod>
    <syn:updateFrequency>1</syn:updateFrequency>
    <syn:updateBase>1901-01-01T00:00+00:00</syn:updateBase>
    <items>
      <rdf:Seq>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.video.video4linux/41286"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.video.video4linux/41285"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.video.video4linux/41282"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.video.video4linux/41264"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.video.video4linux/41263"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.video.video4linux/41262"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.video.video4linux/41255"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.video.video4linux/41254"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.video.video4linux/41233"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.video.video4linux/41227"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.video.video4linux/41219"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.video.video4linux/41216"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.video.video4linux/41215"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.video.video4linux/41209"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.video.video4linux/41204"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.video.video4linux/41203"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.video.video4linux/41191"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.video.video4linux/41190"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.video.video4linux/41176"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.video.video4linux/41165"/>
      </rdf:Seq>
    </items>
    <image rdf:resource="http://gmane.org/img/gmane-25t.png"/>
    <textinput rdf:resource=""/>
  </channel>
  <image rdf:about="http://gmane.org/img/gmane-25t.png">
    <title>Gmane</title>
    <url>http://gmane.org/img/gmane-25t.png</url>
    <link>http://gmane.org</link>
  </image>
  <item rdf:about="http://comments.gmane.org/gmane.comp.video.video4linux/41286">
    <title>libv4l release: 0.5.7 (The fix "the UVC release" release)</title>
    <link>http://comments.gmane.org/gmane.comp.video.video4linux/41286</link>
    <description>&lt;resent with correct version no in subject, sorry about the spam&gt;

Hi All,

So after 2 days of debugging (many thanks for the patience of all reporters and
for all the tests they have run) I've finally managed to pinpoint and fix a
nasty (and stupid, completely my fault) bug in the special try_fmt handling for
uvc cams.

This bug is present in the 0.5.5 and 0.5.6 releases every one is urged to
upgrade to 0.5.7 asap!

The problem is that the enumframesize results try_fmt replacement for uvccams
was dependend upon the enumframesize results being sorted in a particular
order, which happened to be the case with my test cam.

This was causing issues with quite a few uvc cams, this release fixes this.

libv4l-0.5.7
------------
* Fix a nasty (and stupid) bug in the special try_fmt handling for UVC cams
* Add some more verbose logging of various calls when asking libv4l to log
   calls to a file, to assist in (future) debugging

Get it here:
http://people.atrpms.net/~hdegoede/libv4l-0.5.7.tar.gz

Regards,

Hans





--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request&lt; at &gt;redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list

</description>
    <dc:creator>Hans de Goede</dc:creator>
    <dc:date>2008-12-02T23:10:06</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.video.video4linux/41285">
    <title>libv4l release: 0.5.6 (The fix "the UVC release" release)</title>
    <link>http://comments.gmane.org/gmane.comp.video.video4linux/41285</link>
    <description>Hi All,

So after 2 days of debugging (many thanks for the patience of all reporters and 
for all the tests they have run) I've finally managed to pinpoint and fix a 
nasty (and stupid, completely my fault) bug in the special try_fmt handling for 
uvc cams.

This bug is present in the 0.5.5 and 0.5.6 releases every one is urged to 
upgrade to 0.5.7 asap!

The problem is that the enumframesize results try_fmt replacement for uvccams 
was dependend upon the enumframesize results being sorted in a particular 
order, which happened to be the case with my test cam.

This was causing issues with quite a few uvc cams, this release fixes this.

libv4l-0.5.7
------------
* Fix a nasty (and stupid) bug in the special try_fmt handling for UVC cams
* Add some more verbose logging of various calls when asking libv4l to log
   calls to a file, to assist in (future) debugging

Get it here:
http://people.atrpms.net/~hdegoede/libv4l-0.5.7.tar.gz

Regards,

Hans




--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request&lt; at &gt;redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list

</description>
    <dc:creator>Hans de Goede</dc:creator>
    <dc:date>2008-12-02T22:45:21</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.video.video4linux/41282">
    <title>WinTV USB Model 566 PAL-I - New Problem.</title>
    <link>http://comments.gmane.org/gmane.comp.video.video4linux/41282</link>
    <description>Hi all,  with the help of Thierry I've managed to get this device sort of
working. There seems to be a problem with the tuner bit but Thierry is
helping me sort that. The problem is that I seem to have found a new
problem. When I select S-Video I get sound and a perfect picture but, when I
select composite I get sound and no picture. Now the card has one port which
it uses for both, in case that makes a difference, and an adapter to convert
the S-Video port into a phono. Any ideas please???

--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request&lt; at &gt;redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list

</description>
    <dc:creator>Chris Grove</dc:creator>
    <dc:date>2008-12-02T17:36:25</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.video.video4linux/41264">
    <title>Listing existing video devices</title>
    <link>http://comments.gmane.org/gmane.comp.video.video4linux/41264</link>
    <description>Hi all,
I need to enumerate all currently connected V4L devices. So far, I came up
with this:
- First, check with HAL and create a list of objects with the 'video4linux'
capability
- Second, append to the list all char device files with major number 81
- Third, remove the duplicates.

Some (very old) USB cameras (Logitech Quickcam Express for instance) are not
reported by HAL as video devices. Therefore limiting the enumeration to
video devices reported by HAL would not be complete. That s why I added the
second step (listing all char major 81)

Is there a better way of doing this ?

Cheers,
Gilles
--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request&lt; at &gt;redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list

</description>
    <dc:creator>Gilles GIGAN</dc:creator>
    <dc:date>2008-12-02T05:20:01</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.video.video4linux/41263">
    <title>[PATCH 1/2] Unuse ov772x_default_regs in ov772x driver</title>
    <link>http://comments.gmane.org/gmane.comp.video.video4linux/41263</link>
    <description>
Signed-off-by: Kuninori Morimoto &lt;morimoto.kuninori&lt; at &gt;renesas.com&gt;
---
this patch came from "Change device ID selection method on ov772x driver" yesterday

 drivers/media/video/ov772x.c |   21 +++------------------
 1 files changed, 3 insertions(+), 18 deletions(-)

diff --git a/drivers/media/video/ov772x.c b/drivers/media/video/ov772x.c
index d3b54a4..2b8d72d 100644
--- a/drivers/media/video/ov772x.c
+++ b/drivers/media/video/ov772x.c
&lt; at &gt;&lt; at &gt; -378,30 +378,17 &lt; at &gt;&lt; at &gt; struct ov772x_priv {
 
 #define ENDMARKER { 0xff, 0xff }
 
-static const struct regval_list ov772x_default_regs[] =
-{
-{ COM3,  0x00 },
-{ COM4,  PLL_4x | 0x01 },
-{ 0x16,  0x00 }, /* Mystery */
-{ COM11, 0x10 }, /* Mystery */
-{ 0x28,  0x00 }, /* Mystery */
-{ HREF,  0x00 },
-{ COM13, 0xe2 }, /* Mystery */
-{ AREF0, 0xef },
-{ AREF2, 0x60 },
-{ AREF6, 0x7a },
-ENDMARKER,
-};
-
 /*
  * register setting for color format
  */
 static const struct regval_list ov772x_RGB555_regs[] = {
+{ COM3, 0x00 },
 { COM7, FMT_RGB555 | OFMT_RGB },
 ENDMARKER,
 };
 
 static const struct regval_list ov772x_RGB565_regs[] = {
+{ COM3, 0x00 },
 { COM7, FMT_RGB565 | OFMT_RGB },
 ENDMARKER,
 };
&lt; at &gt;&lt; at &gt; -413,6 +400,7 &lt; at &gt;&lt; at &gt; static const struct regval_list ov772x_YYUV_regs[] = {
 };
 
 static const struct regval_list ov772x_UVYY_regs[] = {
+{ COM3, 0x00 },
 { COM7, OFMT_YUV },
 ENDMARKER,
 };
&lt; at &gt;&lt; at &gt; -634,9 +622,6 &lt; at &gt;&lt; at &gt; static int ov772x_start_capture(struct soc_camera_device *icd)
  * reset hardware
  */
 ov772x_reset(priv-&gt;client);
-ret = ov772x_write_array(priv-&gt;client, ov772x_default_regs);
-if (ret &lt; 0)
-goto start_end;
 
 /*
  * set color format
</description>
    <dc:creator>Kuninori Morimoto</dc:creator>
    <dc:date>2008-12-02T00:29:43</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.video.video4linux/41262">
    <title>[PATCH 2/2] Change device ID selection method on ov772x driver</title>
    <link>http://comments.gmane.org/gmane.comp.video.video4linux/41262</link>
    <description>
Signed-off-by: Kuninori Morimoto &lt;morimoto.kuninori&lt; at &gt;renesas.com&gt;
---
this patch came from "Change device ID selection method on ov772x driver" yesterday

 drivers/media/video/ov772x.c    |   27 +++++++++++++++++++++------
 include/media/v4l2-chip-ident.h |    2 +-
 2 files changed, 22 insertions(+), 7 deletions(-)

diff --git a/drivers/media/video/ov772x.c b/drivers/media/video/ov772x.c
index 2b8d72d..f417df1 100644
--- a/drivers/media/video/ov772x.c
+++ b/drivers/media/video/ov772x.c
&lt; at &gt;&lt; at &gt; -346,6 +346,12 &lt; at &gt;&lt; at &gt;
 #define OP_SWAP_RGB 0x00000002
 
 /*
+ * ID
+ */
+#define OV7720  0x7720
+#define VERSION(pid, ver) ((pid&lt;&lt;8)|(ver&amp;0xFF))
+
+/*
  * struct
  */
 struct regval_list {
&lt; at &gt;&lt; at &gt; -374,6 +380,7 &lt; at &gt;&lt; at &gt; struct ov772x_priv {
 struct soc_camera_device          icd;
 const struct ov772x_color_format *fmt;
 const struct ov772x_win_size     *win;
+int                               model;
 };
 
 #define ENDMARKER { 0xff, 0xff }
&lt; at &gt;&lt; at &gt; -702,7 +709,9 &lt; at &gt;&lt; at &gt; static unsigned long ov772x_query_bus_param(struct soc_camera_device *icd)
 static int ov772x_get_chip_id(struct soc_camera_device *icd,
       struct v4l2_chip_ident   *id)
 {
-id-&gt;ident    = V4L2_IDENT_OV772X;
+struct ov772x_priv *priv = container_of(icd, struct ov772x_priv, icd);
+
+id-&gt;ident    = priv-&gt;model;
 id-&gt;revision = 0;
 
 return 0;
&lt; at &gt;&lt; at &gt; -796,6 +805,7 &lt; at &gt;&lt; at &gt; static int ov772x_video_probe(struct soc_camera_device *icd)
 {
 struct ov772x_priv *priv = container_of(icd, struct ov772x_priv, icd);
 u8                  pid, ver;
+const char         *devname;
 
 /*
  * We must have a parent by now. And it cannot be a wrong one.
&lt; at &gt;&lt; at &gt; -822,15 +832,21 &lt; at &gt;&lt; at &gt; static int ov772x_video_probe(struct soc_camera_device *icd)
  */
 pid = i2c_smbus_read_byte_data(priv-&gt;client, PID);
 ver = i2c_smbus_read_byte_data(priv-&gt;client, VER);
-if (pid != 0x77 ||
-    ver != 0x21) {
+
+switch (VERSION(pid, ver)) {
+case OV7720:
+devname     = "ov7720";
+priv-&gt;model = V4L2_IDENT_OV7720;
+break;
+default:
 dev_err(&amp;icd-&gt;dev,
 "Product ID error %x:%x\n", pid, ver);
 return -ENODEV;
 }
 
 dev_info(&amp;icd-&gt;dev,
- "ov772x Product ID %0x:%0x Manufacturer ID %x:%x\n",
+ "%s Product ID %0x:%0x Manufacturer ID %x:%x\n",
+ devname,
  pid,
  ver,
  i2c_smbus_read_byte_data(priv-&gt;client, MIDH),
&lt; at &gt;&lt; at &gt; -921,7 +937,7 &lt; at &gt;&lt; at &gt; static int ov772x_remove(struct i2c_client *client)
 }
 
 static const struct i2c_device_id ov772x_id[] = {
-{"ov772x", 0},
+{ "ov772x", 0 },
 { }
 };
 MODULE_DEVICE_TABLE(i2c, ov772x_id);
&lt; at &gt;&lt; at &gt; -941,7 +957,6 &lt; at &gt;&lt; at &gt; static struct i2c_driver ov772x_i2c_driver = {
 
 static int __init ov772x_module_init(void)
 {
-printk(KERN_INFO "ov772x driver\n");
 return i2c_add_driver(&amp;ov772x_i2c_driver);
 }
 
diff --git a/include/media/v4l2-chip-ident.h b/include/media/v4l2-chip-ident.h
index bfe5142..456ac0d 100644
--- a/include/media/v4l2-chip-ident.h
+++ b/include/media/v4l2-chip-ident.h
&lt; at &gt;&lt; at &gt; -60,7 +60,7 &lt; at &gt;&lt; at &gt; enum {
 
 /* OmniVision sensors: reserved range 250-299 */
 V4L2_IDENT_OV7670 = 250,
-V4L2_IDENT_OV772X = 251,
+V4L2_IDENT_OV7720 = 251,
 
 /* Conexant MPEG encoder/decoders: reserved range 410-420 */
 V4L2_IDENT_CX23415 = 415,
</description>
    <dc:creator>Kuninori Morimoto</dc:creator>
    <dc:date>2008-12-02T00:34:14</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.video.video4linux/41255">
    <title>[GIT PATCHES for 2.6.28] V4L/DVB fixes</title>
    <link>http://comments.gmane.org/gmane.comp.video.video4linux/41255</link>
    <description>Linus,

Please pull from:
        ssh://master.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6.git for_linus

For the following driver fixes:

   - af9015: don't reconnect device in USB-bus
   - dib0700: make remote control support work with firmware v1.20
   - dm1105: Fix section mismatch
   - dvb-ttusb-budget: Add NULL pointer validation
   - dvb-ttusb-budget: Add validation for ttusb_alloc_iso_urbs
   - em28xx: Avoid i2c register error for boards without eeprom
   - em28xx: Avoid memory leaks if registration fails
   - em28xx: avoid allocating/dealocating memory on every control urb
   - em28xx: avoid having two concurrent control URB's
   - em28xx: fix oops audio
   - em28xx: fix compile warning
   - em28xx: fix a race condition with hald
   - em28xx: make em28xx aux audio input work
   - em28xx: Make sure the i2c gate is open before powering down tuner
   - em28xx-alsa: implement another locking schema
   - gspca: Memory leak when disconnect while streaming.
   - gspca: Lock the subdrivers via module_get/put.
   - gspca: Move the video device to a separate area.
   - s2255drv: fix firmware test on big-endian
   - sms1xxx: use new firmware for Hauppauge WinTV MiniStick
   - ttusb_dec: Add NULL pointer validation
   - ttusb_dec: fix memory leak
   - usb-urb: fix memory leak

Also, one DVB api fix:
   - Make s2api work for ATSC

Cheers,
Mauro.

---

 drivers/media/dvb/dm1105/dm1105.c                 |    2 +-
 drivers/media/dvb/dvb-core/dvb_frontend.c         |    5 +-
 drivers/media/dvb/dvb-usb/af9015.c                |    8 +-
 drivers/media/dvb/dvb-usb/dib0700.h               |    5 +-
 drivers/media/dvb/dvb-usb/dib0700_core.c          |   16 +++
 drivers/media/dvb/dvb-usb/dib0700_devices.c       |  139 ++++++++++++++++++++-
 drivers/media/dvb/dvb-usb/usb-urb.c               |   19 ++-
 drivers/media/dvb/siano/sms-cards.c               |    2 +-
 drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c |   15 ++-
 drivers/media/dvb/ttusb-dec/ttusb_dec.c           |    7 +
 drivers/media/video/em28xx/em28xx-audio.c         |   33 +++---
 drivers/media/video/em28xx/em28xx-core.c          |   58 ++++++----
 drivers/media/video/em28xx/em28xx-i2c.c           |   10 +-
 drivers/media/video/em28xx/em28xx-video.c         |  140 ++++++++++++---------
 drivers/media/video/em28xx/em28xx.h               |    6 +
 drivers/media/video/gspca/conex.c                 |    3 +
 drivers/media/video/gspca/finepix.c               |    8 ++
 drivers/media/video/gspca/gspca.c                 |   56 +++++----
 drivers/media/video/gspca/gspca.h                 |    6 +-
 drivers/media/video/gspca/pac7311.c               |    3 +
 drivers/media/video/gspca/spca501.c               |    3 +
 drivers/media/video/gspca/spca505.c               |    4 +
 drivers/media/video/gspca/spca561.c               |    3 +
 drivers/media/video/gspca/vc032x.c                |    3 +
 drivers/media/video/gspca/zc3xx.c                 |    3 +
 drivers/media/video/s2255drv.c                    |    2 +-
 26 files changed, 410 insertions(+), 149 deletions(-)

Devin Heitmueller (4):
      V4L/DVB (9631): Make s2api work for ATSC support
      V4L/DVB (9632): make em28xx aux audio input work
      V4L/DVB (9634): Make sure the i2c gate is open before powering down tuner
      V4L/DVB (9639): Make dib0700 remote control support work with firmware v1.20

Douglas Schilling Landgraf (6):
      V4L/DVB (9601): ttusb_dec: Add NULL pointer validation
      V4L/DVB (9602): dvb-ttusb-budget: Add NULL pointer validation
      V4L/DVB (9603): dvb-ttusb-budget: Add validation for ttusb_alloc_iso_urbs
      V4L/DVB (9604): ttusb_dec: fix memory leak
      V4L/DVB (9605): usb-urb: fix memory leak
      V4L/DVB (9743): em28xx: fix oops audio

Hans Verkuil (1):
      V4L/DVB (9748): em28xx: fix compile warning

Harvey Harrison (1):
      V4L/DVB (9635): v4l: s2255drv fix firmware test on big-endian

Igor M. Liplianin (1):
      V4L/DVB (9608): Fix section mismatch warning for dm1105 during make

Jean-Francois Moine (3):
      V4L/DVB (9689): gspca: Memory leak when disconnect while streaming.
      V4L/DVB (9690): gspca: Lock the subdrivers via module_get/put.
      V4L/DVB (9691): gspca: Move the video device to a separate area.

Jose Alberto Reguero (1):
      V4L/DVB (9664): af9015: don't reconnect device in USB-bus

Mauro Carvalho Chehab (7):
      V4L/DVB (9627): em28xx: Avoid i2c register error for boards without eeprom
      V4L/DVB (9645): em28xx: Avoid memory leaks if registration fails
      V4L/DVB (9646): em28xx: avoid allocating/dealocating memory on every control urb
      V4L/DVB (9647): em28xx: void having two concurrent control URB's
      V4L/DVB (9668): em28xx: fix a race condition with hald
      V4L/DVB (9742): em28xx-alsa: implement another locking schema
      em28xx: remove backward compat macro added on a previous fix

Michael Krufky (1):
      V4L/DVB (9732): sms1xxx: use new firmware for Hauppauge WinTV MiniStick

---------------------------------------------------
V4L/DVB development is hosted at http://linuxtv.org

--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request&lt; at &gt;redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list

</description>
    <dc:creator>Mauro Carvalho Chehab</dc:creator>
    <dc:date>2008-12-01T22:08:53</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.video.video4linux/41254">
    <title>[PATCH] mt9m111: Add automatic white balance control</title>
    <link>http://comments.gmane.org/gmane.comp.video.video4linux/41254</link>
    <description>Signed-off-by: Robert Jarzmik &lt;robert.jarzmik&lt; at &gt;free.fr&gt;
---
 drivers/media/video/mt9m111.c |   28 +++++++++++++++++++++++++++-
 1 files changed, 27 insertions(+), 1 deletions(-)

diff --git a/drivers/media/video/mt9m111.c b/drivers/media/video/mt9m111.c
index 9b9b377..208ec6c 100644
--- a/drivers/media/video/mt9m111.c
+++ b/drivers/media/video/mt9m111.c
&lt; at &gt;&lt; at &gt; -90,7 +90,7 &lt; at &gt;&lt; at &gt;
 #define MT9M111_OUTPUT_FORMAT_CTRL2_B0x19b
 
 #define MT9M111_OPMODE_AUTOEXPO_EN(1 &lt;&lt; 14)
-
+#define MT9M111_OPMODE_AUTOWHITEBAL_EN(1 &lt;&lt; 1)
 
 #define MT9M111_OUTFMT_PROCESSED_BAYER(1 &lt;&lt; 14)
 #define MT9M111_OUTFMT_BYPASS_IFP(1 &lt;&lt; 10)
&lt; at &gt;&lt; at &gt; -163,6 +163,7 &lt; at &gt;&lt; at &gt; struct mt9m111 {
 unsigned int swap_rgb_red_blue:1;
 unsigned int swap_yuv_y_chromas:1;
 unsigned int swap_yuv_cb_cr:1;
+unsigned int autowhitebalance:1;
 };
 
 static int reg_page_map_set(struct i2c_client *client, const u16 reg)
&lt; at &gt;&lt; at &gt; -701,6 +702,23 &lt; at &gt;&lt; at &gt; static int mt9m111_set_autoexposure(struct soc_camera_device *icd, int on)
 
 return ret;
 }
+
+static int mt9m111_set_autowhitebalance(struct soc_camera_device *icd, int on)
+{
+struct mt9m111 *mt9m111 = container_of(icd, struct mt9m111, icd);
+int ret;
+
+if (on)
+ret = reg_set(OPER_MODE_CTRL, MT9M111_OPMODE_AUTOWHITEBAL_EN);
+else
+ret = reg_clear(OPER_MODE_CTRL, MT9M111_OPMODE_AUTOWHITEBAL_EN);
+
+if (!ret)
+mt9m111-&gt;autowhitebalance = on;
+
+return ret;
+}
+
 static int mt9m111_get_control(struct soc_camera_device *icd,
        struct v4l2_control *ctrl)
 {
&lt; at &gt;&lt; at &gt; -737,6 +755,9 &lt; at &gt;&lt; at &gt; static int mt9m111_get_control(struct soc_camera_device *icd,
 case V4L2_CID_EXPOSURE_AUTO:
 ctrl-&gt;value = mt9m111-&gt;autoexposure;
 break;
+case V4L2_CID_AUTO_WHITE_BALANCE:
+ctrl-&gt;value = mt9m111-&gt;autowhitebalance;
+break;
 }
 return 0;
 }
&lt; at &gt;&lt; at &gt; -770,6 +791,9 &lt; at &gt;&lt; at &gt; static int mt9m111_set_control(struct soc_camera_device *icd,
 case V4L2_CID_EXPOSURE_AUTO:
 ret =  mt9m111_set_autoexposure(icd, ctrl-&gt;value);
 break;
+case V4L2_CID_AUTO_WHITE_BALANCE:
+ret =  mt9m111_set_autowhitebalance(icd, ctrl-&gt;value);
+break;
 default:
 ret = -EINVAL;
 }
&lt; at &gt;&lt; at &gt; -788,6 +812,7 &lt; at &gt;&lt; at &gt; static int mt9m111_restore_state(struct soc_camera_device *icd)
 mt9m111_set_flip(icd, mt9m111-&gt;vflip, MT9M111_RMB_MIRROR_ROWS);
 mt9m111_set_global_gain(icd, icd-&gt;gain);
 mt9m111_set_autoexposure(icd, mt9m111-&gt;autoexposure);
+mt9m111_set_autowhitebalance(icd, mt9m111-&gt;autowhitebalance);
 return 0;
 }
 
&lt; at &gt;&lt; at &gt; -882,6 +907,7 &lt; at &gt;&lt; at &gt; static int mt9m111_video_probe(struct soc_camera_device *icd)
 goto eisis;
 
 mt9m111-&gt;autoexposure = 1;
+mt9m111-&gt;autowhitebalance = 1;
 
 mt9m111-&gt;swap_rgb_even_odd = 1;
 mt9m111-&gt;swap_rgb_red_blue = 1;
</description>
    <dc:creator>Robert Jarzmik</dc:creator>
    <dc:date>2008-12-01T21:15:58</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.video.video4linux/41233">
    <title>[PULL] http://www.linuxtv.org/hg/~hverkuil/v4l-dvb</title>
    <link>http://comments.gmane.org/gmane.comp.video.video4linux/41233</link>
    <description>Hi Mauro,

Please pull from http://www.linuxtv.org/hg/~hverkuil/v4l-dvb for the 
following:

- omap2: add OMAP2 camera driver.

Thanks,

        Hans

diffstat:
 b/linux/drivers/media/video/omap24xxcam-dma.c |  601 ++++++++
 b/linux/drivers/media/video/omap24xxcam.c     | 1908 
++++++++++++++++++++++++++
 b/linux/drivers/media/video/omap24xxcam.h     |  593 ++++++++
 linux/drivers/media/video/Kconfig             |    7
 linux/drivers/media/video/Makefile            |    3
 5 files changed, 3112 insertions(+)

</description>
    <dc:creator>Hans Verkuil</dc:creator>
    <dc:date>2008-12-01T13:51:06</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.video.video4linux/41227">
    <title>Patches, affecting directories not in hg/linux</title>
    <link>http://comments.gmane.org/gmane.comp.video.video4linux/41227</link>
    <description>Hi Mauro,

I have a series of two patches, of which the first _amends_ a pxa-header, 
creates a header under drivers/media/video/, and changes pxa_camera.c to 
include the new header:

 arch/arm/mach-pxa/include/mach/pxa-regs.h |   95 -----------------------------
 drivers/media/video/pxa_camera.c          |    2 +
 drivers/media/video/pxa_camera.h          |   95 +++++++++++++++++++++++++++++
 3 files changed, 97 insertions(+), 95 deletions(-)
 create mode 100644 drivers/media/video/pxa_camera.h

and the second one is based on the first: it only touches files under 
drivers/media/video, but needs results of the first one:

 drivers/media/video/pxa_camera.c |  204 ++++++++++++++++++++++++++++++--------
 drivers/media/video/pxa_camera.h |   95 ------------------
 2 files changed, 162 insertions(+), 137 deletions(-)
 delete mode 100644 drivers/media/video/pxa_camera.h

(yes, it deletes drivers/media/video/pxa_camera.h again... No, I don't 
like it either)

I acked the first one and it is going to be merged over the ARM tree, the 
second one we should merge ourselves.

Shall we wait until the first one is in "next", so we can resync with it 
and then push the second one or how would you prefer to do this?

Thanks
Guennadi
---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer

--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request&lt; at &gt;redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list

</description>
    <dc:creator>Guennadi Liakhovetski</dc:creator>
    <dc:date>2008-12-01T13:22:17</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.video.video4linux/41219">
    <title>[PULL] http://www.linuxtv.org/hg/~hverkuil/v4l-dvb-ng</title>
    <link>http://comments.gmane.org/gmane.comp.video.video4linux/41219</link>
    <description>Hi Mauro,

Please pull from http://www.linuxtv.org/hg/~hverkuil/v4l-dvb-ng for the 
following:

- v4l2: add v4l2_device and v4l2_subdev structs to the v4l2 framework.
- v4l2-common: add i2c helper functions
- cs53l32a: convert to v4l2_subdev.
- cx25840: convert to v4l2_subdev.
- m52790: convert to v4l2_subdev.
- msp3400: convert to v4l2_subdev.
- saa7115: convert to v4l2_subdev.
- saa7127: convert to v4l2_subdev.
- saa717x: convert to v4l2_subdev.
- tuner: convert to v4l2_subdev.
- upd64031a: convert to v4l2_subdev.
- upd64083: convert to v4l2_subdev.
- vp27smpx: convert to v4l2_subdev.
- wm8739: convert to v4l2_subdev.
- wm8775: convert to v4l2_subdev.
- ivtv/ivtvfb: convert to v4l2_device/v4l2_subdev.

All points raised in reviews are addressed so I think it is time to get 
this merged so people can start to use it.

Reviewed-by: Laurent Pinchart &lt;laurent.pinchart&lt; at &gt;skynet.be&gt;
Reviewed-by: Guennadi Liakhovetski &lt;g.liakhovetski&lt; at &gt;gmx.de&gt;
Reviewed-by: Andy Walls &lt;awalls&lt; at &gt;radix.net&gt;
Reviewed-by: David Brownell &lt;david-b&lt; at &gt;pacbell.net&gt;

Once this is in I'll start on converting the other i2c drivers.

Thanks,

        Hans

diffstat:
 b/linux/Documentation/video4linux/v4l2-framework.txt |  362 ++++++++
 b/linux/drivers/media/video/v4l2-device.c            |   86 +
 b/linux/drivers/media/video/v4l2-subdev.c            |  108 ++
 b/linux/include/media/v4l2-device.h                  |  109 ++
 b/linux/include/media/v4l2-subdev.h                  |  188 ++++
 linux/drivers/media/video/Makefile                   |    2
 linux/drivers/media/video/cs53l32a.c                 |  186 ++--
 linux/drivers/media/video/cx25840/cx25840-audio.c    |   14
 linux/drivers/media/video/cx25840/cx25840-core.c     |  459 ++++++----
 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         |  220 +----
 linux/drivers/media/video/ivtv/ivtv-driver.h         |   52 -
 linux/drivers/media/video/ivtv/ivtv-fileops.c        |   44 -
 linux/drivers/media/video/ivtv/ivtv-gpio.c           |  354 +++++---
 linux/drivers/media/video/ivtv/ivtv-gpio.h           |    3
 linux/drivers/media/video/ivtv/ivtv-i2c.c            |  340 +------
 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                   |  172 ++-
 linux/drivers/media/video/msp3400-driver.c           |  408 +++++----
 linux/drivers/media/video/msp3400-driver.h           |    7
 linux/drivers/media/video/msp3400-kthreads.c         |   34
 linux/drivers/media/video/saa7115.c                  |  829 
+++++++++----------
 linux/drivers/media/video/saa7127.c                  |  425 +++++----
 linux/drivers/media/video/saa717x.c                  |  600 
+++++++------
 linux/drivers/media/video/tuner-core.c               |  403 +++++----
 linux/drivers/media/video/upd64031a.c                |  193 ++--
 linux/drivers/media/video/upd64083.c                 |  176 ++--
 linux/drivers/media/video/v4l2-common.c              |  170 +++
 linux/drivers/media/video/vp27smpx.c                 |  134 ++-
 linux/drivers/media/video/wm8739.c                   |  198 ++--
 linux/drivers/media/video/wm8775.c                   |  217 +++-
 linux/include/media/v4l2-common.h                    |   41
 40 files changed, 4098 insertions(+), 2682 deletions(-)

</description>
    <dc:creator>Hans Verkuil</dc:creator>
    <dc:date>2008-12-01T11:46:08</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.video.video4linux/41216">
    <title>[PATCH 2/2] Add ov7725 support to ov772x driver</title>
    <link>http://comments.gmane.org/gmane.comp.video.video4linux/41216</link>
    <description>
Signed-off-by: Kuninori Morimoto &lt;morimoto.kuninori&lt; at &gt;renesas.com&gt;
---
o this patch is based on mchehab/linux-next.git
o this patch came from "Add ov7725 ov7720 support to ov772x driver"

 drivers/media/video/ov772x.c    |   22 ++++++++++++++++++++++
 include/media/v4l2-chip-ident.h |    1 +
 2 files changed, 23 insertions(+), 0 deletions(-)

diff --git a/drivers/media/video/ov772x.c b/drivers/media/video/ov772x.c
index f417df1..d1bd4ea 100644
--- a/drivers/media/video/ov772x.c
+++ b/drivers/media/video/ov772x.c
&lt; at &gt;&lt; at &gt; -51,6 +51,7 &lt; at &gt;&lt; at &gt;
 #define COM8        0x13 /* Common control 8 */
 #define COM9        0x14 /* Common control 9 */
 #define COM10       0x15 /* Common control 10 */
+#define REG16       0x16 /* Register 16 */
 #define HSTART      0x17 /* Horizontal sensor size */
 #define HSIZE       0x18 /* Horizontal frame (HREF column) end high 8-bit */
 #define VSTART      0x19 /* Vertical frame (row) start high 8-bit */
&lt; at &gt;&lt; at &gt; -65,6 +66,7 &lt; at &gt;&lt; at &gt;
 #define AEW         0x24 /* AGC/AEC - Stable operating region (upper limit) */
 #define AEB         0x25 /* AGC/AEC - Stable operating region (lower limit) */
 #define VPT         0x26 /* AGC/AEC Fast mode operating region */
+#define REG28       0x28 /* Register 28 */
 #define HOUTSIZE    0x29 /* Horizontal data output size MSBs */
 #define EXHCH       0x2A /* Dummy pixel insert MSB */
 #define EXHCL       0x2B /* Dummy pixel insert LSB */
&lt; at &gt;&lt; at &gt; -94,6 +96,7 &lt; at &gt;&lt; at &gt;
 #define TGT_R       0x43 /* BLC red  channel target value */
 #define TGT_GB      0x44 /* BLC Gb   channel target value */
 #define TGT_GR      0x45 /* BLC Gr   channel target value */
+/* for ov7720 */
 #define LCC0        0x46 /* Lens correction control 0 */
 #define LCC1        0x47 /* Lens correction option 1 - X coordinate */
 #define LCC2        0x48 /* Lens correction option 2 - Y coordinate */
&lt; at &gt;&lt; at &gt; -101,6 +104,15 &lt; at &gt;&lt; at &gt;
 #define LCC4        0x4A /* Lens correction option 4 - radius of the circular */
 #define LCC5        0x4B /* Lens correction option 5 */
 #define LCC6        0x4C /* Lens correction option 6 */
+/* for ov7725 */
+#define LC_CTR      0x46 /* Lens correction control */
+#define LC_XC       0x47 /* X coordinate of lens correction center relative */
+#define LC_YC       0x48 /* Y coordinate of lens correction center relative */
+#define LC_COEF     0x49 /* Lens correction coefficient */
+#define LC_RADI     0x4A /* Lens correction radius */
+#define LC_COEFB    0x4B /* Lens B channel compensation coefficient */
+#define LC_COEFR    0x4C /* Lens R channel compensation coefficient */
+
 #define FIXGAIN     0x4D /* Analog fix gain amplifer */
 #define AREF0       0x4E /* Sensor reference control */
 #define AREF1       0x4F /* Sensor reference current control */
&lt; at &gt;&lt; at &gt; -182,8 +194,13 &lt; at &gt;&lt; at &gt;
 #define SDE         0xA6 /* Special digital effect control */
 #define USAT        0xA7 /* U component saturation control */
 #define VSAT        0xA8 /* V component saturation control */
+/* for ov7720 */
 #define HUE0        0xA9 /* Hue control 0 */
 #define HUE1        0xAA /* Hue control 1 */
+/* for ov7725 */
+#define HUECOS      0xA9 /* Cosine value */
+#define HUESIN      0xAA /* Sine value */
+
 #define SIGN        0xAB /* Sign bit for Hue and contrast */
 #define DSPAUTO     0xAC /* DSP auto function ON/OFF control */
 
&lt; at &gt;&lt; at &gt; -349,6 +366,7 &lt; at &gt;&lt; at &gt;
  * ID
  */
 #define OV7720  0x7720
+#define OV7725  0x7721
 #define VERSION(pid, ver) ((pid&lt;&lt;8)|(ver&amp;0xFF))
 
 /*
&lt; at &gt;&lt; at &gt; -838,6 +856,10 &lt; at &gt;&lt; at &gt; static int ov772x_video_probe(struct soc_camera_device *icd)
 devname     = "ov7720";
 priv-&gt;model = V4L2_IDENT_OV7720;
 break;
+case OV7725:
+devname     = "ov7725";
+priv-&gt;model = V4L2_IDENT_OV7725;
+break;
 default:
 dev_err(&amp;icd-&gt;dev,
 "Product ID error %x:%x\n", pid, ver);
diff --git a/include/media/v4l2-chip-ident.h b/include/media/v4l2-chip-ident.h
index 456ac0d..14a205f 100644
--- a/include/media/v4l2-chip-ident.h
+++ b/include/media/v4l2-chip-ident.h
&lt; at &gt;&lt; at &gt; -61,6 +61,7 &lt; at &gt;&lt; at &gt; enum {
 /* OmniVision sensors: reserved range 250-299 */
 V4L2_IDENT_OV7670 = 250,
 V4L2_IDENT_OV7720 = 251,
+V4L2_IDENT_OV7725 = 252,
 
 /* Conexant MPEG encoder/decoders: reserved range 410-420 */
 V4L2_IDENT_CX23415 = 415,
</description>
    <dc:creator>Kuninori Morimoto</dc:creator>
    <dc:date>2008-12-01T09:42:45</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.video.video4linux/41215">
    <title>[PATCH 1/2] Change device ID selection method on ov772x driver</title>
    <link>http://comments.gmane.org/gmane.comp.video.video4linux/41215</link>
    <description>
Signed-off-by: Kuninori Morimoto &lt;morimoto.kuninori&lt; at &gt;renesas.com&gt;
---
o this patch is based on mchehab/linux-next.git
o this patch came from "Add ov7725 ov7720 support to ov772x driver"
o specify code on i2c_device_id is removed


 drivers/media/video/ov772x.c    |   48 +++++++++++++++++++-------------------
 include/media/v4l2-chip-ident.h |    2 +-
 2 files changed, 25 insertions(+), 25 deletions(-)

diff --git a/drivers/media/video/ov772x.c b/drivers/media/video/ov772x.c
index d3b54a4..f417df1 100644
--- a/drivers/media/video/ov772x.c
+++ b/drivers/media/video/ov772x.c
&lt; at &gt;&lt; at &gt; -346,6 +346,12 &lt; at &gt;&lt; at &gt;
 #define OP_SWAP_RGB 0x00000002
 
 /*
+ * ID
+ */
+#define OV7720  0x7720
+#define VERSION(pid, ver) ((pid&lt;&lt;8)|(ver&amp;0xFF))
+
+/*
  * struct
  */
 struct regval_list {
&lt; at &gt;&lt; at &gt; -374,34 +380,22 &lt; at &gt;&lt; at &gt; struct ov772x_priv {
 struct soc_camera_device          icd;
 const struct ov772x_color_format *fmt;
 const struct ov772x_win_size     *win;
+int                               model;
 };
 
 #define ENDMARKER { 0xff, 0xff }
 
-static const struct regval_list ov772x_default_regs[] =
-{
-{ COM3,  0x00 },
-{ COM4,  PLL_4x | 0x01 },
-{ 0x16,  0x00 }, /* Mystery */
-{ COM11, 0x10 }, /* Mystery */
-{ 0x28,  0x00 }, /* Mystery */
-{ HREF,  0x00 },
-{ COM13, 0xe2 }, /* Mystery */
-{ AREF0, 0xef },
-{ AREF2, 0x60 },
-{ AREF6, 0x7a },
-ENDMARKER,
-};
-
 /*
  * register setting for color format
  */
 static const struct regval_list ov772x_RGB555_regs[] = {
+{ COM3, 0x00 },
 { COM7, FMT_RGB555 | OFMT_RGB },
 ENDMARKER,
 };
 
 static const struct regval_list ov772x_RGB565_regs[] = {
+{ COM3, 0x00 },
 { COM7, FMT_RGB565 | OFMT_RGB },
 ENDMARKER,
 };
&lt; at &gt;&lt; at &gt; -413,6 +407,7 &lt; at &gt;&lt; at &gt; static const struct regval_list ov772x_YYUV_regs[] = {
 };
 
 static const struct regval_list ov772x_UVYY_regs[] = {
+{ COM3, 0x00 },
 { COM7, OFMT_YUV },
 ENDMARKER,
 };
&lt; at &gt;&lt; at &gt; -634,9 +629,6 &lt; at &gt;&lt; at &gt; static int ov772x_start_capture(struct soc_camera_device *icd)
  * reset hardware
  */
 ov772x_reset(priv-&gt;client);
-ret = ov772x_write_array(priv-&gt;client, ov772x_default_regs);
-if (ret &lt; 0)
-goto start_end;
 
 /*
  * set color format
&lt; at &gt;&lt; at &gt; -717,7 +709,9 &lt; at &gt;&lt; at &gt; static unsigned long ov772x_query_bus_param(struct soc_camera_device *icd)
 static int ov772x_get_chip_id(struct soc_camera_device *icd,
       struct v4l2_chip_ident   *id)
 {
-id-&gt;ident    = V4L2_IDENT_OV772X;
+struct ov772x_priv *priv = container_of(icd, struct ov772x_priv, icd);
+
+id-&gt;ident    = priv-&gt;model;
 id-&gt;revision = 0;
 
 return 0;
&lt; at &gt;&lt; at &gt; -811,6 +805,7 &lt; at &gt;&lt; at &gt; static int ov772x_video_probe(struct soc_camera_device *icd)
 {
 struct ov772x_priv *priv = container_of(icd, struct ov772x_priv, icd);
 u8                  pid, ver;
+const char         *devname;
 
 /*
  * We must have a parent by now. And it cannot be a wrong one.
&lt; at &gt;&lt; at &gt; -837,15 +832,21 &lt; at &gt;&lt; at &gt; static int ov772x_video_probe(struct soc_camera_device *icd)
  */
 pid = i2c_smbus_read_byte_data(priv-&gt;client, PID);
 ver = i2c_smbus_read_byte_data(priv-&gt;client, VER);
-if (pid != 0x77 ||
-    ver != 0x21) {
+
+switch (VERSION(pid, ver)) {
+case OV7720:
+devname     = "ov7720";
+priv-&gt;model = V4L2_IDENT_OV7720;
+break;
+default:
 dev_err(&amp;icd-&gt;dev,
 "Product ID error %x:%x\n", pid, ver);
 return -ENODEV;
 }
 
 dev_info(&amp;icd-&gt;dev,
- "ov772x Product ID %0x:%0x Manufacturer ID %x:%x\n",
+ "%s Product ID %0x:%0x Manufacturer ID %x:%x\n",
+ devname,
  pid,
  ver,
  i2c_smbus_read_byte_data(priv-&gt;client, MIDH),
&lt; at &gt;&lt; at &gt; -936,7 +937,7 &lt; at &gt;&lt; at &gt; static int ov772x_remove(struct i2c_client *client)
 }
 
 static const struct i2c_device_id ov772x_id[] = {
-{"ov772x", 0},
+{ "ov772x", 0 },
 { }
 };
 MODULE_DEVICE_TABLE(i2c, ov772x_id);
&lt; at &gt;&lt; at &gt; -956,7 +957,6 &lt; at &gt;&lt; at &gt; static struct i2c_driver ov772x_i2c_driver = {
 
 static int __init ov772x_module_init(void)
 {
-printk(KERN_INFO "ov772x driver\n");
 return i2c_add_driver(&amp;ov772x_i2c_driver);
 }
 
diff --git a/include/media/v4l2-chip-ident.h b/include/media/v4l2-chip-ident.h
index bfe5142..456ac0d 100644
--- a/include/media/v4l2-chip-ident.h
+++ b/include/media/v4l2-chip-ident.h
&lt; at &gt;&lt; at &gt; -60,7 +60,7 &lt; at &gt;&lt; at &gt; enum {
 
 /* OmniVision sensors: reserved range 250-299 */
 V4L2_IDENT_OV7670 = 250,
-V4L2_IDENT_OV772X = 251,
+V4L2_IDENT_OV7720 = 251,
 
 /* Conexant MPEG encoder/decoders: reserved range 410-420 */
 V4L2_IDENT_CX23415 = 415,
</description>
    <dc:creator>Kuninori Morimoto</dc:creator>
    <dc:date>2008-12-01T09:19:43</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.video.video4linux/41209">
    <title>USB device for uncompressed NTSC capture</title>
    <link>http://comments.gmane.org/gmane.comp.video.video4linux/41209</link>
    <description>This may be the wrong place for this question. I've been looking at a
number of places, but haven't managed to figure out what I need to
know.

I have a camera that only has analog NTSC output. I would like to get
the frames into my Linux laptop. The frames are 8-bit deep grayscale
and 320x240. I assume that they are getting expanded up into NTSC
format or something; I'm ok with that; I don't need it to be very
accurate.

On my desktop box, I have a Hauppage WinTV PCI card that hands me the
frames back via v4l. That works perfectly. I want to do the same on my
laptop, only using USB rather than PCI for obvious reasons. (1394
would be fine too. But I want something cheap.)

What devices are supported that would give me what I need? I scrounged
around on the linuxtv wiki and various other places, but it seems like
all of the USB sticks with analog inputs were doing fancy mpeg-2
compression, which kinda sucks for me:  I'm not saving the frames
anywhere, I'm processing them as they come in. So I'd rather not have
them compressed and then decompressed immediately. Also, although
quality isn't that big of a concern for me, latency is.

I don't need audio, TV tuning, a remote, or any of the other usual
crud that these things seem to have. I just want to get a stream of
frames at a rather low resolution, with the bits relatively
unmolested. I suspect that there may be many USB devices that would do
this for me, but for the life of me I can't figure out how to tell
which ones they are.

I am currently running the 2.6.26 kernel that comes with Fedora 9
(2.6.26.6-79.fc9.i686), but I'm happy to upgrade, downgrade, or
compile my own drivers.

My code is currently using v4l (either v4l1 or v4l2, autodetected).
I've never understood the V4L vs DVB thing, but I could switch to a
different API if necessary.

--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request&lt; at &gt;redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list

</description>
    <dc:creator>Steve Fink</dc:creator>
    <dc:date>2008-12-01T06:55:01</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.video.video4linux/41204">
    <title>KWorld ATSC 110 and NTSC [was: 2.6.25+ and KWorld ATSC 110 inputs]</title>
    <link>http://comments.gmane.org/gmane.comp.video.video4linux/41204</link>
    <description>Hi Bill,

Bill Pringlemeir wrote:


The NTSC issue is a known problem.

I tracked the error down to a commit Mauro had made (IIRC, back in
April) which ended up causing a regression on some boards  (e.g. KWorld
ATSC 110/115).  M.Krufky spun a quick patch (which works fine), but it
cannot be applied to the main Hg sources as it too would break other
things, and so some discussion would be needed to resolve the underlying
problem.  I was going to bug Mauro about the issue, but never got around
to it, and I don't know if Mike discussed this with Mauro at the recent
Plummers conference.  (I have cc'ed both in on the message).

Several posters on AVS forums were complaining of this and I posted a
link to Mike's patch and instructions (including a warning that it could
break support with other cards).  AFAIK, zero feedback was achieved from
that, as posters were either too scared by the warning or couldn't
follow the instructions, nor responded to further posts.  Whatever.

In any regard, Mike's patch, as I said, works fine, albeit is not a
perfect solution as it requires some manual intervention (or script) on
the part of the user to enable the analogue TV functionality.

Mauro -- the exact changeset in question is:   7753:67faa17a5bcb
Mike's patch is located at:
http://linuxtv.org/~mkrufky/fix-broken-atsc110-analog.patch




--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request&lt; at &gt;redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list

</description>
    <dc:creator>CityK</dc:creator>
    <dc:date>2008-12-01T02:09:45</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.video.video4linux/41203">
    <title>KWorld ATSC 110 and NTSC [was: 2.6.25+ and KWorld ATSC 110 inputs]</title>
    <link>http://comments.gmane.org/gmane.comp.video.video4linux/41203</link>
    <description>
Stuart, while I don't know for sure, I believe that information about
the power cycling is now obsolete and the driver for the ATSC 120 is
working.

In any regard, such things are not related to the difficulties Bill is
experiencing with his 110 card.  I'll detail in the next message.

--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request&lt; at &gt;redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list

</description>
    <dc:creator>CityK</dc:creator>
    <dc:date>2008-12-01T01:40:54</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.video.video4linux/41191">
    <title>S-Video analog Capture</title>
    <link>http://comments.gmane.org/gmane.comp.video.video4linux/41191</link>
    <description>This thread may be of some help for you:
http://marc.info/?l=linux-dvb&amp;m=122738471231266&amp;w=2

--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request&lt; at &gt;redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list

</description>
    <dc:creator>CityK</dc:creator>
    <dc:date>2008-11-30T18:16:32</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.video.video4linux/41190">
    <title>HVR-1800 problems.</title>
    <link>http://comments.gmane.org/gmane.comp.video.video4linux/41190</link>
    <description>I have a HVR-1800 that I am trying to capture Svideo and stereo from a
SA4250 Cablebox.

If I tune the cable box to a channel, and try and run:
mplayer driver=v4l2:device=/dev/video0:input=2:normid=0 -vo -xv tv://

All I get is a scrambled screen that is mostly green, and no signal at
all.   If I try to run it a second or third time or more, the input changes
to 0 and it will not listen to the mplayer command to select input=2 no
matter what I try.

Does anyone out there have this working and can point me in the right
direction to get this working?   I would really like to get .mpg output from
the svideo and analog stereo from this card.

Otherwise, does anyone know of a card that I could use, that would work
better?

-Mark
--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request&lt; at &gt;redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list

</description>
    <dc:creator>Mark Jenks</dc:creator>
    <dc:date>2008-11-30T17:37:10</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.video.video4linux/41176">
    <title>S-Video analog Capture.</title>
    <link>http://comments.gmane.org/gmane.comp.video.video4linux/41176</link>
    <description>I have been trying to get my 2 HVR-1800's to work with my time-warner cable
box without much success at all.

Good thing I bought 2 of these, since they are exactly what I needed, and
can't use them at all except OTA, since there are lots of problem with the
analog input of these.

I am looking for a good analog capture card that can get S-video and maybe
audio from my TW box, so that I can use them in Mythtv.

Does anyone have any suggestions on what cards have analog S-video support?

Thanks!

-Mark
--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request&lt; at &gt;redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list

</description>
    <dc:creator>Mark Jenks</dc:creator>
    <dc:date>2008-11-30T00:16:01</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.video.video4linux/41165">
    <title>[PATCH v2] v4l2_device/v4l2_subdev: final (?) version</title>
    <link>http://comments.gmane.org/gmane.comp.video.video4linux/41165</link>
    <description>Hi all,

This is hopefully the final version. All earlier comments have been
incorporated into this patch. I also made a new change: the mutex has been
replaced by a spinlock and I no longer lock when walking the list of subdevs.

So the assumption is that subdevs only added during initialization of the
device and removed during the destruction of the device, and not in between.
I cannot think of any reason why this you would want to do this, but should
this ever happen then the list should be replaced by a klist. I consider
this overkill, esp. since walking the subdev list should be as fast as
possible.

The full tree which includes the i2c module and ivtv conversion as well can
be accessed here: http://linuxtv.org/hg/~hverkuil/v4l-dvb-ng

Regards,

Hans

# HG changeset patch
# User Hans Verkuil &lt;hverkuil&lt; at &gt;xs4all.nl&gt;
# Date 1227979357 -3600
# Node ID 719584d5989d93b7ccb3de54155cbab9e6b06526
# Parent  7100e78482d70ee9acf90f2c15848f6002f89b7d
v4l2: add v4l2_device and v4l2_subdev structs to the v4l2 framework.

From: Hans Verkuil &lt;hverkuil&lt; at &gt;xs4all.nl&gt;

Start implementing a proper v4l2 framework as discussed during the
Linux Plumbers Conference 2008.

Introduces v4l2_device (for device instances) and v4l2_subdev (representing
sub-device instances).

Priority: normal

Signed-off-by: Hans Verkuil &lt;hverkuil&lt; at &gt;xs4all.nl&gt;
Reviewed-by: Laurent Pinchart &lt;laurent.pinchart&lt; at &gt;skynet.be&gt;
Reviewed-by: Guennadi Liakhovetski &lt;g.liakhovetski&lt; at &gt;gmx.de&gt;
Reviewed-by: Andy Walls &lt;awalls&lt; at &gt;radix.net&gt;

diff -r 7100e78482d7 -r 719584d5989d linux/Documentation/video4linux/v4l2-framework.txt
--- /dev/nullThu Jan 01 00:00:00 1970 +0000
+++ b/linux/Documentation/video4linux/v4l2-framework.txtSat Nov 29 18:22:37 2008 +0100
&lt; at &gt;&lt; at &gt; -0,0 +1,362 &lt; at &gt;&lt; at &gt;
+Overview of the V4L2 driver framework
+=====================================
+
+This text documents the various structures provided by the V4L2 framework and
+their relationships.
+
+
+Introduction
+------------
+
+The V4L2 drivers tend to be very complex due to the complexity of the
+hardware: most devices have multiple ICs, export multiple device nodes in
+/dev, and create also non-V4L2 devices such as DVB, ALSA, FB, I2C and input
+(IR) devices.
+
+Especially the fact that V4L2 drivers have to setup supporting ICs to
+do audio/video muxing/encoding/decoding makes it more complex than most.
+Usually these ICs are connected to the main bridge driver through one or
+more I2C busses, but other busses can also be used. Such devices are
+called 'sub-devices'.
+
+For a long time the framework was limited to the video_device struct for
+creating V4L device nodes and video_buf for handling the video buffers
+(note that this document does not discuss the video_buf framework).
+
+This meant that all drivers had to do the setup of device instances and
+connecting to sub-devices themselves. Some of this is quite complicated
+to do right and many drivers never did do it correctly.
+
+There is also a lot of common code that could never be refactored due to
+the lack of a framework.
+
+So this framework sets up the basic building blocks that all drivers
+need and this same framework should make it much easier to refactor
+common code into utility functions shared by all drivers.
+
+
+Structure of a driver
+---------------------
+
+All drivers have the following structure:
+
+1) A struct for each device instance containing the device state.
+
+2) A way of initializing and commanding sub-devices (if any).
+
+3) Creating V4L2 device nodes (/dev/videoX, /dev/vbiX, /dev/radioX and
+   /dev/vtxX) and keeping track of device-node specific data.
+
+4) Filehandle-specific structs containing per-filehandle data.
+
+This is a rough schematic of how it all relates:
+
+    device instances
+      |
+      +-sub-device instances
+      |
+      \-V4L2 device nodes
+  |
+  \-filehandle instances
+
+
+Structure of the framework
+--------------------------
+
+The framework closely resembles the driver structure: it has a v4l2_device
+struct for the device instance data, a v4l2_subdev struct to refer to
+sub-device instances, the video_device struct stores V4L2 device node data
+and in the future a v4l2_fh struct will keep track of filehandle instances
+(this is not yet implemented).
+
+
+struct v4l2_device
+------------------
+
+Each device instance is represented by a struct v4l2_device (v4l2-device.h).
+Very simple devices can just allocate this struct, but most of the time you
+would embed this struct inside a larger struct.
+
+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-&gt;driver_data
+to v4l2_dev. Registration will also set v4l2_dev-&gt;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.
+
+You unregister with:
+
+v4l2_device_unregister(struct v4l2_device *v4l2_dev);
+
+Unregistering will also automatically unregister all subdevs from the device.
+
+Sometimes you need to iterate over all devices registered by a specific
+driver. This is usually the case if multiple device drivers use the same
+hardware. E.g. the ivtvfb driver is a framebuffer driver that uses the ivtv
+hardware. The same is true for alsa drivers for example.
+
+You can iterate over all registered devices as follows:
+
+static int callback(struct device *dev, void *p)
+{
+struct v4l2_device *v4l2_dev = dev_get_drvdata(dev);
+
+/* test if this device was inited */
+if (v4l2_dev == NULL)
+return 0;
+...
+return 0;
+}
+
+int iterate(void *p)
+{
+struct device_driver *drv;
+int err;
+
+/* Find driver 'ivtv' on the PCI bus.
+   pci_bus_type is a global. For USB busses use usb_bus_type. */
+drv = driver_find("ivtv", &amp;pci_bus_type);
+/* iterate over all ivtv device instances */
+err = driver_for_each_device(drv, NULL, p, callback);
+put_driver(drv);
+return err;
+}
+
+Sometimes you need to keep a running counter of the device instance. This is
+commonly used to map a device instance to an index of a module option array.
+
+The recommended approach is as follows:
+
+static atomic_t drv_instance = ATOMIC_INIT(0);
+
+static int __devinit drv_probe(struct pci_dev *dev,
+const struct pci_device_id *pci_id)
+{
+...
+state-&gt;instance = atomic_inc_return(&amp;drv_instance) - 1;
+}
+
+
+struct v4l2_subdev
+------------------
+
+Many drivers need to communicate with sub-devices. These devices can do all
+sort of tasks, but most commonly they handle audio and/or video muxing,
+encoding or decoding. For webcams common sub-devices are sensors and camera
+controllers.
+
+Usually these are I2C devices, but not necessarily. In order to provide the
+driver with a consistent interface to these sub-devices the v4l2_subdev struct
+(v4l2-subdev.h) was created.
+
+Each sub-device driver must have a v4l2_subdev struct. This struct can be
+stand-alone for simple sub-devices or it might be embedded in a larger struct
+if more state information needs to be stored. Usually there is a low-level
+device struct (e.g. i2c_client) that contains the device data as setup
+by the kernel. It is recommended to store that pointer in the private
+data of v4l2_subdev using v4l2_set_subdevdata(). That makes it easy to go
+from a v4l2_subdev to the actual low-level bus-specific device data.
+
+You also need a way to go from the low-level struct to v4l2_subdev. For the
+common i2c_client struct the i2c_set_clientdata() call is used to store a
+v4l2_subdev pointer, for other busses you may have to use other methods.
+
+From the bridge driver perspective you load the sub-device module and somehow
+obtain the v4l2_subdev pointer. For i2c devices this is easy: you call
+i2c_get_clientdata(). For other busses something similar needs to be done.
+Helper functions exists for sub-devices on an I2C bus that do most of this
+tricky work for you.
+
+Each v4l2_subdev contains function pointers that sub-device drivers can
+implement (or leave NULL if it is not applicable). Since sub-devices can do
+so many different things and you do not want to end up with a huge ops struct
+of which only a handful of ops are commonly implemented, the function pointers
+are sorted according to category and each category has its own ops struct.
+
+The top-level ops struct contains pointers to the category ops structs, which
+may be NULL if the subdev driver does not support anything from that category.
+
+It looks like this:
+
+struct v4l2_subdev_core_ops {
+int (*g_chip_ident)(struct v4l2_subdev *sd, struct v4l2_chip_ident *chip);
+int (*log_status)(struct v4l2_subdev *sd);
+int (*init)(struct v4l2_subdev *sd, u32 val);
+...
+};
+
+struct v4l2_subdev_tuner_ops {
+...
+};
+
+struct v4l2_subdev_audio_ops {
+...
+};
+
+struct v4l2_subdev_video_ops {
+...
+};
+
+struct v4l2_subdev_ops {
+const struct v4l2_subdev_core_ops  *core;
+const struct v4l2_subdev_tuner_ops *tuner;
+const struct v4l2_subdev_audio_ops *audio;
+const struct v4l2_subdev_video_ops *video;
+};
+
+The core ops are common to all subdevs, the other categories are implemented
+depending on the sub-device. E.g. a video device is unlikely to support the
+audio ops and vice versa.
+
+This setup limits the number of function pointers while still making it easy
+to add new ops and categories.
+
+A sub-device driver initializes the v4l2_subdev struct using:
+
+v4l2_subdev_init(subdev, &amp;ops);
+
+Afterwards you need to initialize subdev-&gt;name with a unique name and set the
+module owner. This is done for you if you use the i2c helper functions.
+
+A device (bridge) driver needs to register the v4l2_subdev with the
+v4l2_device:
+
+int err = v4l2_device_register_subdev(device, subdev);
+
+This can fail if the subdev module disappeared before it could be registered.
+After this function was called successfully the subdev-&gt;dev field points to
+the v4l2_device.
+
+You can unregister a sub-device using:
+
+v4l2_device_unregister_subdev(subdev);
+
+Afterwards the subdev module can be unloaded and subdev-&gt;dev == NULL.
+
+You can call an ops function either directly:
+
+err = subdev-&gt;ops-&gt;core-&gt;g_chip_ident(subdev, &amp;chip);
+
+but it is better and easier to use this macro:
+
+err = v4l2_subdev_call(subdev, core, g_chip_ident, &amp;chip);
+
+The macro will to the right NULL pointer checks and returns -ENODEV if subdev
+is NULL, -ENOIOCTLCMD if either subdev-&gt;core or subdev-&gt;core-&gt;g_chip_ident is
+NULL, or the actual result of the subdev-&gt;ops-&gt;core-&gt;g_chip_ident ops.
+
+It is also possible to call all or a subset of the sub-devices:
+
+v4l2_device_call_all(dev, 0, core, g_chip_ident, &amp;chip);
+
+Any subdev that does not support this ops is skipped and error results are
+ignored. If you want to check for errors use this:
+
+err = v4l2_device_call_until_err(dev, 0, core, g_chip_ident, &amp;chip);
+
+Any error except -ENOIOCTLCMD will exit the loop with that error. If no
+errors (except -ENOIOCTLCMD) occured, then 0 is returned.
+
+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-&gt;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.
+
+The group ID gives the bridge driver more control how callbacks are called.
+For example, there may be multiple audio chips on a board, each capable of
+changing the volume. But usually only one will actually be used when the
+user want to change the volume. You can set the group ID for that subdev to
+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.
+
+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
+contain several subdevs that use an I2C bus, but also a subdev that is
+controlled through GPIO pins. This distinction is only relevant when setting
+up the device, but once the subdev is registered it is completely transparent.
+
+
+I2C sub-device drivers
+----------------------
+
+Since these drivers are so common, special helper functions are available to
+ease the use of these drivers (v4l2-common.h).
+
+The recommended method of adding v4l2_subdev support to an I2C driver is to
+embed the v4l2_subdev struct into the state struct that is created for each
+I2C device instance. Very simple devices have no state struct and in that case
+you can just create a v4l2_subdev directly.
+
+A typical state struct would look like this (where 'chipname' is replaced by
+the name of the chip):
+
+struct chipname_state {
+struct v4l2_subdev sd;
+...  /* additional state fields */
+};
+
+Initialize the v4l2_subdev struct as follows:
+
+v4l2_i2c_subdev_init(&amp;state-&gt;sd, client, subdev_ops);
+
+This function will fill in all the fields of v4l2_subdev and ensure that the
+v4l2_subdev and i2c_client both point to one another.
+
+You should also add a helper inline function to go from a v4l2_subdev pointer
+to a chipname_state struct:
+
+static inline struct chipname_state *to_state(struct v4l2_subdev *sd)
+{
+return container_of(sd, struct chipname_state, sd);
+}
+
+Use this to go from the v4l2_subdev struct to the i2c_client struct:
+
+struct i2c_client *client = v4l2_get_subdevdata(sd);
+
+And this to go from an i2c_client to a v4l2_subdev struct:
+
+struct v4l2_subdev *sd = i2c_get_clientdata(client);
+
+Finally you need to make a command function to make driver-&gt;command()
+call the right subdev_ops functions:
+
+static int subdev_command(struct i2c_client *client, unsigned cmd, void *arg)
+{
+return v4l2_subdev_command(i2c_get_clientdata(client), cmd, arg);
+}
+
+If driver-&gt;command is never used then you can leave this out. Eventually the
+driver-&gt;command usage should be removed from v4l.
+
+Make sure to call v4l2_device_unregister_subdev(sd) when the remove() callback
+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.
+
+
+The bridge driver also has some helper functions it can use:
+
+struct v4l2_subdev *sd = v4l2_i2c_new_subdev(adapter, "module_foo", "chipid", 0x36);
+
+This loads the given module (can be NULL if no module needs to be loaded) and
+calls i2c_new_device() with the given i2c_adapter and chip/address arguments.
+If all goes well, then it registers the subdev with the v4l2_device. It gets
+the v4l2_device by calling i2c_get_adapdata(adapter), so you should make sure
+that adapdata is set to v4l2_device when you setup the i2c_adapter in your
+driver.
+
+You can also use v4l2_i2c_new_probed_subdev() which is very similar to
+v4l2_i2c_new_subdev(), except that it has an array of possible I2C addresses
+that it should probe. Internally it calls i2c_new_probed_device().
+
+Both functions return NULL if something went wrong.
+
+
+struct video_device
+-------------------
+
+Not yet documented.
diff -r 7100e78482d7 -r 719584d5989d linux/drivers/media/video/Makefile
--- a/linux/drivers/media/video/MakefileSat Nov 29 00:46:43 2008 -0200
+++ b/linux/drivers/media/video/MakefileSat Nov 29 18:22:37 2008 +0100
&lt; at &gt;&lt; at &gt; -8,7 +8,7 &lt; at &gt;&lt; at &gt;
 
 stkwebcam-objs:=stk-webcam.o stk-sensor.o
 
-videodev-objs:=v4l2-dev.o v4l2-ioctl.o
+videodev-objs:=v4l2-dev.o v4l2-ioctl.o v4l2-device.o v4l2-subdev.o
 
 obj-$(CONFIG_VIDEO_DEV) += videodev.o v4l2-compat-ioctl32.o v4l2-int-device.o
 
diff -r 7100e78482d7 -r 719584d5989d linux/drivers/media/video/v4l2-device.c
--- /dev/nullThu Jan 01 00:00:00 1970 +0000
+++ b/linux/drivers/media/video/v4l2-device.cSat Nov 29 18:22:37 2008 +0100
&lt; at &gt;&lt; at &gt; -0,0 +1,80 &lt; at &gt;&lt; at &gt;
+/*
+    V4L2 device support.
+
+    Copyright (C) 2008  Hans Verkuil &lt;hverkuil&lt; at &gt;xs4all.nl&gt;
+
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation; either version 2 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program; if not, write to the Free Software
+    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ */
+
+#include &lt;linux/types.h&gt;
+#include &lt;linux/ioctl.h&gt;
+#include &lt;linux/i2c.h&gt;
+#include &lt;linux/videodev2.h&gt;
+#include &lt;media/v4l2-device.h&gt;
+
+void v4l2_device_register(struct device *dev, struct v4l2_device *v4l2_dev)
+{
+BUG_ON(!dev || !v4l2_dev || dev_get_drvdata(dev));
+INIT_LIST_HEAD(&amp;v4l2_dev-&gt;subdevs);
+spin_lock_init(&amp;v4l2_dev-&gt;lock);
+v4l2_dev-&gt;dev = dev;
+snprintf(v4l2_dev-&gt;name, sizeof(v4l2_dev-&gt;name), "%s %s",
+dev-&gt;driver-&gt;name, dev-&gt;bus_id);
+dev_set_drvdata(dev, v4l2_dev);
+}
+EXPORT_SYMBOL(v4l2_device_register);
+
+void v4l2_device_unregister(struct v4l2_device *v4l2_dev)
+{
+struct v4l2_subdev *sd, *next;
+
+BUG_ON(!v4l2_dev || !v4l2_dev-&gt;dev || !dev_get_drvdata(v4l2_dev-&gt;dev));
+dev_set_drvdata(v4l2_dev-&gt;dev, NULL);
+/* unregister subdevs */
+list_for_each_entry_safe(sd, next, &amp;v4l2_dev-&gt;subdevs, list)
+v4l2_device_unregister_subdev(sd);
+
+v4l2_dev-&gt;dev = NULL;
+}
+EXPORT_SYMBOL(v4l2_device_unregister);
+
+int v4l2_device_register_subdev(struct v4l2_device *dev, struct v4l2_subdev *sd)
+{
+/* Check that sd-&gt;dev is not set and that the subdev's name is
+   filled in. */
+BUG_ON(!dev || !sd || sd-&gt;dev || !sd-&gt;name[0]);
+if (!try_module_get(sd-&gt;owner))
+return -ENODEV;
+sd-&gt;dev = dev;
+spin_lock(&amp;dev-&gt;lock);
+list_add_tail(&amp;sd-&gt;list, &amp;dev-&gt;subdevs);
+spin_unlock(&amp;dev-&gt;lock);
+return 0;
+}
+EXPORT_SYMBOL(v4l2_device_register_subdev);
+
+void v4l2_device_unregister_subdev(struct v4l2_subdev *sd)
+{
+BUG_ON(!sd);
+/* return if it isn't registered */
+if (sd-&gt;dev == NULL)
+return;
+spin_lock(&amp;sd-&gt;dev-&gt;lock);
+list_del(&amp;sd-&gt;list);
+spin_unlock(&amp;sd-&gt;dev-&gt;lock);
+sd-&gt;dev = NULL;
+module_put(sd-&gt;owner);
+}
+EXPORT_SYMBOL(v4l2_device_unregister_subdev);
diff -r 7100e78482d7 -r 719584d5989d linux/drivers/media/video/v4l2-subdev.c
--- /dev/nullThu Jan 01 00:00:00 1970 +0000
+++ b/linux/drivers/media/video/v4l2-subdev.cSat Nov 29 18:22:37 2008 +0100
&lt; at &gt;&lt; at &gt; -0,0 +1,108 &lt; at &gt;&lt; at &gt;
+/*
+    V4L2 sub-device support.
+
+    Copyright (C) 2008  Hans Verkuil &lt;hverkuil&lt; at &gt;xs4all.nl&gt;
+
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation; either version 2 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program; if not, write to the Free Software
+    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ */
+
+#include &lt;linux/types.h&gt;
+#include &lt;linux/ioctl.h&gt;
+#include &lt;linux/i2c.h&gt;
+#include &lt;linux/videodev2.h&gt;
+#include &lt;media/v4l2-subdev.h&gt;
+
+int v4l2_subdev_command(struct v4l2_subdev *sd, unsigned cmd, void *arg)
+{
+switch (cmd) {
+case VIDIOC_QUERYCTRL:
+return v4l2_subdev_call(sd, core, querymenu, arg);
+case VIDIOC_G_CTRL:
+return v4l2_subdev_call(sd, core, g_ctrl, arg);
+case VIDIOC_S_CTRL:
+return v4l2_subdev_call(sd, core, s_ctrl, arg);
+case VIDIOC_QUERYMENU:
+return v4l2_subdev_call(sd, core, queryctrl, arg);
+case VIDIOC_LOG_STATUS:
+return v4l2_subdev_call(sd, core, log_status);
+case VIDIOC_G_CHIP_IDENT:
+return v4l2_subdev_call(sd, core, g_chip_ident, arg);
+case VIDIOC_INT_S_STANDBY:
+return v4l2_subdev_call(sd, core, s_standby, *(u32 *)arg);
+case VIDIOC_INT_RESET:
+return v4l2_subdev_call(sd, core, reset, *(u32 *)arg);
+case VIDIOC_INT_S_GPIO:
+return v4l2_subdev_call(sd, core, s_gpio, *(u32 *)arg);
+case VIDIOC_INT_INIT:
+return v4l2_subdev_call(sd, core, init, *(u32 *)arg);
+#ifdef CONFIG_VIDEO_ADV_DEBUG
+case VIDIOC_DBG_G_REGISTER:
+return v4l2_subdev_call(sd, core, g_register, arg);
+case VIDIOC_DBG_S_REGISTER:
+return v4l2_subdev_call(sd, core, s_register, arg);
+#endif
+
+case VIDIOC_INT_S_TUNER_MODE:
+return v4l2_subdev_call(sd, tuner, s_mode, *(enum v4l2_tuner_type *)arg);
+case AUDC_SET_RADIO:
+return v4l2_subdev_call(sd, tuner, s_radio);
+case VIDIOC_S_TUNER:
+return v4l2_subdev_call(sd, tuner, s_tuner, arg);
+case VIDIOC_G_TUNER:
+return v4l2_subdev_call(sd, tuner, g_tuner, arg);
+case VIDIOC_S_STD:
+return v4l2_subdev_call(sd, tuner, s_std, *(v4l2_std_id *)arg);
+case VIDIOC_S_FREQUENCY:
+return v4l2_subdev_call(sd, tuner, s_frequency, arg);
+case VIDIOC_G_FREQUENCY:
+return v4l2_subdev_call(sd, tuner, g_frequency, arg);
+case TUNER_SET_TYPE_ADDR:
+return v4l2_subdev_call(sd, tuner, s_type_addr, arg);
+case TUNER_SET_CONFIG:
+return v4l2_subdev_call(sd, tuner, s_config, arg);
+
+case VIDIOC_INT_AUDIO_CLOCK_FREQ:
+return v4l2_subdev_call(sd, audio, s_clock_freq, *(u32 *)arg);
+case VIDIOC_INT_S_AUDIO_ROUTING:
+return v4l2_subdev_call(sd, audio, s_routing, arg);
+case VIDIOC_INT_I2S_CLOCK_FREQ:
+return v4l2_subdev_call(sd, audio, s_i2s_clock_freq, *(u32 *)arg);
+
+case VIDIOC_INT_S_VIDEO_ROUTING:
+return v4l2_subdev_call(sd, video, s_routing, arg);
+case VIDIOC_INT_S_CRYSTAL_FREQ:
+return v4l2_subdev_call(sd, video, s_crystal_freq, arg);
+case VIDIOC_INT_DECODE_VBI_LINE:
+return v4l2_subdev_call(sd, video, decode_vbi_line, arg);
+case VIDIOC_INT_S_VBI_DATA:
+return v4l2_subdev_call(sd, video, s_vbi_data, arg);
+case VIDIOC_INT_G_VBI_DATA:
+return v4l2_subdev_call(sd, video, g_vbi_data, arg);
+case VIDIOC_S_FMT:
+return v4l2_subdev_call(sd, video, s_fmt, arg);
+case VIDIOC_G_FMT:
+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_STREAMON:
+return v4l2_subdev_call(sd, video, s_stream, 1);
+case VIDIOC_STREAMOFF:
+return v4l2_subdev_call(sd, video, s_stream, 0);
+
+default:
+return v4l2_subdev_call(sd, core, ioctl, cmd, arg);
+}
+}
+EXPORT_SYMBOL(v4l2_subdev_command);
diff -r 7100e78482d7 -r 719584d5989d linux/include/media/v4l2-device.h
--- /dev/nullThu Jan 01 00:00:00 1970 +0000
+++ b/linux/include/media/v4l2-device.hSat Nov 29 18:22:37 2008 +0100
&lt; at &gt;&lt; at &gt; -0,0 +1,109 &lt; at &gt;&lt; at &gt;
+/*
+    V4L2 device support header.
+
+    Copyright (C) 2008  Hans Verkuil &lt;hverkuil&lt; at &gt;xs4all.nl&gt;
+
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation; either version 2 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program; if not, write to the Free Software
+    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ */
+
+#ifndef _V4L2_DEVICE_H
+#define _V4L2_DEVICE_H
+
+#include &lt;media/v4l2-subdev.h&gt;
+
+/* Each instance of a V4L2 device should create the v4l2_device struct,
+   either stand-alone or embedded in a larger struct.
+
+   It allows easy access to sub-devices (see v4l2-subdev.h) and provides
+   basic V4L2 device-level support.
+ */
+
+#define V4L2_DEVICE_NAME_SIZE (BUS_ID_SIZE + 16)
+
+struct v4l2_device {
+/* dev-&gt;driver_data points to this struct */
+struct device *dev;
+/* used to keep track of the registered subdevs */
+struct list_head subdevs;
+/* lock this struct; can be used by the driver as well if this
+   struct is embedded into a larger struct. */
+spinlock_t lock;
+/* unique device name, by default the driver name + bus ID */
+char name[V4L2_DEVICE_NAME_SIZE];
+};
+
+/* Initialize v4l2_dev and make dev-&gt;driver_data point to v4l2_dev */
+void v4l2_device_register(struct device *dev, struct v4l2_device *v4l2_dev);
+/* Set v4l2_dev-&gt;dev-&gt;driver_data to NULL and unregister all sub-devices */
+void v4l2_device_unregister(struct v4l2_device *v4l2_dev);
+
+/* Register a subdev with a v4l2 device. While registered the subdev module
+   is marked as in-use. An error is returned if the module is no longer
+   loaded when you attempt to register it. */
+int v4l2_device_register_subdev(struct v4l2_device *dev, struct v4l2_subdev *sd);
+/* Unregister a subdev with a v4l2 device. Can also be called if the subdev
+   wasn't registered. In that case it will do nothing. */
+void v4l2_device_unregister_subdev(struct v4l2_subdev *sd);
+
+/* Iterate over all subdevs. The next item is prefetched, so you can
+   delete the current item if necessary. */
+#define v4l2_device_for_each_subdev(sd, dev)\
+for (sd = list_entry((dev)-&gt;subdevs.next, typeof(*sd), list); \
+prefetch(sd-&gt;list.next), &amp;sd-&gt;list != &amp;(dev)-&gt;subdevs; \
+     sd = list_entry(sd-&gt;list.next, typeof(*sd), list))
+
+/* Call the specified callback for all subdevs matching the condition.
+   Ignore any errors. */
+#define __v4l2_device_call_subdevs(dev, cond, o, f, args...) \
+do { \
+struct v4l2_subdev *sd; \
+\
+list_for_each_entry(sd, &amp;(dev)-&gt;subdevs, list)   \
+if ((cond) &amp;&amp; sd-&gt;ops-&gt;o &amp;&amp; sd-&gt;ops-&gt;o-&gt;f) \
+sd-&gt;ops-&gt;o-&gt;f(sd , ##args); \
+} while (0)
+
+/* Call the specified callback for all subdevs matching the condition.
+   If the callback returns an error other than 0 or -ENOIOCTLCMD, then
+   return with that error code. */
+#define __v4l2_device_call_subdevs_until_err(dev, cond, o, f, args...)  \
+({ \
+struct v4l2_subdev *sd; \
+int err = 0; \
+\
+list_for_each_entry(sd, &amp;(dev)-&gt;subdevs, list) { \
+if ((cond) &amp;&amp; sd-&gt;ops-&gt;o &amp;&amp; sd-&gt;ops-&gt;o-&gt;f) \
+err = sd-&gt;ops-&gt;o-&gt;f(sd , ##args); \
+if (err &amp;&amp; err != -ENOIOCTLCMD)\
+break; \
+} \
+(err == -ENOIOCTLCMD) ? 0 : err; \
+})
+
+/* Call the specified callback for all subdevs matching grp_id (if 0, then
+   match them all). Ignore any errors. */
+#define v4l2_device_call_all(dev, grp_id, o, f, args...) \
+__v4l2_device_call_subdevs(dev, \
+!(grp_id) || sd-&gt;grp_id == (grp_id), 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. */
+#define v4l2_device_call_until_err(dev, grp_id, o, f, args...) \
+__v4l2_device_call_subdevs_until_err(dev,\
+       !(grp_id) || sd-&gt;grp_id == (grp_id), o, f , ##args)
+
+#endif
diff -r 7100e78482d7 -r 719584d5989d linux/include/media/v4l2-subdev.h
--- /dev/nullThu Jan 01 00:00:00 1970 +0000
+++ b/linux/include/media/v4l2-subdev.hSat Nov 29 18:22:37 2008 +0100
&lt; at &gt;&lt; at &gt; -0,0 +1,188 &lt; at &gt;&lt; at &gt;
+/*
+    V4L2 sub-device support header.
+
+    Copyright (C) 2008  Hans Verkuil &lt;hverkuil&lt; at &gt;xs4all.nl&gt;
+
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation; either version 2 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program; if not, write to the Free Software
+    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ */
+
+#ifndef _V4L2_SUBDEV_H
+#define _V4L2_SUBDEV_H
+
+#include &lt;media/v4l2-common.h&gt;
+
+struct v4l2_device;
+struct v4l2_subdev;
+struct tuner_setup;
+
+/* Sub-devices are devices that are connected somehow to the main bridge
+   device. These devices are usually audio/video muxers/encoders/decoders or
+   sensors and webcam controllers.
+
+   Usually these devices are controlled through an i2c bus, but other busses
+   may also be used.
+
+   The v4l2_subdev struct provides a way of accessing these devices in a
+   generic manner. Most operations that these sub-devices support fall in
+   a few categories: core ops, audio ops, video ops and tuner ops.
+
+   More categories can be added if needed, although this should remain a
+   limited set (no more than approx. 8 categories).
+
+   Each category has its own set of ops that subdev drivers can implement.
+
+   A subdev driver can leave the pointer to the category ops NULL if
+   it does not implement them (e.g. an audio subdev will generally not
+   implement the video category ops). The exception is the core category:
+   this must always be present.
+
+   These ops are all used internally so it is no problem to change, remove
+   or add ops or move ops from one to another category. Currently these
+   ops are based on the original ioctls, but since ops are not limited to
+   one argument there is room for improvement here once all i2c subdev
+   drivers are converted to use these ops.
+ */
+
+/* Core ops: it is highly recommended to implement at least these ops:
+
+   g_chip_ident
+   log_status
+   g_register
+   s_register
+
+   This provides basic debugging support.
+
+   The ioctl ops is meant for generic ioctl-like commands. Depending on
+   the use-case it might be better to use subdev-specific ops (currently
+   not yet implemented) since ops provide proper type-checking.
+ */
+struct v4l2_subdev_core_ops {
+int (*g_chip_ident)(struct v4l2_subdev *sd, struct v4l2_chip_ident *chip);
+int (*log_status)(struct v4l2_subdev *sd);
+int (*init)(struct v4l2_subdev *sd, u32 val);
+int (*s_standby)(struct v4l2_subdev *sd, u32 standby);
+int (*reset)(struct v4l2_subdev *sd, u32 val);
+int (*s_gpio)(struct v4l2_subdev *sd, u32 val);
+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 (*querymenu)(struct v4l2_subdev *sd, struct v4l2_querymenu *qm);
+int (*ioctl)(struct v4l2_subdev *sd, int cmd, void *arg);
+#ifdef CONFIG_VIDEO_ADV_DEBUG
+int (*g_register)(struct v4l2_subdev *sd, struct v4l2_register *reg);
+int (*s_register)(struct v4l2_subdev *sd, struct v4l2_register *reg);
+#endif
+};
+
+struct v4l2_subdev_tuner_ops {
+int (*s_mode)(struct v4l2_subdev *sd, enum v4l2_tuner_type);
+int (*s_radio)(struct v4l2_subdev *sd);
+int (*s_frequency)(struct v4l2_subdev *sd, struct v4l2_frequency *freq);
+int (*g_frequency)(struct v4l2_subdev *sd, struct v4l2_frequency *freq);
+int (*g_tuner)(struct v4l2_subdev *sd, struct v4l2_tuner *vt);
+int (*s_tuner)(struct v4l2_subdev *sd, struct v4l2_tuner *vt);
+int (*s_std)(struct v4l2_subdev *sd, v4l2_std_id norm);
+int (*s_type_addr)(struct v4l2_subdev *sd, struct tuner_setup *type);
+int (*s_config)(struct v4l2_subdev *sd, const struct v4l2_priv_tun_config *config);
+};
+
+struct v4l2_subdev_audio_ops {
+int (*s_clock_freq)(struct v4l2_subdev *sd, u32 freq);
+int (*s_i2s_clock_freq)(struct v4l2_subdev *sd, u32 freq);
+int (*s_routing)(struct v4l2_subdev *sd, const struct v4l2_routing *route);
+};
+
+struct v4l2_subdev_video_ops {
+int (*s_routing)(struct v4l2_subdev *sd, const struct v4l2_routing *route);
+int (*s_crystal_freq)(struct v4l2_subdev *sd, struct v4l2_crystal_freq *freq);
+int (*decode_vbi_line)(struct v4l2_subdev *sd, struct v4l2_decode_vbi_line *vbi_line);
+int (*s_vbi_data)(struct v4l2_subdev *sd, const struct v4l2_sliced_vbi_data *vbi_data);
+int (*g_vbi_data)(struct v4l2_subdev *sd, struct v4l2_sliced_vbi_data *vbi_data);
+int (*s_std_output)(struct v4l2_subdev *sd, v4l2_std_id std);
+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);
+};
+
+struct v4l2_subdev_ops {
+const struct v4l2_subdev_core_ops  *core;
+const struct v4l2_subdev_tuner_ops *tuner;
+const struct v4l2_subdev_audio_ops *audio;
+const struct v4l2_subdev_video_ops *video;
+};
+
+#define V4L2_SUBDEV_NAME_SIZE 32
+
+/* Each instance of a subdev driver should create this struct, either
+   stand-alone or embedded in a larger struct.
+ */
+struct v4l2_subdev {
+struct list_head list;
+struct module *owner;
+struct v4l2_device *dev;
+const struct v4l2_subdev_ops *ops;
+/* name must be unique */
+char name[V4L2_SUBDEV_NAME_SIZE];
+/* can be used to group similar subdevs, value is driver-specific */
+u32 grp_id;
+/* pointer to private data */
+void *priv;
+};
+
+static inline void v4l2_set_subdevdata(struct v4l2_subdev *sd, void *p)
+{
+sd-&gt;priv = p;
+}
+
+static inline void *v4l2_get_subdevdata(const struct v4l2_subdev *sd)
+{
+return sd-&gt;priv;
+}
+
+/* Convert an ioctl-type command to the proper v4l2_subdev_ops function call.
+   This is used by subdev modules that can be called by both old-style ioctl
+   commands and through the v4l2_subdev_ops.
+
+   The ioctl API of the subdev driver can call this function to call the
+   right ops based on the ioctl cmd and arg.
+
+   Once all subdev drivers have been converted and all drivers no longer
+   use the ioctl interface, then this function can be removed.
+ */
+int v4l2_subdev_command(struct v4l2_subdev *sd, unsigned cmd, void *arg);
+
+static inline void v4l2_subdev_init(struct v4l2_subdev *sd,
+const struct v4l2_subdev_ops *ops)
+{
+INIT_LIST_HEAD(&amp;sd-&gt;list);
+/* ops-&gt;core MUST be set */
+BUG_ON(!ops || !ops-&gt;core);
+sd-&gt;ops = ops;
+sd-&gt;dev = NULL;
+sd-&gt;name[0] = '\0';
+sd-&gt;grp_id = 0;
+sd-&gt;priv = NULL;
+}
+
+/* Call an ops of a v4l2_subdev, doing the right checks against
+   NULL pointers.
+
+   Example: err = v4l2_subdev_call(sd, core, g_chip_ident, &amp;chip);
+ */
+#define v4l2_subdev_call(sd, o, f, args...)\
+(!(sd) ? -ENODEV : (((sd) &amp;&amp; (sd)-&gt;ops-&gt;o &amp;&amp; (sd)-&gt;ops-&gt;o-&gt;f) ?\
+(sd)-&gt;ops-&gt;o-&gt;f((sd) , ##args) : -ENOIOCTLCMD))
+
+#endif


</description>
    <dc:creator>Hans Verkuil</dc:creator>
    <dc:date>2008-11-29T17:52:41</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.video.video4linux/41151">
    <title>FM transmitter support under v4l2?</title>
    <link>http://comments.gmane.org/gmane.comp.video.video4linux/41151</link>
    <description>Hi,

Anybody working on FM transmitter related drivers support under v4l2?
If no, what parts of v4l2 which could be tweaked in right order to
support such devices? I see that SI471x series seem to have FM
transmitters too.

</description>
    <dc:creator>Trilok Soni</dc:creator>
    <dc:date>2008-11-29T07:12:51</dc:date>
  </item>
  <textinput about="http://search.gmane.org/?group=$group=gmane.comp.video.video4linux">
    <title>Search Engine</title>
    <description>Search the mailing list at Gmane</description>
    <name>query</name>
    <link>http://search.gmane.org/?group=$group=gmane.comp.video.video4linux</link>
  </textinput>
</rdf:RDF>
