summaryrefslogtreecommitdiffstats
path: root/firmware
diff options
context:
space:
mode:
authorLaurent Gautier <creposucre@rockbox.org>2010-01-12 22:11:51 +0000
committerLaurent Gautier <creposucre@rockbox.org>2010-01-12 22:11:51 +0000
commit980c7089e84a8e1e84b9ebade91cb2a00baf75ff (patch)
treec67506a0bdfd1fc2782071a187163424617d60fe /firmware
parentca370f4b40309a932ee564ffe57ce77ac9c8831a (diff)
downloadrockbox-980c7089e84a8e1e84b9ebade91cb2a00baf75ff.tar.gz
rockbox-980c7089e84a8e1e84b9ebade91cb2a00baf75ff.tar.bz2
rockbox-980c7089e84a8e1e84b9ebade91cb2a00baf75ff.zip
Fix FS10902 and improve some init. Also add my name to the credit list for FS10494
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24216 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware')
-rw-r--r--firmware/drivers/tuner/ipod_remote_tuner.c28
1 files changed, 25 insertions, 3 deletions
diff --git a/firmware/drivers/tuner/ipod_remote_tuner.c b/firmware/drivers/tuner/ipod_remote_tuner.c
index 82357593d4..9822c07c6b 100644
--- a/firmware/drivers/tuner/ipod_remote_tuner.c
+++ b/firmware/drivers/tuner/ipod_remote_tuner.c
@@ -43,7 +43,7 @@ int radio_tuned = 0;
int rds_event = 0;
char rds_radioname[9];
-char rds_radioinfo[70]; /* do we need more? */
+char rds_radioinfo[65];
union FRQ {
unsigned long int frequency_radio;
@@ -102,6 +102,13 @@ void rmt_tuner_sleep(int state)
{
if (state == 0)
{
+ tuner_param = 0x00;
+ old_tuner_param = 0xFF;
+ mono_mode = -1;
+ old_region = -1;
+ tuner_frequency = 0;
+ radio_tuned = 0;
+
/* tuner HW on */
unsigned char data[] = {0x07, 0x05, 0x01};
iap_send_pkt(data, sizeof(data));
@@ -293,7 +300,11 @@ int ipod_rmt_tuner_set(int setting, int value)
case RADIO_SLEEP:
{
rmt_tuner_sleep(value);
- sleep(HZ/2);
+ sleep(HZ/10);
+ if(value)
+ {
+ tuner_frequency = 0;
+ }
break;
}
@@ -319,6 +330,11 @@ int ipod_rmt_tuner_set(int setting, int value)
/* scan through frequencies */
if (radio_tuned == 1)
{
+ if ((tuner_frequency <= fmr->freq_min)
+ && (tuner_frequency >= fmr->freq_max))
+ {
+ tuner_set(RADIO_FREQUENCY,value);
+ }
/* scan down */
if(value < tuner_frequency)
rmt_tuner_scan(-1);
@@ -326,8 +342,14 @@ int ipod_rmt_tuner_set(int setting, int value)
else
rmt_tuner_scan(1);
+ sleep(HZ/10);
if (reply_timeout())
- return 0;
+ {
+ tuner_set(RADIO_FREQUENCY,value);
+ rmt_tuner_scan(1);
+ if (reply_timeout() == true)
+ return 0;
+ }
radio_tuned = 0;
}