Re: idea on how to break the static dependencies on demodulator modules

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Saturday 08 July 2006 03:23, Trent Piepho wrote:
> On Fri, 7 Jul 2006, Andrew de Quincey wrote:
> > Combine this with the first problem, and you realise you have to:
> > a) Remove the releases from dvb_unregister_frontend().
> > b) dvb_unregister_dvb_attached_frontend() is pointless.
> > c) And you have make the card drivers do the detach themselves so they
> > can be flexible about what they do.
> >
> > This is exactly what js suggested: he saw this issue long before I did.
> >
> > So I've committed a new patch to my repos converting all the previous
> > code to handle this.
>
> Is there any point in using dvb_attach() for dvb-pll?  It seems like every
> single card uses it, 

Yeah - it is a bit pointless that; no problems with changing it here.

> and there are still static calls to 
> dvb_pll_configure(), so it doesn't accomplish anything.  At least not so
> far.

Not for long :)

> The call to ops.i2c_gate_ctrl() after the tuner_ops.release() is missing
> now. Does that matter?

Not so much; the frontend is being shutdown as well at that point, so it 
doesn't really matter. The frontends should really be patched to close the 
i2c latch on release().

> There is a change in the way a NULL release method is handled.  It used to
> be that a warning message was printed if the release method was missing. 
> Then it was upgraded to BUG_ON if it was missing.  This latest behaviour is
> to silently ignore a missing release, which is a significant change in
> direction.

Well - the reasoning was that right now you _have_ to implement a release() 
method for the demodulator. However, this complicates cards that only ever 
have a firmware "frontend" e.g. the Nova-USB-DEC cards. Removing the 
release() check means cards like this can just set the various ops() calls as 
they want in the one piece of code, and not bother with a release if its not 
necessary. 

The original reason I added that check was so during the demodulator 
refactoring I could see if I had missed a release call out. I actually meant 
to remove it after that was done, but forgot.

> Along with that, the dvb_detach() stub version is somewhat different than
> the real version.  Real version:
> Silently handle NULL function pointer
> Set function pointer to NULL when done
>
> Stub Version:
> Crash on NULL function pointer
> Doesn't set function pointer to NULL when done

Yes, thats not too great. Will fix.

_______________________________________________

linux-dvb@xxxxxxxxxxx
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb

[Index of Archives]     [Linux Media]     [Video 4 Linux]     [Asterisk]     [Samba]     [Xorg]     [Xfree86]     [Linux USB]

  Powered by Linux