From ff8e76e9e534dde1e6a57a84d49b89dad847cafd Mon Sep 17 00:00:00 2001 From: Bertrik Sikken Date: Wed, 16 Jun 2010 20:29:08 +0000 Subject: 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 --- firmware/export/config.h | 2 +- firmware/export/config/sansaclipplus.h | 2 +- firmware/export/fmclipplus.h | 54 ---------------------------------- firmware/export/rda5802.h | 54 ++++++++++++++++++++++++++++++++++ firmware/export/tuner.h | 6 ++-- 5 files changed, 59 insertions(+), 59 deletions(-) delete mode 100644 firmware/export/fmclipplus.h create mode 100644 firmware/export/rda5802.h (limited to 'firmware/export') diff --git a/firmware/export/config.h b/firmware/export/config.h index 7f77514116..5be2c99dcb 100644 --- a/firmware/export/config.h +++ b/firmware/export/config.h @@ -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 diff --git a/firmware/export/config/sansaclipplus.h b/firmware/export/config/sansaclipplus.h index 90636b152d..df9fad74c9 100644 --- a/firmware/export/config/sansaclipplus.h +++ b/firmware/export/config/sansaclipplus.h @@ -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 */ diff --git a/firmware/export/fmclipplus.h b/firmware/export/fmclipplus.h deleted file mode 100644 index 20961f47be..0000000000 --- a/firmware/export/fmclipplus.h +++ /dev/null @@ -1,54 +0,0 @@ -/*************************************************************************** - * __________ __ ___. - * Open \______ \ ____ ____ | | _\_ |__ _______ ___ - * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / - * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < - * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ - * \/ \/ \/ \/ \/ - * - * $Id$ - * - * Tuner header for the Silicon Labs Mystery radio chip in some Sansa Clip+ - * - * Copyright (C) 2010 Bertrik Sikken - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ****************************************************************************/ - -#ifndef _FMCLIPPLUS_H_ -#define _FMCLIPPLUS_H_ - -#define HAVE_RADIO_REGION - -struct fmclipplus_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]; - -struct fmclipplus_dbg_info -{ - uint16_t regs[32]; /* 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); - -#ifndef CONFIG_TUNER_MULTI -#define tuner_set fmclipplus_set -#define tuner_get fmclipplus_get -#endif - -#endif /* _FMCLIPPLUS_H_ */ diff --git a/firmware/export/rda5802.h b/firmware/export/rda5802.h new file mode 100644 index 0000000000..e61ecb40ae --- /dev/null +++ b/firmware/export/rda5802.h @@ -0,0 +1,54 @@ +/*************************************************************************** + * __________ __ ___. + * Open \______ \ ____ ____ | | _\_ |__ _______ ___ + * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / + * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < + * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ + * \/ \/ \/ \/ \/ + * + * $Id$ + * + * Tuner header for the RDA Microelectronics RDA5802 FM tuner chip + * + * Copyright (C) 2010 Bertrik Sikken + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY + * KIND, either express or implied. + * + ****************************************************************************/ + +#ifndef _RDA5802_H_ +#define _RDA5802_H_ + +#define HAVE_RADIO_REGION + +struct rda5802_region_data +{ + unsigned char deemphasis; /* 0: 75us, 1: 50us */ + unsigned char band; /* 0: us/europe, 1: japan */ +} __attribute__((packed)); + +extern const struct rda5802_region_data rda5802_region_data[TUNER_NUM_REGIONS]; + +struct rda5802_dbg_info +{ + uint16_t regs[16]; /* Read registers */ +}; + +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 rda5802_set +#define tuner_get rda5802_get +#endif + +#endif /* _RDA5802_H_ */ diff --git a/firmware/export/tuner.h b/firmware/export/tuner.h index 9101bb9241..fa894a4b6c 100644 --- a/firmware/export/tuner.h +++ b/firmware/export/tuner.h @@ -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 */ -- cgit v1.2.3