diff --git a/Makefile b/Makefile index 3040e6c..9b1d9da 100644 --- a/Makefile +++ b/Makefile @@ -3,13 +3,14 @@ MDIR ?= KDIR ?= /lib/modules/$(kernelver)/build PWD := $(shell pwd) -MODDEFS := CONFIG_DVB_CORE=m CONFIG_DVB_DDBRIDGE=m CONFIG_DVB_DRXK=m CONFIG_DVB_TDA18271C2DD=m CONFIG_DVB_CXD2099=m CONFIG_DVB_LNBP21=m CONFIG_DVB_STV090x=m CONFIG_DVB_STV6110x=m CONFIG_DVB_STV0367=m CONFIG_DVB_TDA18212=m CONFIG_DVB_STV0367DD=m CONFIG_DVB_TDA18212DD=m CONFIG_DVB_OCTONET=m CONFIG_DVB_CXD2843=m CONFIG_DVB_STV0910=m CONFIG_DVB_STV6111=m CONFIG_DVB_LNBH25=m CONFIG_DVB_MXL5XX=m CONFIG_DVB_NET=y DDDVB=y +MODDEFS := CONFIG_DVB_CORE=m CONFIG_DVB_DDBRIDGE=m CONFIG_DVB_DRXK=m CONFIG_DVB_TDA18271C2DD=m CONFIG_DVB_CXD2099=m CONFIG_DVB_LNBP21=m CONFIG_DVB_STV090x=m CONFIG_DVB_STV6110x=m CONFIG_DVB_STV0367=m CONFIG_DVB_TDA18212=m CONFIG_DVB_STV0367DD=m CONFIG_DVB_TDA18212DD=m CONFIG_DVB_OCTONET=m CONFIG_DVB_CXD2843=m CONFIG_DVB_STV0910=m CONFIG_DVB_STV6111=m CONFIG_DVB_LNBH25=m CONFIG_DVB_MXL5XX=m DDDVB=y KBUILD_EXTMOD = $(PWD) ifeq ($(KERNEL_DVB_CORE),y) DDDVB_INC = "--include=$(KBUILD_EXTMOD)/include/dd_compat.h -I$(KBUILD_EXTMOD)/frontends -I$(KBUILD_EXTMOD) -DKERNEL_DVB_CORE=y" else +MODDEFS += CONFIG_DVB_NET=y DDDVB_INC = "--include=$(KBUILD_EXTMOD)/include/dd_compat.h -I$(KBUILD_EXTMOD)/frontends -I$(KBUILD_EXTMOD)/include -I$(KBUILD_EXTMOD)/include/linux" endif diff --git a/ddbridge/Kbuild b/ddbridge/Kbuild index 99d3a02..3f3615d 100644 --- a/ddbridge/Kbuild +++ b/ddbridge/Kbuild @@ -1,4 +1,4 @@ -EXTRA_CFLAGS += -DCONFIG_DVB_CXD2843 -DCONFIG_DVB_LNBP21 -DCONFIG_DVB_STV090x -DCONFIG_DVB_STV6110x -DCONFIG_DVB_DRXK -DCONFIG_DVB_STV0910 -DCONFIG_DVB_STV6111 -DCONFIG_DVB_LNBH25 -DCONFIG_DVB_MXL5XX -DCONFIG_DVB_CXD2099 -DCONFIG_DVB_NET +EXTRA_CFLAGS += -DCONFIG_DVB_CXD2843 -DCONFIG_DVB_LNBP21 -DCONFIG_DVB_STV090x -DCONFIG_DVB_STV6110x -DCONFIG_DVB_DRXK -DCONFIG_DVB_STV0910 -DCONFIG_DVB_STV6111 -DCONFIG_DVB_LNBH25 -DCONFIG_DVB_MXL5XX -DCONFIG_DVB_CXD2099 -DCONFIG_DVB_NET -DCONFIG_DVB_TDA18271C2DD ddbridge-objs = ddbridge-main.o ddbridge-hw.o ddbridge-i2c.o ddbridge-ns.o ddbridge-modulator.o ddbridge-core.o ddbridge-io.o ddbridge-ci.o ddbridge-max.o ddbridge-mci.o ddbridge-sx8.o ddbridge-m4.o dvb_netstream.o diff --git a/ddbridge/ddbridge-core.c b/ddbridge/ddbridge-core.c index 7e7cffa..78e3728 100644 --- a/ddbridge/ddbridge-core.c +++ b/ddbridge/ddbridge-core.c @@ -4074,7 +4074,7 @@ static struct class ddb_class = { .devnode = ddb_devnode, }; -int ddb_class_create(void) +static int ddb_class_create(void) { ddb_major = register_chrdev(0, DDB_NAME, &ddb_fops); if (ddb_major < 0) @@ -4084,7 +4084,7 @@ int ddb_class_create(void) return 0; } -void ddb_class_destroy(void) +static void ddb_class_destroy(void) { class_unregister(&ddb_class); unregister_chrdev(ddb_major, DDB_NAME); diff --git a/ddbridge/ddbridge-max.c b/ddbridge/ddbridge-max.c index 963dc29..f64b5db 100644 --- a/ddbridge/ddbridge-max.c +++ b/ddbridge/ddbridge-max.c @@ -482,8 +482,9 @@ int ddb_fe_attach_mxl5xx(struct ddb_input *input) cfg = mxl5xx; cfg.fw_priv = link; - if (dev->link[0].info->type == DDB_OCTONET) + if (dev->link[0].info->type == DDB_OCTONET) { ;/*cfg.ts_clk = 69;*/ + } demod = input->nr; tuner = demod & 3; diff --git a/ddbridge/ddbridge-mci.c b/ddbridge/ddbridge-mci.c index 9726857..f05deed 100644 --- a/ddbridge/ddbridge-mci.c +++ b/ddbridge/ddbridge-mci.c @@ -210,9 +210,9 @@ int ddb_mci_cmd(struct mci *state, } -int ddb_mci_cmd_raw(struct mci *state, - struct mci_command *command, u32 command_len, - struct mci_result *result, u32 result_len) +static int ddb_mci_cmd_raw(struct mci *state, + struct mci_command *command, u32 command_len, + struct mci_result *result, u32 result_len) { struct ddb_link *link = state->base->link; int stat; diff --git a/ddbridge/ddbridge.h b/ddbridge/ddbridge.h index e026c6b..f019a02 100644 --- a/ddbridge/ddbridge.h +++ b/ddbridge/ddbridge.h @@ -580,5 +580,10 @@ struct ddb_irq *ddb_irq_set(struct ddb *dev, u32 link, u32 nr, void (*handler)(void *), void *data); struct dvb_frontend *ddb_mci_attach(struct ddb_input *input, struct mci_cfg *cfg, int nr, int tuner); +struct dvb_frontend *ddb_sx8_attach(struct ddb_input *input, int nr, int tuner, + int (**fn_set_input)(struct dvb_frontend *fe, int input)); +struct dvb_frontend *ddb_mx_attach(struct ddb_input *input, int nr, int tuner, int type); +int ddb_dvb_usercopy(struct file *file, unsigned int cmd, unsigned long arg, + int (*func)(struct file *file, unsigned int cmd, void *arg)); #endif diff --git a/frontends/Makefile b/frontends/Makefile index a6de4a5..2970639 100644 --- a/frontends/Makefile +++ b/frontends/Makefile @@ -9,6 +9,7 @@ EXTRA_CFLAGS += -DCONFIG_DVB_STV6110x EXTRA_CFLAGS += -DCONFIG_DVB_STV0367DD #EXTRA_CFLAGS += -DCONFIG_DVB_TDA18212 EXTRA_CFLAGS += -DCONFIG_DVB_TDA18212DD +EXTRA_CFLAGS += -DCONFIG_DVB_TDA18271C2DD EXTRA_CFLAGS += -DCONFIG_DVB_CXD2843 EXTRA_CFLAGS += -DCONFIG_DVB_STV6111 EXTRA_CFLAGS += -DCONFIG_DVB_STV0910 diff --git a/frontends/drxk_hard.c b/frontends/drxk_hard.c index 640f3a2..987e2aa 100644 --- a/frontends/drxk_hard.c +++ b/frontends/drxk_hard.c @@ -62,16 +62,6 @@ static bool IsQAM(struct drxk_state *state) state->m_OperationMode == OM_QAM_ITU_C; } -bool IsA1WithPatchCode(struct drxk_state *state) -{ - return state->m_DRXK_A1_PATCH_CODE; -} - -bool IsA1WithRomCode(struct drxk_state *state) -{ - return state->m_DRXK_A1_ROM_CODE; -} - #define NOA1ROM 0 #ifndef CHK_ERROR @@ -492,7 +482,7 @@ static int WriteBlock(struct drxk_state *state, u32 Address, #define DRXK_MAX_RETRIES_POWERUP 20 #endif -int PowerUpDevice(struct drxk_state *state) +static int PowerUpDevice(struct drxk_state *state) { int status; u8 data = 0; diff --git a/frontends/stv0367dd.c b/frontends/stv0367dd.c index d97e59e..025886c 100644 --- a/frontends/stv0367dd.c +++ b/frontends/stv0367dd.c @@ -1570,7 +1570,6 @@ static int ofdm_lock(struct stv_state *state) if (!(OFDM_Status & 0x40)) return -1; - //printk("lock 1\n"); readreg(state, R367_OFDM_SYR_STAT,&SYR_STAT); FFTMode = (SYR_STAT & 0x0C) >> 2; @@ -1609,9 +1608,9 @@ static int ofdm_lock(struct stv_state *state) writereg(state, R367_TSGENERAL,tmp2 & ~0x01); } msleep(FECTimeOut); - if( (OFDM_Status & 0x98) != 0x98 ) + if( (OFDM_Status & 0x98) != 0x98 ) { ;//return -1; - //printk("lock 2\n"); + } { u8 Guard = (SYR_STAT & 0x03); diff --git a/frontends/stv6111.c b/frontends/stv6111.c index 3d10d8a..a4902c1 100644 --- a/frontends/stv6111.c +++ b/frontends/stv6111.c @@ -32,6 +32,7 @@ #include #include +#include "stv6111.h" static inline u32 MulDiv32(u32 a, u32 b, u32 c) { diff --git a/frontends/tda18212dd.c b/frontends/tda18212dd.c index 1235437..314de8b 100644 --- a/frontends/tda18212dd.c +++ b/frontends/tda18212dd.c @@ -33,6 +33,7 @@ #include #include +#include "tda18212dd.h" #ifndef CHK_ERROR #define CHK_ERROR(s) if ((status = s) < 0) break diff --git a/frontends/tda18271c2dd.c b/frontends/tda18271c2dd.c index 39fd090..3c2ddd7 100644 --- a/frontends/tda18271c2dd.c +++ b/frontends/tda18271c2dd.c @@ -33,6 +33,7 @@ #include #include +#include "tda18271c2dd.h" struct SStandardParam { s32 m_IFFrequency; diff --git a/frontends/tda18271c2dd.h b/frontends/tda18271c2dd.h index bfe61d7..f91af8d 100644 --- a/frontends/tda18271c2dd.h +++ b/frontends/tda18271c2dd.h @@ -1,6 +1,10 @@ #ifndef _TDA18271C2DD_H_ #define _TDA18271C2DD_H_ -#if defined(CONFIG_DVB_TDA18271C2DD) || \ + +#include +#include + +#if defined(CONFIG_DVB_TDA18271C2DD) || \ (defined(CONFIG_DVB_TDA18271C2DD_MODULE) \ && defined(MODULE)) struct dvb_frontend *tda18271c2dd_attach(struct dvb_frontend *fe,