<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/drivers/media/usb, branch v3.10.71</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>lmedm04: Fix usb_submit_urb BOGUS urb xfer, pipe 1 != type 3 in interrupt urb</title>
<updated>2015-03-06T22:40:48+00:00</updated>
<author>
<name>Malcolm Priestley</name>
<email>tvboxspy@gmail.com</email>
</author>
<published>2015-01-02T13:56:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=4cf981513778209b86dc90ec8fb479929aef8d50'/>
<id>4cf981513778209b86dc90ec8fb479929aef8d50</id>
<content type='text'>
commit 15e1ce33182d1d5dbd8efe8d382b9352dc857527 upstream.

A quirk of some older firmwares that report endpoint pipe type as PIPE_BULK
but the endpoint otheriwse functions as interrupt.

Check if usb_endpoint_type is USB_ENDPOINT_XFER_BULK and set as usb_rcvbulkpipe.

Signed-off-by: Malcolm Priestley &lt;tvboxspy@gmail.com&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@osg.samsung.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 15e1ce33182d1d5dbd8efe8d382b9352dc857527 upstream.

A quirk of some older firmwares that report endpoint pipe type as PIPE_BULK
but the endpoint otheriwse functions as interrupt.

Check if usb_endpoint_type is USB_ENDPOINT_XFER_BULK and set as usb_rcvbulkpipe.

Signed-off-by: Malcolm Priestley &lt;tvboxspy@gmail.com&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@osg.samsung.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>uvcvideo: Fix destruction order in uvc_delete()</title>
<updated>2015-01-27T15:52:32+00:00</updated>
<author>
<name>Takashi Iwai</name>
<email>tiwai@suse.de</email>
</author>
<published>2014-10-24T08:10:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=555d980eb3e6b0b49e11d475be4d356346eda099'/>
<id>555d980eb3e6b0b49e11d475be4d356346eda099</id>
<content type='text'>
commit 2228d80dd05a4fc5a410fde847677b8fb3eb23d7 upstream.

We've got a bug report at disconnecting a Webcam, where the kernel
spews warnings like below:
  WARNING: CPU: 0 PID: 8385 at ../fs/sysfs/group.c:219 sysfs_remove_group+0x87/0x90()
  sysfs group c0b2350c not found for kobject 'event3'
  CPU: 0 PID: 8385 Comm: queue2:src Not tainted 3.16.2-1.gdcee397-default #1
  Hardware name: ASUSTeK Computer INC. A7N8X-E/A7N8X-E, BIOS ASUS A7N8X-E Deluxe ACPI BIOS Rev 1013  11/12/2004
    c08d0705 ddc75cbc c0718c5b ddc75ccc c024b654 c08c6d44 ddc75ce8 000020c1
    c08d0705 000000db c03d1ec7 c03d1ec7 00000009 00000000 c0b2350c d62c9064
    ddc75cd4 c024b6a3 00000009 ddc75ccc c08c6d44 ddc75ce8 ddc75cfc c03d1ec7
  Call Trace:
    [&lt;c0205ba6&gt;] try_stack_unwind+0x156/0x170
    [&lt;c02046f3&gt;] dump_trace+0x53/0x180
    [&lt;c0205c06&gt;] show_trace_log_lvl+0x46/0x50
    [&lt;c0204871&gt;] show_stack_log_lvl+0x51/0xe0
    [&lt;c0205c67&gt;] show_stack+0x27/0x50
    [&lt;c0718c5b&gt;] dump_stack+0x3e/0x4e
    [&lt;c024b654&gt;] warn_slowpath_common+0x84/0xa0
    [&lt;c024b6a3&gt;] warn_slowpath_fmt+0x33/0x40
    [&lt;c03d1ec7&gt;] sysfs_remove_group+0x87/0x90
    [&lt;c05a2c54&gt;] device_del+0x34/0x180
    [&lt;c05e3989&gt;] evdev_disconnect+0x19/0x50
    [&lt;c05e06fa&gt;] __input_unregister_device+0x9a/0x140
    [&lt;c05e0845&gt;] input_unregister_device+0x45/0x80
    [&lt;f854b1d6&gt;] uvc_delete+0x26/0x110 [uvcvideo]
    [&lt;f84d66f8&gt;] v4l2_device_release+0x98/0xc0 [videodev]
    [&lt;c05a25bb&gt;] device_release+0x2b/0x90
    [&lt;c04ad8bf&gt;] kobject_cleanup+0x6f/0x1a0
    [&lt;f84d5453&gt;] v4l2_release+0x43/0x70 [videodev]
    [&lt;c0372f31&gt;] __fput+0xb1/0x1b0
    [&lt;c02650c1&gt;] task_work_run+0x91/0xb0
    [&lt;c024d845&gt;] do_exit+0x265/0x910
    [&lt;c024df64&gt;] do_group_exit+0x34/0xa0
    [&lt;c025a76f&gt;] get_signal_to_deliver+0x17f/0x590
    [&lt;c0201b6a&gt;] do_signal+0x3a/0x960
    [&lt;c02024f7&gt;] do_notify_resume+0x67/0x90
    [&lt;c071ebb5&gt;] work_notifysig+0x30/0x3b
    [&lt;b7739e60&gt;] 0xb7739e5f
   ---[ end trace b1e56095a485b631 ]---

