Rockbox

  • Status Closed
  • Percent Complete
    100%
  • Task Type Bugs
  • Category FM Tuner
  • Assigned To No-one
  • Operating System iriver H10
  • Severity Low
  • Priority Very Low
  • Reported Version Daily build (which?)
  • Due in Version Undecided
  • Due Date Undecided
  • Votes
  • Private
Attached to Project: Rockbox
Opened by p.h. - 2007-11-27
Last edited by MikeS - 2008-01-25

FS#8238 - tuner fails to tune in when awaken by alarm wake-up

When H10 is awaken by the RTC alarm wake-up and as a start screen tuner or recording screen is chosen then after awaking tuner does not tune in for the last played station. One can only hear noise and some hardly audible radio station different from the one that was played last.

Closed by  MikeS
2008-01-25 19:21
Reason for closing:  Fixed
Additional comments about closing:  

Just dumped an extra DELAY; in fmradio_i2c_outb and all is well on my unit.

p.h. commented on 2007-11-28 20:42

There's a workaround:

When the radio is turned on and PLL frequency is set it may be checked whether or not radio got tuned in. If it wasn't tuned in PLL frequency may be repeatedly set until the radio gets tuned in.

The patch was tested on H10 20GB and was found to work reliably.

MikeS commented on 2007-12-03 14:44

In reference to  FS#8144  and in general I think the issues on 20GB need to be found (In my case, no chip communication at all at 80MHz) rather than a brute-force workaround. I'm pretty confident one exists. The driver probably needs tweaking too in order to allow powerup time before actually doing much with the radio.

Is the CPU frequency at 80MHz at the time the alarm wakes up?

p.h. commented on 2007-12-03 19:31

You're right of course. But as long as there's no solution and some users are in urge of having the tuner working the patch may help them. I'm not for committing it of course. The patch with addition of alarm wake-up helped me to use RB to perform night radio recordings and for my friend it made station selecting reliable (without the patch he was almost unable to tune in).

As to the CPU frequency - when alarm wakes up CPU freq. is 80MHz up to the line where tuner's PLL is set. It changes to 30MHz right after that line (see radio_start() in radio.c). When the player is turned on in a normal way CPU freq. is already set to 30MHz before the line which sets PLL.

p.h. commented on 2007-12-03 21:33

Setting CPU freq. to 30MHz at the start of fmradio_i2c_write() and fmradio_i2c_read() results in the tuner being able to find next station and tune in if the player was awaken by the alarm.

p.h. commented on 2007-12-05 19:45

Improved workaround patch for impatient ones.

MikeS commented on 2008-01-25 06:55

This should fix the 80MHz problem which is caused by not having all the delays needed. It also uses IN/OUT for HI/LO instead of explicit pullup which indicates the big H10 has pullups on SCL and SDA. I don't know if that's true for small H10. This definitely functions properly on my device.

Loading...

Available keyboard shortcuts

Tasklist

Task Details

Task Editing