diff options
| author | Linus Nielsen Feltzing <linus@haxx.se> | 2005-08-13 17:34:10 +0000 |
|---|---|---|
| committer | Linus Nielsen Feltzing <linus@haxx.se> | 2005-08-13 17:34:10 +0000 |
| commit | adec21acbe7d2d7759820ddf927649278a618ee1 (patch) | |
| tree | 2ec997c0cdcf11c19f60d96e75774b8771873830 | |
| parent | cc5d96f8a93598fe48a9d8e3d9df3990ecaed023 (diff) | |
| download | rockbox-adec21acbe7d2d7759820ddf927649278a618ee1.zip rockbox-adec21acbe7d2d7759820ddf927649278a618ee1.tar.gz rockbox-adec21acbe7d2d7759820ddf927649278a618ee1.tar.bz2 rockbox-adec21acbe7d2d7759820ddf927649278a618ee1.tar.xz | |
The Ondio uses a different crystal for the TEA5767 than iriver
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7317 a1c6a512-1295-4272-9138-f99709370657
| -rw-r--r-- | firmware/export/config-ondiofm.h | 1 | ||||
| -rw-r--r-- | firmware/tuner_philips.c | 12 |
2 files changed, 12 insertions, 1 deletions
diff --git a/firmware/export/config-ondiofm.h b/firmware/export/config-ondiofm.h index 118ced2..0b15b39 100644 --- a/firmware/export/config-ondiofm.h +++ b/firmware/export/config-ondiofm.h @@ -52,6 +52,7 @@ /* Define this if you have an FM Radio */ #define CONFIG_TUNER (S1A0903X01 | TEA5767) /* to be decided at runtime */ +#define CONFIG_TUNER_XTAL 13000000 /* Define this if the tuner is switched on by software */ #define HAVE_TUNER_PWR_CTRL diff --git a/firmware/tuner_philips.c b/firmware/tuner_philips.c index 68b0938..7f3ecf5 100644 --- a/firmware/tuner_philips.c +++ b/firmware/tuner_philips.c @@ -17,7 +17,7 @@ * KIND, either express or implied. * ****************************************************************************/ - +#include "config.h" #include <stdbool.h> #include <string.h> #include <stdlib.h> @@ -38,7 +38,12 @@ void philips_set(int setting, int value) write_bytes[0] = 0x80; /* mute */ write_bytes[1] = 0x00; write_bytes[2] = 0x00; +#if CONFIG_TUNER_XTAL == 32768000 + write_bytes[3] = 0x1A; /* 32.768MHz, soft mute, + stereo noise cancelling */ +#else write_bytes[3] = 0x0A; /* soft mute, stereo noise cancelling */ +#endif write_bytes[4] = 0x00; if (value) /* sleep */ { @@ -49,7 +54,12 @@ void philips_set(int setting, int value) case RADIO_FREQUENCY: { int n; +#if CONFIG_TUNER_XTAL == 32768000 + n = (4 * (value - 225000)) / 32768; +#else n = (4 * (value - 225000)) / 50000; +#endif + logf("n=%d", n); write_bytes[0] = (write_bytes[0] & 0xC0) | (n >> 8); write_bytes[1] = n & 0xFF; } |