From: Hans Verkuil <hverkuil@xs4all.nl>
To: Mauro Carvalho Chehab <m.chehab@samsung.com>
Cc: Antti Palosaari <crope@iki.fi>, linux-media@vger.kernel.org
Subject: Re: [PATCH RFC v2 7/7] v4l: define own IOCTL ops for SDR FMT
Date: Sun, 15 Dec 2013 12:31:18 +0100 [thread overview]
Message-ID: <52AD9306.1060408@xs4all.nl> (raw)
In-Reply-To: <20131215092326.74c28792.m.chehab@samsung.com>
On 12/15/2013 12:23 PM, Mauro Carvalho Chehab wrote:
> Em Sat, 14 Dec 2013 18:24:37 +0200
> Antti Palosaari <crope@iki.fi> escreveu:
>
>> Hello, Mauro, Hans,
>>
>> On 14.12.2013 18:15, Antti Palosaari wrote:
>>> Use own format ops for SDR data:
>>> vidioc_enum_fmt_sdr_cap
>>> vidioc_g_fmt_sdr_cap
>>> vidioc_s_fmt_sdr_cap
>>> vidioc_try_fmt_sdr_cap
>>
>> To be honest, I am a little bit against that patch. Is there any good
>> reason we duplicate these FMT ops every-time when new stream format is
>> added? For my eyes that is mostly just bloating the code without good
>> reason.
>
> The is one reason: when the same device can be used in both SDR and non
> SDR mode (radio, video, vbi), then either the driver or the core would
> need to select the right set of vidioc_*fmt_* ops.
>
> In the past, all drivers had about the same logic for such tests.
> Yet, as the implementations weren't the same, several of them were
> implementing it wrong.
>
> So, we ended by moving those validations to the core.
I do think there is room for improvement here, though. Rather than
passing v4l2_format to the ops I would have preferred passing the appropriate
struct of the union instead.
And I never really liked it that try and set were split up. A 'try' boolean
would reduce the number of ops.
The first improvement is something that can be done at some point. It's too
late (and probably not worth it) to do anything about the second.
Regards,
Hans
PS: Antti, I'll review the code in more detail tomorrow.
next prev parent reply other threads:[~2013-12-15 11:31 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-14 16:15 [PATCH RFC v2 0/7] V4L2 SDR API Antti Palosaari
2013-12-14 16:15 ` [PATCH RFC v2 1/7] v4l: don't clear VIDIOC_G_FREQUENCY tuner type Antti Palosaari
2013-12-14 16:15 ` [PATCH RFC v2 2/7] v4l: add device type for Software Defined Radio Antti Palosaari
2013-12-14 16:15 ` [PATCH RFC v2 3/7] v4l: add new tuner types for SDR Antti Palosaari
2013-12-16 8:53 ` Hans Verkuil
2013-12-16 12:36 ` Antti Palosaari
2013-12-16 12:50 ` Hans Verkuil
2013-12-16 14:19 ` Antti Palosaari
2013-12-16 14:25 ` Hans Verkuil
2013-12-16 14:41 ` Antti Palosaari
2013-12-16 14:57 ` Hans Verkuil
2013-12-14 16:15 ` [PATCH RFC v2 4/7] v4l: 1 Hz resolution flag for tuners Antti Palosaari
2013-12-14 16:15 ` [PATCH RFC v2 5/7] v4l: add stream format for SDR receiver Antti Palosaari
2013-12-14 16:15 ` [PATCH RFC v2 6/7] v4l: enable some IOCTLs " Antti Palosaari
2013-12-14 16:15 ` [PATCH RFC v2 7/7] v4l: define own IOCTL ops for SDR FMT Antti Palosaari
2013-12-14 16:24 ` Antti Palosaari
2013-12-15 11:23 ` Mauro Carvalho Chehab
2013-12-15 11:31 ` Hans Verkuil [this message]
2013-12-16 8:54 ` Hans Verkuil
2013-12-14 16:45 ` [PATCH RFC v2 0/7] V4L2 SDR API Antti Palosaari
2013-12-14 17:05 ` Hans Verkuil
2013-12-14 17:47 ` Antti Palosaari
2013-12-15 11:30 ` Mauro Carvalho Chehab
2013-12-16 16:50 ` Antti Palosaari
2013-12-16 17:09 ` Hans Verkuil
2013-12-16 8:55 ` Hans Verkuil
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=52AD9306.1060408@xs4all.nl \
--to=hverkuil@xs4all.nl \
--cc=crope@iki.fi \
--cc=linux-media@vger.kernel.org \
--cc=m.chehab@samsung.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox