summaryrefslogtreecommitdiff
path: root/linux/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'linux/drivers')
-rw-r--r--linux/drivers/media/dvb/ttpci/av7110.c26
-rw-r--r--linux/drivers/media/dvb/ttpci/av7110.h1
2 files changed, 21 insertions, 6 deletions
diff --git a/linux/drivers/media/dvb/ttpci/av7110.c b/linux/drivers/media/dvb/ttpci/av7110.c
index 81dff6f7e..5641b1622 100644
--- a/linux/drivers/media/dvb/ttpci/av7110.c
+++ b/linux/drivers/media/dvb/ttpci/av7110.c
@@ -1708,9 +1708,14 @@ static struct stv0297_config nexusca_stv0297_config = {
static void av7110_fe_lock_fix(struct av7110* av7110, fe_status_t status)
{
- msleep (50);
+ int synced = (status & FE_HAS_LOCK) ? 1 : 0;
- av7110->fe_synced = (status & FE_HAS_LOCK) ? 1 : 0;
+ av7110->fe_status = status;
+
+ if (av7110->fe_synced == synced)
+ return;
+
+ av7110->fe_synced = synced;
if (av7110->playing)
return;
@@ -1723,16 +1728,23 @@ static void av7110_fe_lock_fix(struct av7110* av7110, fe_status_t status)
av7110->pids[DMX_PES_AUDIO],
av7110->pids[DMX_PES_TELETEXT], 0,
av7110->pids[DMX_PES_PCR]);
- av7110_fw_cmd(av7110, COMTYPE_PIDFILTER, Scan, 0);
+ av7110_fw_cmd(av7110, COMTYPE_PIDFILTER, Scan, 0);
} else {
- SetPIDs(av7110, 0, 0, 0, 0, 0);
- av7110_fw_cmd(av7110, COMTYPE_PIDFILTER, FlushTSQueue, 0);
+ SetPIDs(av7110, 0, 0, 0, 0, 0);
+ av7110_fw_cmd(av7110, COMTYPE_PID_FILTER, FlushTSQueue, 0);
+ msleep(50);
}
- av7110->fe_status = status;
up(&av7110->pid_mutex);
}
+static int av7110_fe_set_frontend(struct dvb_frontend* fe, struct dvb_frontend_parameters* params)
+{
+ struct av7110* av7110 = fe->dvb->priv;
+ av7110_fe_lock_fix(av7110, 0);
+ return av7110->fe_set_frontend(fe, params);
+}
+
static int av7110_fe_init(struct dvb_frontend* fe)
{
struct av7110* av7110 = fe->dvb->priv;
@@ -1919,6 +1931,8 @@ static void frontend_init(struct av7110 *av7110)
FE_FUNC_OVERRIDE(av7110->fe->ops->set_tone, av7110->fe_set_tone, av7110_fe_set_tone);
FE_FUNC_OVERRIDE(av7110->fe->ops->set_voltage, av7110->fe_set_voltage, av7110_fe_set_voltage;)
FE_FUNC_OVERRIDE(av7110->fe->ops->dishnetwork_send_legacy_command, av7110->fe_dishnetwork_send_legacy_command, av7110_fe_dishnetwork_send_legacy_command);
+ FE_FUNC_OVERRIDE(av7110->fe->ops->set_frontend, av7110->fe_set_frontend, av7110_fe_set_frontend);
+
if (dvb_register_frontend(av7110->dvb_adapter, av7110->fe)) {
printk("av7110: Frontend registration failed!\n");
if (av7110->fe->ops->release)
diff --git a/linux/drivers/media/dvb/ttpci/av7110.h b/linux/drivers/media/dvb/ttpci/av7110.h
index c7c1ce290..60ddf1281 100644
--- a/linux/drivers/media/dvb/ttpci/av7110.h
+++ b/linux/drivers/media/dvb/ttpci/av7110.h
@@ -240,6 +240,7 @@ struct av7110 {
int (*fe_set_tone)(struct dvb_frontend* fe, fe_sec_tone_mode_t tone);
int (*fe_set_voltage)(struct dvb_frontend* fe, fe_sec_voltage_t voltage);
int (*fe_dishnetwork_send_legacy_command)(struct dvb_frontend* fe, unsigned int cmd);
+ int (*fe_set_frontend)(struct dvb_frontend* fe, struct dvb_frontend_parameters* params);
};