The cause is that uvc_status_cleanup() is called after usb_put_*() in
uvc_delete().  usb_put_*() removes the sysfs parent and eventually
removes the children recursively, so the later device_del() can't find
its sysfs.  The fix is simply rearrange the call orders in
uvc_delete() so that the child is removed before the parent.

Bugzilla: https://bugzilla.suse.com/show_bug.cgi?id=897736
Reported-and-tested-by: Martin Pluskal &lt;mpluskal@suse.com&gt;

Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
Signed-off-by: Laurent Pinchart &lt;laurent.pinchart@ideasonboard.com&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@osg.samsung.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 2228d80dd05a4fc5a410fde847677b8fb3eb23d7 upstream.

We've got a bug report at disconnecting a Webcam, where the kernel
spews warnings like below:
  WARNING: CPU: 0 PID: 8385 at ../fs/sysfs/group.c:219 sysfs_remove_group+0x87/0x90()
  sysfs group c0b2350c not found for kobject 'event3'
  CPU: 0 PID: 8385 Comm: queue2:src Not tainted 3.16.2-1.gdcee397-default #1
  Hardware name: ASUSTeK Computer INC. A7N8X-E/A7N8X-E, BIOS ASUS A7N8X-E Deluxe ACPI BIOS Rev 1013  11/12/2004
    c08d0705 ddc75cbc c0718c5b ddc75ccc c024b654 c08c6d44 ddc75ce8 000020c1
    c08d0705 000000db c03d1ec7 c03d1ec7 00000009 00000000 c0b2350c d62c9064
    ddc75cd4 c024b6a3 00000009 ddc75ccc c08c6d44 ddc75ce8 ddc75cfc c03d1ec7
  Call Trace:
    [&lt;c0205ba6&gt;] try_stack_unwind+0x156/0x170
    [&lt;c02046f3&gt;] dump_trace+0x53/0x180
    [&lt;c0205c06&gt;] show_trace_log_lvl+0x46/0x50
    [&lt;c0204871&gt;] show_stack_log_lvl+0x51/0xe0
    [&lt;c0205c67&gt;] show_stack+0x27/0x50
    [&lt;c0718c5b&gt;] dump_stack+0x3e/0x4e
    [&lt;c024b654&gt;] warn_slowpath_common+0x84/0xa0
    [&lt;c024b6a3&gt;] warn_slowpath_fmt+0x33/0x40
    [&lt;c03d1ec7&gt;] sysfs_remove_group+0x87/0x90
    [&lt;c05a2c54&gt;] device_del+0x34/0x180
    [&lt;c05e3989&gt;] evdev_disconnect+0x19/0x50
    [&lt;c05e06fa&gt;] __input_unregister_device+0x9a/0x140
    [&lt;c05e0845&gt;] input_unregister_device+0x45/0x80
    [&lt;f854b1d6&gt;] uvc_delete+0x26/0x110 [uvcvideo]
    [&lt;f84d66f8&gt;] v4l2_device_release+0x98/0xc0 [videodev]
    [&lt;c05a25bb&gt;] device_release+0x2b/0x90
    [&lt;c04ad8bf&gt;] kobject_cleanup+0x6f/0x1a0
    [&lt;f84d5453&gt;] v4l2_release+0x43/0x70 [videodev]
    [&lt;c0372f31&gt;] __fput+0xb1/0x1b0
    [&lt;c02650c1&gt;] task_work_run+0x91/0xb0
    [&lt;c024d845&gt;] do_exit+0x265/0x910
    [&lt;c024df64&gt;] do_group_exit+0x34/0xa0
    [&lt;c025a76f&gt;] get_signal_to_deliver+0x17f/0x590
    [&lt;c0201b6a&gt;] do_signal+0x3a/0x960
    [&lt;c02024f7&gt;] do_notify_resume+0x67/0x90
    [&lt;c071ebb5&gt;] work_notifysig+0x30/0x3b
    [&lt;b7739e60&gt;] 0xb7739e5f
   ---[ end trace b1e56095a485b631 ]---

