Opened 14 years ago

Closed 14 years ago

#518 closed defect (fixed)

diseqc retry appears to be incorrect

Reported by: Dibblahmythml0015@… Owned by: danielk
Priority: minor Milestone: 0.19
Component: mythtv Version: head
Severity: medium Keywords:
Cc: Ticket locked: no

Description

Instead of retrying up to a maximum of 64 times, the current code will always try to send the command 64 times, returning false if any of these attempts fail.

The symptoms of this were: 2005-10-24 12:29:45.095 DVB#0 Setting LNB: Tone OFF 18V repeated 64 times on each transport change.

The attached (soon) patch corrects this behavior, shaving a second or so from each dvb-s transport in a scan.

Attachments (8)

mythdiseqcretry.diff (526 bytes) - added by Dibblahmythml0015@… 14 years ago.
Patch for the above issue
mythdiseqctonevoltagefix.diff (591 bytes) - added by Dibblah 14 years ago.
mythdiseqctonevoltagefix2.diff (592 bytes) - added by Dibblah 14 years ago.
mythdiseqcupdate-1.patch (4.4 KB) - added by Dibblah 14 years ago.
Replaces Diseqc1xSwitch_10way with a generalised Diseqc1xSwitch
mythdiseqcupdate-2.patch (1.8 KB) - added by Dibblah 14 years ago.
Sets havetuned to true even if nothing was changed
mythdiseqcupdate-3.patch (4.0 KB) - added by Dibblah 14 years ago.
Changes the 'GENERAL' output to 'CHANNEL'
mythdiseqcupdate-all.patch (9.3 KB) - added by Dibblah 14 years ago.
All of the above (1-3) patches, for ease of application.
mythdiseqcupdate-4.patch (766 bytes) - added by Dibblah 14 years ago.
Header update required for mythdiseqcupdate-1.patch

Download all attachments as: .zip

Change History (15)

Changed 14 years ago by Dibblahmythml0015@…

Attachment: mythdiseqcretry.diff added

Patch for the above issue

comment:1 Changed 14 years ago by danielk

Can you provide some supporting documentation for this?

AFAIK none of the MythTV committers has a DisEqC device.

Kenneth Aafloy wrote this code initially maybe 2 years ago, but there is little documentation in the code. I need some pointers documentation in leu of actually being able to test this myself.

My assumption was that a series of commands were being sent and havetuned would be set long before the loop reached 64. Initially this was in an infite loop, but people were getting stuck in it so I capped the loop at 64 DVBDiSEqC::Set()'s.

Changed 14 years ago by Dibblah

Changed 14 years ago by Dibblah

comment:2 Changed 14 years ago by Dibblah

Okay, your comments prompted me to look a little deeper at this.

What is supposed to happen each time round that loop is a sequence of commands is sent to any diseqc / tone / voltage device. This is the complete sequence of commands to switch to the required input- There appears to be no concept of "chaining" a switch.

You are correct that havetuned should be set, but isn't. I'm still working on the second patch above, which really fixes the cause of the looping (If reset was set, or no changes needed to be made, havetuned never gets set).

However, I still think that dropping out on a single failure is not a good idea, since an ioctl can fail on a dvb-s device, due to a command still sending, etc, causing the bus to be busy.

comment:3 Changed 14 years ago by Dibblah

Please ignore the two mythdiseqctonevoltagefix patches at the moment. I can't remove them, but they're so broken I'm embarassed they're there :)

I'm working towards a better patch.

Changed 14 years ago by Dibblah

Attachment: mythdiseqcupdate-1.patch added

Replaces Diseqc1xSwitch_10way with a generalised Diseqc1xSwitch

Changed 14 years ago by Dibblah

Attachment: mythdiseqcupdate-2.patch added

Sets havetuned to true even if nothing was changed

Changed 14 years ago by Dibblah

Attachment: mythdiseqcupdate-3.patch added

Changes the 'GENERAL' output to 'CHANNEL'

Changed 14 years ago by Dibblah

Attachment: mythdiseqcupdate-all.patch added

All of the above (1-3) patches, for ease of application.

comment:4 Changed 14 years ago by Dibblah

  • attachment mythdiseqcupdate-1.patch:

Replaces Diseqc1xSwitch_10way with a generalised Diseqc1xSwitch

  • attachment mythdiseqcupdate-2.patch:

Sets havetuned to true even if nothing was changed

  • attachment mythdiseqcupdate-3.patch:

Changes the 'GENERAL' output to 'CHANNEL'

  • attachment mythdiseqcupdate-all.patch:

All of the above (1-3) patches, for ease of application.

All of the above patches should be pretty self explanatory.

Patch 3 will have two hunks rejected if applied after patch 1, since some of the GENERAL('s have been removed.

The patches are self-contained, and apply cleanly to 7567.

Changed 14 years ago by Dibblah

Attachment: mythdiseqcupdate-4.patch added

Header update required for mythdiseqcupdate-1.patch

comment:5 Changed 14 years ago by danielk

(In [7615]) References #518.

Dibblah's generaliztion of 10x DisEqC switch to N-Way DisEqC switch.

Currently it supports 2, 4, and 10 way switches, but more switch types could be easily added.

comment:6 Changed 14 years ago by danielk

(In [7616]) References #518.

Fixes the havetuned status setting in DVBDiSEqC by applying Dibblah's 3rd patch.

comment:7 Changed 14 years ago by danielk

Resolution: fixed
Status: newclosed

(In [7617]) Closes #518, by doing the cleanup portion of the fix.

I didn't use the patch, because using the CHANNEL and ERRNO macros aren't really the proper way to do this either.

But I did change all those informative messages to VB_CHANNEL as in the patch.

Note: See TracTickets for help on using tickets.