diff options
author | Michael Krufky <mkrufky@linuxtv.org> | 2008-11-16 18:48:31 -0500 |
---|---|---|
committer | Michael Krufky <mkrufky@linuxtv.org> | 2008-11-16 18:48:31 -0500 |
commit | c48b2e1ef1551ce2b3985730c76b1aa97f653b1b (patch) | |
tree | 0c36e4f4e87ac49930398cac20ada4a4f8513aeb /linux/drivers/media/common | |
parent | 34741e4ed101a3989335c03aaaa0c0e7d20f3e94 (diff) | |
download | mediapointer-dvb-s2-c48b2e1ef1551ce2b3985730c76b1aa97f653b1b.tar.gz mediapointer-dvb-s2-c48b2e1ef1551ce2b3985730c76b1aa97f653b1b.tar.bz2 |
xc5000: do not sleep after digital tuning
From: Devin Heitmueller <devin.heitmueller@gmail.com>
Don't sleep for 400ms polling the tuner's lock if in digital mode (since the
xc5000 lock status registers appear to only be reliable in analog mode)
Priority: normal
Signed-off-by: Devin Heitmueller <devin.heitmueller@gmail.com>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Diffstat (limited to 'linux/drivers/media/common')
-rw-r--r-- | linux/drivers/media/common/tuners/xc5000.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/linux/drivers/media/common/tuners/xc5000.c b/linux/drivers/media/common/tuners/xc5000.c index 20e54014a..42836d695 100644 --- a/linux/drivers/media/common/tuners/xc5000.c +++ b/linux/drivers/media/common/tuners/xc5000.c @@ -509,7 +509,9 @@ static u16 WaitForLock(struct xc5000_priv *priv) return lockState; } -static int xc_tune_channel(struct xc5000_priv *priv, u32 freq_hz) +#define XC_TUNE_ANALOG 0 +#define XC_TUNE_DIGITAL 1 +static int xc_tune_channel(struct xc5000_priv *priv, u32 freq_hz, int mode) { int found = 0; @@ -518,8 +520,10 @@ static int xc_tune_channel(struct xc5000_priv *priv, u32 freq_hz) if (xc_set_RF_frequency(priv, freq_hz) != XC_RESULT_SUCCESS) return 0; - if (WaitForLock(priv) == 1) - found = 1; + if (mode == XC_TUNE_ANALOG) { + if (WaitForLock(priv) == 1) + found = 1; + } return found; } @@ -681,7 +685,7 @@ static int xc5000_set_params(struct dvb_frontend *fe, return -EIO; } - xc_tune_channel(priv, priv->freq_hz); + xc_tune_channel(priv, priv->freq_hz, XC_TUNE_DIGITAL); if (debug) xc_debug_dump(priv); @@ -788,7 +792,7 @@ tune_channel: return -EREMOTEIO; } - xc_tune_channel(priv, priv->freq_hz); + xc_tune_channel(priv, priv->freq_hz, XC_TUNE_ANALOG); if (debug) xc_debug_dump(priv); |