uvcvideo: uvc_scan_fallback() for webcams with broken chain
authorHenrik Ingo <henrik.ingo@avoinelama.fi>
Fri, 17 Mar 2017 00:48:31 +0000 (00:48 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 22 Mar 2017 11:43:38 +0000 (12:43 +0100)
commitbd2de45031b9b05738c91b87c1c360471c075bbd
tree196bdf97f04614423b81ab5544b0c351e06da9e8
parente627116c0c35d3d42fb031683606a49ce7d63cc5
uvcvideo: uvc_scan_fallback() for webcams with broken chain

[ Upstream commit e950267ab802c8558f1100eafd4087fd039ad634 ]

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>
drivers/media/usb/uvc/uvc_driver.c