diff options
| author | Laurent Gautier <creposucre@rockbox.org> | 2010-01-12 22:11:51 +0000 |
|---|---|---|
| committer | Laurent Gautier <creposucre@rockbox.org> | 2010-01-12 22:11:51 +0000 |
| commit | 980c7089e84a8e1e84b9ebade91cb2a00baf75ff (patch) | |
| tree | c67506a0bdfd1fc2782071a187163424617d60fe | |
| parent | ca370f4b40309a932ee564ffe57ce77ac9c8831a (diff) | |
| download | rockbox-980c7089e84a8e1e84b9ebade91cb2a00baf75ff.zip rockbox-980c7089e84a8e1e84b9ebade91cb2a00baf75ff.tar.gz rockbox-980c7089e84a8e1e84b9ebade91cb2a00baf75ff.tar.bz2 rockbox-980c7089e84a8e1e84b9ebade91cb2a00baf75ff.tar.xz | |
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
| -rw-r--r-- | docs/CREDITS | 1 | ||||
| -rw-r--r-- | firmware/drivers/tuner/ipod_remote_tuner.c | 28 |
2 files changed, 26 insertions, 3 deletions
diff --git a/docs/CREDITS b/docs/CREDITS index 91e87d3..4174781 100644 --- a/docs/CREDITS +++ b/docs/CREDITS @@ -514,6 +514,7 @@ Giovanni Zilli Shiloh Hawley Peter Lecký Wilfred Hughes +Laurent Gautier The libmad team The wavpack team diff --git a/firmware/drivers/tuner/ipod_remote_tuner.c b/firmware/drivers/tuner/ipod_remote_tuner.c index 8235759..9822c07 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; } |