There's two sides, the MSO and the broadcaster. The "channel number" is a mapping based upon "virtual channel tables" within the virtual channel data encapsulated within PSIP (virtual channel data is more than just PSIP and PSIP is more than just channel mapping: such as event information, system time, etc). Wikipedia has a nice simple write-up on PSIP: »en.wikipedia.org/wiki/Program_an···Protocol
TVCT - Terrestrial Virtual Channel Table : this is what your asking about... channel 13 is 13-1 on your ATSC OTA tuner
CVCT - Cable Virtual Channel Table : a cable side constructed table based on the TVCT so that the frequencies match on cable delivery. The broadcaster CAN broadcast the CVCT if all carriage companies are in agreement on the placement of the channel.
Quoted under Title 47 of FCC PART 76_MULTICHANNEL VIDEO AND CABLE TELEVISION SERVICE
Subpart K_Technical Standards
Sec. 76.640 Support for unidirectional digital cable products on digital cable systems.
(1) Digital cable systems with an activated channel capacity of 750 MHz or greater shall comply with the following technical standards and requirements:
(iv) For each digital transport stream that includes one or more services carried in-the-clear, such transport stream shall include virtual channel data in-band in the form of ATSC A/65B: ``ATSC Standard: Program and System Information Protocol for Terrestrial Broadcast and Cable (Revision B)'' (incorporated by reference, see Sec. 76.602), when available from the content provider.
MSO's are required to "pass through" PSIP data as received by the broadcaster if the MSO has at least a 750mhz bandwidth system. There is no FCC regulation that an MSO must create it's own PSIP data (but it must rebuild it if it splits multiplexed transport streams or places the channel at a different frequency).
A/65 from the ATSC as referenced above can be found here:
Under 5.2 "Requirements for Cable", the ATSC A/65 standard incorporated by reference as regulation by the FCC clearly states that either the CVCT or TVCT table must be in the PSIP stream:
5.2 Requirements for Cable
The rules governing the transport of PSIP tables for cable are:
Requirement 6: The required tables for a cable system are: the STT,either the CVCT or the TVCT, and the MGT.
The TVCT table is mandatory in OTA broadcast (mandate ON the broadcaster).
5.1 Requirements for Terrestrial Broadcast
The rules governing the transport of PSIP tables for terrestrial broadcast are:
Requirement 4: Every digital Transport Stream in terrestrial broadcast shall include the STT, the TVCT, the MGT, and the first four Event Information Tables (EIT-0, EIT-1, EIT-2 and EIT-3)7. The CVCT, all of the other EITs and the whole collection of ETTs may be present but are not required.
Both the TVCT and CVCT tables which do the "mapping" are types of VCT's, or Virtual Channel Tables defined as:
The Virtual Channel Table (VCT) contains a list of attributes for virtual channels carried in the transport Stream. Any changes in the virtual channel structure shall be conveyed with a new version number. The basic information contained in the VCT table body includes Transport Stream ID, channel number (major and minor), short channel name, program number, access controlled flag, location field for extended text messages, and service type. Additional information may be carried by descriptors which may be placed in the descriptor loop after the basic information.
The TVCT is standardized:
The Terrestrial Virtual Channel Table is carried in private sections with table_id 0xC8, and obeys the syntax and semantics given in Section 4. The following constraints apply to the Transport Stream packets carrying the VCT sections:
major_channel_number A 10-bit number that represents the major channel number associated with the virtual channel being defined in this iteration of the for loop. Each virtual channel shall be associated with a major and a minor channel number. The major channel number, along with the minor channel number, act as the users reference number for the virtual channel. The major_channel_number shall be between 1 and 99. The value of major_channel_number shall be set such that in no case is a major_channel_number/minor_channel_number pair duplicated within the TVCT. For major_channel_number assignments in the U.S., refer to Annex B.
minor_channel_number A 10-bit number in the range 0 to 999 that represents the minor or sub- channel number. This field, together with major_channel_number, performs as a two-part channel number, where minor_channel_number represents the second or right-hand part of the number. When the service_type is analog television, minor_channel_number shall be set to 0. Services whose service_type is either ATSC_digital_television or ATSC_audio_only shall use minor numbers between 1 and 99. The value of minor_channel_number shall be set such that in no case is a major_channel_number/minor_channel_number pair duplicated within the TVCT. For other types of services, such as data broadcasting, valid minor virtual channel numbers are between 1 and 999.
Long and drawn out, but this pairs with earlier paragraphs that stations that held NTSC licenses must use the old NTSC channel number as the "major_channel_number". So in my KDKA example above, KDKA must continue to use "2" as a major channel number when broadcasting OTA. Exceptions for conflicting are listed and resolved.
The CVCT table must also adhere:
Cable Virtual Channel Table
The Cable Virtual Channel Table is carried in private sections with table_id 0xC9, and obeys the syntax and semantics given in Section 4. The following constraints apply to the Transport Stream packets carrying the VCT sections:
The Cable Virtual Channel Table may be present in a terrestrial broadcast multiplex when a broadcaster has coordinated consistent channel labeling/numbering with all local cable operators carrying that multiplex, and different channel labeling and/or numbering between cable and terrestrial broadcast is desired. When both CVCT and TVCT are present in the multiplex, receiving devices are expected to use the TVCT to navigate services received via terrestrial broadcast and the CVCT to navigate services received via cable.
Two things may be affecting you:
1. Comcast is receiving via direct feed (short wave, fiber, etc... anything other than OTA) and the broadcaster is not including the CVCT table for Comcast to construct a major/minor channel number and is defaulting to the digital QAM physical location
2. Comcast is receiving terrestrially (OTA antenna) and the broadcaster is including an incomplete CVCT table
I would contact the local broadcaster's and ask them if they are giving Comcast a major/minor channel assignment and, if they are, inform them that it does not match the OTA assignment. It's up to your BROADCASTER to fix this, not Comcast, they must supply a CVCT table themselves (OTA requires agreement with ALL MSO's that are in carriage; direct feed does not) or negotiate with Comcast to populate the CVCT table with major/minor numbers as in the TVCT table and then provide said TVCT table. If you are not receiving ANY PSIP data over clear-QAM, that is different. Comcast can only provide what it receives.