<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/staging/easycap, branch v3.1</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v3.1</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v3.1'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2011-07-08T21:02:26Z</updated>
<entry>
<title>staging/easycap: remove oss support</title>
<updated>2011-07-08T21:02:26Z</updated>
<author>
<name>Tomas Winkler</name>
<email>tomas.winkler@intel.com</email>
</author>
<published>2011-07-07T17:45:46Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=73019286cddc8bba1773944a7b6b603137fd66ff'/>
<id>urn:sha1:73019286cddc8bba1773944a7b6b603137fd66ff</id>
<content type='text'>
remove support for OSS. OSS is being deprecated
and it is just plain headache to support both alsa and oss.

Last I broke the compilation when OSS is enabled with the patch
cdaa898b5efcc598ab1004e8f913061dc7005091
staging/easycap: kill telltale logic

so this fixes also that issue.

Cc: Mike Thomas &lt;rmthomas@sciolus.org&gt;
Signed-off-by: Tomas Winkler &lt;tomas.winkler@intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
</content>
</entry>
<entry>
<title>staging/easycap: remove unused macro MICROSECONDS</title>
<updated>2011-07-08T21:02:25Z</updated>
<author>
<name>Tomas Winkler</name>
<email>tomas.winkler@intel.com</email>
</author>
<published>2011-07-07T17:45:45Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=808a3b5f9b1deb7e449765192a0315e2da904553'/>
<id>urn:sha1:808a3b5f9b1deb7e449765192a0315e2da904553</id>
<content type='text'>
Cc: Mike Thomas &lt;rmthomas@sciolus.org&gt;
Signed-off-by: Tomas Winkler &lt;tomas.winkler@intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
</content>
</entry>
<entry>
<title>staging/easycap: kill telltale logic</title>
<updated>2011-07-06T02:47:46Z</updated>
<author>
<name>Tomas Winkler</name>
<email>tomas.winkler@intel.com</email>
</author>
<published>2011-07-05T18:07:47Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=cdaa898b5efcc598ab1004e8f913061dc7005091'/>
<id>urn:sha1:cdaa898b5efcc598ab1004e8f913061dc7005091</id>
<content type='text'>
This reason for this feature was

'some versions of the videodev module overwrite the data which has
been written by the call to usb_set_intfdata() in easycap_usb_probe(),
replacing it with a pointer to the embedded v4l2_device structure.
to detect this, the string in the easycap.telltale[] buffer is checked.'

The upstream version of v4l2_device_register sets driver data
only when it wasn't already set, therefore this is not needed

Signed-off-by: Tomas Winkler &lt;tomas.winkler@intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
</content>
</entry>
<entry>
<title>Remove unneeded version.h includes (and add where needed) for drivers/staging/easycap/</title>
<updated>2011-07-05T17:39:39Z</updated>
<author>
<name>Jesper Juhl</name>
<email>jj@chaosbits.net</email>
</author>
<published>2011-06-23T22:51:12Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=0de7586a11890b9fbf1cfc119adf2ba59841f41e'/>
<id>urn:sha1:0de7586a11890b9fbf1cfc119adf2ba59841f41e</id>
<content type='text'>
It was pointed out by 'make versioncheck' that linux/version.h was not
always being included where needed and sometimes included needlessly
in drivers/staging/easycap/.
This patch fixes up the includes.

Signed-off-by: Jesper Juhl &lt;jj@chaosbits.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
</content>
</entry>
<entry>
<title>staging/easycap: Fix bytesperline calculation</title>
<updated>2011-07-05T17:26:16Z</updated>
<author>
<name>Kirill Smelkov</name>
<email>kirr@mns.spb.ru</email>
</author>
<published>2011-06-13T12:18:32Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=378af483331d429bff3318e69f4ff5534f92c750'/>
<id>urn:sha1:378af483331d429bff3318e69f4ff5534f92c750</id>
<content type='text'>
As described above fillin_formats()

