summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--docs/CREDITS1
-rw-r--r--firmware/drivers/tuner/ipod_remote_tuner.c28
2 files changed, 26 insertions, 3 deletions
diff --git a/docs/CREDITS b/docs/CREDITS
index 91e87d3954..4174781a7d 100644
--- a/docs/CREDITS
+++ b/docs/CREDITS
@@ -514,6 +514,7 @@ Giovanni Zilli
514Shiloh Hawley 514Shiloh Hawley
515Peter Lecký 515Peter Lecký
516Wilfred Hughes 516Wilfred Hughes
517Laurent Gautier
517 518
518The libmad team 519The libmad team
519The wavpack team 520The wavpack team
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;
43int rds_event = 0; 43int rds_event = 0;
44 44
45char rds_radioname[9]; 45char rds_radioname[9];
46char rds_radioinfo[70]; /* do we need more? */ 46char rds_radioinfo[65];
47 47
48union FRQ { 48union FRQ {
49 unsigned long int frequency_radio; 49 unsigned long int frequency_radio;
@@ -102,6 +102,13 @@ void rmt_tuner_sleep(int state)
102{ 102{
103 if (state == 0) 103 if (state == 0)
104 { 104 {
105 tuner_param = 0x00;
106 old_tuner_param = 0xFF;
107 mono_mode = -1;
108 old_region = -1;
109 tuner_frequency = 0;
110 radio_tuned = 0;
111
105 /* tuner HW on */ 112 /* tuner HW on */
106 unsigned char data[] = {0x07, 0x05, 0x01}; 113 unsigned char data[] = {0x07, 0x05, 0x01};
107 iap_send_pkt(data, sizeof(data)); 114 iap_send_pkt(data, sizeof(data));
@@ -293,7 +300,11 @@ int ipod_rmt_tuner_set(int setting, int value)
293 case RADIO_SLEEP: 300 case RADIO_SLEEP:
294 { 301 {
295 rmt_tuner_sleep(value); 302 rmt_tuner_sleep(value);
296 sleep(HZ/2); 303 sleep(HZ/10);
304 if(value)
305 {
306 tuner_frequency = 0;
307 }
297 break; 308 break;
298 } 309 }
299 310
@@ -319,6 +330,11 @@ int ipod_rmt_tuner_set(int setting, int value)
319 /* scan through frequencies */ 330 /* scan through frequencies */
320 if (radio_tuned == 1) 331 if (radio_tuned == 1)
321 { 332 {
333 if ((tuner_frequency <= fmr->freq_min)
334 && (tuner_frequency >= fmr->freq_max))
335 {
336 tuner_set(RADIO_FREQUENCY,value);
337 }
322 /* scan down */ 338 /* scan down */
323 if(value < tuner_frequency) 339 if(value < tuner_frequency)
324 rmt_tuner_scan(-1); 340 rmt_tuner_scan(-1);
@@ -326,8 +342,14 @@ int ipod_rmt_tuner_set(int setting, int value)
326 else 342 else
327 rmt_tuner_scan(1); 343 rmt_tuner_scan(1);
328 344
345 sleep(HZ/10);
329 if (reply_timeout()) 346 if (reply_timeout())
330 return 0; 347 {
348 tuner_set(RADIO_FREQUENCY,value);
349 rmt_tuner_scan(1);
350 if (reply_timeout() == true)
351 return 0;
352 }
331 radio_tuned = 0; 353 radio_tuned = 0;
332 } 354 }
333 355