[mythtv] Ticket #1945: DVB-S/diseqc patch

Yeasah Pell yeasah at schwide.com
Thu Jul 27 17:44:19 UTC 2006


Mark Buechler wrote:

> Yeasah, I did notice a few times today something odd with your switch 
> code. The very first switch command sent (as the backend starts) 
> doesn't seem to work on either on my switches, or doesn't always work, 
> anyway. I'm wondering if your diseqc reset is throwing the switch for 
> a loop for a brief period. What's the wait time between switch 
> commands? Is this reset necessary? Tomorrow I'll test by taking out 
> the reset to see if that helps though this problem doesn't happen all 
> the time for me.
>
> - Mark.

I think I might have an idea why this is happening. For a long time, 
I've had the DVB global module parameter set to not power down the cards 
after a timeout when it's closed -- since that feature makes it a pain 
to do some kinds of things, and none of my cards run hot. I recently 
turned that feature back on as part of getting back into spiffing up the 
cx24123 driver, and I noticed a similar effect to what you've described 
in various software -- the first command would generally fail.

It wasn't hard to isolate the behavior, and at least on the card and 
diseqc devices I'm testing with, it looks like the following is true:

If the bus goes unpowered for > ~750 ms, no commands will succeed for a 
period of ~500ms after the bus power is brought back up.

This kind of behavior is not surprising to me at all, but the required 
delays are somewhat longer than I had thought they would be.

This has the following implications for the diseqc code:

1) The evidence is that a power-cycle will require on the order of ~1sec 
of off time to be effective, and as such the hard_reset functionality 
should probably be removed from the code (since nobody wants to wait a 
whole second, and most people will be using the 
voltage-off-when-device-is-closed feature so it should be coming up from 
zero anyway)

2) When a device is first opened and the FE_SET_VOLTAGE command is 
issued to bring up the bus, it should imply at least a 500ms wait before 
sending any commands to allow everything to reach a sane state. That's 
an annoyingly long time to wait, but I don't see any alternative.

I'll prepare a patch when I have a chance.

-y


More information about the mythtv-dev mailing list