Tuner refactoring part 2

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

 



Hi, just got started with this.. initial attempt for the "ttpci" architectures 
are at:

http://linuxtv.org/hg/~quincy/v4l-dvb-tunerrefactor

I ran into two problems preventing me continuing with the budget-ci:

1) One tuner needs to send 5 bytes. I think this problem has been seen with 
other tuners too.
2) One DVBS tuner needs to set parameters based on the symbol rate.

A suggested change to the pll structure is here, comments follow:

struct dvb_pll_desc {
	char *name;
	u32  min;
	u32  max;
	void (*override)(u8 *buf, struct dvb_frontend_parameters *params);
	u8 msg_len;
	u8 entry_count;
	struct {
		u32 limit;
		u32 offset;
		u32 stepsize;
		u8  config;
		u8  cb;
		u8  byte5;
	} entries[12];
};

Changes: 

count is now called entry_count and has changed to a u8 - this is just 
completeness from me; previously it was an int, but this field must never be 
negative. Also I changed the name to distinguish it from the msg_len field.

The addition of the "byte5" field, and the msg_len field. This is so we can 
send an extra byte to tuners which need it. msg_len will normally be 4.

The setbw() method is changed to override(), and takes the complete set of 
params. setbw was originally added to support DVBT tuners which had different 
bandwidth dependant settings. However it also now needs to support DVBS 
tuners with symbolrate dependant settings. From a cleanness point of view, 
I'd rather just get the complete set of tuning params and let the tuner 
specific code pull out what it needs.

Do we actually need to specify a max bound of 12 on the number of entries as 
above? I mean it _appears_ to compile if you just leave it as "entries[]". 
However I appreciate there may be some compiler issues which prevent doing 
this that I am unaware of... let me know.

Some tuners are really card specific, e.g. the dvb_pll_nexusca_stv0297. This 
should perhaps be moved back into the card driver instead of cluttering up 
dvb-pll.c. 

Also note that I have (temporarily) removed frequency correction from the 
revised PLL definitions (i.e. I removed the (PLLREF/2) from DIV = (FREQ + 
(PLLREF/2))/PLLREF). This will be done centrally in dvb-pll.c in the future.

Please comment!

Future:
* More card drivers/plls converted.
* dvb_pll_configure() will die once the conversion is complete.

_______________________________________________

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