[mythtv] ATSC Minor Subchannel Chopped Off

mythtv-dev+list at monmotha.net mythtv-dev+list at monmotha.net
Mon May 29 06:05:31 UTC 2006

The ATSC Minor subchannel is currently being packed into the bottom 8
bits of the atscsrcid column in the channel table.  This works fine for
most OTA broadcasts which use small minor channel numbers, but my cable
provider uses large numbers, often up in the 700s.  The ATSC spec
appears to allow up to 999, so 8 bits is clearly not sufficient.

As an example, Bright House Networks in Carmel, IN uses 1008-713 for
their unencrypted transmission of WTHR, the local NBC affiliate.  Since
this is > 255, when the minor is unpacked and the CVT lookup is
attempted, MythTV looks for minor channel 102, not 713.  Of course this
doesn't exist in this case, so it just sits forever waiting.  News
Channel 64 is placed on 1008-244, so it works fine as this fits in 8 bits.

See libs/libmythtv/dvbchannel.cpp on line 377 for where the unpacking is

Two options:
*Expand the bitfield to 10 bits, giving room for all 999 possible
subchannels.  This would be in line with the current method
*Don't pack the major/minor and instead use two columns.  This is what I
would consider more sensible and it has the bonus of making things
easier to see for people who for whatever reason need to talk to the
database directly

Unfortunately, either one of these effectively changes the DB schema.  I
haven't tried either of them, but this certainly seems to be the problem
given the log messages and behavior I'm seeing.  If there is a preferred
solution, I can make the change and test things out locally before a
patch is committed.  Only ATSC users should be affected by the change
from what I can tell (though someone who actually knows the DVB code
should confirm this).


More information about the mythtv-dev mailing list