yashsingh1/xdaforums huggingface dataset:
[Spirit FM] mikereidis:
Android L: Spirit1 and Spirit2: (EDIT: Spirit2 for Android L test APK see: http://xdaforums.com/showpost.php?p=55771652&postcount=8499)

Android L: Security enhancements mean there will be "much root app breakage": https://plus.google.com/+Chainfire/posts/Lyhjzu1z9s1 (then follow the followup at bottom, and the followup to that)

That's because (1) Security is a good thing, and (2) Google wants to lock down Android better. IMO (2) will have some bad effects on the Android modding scene; some custom ROMs may disable some of it, but the future isn't clear here.

It's possible that part of Spirit will even need to be flashed via recovery, instead of just installing a root app. So, forget about running Spirit on stock rooted devices, unless the user is able and willing to flash a custom recovery, which can disable OTAs and cause all sorts of grief.

Spirit1/Unlocked: After 3.5 years and 8 Android versions (2.1/2.2/2.3/4.0/4.1/4.2/4.3/4.4), I think Spirit1 has had a good run, particularly for such a root dependent app that goes low level to so many different FM and audio chips, APIs, phones, ROMs and kernels.

(Eg the most common FM chips (Broadcom) are accessed low level in 4 different ways, mostly Android version dependent: hcitool, BT socket, UART, Bluedroid shim. And that doesn't count 4 different high level stock methods for Broadcom chips alone !)

The Spirit1 source code is such (think duct-tape) that it could take hundreds of hours to get it working on Android L and it likely couldn't run on several phones regardless. And for what ? A small scattering of rather old phones lucky enough to get a custom ROM build of Android L that will never run too well regardless ? Even worse than the ICS & JB ROMs for my HTC Legend and Desire HD ?

So 4.4 KitKat will be the last officially supported Android version for Spirit1. If it happens to work on your L ROM, that's great, but it won't be well supported. If your device is supported by Spirit2, it's time to consider moving to it. With sufficient interest, I may consider adding another "older" device or 2 to Spirit2, such as GS3 mini.

I'm happy to hear all thoughts on this "end of life-ing" of Spirit1. As always, email me if you purchased Spirit1 reasonably recently and want a refund or a up/side-grade.

Spirit2: (EDIT: Spirit2 for Android L test APK see: http://xdaforums.com/showpost.php?p=55771652&postcount=8499)

I am expecting to add Android Auto support, which I think shouldn't be too much harder than the current support for AVRCP/lockscreen/notification control and info display. Android Auto supplies the UI and I wonder if it might see use outside of cars as a universal media user interface.

By the end of 2014 I also hope to see UI and functionality enhancements in Spirit2. After 1 year straight I've finally got the basic features (including speaker mode) of Spirit2 running reasonably well on all original targets, as well as M8, G2 and Z2. So with Android L done, there will be more time for beyond basic features.

Thanks, :)

Mike.
[Spirit FM] mikereidis:
Yeah, that's why my 0920 post says "Xperia Z2 probably stock only."

Spirit2 0920 is different for Z2 than other devices, because I didn't get the switch microphone -> FM approach working in the 30-60 minutes alloted (After spending 4 hours figuring out how FM audio really works on Z2; sadly digital->analog->digital only.)

Instead, I used the input device actually allocated for FM. This always seems to work on stock audio HALs only. AOSP HALs tend to have all FM audio code ripped out.

I'm hopeful that Android Auto might see Google support FM on Android better. Most radio listening in North America is done while commuting 1+ hours a day. Of course Google would prefer we use their services and see/hear their ads, but they've at least grudgingly added support for FM on Android One devices.
[Spirit FM] mikereidis:
:)

I'll try to respond in 8-12 hours.
[Spirit FM] JordyNL:
Did anyone manage to get Spirit FM working on the Huawei G510 0100?
[Spirit FM] mikereidis:
No. No sound but tuner might work.
[Spirit FM] mikereidis:
Ignore the PowerHAL errors. Note that there are other "errors" that I'd guess a developer just wanted to attract more attention to. I do the same to remind myself of code that really needs to be fixed but is good enough for now.

I don't see any references to INTERNAL_FM_TX in the logs, nor any reference to FM in the UCM messages.

I think this is an audio error here, from the most recent log:

D/FMService(11617): FMRadio: Requesting to start FM
D/ALSAStreamOps( 206): setParameters(): keyRouting with device 0x0
E/ALSAStreamOps( 206): must not change mDevices to 0
D/ALSAStreamOps( 206): setParameters(): keyRouting with device 0x0
E/ALSAStreamOps( 206): must not change mDevices to 0
D/FMService(11617): Sending Recording intent for = 1
D/BackupManagerService( 587): Now staging backup of com.android.providers.settings
W/ContextImpl(11617): Calling a method in the system process without a qualified user: android.app.ContextImpl.sendBroadcast:1171 android.content.ContextWrapper.sendBroadcast:365 com.caf.fmradio.FMRadioService.sendRecordServiceIntent:738 com.caf.fmradio.FMRadioService.startFM:787 com.caf.fmradio.FMRadioService.fmOn:1620
D/FMService(11617): mAudioManager.setFmRadioOn done

If the audio HAL is open source/AOSP, and has no facility for FM audio, then that's a problem.

The latest FMRadioService.java code I have uses this code:

audioManager.setParameters("FMRadioOn="+mAudioDevice);

And I guess we want this:

mAudioDevice = "headset";

Then the setParameters gets passed to the FM friendly audio HAL which sends an FM friendly UCM request which sets our needed ALSA controls.

Note that the HAL error says "must not change mDevices to 0", so "headset" may not be getting passed, or the HAL just doesn't properly handle "FMRadioOn="

But if Spirit1 and Spirit2 both don't work, then there may be some other puzzle to solve. HTC has a habit of being different with audio and using special DSPs, though I haven't seen any impact on Qualcomm FM chip based HTCs.

Have you tried Spirit2 September 12 0912 as well as Sept 20 0920 ? 0920 uses a different audio architecture for input from the digital FM audio.
[Spirit FM] LenAsh:
Spirit 1 works fine on Sony Z3 as expected. The "quality" of the Sony FM Radio is as good as the Z2 (as in excellent).
[Spirit FM] mikereidis:
Thanks ! :)

