Re: [PATCH] media: uvcvideo: Pick first best alternate setting insteed of last

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Laurent,

 you pleased me very much, also for your quick reply.

1)
  The patch is exactly the same as final state of my debugging.
I just succesfully probe it against uvc_video.c <https://elixir.bootlin.com/linux/v6.6-rc6/source/drivers/media/usb/uvc/uvc_video.c> source on my PC running
 Linux HP-Pro-A-MT 6.5.0-9-generic #9-Ubuntu SMP PREEMPT_DYNAMIC 
Sat Oct  7 01:35:40 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
 with Newmine camera. 
/The patch also doesn't hurt my other UVC 1.0 camera, Genius Qcam 6000./
All my 6.5.0 uvc*.c  files in uvc directory are clean of any other changes I used for tests before,
only the path of one single line in one file is there now.

  Now I also carefully compare 6.5.0 uvc_video.c <https://elixir.bootlin.com/linux/v6.6-rc6/source/drivers/media/usb/uvc/uvc_video.c> original  (before the patch) with currect Linux sources at
https://elixir.bootlin.com/linux/v6.6-rc6/source/drivers/media/usb/uvc/uvc_video.c
and also at
https://github.com/torvalds/linux/blob/master/drivers/media/usb/uvc/uvc_video.c
   These are different only in few blank characters :)).

  I am not able to run last git 6.6 kernel just now, but I hope that my verification by 6.5.0 will be enough.
If is necessery - let me now, I will try compile last kernel on different, dedicated computer.
(I never work with such a big git project. I sometimes used other's ppa results.)

2)
  You can mention my name in linux git history, I will be glad.

best regards

Karel Janda


20. 10. 2023 0:24 od laurent.pinchart@xxxxxxxxxxxxxxxx:

> ---
> Karel, could you please test this patch ? Please also let me know if you
> are fine having your name recorded in the kernel git history with the
> Reported-by and Suggested-by tags above. If not, I will drop them.
> ---
>  drivers/media/usb/uvc/uvc_video.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/media/usb/uvc/uvc_video.c b/drivers/media/usb/uvc/uvc_video.c
> index 28dde08ec6c5..7cbf4692bd87 100644
> --- a/drivers/media/usb/uvc/uvc_video.c
> +++ b/drivers/media/usb/uvc/uvc_video.c
> @@ -1954,7 +1954,7 @@ static int uvc_video_start_transfer(struct uvc_streaming *stream,
>  
>  /* Check if the bandwidth is high enough. */
>  psize = uvc_endpoint_max_bpi(stream->dev->udev, ep);
> -			if (psize >= bandwidth && psize <= best_psize) {
> +			if (psize >= bandwidth && psize < best_psize) {
>  altsetting = alts->desc.bAlternateSetting;
>  best_psize = psize;
>  best_ep = ep;
> -- 
>





[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux