yashsingh1/xdaforums huggingface dataset:
[Samsung Galaxy Nexus] htc6500uk:
I believe the Samsung Note spec states that it has an FM radio with RDS. It may be that they use similar chipset in the Galaxy Nexus and there is hope for FM Radio down the road sometime.
[Samsung Galaxy Nexus] blunden:
A lot of Android phones, I'd say most of them, have bluetooth chips that include support for both sending and receiving FM.

The problem is just that Android lacks a framework and API for it. ST-Ericsson submitted a framework and example app for it to AOSP that has been worked on openly in Gerrit for months with input from several Google people. Unfortunately Gerrit is still down so we don't know the latest progress but it will hopefully be officially supported in the future. Until then, we will probably see FM support for it in CM like many other phones currently enjoy.
[Samsung Galaxy Nexus] mikereidis:
MAYBE.

But the Galaxy S and Nexus S are almost the same phone. Yet the Galaxy S has the Silicon Labs FM chip, while the Nexus S does not.

The same is true for some variants of the Galaxy S2. The "canonical" Samsung Galaxy S2 has the Silicon Labs FM chip, while the AT&T and T-Mobile variants appear to have omitted it.

IMO, at least 2 reasons: (1) The phone is a bit cheaper if they don't install the FM chip, and (2) Carriers want us to use their expensive data plans for streaming.

I think Google also has some interest in keeping cheap, "old fashioned" airwave radio from us. Same for Apple.
[Samsung Galaxy Nexus] mikereidis:
I've spent most of this year developing an FM app for various Android devices. See my sig.

My impression is that the ST-Ericsson Android FM API is doomed. Nobody but them has committed to it. Broadcom is the biggest provider of FM combo chips and has said nothing, and continues to keep their specs secret.

Except for some Japan market Sharp models, can you show me ANY Android phone that supports FM transmit ? Stock or with developer mods ? I tried this on my TI based HTC Legend and it won't work. It needs the proper antenna (and perhaps power) connections, and I've found no phone that has that, likely because they were never designed to transmit, and were even designed to prevent transmit.

Even with a theoretically usable Bluetooth/WiFi/ FM combo chip (Broadcom or TI), if the power, antenna and audio connections are not in place, FM receive is impossible. There are several phones in my app incompatible list that never had an FM app, and that I and nobody else has ever been able to FM enable. IMO nobody will ever FM enable these without impractical hardware modifications.
[Samsung Galaxy Nexus] justabrake:
so this does have an fm radio ! i seen where some say it doesn't and then I seen some that say it does, The unlocked version of the SGS2 has one but the AT&T didn't so this seems too

Technical Details:

Network

2G Network GSM 850 / 900 / 1800 / 1900

3G Network HSDPA 850 / 900 / 1700 / 1900 / 2100

Camera - 5MP

Touch Screen - Yes

Weight - 135g

External Memory - No

Memory Slot - No

Bluetooth - Yes

Vibration - Yes

3G - Yes

GPS - Yes

Connectivity

GPRS Yes

EDGE Yes

3G HSDPA, 21 Mbps; HSUPA, 5.76 Mbps; LTE

WLAN Wi-Fi 802.11 a/b/g/n, dual-band, DLNA, Wi-Fi hotspot

Bluetooth Yes, v3.0 with A2DP

USB Yes, v2.0 microUSB

Additional Features

OS Android OS, v4.0 (Ice Cream Sandwich)

CPU Dual-core 1.2GHz Cortex-A9 CPU, TI OMAP 4460 chipset

Messaging SMS(threaded view), MMS, Email, Push Mail, IM, RSS

Browser HTML

Radio Stereo FM radio with RDS

Games Yes

GPS Yes, with A-GPS support

Java Yes, via Java MIDP emulator

- NFC support

- Barometer sensor

- Digital compass

- Active noise cancellation with dedicated mic

- MP4/H.264/H.263 player

- MP3/WAV/eAAC+/AC3 player

- Organizer

- Image/video editor

- Document viewer

- Google Search, Maps, Gmail,

YouTube, Calendar, Google Talk, Picasa integration

- Adobe Flash support

- Voice memo/dial/commands

- Predictive text input
[Samsung Galaxy Nexus] ankushkatari:
The specs you have listed are from GSMArena and "may" be wrong. The two people afaik who have the GN have said that there is no native FM radio app. At present we dont even know if the FM chip is even correctly wired inside to receive signals. If it is, then CM7 (or 8) will be able to support it.
[Samsung Galaxy Nexus] blunden:
I think the API has potential still. A reason for not seeing any commits from other manufacturers for it is that it's still not finished and polished enough to be approved by Google. If it is, I think that we will see some more action by the other manufacturers. Also, in theory the Broadcom plugin could be developed by the community since it seems one of the MIUI guys have access to confidential information about commands etc. The basic functionality could probably be implemented by information from what is currently used in MIUI and CM.

I have not seen a phone that supports FM transmit, no. That would just be a bonus though. Why do you say they are specifically designed not to transmit FM? FM transmitting with limited power (to allow close range music transfer) is legal now in many countries. Also, I know for a fact that receiving works fine in many phones in CM so at least that functionality should be possible. :)
[Samsung Galaxy Nexus] mikereidis:
I went searching for this API last night. I couldn't find ANY sign of it except for the original posts and documentation from a year or so ago. Where is this Gerrit code ? Or any evidence of recent activity ?

AFAICT, Google has nothing to do with the SE FM API. Do you have any evidence otherwise ? NONE of the chip manufacturers has said ANYTHING about it either, AFAIK.

In theory ? Probably ? I really don't want to sound harsh, but I will speculate that you are just speculating about these things. And I think you are being too hopeful.

Yes, sure it's legal, with the proper FCC or whatever certifications. Those cost money, as does the engineering. The chip connections are specifically made to disable transmit. Thus, no software can enable FM transmit.

I'd be happy to learn I am wrong about any of the above. But until I see evidence, these are my current opinions based on my knowledge and experience.
[Samsung Galaxy Nexus] blunden:
When the kernel.org servers were taken down recently it also meant that AOSP and Gerrit that were both hosted there got taken down too. When Gerrit comes up again and if they keep all the history (that's not decided yet according to jbqueru) you can see for yourself. It used to be available on the following links.

https://review.source.android.com//#change,20506

https://review.source.android.com//#change,20507

https://review.source.android.com//#change,20508

https://review.source.android.com//#change,20509

I do have a limited part of the history from 20507 on gmail but I unsubscribed after a while because it was spamming my inbox. Here is a PDF of the parts I have. Some of it is missing though.

Google is involved as in being actively commenting and reviewing it in Gerrit at the time. They provided details of changes they wanted to see etc. and seemed to show some interest in the API. You are right though in that it was written entirely by ST-Ericsson. Also, it's not made by SE (meaning Sony Ericsson) but by ST-Ericsson, a partnership between ST-Microelectronics and Erocsson. No Sony involded.

This part was speculation, yes. A third party plugin would not make it into any official builds at least. What I said about someone close to MIUI having some inside knowledge about what commands to send to the chip using hci_tool to enable FM receiving, RDS etc. was based on a claim they made themselves. That claim was send to me indirectly by a researcher from this group. It started with me submitting some comments on Gerrit. It started with me being approached by ST-Ericsson (Andreas Gustafsson specifically) asking if I could provide some more information and if I wanted to help them test it. I was later forwarded a message from the mentioned research group. After some emails back and forth it turned out they needed RDS which is currently not supported for the broadcom chip drivers used in CM. I therefor suggested that he should contact the MIUI guys to find out where they got the basis for the drivers they had written. That's when he told me a that a friend of xinyu had the datasheet for it but wouldn't share it.

You might be right about it not being wired up for transmission of FM. Receiving works on most phones with compatible chips though as shown by it actually working in CM and MIUI.

Now you at least know what I base my opinions on. Too bad Gerrit isn't up. :(
[Samsung Galaxy Nexus] mikereidis:
Thanks ! You are more familiar with this than I thought, so my apologies for assuming otherwise.

I'm surprised that 20 minutes of Google searching didn't reveal anything but a few year old documents and posts. Gerrit is still down ? Sheesh ! And that was the only place for somewhat open discussion ?

I've been working 60+ hour weeks on my Android FM app since February, and am trying to earn a meagre income from this project to keep it going indefinitely.

The reverse engineering I continue to do is VERY time consuming, generally has problems, and my app only runs on a fraction of the Android devices out there. So I am EXTREMELY interested in this API, if it has success.

I vaguely recall checking up on this API around August, probably via Gerritt. I had the impression it wasn't going anywhere very fast.

OK, from your PDF I see one Google email address (Dave Sparks), as well as Broadcom and TI. Interesting...

See my next post for more...
[Samsung Galaxy Nexus] mikereidis:
I had an interesting email from someone working for an org with interest in enabling OTA radio on more smartphones.

I posted the Q's and A's on my app thread for anyone interested: http://xdaforums.com/showpost.php?p=19242542&postcount=1601

I think he and I agree that the biggest obstacles include the lack of usable, open APIs, the secrecy of the chip documents, and the manufacturers that specifically disable FM on many devices.
[Samsung Galaxy Nexus] mikereidis:
Yes, as soon as I read the Broadcom chip header file for the MIUI/CM FM app, I was convinced the MIUI folk had some inside info. You don't get register defines like BC_REG_SPARE0 by reverse engineering alone.

My app runs on Broadcom and TI chips using what I've learned through hard rev eng work and what I've found on the net, including that header file. I support Samsung Silicon Labs and V4L too, but those "specs" are more open.

My app also supports RDS. AFAIK, neither the CM FM app, nor the MIUI app support RDS, so I think mine is the only 3rd party Android app that does on these chips. FMTwoo works w/ RDS on Galaxy S/Silicon Labs (as does mine).

And I think my app is the only one that communicates directly through the HCI UART. I had to do that because so many devices use Broadcom proprietary Bluetooth which doesn't support normal HCI access, AFAICT.

BTW, AFAIC, the MIUI and CM FM apps are now distinct. Some call the CM app MIUI, and About still says so. The MIUI FM app for Droid X is using Motorola and TI specific libraries. OTOH, the CM TI support is based on work that I did, via hcitool and (for my app direct access to HCI).

Last I looked the ST Ericsson API was VERY rich (IMO) with a lot of potential features, including handling Audio routing, which is a big problem I deal with regularly.

And yet the only multi-chip opensource Android FM code is the CM code, which is still pretty basic. Until not that long ago it only sent commands blindly, and couldn't get values such as the end frequency from a seek command.

So I feel that unless some individual or company "champions" it, I don't see much prospect for a community API implementation that goes beyond basics anytime soon. And it's not just the FM chips, it's the audio routing system for the phone, and sometimes other things, like antenna switches.

I don't think anybody is going to retrofit current phones with this API, except perhaps on specific aftermarket ROMs like MIUI and CM. There MAY be manufacturer support for this API on future phones.

I've considered writing some plugins myself, given my codebase and info. But for now I'm just waiting to see if this API goes anywhere, and if so I will support another API in my app, in addition to the 5 current APIs, possibly with a 6th (Broadcom proprietary) in the next several months.

I'd be very interested if you could give a name of someone who might be able to share more recent info on the progress of this API.

Thanks !
[Samsung Galaxy Nexus] blunden:
I understand. There are a lot of uninformed posts on XDA so it can serve to be sceptical sometimes. :)

Gerrit seems to be relatively poorly indexed on Google, if it's indexed at all. Yes, it's still down unfortunately. It makes me kind of sad since that was the only place I've found that you see and participate in open discussions between Google and the submitter. They usually respond if you make an informed comment or ask a relevant question. :) Unfortunately it's very hard to get in touch with developers to discuss improvements or report mistakes made in the non-open souce apps. :(

I contacted both people I've spoken to at ST-Ericsson about this to ask if there has been any progress as well as if I should refer you to them. I described your interest in this and how you can potentially help out. :) Unfortunately one of the addresses returned a "no such user" error but one of them seems to work fine still.

EDIT: I should also once again point out after reading the Q&A post you linked to that ST-Ericsson is entirely separate from Sony Ericsson and is therefor not affected by any Sony buy out as far as I know. The thing they have in common is that they both were spawned by Ericsson and then fusioned with competitors and that they are partly owned by Ericsson.
[Samsung Galaxy Nexus] mikereidis:
Thanks ! Yes I sent an email to the one shown for Andreas Gustafsson and got that "550 No such user" bounceback. I hope that's just a spam issue and not a sign this API development is dead or struggling,

Yes the names and shifting ownerships etc. is confusing. I had thought that Sony-Ericcson was the only phone manufacturer to have committed to supporting this API.

So was it ST-Ericsson that made this commitment ? And they are a chip company, so how could they make such a commitment unless they have FM chips and were supporting the FM portion of the API, or the same for audio chips.

Basically I'm wondering if any hardware company has made any commitment to producing plugins for their hardware. Or is it all experimental at this point ? I can understand though that various Linux driver standards (such as V4L which also has a radio portion) have had little commitment from HW manufacturers, yet the "community" created drivers and apps for them.

"Geritt" naming is confusing too. CyanogenMod uses "Geritt" and they are up on their servers. So it's "Android Geritt" ?

-----

And yes, I could in theory help out. I could create plugins using my existing code. I guess this only makes sense if I open source the code.

Should I ? I don't know; There are pros and cons. It doesn't make much sense to me that I would do this for FM chips, while "rich" companies like Broadcom do nothing.

I could also do the app side, but there again, drivers are still needed. And it seems a bit more logical that the open source CM FM app be modified to use this API, or even the Qualcomm Code Aurora app.

Open source is great, but doesn't pay the bills unless some corporate sponsorship is involved.
[Samsung Galaxy Nexus] blunden:
ST-Ericsson have chips with FM, as well as complete SoCs. I think Andreas might have either changed address or company but I spoke with a guy named Ulf as well and his address worked.

Gerrit is actually the name of the review system that is written by Google and released open source. CM started using it to improve the quality of the code in the project. Usually when people refer to Gerrit it should be fairly obvious which one they are talking about based on context. I was talking about AOSP Gerrit though.

I think the plan was to get other chip manufacturers interested in writing the plugins for it as that would allow them to market yet another feature of the chip to Android phone manufacturers. The chance of a phone manufacturer including functionality that requires them to write a whole new Android hardware API is highly unlikely, unless it's something like 3D screens that is very compelling for the marketing department. For that reason it's important to get the APIs implemented.

I did not mean that you should have to do an official implementation but rather that you might help them make it easier developers to test it. As you said, the manufacturers should not expect the users to implement these plugins. I just let them know you were interested about this and might have some valuable input. :)
[Samsung Galaxy Nexus] blunden:
I got an update from Ulf at ST-Ericsson. Work on the API has been moved to their branch in India. I should receive contact information for that team. Not that much has happened with it since AOSP Gerrit went down except for a few bugfixes.
[Samsung Galaxy Nexus] mikereidis:
Thanks ! Yes, please let me/us know of any developments.

