Em 05-10-2011 11:00, Mike Isely escreveu:
Mauro:
With the line you've just added, then the " = arg" assignment in the
immediate prior line is effectively dead code. Try this instead:
Look better:
v4l2_std_id *std = arg;
+ *std = V4L2_STD_ALL;
The above code is creating a pointer 'std' of the type 'v4l2_std_id', and
initializing the pointer with the void *arg.
Then, it is doing an indirect reference to the pointer, filling its
contents with V4L2_STD_ALL value.
The code above is sane (and, btw, it works). After those patches, the
detection code will detect PAL/M or NTSC/M depending on the channel I
tune here (my cable operator broadcasts some channels with one format,
and others with the other one). Before this patch and the msp3400, it
would return a mask with PAL/M and PAL/60 or a mask with all NTSC/M formats.
Regards,
Mauro.
case VIDIOC_QUERYSTD:
{
- v4l2_std_id *std = arg;
+ v4l2_std_id *std = V4L2_STD_ALL;
ret = pvr2_hdw_get_detected_std(hdw, std);
break;
}
-Mike
On Tue, 4 Oct 2011, Mauro Carvalho Chehab wrote:
Signed-off-by: Mauro Carvalho Chehab<mchehab@xxxxxxxxxx>
---
drivers/media/video/pvrusb2/pvrusb2-v4l2.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/drivers/media/video/pvrusb2/pvrusb2-v4l2.c b/drivers/media/video/pvrusb2/pvrusb2-v4l2.c
index 0d029da..ce7ac45 100644
--- a/drivers/media/video/pvrusb2/pvrusb2-v4l2.c
+++ b/drivers/media/video/pvrusb2/pvrusb2-v4l2.c
@@ -230,6 +230,7 @@ static long pvr2_v4l2_do_ioctl(struct file *file, unsigned int cmd, void *arg)
case VIDIOC_QUERYSTD:
{
v4l2_std_id *std = arg;
+ *std = V4L2_STD_ALL;
ret = pvr2_hdw_get_detected_std(hdw, std);
break;
}
--
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