summaryrefslogtreecommitdiff
path: root/firmware/drivers/tuner/lv24020lp.c
diff options
context:
space:
mode:
authorRob Purchase <shotofadds@rockbox.org>2009-03-21 00:13:20 +0000
committerRob Purchase <shotofadds@rockbox.org>2009-03-21 00:13:20 +0000
commit1a6bcfa2c1545fc66aac40c88dba3a6f804d6227 (patch)
tree11069b2e03848d5e928fa98d7201fb64f75ef389 /firmware/drivers/tuner/lv24020lp.c
parentd63a8fcb7b0f4835a5acdb6c0dcb0783b6d3bba7 (diff)
downloadrockbox-1a6bcfa2c1545fc66aac40c88dba3a6f804d6227.tar.gz
rockbox-1a6bcfa2c1545fc66aac40c88dba3a6f804d6227.zip
D2: Enable FM radio (based on FS#10035 by Michael Burtin with some changes by myself). Also updates the LV24020 driver to add optional logf debugging.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20420 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/drivers/tuner/lv24020lp.c')
-rw-r--r--firmware/drivers/tuner/lv24020lp.c17
1 files changed, 12 insertions, 5 deletions
diff --git a/firmware/drivers/tuner/lv24020lp.c b/firmware/drivers/tuner/lv24020lp.c
index 769be8ac77..c6d396aca4 100644
--- a/firmware/drivers/tuner/lv24020lp.c
+++ b/firmware/drivers/tuner/lv24020lp.c
@@ -29,19 +29,17 @@
29#include "power.h" 29#include "power.h"
30#include "fmradio.h" /* physical interface driver */ 30#include "fmradio.h" /* physical interface driver */
31#include "sound.h" 31#include "sound.h"
32#include "pp5024.h"
33#include "system.h" 32#include "system.h"
34 33
35#ifndef BOOTLOADER 34#ifndef BOOTLOADER
36 35
37static struct mutex tuner_mtx; 36static struct mutex tuner_mtx;
38 37
39#if 0
40/* define to enable tuner logging */ 38/* define to enable tuner logging */
41#define SANYO_TUNER_LOG 39#undef SANYO_TUNER_LOG_FILE
42#endif 40#undef SANYO_TUNER_LOGF
43 41
44#ifdef SANYO_TUNER_LOG 42#ifdef SANYO_TUNER_LOG_FILE
45#include "sprintf.h" 43#include "sprintf.h"
46#include "file.h" 44#include "file.h"
47 45
@@ -52,6 +50,15 @@ static int fd_log = -1;
52/* syncing required because close() is never called */ 50/* syncing required because close() is never called */
53#define TUNER_LOG_SYNC() fsync(fd_log) 51#define TUNER_LOG_SYNC() fsync(fd_log)
54#define TUNER_LOG(s...) fdprintf(fd_log, s) 52#define TUNER_LOG(s...) fdprintf(fd_log, s)
53
54#elif defined(SANYO_TUNER_LOGF)
55#define LOGF_ENABLE
56#include "logf.h"
57
58#define TUNER_LOG_OPEN()
59#define TUNER_LOG_SYNC()
60#define TUNER_LOG(s...) logf(s)
61
55#else 62#else
56#define TUNER_LOG_OPEN() 63#define TUNER_LOG_OPEN()
57#define TUNER_LOG_SYNC() 64#define TUNER_LOG_SYNC()