linux-stable/drivers/media/usb
Hans Verkuil 9f582f0418 media: uvcvideo: Check for INACTIVE in uvc_ctrl_is_accessible()
Check for inactive controls in uvc_ctrl_is_accessible().

Use the new value for the master_id controls if present, otherwise
use the existing value to determine if it is OK to set the control.
Doing this here avoids attempting to set an inactive control, which
will return an error from the USB device, which returns an invalid
errorcode.

This fixes:
  warn: v4l2-test-controls.cpp(483): s_ctrl returned EIO
  warn: v4l2-test-controls.cpp(483): s_ctrl returned EIO
test VIDIOC_G/S_CTRL: OK
  warn: v4l2-test-controls.cpp(739): s_ext_ctrls returned EIO
  warn: v4l2-test-controls.cpp(739): s_ext_ctrls returned EIO
  warn: v4l2-test-controls.cpp(816): s_ext_ctrls returned EIO
test VIDIOC_G/S/TRY_EXT_CTRLS: OK

Tested with:
v4l2-ctl -c auto_exposure=1
OK
v4l2-ctl -c exposure_time_absolute=251
OK
v4l2-ctl -c auto_exposure=3
OK
v4l2-ctl -c exposure_time_absolute=251
VIDIOC_S_EXT_CTRLS: failed: Input/output error
exposure_time_absolute: Input/output error
ERROR
v4l2-ctl -c auto_exposure=3,exposure_time_absolute=251,auto_exposure=1
v4l2-ctl -C auto_exposure,exposure_time_absolute  
auto_exposure: 1
exposure_time_absolute: 251

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Ricardo Ribalda <ribalda@chromium.org>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2023-01-15 23:45:11 +02:00
..
airspy media: airspy: fix memory leak in airspy probe 2022-08-30 07:31:42 +02:00
as102
au0828 media: vb2/au0828: move the v4l_vb2q_enable_media_source to the au0828 driver 2022-11-25 07:41:40 +00:00
b2c2 media: flexcop-usb: use usb_endpoint_maxp() 2022-09-26 10:59:25 +02:00
cx231xx media: avoid use of 'videobuf' 2022-08-29 16:27:18 +02:00
dvb-usb media: dvb-usb: m920x: make read-only arrays static const 2022-12-02 15:36:44 +01:00
dvb-usb-v2 media: usb/dvb-usb-v2: fix repeated words in comments 2022-09-24 08:47:01 +02:00
em28xx media: dvb-frontends: a8293: fix LNB powerup failure in PCTV 461e 2022-11-25 09:55:55 +00:00
go7007 media: usb: go7007: s2250-board: Convert to i2c's .probe_new() 2022-11-21 11:04:46 +01:00
gspca media: gspca: Fix typo 'the the' in comment 2022-08-29 15:32:14 +02:00
hackrf media: Kconfig: cleanup VIDEO_DEV dependencies 2022-03-18 05:58:35 +01:00
hdpvr media: hdpvr: fix error value returns in hdpvr_read 2022-06-27 09:02:50 +01:00
msi2500 media: usb/msi2500: fix repeated words in comments 2022-09-24 08:46:38 +02:00
pvrusb2 treewide: Convert del_timer*() to timer_shutdown*() 2022-12-25 13:38:09 -08:00
pwc media: usb: pwc-uncompress: Use flex array destination for memcpy() 2022-12-07 17:58:46 +01:00
s2255 treewide: Convert del_timer*() to timer_shutdown*() 2022-12-25 13:38:09 -08:00
siano media: siano: remove duplicate USB device IDs 2021-12-07 11:29:58 +01:00
stk1160 media: stk1160: use dma_alloc_noncontiguous API 2022-03-07 11:01:22 +01:00
ttusb-budget
ttusb-dec media: ttusb-dec: avoid release of non-acquired mutex 2021-09-30 10:07:40 +02:00
usbtv media: usbtv: Add PAL-Nc standard 2022-06-20 10:30:30 +01:00
uvc media: uvcvideo: Check for INACTIVE in uvc_ctrl_is_accessible() 2023-01-15 23:45:11 +02:00
Kconfig media: tm6000: deprecate this driver 2022-08-29 16:43:00 +02:00
Makefile media: tm6000: deprecate this driver 2022-08-29 16:43:00 +02:00