My first impression is that moving a project to a different country is not a good sign.

My second impression is that "not a good sign" is an understatement.

IMO, Life goes on with proprietary APIs and minor roles for ALSA and V4L.
[Samsung Galaxy Nexus] Homer314:
Hi, any news about GN fm radio possibility?

bye :)
[Samsung Galaxy Nexus] mikereidis:
Well, one person posted the basic debug info from running my app:

http://xdaforums.com/showpost.php?p=19498339&postcount=10

Sorry! Compatible FM Chip not found...

Fm: BC Sh:1 Su:0 Bt:1 Ht:0 H2:0 Mo: BCU

One problem here is that the person didn't have SU/Root. With SU, or a Bluez compatible BT stack, it might appear to work.

I think the BCM 4330 should be compatible, in theory, but my bet is that the antenna, audio and power connections are not there to make FM work.

If somebody with SU could run my latest app here: http://www.mediafire.com/file/7kcmha54oa3ba98/Spirit_FM_Radio_v111127b.apk

I will be able to say much more after looking at the Debug logs. In the app, select Menu->Help->EM Logs and try to ensure an email actually goes out with the attached file.

BTW, my app is running well on ICS on my Galaxy S.
[Samsung Galaxy Nexus] minooch:
Done

Email sent - same error though
[Samsung Galaxy Nexus] mikereidis:
Thanks.

My "Direct to UART mode" with BT off doesn't seem to work. There's no /dev/ttyHS0 and the only port it picks up (as bluetooth owner) is /dev/tty01. But it doesn't respond as expected.

And then the app tries to enable BT with the standard Android calls and fails, which seems strange.

If you try starting the app with BT already on, you might have a better result.
[Samsung Galaxy Nexus] minooch:
Well,

I turned bt on and it looked like it actually worked, BUT.... I don't have a headset or any speakers I can plug in to act as an aerial, so it found nothing. Will try again in a few hours.
[Samsung Galaxy Nexus] minooch:
Couldn't be bothered waiting to test it :)

Went home and got my headset. The app starts without any errors as before - but there is no sound output. Never used your app b4, not sure if its normally VERY slow. Takes up to a minute to recognise a button pressed. Emailed the debug file again
[Samsung Galaxy Nexus] Dagnelino:
interesting ;)

