1
0
Fork 0
forked from len0rd/rockbox

The mystery FM chip in some Sansa Clip+ players has been identified as a RDA5802, so rename files and functions. Also fix several bugs.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26871 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Bertrik Sikken 2010-06-16 20:29:08 +00:00
parent 60d5f5050b
commit ff8e76e9e5
9 changed files with 126 additions and 121 deletions

View file

@ -41,7 +41,7 @@
#define TEA5760 0x10 /* Philips */
#define LV240000 0x20 /* Sanyo */
#define IPOD_REMOTE_TUNER 0x40 /* Apple */
#define FMCLIPPLUS 0x80 /* Mystery SiLabs FM tuner in some clip+ */
#define RDA5802 0x80 /* RDA Microelectronics */
/* CONFIG_CODEC */
#define MAS3587F 3587

View file

@ -123,7 +123,7 @@
#define AB_REPEAT_ENABLE 1
/* FM Tuner */
#define CONFIG_TUNER (SI4700|FMCLIPPLUS) /* in fact SI4702 */
#define CONFIG_TUNER (SI4700|RDA5802) /* in fact SI4702 */
//#define HAVE_TUNER_PWR_CTRL
/* Define this for LCD backlight available */

View file

@ -8,7 +8,7 @@
*
* $Id$
*
* Tuner header for the Silicon Labs Mystery radio chip in some Sansa Clip+
* Tuner header for the RDA Microelectronics RDA5802 FM tuner chip
*
* Copyright (C) 2010 Bertrik Sikken
*
@ -22,33 +22,33 @@
*
****************************************************************************/
#ifndef _FMCLIPPLUS_H_
#define _FMCLIPPLUS_H_
#ifndef _RDA5802_H_
#define _RDA5802_H_
#define HAVE_RADIO_REGION
struct fmclipplus_region_data
struct rda5802_region_data
{
unsigned char deemphasis; /* 0: 75us, 1: 50us */
unsigned char band; /* 0: us/europe, 1: japan */
} __attribute__((packed));
extern const struct fmclipplus_region_data fmclipplus_region_data[TUNER_NUM_REGIONS];
extern const struct rda5802_region_data rda5802_region_data[TUNER_NUM_REGIONS];
struct fmclipplus_dbg_info
struct rda5802_dbg_info
{
uint16_t regs[32]; /* Read registers */
uint16_t regs[16]; /* Read registers */
};
bool fmclipplus_detect(void);
void fmclipplus_init(void);
int fmclipplus_set(int setting, int value);
int fmclipplus_get(int setting);
void fmclipplus_dbg_info(struct fmclipplus_dbg_info *nfo);
bool rda5802_detect(void);
void rda5802_init(void);
int rda5802_set(int setting, int value);
int rda5802_get(int setting);
void rda5802_dbg_info(struct rda5802_dbg_info *nfo);
#ifndef CONFIG_TUNER_MULTI
#define tuner_set fmclipplus_set
#define tuner_get fmclipplus_get
#define tuner_set rda5802_set
#define tuner_get rda5802_get
#endif
#endif /* _FMCLIPPLUS_H_ */
#endif /* _RDA5802_H_ */

View file

@ -132,9 +132,9 @@ extern int (*tuner_get)(int setting);
#include "si4700.h"
#endif
/* Silicon Labs mystery radio chip in some Sansa Clip+ */
#if (CONFIG_TUNER & FMCLIPPLUS)
#include "fmclipplus.h"
/* RDA micro RDA5802 */
#if (CONFIG_TUNER & RDA5802)
#include "rda5802.h"
#endif
/* Apple remote tuner */