The cause is that uvc_status_cleanup() is called after usb_put_*() in
uvc_delete().  usb_put_*() removes the sysfs parent and eventually
removes the children recursively, so the later device_del() can't find
its sysfs.  The fix is simply rearrange the call orders in
uvc_delete() so that the child is removed before the parent.

Bugzilla: https://bugzilla.suse.com/show_bug.cgi?id=897736
Reported-and-tested-by: Martin Pluskal &lt;mpluskal@suse.com&gt;

Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
Signed-off-by: Laurent Pinchart &lt;laurent.pinchart@ideasonboard.com&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@osg.samsung.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>af9005: fix kernel panic on init if compiled without IR</title>
<updated>2015-01-27T15:52:32+00:00</updated>
<author>
<name>Frank Schaefer</name>
<email>fschaefer.oss@googlemail.com</email>
</author>
<published>2014-09-29T18:17:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=76a30550a36d565c6548a352a5a2e6501f4534f4'/>
<id>76a30550a36d565c6548a352a5a2e6501f4534f4</id>
<content type='text'>
commit 2279948735609d0d17d7384e776b674619f792ef upstream.

This patches fixes an ancient bug in the dvb_usb_af9005 driver, which
has been reported at least in the following threads:
https://lkml.org/lkml/2009/2/4/350
https://lkml.org/lkml/2014/9/18/558

If the driver is compiled in without any IR support (neither
DVB_USB_AF9005_REMOTE nor custom symbols), the symbol_request calls in
af9005_usb_module_init() return pointers != NULL although the IR
symbols are not available.

This leads to the following oops:
...
[    8.529751] usbcore: registered new interface driver dvb_usb_af9005
[    8.531584] BUG: unable to handle kernel paging request at 02e00000
[    8.533385] IP: [&lt;7d9d67c6&gt;] af9005_usb_module_init+0x6b/0x9d
[    8.535613] *pde = 00000000
[    8.536416] Oops: 0000 [#1] PREEMPT PREEMPT DEBUG_PAGEALLOCDEBUG_PAGEALLOC
[    8.537863] CPU: 0 PID: 1 Comm: swapper Not tainted 3.15.0-rc6-00151-ga5c075c #1
[    8.539827] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.7.5-20140531_083030-gandalf 04/01/2014
[    8.541519] task: 89c9a670 ti: 89c9c000 task.ti: 89c9c000
[    8.541519] EIP: 0060:[&lt;7d9d67c6&gt;] EFLAGS: 00010206 CPU: 0
[    8.541519] EIP is at af9005_usb_module_init+0x6b/0x9d
[    8.541519] EAX: 02e00000 EBX: 00000000 ECX: 00000006 EDX: 00000000
[    8.541519] ESI: 00000000 EDI: 7da33ec8 EBP: 89c9df30 ESP: 89c9df2c
[    8.541519]  DS: 007b ES: 007b FS: 0000 GS: 00e0 SS: 0068
[    8.541519] CR0: 8005003b CR2: 02e00000 CR3: 05a54000 CR4: 00000690
[    8.541519] Stack:
[    8.541519]  7d9d675b 89c9df90 7d992a49 7d7d5914 89c9df4c 7be3a800 7d08c58c 8a4c3968
[    8.541519]  89c9df80 7be3a966 00000192 00000006 00000006 7d7d3ff4 8a4c397a 00000200
[    8.541519]  7d6b1280 8a4c3979 00000006 000009a6 7da32db8 b13eec81 00000006 000009a6
[    8.541519] Call Trace:
[    8.541519]  [&lt;7d9d675b&gt;] ? ttusb2_driver_init+0x16/0x16
[    8.541519]  [&lt;7d992a49&gt;] do_one_initcall+0x77/0x106
[    8.541519]  [&lt;7be3a800&gt;] ? parameqn+0x2/0x35
[    8.541519]  [&lt;7be3a966&gt;] ? parse_args+0x113/0x25c
[    8.541519]  [&lt;7d992bc2&gt;] kernel_init_freeable+0xea/0x167
[    8.541519]  [&lt;7cf01070&gt;] kernel_init+0x8/0xb8
[    8.541519]  [&lt;7cf27ec0&gt;] ret_from_kernel_thread+0x20/0x30
[    8.541519]  [&lt;7cf01068&gt;] ? rest_init+0x10c/0x10c
[    8.541519] Code: 08 c2 c7 05 44 ed f9 7d 00 00 e0 02 c7 05 40 ed f9 7d 00 00 e0 02 c7 05 3c ed f9 7d 00 00 e0 02 75 1f b8 00 00 e0 02 85 c0 74 16 &lt;a1&gt; 00 00 e0 02 c7 05 54 84 8e 7d 00 00 e0 02 a3 58 84 8e 7d eb
[    8.541519] EIP: [&lt;7d9d67c6&gt;] af9005_usb_module_init+0x6b/0x9d SS:ESP 0068:89c9df2c
[    8.541519] CR2: 0000000002e00000
[    8.541519] ---[ end trace 768b6faf51370fc7 ]---

The prefered fix would be to convert the whole IR code to use the kernel IR
infrastructure (which wasn't available at the time this driver had been created).

Until anyone who still has this old hardware steps up an does the conversion,
fix it by not calling the symbol_request calls if the driver is compiled in
without the default IR symbols (CONFIG_DVB_USB_AF9005_REMOTE).
Due to the IR related pointers beeing NULL by default, IR support will then be disabled.

The downside of this solution is, that it will no longer be possible to
compile custom IR symbols (not using CONFIG_DVB_USB_AF9005_REMOTE) in.

Please note that this patch has NOT been tested with all possible cases.
I don't have the hardware and could only verify that it fixes the reported
bug.

Reported-by: Fengguag Wu &lt;fengguang.wu@intel.com&gt;
Signed-off-by: Frank Schäfer &lt;fschaefer.oss@googlemail.com&gt;
Acked-by: Luca Olivetti &lt;luca@ventoso.org&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@osg.samsung.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 2279948735609d0d17d7384e776b674619f792ef upstream.

This patches fixes an ancient bug in the dvb_usb_af9005 driver, which
has been reported at least in the following threads:
https://lkml.org/lkml/2009/2/4/350
https://lkml.org/lkml/2014/9/18/558

If the driver is compiled in without any IR support (neither
DVB_USB_AF9005_REMOTE nor custom symbols), the symbol_request calls in
af9005_usb_module_init() return pointers != NULL although the IR
symbols are not available.

This leads to the following oops:
...
[    8.529751] usbcore: registered new interface driver dvb_usb_af9005
[    8.531584] BUG: unable to handle kernel paging request at 02e00000
[    8.533385] IP: [&lt;7d9d67c6&gt;] af9005_usb_module_init+0x6b/0x9d
[    8.535613] *pde = 00000000
[    8.536416] Oops: 0000 [#1] PREEMPT PREEMPT DEBUG_PAGEALLOCDEBUG_PAGEALLOC
[    8.537863] CPU: 0 PID: 1 Comm: swapper Not tainted 3.15.0-rc6-00151-ga5c075c #1
[    8.539827] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.7.5-20140531_083030-gandalf 04/01/2014
[    8.541519] task: 89c9a670 ti: 89c9c000 task.ti: 89c9c000
[    8.541519] EIP: 0060:[&lt;7d9d67c6&gt;] EFLAGS: 00010206 CPU: 0
[    8.541519] EIP is at af9005_usb_module_init+0x6b/0x9d
[    8.541519] EAX: 02e00000 EBX: 00000000 ECX: 00000006 EDX: 00000000
[    8.541519] ESI: 00000000 EDI: 7da33ec8 EBP: 89c9df30 ESP: 89c9df2c
[    8.541519]  DS: 007b ES: 007b FS: 0000 GS: 00e0 SS: 0068
[    8.541519] CR0: 8005003b CR2: 02e00000 CR3: 05a54000 CR4: 00000690
[    8.541519] Stack:
[    8.541519]  7d9d675b 89c9df90 7d992a49 7d7d5914 89c9df4c 7be3a800 7d08c58c 8a4c3968
[    8.541519]  89c9df80 7be3a966 00000192 00000006 00000006 7d7d3ff4 8a4c397a 00000200
[    8.541519]  7d6b1280 8a4c3979 00000006 000009a6 7da32db8 b13eec81 00000006 000009a6
[    8.541519] Call Trace:
[    8.541519]  [&lt;7d9d675b&gt;] ? ttusb2_driver_init+0x16/0x16
[    8.541519]  [&lt;7d992a49&gt;] do_one_initcall+0x77/0x106
[    8.541519]  [&lt;7be3a800&gt;] ? parameqn+0x2/0x35
[    8.541519]  [&lt;7be3a966&gt;] ? parse_args+0x113/0x25c
[    8.541519]  [&lt;7d992bc2&gt;] kernel_init_freeable+0xea/0x167
[    8.541519]  [&lt;7cf01070&gt;] kernel_init+0x8/0xb8
[    8.541519]  [&lt;7cf27ec0&gt;] ret_from_kernel_thread+0x20/0x30
[    8.541519]  [&lt;7cf01068&gt;] ? rest_init+0x10c/0x10c
[    8.541519] Code: 08 c2 c7 05 44 ed f9 7d 00 00 e0 02 c7 05 40 ed f9 7d 00 00 e0 02 c7 05 3c ed f9 7d 00 00 e0 02 75 1f b8 00 00 e0 02 85 c0 74 16 &lt;a1&gt; 00 00 e0 02 c7 05 54 84 8e 7d 00 00 e0 02 a3 58 84 8e 7d eb
[    8.541519] EIP: [&lt;7d9d67c6&gt;] af9005_usb_module_init+0x6b/0x9d SS:ESP 0068:89c9df2c
[    8.541519] CR2: 0000000002e00000
[    8.541519] ---[ end trace 768b6faf51370fc7 ]---

The prefered fix would be to convert the whole IR code to use the kernel IR
infrastructure (which wasn't available at the time this driver had been created).

Until anyone who still has this old hardware steps up an does the conversion,
fix it by not calling the symbol_request calls if the driver is compiled in
without the default IR symbols (CONFIG_DVB_USB_AF9005_REMOTE).
Due to the IR related pointers beeing NULL by default, IR support will then be disabled.

The downside of this solution is, that it will no longer be possible to
compile custom IR symbols (not using CONFIG_DVB_USB_AF9005_REMOTE) in.

Please note that this patch has NOT been tested with all possible cases.
I don't have the hardware and could only verify that it fixes the reported
bug.

Reported-by: Fengguag Wu &lt;fengguang.wu@intel.com&gt;
Signed-off-by: Frank Schäfer &lt;fschaefer.oss@googlemail.com&gt;
Acked-by: Luca Olivetti &lt;luca@ventoso.org&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@osg.samsung.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>media: ttusb-dec: buffer overflow in ioctl</title>
<updated>2014-11-21T17:22:54+00:00</updated>
<author>
<name>Dan Carpenter</name>
<email>dan.carpenter@oracle.com</email>
</author>
<published>2014-09-05T12:09:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=0ec4fc584c3ee470f5150450acf49dd2dab5d1e7'/>
<id>0ec4fc584c3ee470f5150450acf49dd2dab5d1e7</id>
<content type='text'>
commit f2e323ec96077642d397bb1c355def536d489d16 upstream.

We need to add a limit check here so we don't overflow the buffer.

Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@osg.samsung.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit f2e323ec96077642d397bb1c355def536d489d16 upstream.

We need to add a limit check here so we don't overflow the buffer.

Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@osg.samsung.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>media: em28xx-v4l: give back all active video buffers to the vb2 core properly on streaming stop</title>
<updated>2014-11-14T16:47:56+00:00</updated>
<author>
<name>Frank Schaefer</name>
<email>fschaefer.oss@googlemail.com</email>
</author>
<published>2014-08-09T09:37:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=7dbdd9018603c417a64736414262a4e9b6203390'/>
<id>7dbdd9018603c417a64736414262a4e9b6203390</id>
<content type='text'>
commit 627530c32a43283474e9dd3e954519410ffa033a upstream.

When a new video frame is started, the driver takes the next video buffer from
the list of active buffers and moves it to dev-&gt;usb_ctl.vid_buf / dev-&gt;usb_ctl.vbi_buf
for further processing.

On streaming stop we currently only give back the pending buffers from the list
but not the ones which are currently processed.

This causes the following warning from the vb2 core since kernel 3.15:

...
 ------------[ cut here ]------------
 WARNING: CPU: 1 PID: 2284 at drivers/media/v4l2-core/videobuf2-core.c:2115 __vb2_queue_cancel+0xed/0x150 [videobuf2_core]()
 [...]
 Call Trace:
  [&lt;c0769c46&gt;] dump_stack+0x48/0x69
  [&lt;c0245b69&gt;] warn_slowpath_common+0x79/0x90
  [&lt;f925e4ad&gt;] ? __vb2_queue_cancel+0xed/0x150 [videobuf2_core]
  [&lt;f925e4ad&gt;] ? __vb2_queue_cancel+0xed/0x150 [videobuf2_core]
  [&lt;c0245bfd&gt;] warn_slowpath_null+0x1d/0x20
  [&lt;f925e4ad&gt;] __vb2_queue_cancel+0xed/0x150 [videobuf2_core]
  [&lt;f925fa35&gt;] vb2_internal_streamoff+0x35/0x90 [videobuf2_core]
  [&lt;f925fac5&gt;] vb2_streamoff+0x35/0x60 [videobuf2_core]
  [&lt;f925fb27&gt;] vb2_ioctl_streamoff+0x37/0x40 [videobuf2_core]
  [&lt;f8e45895&gt;] v4l_streamoff+0x15/0x20 [videodev]
  [&lt;f8e4925d&gt;] __video_do_ioctl+0x23d/0x2d0 [videodev]
  [&lt;f8e49020&gt;] ? video_ioctl2+0x20/0x20 [videodev]
  [&lt;f8e48c63&gt;] video_usercopy+0x203/0x5a0 [videodev]
  [&lt;f8e49020&gt;] ? video_ioctl2+0x20/0x20 [videodev]
  [&lt;c039d0e7&gt;] ? fsnotify+0x1e7/0x2b0
  [&lt;f8e49012&gt;] video_ioctl2+0x12/0x20 [videodev]
  [&lt;f8e49020&gt;] ? video_ioctl2+0x20/0x20 [videodev]
  [&lt;f8e4461e&gt;] v4l2_ioctl+0xee/0x130 [videodev]
  [&lt;f8e44530&gt;] ? v4l2_open+0xf0/0xf0 [videodev]
  [&lt;c0378de2&gt;] do_vfs_ioctl+0x2e2/0x4d0
  [&lt;c0368eec&gt;] ? vfs_write+0x13c/0x1c0
  [&lt;c0369a8f&gt;] ? vfs_writev+0x2f/0x50
  [&lt;c0379028&gt;] SyS_ioctl+0x58/0x80
  [&lt;c076fff3&gt;] sysenter_do_call+0x12/0x12
 ---[ end trace 5545f934409f13f4 ]---
...

Many thanks to Hans Verkuil, whose recently added check in the vb2 core unveiled
this long standing issue and who has investigated it further.

Signed-off-by: Frank Schäfer &lt;fschaefer.oss@googlemail.com&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;m.chehab@samsung.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 627530c32a43283474e9dd3e954519410ffa033a upstream.

When a new video frame is started, the driver takes the next video buffer from
the list of active buffers and moves it to dev-&gt;usb_ctl.vid_buf / dev-&gt;usb_ctl.vbi_buf
for further processing.

On streaming stop we currently only give back the pending buffers from the list
but not the ones which are currently processed.

This causes the following warning from the vb2 core since kernel 3.15:

...
 ------------[ cut here ]------------
 WARNING: CPU: 1 PID: 2284 at drivers/media/v4l2-core/videobuf2-core.c:2115 __vb2_queue_cancel+0xed/0x150 [videobuf2_core]()
 [...]
 Call Trace:
  [&lt;c0769c46&gt;] dump_stack+0x48/0x69
  [&lt;c0245b69&gt;] warn_slowpath_common+0x79/0x90
  [&lt;f925e4ad&gt;] ? __vb2_queue_cancel+0xed/0x150 [videobuf2_core]
  [&lt;f925e4ad&gt;] ? __vb2_queue_cancel+0xed/0x150 [videobuf2_core]
  [&lt;c0245bfd&gt;] warn_slowpath_null+0x1d/0x20
  [&lt;f925e4ad&gt;] __vb2_queue_cancel+0xed/0x150 [videobuf2_core]
  [&lt;f925fa35&gt;] vb2_internal_streamoff+0x35/0x90 [videobuf2_core]
  [&lt;f925fac5&gt;] vb2_streamoff+0x35/0x60 [videobuf2_core]
  [&lt;f925fb27&gt;] vb2_ioctl_streamoff+0x37/0x40 [videobuf2_core]
  [&lt;f8e45895&gt;] v4l_streamoff+0x15/0x20 [videodev]
  [&lt;f8e4925d&gt;] __video_do_ioctl+0x23d/0x2d0 [videodev]
  [&lt;f8e49020&gt;] ? video_ioctl2+0x20/0x20 [videodev]
  [&lt;f8e48c63&gt;] video_usercopy+0x203/0x5a0 [videodev]
  [&lt;f8e49020&gt;] ? video_ioctl2+0x20/0x20 [videodev]
  [&lt;c039d0e7&gt;] ? fsnotify+0x1e7/0x2b0
  [&lt;f8e49012&gt;] video_ioctl2+0x12/0x20 [videodev]
  [&lt;f8e49020&gt;] ? video_ioctl2+0x20/0x20 [videodev]
  [&lt;f8e4461e&gt;] v4l2_ioctl+0xee/0x130 [videodev]
  [&lt;f8e44530&gt;] ? v4l2_open+0xf0/0xf0 [videodev]
  [&lt;c0378de2&gt;] do_vfs_ioctl+0x2e2/0x4d0
  [&lt;c0368eec&gt;] ? vfs_write+0x13c/0x1c0
  [&lt;c0369a8f&gt;] ? vfs_writev+0x2f/0x50
  [&lt;c0379028&gt;] SyS_ioctl+0x58/0x80
  [&lt;c076fff3&gt;] sysenter_do_call+0x12/0x12
 ---[ end trace 5545f934409f13f4 ]---
...

Many thanks to Hans Verkuil, whose recently added check in the vb2 core unveiled
this long standing issue and who has investigated it further.

Signed-off-by: Frank Schäfer &lt;fschaefer.oss@googlemail.com&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;m.chehab@samsung.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>media: au0828: Only alt setting logic when needed</title>
<updated>2014-09-17T16:03:57+00:00</updated>
<author>
<name>Mauro Carvalho Chehab</name>
<email>m.chehab@samsung.com</email>
</author>
<published>2014-06-08T16:54:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=f3e8f2718d3fe6bf8dd845ce09e581d5e9772158'/>
<id>f3e8f2718d3fe6bf8dd845ce09e581d5e9772158</id>
<content type='text'>
commit 64ea37bbd8a5815522706f0099ad3f11c7537e15 upstream.

It seems that there's a bug at au0828 hardware/firmware
related to alternate setting: when the device is already at
alt 5, a further call causes the URBs to receive -ESHUTDOWN.

I found two different encarnations of this issue:

1) at qv4l2, it fails the second time we try to open the
video screen;
2) at xawtv, when audio underrun occurs, with is very
frequent, at least on my test machine.

The fix is simple: just check if alt=5 before calling
set_usb_interface().

Signed-off-by: Mauro Carvalho Chehab &lt;m.chehab@samsung.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 64ea37bbd8a5815522706f0099ad3f11c7537e15 upstream.

It seems that there's a bug at au0828 hardware/firmware
related to alternate setting: when the device is already at
alt 5, a further call causes the URBs to receive -ESHUTDOWN.

I found two different encarnations of this issue:

1) at qv4l2, it fails the second time we try to open the
video screen;
2) at xawtv, when audio underrun occurs, with is very
frequent, at least on my test machine.

