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

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

 



OK, I have realised a problem with the previous attempts. Embedding the 
release() methods into dvb_unregister_frontend() causes problems with 
detaching.

The first is - if we leave the release() calls in dvb_unregister_frontend(), 
it forces a card driver developer to either use ALL dvb_attach() or ALL 
static linkages for demod+sec+tuner modules. This might not be wanted.

Next: I remembered the initialisation sequence of a frontend:

1) attach demod
2) attach tuner
3) attach SEC (if necessary)
4) register frontend

Step 4 can fail. If it does, we have to undo steps 3,2, and 1. Therefore we 
required a dvb_detach() macro to allow this. 

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.

I wasn't sure whether you would prefer me to merge all the patches together 
like I have been doing, or if you would prefer a single patch illustrating 
this change. I've left it as a single patch - if you want me to regenerate a 
complete patchset instead just say so and I will sort it.

I've made no attempt at supporting customising static builds yet; this issue 
was too important.

Also I _think_ I detected a bug in the cx88/saa7134 drivers. If 
dvb_register_frontend() failed, it did not call the release() operations on 
the attached frontend objects. I've corrected this in the patch. If I'm 
mistaken, please let me know.

(BTW: remember the patches in the repos will all be redone before/if any 
submission is done to mainline hg)

_______________________________________________

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