RE: [REVIEWv2 PATCH 12/12] hdpvr: allow g/s_std when in legacy mode.

2013-04-11 Thread leo
Hans,

The current HEAD is working for both MythTV and gstreamer!

Will you be doing more work on hdpvr? Should I start
looking into error handling and kmallocs?

Thank you,
-Leo.


 Original Message 
Subject: Re: [REVIEWv2 PATCH 12/12] hdpvr: allow g/s_std when in legacy
mode.
From: Hans Verkuil hansv...@cisco.com
Date: Wed, April 10, 2013 10:25 am
To: linux-media@vger.kernel.org
Cc: l...@lumanate.com, Janne Grunau j...@jannau.net, Hans Verkuil
hans.verk...@cisco.com

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 = 1HDPVR_RCA_FRONT | 1HDPVR_RCA_BACK | 1HDPVR_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
--
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


Re: [REVIEWv2 PATCH 12/12] hdpvr: allow g/s_std when in legacy mode.

2013-04-11 Thread Hans Verkuil
On Thu 11 April 2013 09:21:45 l...@lumanate.com wrote:
 Hans,
 
 The current HEAD is working for both MythTV and gstreamer!
 
 Will you be doing more work on hdpvr? Should I start
 looking into error handling and kmallocs?

No, that's it. I'll post a pull request with all this tomorrow.

Feel free to work on improvements, but they'll be queued for kernel 3.11
since tomorrow is the last chance for patches for 3.10.

Thanks for your help testing this! Much appreciated.

Regards,

Hans

 
 Thank you,
 -Leo.
 
 
  Original Message 
 Subject: Re: [REVIEWv2 PATCH 12/12] hdpvr: allow g/s_std when in legacy
 mode.
 From: Hans Verkuil hansv...@cisco.com
 Date: Wed, April 10, 2013 10:25 am
 To: linux-media@vger.kernel.org
 Cc: l...@lumanate.com, Janne Grunau j...@jannau.net, Hans Verkuil
 hans.verk...@cisco.com
 
 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 = 1HDPVR_RCA_FRONT | 1HDPVR_RCA_BACK | 1HDPVR_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
 
--
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


Re: [REVIEWv2 PATCH 12/12] hdpvr: allow g/s_std when in legacy mode.

2013-04-10 Thread Hans Verkuil
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 = 1HDPVR_RCA_FRONT | 1HDPVR_RCA_BACK | 1HDPVR_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