"""
    /*
     *  THE 16-BIT easycap_format.mask HAS MEANING:
     *    (least significant) BIT  0:     0 =&gt; PAL, 25 FPS;   1 =&gt; NTSC, 30 FPS
     *                        BITS 2-4:   RESERVED FOR DIFFERENTIATING STANDARDS
     *                        BITS 5-7:   NUMBER OF BYTES PER PIXEL
     *                        BIT  8:     0 =&gt; NATIVE BYTE ORDER;  1 =&gt; SWAPPED
     *                        BITS 9-10:  RESERVED FOR OTHER BYTE PERMUTATIONS
     *                        BIT 11:     0 =&gt; UNDECIMATED;    1 =&gt; DECIMATED
     *                        BIT 12:     0 =&gt; OFFER FRAMES;   1 =&gt; OFFER FIELDS
     *                        BIT 13:     0 =&gt; FULL FRAMERATE; 1 =&gt; REDUCED
     *     (most significant) BITS 14-15: RESERVED FOR OTHER FIELD/FRAME OPTIONS
     *  IT FOLLOWS THAT:
     *     bytesperpixel IS         ((0x00E0 &amp; easycap_format.mask) &gt;&gt; 5)
     *     byteswaporder IS true IF (0 != (0x0100 &amp; easycap_format.mask))
     *
     *     decimatepixel IS true IF (0 != (0x0800 &amp; easycap_format.mask))
     *
     *       offerfields IS true IF (0 != (0x1000 &amp; easycap_format.mask))
     */
"""

bytes-per-pixel is stored in bits 5-7 of calculated mask.

But when calculating bytes-per-line we were extracting wrong value
instead of bytes-per-pixel, which was usually 2 times bigger -- e.g. for
PAL YUV 422 I was getting ((mask3 &amp; 0x00F0) &gt;&gt; 4) = 4 bytes instead of 2.

The error here is that even in comments there is a line saying

     *     bytesperpixel IS         ((0x00E0 &amp; easycap_format.mask) &gt;&gt; 5)

but we were using
                                    ((0x00F0 &amp; easycap_format.mask) &gt;&gt; 4)

With 2 times bigger bytesperpixel and automatically bytesperline, the
video was shown halfheight'ed, which is understandable if we look at
video-memory layout:

    &lt;------- bytesperline --------&gt;
    &lt;- real bpl -&gt;

    x0----------y0  x1-----------y1
    x2----------y2  x3-----------y3

    xn----------yn  xn-----------yn
    &lt;garbage&gt;

for each line, we should display width pixels, then move to next line
with bytesperline, and oops, if bytesperline = 2*real-bytesperlin, we'll
skip one line and move to next-next line, and so only half lines will be
shown.

Initially I've debugged the problem with my video application[1], but
I've checked that after this patch both rawv (mine app) and tvtime work
correctly.

[1] http://repo.or.cz/w/rawv.git

P.S. why at all we use those mask/shifts? Why not use bitfields?

Cc: Mike Thomas &lt;rmthomas@sciolus.org&gt;
Signed-off-by: Kirill Smelkov &lt;kirr@mns.spb.ru&gt;
Acked-by:  Tomas Winkler &lt;tomas.winkler@intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
</content>
</entry>
<entry>
<title>staging/easycap: PAGE_SIZE is always defined</title>
<updated>2011-07-05T17:26:16Z</updated>
<author>
<name>Kirill Smelkov</name>
<email>kirr@mns.spb.ru</email>
</author>
<published>2011-06-13T12:18:31Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=59204031dd85d35cada46f00a7ea33f3e51414c4'/>
<id>urn:sha1:59204031dd85d35cada46f00a7ea33f3e51414c4</id>
<content type='text'>
I'm not 100% sure, only 99.99% that PAGE_SIZE is always defined in
Linux. So there is no need to check for it.

Cc: Mike Thomas &lt;rmthomas@sciolus.org&gt;
Signed-off-by: Kirill Smelkov &lt;kirr@mns.spb.ru&gt;
Acked-by: Tomas Winkler &lt;tomas.winkler@intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
</content>
</entry>
<entry>
<title>staging/easycap: There is no need to support V4L1 ioctls</title>
<updated>2011-07-05T17:26:16Z</updated>
<author>
<name>Kirill Smelkov</name>
<email>kirr@mns.spb.ru</email>
</author>
<published>2011-06-13T12:18:30Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=bad269262cbe193f6abe701d1f564e1fa492d050'/>
<id>urn:sha1:bad269262cbe193f6abe701d1f564e1fa492d050</id>
<content type='text'>
Because V4L1 was completly removed from the kernel in 2.6.38. See e.g.

