[mythtv] Tuning remarks

Daan de Beer mythdev at wanadoo.nl
Thu Aug 18 12:10:07 UTC 2005


As promised I took a shot at checking the tuning code to figure out why my 
tuning was so bad. 
 
I have for example the channel RTL7. This is located at 648000000 Hz. 
Therefore I must use channel 43 which is at 647250000 Hz. 
 
Normally one would calculate the finetune value by: 
 
(([real]-[base]) * 16) / 1000 
 
In this case that would be: 
 
(([648000]-[647250]) * 16) / 1000 = 12 
 
But the tuning frequency calculation in Channel::TuneTo(...) (in channel.cpp) 
is as follows: 
 
int frequency = curList[i].freq * 1000 + finetune; 
 
In this case that would mean: 
 
int frequency = 647250 * 1000 + finetune = 647250012. In stead of 648000000 
 
So the frequency is never ok. In the channel editor I would have to specify a 
value of 750 for finetune to get the good result. But this is not possible. 
 
According to my findings the right calculation would be: 
 
 
int frequency = (curList[i].freq + (finetune * 62.5)) * 1000; 
 
62.5 = 1000 / 16; 
 
 
Am I looking in the right direction? Maybe someone can help solve this issue? 
Or if I am correct I could make a patch. 
 
Regards, 
 
Daan de Beer 


More information about the mythtv-dev mailing list