Can you send a debug log ? Frequency code "7" as always...

I haven't had the time to explore, but I've been itching to know if Sony would go back to Qualcomm FM chips, and hoping they would, especially if Z3 can transmit too.

If Z2 is a "one off" going back to Broadcom, that's a bit annoying, but I hate the extra A->D->A step and no transmit capability even more.
[Spirit FM] mikereidis:
Spirit2 October 1st/2014 (1001): Extremely Experimental Re-architecture for Android L

APK s2_141001_very_experimental_android_l.apk Attached. Not on Play. Android 4.1+ only. Android 4.0 ICS can no longer be supported.

- Working on Nexus 7 with last Android L preview (as well as any FM app can on a device with FM disabled at least.) There's a reasonable chance it will work on the first Android L stock, GPE, AOSP ROMs. May also work better on Knox'd devices such as GT-N7100. Might require a recovery flash on extra secure ROMs that don't allow remounting /system as read-write.

- Puts binaries s2d and ssd in /system/bin and library libs2t.so in /system/lib . The s2d daemon does most of the root stuff now, so chmod of resources is no longer needed.

- More or less the same microphone/FM switch trickery of 0920 beta release, with priority to "microphone" instead of "default". Frequency response is bad on GT-I9000 and Xperia Z1. Other devices I've tested seem somewhere between OK and as good as the "traditional" Spirit2 PCM ALSA audio on 0911/0912 releases.

