[mythtv] [patch] QAM / ATSC Frequencies patch for SD/HD

tracy at amphibious.org tracy at amphibious.org
Thu Mar 24 05:54:48 UTC 2005


This is my first patch, so hopefully this is the correctl method.

This patch adds ATSC and QAM256 frequency tables.  With these tables and
an appropriate DTV card (I have an Air2PC PCI), you can now use "Full Scan" to easily
add all available channels instead of manually adding each frequency as
described at http://www.digitalregime.com/mythdvb/setup/.

P.S.  Thanks for a great tool!  I was able to grab setup MythTV and successfully 
record HD/SD channels within a day!


-------------- next part --------------
Index: libs/libmythtv/frequencies.c
===================================================================
RCS file: /var/lib/mythcvs/mythtv/libs/libmythtv/frequencies.c,v
retrieving revision 1.6
diff -u -3 -p -u -p -r1.6 frequencies.c
--- libs/libmythtv/frequencies.c	6 Aug 2004 15:01:33 -0000	1.6
+++ libs/libmythtv/frequencies.c	24 Mar 2005 05:47:38 -0000
@@ -6,6 +6,207 @@
 
 /* --------------------------------------------------------------------- */
 
+/* US cable QAM */
+static struct CHANLIST us_cable_qam[] = {
+  { "2",  57000 },
+  { "3",  63000 },
+  { "4",  69000 },
+  { "5",  75000 },
+  { "6",  81000 },
+  { "7",  87000 },
+  { "8",  93000 },
+  { "9",  99000 },
+  { "10",  105000 },
+  { "11",  111000 },
+  { "12",  117000 },
+  { "13",  123000 },
+  { "14",  129000 },
+  { "15",  135000 },
+  { "16",  141000 },
+  { "17",  147000 },
+  { "18",  153000 },
+  { "19",  159000 },
+  { "20",  165000 },
+  { "21",  171000 },
+  { "22",  177000 },
+  { "23",  183000 },
+  { "24",  189000 },
+  { "25",  195000 },
+  { "26",  201000 },
+  { "27",  207000 },
+  { "28",  213000 },
+  { "29",  219000 },
+  { "30",  225000 },
+  { "31",  231000 },
+  { "32",  237000 },
+  { "33",  243000 },
+  { "34",  249000 },
+  { "35",  255000 },
+  { "36",  261000 },
+  { "37",  267000 },
+  { "38",  273000 },
+  { "39",  279000 },
+  { "40",  285000 },
+  { "41",  291000 },
+  { "42",  297000 },
+  { "43",  303000 },
+  { "44",  309000 },
+  { "45",  315000 },
+  { "46",  321000 },
+  { "47",  327000 },
+  { "48",  333000 },
+  { "49",  339000 },
+  { "50",  345000 },
+  { "51",  351000 },
+  { "52",  357000 },
+  { "53",  363000 },
+  { "54",  369000 },
+  { "55",  375000 },
+  { "56",  381000 },
+  { "57",  387000 },
+  { "58",  393000 },
+  { "59",  399000 },
+  { "60",  405000 },
+  { "61",  411000 },
+  { "62",  417000 },
+  { "63",  423000 },
+  { "64",  429000 },
+  { "65",  435000 },
+  { "66",  441000 },
+  { "67",  447000 },
+  { "68",  453000 },
+  { "69",  459000 },
+  { "70",  465000 },
+  { "71",  471000 },
+  { "72",  477000 },
+  { "73",  483000 },
+  { "74",  489000 },
+  { "75",  495000 },
+  { "76",  501000 },
+  { "77",  507000 },
+  { "78",  513000 },
+  { "79",  519000 },
+  { "80",  525000 },
+  { "81",  531000 },
+  { "82",  537000 },
+  { "83",  543000 },
+  { "84",  549000 },
+  { "85",  555000 },
+  { "86",  561000 },
+  { "87",  567000 },
+  { "88",  573000 },
+  { "89",  579000 },
+  { "90",  585000 },
+  { "91",  591000 },
+  { "92",  597000 },
+  { "93",  603000 },
+  { "94",  609000 },
+  { "95",  615000 },
+  { "96",  621000 },
+  { "97",  627000 },
+  { "98",  633000 },
+  { "99",  639000 },
+  { "100",  645000 },
+  { "101",  651000 },
+  { "102",  657000 },
+  { "103",  663000 },
+  { "104",  669000 },
+  { "105",  675000 },
+  { "106",  681000 },
+  { "107",  687000 },
+  { "108",  693000 },
+  { "109",  699000 },
+  { "110",  705000 },
+  { "111",  711000 },
+  { "112",  717000 },
+  { "113",  723000 },
+  { "114",  729000 },
+  { "115",  735000 },
+  { "116",  741000 },
+  { "117",  747000 },
+  { "118",  753000 },
+  { "119",  759000 },
+  { "120",  765000 },
+  { "121",  771000 },
+  { "122",  777000 },
+  { "123",  783000 },
+  { "124",  789000 },
+  { "125",  795000 }
+};
+
+/* US ATSC broadcast */
+static struct CHANLIST atsc_bcast[] = {
+    { "2",        57000 },
+    { "3",        63000 },
+    { "4",        69000 },
+    { "5",        79000 },
+    { "6",        85000 },
+    { "7",        177000 },
+    { "8",        183000 },
+    { "9",        189000 },
+    { "10",       195000 },
+    { "11",       201000 },
+    { "12",       207000 },
+    { "13",       213000 },
+    { "14",       473000 },
+    { "15",       479000 },
+    { "16",       485000 },
+    { "17",       491000 },
+    { "18",       497000 },
+    { "19",       503000 },
+    { "20",       509000 },
+    { "21",       515000 },
+    { "22",       521000 },
+    { "23",       527000 },
+    { "24",       533000 },
+    { "25",       539000 },
+    { "26",       545000 },
+    { "27",       551000 },
+    { "28",       557000 },
+    { "29",       563000 },
+    { "30",       569000 },
+    { "31",       575000 },
+    { "32",       581000 },
+    { "33",       587000 },
+    { "34",       593000 },
+    { "35",       599000 },
+    { "36",       605000 },
+    { "37",       611000 },
+    { "38",       617000 },
+    { "39",       623000 },
+    { "40",       629000 },
+    { "41",       635000 },
+    { "42",       641000 },
+    { "43",       647000 },
+    { "44",       653000 },
+    { "45",       659000 },
+    { "46",       665000 },
+    { "47",       671000 },
+    { "48",       677000 },
+    { "49",       683000 },
+    { "50",       689000 },
+    { "51",       695000 },
+    { "52",       701000 },
+    { "53",       707000 },
+    { "54",       713000 },
+    { "55",       719000 },
+    { "56",       725000 },
+    { "57",       731000 },
+    { "58",       737000 },
+    { "59",       743000 },
+    { "60",       749000 },
+    { "61",       755000 },
+    { "62",       761000 },
+    { "63",       767000 },
+    { "64",       773000 },
+    { "65",       779000 },
+    { "66",       785000 },
+    { "67",       791000 },
+    { "68",       797000 },
+    { "69",       803000 },
+};
+ 
+
 /* US broadcast */
 static struct CHANLIST ntsc_bcast[] = {
     { "2",	 55250 },
@@ -1136,8 +1337,10 @@ static struct CHANLIST argentina[] = {
 
 struct CHANLISTS chanlists[] = {
     { "us-bcast",         ntsc_bcast,        CHAN_COUNT(ntsc_bcast)        },
+    { "us-atsc-bcast",    atsc_bcast,        CHAN_COUNT(atsc_bcast)        },
     { "us-cable",         ntsc_cable,        CHAN_COUNT(ntsc_cable)        },
     { "us-cable-hrc",     ntsc_hrc,          CHAN_COUNT(ntsc_hrc)          },
+    { "us-cable-qam",     us_cable_qam,      CHAN_COUNT(us_cable_qam)      },
     { "japan-bcast",      ntsc_bcast_jp,     CHAN_COUNT(ntsc_bcast_jp)     },
     { "japan-cable",      ntsc_cable_jp,     CHAN_COUNT(ntsc_cable_jp)     },
     { "europe-west",      europe_west,       CHAN_COUNT(europe_west)       },
Index: libs/libmythtv/videosource.cpp
===================================================================
RCS file: /var/lib/mythcvs/mythtv/libs/libmythtv/videosource.cpp,v
retrieving revision 1.71
diff -u -3 -p -u -p -r1.71 videosource.cpp
--- libs/libmythtv/videosource.cpp	19 Mar 2005 06:51:41 -0000	1.71
+++ libs/libmythtv/videosource.cpp	24 Mar 2005 05:47:39 -0000
@@ -189,7 +189,9 @@ FreqTableSelector::FreqTableSelector(con
     setLabel(QObject::tr("Channel frequency table"));
     addSelection("default");
     addSelection("us-cable");
+    addSelection("us-cable-qam");
     addSelection("us-bcast");
+    addSelection("us-atsc-bcast");
     addSelection("us-cable-hrc");
     addSelection("japan-bcast");
     addSelection("japan-cable");


More information about the mythtv-dev mailing list