[linux-dvb] [PATCH] Garbage diseqc messages emitted by bt8xx/dst module

Gnome42 Gnome42 gnome42 at gmail.com
Fri Jun 9 23:10:52 CEST 2006


> Here's the latest patch I've got. List of changes:
>
> * 5-byte diseqc for supporting cards (USALS support)
> * Fixes garbage commands caused by tone/power and tuner command buffer
> conflict.
> * Mini-DiSEqC commands corrected based on observations with a scope.
> * More reliable about changing desired LNB voltage (though it still
> won't switch it until tuning)
> * Error reporting is much more thorough -- any failed commands should
> now return a failure code for the ioctl. If you see applications
> erroring out with failed ioctls, this is why. But it's much better this
> way -- the command would have failed either way, but now the application
> is told about it, and can retry, etc. -- or even better, we can actually
> fix any problems that are revealed.
> * Doesn't update internal state on unsuccessful commands to avoid cached
> state diverging from real state.
> * Avoids resending redundant tone/power commands.

It applied cleanly but it didn't work, maybe it never turned the power on?

I took a guess and made these changes, now it is working again...

--- dst.c.yeasah_jun9   2006-06-09 17:03:33.000000000 -0400
+++ dst.c       2006-06-09 17:03:56.000000000 -0400
@@ -1243,11 +1243,11 @@
        case SEC_VOLTAGE_18:
        case SEC_VOLTAGE_OFF:
                dst_set_polarization(state);
+               state->voltage = voltage;
                retval = dst_tone_power_cmd(state);
-               if(retval == 0)
+               if (retval == 0)
                {
-                       state->voltage = voltage;
-                       if(voltage == SEC_VOLTAGE_OFF)
+                       if (voltage != SEC_VOLTAGE_OFF)
                                state->diseq_flags |= HAS_POWER;
                        else
                                state->diseq_flags &= ~(HAS_POWER |
HAS_LOCK | ATTEMPT_TUNE);



More information about the linux-dvb mailing list