summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRafaël Carré <rafael.carre@gmail.com>2011-12-15 19:38:11 +0000
committerRafaël Carré <rafael.carre@gmail.com>2011-12-15 19:38:11 +0000
commit521512f88ae462cf467a90890c62693b42e1651f (patch)
treec2f03e8249f243ff58d9a7c5ed688dc9d072e0d6
parentd16cefca9505fb814cbbbe7866a90584347e745c (diff)
downloadrockbox-521512f88ae462cf467a90890c62693b42e1651f.zip
rockbox-521512f88ae462cf467a90890c62693b42e1651f.tar.gz
rockbox-521512f88ae462cf467a90890c62693b42e1651f.tar.bz2
rockbox-521512f88ae462cf467a90890c62693b42e1651f.tar.xz
tuner-as3525v2.c: only build what's needed
add a comment about why we don't return 0 when no tuner was detected build the file on all as3525v2 targets git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31284 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--firmware/SOURCES3
-rw-r--r--firmware/target/arm/as3525/tuner-as3525v2.c11
2 files changed, 8 insertions, 6 deletions
diff --git a/firmware/SOURCES b/firmware/SOURCES
index 1bb48ba..206fff6 100644
--- a/firmware/SOURCES
+++ b/firmware/SOURCES
@@ -496,6 +496,7 @@ target/arm/as3525/sd-as3525.c
target/arm/as3525/scrollwheel-as3525.c
#endif /* HAVE_SCROLLWHEEL */
#else /* AS3535v2 */
+target/arm/as3525/tuner-as3525v2.c
target/arm/as3525/sd-as3525v2.c
#endif
target/arm/as3525/power-as3525.c
@@ -1331,7 +1332,6 @@ target/arm/as3525/sansa-clipplus/backlight-clip.c
target/arm/powermgmt-ascodec.c
target/arm/as3525/sansa-clipplus/powermgmt-clipplus.c
target/arm/as3525/sansa-clipplus/lcd-as-clip-plus.S
-target/arm/as3525/tuner-as3525v2.c
#endif /* !BOOTLOADER */
#endif /* SANSA_CLIPPLUS */
@@ -1403,7 +1403,6 @@ target/arm/as3525/lcd-as-e200v2-fuze-fuzev2.S
#endif /* SANSA_FUZE */
#ifdef SANSA_FUZEV2
-target/arm/as3525/tuner-as3525v2.c
target/arm/as3525/lcd-fuze.c
target/arm/as3525/sansa-fuzev2/lcd-fuzev2.c
target/arm/as3525/sansa-fuzev2/backlight-fuzev2.c
diff --git a/firmware/target/arm/as3525/tuner-as3525v2.c b/firmware/target/arm/as3525/tuner-as3525v2.c
index 0a478f6..cb2afe1 100644
--- a/firmware/target/arm/as3525/tuner-as3525v2.c
+++ b/firmware/target/arm/as3525/tuner-as3525v2.c
@@ -21,18 +21,21 @@
*
****************************************************************************/
#include "config.h"
-#include <stdint.h>
#include "tuner.h"
-/* return the detected tuner type */
+#ifdef CONFIG_TUNER_MULTI
int tuner_detect_type(void)
{
+#if (CONFIG_TUNER & SI4700)
if (si4700_detect()) {
return SI4700;
}
+#endif
+#if (CONFIG_TUNER & RDA5802)
if (rda5802_detect()) {
return RDA5802;
}
- return RDA5802;
+#endif
+ return RDA5082; /* returning 0 freezes the player : FS#11791 */
}
-
+#endif