- Various little issues, like PI and PT display and some audio strangeness here and there. If startup dialog doesn't go away hit Back. If pause/play button is out of sync, press it. Band "EU+" only, not "USA".

- A lot of re-architecting, including ripping out several complicating layers associated with the STEricsson/Sony FM API. Result is chopping off almost half a megabyte in the APK from 1.5 MB to 1.0 MB. Smaller is better. Good things will result. :)
[Spirit FM] sasukepl:
hi spirit fm work with samsung galaxy tab 3 p5200?

Wysłane z mojego GT-I9505 przy użyciu Tapatalka
[Spirit FM] mikereidis:
No.

The only Samsung tab with FM is a rare variant from Sprint in the US.
[Spirit FM] adrian.aitken:
Installs fine on my rooted Lenovo S6000-F but (always a but) reception sucks. The S6000 don't officially have a FM radio or app but 'Any Radio' works fine in FM mode, clear reception etc.

Visually, on your app, the big dial always springs back to 88 (my local station is at 103.7) but clicking on the text I can manually enter the freq. but the display text and dial always show 88.

The only other real issue is I can't play it out of the speakers, I can only listen in via headphones (used as the aerial).

Since I don't have your 'stable' app I don't know if these are 'features' or normal :D

Many thanks

Adrian
[Spirit FM] Kess78:
According to this disassembly guide it uses BCM chip... Maybe Z3C or Z4 will have Qualcomm...
[Spirit FM] mikereidis:
Thanks for your report. :)

I have no reports on Lenovo S6000. It must use a Qualcomm FM chip if it works at all.

The most likely reason for bad reception on Spirit2/1 only is the use of the "Internal FM antenna" pin. If you want, email me for Spirit1 and you can set this to try.

You could also try my transmit app, which should work on such devices: http://d-h.st/ytE But if it doesn't transmit after 1 minute or less of testing, stop the test or better yet reboot the device. This is just to be safe and prevent trying to transmit out of a grounded pin. I've left phones like this for hours though, with no effect.

I don't use the dial so I didn't notice the dial problem. I enable Visual-izer instead.

Workaround for speaker mode is usually to remove the wired headset plug enough to switch to speaker, but not enough to stop the antenna affect. Or just cut the end off of a plug of cheap/broken earphones.
[Spirit FM] mikereidis:
He sent me a log for Xperia Z3 D6603 and it showed the same Broadcom BCM4339 FM/combo as the Z2. Audio setup for FM is the same also, as expected when the audio works at all with a Broadcom chip.

So my impression is that all Sony flagships have switched to Broadcom now. For how long, who knows, and some models may vary for a while at least... Sony stuck mostly with TI for years, and then Qualcomm for years since Xperia T late 2012. Xperia S was Broadcom in between though.

A casualty here is the Sony/STEricsson FM API that was originally proposed 4 years ago as an Android standard FM API. Spirit2 was based on it, but it's mostly ripped out now with the Android L release of Spirit2. Sony even used it on the Broadcom FM Xperia S, but now they are using Broadcom's proprietary OEM API.

I'm interested to know if anyone thinks the stock FM app (or Spirit) sound much worse on Z2/Z3 than on Qualcomm FM based Z/Z1 etc. With Spirit at least, having an extra A->D->A conversion pair is questionable. Stock Sony FM app would be the same if Bluetooth A2DP was used.
[Spirit FM] haqy:
Hi, Does it work with LG G2 Mini (D610tr)?
[Spirit FM] canolapole:
Will this work on LG Optimus L5 (E617) ?
[Spirit FM] mikereidis:
If there is a stock FM app then maybe.
[Spirit FM] sonyxx:
Spirit FM for Korean version Galaxy S3

Hi Mike,

Thanks a lot for this great app! From all I've read it looks like this is the solution to my problem. I have a Samsung Galaxy S3 SHV-E210S (Korean LTE version) which by default comes without an over-the-air FM radio app.

I would like to know whether Spirit FM is supported by my device and also whether there are any pre-requisites to have it running.

That aside, I live in a part of the world where I can't do online payments so I would like to know whether there is a free version I can download (I have read about Spirit FM Free and Spirit FM Unlocked) and also which is the latest version of the free app.

Thanks in advance for your help.

Edit: I've rooted my phone; running 4.4.4 KitKat official firmware.
[Spirit FM] mikereidis:
Hi, the Korean versions do not have FM. Instead, they mostly have a chip for DMB TV, and an unusual antenna for that.

Most of the rest of your questions are answered in the 1st post of this thread, but I'd guess they are moot at this point.
[Spirit FM] sonyxx:
Oh NO!! I guess that means there is just no way for me to have FM Radio on my device?

That must explain this error message I received when I tried installing Spirit FM Free:

[IMG="Error message screenshot"]http://i57.tinypic.com/4v3k7l.png[/IMG]
[Spirit FM] Rick O:
I'm thinking of getting a new phone to replace my LG G2 -D802. Can anyone suggest the best phone for running Spirit.

Many thanks.
[Spirit FM] dibblebill:
EDIT: Nevermind, signature of OP answered my own question. Thank you. That would've been Spirit1. While 2 looks great, I think I'll stick to the m7's built-in app. I'd rather not muddy up a thread with old issues.
[Spirit FM] Lannister9228:
Will it work?

Hy guys!

I have a simple question. The apk will work with a stock, B199 Huawei Y300-0100? If not, can you please recommend me another kind of FM radio apk, which have RDS function?
[Spirit FM] mikereidis:
Yes. There's a USB dongle solution, but almost nobody wants that. It eats CPU and battery fast and isn't really pocketable.

Sony makes some BT headsets with FM.
[Spirit FM] mikereidis:
I mostly recommend popular phones (among rooters and ROM'ers) that I already own, or those that are very similar.

My recent phones include HTC One M8, Sony Xperia Z1 and similar (with Qualcomm FM/combo chip), Samsung GS3 GT-I9300 (MUST be 9300 !), Samsung Note2 GT-N7100 (MUST be 7100 !).

GT-I9300 is a bit older but still the most popular phone running Spirit the last year, and is very well supported.

One M8, Xperia Z1 and similar would be my second choices. I support Xperia Z2 and Z3 but I have reservations, due to an additional A->D->A conversion.

All of these are very popular with rooters and ROM'ers, but that's winding down on older phones like GS3 and Z1.

Technically, I like the Qualcomm FM/combo chips the most, which opens the doors to cheaper phones like MotoG which I also own.
[Spirit FM] mikereidis:
Don't worry about mud, I'm here to help the best I can. :)

Yes, if you have a stock ROM with a stock FM app, you don't really need Spirit, unless you need some of it's extra features, like recording, EQ, visualizers and FM over Bluetooth.
[Spirit FM] mikereidis:
Probably not. Even if it does work, I can't support it well.

You can try Spirit1 Free from Sept, 2013 or any of the posted test versions of Spirit2. Links are in post #1.
[Spirit FM] Lannister9228:
Yes, thank you. I've tried the spirit1 free version, but it showed up an error (someone earlyer posted that), and I can't find any link to the Spirit2 test versions.... Could you please send me one?
[Spirit FM] mikereidis:
I don't recall what error that might be, but most Spirit startup errors indicate that it can't work, for example because the device uses Mediatek chips.

Latest experimental Spirit2 is here: http://xdaforums.com/showpost.php?p=55771652&postcount=8499

The only chance is if the device has Qualcomm FM and audio chips, in which case Spirit1 should work also.
[Spirit FM] Lannister9228:
Thanks, i'll give it a chance.

