FORUMS
Remove All Ads from XDA

Spirit1, Spirit2 Real FM Radio General Thread

7,827 posts
Thanks Meter: 4,164
 
By mikereidis, Inactive Recognized Developer on 1st May 2011, 09:23 PM
Post Reply Email Thread
23rd November 2012, 11:13 AM |#4881  
OP Inactive Recognized Developer
Flag Ottawa/Gatineau, Canada
Thanks Meter: 4,164
 
Donate to Me
More
Spirit documentation Nov 23, 2012: http://d-h.st/TxN
  • Introduction
  • Quick Start: Startup & Trouble-shooting
  • Settings
  • Next Gen: Spirit2 (and see next post)

Dec 19 Spirit2 detailed design: http://forum.xda-developers.com/show...php?p=35571087

Play Description: https://play.google.com/store/apps/d...cros.fm_unlock

First 3 posts: http://forum.xda-developers.com/show...php?p=13380058

Old compatibility list: http://forum.xda-developers.com/show...php?p=34028503

FAQ: http://forum.xda-developers.com/show...59296&page=447
The Following User Says Thank You to mikereidis For This Useful Post: [ View ] Gift mikereidis Ad-Free
 
 
23rd November 2012, 11:14 AM |#4882  
OP Inactive Recognized Developer
Flag Ottawa/Gatineau, Canada
Thanks Meter: 4,164
 
Donate to Me
More
This is an early document, for further details see: "Dec 19 Spirit2 design details": http://forum.xda-developers.com/show...php?p=35571087

Next Gen: Spirit2

After almost 2 years, Spirit FM (Spirit1 or version 1) is "mature". Among over 10,000 paid customers, many have been happy to run Spirit on 2-4 generations of phones.
From HTC Legends, Desires and Nexus1's running Android 2.1 Eclair, to OneX, Galaxy S, S2, and now S3 & Note2 running Android 4.2 Jellybean.

Spirit1 was not designed much, it was rapidly built using an open source app as it's base. This enabled a quick implementation on many phones, ROMs, etc.
A lot of quick hacks has accumulated, and now it's difficult to change or cleanup many sections of code without creating bugs on some phone and ROM combinations.

It's time to start fresh and design and build Spirit2 "properly".
I'll create a system to enable new settings/options in a few minutes, instead of an hour or more, editing 5 or 6 different files.
The code will be much cleaner, efficient and bug free when it doesn't have to support 7 different versions of Android, 200 different phones and 10 different FM APIs.


Spirit1 Future

Spirit1 will not disappear. Support will continue, but I can't guarantee I'll be able to make it work on old (3-4 year) phones running Android 4.2 JellyBean, for example.
No major new functions will likely be added to Spirit1. For example, FM record may remain an experimental test option, but will not be supported.

I will continue to make and release some minor bug and compatibility fixes; timing & extent to be determined. My focus will be on Spirit2, the future.
I hope those disappointed will eventually appreciate my decision to focus on the future when they get a new device.

I expect to cease sales of Spirit1 at some time; maybe in months or maybe years. At present, Google doesn't provide a good way to do this, and still allow
existing customers to re-download. AFAICT we can only set the price to high values, such as $99.99 or $249. If you ever see such a price on Spirit1 Light,
or Light & Unlocked, don't be appalled. It just means I wish to stop new sales while keeping existing customers happy.

In the short term, Spirit1 might even become a testing ground for Spirit2. Before a device is officially supported by Spirit2, it may be enabled on Spirit1.
Sometimes I get several reports that a new phone works OK. Then after some time, major problems become evident that make me regret calling the device supported,
especially for rarer devices.


Spirit2 Plans

Plans are always subject to change. Gotta be nimble.

Spirit2 will be available on Google Play around January, 2013. Beta versions will be available earlier, linked on a new XDA thread.
No Light version is planned, but a free version may be. Price should be the same as Spirit1 Unlocked.

Existing Spirit1 Unlocked customers can upgrade at no cost to Spirit2. Spirit2 isn't about making you pay twice.
But if you feel generous and appreciative of my support over the last few years, I'd be happy if you made a 2nd purchase.
Or as some appreciative users have, a 3rd, via Light or an additional tip/donation.

The upgrade path from Light to Spirit1 Unlocked, or to Spirit2, or from Unlocked to Spirit2 is the same. I cancel your original order, even 2 years later, and you get
a full refund. Then you simply buy the new version. You can email me for special needs, such as needing 2 versions for different phones.
I cancel any order at any time on request anyway, so this is nothing new.

