]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
media: uvcvideo: Fix bandwidth issue for Alcor camera
authorchenchangcheng <chenchangcheng@kylinos.cn>
Sat, 10 May 2025 06:18:03 +0000 (14:18 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 28 Aug 2025 14:26:01 +0000 (16:26 +0200)
commit205f187cce14ad9c6d889964cae6e005ee3e2fe5
tree547665bf127e514b4b4f51b50122b237a352a52f
parent454a443eaa792c8865c861a282fe6d4f596abc3a
media: uvcvideo: Fix bandwidth issue for Alcor camera

[ Upstream commit 9764401bf6f8a20eb11c2e78470f20fee91a9ea7 ]

Some broken device return wrong dwMaxPayloadTransferSize fields as
follows:

[  218.632537] uvcvideo: Device requested 2752512 B/frame bandwidth.
[  218.632598] uvcvideo: No fast enough alt setting for requested bandwidth.

When dwMaxPayloadTransferSize is greater than maxpsize, it will prevent
the camera from starting. So use the bandwidth of maxpsize.

Signed-off-by: chenchangcheng <chenchangcheng@kylinos.cn>
Reviewed-by: Ricardo Ribalda <ribalda@chromium.org>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Link: https://lore.kernel.org/r/20250510061803.811433-1-ccc194101@163.com
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/media/usb/uvc/uvc_video.c