summaryrefslogtreecommitdiff
path: root/linux/drivers/media/dvb
diff options
context:
space:
mode:
authorOliver Endriss <devnull@localhost>2004-12-01 00:44:45 +0000
committerOliver Endriss <devnull@localhost>2004-12-01 00:44:45 +0000
commitda58cf8502cca40e9d3ac205d47ee4c6b842a03d (patch)
tree0e06feb597684454efae9d3ca628d5523e65f87e /linux/drivers/media/dvb
parent561aabb441883dd7ea9324a06228caa2da1cd352 (diff)
downloadmediapointer-dvb-s2-da58cf8502cca40e9d3ac205d47ee4c6b842a03d.tar.gz
mediapointer-dvb-s2-da58cf8502cca40e9d3ac205d47ee4c6b842a03d.tar.bz2
preliminary fix of broken av7110_fe_lock_fix() workaround:
- call av7110_fe_lock_fix() from set_frontend ioctl - clear pids only once - sleep 50ms after clearing pids
Diffstat (limited to 'linux/drivers/media/dvb')
-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);
};