mirror of
				https://gitlab.freedesktop.org/pipewire/pipewire.git
				synced 2025-11-03 09:01:54 -05:00 
			
		
		
		
	spa: v4l2: Fix v4l2 SPA not working on camera with relative controls
Some V4L2 controls like focus, pan or tilt can be relative (change the lens / angle relative to previous positions) these return EACCES when calling VIDIOC_G_CTRL on them. Fix the v4l2 SPA not working on cameras with relative controls, such as e.g. the Logitech QuickCam Orbit MP. Signed-off-by: Hans de Goede <hdegoede@redhat.com>
This commit is contained in:
		
							parent
							
								
									c6ae68b932
								
							
						
					
					
						commit
						4c29ea4f6f
					
				
					 1 changed files with 5 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -1324,6 +1324,11 @@ spa_v4l2_update_controls(struct impl *this)
 | 
			
		|||
		spa_zero(control);
 | 
			
		||||
		control.id = c->ctrl_id;
 | 
			
		||||
		if (xioctl(dev->fd, VIDIOC_G_CTRL, &control) < 0) {
 | 
			
		||||
			/* Write only controls like relative pan/tilt return EACCES */
 | 
			
		||||
			if (errno == EACCES) {
 | 
			
		||||
				c->value = 0;
 | 
			
		||||
				continue;
 | 
			
		||||
			}
 | 
			
		||||
			res = -errno;
 | 
			
		||||
			goto done;
 | 
			
		||||
		}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue