uvcvideo: uvc_scan_fallback() for webcams with broken chain
authorHenrik Ingo <henrik.ingo@avoinelama.fi>
Sat, 25 Mar 2017 16:18:16 +0000 (21:48 +0530)
committerWilly Tarreau <w@1wt.eu>
Tue, 20 Jun 2017 12:04:36 +0000 (14:04 +0200)
commit935896e82abfebe9786716f2fa45703752a099bf
treee1b95e287f38a7a730b57fdb8b21803da4fcfb4b
parentecf229c3de27f918fede7409aaf4cbde471ecb27
uvcvideo: uvc_scan_fallback() for webcams with broken chain

commit e950267ab802c8558f1100eafd4087fd039ad634 upstream.

Some devices have invalid baSourceID references, causing uvc_scan_chain()
to fail, but if we just take the entities we can find and put them
together in the most sensible chain we can think of, turns out they do
work anyway. Note: This heuristic assumes there is a single chain.

At the time of writing, devices known to have such a broken chain are
  - Acer Integrated Camera (5986:055a)
  - Realtek rtl157a7 (0bda:57a7)

Signed-off-by: Henrik Ingo <henrik.ingo@avoinelama.fi>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sumit Semwal <sumit.semwal@linaro.org>
Signed-off-by: Willy Tarreau <w@1wt.eu>
drivers/media/usb/uvc/uvc_driver.c