yashsingh1/xdaforums huggingface dataset:
[Spirit FM] mikereidis:
The first question is "Is the hardware there or not". The 2nd is "how/where can I get a ROM that supports the FM driver".

Might be similar to the new LTE GS3, the GT-i9305. At least one person has claimed to see FM working on this, using another ROM or some-such.

I've heard a rumor the US broadcast industry is considering paying OEMs (and/or carriers ?) to support FM. If true we may see more phones with FM hardware, but no software/firmware yet. Like the AT&T OneX(L) or various Motorola and LG devices. Haven't seen Samsung doing this yet, until now perhaps.
[Spirit FM] mikereidis:
Asus Transformer TF101 10 inch tablet:

Surprisingly I learn it has partly functional FM, with no audio and no clear idea if audio is possible or not.

RDS works and RSSI seems around 20 for good stations, with a wired headset plugged in for antenna.

Works on stock, rooted device. There is no usable OEM Proprietary FM API but the low level Broadcom support works with the BCM4329.

SOC is NVidia Tegra2, and unfortunately I don't think I've ever FM enabled a Tegra device. An owner tried a few SSD commands I suggested to no avail.

Since my last TF101 request was in February, there isn't much demand for real FM on this device. So I will be unlikely to spend any substantial time on it.

As for almost any device, if someone can tell me the secrets of FM audio on that device, I'll be happy to accommodate them. But nobody ever does... :)
[Spirit FM] tejadakenneth:
i've tried but it's not working please help :(
[Spirit FM] mikereidis:
I don't understand your problem.
[Spirit FM] mikereidis:
PM:

Try setting Menu-> Settings-> Audio-> Volume Scale to a number substantially less than 100, perhaps 5-10 or so. I'm not sure if that will work though.

I'm not able to support the X5 very well. I don't have one and don't expect to get one.

In fact I've removed some "hacks" recently that were X5 specific. It's more important IMO to better serve thousands with much more popular devices (that I have) than the dozens or so with this older device (that I don't have and thus can't support properly).

My attention is being focused on popular Samsung and HTC devices now.
[Spirit FM] rainyguy:
Thanks for the reply. Seem like it is not easy as I thought. Will have to wait first; dun really see any compatible Rom yet. Not sure if the hardware is there or not too.
[Spirit FM] tejadakenneth:
when i open the spirit fm no frequency channel even if i tuned in to different frequency its not working
[Spirit FM] mikereidis:
A ROM isn't necessary I think, just a new kernel.

It's the same with every device that comes with no FM app. Takes a few months to sort it out. In at least one case, 2 years, LOL.
[Spirit FM] mikereidis:
Which ROM ? I think you have 2 in your sig.

Make sure a wired headset is plugged in. Does the RSSI at top left go over 10-20 when tuned to a known station ?

Make sure Spirit has SU/root in the SuperUser or SuperSU app. This is a common problem.

If you have a kernel config app, such as for Semaphore, ensure any "FM radio" or driver checkbox is checked.

If you just have an audio problem, enable Menu-> Settings-> Debug-> Silent Loop.

There's more trouble-shooting info here: http://xdaforums.com/showpost.php?p=31983151&postcount=4465
[Spirit FM] teh_cg:
Hi there, after install new Dorimanx v7.4 JB-Mali, speaker cannot produce sound.Have try on siyah kernel v5.0b1, speaker problem too.Can some one show me how to report the error log?Thanks

I'm using International Galaxy S2.By the way, i'm using supernexus V5 rom.
[Spirit FM] minidou-77:
It's working fine here with DorimanX 7.4 and cm10...

Have you tried to reboot your phone and are you sure you have the latest version of Spirit ?
[Spirit FM] teh_cg:
I just re-install and install back latest version 17Oct, and this time when i no connect headset, it have speaker volume,but when i fully connect the headset,i play around speaker and headset button, but seen like speaker is not produce sound.Thanks.I try reboot ,problem same here.

By the way,overall this is great and awesome apps.
[Spirit FM] tejadakenneth:
i solved the proble audio -> method -> (name of device)

p.s GREAT APP
[Spirit FM] kmetek:
n00b question: where to download free version to test?
[Spirit FM] Nitemare_real:
First post
[Spirit FM] mikereidis:
ALWAYS check at LEAST the first few lines of a first post before asking questions in a thread. It's so much faster and easier IMO.

The first line in the first post links to a FAQ which answers your question.

The second line is the latest free release.

I don't think I can make it any easier than that.
[Spirit FM] mikereidis:
:)

Try different settings for Menu-> Settings-> Debug-> Galaxy S2. Try "June 15" and/or "July 12".

Stock or stock derived ROMs seem to like June 15 best, while custom ROMs like the automatic default of July 27.
[Spirit FM] mikereidis:
I've had a few emails discussing whether or not FM is possible on 3 new Motorola devices: Razr M/Mini XT907, Razr HD XT926 and Razr Maxx HD XT912/913/916.

They all seem to have MSM8960 SOCs and Qualcomm WCN3660 FM/Bluetooth/WiFi combination chips. They use the Bluetooth and WiFi functions, but it's not clear if FM is possible.

Spirit will start and more or less look like it sort of works, even un-rooted, using the Qualcomm OEM API. But RSSI is low or negative or even -128. Un-rooted devices are unable to load radio-iris-transport driver.

When radio-iris-transport driver is loaded on a rooted device, Spirit will freeze the phone and eventually cause a reboot. This happens inside the kernel driver, so it's not the "fault" of Spirit, BTW.

The same reboot thing happens on devices unable to load radio-iris-transport, such as US GS3s.

Here's from my most recent related email:
[Spirit FM] Dropple:
Why epic 4g doesn't support spirit FM?

Whereas on froyo, epic 4g support FM
[Spirit FM] tejadakenneth:
there's no free version. even the lite one has its price.
[Spirit FM] jacklebott:
Try clicking on the link next to a version of the app in the first post... Like this one:
[Spirit FM] tejadakenneth:
oh. i gues i didn't read this haha. what version is this? i have the version as of june 15
[Spirit FM] jacklebott:
Read it again, it clearly says October 17
[Spirit FM] CheF85:
Audio: speaker or headset?

Samsung GT-I9100 Galaxy S II

Android 4.0.4 hydra h2o v1.4.1 AOKP

XXLPX radio

3.0.33 hydra 4 r26 cernel

Spirit Fm Unlocked vOct17

If I switch audio from speaker to headset, then radio sounds still in headphones, and no radio sound in speaker, but systems sounds (like sound on blocking, sound on button press) switches to disable, and when i switch systems sounds to enable, i still have no system sounds, before i will switch audio in Spirit Fm.
[Spirit FM] kmetek:
error: Power ( On stock Galaxy S/S2/S3/Note::....

SU:1 FM:sa

erm, what? :D using FREE.....
[Spirit FM] mikereidis:
AFAIK the SPH-D700 does not have a stock FM app, and nobody has ever gotten FM to work.

If you have evidence, such as a URL, please share.

Just one of many discussions where no solution was found: http://xdaforums.com/showthread.php?t=1371593
[Spirit FM] mikereidis:
Try different settings for Menu-> Settings-> Debug-> Galaxy S2. Try "June 15" and/or "July 12".

Stock or stock derived ROMs seem to like June 15 best, while custom ROMs like the automatic default of July 27.
[Spirit FM] mikereidis:
Which device and ROM ?

Stock Galaxy devices require wired headphone installed. Actually virtually all devices require this for decent reception.

Or, check to ensure Spirit has SU.

More tips here: http://xdaforums.com/showpost.php?p=31983151&postcount=4465
[Spirit FM] kmetek:
SGS2 STOCK 4.0.3

SPIRIT doesn't have SU, weird.
[Spirit FM] Nogardrevlis Lectar:
Version from October 17 crash phone (complete hang) Galaxy S Plus with CyanogenMod-Version 9-20121011-ivendor-ariesve-rc5 , on changing audio to "qdsp5v2 Altern"
[Spirit FM] mikereidis:
For some reasons, I get lots of queries about SU. Is the problem that people accidentally hit the Deny option ?

Some SUs have bugs too.

SuperUser problems:

Open your SuperUser app. Under the "apps" tab there should be an entry for Spirit, possibly under "Deny". Select Spirit and tap the broken face icon at bottom left until the page says "Status Allowed"

Also, from SuperUser, tap the wrench for settings. Select Security, then Automatic response and make sure "Prompt" is selected, although "Allow" is a bit easier, at the price of some security concerns.

Also, under the SuperUser info tab, there will be a "su binary" section and you can "tap to check for updates". Even if it says "up to date" it may be useful to select "Update anyway".
[Spirit FM] mikereidis:
Was a previous version of Spirit (or ROM) OK ?

There are many old free versions of Spirit linked in post #1 if you want to compare with Oct 14, or Sept 24, etc.
[Spirit FM] androvoid:
thanks OP, I was getting to the point of thinking I was never going to have an FM app on my phone since rom was installed. I had been trying to re-work the fm app from CM7 before I found your app. most stations seem to work fine, the others I probably need to be outside for, so will try again when I get the opportunity :)
[Spirit FM] mikereidis:
:)

The biggest issue for getting an FM app working on custom ROMs is enabling the FM audio. It's my biggest headache.

Sometimes it's not so hard in a "way". But without good audio library support for FM routing, things can get unstable fast when audio notifications or phone calls happen.

It's too bad Google doesn't support or encourage FM in Android. It's also bad that OEM audio library code is pretty much kept secret. It's closed source stuff in between the open source of Android and the open source of the Linux kernel.
[Spirit FM] androvoid:
That's unfortunate that they used closed source libraries, also slightly surprising, would have thought they'd use ALSA, but sometimes i've seen ALSA be quite flakey...Well further testing confirmed that the radio worked fine, the static and poor signal was just because the antenna is kinda directional. You've done a great job getting this to where it is today, it worked on both my HTC devices so I'm definitely happy with the app. Keep up the good work.
[Spirit FM] mikereidis:
Closed source libraries are used on pretty much every OEM's devices. The only major exception is for Nexus devices.

The libraries are the HALs or "Hardware adaptation layer" libs. Google provides the open source stuff that calls the OEM and phone specific HAL libraries.

The HALs convert the upper layer (Google) calls/APIs into whatever they want on a lower layer. But most recent phones use ALSA (or tiny alsa) and related PCM APIs as a lower layer. Except possibly for a thin alsa library layer, this mostly goes straight to the kernel via IOCtl on alsa devices.

Modern devices such as GS2/GS3/Note or OneX/S use ALSA drivers that have hundreds of controls, reflecting the power and flexibility of modern audio chips. Different devices have different sets of controls.

So, open source Google code (Mediaplayer, soundpool, audiotrack, etc) calls the closed source OEM and device specific HAL.

For most modern devices the HAL calls the open source and device specific ALSA drivers.

So yes, ALSA is in wide use, and is open source. But there is no standard ALSA method of enabling FM audio or phone calls or media players etc.

HALs being mostly closed source is why some devices will never see good custom ROMs for ICS/JB. Even without source, the stock binary HAL libraries from a stock GB ROM can be used on a custom GB ROM. But they can't be used on ICS/JB and the OEM may never release ICS/JB for a given phone or architecture.
[Spirit FM] glofiishx500:
Very godd work! Works on my SGS2 with CM9 as well as on my HTC HD2 running NexusHD CM9. The only issue is that on the HD2 bluetooth gets enabled (via root) every time I start the radio app.
[Spirit FM] mikereidis:
:)

Yeah, the Bluetooth requirement on Broadcom chip based devices is due to a "feature" of most ICS/JB custom ROMs.

They have the Bluetooth stack running all the time, even when BT is configured to be off. Since BT is using the BT/FM "UART", Spirit can't use it without causing trouble.

I know there are some ways around this, but it's trouble prone, would prevent BT from working properly when needed, and would likely result in way too many complaints.

I may investigate this further at some point, but my priority remains enabling and improving FM audio on various devices and ROMs. And I'm now limiting my efforts mostly to Samsung and HTC devices because 1 single person can't possibly reverse engineer and support the thousands of Android devices out there now.
[Spirit FM] mikereidis:
All I can say at this time is this:

On my ATT OneXL with working FM I see these good lines in the kernel log:

<6>[ 4.024721] asoc: null-codec-dai <-> INT_FM_HOSTLESS mapping ok

...

<6>[ 5.862505] [SMD] smd_alloc_channel() 'APPS_RIVA_BT_CMD' cid=8 size=08192, [Package mode]

<6>[ 5.863543] [SMD] smd_alloc_channel() 'APPS_RIVA_BT_ACL' cid=9 size=08192, [Package mode]

<6>[ 5.869433] [SMD] smd_alloc_channel() 'APPS_FM' cid=10 size=08192, [Package mode]

The first indicates audio support for FM, and I think it's "hostless" meaning the SOC doesn't need to move data. The WDC9310 Qualcomm Media Hub/Codec does the work internally. (

Purer digital audio, yay !)

The next 3 lines indicate the setup of "SMD" channels Qualcomm uses as a form of IPC in their SOCs. The first is for Bluetooth controls, the 2nd for Bluetooth audio, and the last for FM, specifically control I think. As with Broadcom and TI combo chips, Qualcomm FM controls "ride" on top of the Bluetooth HCI transport, and FM stuff runs on the Bluetooth CPU (or "IP").

