Re: [PULL] http://www.kernellabs.com/hg/~dheitmueller/v4l-dvb-em28xx-isoc/

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

 



Em 22-06-2010 00:27, Devin Heitmueller escreveu:
> Hello,
> 
> Please PULL from
> http://www.kernellabs.com/hg/~dheitmueller/v4l-dvb-em28xx-isoc for the
> following:
> 
> * Make em28xx s_ctrl not always return error
> * Fix case where fields were not at the correct start location.
> 
> This addresses two bugs found in the em28xx driver (one with video
> rendering and one with the s_ctrl ioctl always returning an error).
> 
> Thanks to Eugeniy Meshcheryakov for bringing the field rendering issue
> to my attention.
> 

Devin,

There were one additional patch on your tree:

patches/hg_14995_make_em28xx_s_ctrl_not_always_return_error.patch
Changeset: 14995
From: Devin Heitmueller  <dheitmueller@xxxxxxxxxxxxxx>
Commiter: Devin Heitmueller <dheitmueller@xxxxxxxxxxxxxx>
Tag: tip
Date: Sun Jun 13 16:12:29 2010 -0400
Subject: Make em28xx s_ctrl not always return error

The em28xx driver was always returning 1 for calls to s_ctrl, disregarding
whatever value was set by the subdev.  This resulted in errors being shown
in application such as "v4l2-ctl --set-ctrl", even though the command actually
succeeded.

Priority: normal

Signed-off-by: Devin Heitmueller <dheitmueller@xxxxxxxxxxxxxx>
---

diff -upNr oldtree/drivers/media/video/em28xx/em28xx-video.c linux/drivers/media/video/em28xx/em28xx-video.c
--- oldtree/drivers/media/video/em28xx/em28xx-video.c	2010-06-26 10:02:43.000000000 -0300
+++ linux/drivers/media/video/em28xx/em28xx-video.c	2010-06-26 10:02:39.000000000 -0300
@@ -1462,7 +1462,8 @@ static int vidioc_s_ctrl(struct file *fi
 
 	/* It isn't an AC97 control. Sends it to the v4l2 dev interface */
 	if (rc == 1) {
-		v4l2_device_call_all(&dev->v4l2_dev, 0, core, s_ctrl, ctrl);
+		rc = v4l2_device_call_until_err(&dev->v4l2_dev, 0, core,
+						s_ctrl, ctrl);
 
 		/*
 		 * In the case of non-AC97 volume controls, we still need

This patch tries to fix a problem, but it is broken: Let's suppose that you have
2 i2c drivers that implements control, one for video (like tvp5150) and another for
audio (like msp3400). That's the case of HVR-950, for example.  As both drivers 
implement s_ctrl, the -ENOIOCTLCMD will not be returned by the drivers. Instead, if
you try to set an audio CTRL to tvp5150, it will return -EINVAL. The same happens if
you try to set a video CTRL to msp3400.

If you use v4l2_device_call_until_err(), depending on the order that tvp5150 and msp3400
will be loaded, or video or audio CTRL's will always fail, due to -EINVAL.

What we need here is something like v4l2_device_call_until_not_err(), e. g. something that
will stop sending CTRL's if the return code is 0.

> Devin
> 

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[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