summaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb/frontends/cxd2820r_core.c
diff options
context:
space:
mode:
authorGianluca Gennari2012-03-15 17:33:47 +0100
committerMauro Carvalho Chehab2012-05-15 14:28:49 +0200
commitb115f400946dba529cfa9a769c2327ae6dbe3694 (patch)
tree048746539c7570192a3b47185f765a224f442690 /drivers/media/dvb/frontends/cxd2820r_core.c
parent[media] em28xx-dvb: enable LNA for cxd2820r in DVB-T mode (diff)
downloadkernel-qcow2-linux-b115f400946dba529cfa9a769c2327ae6dbe3694.tar.gz
kernel-qcow2-linux-b115f400946dba529cfa9a769c2327ae6dbe3694.tar.xz
kernel-qcow2-linux-b115f400946dba529cfa9a769c2327ae6dbe3694.zip
[media] cxd2820r: tweak search algorithm behavior
MPIS based STBs running 3.x kernels and the Enigma2 OS are not able to tune DVB-T channels with the PCTV 290e using the current cxd2820r driver. DVB-T2 channels instead work properly. This patch fixes the problem by changing the condition to break out from the wait lock loop in the "search" function of the cxd2820r demodulator from FE_HAS_SIGNAL to FE_HAS_LOCK. As a consequence, the "search" function of the demodulator driver now returns DVBFE_ALGO_SEARCH_SUCCESS only if the frequency lock is successfully acquired. This behavior seems consistent with other demodulator drivers (e.g. stv090x, hd29l2, stv0900, stb0899, mb86a16). This patch has been successfully tested with DVB-T and DVB-T2 signals, on both PC and the mipsel STB running Enigma2. No apparent side effect has been observed on PC applications like Kaffeine. DVB-C is not available in my country so it's not tested. Signed-off-by: Gianluca Gennari <gennarone@gmail.com> Acked-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/dvb/frontends/cxd2820r_core.c')
-rw-r--r--drivers/media/dvb/frontends/cxd2820r_core.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/media/dvb/frontends/cxd2820r_core.c b/drivers/media/dvb/frontends/cxd2820r_core.c
index 5c7c2aaf9bf5..3bba37d74f57 100644
--- a/drivers/media/dvb/frontends/cxd2820r_core.c
+++ b/drivers/media/dvb/frontends/cxd2820r_core.c
@@ -526,12 +526,12 @@ static enum dvbfe_search cxd2820r_search(struct dvb_frontend *fe)
if (ret)
goto error;
- if (status & FE_HAS_SIGNAL)
+ if (status & FE_HAS_LOCK)
break;
}
/* check if we have a valid signal */
- if (status) {
+ if (status & FE_HAS_LOCK) {
priv->last_tune_failed = 0;
return DVBFE_ALGO_SEARCH_SUCCESS;
} else {