On the other hand, this is the best match for the above for a Droid Razr HD / XT926:

<6>[ 2.316160,0] asoc: null-codec-dai <-> INT_FM_HOSTLESS mapping ok

...

<6>[ 38.798840,0] Bluetooth: opening HCI-SMD channel :APPS_RIVA_BT_ACL

<6>[ 38.799053,0] Bluetooth: opening HCI-SMD channel :APPS_RIVA_BT_CMD

We see the FM audio setup is the same, and the SMD channels for BT control and audio are opened, but the channel for FM is not.

I don't know enough about the mysterious, undocumented SMD channel arrangements on Qualcomm devices to say why the FM channel isn't opened. There may be a kernel config option, or some files somewhere that set it up.

For all I know, there is a "fuse" that is blown on some chips in order to disable FM.
[Spirit FM] ZRong223:
Mike, I do not mean to "torture" you but... is FM radio still possible in G version Galaxy SII?

Frankly speaking?
[Spirit FM] ickoicko:
Using I9300 here and I have unlocked version. I can't hear a sound and I don't have the Samsung Galaxy S3 ALSA on my audio menu as what I have seen in the front page; running CM10 also. What to do? Thanks!
[Spirit FM] Metallico:
Good question but I don't think so

Enviado desde mi GT-I9100G usando Tapatalk 2
[Spirit FM] Batman66:
I have a Razr M and Spirit does not work...

Mike,

I am one of the poor souls with a "new gen" Razr, I have the Razr M or X907. Thanks for the time you have spent on troubleshooting following my email. It looks like we got to a dead end, at least for now. I will try to collect as many information as I can, if I come up with anything interesting I will share it here. If there is any other setting in Spirit that can be used to gather useful data, I will be happy to give it a try.

All the new Razrs are slated to get a Jelly Bean upgrade by year end. Do you think that may change anything or you are leaning more toward a hardware limitation/block, from what you have seen so far?

I am with you in not understanding why Google does not include FM radio support as a standard function in Android, provided of course that the hardware supports it. Several phones have it out of the box, including my previous one, a 2-yr old HTC Aria with such basic hardware spec to be laughable today. Are they so worried about the missed ad revenues if some people listen to FM radio rather than streaming it? :confused:
[Spirit FM] mikereidis:
If you're a customer and running the latest Oct 17 release, send me a debug log with Menu-> Email Logs and press Send after 10 seconds or so. If you're not a customer you shouldn't be running Unlocked unless I sent it to you for eval or whatever.

Menu-> Settings-> Audio-> Method = "Galaxy S3 ALSA". It's the 3rd selection. If it's not there you must be running a rather old version of Spirit.

And this audio method should be selected automatically anyway. It works for me and for everyone I know who has tried. There are still some audio issues, but I have improvements for next release.
[Spirit FM] mikereidis:
Nothing much has changed and I can't get any more frank / honest / sincere than I have been.

The GT-i9100g is within my goal of targeting higher end Samsung and HTC devices. I certainly want to support it, but can't make any guarantees.

To properly support a device, especially since I've tried without one, I need a device in my hands. Just yesterday I was checking EBay again. There is still a Buy it Now for $600+ and I feel that's way too expensive, compared to the used GT-i9100s that are much more popular for about half that price. There are also 1-2 auctions with several days left.

The scarcity of EBay devices makes me feel the market of users is relatively small, compared to any other Galaxy S/S2/S3 class device.

And the other problem I face is that I need to wind down my hours to more reasonable levels, and just dealing with emails and posts takes up much of a normal days work. And this continues on weekends and holidays, so the equivalent of a 40 hour work week with normal holidays is around 5 hours per day, LOL.

So I "dunno". Wlll Italy have a big earthquake this month ? I don't know. That's the most honest answer.

----

On the Plus side, OMAP is among the better documented and less secret architectures. But Samsung has not released the source for the audio drivers, have they ? Then again, full Google AOSP source is available for the similar Galaxy Nexus, right ? But AOSP has no support for FM.

If CM7 had been built for 9100g, and if it had supported the CM FM app, I would have some example code to work with.

My theory at this point is that 9100g FM audio is digital, and that is more complex than "simply" setting a few ALSA controls to enable analog FM audio. Currently, I have started to delve into digital audio issues on devices I have on my test bench. So what I'm learning on the other devices may help to enable 9100g FM audio.