Spirit2 will focus on a smaller number of popular phones among custom ROM developers and users. I will only support phones that I own for testing, and those with
very similar architectures. The 80/20 rule applies here, and focusing on 20% of the phones, for 80% coverage just makes sense.

If you want to run Spirit2, I recommend popular high end devices, mostly from Samsung and HTC. I'll be happy to make exceptions for other OEMs with popular higher end
phones, or phones with a similar architecture. For example, LG Optimus G and some Motorola devices have the same S3/S4/+ Qualcomm FM/audio architecture as HTC OneX LTE.


Spirit2 Design

Spirit2 design started November, 2012, after a 12 month delay from original plans.

Spirit2 will support digital audio features, such as FM recording, Bluetooth, VU meters and who knows what, possibly including visualizations and audio analysis.
Phones that are not capable of digital audio features likely won't be supported. Thankfully, the wildly popular GS2 GT-i9100 is now proven to support digital FM audio.

Unchanged from my original 2011 plan, Spirit will use and support the ST-Ericsson proposed Android FM API, hereafter referred to as "Android FM API", despite it's
mere "proposed" status. The Android FM API was first proposed over 2 years ago now, and seems to slowly be making it's way into AOSP. It's slow progress,
and uncertain future, has disappointed me. I hope that Spirit2 will help this FM API gain support from
phone and FM chip OEMs, as well as other 3rd party app developers.

Many Sony 2012 phones support this API already, on devices based on ST-Ericsson, Broadcom and Qualcomm FM chips at least. So stock, unrooted Sony devices should be
well supported, in theory at least. I'm not committing to official Sony support at this time however.
This API is similar to other "OEM Proprietary FM APIa" that don't need SU/root. But it's not proprietary, it's openly documented & uses open source code.

Other "OEM Proprietary" APIs will likely not be supported. Spirit2 will retain a focus on custom AOSP type ROMs that are incapable of running stock FM apps.
Support for different FM chips will be via plugins, exactly as specified for use with the Android FM API.

Unless and until phone or chip OEMs supply suitable FM chip plugins, Spirit2 will provide them. Sony has at least 3 plugins, but it's not clear if Sony can or would
allow their free re-distribution for other devices.

Third party developers will be able to write apps using the open, rich & documented Android FM API.
They will be able to run as standalone apps, widgets, etc. without Spirit2, on devices such as the Sony's that support this API (or a slight derivative).

On devices that do not support this API natively, 3rd party apps will be able to call compatible functions in the bottom-half, service portion of Spirit2.
They won't have to bother with tedious, boring stuff such as configuration, as the top-half, app/GUI portion of Spirit2 can handle that.
Or they could provide their own configuration mechanisms and do anything that Spirit2 does.

I hope that custom ROMs will be built using the Android FM API AOSP code, and support FM natively within their audio libraries and frameworks.
But I can't count on this anytime soon, so Spirit2 will do it's best to emulate functionality that is ideally done in the internals of a ROM.
This is the current situation with Spirit1 on many custom ROMs and it requires LOTS of effort and can never be perfect.

"FM Chip control" is just one part of the Android FM API. The other major component is audio routing and control. Audio has been the major challenge of Spirit1.
The FM chip/API code has changed very little during 2012.

A device that fully supports the Android FM API makes audio issues quite simple. The app can simply start or stop the audio with easy functions. Complexities like
volume control, headset cable media buttons, lockscreen controls, and possibly A2DP Bluetooth support can be taken care of by the framework of the ROM.
Even FM recording should be simple, on devices that support it. Spirit1 supports a simple FM record function, but it only works on devices like GS3 at present.

But Spirit2 will remain a more or less normal SU/root app, as Spirit1 is. I'm one person & don't have the resources to get involved in building kernels, libraries,
frameworks and ROMs. So Spirit2 will have components that replicate, as best it can, a proper system service for handling FM and FM related audio.

It seems to make sense to design & build a plugin mechanism for handling FM audio, similar in concept to the FM chip plugin for the Android FM API.
The Android FM API chip plugin, a library file such as libfmradio.cg2900.so, is oriented to code at the C/C++/JNI layer of Android/Java.
The Spirit2 audio system plugin is more likely to be done at the Java level, as there are many Android Java APIs that are required or useful.

Hypothetically, Spirit2 could run even on officially unsupported phones, if someone has or writes an FM plugin and an audio plugin.
Many FM chips could be supported, with at least basic features, by a single generic V4L FM plugin. A simple generic audio plugin could be created
that would rely on configurable "reflected" Java APIs or shell scripts etc. The "real world" however, is messier than this might imply.

