Index: firmware/export/config-h10.h =================================================================== --- firmware/export/config-h10.h (revision 15370) +++ firmware/export/config-h10.h (working copy) @@ -12,7 +12,7 @@ #define HAVE_RECORDING /* Define bitmask of input sources - recordable bitmask can be defined explicitly if different */ -#define INPUT_SRC_CAPS (SRC_CAP_MIC | SRC_CAP_LINEIN) +#define INPUT_SRC_CAPS (SRC_CAP_MIC | SRC_CAP_LINEIN | SRC_CAP_FMRADIO) /* define the bitmask of hardware sample rates */ #define HW_SAMPR_CAPS (SAMPR_CAP_44) @@ -85,8 +85,8 @@ #define AB_REPEAT_ENABLE 1 /* FM Tuner */ -/*#define CONFIG_TUNER TEA5767 -#define CONFIG_TUNER_XTAL 32768 *//* TODO: what is this? */ +#define CONFIG_TUNER TEA5767 +#define CONFIG_TUNER_XTAL 32768 /* Define this for LCD backlight available */ #define HAVE_BACKLIGHT Index: firmware/export/config-h10_5gb.h =================================================================== --- firmware/export/config-h10_5gb.h (revision 15370) +++ firmware/export/config-h10_5gb.h (working copy) @@ -12,7 +12,7 @@ #define HAVE_RECORDING /* Define bitmask of input sources - recordable bitmask can be defined explicitly if different */ -#define INPUT_SRC_CAPS (SRC_CAP_MIC | SRC_CAP_LINEIN) +#define INPUT_SRC_CAPS (SRC_CAP_MIC | SRC_CAP_LINEIN | SRC_CAP_FMRADIO) /* define the bitmask of hardware sample rates */ #define HW_SAMPR_CAPS (SAMPR_CAP_44) @@ -71,8 +71,8 @@ #define AB_REPEAT_ENABLE 1 /* FM Tuner */ -/*#define CONFIG_TUNER TEA5767 -#define CONFIG_TUNER_XTAL 32768 *//* TODO: what is this? */ +#define CONFIG_TUNER TEA5767 +#define CONFIG_TUNER_XTAL 32768 /* Define this for LCD backlight available */ #define HAVE_BACKLIGHT Index: firmware/target/arm/audio-pp.c =================================================================== --- firmware/target/arm/audio-pp.c (revision 15370) +++ firmware/target/arm/audio-pp.c (working copy) @@ -35,6 +35,7 @@ /* Prevent pops from unneeded switching */ static int last_source = AUDIO_SRC_PLAYBACK; #ifdef HAVE_FMRADIO_REC + bool recording = flags & SRCF_RECORDING; static bool last_recording = false; #endif Index: firmware/target/arm/iriver/h10/power-h10.c =================================================================== --- firmware/target/arm/iriver/h10/power-h10.c (revision 15370) +++ firmware/target/arm/iriver/h10/power-h10.c (working copy) @@ -35,7 +35,6 @@ bool charger_enabled; #endif -#if 0 #if CONFIG_TUNER bool tuner_power(bool status) @@ -46,7 +45,6 @@ } #endif /* #if CONFIG_TUNER */ -#endif void power_init(void) { Index: firmware/drivers/fmradio_i2c.c =================================================================== --- firmware/drivers/fmradio_i2c.c (revision 15370) +++ firmware/drivers/fmradio_i2c.c (working copy) @@ -26,8 +26,26 @@ #include "string.h" #if (CONFIG_TUNER & TEA5767) -#if (CONFIG_I2C == I2C_COLDFIRE) +#if CONFIG_I2C == I2C_PP5020 +#include "i2c-pp.h" +int fmradio_i2c_write(unsigned char address, const unsigned char* buf, + int count) +{ + int i; + for (i=0;i>1), i,buf[i]); + } + + return 0; +} + +int fmradio_i2c_read(unsigned char address, unsigned char* buf, int count) +{ + return i2c_readbytes((address>>1), 0, count, buf); +} +#elif (CONFIG_I2C == I2C_COLDFIRE) + #ifdef IAUDIO_X5 #include "i2c-coldfire.h"