FM radio on GN is a really good addiction
[Samsung Galaxy Nexus] mikereidis:
Thanks for the log.

No, slow is not "normal". There are a LOT of errors happening and my code needs improvement to handle such cases without bogging down the CPU.

Don't worry about sound unless / until we see decent RSSI signal strength numbers at upper left; at least 10 or so with something plugged into the headset jack as an antenna. (Although sometimes a finger held tightly right on the jack works.) Sound often will not work on new devices and ROMs unless and until the "magic tricks" to enable FM audio are discovered.

I think you need to set the Menu->Settings->Debug->BCM 20780 checkbox to ON. I think the new BCM4330 is like the new 20780 in that it requires a different approach to setting volume, and the original approach makes the chip freak out.

Set that option, then it's best to reboot the phone.

As before, if starting with BT on doesn't work, try starting with BT off or vice versa.

My continued belief is that you will end up seeing RSSI numbers jump around with values like -128, 0 and 55. This seems to indicate the FM portion of the Broadcom chip was deliberately disabled.

But we can hope...
[Samsung Galaxy Nexus] mikereidis:
I just received a log for one of the new Galaxy Tab's. It shows the same "hci_err: 3 Hardware Failure" which I think is due to the use of the same new BCM4330 combination chip.

One interesting sign: The ALSA driver shows a "Aux FM Volume" control and there are "Capture Route" controls with an FM selection.

I didn't see this in the Tab log. Some Samsung products HAVE shown such FM controls, but they were "vestigial", IE leftovers from the variants that DID have the Silicon Labs FM chip.

So these may be non-usable leftovers from the Galaxy S2 family products that have a Silicon Labs FM chip. The original Tab had "leftovers" from the original Galaxy S.

In a technical sense, from the info returned from the ALSA driver, this may be "false advertising". But I don't think driver control names constitute a real world advertisement, LOL.

If there WAS FM, we at least have a method to select the audio route. But if not there would likely just be noise when that Aux/FM input is selected.
[Samsung Galaxy Nexus] mikereidis:
That's better ! I assume you had headphones plugged in for an antenna.

It would be promising if tuning to known strong stations caused RSSI to rise.

It's even possible that low level PCB surgery to add an antenna connection might be successful (but few will try). These 4330 chips are not well known yet.

If you want to try enabling the FM audio path to see if there's any sound, and assuming you hear nothing with the Samsung or Samsung2 audio methods under Settings->Audio, you could try these commands from adb shell:

# This should set "Aux FM Volume" to maximum:

/data/data/com.mikersmicros.fm/files/ssd 4 3 67 7

# This sets "Analog Right Capture Route" to 'Aux/FM Right' and the same for left

/data/data/com.mikersmicros.fm/files/ssd 4 3 77 2

/data/data/com.mikersmicros.fm/files/ssd 4 3 78 2

These commands should be run while my app is running, with volume in the app set to maximum. Hardware controls should show Media Volume, or just swing the 2nd graphic from the top to the right.

It might be useful to run something that will send the analog input to headset or speaker, or even something like the Audalyzer app that can show you if sound is present.

Audalyzer and voice recorders should open up the analog input path. Once they do that you could perhaps run the "Capture Route" commands above to switch analog inputs.

For headset mic it's:

/data/data/com.mikersmicros.fm/files/ssd 4 3 77 0

/data/data/com.mikersmicros.fm/files/ssd 4 3 78 0

For sub/main mic it's the same but with 1's at the end instead of 0's.

As above for FM use 2.

For off, use 3.

Last but not least, my experimental direct to Bluetooth headset mode can bypass the lack of analog audio connections. Ensure you have a cheap BT headset paired and connected. Then select Settings->Debug->BCM BT Headset. Then power-cycle the app/FM.
[Samsung Galaxy Nexus] zok-star:
oh yes plz i would love FM to work on this phone!! sometimes i get sick of listening to my music..

Keep it up guys!!! Hope you pull through!!
[Samsung Galaxy Nexus] nissan1973:
Bump,

Keep up to good work guys!
[Samsung Galaxy Nexus] mikereidis:
What work ? Which guys ?

IMO, it just isn't possible without very impractical hardware modification.

I don't have one of these devices. I'm not going to spend any more of my valuable & precious time on this issue unless/until somebody reports an unexpected break through.

If anyone wants to volunteer to keep researching this issue, then let them identify themselves.

I would be REALLY happy if it turned out to be possible.

But I don't think it is, and my work here is done.