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
This commit is contained in:
parent
cc5d96f8a9
commit
adec21acbe
2 changed files with 12 additions and 1 deletions
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue