From: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
To: Devin Heitmueller <dheitmueller@kernellabs.com>
Cc: Antti Palosaari <crope@iki.fi>,
Shuah Khan <shuahkh@osg.samsung.com>,
Linux Media Mailing List <linux-media@vger.kernel.org>
Subject: Re: [PATCH] xc5000: fix memory corruption when unplugging device
Date: Wed, 25 Feb 2015 16:02:21 -0300 [thread overview]
Message-ID: <20150225160221.2db06c12@recife.lan> (raw)
In-Reply-To: <CAGoCfiyDP9LM7aFGE1+doOPu=A_+1ryKuKiM9aLGUw6PjkB42Q@mail.gmail.com>
Em Wed, 25 Feb 2015 13:37:07 -0500
Devin Heitmueller <dheitmueller@kernellabs.com> escreveu:
> > These are just the issues I would like to implement drivers as standard I2C
> > driver model =) Attaching driver for one chip twice is ugly hack!
>
> While I'm not arguing the merits of using the standard I2C driver
> model, it won't actually help in this case since we would still need a
> structure representing shared state accessible by both the DVB and
> V4L2 subsystems. And that struct will need to be referenced counted,
> which is exactly what hybrid_tuner_request_state() does.
...
> If you ever get around to implementing support for a hybrid device
> (where you actually have to worry about how both digital and analog
> share a single tuner), you'll appreciate some of these challenges and
> why what was done was not as bad/crazy as you might think.
The I2C model that Antti is proposing may work, but, for that,
we'll very likely need to re-write the tuner core.
Currently, the binding model is:
for analog:
tuner driver -> tuner-core module <==> V4L2 driver
The interface between V4L2 driver and tuner core is the I2C high
level API.
for digital
tuner driver <==> DVB driver
The interface between the tuner driver and the DVB driver is the
I2C low level API.
Antti's proposal makes the DVB driver to use the high level I2C API,
with makes the DVB driver a little closer to what V4L2 does.
Yet, for V4L2, the tuner-core module is required.
The binding code at the tuner-core is very complex, as it needs to
talk both V4L2 and DVB "dialogs". This should be simplified.
In other words, If we want to use the same model for all tuners,
we'll need to rewrite the binding schema to avoid the need of a
tuner core module, or to replace it by something better/simpler.
For locking the tuner between analog/digital usage, the best
approach seems to be to use the media controller.
Regards,
Mauro
prev parent reply other threads:[~2015-02-25 19:02 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-24 17:29 [PATCH] xc5000: fix memory corruption when unplugging device Devin Heitmueller
2015-02-25 14:08 ` Shuah Khan
2015-02-25 17:56 ` Devin Heitmueller
2015-02-25 18:13 ` Antti Palosaari
2015-02-25 18:37 ` Devin Heitmueller
2015-02-25 19:02 ` Mauro Carvalho Chehab [this message]
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=20150225160221.2db06c12@recife.lan \
--to=mchehab@osg.samsung.com \
--cc=crope@iki.fi \
--cc=dheitmueller@kernellabs.com \
--cc=linux-media@vger.kernel.org \
--cc=shuahkh@osg.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;
as well as URLs for NNTP newsgroup(s).