Mailing List archive

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

[linux-dvb] Re: [rfc/patch] pll handling and cx22702 update



> Hmm, what about combining the two then - use Gerd's idea for most of the
> contents of the data buffers - but also have a tuner specific function.
> There already is a tuner specific function in Gerd's example for setting
> the bandwidth stuff - we'd just expand that so it performed the tuner
> specific writing.

Actually - even better - keep Gerd's definitions as they are - maybe with some 
minor tweaks.

However, we expand dvb_pll_configure() so it does the actual writing to the 
PLL. Somewhere in dvb_pll_configure(), we would basically have something 
like:

if (!strcmp(pll_desc->name, "Philips TDM1316"))
 return tdm1316_write();
....

If the PLL doesn't need anything fancy, then it drops back to generic pll 
write function - basically just send the 4 bytes at the PLL.

The tdm1316_write() function would be a small static function in pll-lib.c.

dvb_pll_configure() is passed something like the following dvb_tuner_ops 
structure by the card driver:

struct dvb_tuner_ops {
  int (*read)(void* card_data, int device, u8* buf, int size);
  int (*write)(void* card_data, int device, u8* buf, int size);

 void* card_data;
};




Home | Main Index | Thread Index