Files
Hans Yang bb7a3f15e8 media: uvc: zero seq number when disabling stream
For bulk-based devices, when disabling the video stream,
in addition to issue CLEAR_FEATURE(HALT), it is better to set
alternate setting 0 as well or the sequnce number in host
side will probably not reset to zero.

Then in next time video stream start, the device will expect
host starts packet from 0 sequence number but host actually
continue the sequence number from last transaction and this
causes transaction errors.

This commit fixes this by adding set alternate setting 0 back
as what isoch-based devices do.

Below error message will also be eliminated for some devices:
uvcvideo: Non-zero status (-71) in video completion handler.

Bug 200328129
Bug 200773787
Bug 200773474
Bug 4979751

Change-Id: Ic1dc30679ef8c5e3a92bf12a06a47f0ac75c09b7
Signed-off-by: Hans Yang <hansy@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1543436
Reviewed-on: https://git-master.nvidia.com/r/1580119
Reviewed-on: https://git-master.nvidia.com/r/c/linux-5.10/+/2618097
(cherry picked from commit 7e106e03f320690741675d9fe5b3fd916c30bcc8)
Reviewed-on: https://git-master.nvidia.com/r/c/3rdparty/canonical/linux-noble/+/3403587
Reviewed-by: Henry Lin <henryl@nvidia.com>
Tested-by: Henry Lin <henryl@nvidia.com>
Reviewed-by: WK Tsai <wtsai@nvidia.com>
Reviewed-by: Wayne Chang <waynec@nvidia.com>
Reviewed-by: EJ Hsu <ejh@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
2025-07-17 11:52:40 +01:00
..
2025-06-15 10:37:48 +03:00