maemo.org Bugzilla – Bug 2249
FM Radio frequency not set for use in Japan
Last modified: 2009-10-22 07:56:38 UTC
You need to
before you can comment on or make changes to this bug.
EXPECTED OUTCOME: Ability to select band to enable receiving broadcasts in
ACTUAL OUTCOME: Frequencies only available for US and Europe.
The product data sheet states:
The TEA5761UK can be switched to the Japanese FM band or to the US and Europe
band. Setting bit BLIM to logic 0 the band range is 87.5 MHz to 108 MHz;
BLIM to logic 1 selects the Japanese band range of 76 MHz to 90 MHz.
Seeing that the tablets never were released in Japan, it seems reasonable that
the FM radio program was never set up to allow receiving Japanese FM radio
signals. I honestly doubt we'll see this happen, especially since no one would
be able to really confirm that a fix would be working or not. I guess never say
Changed severity to enhancement and target milestone to future, as there's no
way this would make it into the next target, 4.0 release.. which is more or
less already out the door.
Since the internet tablet is considered to be a mobile device, it would be
reasonable to assume that one would take it with them on their trip to Japan.
The capability of switching to the Japanese FM band would be desirable in this
(In reply to comment #1)
> Seeing that the tablets never were released in Japan, it seems reasonable that
> the FM radio program was never set up to allow receiving Japanese FM radio
> signals. I honestly doubt we'll see this happen, especially since no one would
> be able to really confirm that a fix would be working or not. I guess never say
> Changed severity to enhancement and target milestone to future, as there's no
> way this would make it into the next target, 4.0 release.. which is more or
> less already out the door.
a version of the fmradio code has:
#define FM_FREQ_MAX 108.0
#define FM_FREQ_MIN 87.5
(i.e., it's hard coded, so dealing w/ this would require quite a bit of work at
the client level.)
From reading w/ Google, the following information seems publicly available:
This seems to be fairly close to the driver code that's actually used (well,
give it was taken from the public source drop, i suppose it should be
identical, but whatever).
I'm not a kernel dev, and it's after 3am, but it looks like you need:
r->tnctrl |= TEA5761_TNCTRL_BLIM
if you want to do what you described in comment 0, and afaict from reading look
at the cited URL, that just isn't a reachable state.
there's also TEA5761_TNCTRL_HLSI which to me seems to be similarly interesting,
but again, it too appears immutable.
If I'm correct, someone should file a bug using:
(or something like that, please fill in other details)
However, do keep in mind, that it's quite likely that Nokia did not apply for
regulatory approval to use an FM Radio in the n800 in Japan (given that Nokia
presumably did not intend to sell the product in Japan). I have no idea how
that plays w/ a kernel, but, the consequences for a user could be quite
The code I was reading was equivalent to the code for 4.0 at some point in
time. I have no idea about kernel update plans, but probably the right thing to
do would be to (a) get upstream fixed and (b) write patches for kernels that
run on the n800.
FWIW, every time I tried looking for information about this code, I hit
garage/mplayer code, that code seems to be at:
So, I think the thing for you to do (near term) is grab the n800 kernel sources
(pick a version), fix the kernel driver (assuming I'm right), and get things
working w/ MPlayer.
If I'm wrong, sample (bsd) code w/ ioctls would probably be a reasonable start.
Note of course that the fmradio applet is really from our perspective second
party code (it's not made by the people who make ITOS), and while they seem to
have made some minor commitment to encourage bug report filings, they are not
particularly responsive (I've filed a couple of bugs, which they poked them as
recently as last august, merely indicating that they would think about them for
a future release. I suppose the good thing is that it means they're not quite
Note: I'm confirming this bug to force an email to a certain user, not because
I necessarily agree that this is a bug in the indicated product (dear sir:
Created an attachment (id=609) [details]
patch to enable FM band selection in tea5761
I have made a patch for the tea5761.c driver code. This is not yet tested (I'm
not in Japan), but since it switches the BLIM bit, it should work as expected.
Just adding myself to the CC list. I'm the author of pyFMRadio and this is were
this feature request came up originally.
Created an attachment (id=610) [details]
Oops, found some bug in the patch. Here's a new patch.
Is there somebody in Japan at the moment to be able to test this?
Sample Python code for testing:
from FMRadio import FMRadio
r = FMRadio()
for freq in r.scan():
Created an attachment (id=616) [details]
Test Output from pyFMRadio
(In reply to comment #8)
> Created an attachment (id=616) [details] [details]
> Test Output from pyFMRadio
(In reply to comment #4)
> Created an attachment (id=609) [details] [details]
> patch to enable FM band selection in tea5761
> I have made a patch for the tea5761.c driver code. This is not yet tested (I'm
> not in Japan), but since it switches the BLIM bit, it should work as expected.
I tested Martin's patched kernel using the python sample code and was able to
tune in Japanese stations.
from FMRadio import FMRadio
r = FMRadio()
for freq in r.scan():
(From update of attachment 610 [details])
afaict the file being patched doesn't use spaces for indentation. if this were
code for projects i'd work on, i'd reject the patch for not matching style
please consider posting a patch that correctly follows file style (only tabs,
not spaces) for indentation.
hopefully we can find someone to upstream this patch.
Thanks for testing the patch!
Now that the patch was confirmed to work, I'll clean it up and fix the style.
The patch uses the unused V4L2_CID_BRIGHTNESS ioctl for setting the FM band.
Since a FM radio doesn't use brightness, we shouldn't get any conflict. AFAIK,
there are no ioctl constants predefined in V4L for setting the FM band.
since you're more worried about the kernel level than the radio applet, I'm
moving this bug to the kernel side.
Created an attachment (id=620) [details]
Cleaned up patch following the kernel coding guidelines
This patch now tries to follow the kernel coding guidelines. How are the
chances to get this upstream and into Nokia's official kernels?
I appreciate this patch, because I'm living in Japan, has bought N800 and am
listing to radio everyday.
If I can listen to radio with N800, I'm happy.
Of course, I can apply this patch, and use another FM radio client distributed
But, I must apply the patch EVERY kernel(ITOS) release.
I wish this patch is applied to the official ITOS, and the official FM radio
client is changed to reflect the patcth(or make the closed source be open).
CC'ing Carsten - patch available.
FM Radio functionality has been dropped for future development and no more
development will be done for it in Diablo/Chinook by Nokia. Sorry...
Patch added to kernel-source-diablo, in N8x0:Testing, should be a part of the
next release of Mer (0.15).
Marking patches of interest to Diablo (Maemo4) community updates, please excuse