I installed it, and it seems, could work. BUT I can't search through the channels. It seems like the buttons don't react to my touch (I hear the static noise)...
[Spirit FM] matthewtech770:
Hello Sir.just to let you know thanks for your great app your Latest experimental Spirit2 in working on my HTC One Max running CM11 whats the difference with Spirit2 on the Google Play store :laugh:
[Spirit FM] lossah:
I get really bad reception with this app. I'm using Spirit 2 with LG G3. When I move the cable around I get very good reception , always, then immediatly when I drop the cable to let it sit its bad again. Trying to move the phone around, tried http://m.aliexpress.com/item/1440582300.html and 3 different 3,5mm aux cables. Always end up with the same problem. Moving my phone around, move it like 2cm etc sometimes help but its really hard to find a good spot for the phone and the cable/antenna.

I'm using antenna since I'm using Bluetooth. As soon as I use my usual phones with a normal cable pluged in I get good reception. :/

Again, it is possible to get good reception with this app, but its just so so hard its not worth to find a spot since it usually takes a lot of time, and I'm getting frustrated. :D Except if I move the cable around 24/7, then its all good.

Sorry for bad english, hopefully you understand. :) and sorry if its been answered in some way, its just a veeeery long thread. :D
[Spirit FM] dadino:
hello i have a car dvd unit with android 4.2 from zhinavi, can this app works?

because i installed nova launcher and the native radio icon is no longer visualized, and the native home screen is bad.
[Spirit FM] mikereidis:
The 0912 release of Spirit2 on Play is more usable, with fewer bugs, but likely won't work on Android L.

The experimental 1001 release is more buggy, but should work on Android L, and is better described in the post for it: http://xdaforums.com/showpost.php?p=55771652&postcount=8499
[Spirit FM] mikereidis:
No, probably not.

Most of the car units have radio chips that don't exist in popular phones (especially AM/FM chips) and/or that I don't support, such as Mediatek.

Even if I supported the chip, audio probably wouldn't work, unless it used a Qualcomm FM/combo chip and Qualcomm audio.
[Spirit FM] mikereidis:
Hi, this statement above confuses me. Do you mean the G3 ? Is this true with Spirit2 or with the stock LG FM app or either ?

And "normal cable" means a normal wired headset ?

Is your G3 ROM'd or is it running a rooted stock ROM ? Does the LG FM app have the same problem with those antennas ?

In general, Spirit does nothing that should improve or reduce reception.

One exception is that some Qualcomm FM/combo chip based devices (Sony) use a different FM antenna pin on the chip. In Spirit1 you can set Menu-> Settings-> Debug-> QCOM Antenna to "Internal" and restart Spirit1 to see if reception improves. Email me if you need a test release of Spirit1 to try.
[Spirit FM] lossah:
Thanks for answer!

Understandable. :D I meant headphones. When I use my normal headphones with a cable I get much better reception.

What you said seems true. I get the same reception with stock FM app and Spirit. I'm using G3 rooted with stock rom. However I will most likely install other roms as soon they come available, will this be a problem?

I can't find one frequency at all that's working on Spirit 1. :/ Its just a buzzing sound all the time.

Nothing to do with the app but need to ask anyway. At my work it seems I get really bad reception at a channel I'm listening to the most. And with Bluetooth and any antenna I'm using I get bad reception as said. Is it possible somehow to increase it? With some kind of a receiver. I don't need to be able to plug it on the phone, just some way. Place it close to a window or something. I'm really noobish when it comes to this. :D I just really don't wanna use digital through internet since its gonna be very expensive if I need to stream all days.

Can I buy some kind of a external receiver and place it at a window, use my antenna on my phone, and use Bluetooth?

Sorry for off topic. :/
[Spirit FM] mikereidis:
Spirit often works better on AOSP ROMs than stock ROMs. Other than that, ROM shouldn't matter too much, as long as Spirit has root.

Spirit1 last Play release has a bug on LG devices; it detects them as Broadcom based. To fix, set Menu-> Settings-> Debug-> FM Chip to "QC V4L (HTC)" and restart Spirit1.