08af245d ([media] V4L: remove V4L1 compatibility mode).

Cc: Mike Thomas &lt;rmthomas@sciolus.org&gt;
Signed-off-by: Kirill Smelkov &lt;kirr@mns.spb.ru&gt;
Acked-by: Tomas Winkler &lt;tomas.winkler@intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
</content>
</entry>
<entry>
<title>staging/easycap: Fix thinko in "bars" module option description</title>
<updated>2011-07-05T17:26:16Z</updated>
<author>
<name>Kirill Smelkov</name>
<email>kirr@mns.spb.ru</email>
</author>
<published>2011-06-14T16:46:49Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=eb4cfaba5470e29d3c035390c538fca98d3322c4'/>
<id>urn:sha1:eb4cfaba5470e29d3c035390c538fca98d3322c4</id>
<content type='text'>
Both bars=0 and bars=1 were described as meaning to display bars on
signal lost. Actually bars=1 means "display bars", but bars=0 means
display raw source as is (usually black screen).

Instead of changing bars=0 to "_no_ testcard bars ..." as suggested by
Dan Carpenter reword the whole bars description for clarity.

Cc: Mike Thomas &lt;rmthomas@sciolus.org&gt;
Cc: Dan Carpenter &lt;error27@gmail.com&gt;
Signed-off-by: Kirill Smelkov &lt;kirr@mns.spb.ru&gt;
Acked-by: Tomas Winkler &lt;tomas.winkler@intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
</content>
</entry>
<entry>
<title>staging/easycap: Kill leftover build options in readme</title>
<updated>2011-07-05T17:26:16Z</updated>
<author>
<name>Kirill Smelkov</name>
<email>kirr@mns.spb.ru</email>
</author>
<published>2011-06-13T12:18:28Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=3efad93d39f7f26fe8ab1227aed09cb0dfd9edad'/>
<id>urn:sha1:3efad93d39f7f26fe8ab1227aed09cb0dfd9edad</id>
<content type='text'>
The following options were removed from in-tree driver, but were left
in README:

- EASYCAP_IS_VIDEODEV_CLIENT was removed in cb81fa07 (staging/easycap:
  kill EASYCAP_IS_VIDEODEV_CLIENT compilation conditional);

- EASYCAP_NEEDS_V4L2_DEVICE_H/EASYCAP_NEEDS_V4L2_FOPS were removed in
  30516058 (staging/easycap: kill EASYCAP_NEEDS_V4L2_DEVICE_H and
  EASYCAP_NEEDS_V4L2_FOPS);

- EASYCAP_NEEDS_UNLOCKED_IOCTL was removed in f2b3c685 (staging/easycap:
  kill EASYCAP_NEEDS_UNLOCKED_IOCTL).

Remove them.

Cc: Mike Thomas &lt;rmthomas@sciolus.org&gt;
Signed-off-by: Kirill Smelkov &lt;kirr@mns.spb.ru&gt;
Acked-by: Tomas Winkler &lt;tomas.winkler@intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
</content>
</entry>
<entry>
<title>Staging: easycap: use after free in easycap_delete()</title>
<updated>2011-07-05T17:22:50Z</updated>
<author>
<name>Dan Carpenter</name>
<email>error27@gmail.com</email>
</author>
<published>2011-06-17T10:25:09Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=38d0cffefd3daaad6bc58a6212d16edeaa8ee1f0'/>
<id>urn:sha1:38d0cffefd3daaad6bc58a6212d16edeaa8ee1f0</id>
<content type='text'>
The JOM() macro dereferences peasycap, so I moved the free down some
lines.

Signed-off-by: Dan Carpenter &lt;error27@gmail.com&gt;
Acked-by: Tomas Winkler &lt;tomas.winkler@intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
</content>
</entry>
</feed>
