Re: how to use dvb_attach (was: Re: Re: Error unloading WinTV NOVA T USB2)

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

 



Hi again,

On Tue, 29 Aug 2006, Trent Piepho wrote:
> > > If something has multiple front-ends, just call the attach function
> > > multiple times.
> >
> > For the so-called I2C-enumeration of the DiBcom-demods (to get all the
> > demod reachable by I2C) it is necessary to have some information which is
> > present in the config-struct. I actually don't like to change all that,
> 
> That would be dib3000mc_i2c_enumeration(demod,no_of_demods,default_addr),
> which is never actually called in the current code?

You are right.

> It does not look like it needs anything in the dib3000mc_config structure,
> only all the frontend pointers and the default i2c address.

You are right again, only for dib7000-drivers it will use a field from the 
config-structure to do I2C-enumeration.

> It looks like it remaps the demods to different I2C addresses?

> Could you just have a function that does this after all the demods have 
> been attached?  Or just re-map them one at a time as they are attached?

I could do it before attaching all demods and then I need also the 
config-strut. Attaching also means probing and in a diversity-chain the 
only the last demod is reachable before I2C-enumeration.

> Have a parameter to dib3000mc_attach that specifies the I2C address to 
> re-map too or 0 to not remap.

As stated above remap happens during the i2c-enumeration. 

> > At first dibusb_dib3000mc_frontend_attach was only located in dibusb-mc.c,
> > then a device appeared with the 3000mc inside but with USB firmware
> > interface which normally only used with the 3000mb onboard. So, I put the
> > dibusb_dib3000mc_frontend_attach in common, because it was used by two
> > different modules.
> 
> This makes everything which uses dibusb-common depend on the 3000mc
> demodulator module.  Why not just put dibusb_dib3000mc_frontend_attach(),
> the dvb-usb wrapper for the frontend attach function, in dib3000mc.c?

That would make the dib3000mc-module depend on USB, would it. There are 
more applications for this demod, than just USB. Unfortunately, nothing 
which is OpenSource as of today.

> > > BTW, the error path in dib3000mc_attach() is broken.
> >
> > Thanks, but where? I'm too blind to see it.
> 
> It de-references uninitialized front-end pointers.  I suppose that this
> goes to show that the way the front-end attach function tries to do
> multiple frontends at once makes it too complex.

If you refer to the kfree - the loop is done with num not with 
no_of_demods.

I think I will change the way the i2c-enumeration is done. Thanks for 
pushing for this. .. In fact I really think this is the better way.

But as usually my time is very limited and I promised so much during the 
past weeks and a lot of it is still in the FIFO... And during working time 
I will have no time to do it. Another *sigh*. I'll try my best.

best regards,
Patrick.

--
  Mail: patrick.boettcher@xxxxxxx
  WWW:  http://www.wi-bw.tfh-wildau.de/~pboettch/

_______________________________________________
linux-dvb mailing list
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