From: Jose Abreu <Jose.Abreu@synopsys.com>
To: Hans Verkuil <hverkuil@xs4all.nl>,
Jose Abreu <Jose.Abreu@synopsys.com>,
<linux-media@vger.kernel.org>
Cc: Carlos Palminha <CARLOS.PALMINHA@synopsys.com>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
Hans Verkuil <hans.verkuil@cisco.com>,
<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 3/3] [media] cobalt: Use v4l2_calc_timeperframe helper
Date: Wed, 19 Apr 2017 11:32:57 +0100 [thread overview]
Message-ID: <96361b5d-39e1-225b-7d40-c2b66585b019@synopsys.com> (raw)
In-Reply-To: <eab1bff3-e2bd-947a-6220-59c04376edac@synopsys.com>
Hi Hans,
On 31-03-2017 09:59, Jose Abreu wrote:
> Hi Hans,
>
>
> On 30-03-2017 14:42, Hans Verkuil wrote:
>> Hi Jose,
>>
>> On 21/03/17 12:49, Jose Abreu wrote:
>>> Currently, cobalt driver always returns 60fps in g_parm.
>>> This patch uses the new v4l2_calc_timeperframe helper to
>>> calculate the time per frame value.
>> I can verify that g_parm works, so:
>>
>> Tested-by: Hans Verkuil <hans.verkuil@cisco.com>
>>
>> However, the adv7604 pixelclock detection resolution is only 0.25 MHz, so it
>> can't tell the difference between 24 and 23.97 Hz. I can't set the new
>> V4L2_DV_FL_CAN_DETECT_REDUCED_FPS flag there.
>>
>> It might be possible to implement this for the adv7842 receiver, I think that
>> that hardware is much more precise.
>>
>> I would have to try this, but that will have to wait until Friday next week.
> Thanks! Yes, maybe its better to test with a different receiver,
> if it has more precision then its great. Let me know if you need
> any help :)
Any news regarding this?
Best regards,
Jose Miguel Abreu
>
> Best regards,
> Jose Miguel Abreu
>
>> Regards,
>>
>> Hans
>>
>>> Signed-off-by: Jose Abreu <joabreu@synopsys.com>
>>> Cc: Carlos Palminha <palminha@synopsys.com>
>>> Cc: Mauro Carvalho Chehab <mchehab@kernel.org>
>>> Cc: Hans Verkuil <hans.verkuil@cisco.com>
>>> Cc: linux-media@vger.kernel.org
>>> Cc: linux-kernel@vger.kernel.org
>>> ---
>>> drivers/media/pci/cobalt/cobalt-v4l2.c | 9 +++++++--
>>> 1 file changed, 7 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/drivers/media/pci/cobalt/cobalt-v4l2.c b/drivers/media/pci/cobalt/cobalt-v4l2.c
>>> index def4a3b..25532ae 100644
>>> --- a/drivers/media/pci/cobalt/cobalt-v4l2.c
>>> +++ b/drivers/media/pci/cobalt/cobalt-v4l2.c
>>> @@ -1076,10 +1076,15 @@ static int cobalt_subscribe_event(struct v4l2_fh *fh,
>>>
>>> static int cobalt_g_parm(struct file *file, void *fh, struct v4l2_streamparm *a)
>>> {
>>> + struct cobalt_stream *s = video_drvdata(file);
>>> + struct v4l2_fract fps;
>>> +
>>> if (a->type != V4L2_BUF_TYPE_VIDEO_CAPTURE)
>>> return -EINVAL;
>>> - a->parm.capture.timeperframe.numerator = 1;
>>> - a->parm.capture.timeperframe.denominator = 60;
>>> +
>>> + fps = v4l2_calc_timeperframe(&s->timings);
>>> + a->parm.capture.timeperframe.numerator = fps.numerator;
>>> + a->parm.capture.timeperframe.denominator = fps.denominator;
>>> a->parm.capture.readbuffers = 3;
>>> return 0;
>>> }
>>>
next prev parent reply other threads:[~2017-04-19 10:33 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-21 11:49 [PATCH 0/3] Handling of reduced FPS in V4L2 Jose Abreu
2017-03-21 11:49 ` [PATCH 1/3] [media] videodev2.h: Add new DV flag CAN_DETECT_REDUCED_FPS Jose Abreu
2017-03-21 11:49 ` [PATCH 2/3] [media] v4l2-dv-timings: Introduce v4l2_calc_timeperframe helper Jose Abreu
2017-03-21 11:49 ` [PATCH 3/3] [media] cobalt: Use " Jose Abreu
2017-03-30 13:42 ` Hans Verkuil
2017-03-31 8:59 ` Jose Abreu
2017-04-19 10:32 ` Jose Abreu [this message]
2017-03-24 11:03 ` [PATCH 0/3] Handling of reduced FPS in V4L2 Jose Abreu
2017-03-24 11:24 ` Hans Verkuil
2017-03-24 11:52 ` Jose Abreu
2017-03-24 12:12 ` Hans Verkuil
2017-03-24 12:21 ` Jose Abreu
2017-03-24 12:28 ` Hans Verkuil
2017-03-27 11:58 ` Jose Abreu
2017-03-28 10:07 ` Hans Verkuil
2017-03-29 13:26 ` Jose Abreu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=96361b5d-39e1-225b-7d40-c2b66585b019@synopsys.com \
--to=jose.abreu@synopsys.com \
--cc=CARLOS.PALMINHA@synopsys.com \
--cc=hans.verkuil@cisco.com \
--cc=hverkuil@xs4all.nl \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.