Microsoft DirectX 8.1 (C++)

3 Frequency Overrides

3.1 Using the Registry to Override Frequencies

Despite our best efforts, there will be situations when the frequency tables are not sufficient, or have errors or have become obsolete. To address this problem, the frequencies in the TV Tuner filter's frequency tables may be selectively overridden via the registry.

Figure 1:

[HKEY_LOCAL_MACHINE\Software\Microsoft\TV System Services\TVAutoTune\TS0-1]
"12"=dword:04022750
"AutoTune"=hex:00,00,00,00,50,0c,4b,03,d0,99,a6,03,50,27,02,04,d0,bd,9a,04,50,\
  4b,f6,04,50,1a,72,0a,00,00,00,00,50,35,29,0b,d0,c2,84,0b,50,50,e0,0b,d0,dd,\
  3b,0c,50,6b,97,0c,d0,20,3a,07,50,ae,95,07,d0,3b,f1,07,50,c9,4c,08,d0,56,a8,\
  08,50,e4,03,09,d0,71,5f,09,50,ff,ba,09,d0,8c,16,0a,d0,f8,f2,0c,50,86,4e,0d,\
  d0,13,aa,0d,50,a1,05,0e,d0,2e,61,0e,50,bc,bc,0e,d0,49,18,0f,50,d7,73,0f,d0,\
  64,cf,0f,50,f2,2a,10,d0,7f,86,10,50,0d,e2,10,d0,9a,3d,11,50,28,99,11,d0,b5,\
  f4,11,50,43,50,12,d0,d0,ab,12,50,5e,07,13,d0,eb,62,13,74,6d,bf,13,00,00,00,\
  00,00,00,00,00,d0,21,d1,14,50,af,2c,15,d0,3c,88,15,00,00,00,00,00,00,00,00,\
  00,00,00,00,00,00,00,00,00,00,00,00,d0,8d,ad,17,50,1b,09,18,d0,a8,64,18,50,\
  36,c0,18,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
  00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
  00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
  00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,f4,e0,fa,20,50,7a,55,21,00,\
  00,00,00,00,00,00,00,d0,22,68,22,00,00,00,00,00,00,00,00,50,cb,7a,23,00,00,\
  00,00,50,e6,31,24,d0,73,8d,24,00,00,00,00,d0,8e,44,25,50,1c,a0,25,d0,a9,fb,\
  25,50,37,57,26,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,74,87,df,06,\
  d0,c4,b2,26,50,52,0e,27,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
  00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
  00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
  00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
  00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
  00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
  00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
  00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
  00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
  00,00,00,00,00,00,00,00,00,00,00

Figure 1(and the text version above) shows the registry path where fine-tuning and frequency overrides are stored. In this case, "TS0-1" indicates Tuning Space 0 for cable frequencies (1). There would be a TS0-0 for broadcast frequencies in tuning space 0. The structure of these registry entries has been changed from the previous version, to support the new frequency override mechanism. Previously, the TS*-* keys were binary values consisting of the fine-tuning information for the active frequency table at the time the fine-tuning was performed. In the new format, the fine-tuning information has been moved to the "AutoTune" subkey. All other subkeys are frequency override candidates. To qualify as a frequency override value, the key name must be a valid number within the range of the low and high index values of the currently active frequency table. Additionally, the value of the subkey must be of DWORD type, and must specify a frequency in Hz. Entries that don't qualify as frequency overrides are simply ignored. In the example in Figure 1, the override is for the frequency at index 12 with 67.25MHz.

There may be any number of frequency overrides for a particular tuning space, although there isn't much point in having more overrides than there are frequency indexes. It is not possible to guarantee which of two or more indexes having the same key name will be chosen as the override value.

The IAMTuner::put_TuningSpace method allows the application to choose which set of overrides and fine-tuning information to use. It is the application's responsibility to maintain the relationship between the Tuning Space and the frequency table.

3.2 Registry Conversion

Any application that adds frequency overrides to the registry must ensure that the registry location(s) for the tuning space(s) is(are) using the new format. The TV Tuner filter can be utilized to perform the conversion. The old registry format will be converted to the new format whenever the IAMTVTuner::StoreAutoTune method is called. Note that it is not necessary to collect any fine-tuning information before calling the StoreAutoTune method. It is also perfectly reasonable to instantiate a TV Tuner filter as part of a setup process to perform fine-tuning, or simply to do the conversion.