aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/common/tuners
diff options
context:
space:
mode:
authorDevin Heitmueller <devin.heitmueller@gmail.com>2008-11-16 18:48:31 -0500
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-06-16 17:21:05 -0400
commita78baacffe910bfdce2e08e93b31e702cc811114 (patch)
treefae1b56f029f63622e51f808949fa5a2ebdb3890 /drivers/media/common/tuners
parent8e4c67972e6c7d65903a31a2d9969da38157860b (diff)
V4L/DVB (11791): xc5000: do not sleep after digital tuning
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) Signed-off-by: Devin Heitmueller <devin.heitmueller@gmail.com> Signed-off-by: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/common/tuners')
-rw-r--r--drivers/media/common/tuners/xc5000.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/drivers/media/common/tuners/xc5000.c b/drivers/media/common/tuners/xc5000.c
index bf2fdb36e954..c9e72ae94fbb 100644
--- a/drivers/media/common/tuners/xc5000.c
+++ b/drivers/media/common/tuners/xc5000.c
@@ -490,7 +490,9 @@ static u16 WaitForLock(struct xc5000_priv *priv)
490 return lockState; 490 return lockState;
491} 491}
492 492
493static int xc_tune_channel(struct xc5000_priv *priv, u32 freq_hz) 493#define XC_TUNE_ANALOG 0
494#define XC_TUNE_DIGITAL 1
495static int xc_tune_channel(struct xc5000_priv *priv, u32 freq_hz, int mode)
494{ 496{
495 int found = 0; 497 int found = 0;
496 498
@@ -499,8 +501,10 @@ static int xc_tune_channel(struct xc5000_priv *priv, u32 freq_hz)
499 if (xc_set_RF_frequency(priv, freq_hz) != XC_RESULT_SUCCESS) 501 if (xc_set_RF_frequency(priv, freq_hz) != XC_RESULT_SUCCESS)
500 return 0; 502 return 0;
501 503
502 if (WaitForLock(priv) == 1) 504 if (mode == XC_TUNE_ANALOG) {
503 found = 1; 505 if (WaitForLock(priv) == 1)
506 found = 1;
507 }
504 508
505 return found; 509 return found;
506} 510}
@@ -662,7 +666,7 @@ static int xc5000_set_params(struct dvb_frontend *fe,
662 return -EIO; 666 return -EIO;
663 } 667 }
664 668
665 xc_tune_channel(priv, priv->freq_hz); 669 xc_tune_channel(priv, priv->freq_hz, XC_TUNE_DIGITAL);
666 670
667 if (debug) 671 if (debug)
668 xc_debug_dump(priv); 672 xc_debug_dump(priv);
@@ -769,7 +773,7 @@ tune_channel:
769 return -EREMOTEIO; 773 return -EREMOTEIO;
770 } 774 }
771 775
772 xc_tune_channel(priv, priv->freq_hz); 776 xc_tune_channel(priv, priv->freq_hz, XC_TUNE_ANALOG);
773 777
774 if (debug) 778 if (debug)
775 xc_debug_dump(priv); 779 xc_debug_dump(priv);