The patch number 9774 was added via Mauro Carvalho Chehab <[EMAIL PROTECTED]>
to http://linuxtv.org/hg/v4l-dvb master development tree.
Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel
If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]
------
From: Mauro Carvalho Chehab <[EMAIL PROTECTED]>
tda827x: fix returned frequency
Probably due to a removed code, tda827x were doing some wrong calculus at the
returned frequency. I suspect that the original idea were to return the
programmed divisor converted into frequency again.
However, the current code is sometimes multiplying the programmed frequency by
62500, and, on other cases, like radio, it dividing it by 1000.
Instead of doing such math, let's just store the frequency value as requested by
the caller module.
CC: Michael Krufky <[EMAIL PROTECTED]>
Signed-off-by: Mauro Carvalho Chehab <[EMAIL PROTECTED]>
---
linux/drivers/media/common/tuners/tda827x.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff -r 049b024795a0 -r 291a596b7f34 linux/drivers/media/common/tuners/tda827x.c
--- a/linux/drivers/media/common/tuners/tda827x.c Mon Dec 08 00:01:57
2008 -0200
+++ b/linux/drivers/media/common/tuners/tda827x.c Mon Dec 08 01:49:33
2008 -0200
@@ -201,7 +201,7 @@ static int tda827xo_set_params(struct dv
fe->ops.i2c_gate_ctrl(fe, 1);
i2c_transfer(priv->i2c_adap, &msg, 1);
- priv->frequency = tuner_freq - if_freq; // FIXME
+ priv->frequency = params->frequency;
priv->bandwidth = (fe->ops.info.type == FE_OFDM) ?
params->u.ofdm.bandwidth : 0;
return 0;
@@ -306,7 +306,7 @@ static int tda827xo_set_analog_params(st
reg2[1] = 0x08; /* Vsync en */
i2c_transfer(priv->i2c_adap, &msg, 1);
- priv->frequency = freq * 62500;
+ priv->frequency = params->frequency;
return 0;
}
@@ -593,7 +593,7 @@ static int tda827xa_set_params(struct dv
fe->ops.i2c_gate_ctrl(fe, 1);
i2c_transfer(priv->i2c_adap, &msg, 1);
- priv->frequency = tuner_freq - if_freq; // FIXME
+ priv->frequency = params->frequency;
priv->bandwidth = (fe->ops.info.type == FE_OFDM) ?
params->u.ofdm.bandwidth : 0;
return 0;
@@ -693,7 +693,7 @@ static int tda827xa_set_analog_params(st
tuner_reg[1] = 0x19 + (priv->lpsel << 1);
i2c_transfer(priv->i2c_adap, &msg, 1);
- priv->frequency = freq * 62500;
+ priv->frequency = params->frequency;
return 0;
}
---
Patch is available at:
http://linuxtv.org/hg/v4l-dvb/rev/291a596b7f34255d807a3ef48a9455483dee885b
_______________________________________________
linuxtv-commits mailing list
[email protected]
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits