aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@infradead.org>2006-08-06 16:03:50 -0400
committerMauro Carvalho Chehab <mchehab@infradead.org>2006-09-26 10:53:51 -0400
commitd93f8860cc55504b376b38b95d22efeb3cc10edd (patch)
tree0e159ad8062ae6c5cc5fe4d8a8310f52324c4fe1 /drivers/media
parent8a36ecf0f4c0861330cc9e69885b0502fedac14a (diff)
V4L/DVB (4477): Improve hardware algorithm by setting the appropriate registers
Hardware algorithm needs to be configured to: 1) Increase timeout constants, to detect weaker signals; 2) do a wider zigzag search. Acked-by: Manu Abraham <manu@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/dvb/frontends/cx24123.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/media/dvb/frontends/cx24123.c b/drivers/media/dvb/frontends/cx24123.c
index 6fd44a125b13..f77b2d59955c 100644
--- a/drivers/media/dvb/frontends/cx24123.c
+++ b/drivers/media/dvb/frontends/cx24123.c
@@ -191,7 +191,7 @@ static struct {
191 {0x06, 0x31}, /* MPEG (default) */ 191 {0x06, 0x31}, /* MPEG (default) */
192 {0x0b, 0x00}, /* Freq search start point (default) */ 192 {0x0b, 0x00}, /* Freq search start point (default) */
193 {0x0c, 0x00}, /* Demodulator sample gain (default) */ 193 {0x0c, 0x00}, /* Demodulator sample gain (default) */
194 {0x0d, 0x02}, /* Frequency search range = Fsymbol / 4 (default) */ 194 {0x0d, 0x7f}, /* Force driver to shift until the maximum (+-10 MHz) */
195 {0x0e, 0x03}, /* Default non-inverted, FEC 3/4 (default) */ 195 {0x0e, 0x03}, /* Default non-inverted, FEC 3/4 (default) */
196 {0x0f, 0xfe}, /* FEC search mask (all supported codes) */ 196 {0x0f, 0xfe}, /* FEC search mask (all supported codes) */
197 {0x10, 0x01}, /* Default search inversion, no repeat (default) */ 197 {0x10, 0x01}, /* Default search inversion, no repeat (default) */
@@ -222,6 +222,7 @@ static struct {
222 {0x46, 0x0d}, /* Symbol rate estimator on (default) */ 222 {0x46, 0x0d}, /* Symbol rate estimator on (default) */
223 {0x56, 0xc1}, /* Error Counter = Viterbi BER */ 223 {0x56, 0xc1}, /* Error Counter = Viterbi BER */
224 {0x57, 0xff}, /* Error Counter Window (default) */ 224 {0x57, 0xff}, /* Error Counter Window (default) */
225 {0x5c, 0x20}, /* Acquisition AFC Expiration window (default is 0x10) */
225 {0x67, 0x83}, /* Non-DCII symbol clock */ 226 {0x67, 0x83}, /* Non-DCII symbol clock */
226}; 227};
227 228
@@ -779,13 +780,15 @@ static int cx24123_read_status(struct dvb_frontend* fe, fe_status_t* status)
779 if (lock & 0x01) 780 if (lock & 0x01)
780 *status |= FE_HAS_SIGNAL; 781 *status |= FE_HAS_SIGNAL;
781 if (sync & 0x02) 782 if (sync & 0x02)
782 *status |= FE_HAS_CARRIER; 783 *status |= FE_HAS_CARRIER; /* Phase locked */
783 if (sync & 0x04) 784 if (sync & 0x04)
784 *status |= FE_HAS_VITERBI; 785 *status |= FE_HAS_VITERBI;
786
787 /* Reed-Solomon Status */
785 if (sync & 0x08) 788 if (sync & 0x08)
786 *status |= FE_HAS_SYNC; 789 *status |= FE_HAS_SYNC;
787 if (sync & 0x80) 790 if (sync & 0x80)
788 *status |= FE_HAS_LOCK; 791 *status |= FE_HAS_LOCK; /*Full Sync */
789 792
790 return 0; 793 return 0;
791} 794}
@@ -812,6 +815,7 @@ static int cx24123_read_ber(struct dvb_frontend* fe, u32* ber)
812static int cx24123_read_signal_strength(struct dvb_frontend* fe, u16* signal_strength) 815static int cx24123_read_signal_strength(struct dvb_frontend* fe, u16* signal_strength)
813{ 816{
814 struct cx24123_state *state = fe->demodulator_priv; 817 struct cx24123_state *state = fe->demodulator_priv;
818
815 *signal_strength = cx24123_readreg(state, 0x3b) << 8; /* larger = better */ 819 *signal_strength = cx24123_readreg(state, 0x3b) << 8; /* larger = better */
816 820
817 dprintk("%s: Signal strength = %d\n",__FUNCTION__,*signal_strength); 821 dprintk("%s: Signal strength = %d\n",__FUNCTION__,*signal_strength);