[mythtv] Partial lock, Program not found in PAT

Daniel Kristjansson danielk at cuymedia.net
Sat May 12 13:23:20 UTC 2007

On Sat, 2007-05-12 at 01:39 -0400, Patrick Reynolds wrote:
> I have several DVB (ATSC) channels that tune properly in mplayer but not
> in MythTV.  I think I've figured out why.  I know there have been several
> threads already on both "partial lock" and "Program ## not found in PAT,"
> but I think what I've found and fixed is new.  I have DViCO Fustion 5 Lite
> and Technisat b2c2 (rev.2) tuners, both of which support QAM.  They both
> exhibit the same inability to tune some channels that mplayer tunes fine.
> Neither one appears to offer "Quick tuning," which other people used to
> work around one or both of these problems.
> My cable operator (Time Warner in Central New York) appears to send
> alternating good and bad PATs for some, but not all, channels.  For the
> channels where this happens, the bad PATs take a form like:
> #1.  Quick and dirty.  Just remove the 8 lines beginning with
>          if (pat->ProgramCount() == 1)
>       in libs/libmythtv/dtvsignalmonitor.cpp.  We shouldn't fall back on
>       the wrong program just because we got one garbled PAT.
> #2.  Look for both programs (in the above case, 5 and 0) until either is
>       locked.  Since 0 is bogus, maybe don't look for that.
> #3.  Distinguish between Network_PID and Program_map_PID.  dvbsnoop can
>       tell the difference.  AFAICT, if the program number is 0, the PID
>       is a Network_PID; otherwise, it's a Program_map_PID.  IOW, MythTV
>       should never try to tune a program number of 0.
> I'm new to DVB and the Myth source.  I implemented #1 because it was
> easiest and it works for me.  If someone else is relying on the "one PID,
> so it must be right" code, maybe #3 is a better bet.

If #1 works I think if we only implement the programCount == 1
hack after seeing say five PAT tables we should be fine for
both people that need this hack and for you. I'm concerned that
you will lose the tune later on though, what if your cable
provider bumps the version of the network PAT, then MythTV
could get confused again.

#2 & #3, 0 can be a non-bogus program, when ATSC came out it was
simply not recommended that you use it. Now MPEG-2 specifies
that you shouldn't use it unless you use it in the DVB sense,
but there are a lot of broadcasters out there with sub-optimal
settings. As you can see from your cable provider's streams
even standards requirements are ignored, think of how
recommendations are treated...

-- Daniel

More information about the mythtv-dev mailing list