FS#9196 - Fine-tuning some FM tuner constants
Opened by Christopher Williams (christop) - Tuesday, 15 July 2008, 18:51 GMT
Last edited by Michael Sevakis (MikeS) - Tuesday, 22 June 2010, 07:38 GMT
In Rockbox on my Sansa e280, in the US, all FM radio stations come in clearer when I tune to about 0.05 MHz higher than the station is "supposed" to be. For example, the station 94.5 comes in clearer at about 94.56 MHz. In the OF, the station comes in clearly at the correct frequency.
I dug through the FM tuner driver for the lv24020lp and discovered a constant "magic" value of 16 subtracted from duration*1000 as the argument to udelay(), but this constant is not explained. It appears to me to be there to offset any overhead incurred (I'm probably wrong about this). I changed the constant to different values and realized that it changes what Rockbox reports the FM frequency to be.
After some experimenting, I found that the value 24 or so results in the frequencies being closest to what they should be for almost every station. (In reality the reported frequency dithers around this frequency but generally stays within 32 kHz on either side of it). A couple of stations still come in clearest about 0.02 MHz higher, but I'll just assume that those stations really are broadcast at slightly higher frequencies.
Also, I changed the stereo decoder (SD) frequency from 38.3 kHz to 38.0 kHz, as this is the frequency I think it's "supposed" to be. I have no idea why it should be 38.3 in the first place (besides the AN2400S04 application note mentioning that frequency). I'd like someone smarter than me to tell me why. :)
Disclaimer: this patch is of the "it works for me" variety, and it might affect the other reported frequencies, such as the IF and SD frequencies. Also, there's probably a better and "cleaner" way to fine-tune the frequencies reported by the driver without the use of magic values, but I am not familiar enough with the driver to make such changes. You Have Been Warned.
Tuesday, 22 June 2010, 07:38 GMT
Reason for closing: Fixed
Additional comments about closing: As of r27042, considering it fixed.