FS#11754 - Can't change FM Region on Sansa Clipv2 Version: r28573-101113

Attached to Project: Rockbox
Opened by Per (Per) - Saturday, 13 November 2010, 12:20 GMT
Last edited by Bertrik Sikken (bertrik) - Monday, 15 November 2010, 14:03 GMT
Task Type Bugs
Category FM Tuner
Status Closed
Assigned To No-one
Operating System Another
Severity Low
Priority Normal
Reported Version Daily build (which?)
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No


I cannot change the FM Region on Sansa Clipv2 8GB with firmware Version r28573-101113.
If i try to change the Player hangs up and i have to reboot (hold the on/off switch fpr 10 sec.)
Its no problem on the Sansa e200v1.
This task depends upon

Closed by  Bertrik Sikken (bertrik)
Monday, 15 November 2010, 14:03 GMT
Reason for closing:  Fixed
Comment by Bertrik Sikken (bertrik) - Saturday, 13 November 2010, 12:46 GMT
I can confirm this on my clip v1. In my case, it seems I can make this happen when first setting the frequency to 77 MHz in the Japan region, then trying to change it to the Europe region.
In what kind of circumstances does it hang for you?

I guess it hangs in the tune loop in firmware/drivers/tuner/si4700.c
Comment by Bertrik Sikken (bertrik) - Saturday, 13 November 2010, 16:49 GMT
My suspicion was right, it seems to hang in the tune loop, the backlight still responds the key presses.

It looks like the si4700 tries to be smart about region changes (but not smart enough). On region change, it tries to retune to the same frequency in the new band. However the japan band has a large non-overlapping frequency range with the frequency range of other regions. So when changing region from japan to europe it is possible that the retune will fail (the frequency in the japan band does not exists in the europe band) and it hangs while continuously trying to tune.

It looks like the generic radio code controlling the tuner driver already takes care of this. Removing this logic from the si4700 driver solves the problem for me.

Please try attached patch.
Comment by Michael Chicoine (mc2739) - Sunday, 14 November 2010, 01:35 GMT
I am able to reproduce this on my e200v2. The above patch appears to correct the lockup with no ill effects.
Comment by Bertrik Sikken (bertrik) - Sunday, 14 November 2010, 09:26 GMT
Per, a fix has been committed as SVN r28582, can you confirm that the problem is gone with the latest rockbox binary?
Comment by Per (Per) - Monday, 15 November 2010, 13:23 GMT
I have now r28603 and it works well.
Thank you, problem is solved.