From: Antti Palosaari <crope@iki.fi>
To: Mauro Carvalho Chehab <m.chehab@samsung.com>
Cc: linux-media@vger.kernel.org, Hans Verkuil <hverkuil@xs4all.nl>
Subject: Re: [REVIEW PATCH 02/16] e4000: implement controls via v4l2 control framework
Date: Thu, 13 Mar 2014 18:05:36 +0200 [thread overview]
Message-ID: <5321D750.9040103@iki.fi> (raw)
In-Reply-To: <5321CC1E.3080509@iki.fi>
On 13.03.2014 17:17, Antti Palosaari wrote:
> On 13.03.2014 15:57, Mauro Carvalho Chehab wrote:
>> Em Thu, 27 Feb 2014 02:30:11 +0200
>> Antti Palosaari <crope@iki.fi> escreveu:
>>
>>> Implement gain and bandwidth controls using v4l2 control framework.
>>> Pointer to control handler is provided by exported symbol.
>> There are two things to be noticed here:
>>
>> 1) Please don't add any EXPORT_SYMBOL() on a pure I2C module. You
>> should, instead, use the subdev calls, in order to callback a
>> function provided by the module;
>
> That means, I have to implement it as a V4L subdev driver then...
>
> Is there any problem to leave as it is? It just only provides control
> handler using that export. If you look those existing dvb frontend or
> tuner drivers there is many kind of resources exported just similarly
> (example DibCom PID filters, af9033 pid filters), so I cannot see why
> that should be different.
>
>> 2) As you're now using request_module(), you don't need to use
>> #if IS_ENABLED() anymore. It is up to the module to register
>> itself as a V4L2 subdevice. The caller module should use the
>> subdevice interface to run the callbacks.
>>
>> If you don't to that, you'll have several issues with the
>> building system.
>
> So basically you are saying I should implement that driver as a V4L
> subdev too?
That is not so simple!
If you look how that device is build on driver level
rtl28xxu USB-interface driver is *master*
rtl28xxu loads rtl2832 demod driver
rtl28xxu loads e4000 tuner driver
rtl28xxu loads rtl2832_sdr driver
Whole palette is build upon DVB API, but rtl2832_sdr driver offers SDR
API for userspace. So it is not that simple "go to and implement V4L2
subdevice to e4000 DVB driver". Only thing needed is to find out some
way to pass control handler from e4000 to rtl2832_sdr. There is no
likely any existing solution where DVB side uses V4L2 subdevice and
implementing such at this tight schedule does not sound reasonable. Why
you didn't mention you want subdevice earlier? At the very first I
implemented that using DVB tuner .set_config() callback, but you asked
to switch v4l2 control framework. And now I should switch to subdev.
There does not seems to be any suitable callback for getting that kind
of pointer. There is only one existing quite similar solution what I
know, it is stv6110x / stv090x and I don't like it :)
Any idea?
regards
Antti
--
http://palosaari.fi/
next prev parent reply other threads:[~2014-03-13 16:05 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-27 0:30 [REVIEW PATCH 00/16] SDR API - Realtek RTL2832 SDR driver Antti Palosaari
2014-02-27 0:30 ` [REVIEW PATCH 01/16] e4000: convert DVB tuner to I2C driver model Antti Palosaari
2014-02-27 0:30 ` [REVIEW PATCH 02/16] e4000: implement controls via v4l2 control framework Antti Palosaari
2014-03-13 13:57 ` Mauro Carvalho Chehab
2014-03-13 15:17 ` Antti Palosaari
2014-03-13 16:05 ` Antti Palosaari [this message]
2014-03-13 16:40 ` Mauro Carvalho Chehab
2014-02-27 0:30 ` [REVIEW PATCH 03/16] e4000: fix PLL calc to allow higher frequencies Antti Palosaari
2014-02-27 0:30 ` [REVIEW PATCH 04/16] e4000: implement PLL lock v4l control Antti Palosaari
2014-02-27 0:30 ` [REVIEW PATCH 05/16] e4000: get rid of DVB i2c_gate_ctrl() Antti Palosaari
2014-02-27 0:30 ` [REVIEW PATCH 06/16] e4000: convert to Regmap API Antti Palosaari
2014-02-27 0:30 ` [REVIEW PATCH 07/16] e4000: rename some variables Antti Palosaari
2014-02-27 0:30 ` [REVIEW PATCH 08/16] rtl2832_sdr: Realtek RTL2832 SDR driver module Antti Palosaari
2014-02-27 0:30 ` [REVIEW PATCH 09/16] rtl28xxu: constify demod config structs Antti Palosaari
2014-02-27 0:30 ` [REVIEW PATCH 10/16] rtl28xxu: attach SDR extension module Antti Palosaari
2014-02-27 0:30 ` [REVIEW PATCH 11/16] rtl28xxu: fix switch-case style issue Antti Palosaari
2014-02-27 0:30 ` [REVIEW PATCH 12/16] rtl28xxu: use muxed RTL2832 I2C adapters for E4000 and RTL2832_SDR Antti Palosaari
2014-02-27 0:30 ` [REVIEW PATCH 13/16] rtl2832_sdr: expose e4000 controls to user Antti Palosaari
2014-02-27 0:30 ` [REVIEW PATCH 14/16] r820t: add manual gain controls Antti Palosaari
2014-02-27 0:30 ` [REVIEW PATCH 15/16] rtl2832_sdr: expose R820T controls to user Antti Palosaari
2014-02-27 0:30 ` [REVIEW PATCH 16/16] MAINTAINERS: add rtl2832_sdr driver Antti Palosaari
-- strict thread matches above, loose matches on Subject: below --
2014-02-11 2:04 [REVIEW PATCH 00/16] SDR API - drivers Antti Palosaari
2014-02-11 2:04 ` [REVIEW PATCH 02/16] e4000: implement controls via v4l2 control framework Antti Palosaari
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=5321D750.9040103@iki.fi \
--to=crope@iki.fi \
--cc=hverkuil@xs4all.nl \
--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