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 @@
 <constant>VIDIOC_S_STD</constant> parameter was unsuitable.</para>
        </listitem>
       </varlistentry>
+      <varlistentry>
+       <term><errorcode>EBUSY</errorcode></term>
+       <listitem>
+         <para>The 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 @@
          <para>This ioctl is not supported.</para>
        </listitem>
       </varlistentry>
+      <varlistentry>
+       <term><errorcode>EBUSY</errorcode></term>
+       <listitem>
+         <para>The 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,
                           unsigned int hmax, unsigned int halign,
                           unsigned int salign);
-
+int v4l_fill_dv_preset_info(u32 preset, struct v4l2_dv_enum_preset *info);
 #endif /* V4L2_COMMON_H_ */


---

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

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

Reply via email to