Skip to contentSkip to conversation

dvb: add alternate stv0297-driver

PATCH In review Michael Krufky 2 participants 2 messages Nov 1, 2005 – Nov 3, 2005 Media (V4L/DVB)

lore
Share & tools
lore
#0 lore raw

PATCH 5/37 dvb: add alternate stv0297-driver

From: Patrick Boettcher <[email protected]>

adding special stv0297-driver for the Technisat/B2C2 CableStar2 PCI and USB devices (USB untested)

This driver could also be used with other stv0297-based cards, but someone has to do it.

The CableStar2's stv0297-driver is tested with QAM32/64/128/256 and has a very nice reception-qualitiy.

 drivers/media/dvb/b2c2/Makefile           |    2 
 drivers/media/dvb/b2c2/flexcop-fe-tuner.c |  143 +----
 drivers/media/dvb/b2c2/stv0297_cs2.c      |  776 ++++++++++++++++++++++++++++++
 drivers/media/dvb/b2c2/stv0297_cs2.h      |   51 +
 drivers/media/dvb/b2c2/stv0297_priv.h     |  154 +++++
 5 files changed, 1029 insertions(+), 97 deletions(-)
drivers/media/dvb/b2c2/Makefile +2 -0
@@ -3,6 +3,8 @@
 	flexcop-dma.o
 obj-$(CONFIG_DVB_B2C2_FLEXCOP) += b2c2-flexcop.o
 
+obj-$(CONFIG_DVB_B2C2_FLEXCOP) += stv0297_cs2.o
+
 b2c2-flexcop-pci-objs = flexcop-pci.o
 obj-$(CONFIG_DVB_B2C2_FLEXCOP_PCI) += b2c2-flexcop-pci.o
 
drivers/media/dvb/b2c2/flexcop-fe-tuner.c +46 -97

165 lines not on this page · raw message

drivers/media/dvb/b2c2/stv0297_cs2.c new file +776 -0

776 lines not on this page · raw message

drivers/media/dvb/b2c2/stv0297_cs2.h new file +51 -0

51 lines not on this page · raw message

drivers/media/dvb/b2c2/stv0297_priv.h new file +154 -0

154 lines not on this page · raw message

#1 lore raw
Quoted 2 lines · Michael Krufky

+#define abs64(x) (x) < 0 ? -(x) : (x);

Needs parentheses around the whole thing.

This should go into include/linus/kernel.h, after labs(), methinks.

Quoted 1 line

+static s64 div64(s64 dividend,s64 divisor)

hm. If we really need a 64-by-64 divide then it shouldn't be hidden in a dvb
driver, please. I bet we have a few in the tree already, actually.

So it'd be appreciated if someone could take a shot at generating a generic version of this. It'll need to be inlined for 64-bit arches, out-of-line for 32-bit.

It'll also need to be permanently wired into the kernel, alas. We cannot
tell at compile time whether it'll be needed :( EXPORT_SYMBOL() it.