The fix is simple: just check if alt=5 before calling
set_usb_interface().

Signed-off-by: Mauro Carvalho Chehab &lt;m.chehab@samsung.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>media: hdpvr: fix two audio bugs</title>
<updated>2014-07-31T19:53:47+00:00</updated>
<author>
<name>Hans Verkuil</name>
<email>hverkuil@xs4all.nl</email>
</author>
<published>2014-06-16T12:08:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=926a693a348963a08b5710552e4e7209d2dc126c'/>
<id>926a693a348963a08b5710552e4e7209d2dc126c</id>
<content type='text'>
commit 3445857b22eafb70a6ac258979e955b116bfd2c6 upstream.

When the audio encoding is changed the driver calls hdpvr_set_audio
with the current opt-&gt;audio_input value. However, that should have
been opt-&gt;audio_input + 1. So changing the audio encoding inadvertently
changes the input as well. This bug has always been there.

The second bug was introduced in kernel 3.10 and that broke the
default_audio_input module option handling: the audio encoding was
never switched to AC3 if default_audio_input was set to 2 (SPDIF input).

In addition, since starting with 3.10 the audio encoding is always set
at the start the first bug now always happens when the driver is loaded.
In the past this bug would only surface if the user would change the
audio encoding after the driver was loaded.

Also fixes a small trivial typo (bufffer -&gt; buffer).