Some portions of Spirit2 will be open sourced. Details to be determined.


EDIT: Which phones/architectures will Spirit2 support ?

Tentative, but:

Galaxy S3/Note2
Galaxy S2/Note
OneX International
OneS/X LTE, Evo 4G LTE & similar S3/S4/+ + WCN3660 + WCD9310. Might include Optimus G, Motorola.
Any Nexus capable of FM. Nexus 4 ? 10 ?
Sony 2012's maybe, since they support this API when stock.
I'm keeping an eye on popularity & compatibility of Motorola Razr I.
The Following 36 Users Say Thank You to mikereidis For This Useful Post: [ View ] Gift mikereidis Ad-Free
23rd November 2012, 11:31 AM |#4883  
Metallico's Avatar
Senior Member
Flag Montevideo (Uruguay)
Thanks Meter: 107
 
More
Great news man!
Keep going!

Hell Yeah!

Enviado desde mi GT-I9100G usando Tapatalk 2
23rd November 2012, 11:45 AM |#4884  
dboechat's Avatar
Senior Member
Thanks Meter: 74
 
More
Great news! I already have Spirit Unlocked but I'm willing to pay again for Spirit 2.
23rd November 2012, 11:58 AM |#4885  
OP Inactive Recognized Developer
Flag Ottawa/Gatineau, Canada
Thanks Meter: 4,164
 
Donate to Me
More
Quote:
Originally Posted by Metallico

Great news man!
Keep going!

Hello Yeah!

Enviado desde mi GT-I9100G usando Tapatalk 2



But please consider more popular devices for Spirit2.

I have serious doubts about GT-i9100G. I need a physical device for Spirit2 support, and all the 9100G sales I've had won't even pay for a used one on EBay yet.

As a plus, 9100G OMAP is open-ish, and it looks like FM record might be possible (as long as all other audio functions are unused).

I've even been on the edge deciding about GS2 GT-i9100, despite it being the most popular Spirit phone, at 30% of sales. But that, and the discovery the other day that SGS2 CAN do FM recording combined to cement the decision.

The future next year, IMO, belongs to SGS3, Note2 and S4/S4+ based devices like OneS/X LTE, Optimus G and Maxx HD.

But devices like SGS2 and Note, that are getting stock JB soon, are still pretty important I think.
The Following User Says Thank You to mikereidis For This Useful Post: [ View ] Gift mikereidis Ad-Free
23rd November 2012, 12:17 PM |#4886  
Metallico's Avatar
Senior Member
Flag Montevideo (Uruguay)
Thanks Meter: 107
 
More
Ok, but im happy for your and because your work is going forward.

Btw: i will change my phone some day

Best regards, from Uruguay

Enviado desde mi GT-I9100G usando Tapatalk 2
23rd November 2012, 02:10 PM |#4887  
Member
Thanks Meter: 17
 
More
Is anyone else unable to download the latest version from dev-host? Every time I click Download I just get redirected to main page of dev-host and no download starts.
23rd November 2012, 11:16 PM |#4888  
OP Inactive Recognized Developer
Flag Ottawa/Gatineau, Canada
Thanks Meter: 4,164
 
Donate to Me
More
Quote:
Originally Posted by iCole

Is anyone else unable to download the latest version from dev-host? Every time I click Download I just get redirected to main page of dev-host and no download starts.

November 19 here ? : http://d-h.st/yEc

Works for me.

I just saw download count go from 406 to 407, so it's working for many people.
24th November 2012, 01:53 PM |#4889  
Junior Member
Flag Ahrensburg
Thanks Meter: 1
 
Donate to Me
More
I hadn't checked that out. Thanks for this.

Works pretty decent now!

Gesendet von meinem HTC One X mit Tapatalk 2
25th November 2012, 06:33 AM |#4890  
Member
Thanks Meter: 9
 
More
Hi Mike, would you consider supporting devices using MediaTek's MT6620 chips? I think it's getting popular (at least for China devices).
If you are interested, I'm using ZTE V970 and I think can provide you the original FM APK (which is not obfuscated) with the native library.
25th November 2012, 06:48 AM |#4891  
dr.devman's Avatar
Senior Member
Flag On the Ground
Thanks Meter: 94
 
More
Even on tmo gs3?
Post Reply Subscribe to Thread

Tags
spirit fm radio receiver ota

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes