upstream: [media] au0828: Only alt setting logic when needed
authorMauro Carvalho Chehab <m.chehab@samsung.com>
Sun, 8 Jun 2014 16:54:57 +0000 (13:54 -0300)
committerChanho Park <chanho61.park@samsung.com>
Thu, 7 Aug 2014 05:32:08 +0000 (14:32 +0900)
commitc634195fe58f644aff3528c9ca3cc42b613c2159
treef53bd333c84b717b2810908bfc7eeef50ac3bbf5
parent60c93b92d0fe604a54acbf71ba03609c30e7ee57
upstream: [media] au0828: Only alt setting logic when needed

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().

Cc: stable@vger.kernel.org
Backports http://git.linuxtv.org/cgit.cgi/media_tree.git/commit/?id=64ea37bbd8a5
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
drivers/media/usb/au0828/au0828-video.c