Signed-off-by: Hans Verkuil &lt;hans.verkuil@cisco.com&gt;
Reported-by: Scott Doty &lt;scott@corp.sonic.net&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;m.chehab@samsung.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 3445857b22eafb70a6ac258979e955b116bfd2c6 upstream.

When the audio encoding is changed the driver calls hdpvr_set_audio
with the current opt-&gt;audio_input value. However, that should have
been opt-&gt;audio_input + 1. So changing the audio encoding inadvertently
changes the input as well. This bug has always been there.

The second bug was introduced in kernel 3.10 and that broke the
default_audio_input module option handling: the audio encoding was
never switched to AC3 if default_audio_input was set to 2 (SPDIF input).

In addition, since starting with 3.10 the audio encoding is always set
at the start the first bug now always happens when the driver is loaded.
In the past this bug would only surface if the user would change the
audio encoding after the driver was loaded.

Also fixes a small trivial typo (bufffer -&gt; buffer).

Signed-off-by: Hans Verkuil &lt;hans.verkuil@cisco.com&gt;
Reported-by: Scott Doty &lt;scott@corp.sonic.net&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;m.chehab@samsung.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>media: gspca_pac7302: Add new usb-id for Genius i-Look 317</title>
<updated>2014-07-28T15:00:02+00:00</updated>
<author>
<name>Hans de Goede</name>
<email>hdegoede@redhat.com</email>
</author>
<published>2014-07-09T09:20:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=87f7b77e5fe55f27fd705b858eae9858ebdb2327'/>
<id>87f7b77e5fe55f27fd705b858eae9858ebdb2327</id>
<content type='text'>
commit 242841d3d71191348f98310e2d2001e1001d8630 upstream.

