On Wed April 10 2013 18:27:43 Hans Verkuil wrote:
> Leo, can you verify that this works for you as well? I tested it without
> problems with MythTV and gstreamer.
> 
> Thanks!
> 
>       Hans
> 
> Both MythTV and gstreamer expect that they can set/get/query/enumerate the
> standards, even if the input is the component input for which standards
> really do not apply.
> 
> Signed-off-by: Hans Verkuil <hans.verk...@cisco.com>
> ---
>  drivers/media/usb/hdpvr/hdpvr-video.c |   40 
> ++++++++++++++++++++++++---------
>  1 file changed, 29 insertions(+), 11 deletions(-)
> 
> diff --git a/drivers/media/usb/hdpvr/hdpvr-video.c 
> b/drivers/media/usb/hdpvr/hdpvr-video.c
> index 4376309..38724d7 100644
> --- a/drivers/media/usb/hdpvr/hdpvr-video.c
> +++ b/drivers/media/usb/hdpvr/hdpvr-video.c


> -static int vidioc_enum_input(struct file *file, void *priv,
> -                             struct v4l2_input *i)
> +static int vidioc_enum_input(struct file *file, void *_fh, struct v4l2_input 
> *i)
>  {
> +     struct hdpvr_fh *fh = _fh;
>       unsigned int n;
>  
>       n = i->index;
> @@ -758,13 +761,15 @@ static int vidioc_enum_input(struct file *file, void 
> *priv,
>  
>       i->audioset = 1<<HDPVR_RCA_FRONT | 1<<HDPVR_RCA_BACK | 1<<HDPVR_SPDIF;
>  
> +     if (fh->legacy_mode)
> +             n = 1;

Oops, these two lines should be removed. Otherwise non-legacy apps like qv4l2 
will
break as they rely on accurate capability reporting.

>       i->capabilities = n ? V4L2_IN_CAP_STD : V4L2_IN_CAP_DV_TIMINGS;
>       i->std = n ? V4L2_STD_ALL : 0;
>  
>       return 0;
>  }

Regards,

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

Reply via email to