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
18th February 2015, 08:39 AM |#8941  
Junior Member
Thanks Meter: 0
 
More
help - P500
I'm new to custom roms and spirit and use to regular listen to broadcast radio when I was on stock Gingerbread

I upgraded my LG P500 to kitkat using cm11 [v11] and used the spirit settings described here except they don't work

I simply get Error: No FM accessible SU:2 Fm:BC2 Su:1 Bt:0 Ht:0 Mo:BCU

Any ideas ?

Note I had CM11 v12 but downgraded to v11 as the Spirit settings described in the link above don't exist in the Spirit that comes with CM v12
 
 
19th February 2015, 07:50 PM |#8942  
Senior Member
Thanks Meter: 20
 
More
Spirit 2 for kitkat on HTC One S
Spirit 2 works, but after about 15 min, the audio cuts off and I have to close and restart the app to get audio back. Any thoughts?

Thanks!
20th February 2015, 05:46 AM |#8943  
dk147in's Avatar
Senior Member
Flag New Delhi
Thanks Meter: 47
 
Donate to Me
More
Quote:
Originally Posted by Superchill11

Spirit 2 works, but after about 15 min, the audio cuts off and I have to close and restart the app to get audio back. Any thoughts?

Thanks!

Incidently you one give superuser permission for 15 min only, better open supersu app then go to settings then click the # icon there - it turns green if you grant permission ..because by default it only gives permission for 15 only....
20th February 2015, 04:11 PM |#8944  
paulle's Avatar
Senior Member
Thanks Meter: 274
 
More
spirit2 cm12 xperia
Hello is are these lines of code needed to run spirit2 under cm12 on sony xperia Zx ?

http://review.cyanogenmod.org/#/c/88943/
21st February 2015, 09:32 AM |#8945  
OP Inactive Recognized Developer
Flag Ottawa/Gatineau, Canada
Thanks Meter: 4,164
 
Donate to Me
More
Quote:
Originally Posted by juniorhxcx

Good day,

I need help, which version would be running on the Sony Xperia ZL (6503)?

I am using the CM12.

Sorry for my delay...

As Spirit has passed it's 4th birthday, I have decided to spend more time in seclusion to develop, and less time here on XDA and with email. I have made very good progress on Spirit2 the last few weeks, without undue distress to my sanity or family life.

For Lollipop+ ROMs, Spirit2 is the only viable & supportable option. I have an experimental Spirit1 that works on some Android 5 ROMs/devices, but only if SELinux is disabled, which I can not recommend.

Spirit2 should work OK on Xperia ZL if the kernel contains the FM driver needed. Some of the FXP/CM12 ROMs have kernels with FM disabled at this time, but I am working to get that fixed.

There is a chance you might need to manually set an Antenna option. If the "Internal" setting works, then your Sony is able to transmit too, with Spirit Transmit...

One of the other issues with Sony's running CM12 is that some have a horrible sound, due to microphone pre-processing that I am looking for some better methods to deal with. One option here is to remove a system library file (with mic implications). Another is the use of an experimental analog audio mode in the latest Spirit2 beta updates, including today's: Feb 21: 20150221.
21st February 2015, 09:50 AM |#8946  
OP Inactive Recognized Developer
Flag Ottawa/Gatineau, Canada
Thanks Meter: 4,164
 
Donate to Me
More
Quote:
Originally Posted by SnijbooN1982

Hi Mike,