I don't think that short antenna is helping. I don't think I know anybody who is happy with an antenna like that. You need a wired headset cable of 1 metre length or more. If using BT, you could take an old earphone cable and sacrifice it by cutting the wire right at the earphones, to be as long as possible. 1-2 metres is probably optimum.

Now stretch the cable out straight. Usually orienting it vertically is best, I think, but experiment for best audio quality (High RSSI is no good if audio is bad).

If reception is better with the headset cable only partly plugged in, there are other options such as cutting the end off of the plug.

Different cables can produce different results, so if you have others, then experiment. If folding up the last 10 centimetres of the antenna produces better results, you could cut that 10 cm off. Different frequencies may be best with different antenna lengths.

Sometimes plugging the phone USB into a charger or computer might help a bit.

If you can get the cable outside the window, that's better than inside, especially if there is much metal in the walls or windows. Ideally this window would face the transmitter antenna, with a minimum of trees and buildings between you and transmitter. In general, experiment with placement. If there is metal in the walls or windows, getting the antenna to stand at least 20-40 cm away from that metal may help.

If listening to talk radio/news, or if you don't need stereo, use the Spirit settings to disable stereo and go mono. That can reduce noise a lot.

Using an equalizer to reduce high frequencies may reduce noise.

You COULD put the phone and antenna outside if it's close enough for BT; around 10-20 metres in my experience. But you probably don't want to get rain on the phone, or put it through temperature extremes.
[Spirit FM] mikereidis:
Nexus 6, 9, Player & Android 5.0:

I've just pre-ordered the Nexus 9 tablet and Nexus Player from Google Play, and am looking at the latest Android 5 info.

Android 5.0: The Spirit2 Android re-architecture is continuing. The next release of Spirit Transmit will be based on the new Spirit2.

As previously reported, Spirit1 is not expected to be upgraded to support Android 5.0. If Android 5 security is turned off, it might work, but I don't know if that will be possible.

Otherwise, the major re-architecture needed for Spirit1 would be a project much bigger than I can handle. It would be easier to add support for a few devices in Spirit2.

Nexus 9: I seriously doubt any of the new Nexus's will internally support FM, but there IS at least SOME hope for the Nexus 9 tablet made by HTC, because:

- HTC tends to support FM on ALL their devices, or at least leaves FM enabled in hardware.

- The first, and the only previous "official" Nexus device from HTC was capable of FM, though it required at minimum a custom kernel to allow FM audio to be enabled.

- I'm expecting to see an HTC branded and renamed variant of the Nexus 9 at some point.

The old, ill fated HTC Flyer tablet did not have FM, but I HOPE to see a new HTC tablet with FM support. Ideally it would have pretty much the same hardware, as we saw with the original Nexus One vs it's sibling the HTC Desire.

That said, Google appeared to "smarten up" after Nexus One and specified that each new Nexus device MUST have FM permanently disabled by grounding the FM antenna pin.

Nexus 6: I think we can forget about FM on this device, which may be a variant of the new Moto X. Motorola has never enabled FM on Moto X devices, nor any other recent flagship devices.

Nexus Player: I'm pretty sure the Player won't have FM either. But since it's intended to be stationary, a dongle solution should be possible. We shall see...
[Spirit FM] JorgeOC:
Potential Market in Mexico

Hi I've just stumble on your app. I think that your app would be well appreciated in Mexico that I think has a big market with Samsnug. At least those are the one I prefer. Mine in particular is the model SGH-I337M (GS4) from the major carrier Telcel though I have it rooted and the stock from Bell Canada. The people I know either with the GS5 or GS4 miss the Radio tuner. If you think it an opportunity please let me know to spread the news.

Best Regards,

Jorge
[Spirit FM] mikereidis:
Samsung disabled FM on GS4 and GS5.