diff --git a/lib/src/config.c b/lib/src/config.c index 53e9943..05e23d9 100644 --- a/lib/src/config.c +++ b/lib/src/config.c @@ -41,7 +41,7 @@ int parse_config(struct dddvb *dd, char *name, char *sec, memcpy(fname + config_len, "dddvb.conf", 11); if ((f = fopen (fname, "r")) == NULL) { - printf("config file %s not found\n", fname); + dprintf(2, "config file %s not found\n", fname); return -1; } diff --git a/lib/src/dddvb.c b/lib/src/dddvb.c index aa85a8b..b011a04 100644 --- a/lib/src/dddvb.c +++ b/lib/src/dddvb.c @@ -8,7 +8,7 @@ LIBDDDVB_EXPORTED struct dddvb *global_dd = NULL; LIBDDDVB_EXPORTED pthread_mutex_t dddvb_mutex = PTHREAD_MUTEX_INITIALIZER; void __attribute__ ((constructor)) setup(void) { - printf("SETUP\n"); + //printf("SETUP\n"); } LIBDDDVB_EXPORTED struct dddvb_fe *dddvb_fe_alloc_num(struct dddvb *dd, uint32_t type, uint32_t num) diff --git a/lib/src/dvb.c b/lib/src/dvb.c index adcf52f..76a70c3 100644 --- a/lib/src/dvb.c +++ b/lib/src/dvb.c @@ -231,7 +231,7 @@ static int set_en50607(struct dddvb_fe *fe, uint32_t freq, uint32_t sr, uint32_t input = 3 & (sat >> 6); int fd = fe->fd; - //printf("input = %u, sat = %u\n", input, sat&0x3f); + dbgprintf(DEBUG_DVB, "input = %u, sat = %u\n", input, sat&0x3f); hor &= 1; cmd.msg[1] = slot << 3; cmd.msg[1] |= ((t >> 8) & 0x07); @@ -323,7 +323,7 @@ static int tune_sat(struct dddvb_fe *fe) if (input != DDDVB_UNDEF) { input = 3 & (input >> 6); - printf("input = %u\n", input); + dbgprintf(DEBUG_DVB, "input = %u\n", input); } diseqc(fe->fd, lnb, fe->param.param[PARAM_POL], hi); set_fe_input(fe, freq, fe->param.param[PARAM_SR], ds, input); @@ -349,7 +349,7 @@ static int tune_c(struct dddvb_fe *fe) struct dtv_properties c; int ret; - printf("tune_c()\n"); + dbgprintf(DEBUG_DVB, "tune_c()\n"); set_property(fe->fd, DTV_DELIVERY_SYSTEM, SYS_DVBC_ANNEX_A); c.num = ARRAY_SIZE(p); @@ -376,7 +376,7 @@ static int tune_j83b(struct dddvb_fe *fe) struct dtv_properties c; int ret; - printf("tune_j83b()\n"); + dbgprintf(DEBUG_DVB, "tune_j83b()\n"); set_property(fe->fd, DTV_DELIVERY_SYSTEM, SYS_DVBC_ANNEX_B); c.num = ARRAY_SIZE(p); @@ -542,7 +542,7 @@ static int tune(struct dddvb_fe *fe) { int ret; - printf("tune()\n"); + dbgprintf(DEBUG_DVB, "tune()\n"); switch (fe->param.param[PARAM_MSYS]) { case SYS_DVBS: case SYS_DVBS2: diff --git a/lib/src/tools.c b/lib/src/tools.c index 9592095..9c787b8 100644 --- a/lib/src/tools.c +++ b/lib/src/tools.c @@ -13,7 +13,7 @@ int sendlen(int sock, char *buf, int len) for (todo = len; todo; todo -= done, buf += done) if ((done = send(sock, buf, todo, 0)) < 0) { - printf("sendlen error\n"); + dprintf(2, "sendlen error\n"); return done; } return len;