Skip to contentSkip to conversation

dvb: add pll lib

PATCH In review Gerd Knorr 2 participants 2 messages Mar 8, 2005 – Mar 9, 2005 Media (V4L/DVB)

lore
Share & tools
lore

Gerd Knorr

author
#0 lore raw

PATCH 1/1 dvb: add pll lib

Hi,

This adds some helper code to handle tuning for dvb cards, with a struct describing the pll and a function calculating the command sequence needed to program it.

This one was discussed + accepted on the linuxtv list and also is in the linuxtv cvs. As the the cx88 driver update I want finally get out of the door depends on this one I'll go submit it myself instead of waiting for the dvb guys doing it.

Gerd

---
 drivers/media/dvb/frontends/Makefile  |    1 
 drivers/media/dvb/frontends/dvb-pll.c |  168 ++++++++++++++++++++++++++
 drivers/media/dvb/frontends/dvb-pll.h |   34 +++++
 3 files changed, 203 insertions(+)
drivers/media/dvb/frontends/Makefile +1 -0
Index: linux-2.6.11-rc4/drivers/media/dvb/frontends/Makefile
===================================================================
@@ -4,6 +4,7 @@
 
 EXTRA_CFLAGS = -Idrivers/media/dvb/dvb-core/
 
+obj-$(CONFIG_DVB_CORE) += dvb-pll.o
 obj-$(CONFIG_DVB_STV0299) += stv0299.o
 obj-$(CONFIG_DVB_SP8870) += sp8870.o
 obj-$(CONFIG_DVB_CX22700) += cx22700.o
drivers/media/dvb/frontends/dvb-pll.c new file +168 -0

168 lines not on this page · raw message

drivers/media/dvb/frontends/dvb-pll.h new file +34 -0
Index: linux-2.6.11-rc4/drivers/media/dvb/frontends/dvb-pll.h
===================================================================
@@ -0,0 +1,34 @@
+/*
+ * $Id: dvb-pll.h,v 1.2 2005/02/10 11:43:41 kraxel Exp $
+ */
+
+struct dvb_pll_desc {
+	char *name;
+	u32  min;
+	u32  max;
+	void (*setbw)(u8 *buf, int bandwidth);
+	int  count;
+	struct {
+		u32 limit;
+		u32 offset;
+		u32 stepsize;
+		u8  cb1;
+		u8  cb2;
+	} entries[];
+};
+
+extern struct dvb_pll_desc dvb_pll_thomson_dtt7579;
+extern struct dvb_pll_desc dvb_pll_thomson_dtt759x;
+extern struct dvb_pll_desc dvb_pll_thomson_dtt7610;
+extern struct dvb_pll_desc dvb_pll_lg_z201;
+extern struct dvb_pll_desc dvb_pll_unknown_1;
+
+int dvb_pll_configure(struct dvb_pll_desc *desc, u8 *buf,
+		      u32 freq, int bandwidth);
+
+/*
+ * Local variables:
+ * c-basic-offset: 8
+ * compile-command: "make DVB=1"
+ * End:
+ */
Signature · 1 line
#define printk(args...) fprintf(stderr, ## args)
#1 lore raw

(linux-dvb list removed from Cc: because it is subscribers only)

Quoted 9 lines · Gerd Knorr

This adds some helper code to handle tuning for dvb cards, with a struct describing the pll and a function calculating the command sequence needed to program it.

This one was discussed + accepted on the linuxtv list and also is in the linuxtv cvs. As the the cx88 driver update I want finally get out of the door depends on this one I'll go submit it myself instead of waiting for the dvb guys doing it.

Michael Hunold is somewhat busy with his new job at Toshiba, so I want to takeover patch submission for now. However, one thing that makes it difficult to create kernel patches from linuxtv.org CVS is that there are a large number of whitespace differences between the kernel tree and CVS. There's also some corrupted indentation in the kernel, e.g. drivers/media/dvb/frontends/tda1004x.c:tda1004x_sleep().
I wanted to get this issue out of the way before I start
to submit other patches from linuxtv.org CVS.

I merged some whitespace cleanups from the kernel into CVS, and created a patch to clean up whitespace in the kernel, removing lots of whitespace at end-of-line in the go. The problem with this patch is that it is huge (600K) :-(. I was crazy enough to mail it to Linus anyway on Sunday, and it looks like it got dropped on the floor :-((

It would be nice if I could get some advice how to submit this kind of cleanup (i.e. if I should split it up in tiny fragments), or if I should ignore the issue for now and concentrate on functional improvements.

The DVB related patches submitted by Gerd are non-controversial and should be applied.

Johannes