But the complexity likely also means that I MUST have a physical device to test. If I didn't, my first releases would likely cause havoc with other audio and phone calls. As soon as people get the 1st step, then they want the 2nd, 3rd etc, until it's more or less flawless. So make no mistake, this is very likely not an "I found the trick and it works perfectly" scenario. Getting things to work well can take a LOT of ongoing effort. And ongoing means making things work on new ROMs and new versions of ROMs.
[Spirit FM] GJK21:
No Sound + Can't Find Regional band

Hey I Downloaded The Unlocker Version. But when i try to stream to find stations i find the station Frequency and Name but i can't hear what it's broadcasting... tried looking for my country but i didn't find Lebanon in the list please help :)
[Spirit FM] mikereidis:
I doubt an update will change anything. Could be hardware., software or both, I don't know.

I don't view corporations as "worrying", it's all about maximizing profits. Google may also have bent to the wills of the carriers and OEMs.

And they don't support SDCard on Nexus devices because they want to encourage use of their "cloud".

Broadcast TV competes with Youtube. And Google, like Apple, sells music now too.

Regardless of our own views, most people don't care about OTA radio in their smartphones. At least most in the US/North America.... And even some who do care, consider their phone choice on other factors to be more important than whether or not OTA FM is supported. They say "I love my Nexus/Samsung/Motorola and won't change, but please enable FM if you can". And they post here saying that.
[Spirit FM] ZRong223:
Yeah seriously I hate Nexus because of no SD Card slot and no FM Radio.

Now I even hate Samsung as lack of developer support.

Perhaps my next phone is Sony lol~~
[Spirit FM] mikereidis:
Well we can all hate them all for different reasons, LOL. Pick the lesser of the evils... :)

I'm focusing now on Samsung and HTC, because to me, and most Android phone users and importantly devs, they are overall the "best" and most developer & custom ROM friendly. I have 18 phones now, 1 LG-P500 (old now), 2 Motorola Droid X/2 (old), and the other 15 are Samsung and HTC. I have no plans at this time to buy anything but Samsung and HTC.

- Motorola locks their bootloaders. Few custom ROMs and much trouble.

- LG doesn't update and IMO cheaps out a bit too much. Relatively little dev/custom ROM support compared to S and H.

- Sony makes nice devices but doesn't sell much. Again relatively little dev support, despite some nice moves with code etc.

- Samsung leaves bootloaders unlocked & is popular with devs and users, despite the recent valid complaints about lack of info and source code. Most other OEMs do the same though.

I do hate that higher end Samsung products in the US have no FM capability. Samsung says "yes" to the carriers to remove FM.

- HTC provides an unlock mechanism for most devices now. Their market share has been lost somewhat to Samsung, but they are still OK. They rarely disable FM in their phones, and when they do it may just be a software issue.

I do hate that HTC promised ICS updates for phones such as Desire HD and changed their minds. It was surprising they intended (I guess) to support ICS on the "older" DHD, but they should have honoured their commitment, or at least released the source code that would help custom ROM devs.
[Spirit FM] mikereidis:
Oct 26 Free: http://d-h.st/U9d

- Fixes for headset/speaker and other audio issues on Galaxy S3 GT-i9300 and AT&T OneX(L) and similar HTC MSM8960 / WCN3660 based devices running custom ROMs.

- Some of the FM audio recording stuff is properly functional now, but it's still very much in an alpha/beta/debug state. I don't recall that it works yet on any devices except stock GS3s, Notes and perhaps the HTC devices.

I've managed to prove digital audio, and thus FM recording and perhaps Bluetooth output, is possible on custom ROMs on some recent higher end devices:

- Galaxy S3 GT-i9300.

- Galaxy Note N7000.

- HTC AT&T OneX(L), HTC OneX and similar HTC MSM8960 / WCN3660 based devices.

- International HTC OneX.

I tried to get this to work on some other devices with no luck, including the GS2 GT-i9100 that supposedly has almost identical audio circuitry as the Galaxy Note N7000. The GS2 schematic seems to show Line1 and Line2 swapped, but otherwise the same. And I half suspect an intentional ALSA "deficiency" for that Line In might be responsible, not positive yet.

BUT... FM audio and it's undocumented secrets was and is a MAJOR pain to deal with. FM recording, Bluetooth or digital processing (graphic VU meters at least ?) add a whole new dimension of complications.

SO... There is likely going to be a next phase of Spirit in which I tackle these things, but support will be limited to a relative handful of phones that I have in my possession to test with, and those phones that are similar enough. See next post.