Today I've flashed CM12 on my Xperia T and hoped that Spirit would work on it - so I bought it via the play store (fm.a2d.s2) to try it, the app is working - as in not freezing / crashing etc - however it's not useable as the signal is very poor,
whilst going through the threads on XDA (might have done that prior to purchasing - but that's another discussion) I found that I might require Spirit Transmit instead?

Any guidance / support would be highly appreciated.

Sorry for my delay. See post 8946 above for an explanation...

No, Spirit Transmit is only needed if you want to SEND or TRANSMIT FM signals/audio to some other FM radio or phone with an FM radio function. And Spirit2 has a hidden, limited transmit mode to test with: Enter "48" as if it is a frequency to enable, and restart Spirit2. Enter "49" the same way to disable and return to FM receive mode.

BUT, there is a link between Transmit capability and an "Internal Antenna" setting that is needed on a few Sony devices that Spirit2 does not yet recognize as needing that setting. The link is that if "Internal Antenna" works, then transmit does also.

Spirit1 has this setting to set manually, but Spirit2 will not until probably the next beta release.


BUT, you may be having the "no Qualcomm V4L FM driver in the kernel" problem that is happening on many Sony's. At present, Spirit2 does not report this problem properly, and instead seems to start and work, but does not.

I have submitted a patch to CM12 for this issue on my Xperia Z1, but haven't gotten back to (I think) doing the patch for other Sony's that the CM person I dealt with requested. I have a self built kernel for my Z1 that works, and I may build some kernels for the other devices in the next few days.
21st February 2015, 09:59 AM |#8947  
OP Inactive Recognized Developer
Flag Ottawa/Gatineau, Canada
Thanks Meter: 4,164
 
Donate to Me
More
Quote:
Originally Posted by Superchill11

Spirit 2 works, but after about 15 min, the audio cuts off and I have to close and restart the app to get audio back. Any thoughts?

Thanks!

Sorry for my delay...

I think that changing frequency, or just re-setting the existing preset restores audio without having to restart Spirit2.

I think that the new 20150221 Feb 21 beta release of Spirit2 finally fixes this issue on Qualcomm FM chips. Customers can sign up for beta releases with the instructions here: http://forum.xda-developers.com/show...&postcount=795

I think that the fancy power management was shutting down the FM audio because it "thought" it wasn't being used.

Previously I had sometimes useful code to "kick" the chip when silence was detected, but the better solution is just to kick it every 10 minutes, LOL.
21st February 2015, 10:04 AM |#8948  
OP Inactive Recognized Developer
Flag Ottawa/Gatineau, Canada
Thanks Meter: 4,164
 
Donate to Me
More
Quote:
Originally Posted by dk147in

Incidently you one give superuser permission for 15 min only, better open supersu app then go to settings then click the # icon there - it turns green if you grant permission ..because by default it only gives permission for 15 only....

Thanks.

It was a Qualcomm FM chip specific power management issue as I posted above.

The latest Spirit2 releases generally only need SU once when FM is started. Unless FM is powered off, Spirit can run for days without needing SU again, even while audio is paused, though starting any media player app will kick FM off.
21st February 2015, 10:06 AM |#8949  
OP Inactive Recognized Developer
Flag Ottawa/Gatineau, Canada
Thanks Meter: 4,164
 
Donate to Me
More
Quote:
Originally Posted by paulle

Hello is are these lines of code needed to run spirit2 under cm12 on sony xperia Zx ?

http://review.cyanogenmod.org/#/c/88943/

Yes.

It is not even code. It's just 2 lines in the kernel configuration file to enable the FM driver.
21st February 2015, 10:09 AM |#8950  
OP Inactive Recognized Developer
Flag Ottawa/Gatineau, Canada
Thanks Meter: 4,164
 
Donate to Me
More
Spirit News Feb 21, 2015: The "Spirit FM Radio" project is now over 4 years old !

Here is the thread where it was born: http://forum.xda-developers.com/showthread.php?t=947581 and my 1st post #6 on that thread: http://forum.xda-developers.com/show...04&postcount=6

I am happy to say that after 4 years I am pretty happy with the outcome, though my income is a fraction of what "normal" jobs in this field pay, and I have no cache of Google, CM Ine, or any other stock options to see me retiring anytime soon.

How far has Spirit come, and what is next ?

First, sometimes things seem to take forever, but "1st things 1st": I prefer to concentrate on minimizing bugs and taking care of the millions of "under the cover" issues before adding "eye candy" and non-essential features on top of an unstable base.

Now that I am reasonably happy with the stability of Spirit2, I have been able to add many new settings and features. Most of these finally re-duplicate Spirit1 features, but of course on top of the much better designed Spirit2 which is the clear "way forward".

Second, I'm really happy with the "new, improved" Analog mode in the Feb 21 Spirit2 beta. Spirit2 has re-entered the analog domain that Spirit1 and most stock FM apps were based on. Why, and what does this mean ?

Spirit2 was designed with "Digital Audio" as the method to move audio from the FM chip to our ears, instead of the analog (or not fully digital) audio architecture that pretty much every other FM app uses, even now in 2015.

This makes FM audio act like media player audio, instead of the "special" and restricted form of FM audio that FM was originally designed into smart-phones with. FM was a "tacked on" afterthought and had a special & external position in the audio chain. I believe this is a direct result of the fact that FM radio goes against the business interests of Google (as well as Apple and US carriers.)

FM audio could not (and usually still cannot using other FM apps) be equalized, bass-boosted, re-verbed and otherwise processed. It usually can not be send to Bluetooth headsets, nor recorded or visualized.

Spirit2's method of FM digital audio means you can equalize and process it, send it to Bluetooth devices, record it and visualize it. I don't think there is ANY other FM app that provides all of these features together (to say nothing of all the media button/AVRCP, notification shade, lockscreen, homescreen widget features and many settings, present now or soon.)

Spirit2's digital audio architecture was back-ported to Spirit1, but despite relative stability and a full year of fixes, was never made fully supported or default. That job went to Spirit2, which still had to compete for development time with Spirit1 throughout 2014.

But with the upsides of digital audio (including some invisible to most of you, but that make my work a bit easier), come downsides, and some of these are reasons to re-implement an analog mode in Spirit2:

- Digital audio mode does not work well on some ROMs/devices. Most of my testing is with CM11/12, and these tend to work well with Spirit, ut there are always some ROMs/devices that have issues.

Currently, many Sony (and some other) devices, especially on Lollipop, have horrible audio, due to microphone based pre-processing that kills audio quality for non-speech and non-microphone purposes. I am examining solutions for this, and analog audio is a quick fix/workaround.

- Some semi-popular devices (like GS3 mini) are supported with Spirit1 analog audio mode, but not with digital mode, nor with Spirit2 at all when it had only digital mode. Digital audio mode is impossible with most older devices, and even where possible would require too much investment of time and money to be worth it.

In the case of the GS3 mini (and some others), Spirit2 has tuner code for the FM chip, but no audio code. The analog mode allows me to add experimental audio methods for such phones from the Spirit1 code.

The Spirit2 Free and Open source version (which has 90% of the code of the full Spirit2) is hoped to benefit from this. I am creating an audio plugin design, like the existing FM tuner chip plugin design, that will allow others to add support for phones that I can't officially support for lack of time, etc. Plugins for analog mode should be easier than for digital.

- Analog vs Digital "purity": In some cases, analog audio may sound better to some people. Xperia Z2 & Z3+ especially has a disappointing architecture here, for 2014-2015 devices. It, as well as the EXTREMELY popular GS3/GS2/GS1/Note2/Note1 devices (70% of Spirit sales) provide only analog outputs from the FM chip, AFTER processing the audio digitally, as ALL smartphone FM chips have done since the dawn of Android.

So on those devices, Spirit2 routes the analog audio from the FM chip to "ADC's" (analog to digital converters) on the audio chip. Then the digital audio is processed digitally, and usually (non-Bluetooth) sent out to DACs to convert the digital back to analog for wired headsets of the phone speaker. The result is one additional D-> A-> D pair of conversions. Each conversion loses some audio quality. Add them all up, and you may be surprised:

Singer/instrument professional analog microphones -> professional ADCs -> professional processing -> digital CD -> analog FM transmitter (at least 1 conversion) -> analog FM receiver -> FM chip ADCs -> FM chip processing -> FM chip analog outout -> audio chip ADCs -> Android processing -> audio chip DACs -> analog processing -> wired headset or speaker. Wow, long chain, and that's a minimum. Adding another pair of conversions is bad for audio quality, especially in the later and non-professional stages.

Note that many modern devices do not support a TRUE analog mode and I describe them as "non-digital", meaning "Not the digital audio mode in Spirit2". But they are digital underneath, with all the advantages of digital, but without the downside of having to first convert analog to digital and thus adding 2 new conversions to the chain.

The fully digital devices supported by Spirit2 are: HTC One M7, One M8 (and all other Qualcomm FM devices, including Xperia Z/Z1 class, MotoG and LG G3), LG G2.

The analog conversion devices are Xperia Z2/Z3+ and all Spirit2 supported Samsung flagships: GS1/GS2/GS3 and Note1/Note2.


- What about reduced CPU and power consumption ?

No, analog audio mode provides no substantial savings at present, but this can be improved somewhat.
The Following 9 Users Say Thank You to mikereidis For This Useful Post: [ View ] Gift mikereidis Ad-Free
21st February 2015, 11:57 AM |#8951  
Senior Member
Thanks Meter: 258
 
More
Saga/Desire S: Doesn't work on CM12
Quote:
Originally Posted by mikereidis

Can you tell me if any of these exist ? ;

/dev/msm_snd
/dev/msm_audio_ctl
/dev/msm_audio_dev_ctrl

On my Saga w/ CM12 installed it doesn't work (SpiritF 2015_01_23_beta).

I have the following:
Code:
[email protected]:/ # ls -la /dev/msm*
crw-rw---- system   audio     10,  53 2015-02-18 23:32 msm_aac
crw-rw---- system   audio     10,  20 2015-02-18 23:32 msm_acdb
crw------- root     root      10,  29 2015-02-18 23:32 msm_adc
crw-rw---- system   audio     10,  52 2015-02-18 23:32 msm_amrnb_in
crw-rw---- system   audio     10,  57 2015-02-18 23:32 msm_audio_dev_ctrl
crw-rw---- system   camera   238,   1 2015-02-18 23:32 config0
crw-rw---- system   camera   238,   5 2015-02-18 23:32 config1
crw-rw---- system   camera   238,   0 2015-02-18 23:32 control0
crw-rw---- system   camera   238,   4 2015-02-18 23:32 control1
crw-rw---- system   camera   238,   2 2015-02-18 23:32 frame0
crw-rw---- system   camera   238,   6 2015-02-18 23:32 frame1
crw-rw---- system   camera   238,   3 2015-02-18 23:32 pic0
crw-rw---- system   camera   238,   7 2015-02-18 23:32 pic1
crw-rw---- system   audio     10,  51 2015-02-18 23:32 msm_evrc_in
crw-rw---- system   audio     10,  55 2015-02-18 23:32 msm_mp3
crw-rw---- system   audio    250,   0 2015-02-18 23:32 msm_mp3_lp
crw-rw---- system   audio     10,  49 2015-02-18 23:32 msm_mvs
crw-rw---- system   audio     10,  54 2015-02-18 23:32 msm_pcm_in
crw-rw---- system   audio    250,   1 2015-02-18 23:32 msm_pcm_lp_dec
crw-rw---- system   audio     10,  56 2015-02-18 23:32 msm_pcm_out
crw-rw---- system   audio     10,  50 2015-02-18 23:32 msm_qcelp_in
crw-rw---- system   graphics 242,   0 2015-02-18 23:32 msm_rotator
crw-rw---- system   audio    247,   0 2015-02-18 23:32 msm_vidc_dec
crw-rw---- system   audio    247,   1 2015-02-18 23:32 msm_vidc_dec_sec
crw-rw---- system   audio    246,   0 2015-02-18 23:32 msm_vidc_enc
crw-rw---- system   audio    248,   0 2015-02-18 23:32 msm_vidc_reg
Some fellow tester reported it does work on CM11, though.

Quote:
Originally Posted by mikereidis

Send me a debug log with Menu->EMail Logs.

I would, but it seems the free version doesn't allow that.

Is there any way I can help getting this running on CM12 on the Saga?
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