From 7af71dfdcb9b5363a8fde03a4579e5ce896f1916 Mon Sep 17 00:00:00 2001 From: none Date: Tue, 9 Mar 2021 14:23:06 +0100 Subject: [PATCH 1/2] lock ldpc bitrate adjustment to prevent race condition during tuner stop --- ddbridge/ddbridge-sx8.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/ddbridge/ddbridge-sx8.c b/ddbridge/ddbridge-sx8.c index 8160a92..b713860 100644 --- a/ddbridge/ddbridge-sx8.c +++ b/ddbridge/ddbridge-sx8.c @@ -147,11 +147,14 @@ static int read_status(struct dvb_frontend *fe, enum fe_status *status) if (res.status == MCI_DEMOD_LOCKED) { *status = 0x1f; if (state->mci.signal_info.dvbs2_signal_info.standard == 2) { - sx8_base->used_ldpc_bitrate[state->mci.nr] = - p->symbol_rate * - dvbs2_bits_per_symbol[ - state->mci.signal_info. - dvbs2_signal_info.pls_code]; + mutex_lock(&mci_base->tuner_lock); + if (state->started) + sx8_base->used_ldpc_bitrate[state->mci.nr] = + p->symbol_rate * + dvbs2_bits_per_symbol[ + state->mci.signal_info. + dvbs2_signal_info.pls_code]; + mutex_unlock(&mci_base->tuner_lock); } else sx8_base->used_ldpc_bitrate[state->mci.nr] = 0; } From a2d39f90d57126428102220cb0c9c6096e78fb6c Mon Sep 17 00:00:00 2001 From: none Date: Tue, 9 Mar 2021 20:21:09 +0100 Subject: [PATCH 2/2] add module parameter for disabling voltage output in Max cards. --- ddbridge/ddbridge-max.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ddbridge/ddbridge-max.c b/ddbridge/ddbridge-max.c index 8816afe..72b8c80 100644 --- a/ddbridge/ddbridge-max.c +++ b/ddbridge/ddbridge-max.c @@ -40,6 +40,10 @@ static int old_quattro; module_param(old_quattro, int, 0444); MODULE_PARM_DESC(old_quattro, "old quattro LNB input order "); +static int no_voltage; +module_param(no_voltage, int, 0444); +MODULE_PARM_DESC(no_voltage, "Do not enable voltage on LNBH (will also disable 22KHz tone)."); + /* MAX LNB interface related functions */ static int lnb_command(struct ddb *dev, u32 link, u32 lnb, u32 cmd) @@ -164,6 +168,8 @@ static int lnb_set_voltage(struct ddb *dev, u32 link, u32 input, { int s = 0; + if (no_voltage) + voltage = SEC_VOLTAGE_OFF; if (dev->link[link].lnb.oldvoltage[input] == voltage) return 0; switch (voltage) {