On Fri, Jan 29, 2010 at 1:40 PM, Mauro Carvalho Chehab
<mche...@redhat.com> wrote:
> I doubt it would solve. IMO, having it modular is good, since you may not
> need cx18 alsa on all devices.

Modularity is good, but we really need to rethink about the way we are
loading these modules (this applies to dvb as well).  For example, on
em28xx, the dvb module is often getting loaded while at the same that
hald is connecting to the v4l2 device (resulting in i2c errors while
attempting to talk to tvp5150).  A simple initialization lock would
seem like a good idea, except that doesn't really work because the
em28xx submodules get loaded asynchronously.  And the problem isn't
specific to em28xx by any means.  I've hit comparable bugs in cx88.

If we didn't load the modules asynchronously, then at least we would
be able to hold the lock throughout the entire device initialization
(ensuring that nobody can connect to the v4l2 device while the dvb and
alsa drivers are initializing).  Sure, it in theory adds a second or
two to the module load (depending on the device), but we would have a
much simpler model that would be less prone to race conditions.  We
would also lose the ability to modprobe the dvb module after-the-fact
(and expect it to bind to existing devices), but I don't really think
that would be a big deal since everything is auto-detected anyway.  In
fact, it might actually be a good thing given the number of times I've
had to explain to people that you cannot do "modprobe em28xx-dvb" on
an unsupported device and expect it to magically start working.

I didn't mean to hijack the thread, but I'm just trying to point out
that this is a pretty widespread problem, and not specific to cx18.

Devin

-- 
Devin J. Heitmueller - Kernel Labs
http://www.kernellabs.com
--
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

Reply via email to