Mailing List archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[linux-dvb] Re: TT DVB-T - Further problems
Sunday, 20. April 2003 16:52 Ed Wildgoose wrote:
> b) after changing channel more than a dozen or so times the driver
> appears to lock up, picture disappears from both TV output and also
> /dev/dvb devices.... No errors in the log, everything still "appears" to
> work fine, just no picture...
Can everybody who has tuning problems with the TT DVB-T card please try the
attached patch and report if it gives any improvement. This code is from
Holgers sp8872 driver and forces the card to use the given frontend
parameters.
I also would like to know if this tuning problems also appear with the windows
driver. My card doesn't has this problem so I can't test it myself.
Juergen
--------------------------------------------------------------------------------------------------------
--- DVB_CVS/DVB/driver/frontends/alps_tdlb7.c Mon Mar 17 11:47:34 2003
+++ DVB_CVS_NEW/DVB/driver/frontends/alps_tdlb7.c Mon Apr 21 01:01:33 2003
@@ -287,6 +287,78 @@
static
+int configure_reg0xc05 (struct dvb_frontend_parameters *p, u16 *reg0xc05)
+{
+ int known_parameters = 1;
+
+ *reg0xc05 = 0x000;
+ switch (p->u.ofdm.constellation) {
+ case QPSK:
+ break;
+ case QAM_16:
+ *reg0xc05 |= (1 << 10);
+ break;
+ case QAM_64:
+ *reg0xc05 |= (2 << 10);
+ break;
+ case QAM_AUTO:
+ known_parameters = 0;
+ break;
+ default:
+ return -EINVAL;
+ };
+
+ switch (p->u.ofdm.hierarchy_information) {
+ case HIERARCHY_NONE:
+ break;
+ case HIERARCHY_1:
+ *reg0xc05 |= (1 << 7);
+ break;
+ case HIERARCHY_2:
+ *reg0xc05 |= (2 << 7);
+ break;
+ case HIERARCHY_4:
+ *reg0xc05 |= (3 << 7);
+ break;
+ case HIERARCHY_AUTO:
+ known_parameters = 0;
+ break;
+ default:
+ return -EINVAL;
+ };
+
+ switch (p->u.ofdm.code_rate_HP) {
+ case FEC_1_2:
+ break;
+ case FEC_2_3:
+ *reg0xc05 |= (1 << 3);
+ break;
+ case FEC_3_4:
+ *reg0xc05 |= (2 << 3);
+ break;
+ case FEC_5_6:
+ *reg0xc05 |= (3 << 3);
+ break;
+ case FEC_7_8:
+ *reg0xc05 |= (4 << 3);
+ break;
+ case FEC_AUTO:
+ known_parameters = 0;
+ break;
+ default:
+ return -EINVAL;
+ };
+
+ if (known_parameters){
+ *reg0xc05 |= (2 << 1); /* use specified parameters */
+ } else {
+ *reg0xc05 |= (1 << 1); /* enable autoprobing */
+ }
+ return 0;
+}
+
+
+static
int tdlb7_ioctl (struct dvb_frontend *fe, unsigned int cmd, void *arg)
{
struct dvb_i2c_bus *i2c = fe->i2c;
@@ -352,13 +424,21 @@
case FE_SET_FRONTEND:
{
+ u16 reg0xc05;
+ int err;
struct dvb_frontend_parameters *p = arg;
+ if ((err = configure_reg0xc05(p, ®0xc05)))
+ return err;
+
// system controller stop
sp8870_writereg(i2c,0x0F00,0x0000);
sp5659_set_tv_freq (i2c, p->frequency);
+ /* read status reg in order to clear pending irqs */
+ sp8870_readreg(i2c, 0x200);
+
// sample rate correction bit [23..17]
sp8870_writereg(i2c,0x0319,0x000A);
@@ -384,6 +464,8 @@
sp8870_writereg(i2c,0x0338,0x0000);
else
sp8870_writereg(i2c,0x0338,0x0001);
+
+ sp8870_writereg(i2c, 0xc05, reg0xc05);
// instruction RAM register loword
sp8870_writereg(i2c,0x0F09,0x0000);
--
Info:
To unsubscribe send a mail to listar@linuxtv.org with "unsubscribe linux-dvb" as subject.
Home |
Main Index |
Thread Index