Tested-and-reported-by: yullaw &lt;yullaw@mageia.cz&gt;

Signed-off-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;m.chehab@samsung.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 242841d3d71191348f98310e2d2001e1001d8630 upstream.

Tested-and-reported-by: yullaw &lt;yullaw@mageia.cz&gt;

Signed-off-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;m.chehab@samsung.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>media: uvcvideo: Fix clock param realtime setting</title>
<updated>2014-07-01T03:09:44+00:00</updated>
<author>
<name>Olivier Langlois</name>
<email>olivier@trillion01.com</email>
</author>
<published>2014-03-28T05:42:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=40e1ff2db31677ab073ac091fe6b9915453b2f93'/>
<id>40e1ff2db31677ab073ac091fe6b9915453b2f93</id>
<content type='text'>
commit 3b35fc81e7ec552147a4fd843d0da0bbbe4ef253 upstream.

timestamps in v4l2 buffers returned to userspace are updated in
uvc_video_clock_update() which uses timestamps fetched from
uvc_video_clock_decode() by calling unconditionally ktime_get_ts().

Hence setting the module clock param to realtime has no effect before
this patch.

This has been tested with ffmpeg:

ffmpeg -y -f v4l2 -input_format yuyv422 -video_size 640x480 -framerate 30 -i /dev/video0 \
 -f alsa -acodec pcm_s16le -ar 16000 -ac 1 -i default \
 -c:v libx264 -preset ultrafast \
 -c:a libfdk_aac \
 out.mkv

and inspecting the v4l2 input starting timestamp.

Signed-off-by: Olivier Langlois &lt;olivier@trillion01.com&gt;
Signed-off-by: Laurent Pinchart &lt;laurent.pinchart@ideasonboard.com&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;m.chehab@samsung.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 3b35fc81e7ec552147a4fd843d0da0bbbe4ef253 upstream.

timestamps in v4l2 buffers returned to userspace are updated in
uvc_video_clock_update() which uses timestamps fetched from
uvc_video_clock_decode() by calling unconditionally ktime_get_ts().

Hence setting the module clock param to realtime has no effect before
this patch.

This has been tested with ffmpeg:

ffmpeg -y -f v4l2 -input_format yuyv422 -video_size 640x480 -framerate 30 -i /dev/video0 \
 -f alsa -acodec pcm_s16le -ar 16000 -ac 1 -i default \
 -c:v libx264 -preset ultrafast \
 -c:a libfdk_aac \
 out.mkv

and inspecting the v4l2 input starting timestamp.

Signed-off-by: Olivier Langlois &lt;olivier@trillion01.com&gt;
Signed-off-by: Laurent Pinchart &lt;laurent.pinchart@ideasonboard.com&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;m.chehab@samsung.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>media: stk1160: Avoid stack-allocated buffer for control URBs</title>
<updated>2014-07-01T03:09:44+00:00</updated>
<author>
<name>Ezequiel Garcia</name>
<email>ezequiel.garcia@free-electrons.com</email>
</author>
<published>2014-04-17T12:28:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=50f865a928e13c8c5de0b8d3443387ea526b1da9'/>
<id>50f865a928e13c8c5de0b8d3443387ea526b1da9</id>
<content type='text'>
commit 85ac1a1772bb41da895bad83a81f6a62c8f293f6 upstream.

Currently stk1160_read_reg() uses a stack-allocated char to get the
read control value. This is wrong because usb_control_msg() requires
a kmalloc-ed buffer.

This commit fixes such issue by kmalloc'ating a 1-byte buffer to receive
the read value.

While here, let's remove the urb_buf array which was meant for a similar
purpose, but never really used.

Cc: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Reported-by: Sander Eikelenboom &lt;linux@eikelenboom.it&gt;
Signed-off-by: Ezequiel Garcia &lt;ezequiel.garcia@free-electrons.com&gt;
Signed-off-by: Hans Verkuil &lt;hans.verkuil@cisco.com&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;m.chehab@samsung.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 85ac1a1772bb41da895bad83a81f6a62c8f293f6 upstream.

Currently stk1160_read_reg() uses a stack-allocated char to get the
read control value. This is wrong because usb_control_msg() requires
a kmalloc-ed buffer.

This commit fixes such issue by kmalloc'ating a 1-byte buffer to receive
the read value.

While here, let's remove the urb_buf array which was meant for a similar
purpose, but never really used.

Cc: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Reported-by: Sander Eikelenboom &lt;linux@eikelenboom.it&gt;
Signed-off-by: Ezequiel Garcia &lt;ezequiel.garcia@free-electrons.com&gt;
Signed-off-by: Hans Verkuil &lt;hans.verkuil@cisco.com&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;m.chehab@samsung.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
</feed>
