yashsingh1/xdaforums huggingface dataset:
[Spirit FM] hima1978:
How to get to work!

Hello Mike,

Thanks for the app & the efforts you're putting it, however, i don't seems to have it to work on my Samsung Galaxy S.

It has "Cyanogenmod 9 (CM9) by Teamhacksung for Galaxy S I9000 [ICS Android 4.0.3]" ROM. I downloaded Spirit FM radio from the market, and i allowed the SU access, but no music ins playing, to be frank, i have no idea how to set it up!.

I read the help in the app, and one of the things that i have tried is to changing the Audio settings, but non of the methods worked!.

I assume that the app detects the stations in my country (Jordan, in the middle east), but there is no sound coming out of the phone or out of the headset!

Please help!

Thank you for your time
[Spirit FM] mikereidis:
I'm pretty sure the BCM 4329 does not have a proper antenna connection, and power and/or audio connections are also unlikely.

"Pretty sure" means "forget about it". The carriers removed it.
[Spirit FM] mikereidis:
I presume seek works and RSSI numbers at upper left go up on known good frequencies.

The only audio method that may work now is "GalaxyS ALSA". It works fine on the former oneCosmic, now Team ICSSGS ROM: http://xdaforums.com/showthread.php?t=1398223

Last I tried it on the CM9 ROM a few weeks ago, I think it may have worked once then I couldn't make it work again. So I gave up on that ROM.

EDIT: This works fine for me: update-cm-9.0.0-RC0-GalaxyS-KANG-BUILD16-signed.zip
[Spirit FM] mikereidis:
Feb 20 is on the Market now. Changes are hopefully relatively minor.

- Adjustments were made to the Manifest to re-enable some devices that may not have been able to download from the Market.

- The "BC 20780" checkbox is now a "BC 4330/20780" list selection.

The default of Automatic tries to determine this setting by whether or not the HCD file name has "M433" or "M207" within it.

"Enable" is for newer devices with these broadcom chips.

"Disable" is for older devices.

Adjustment may be required if the filename detection doesn't work. Symptoms of the wrong setting are volume or seek issues on Broadcom chips.

- Broadcom proprietary may work on a few more devices now.
[Spirit FM] msgreenf:
Mike, Just to expand on my email comments and Log. What I am talking about is that on my d2g running cm7, I get -13 for signal..so I know you are tuning, but it seems like an audio output problem. I notice that when I use the speaker and headphones I don't get the beeps for volume change that I would normally get in other apps. This makes me think it may be an audio output problem for the moto hardware?
[Spirit FM] mikereidis:
As emailed I wonder if /dev/snd/mixer is ALSA, and not the older OSS. If this works it's ALSA:

/data/data/com.mikersmicros.fm/files/ssd 4 0 0 0 /dev/snd/mixer

or

/data/data/com.mikersmicros.fm_unlock/files/ssd 4 0 0 0 /dev/snd/mixer

But I think it's likely OSS. I'll look into that.

Negative 13 for RSSI ? That's generally bad. You'd want to see at least 10-20 or so when tuned. But I found interesting kernel code here for the Hero that sets up an antenna switch: http://lox.knc.nc/Files/Android/Hero/Kernel/android-msm-2.6.27-htc/patch

So, perhaps we can throw the antenna switch somehow.

But another obstacle remains the HCI "hardware errors" we are getting shortly after what appears to be a successful start. It might be helpful to force an hcitool mode. You'd need a working hcitool and denying SU should trigger it.

Perhaps another ROM/kernel with a known decent Bluetooth stack is worth a try, if you are trying different ROMs or kernels.
[Spirit FM] msgreenf:
I just got a -6 wiht my headphones plugged in...

I don't really want to try other roms right now as there are not many good d2g roms..
[Spirit FM] mikereidis:
Sorry, I got your D2G issue mixed up with an HTc hero issue.

But the Droid's appear to have their own antenna switches I hope to have solved soon. So, let's continue when I get a Droid X working.
[Spirit FM] qzem:
Hey Mike!

You probably don't remeber me from the Legend forum :). I was wondering if you are planning to expand the support of your fm radio on ICS aswell?

Cheers!
[Spirit FM] mikereidis:
Of course I do qzem. :D

I've been reading there to see about HTC unlocking our bootloader, and to see if anyone is brave enough to port ICS to our "lowly Legends". ;)

AFAIK, Spirit was the first public FM app to run on ICS, (and with audio too, on Galaxy S at least) and is now joined only by the Samsung app on leaked ROMs a few weeks ago.

If I ignore ICS, then Spirit will die, and that's not going to happen...

But I am once again facing the exact same audio routing issues that limits the number of ROMs or kernels on which we can hear the audio. ICS ROMs come from Google AOSP builds and pretty much none of them support FM as delivered, since Google seems to hate FM so much.
[Spirit FM] hima1978:
Thanks for the quick reply man, but i didn't get it.

would the radio work for me or not? and if yes, what should i do to make it work?

BTW, I can get different frequencies but with no voice whatsoever, although the signal strength shows good signal!
[Spirit FM] mikereidis:
It works on my Galaxy S GT-i9000. Do you have the international version that supports FM ? US variants don't have the FM chip.

You might have some slightly different hardware or settings. My app plays a silence loop file and that might create some issue.

With Build 16, this is what I do:

- Select Menu, then Settings, Audio, Method and then select GalaxyS ALSA.

EDIT: You will get a scary warning at this point. It appears now that the potential for speaker damage still exists with 2 new reports. :( Press OK to accept the risks, or cancel if you decide not to. See '*' below.

- Ensure volume is at 75% or more.

- Ensure earphones are plugged in for the antenna,

- Return to app and switch speaker/headset. Audio should be heard.

==================

* - Geez I'm in a bind here. I'm tempted to remove the option completely. I don't want to hear any more stories of speaker damage. Each story makes my app look bad, and I can understand that viewpoint. I could hide an option somewhere and put more warning screens in place, but most just want FM working and will jump through any hoops based on the advice of others.

OTOH, many people including myself are having no problem, and there's a LOT of people using this method on ICS for Galaxy S, including paid customers who won't be happy if this method is removed. I should note I DID have a speaker damage problem in August and returned the phone. Most of my testing is done with the stock earphones though, and mine seem to sound much worse than the phones on my HTC Legend. I don't recall if they always sounded worse, and I've had no reports about earphones, but who knows ? I rarely have the earphones in my ears though, so I may have the volume louder than most.
[Spirit FM] thunderwalker:
Galaxy S Speaker problem

Hello,

I've installed an ICS ROM for Galaxy S (ICSSGS) and then I've downloaded the Spirit FM app from the Market to make FM radio work again... Since then the speaker on the back of the phone is damaged, the sound it makes is something like "squirrels talking", full of noise... I've read in other places that this is caused by the Spirit FM app, what should I do to return the sound of my Galaxy S to normal? I already installed the stock ROM back, but the speaker continues damaged... Please help me!
[Spirit FM] mikereidis:
I'm very sorry to hear about that. Please see the final "* - Geez I'm in a bind here." section of my edited post above.

The only fix I'm aware of is to replace the speaker.

Yes, there is some sort of bad interaction between my app and the ALSA sound drivers and the Galaxy S. I found a fix recently for most of the sound problems and the first Market release with that fix was February 10.

I hoped that this fix would fix the speaker damage issues a few people have reported, but yours seems to be the 2nd report since that fix, so I guess not. :(

EDIT: New Ringer/Buzzer Speakers are available on Ebay for less than $6 shipped from Hong: http://www.ebay.com/itm/ORIGINAL-LO...t=LH_DefaultDomain_0&var=&hash=item2317616496

Or "refurbished" for $8 from the US and shipped to the US: http://www.ebay.com/itm/Ringer-Spea...727?pt=LH_DefaultDomain_0&hash=item56488b3f57

I should order a few and put some replacement instructions together.
[Spirit FM] Kess78:
Hi,

Maybe you could only disable speaker with Galaxy S ALSA.
[Spirit FM] mikereidis:
I simplified the code, but yes, this is a good idea for a further simplification.

I've been tempted to disable this audio method completely, but as long as people are willing to take the risk, and provide feedback to me, I think making it very simple for test purposes is useful.

I'm not convinced speaker mode is what kills speakers, but we will find out. So now there are just 2 very simple functions:

# To enable FM audio set "FM Radio Path" to "FMR_HP":

ssd 4 3 "FM Radio Path" 2

# To disable FM audio set "Codec Status" to "FMR_FLAG_CLEAR":

ssd 4 3 "Codec Status" 2
[Spirit FM] thunderwalker:
OK, then you're telling me that my phone really needs repair! Great! I think you should not do this to your customers, either put a warning on the beggining of the app's description in the market telling that the app can phisically damage the phone or simple remove it from there!

About the speakers you have found on eBay, I live in Brazil, and eBay is not an option for me...

Well, what should I do now? Go send my phone back to Samsung to fix it and perhaps sue google...
[Spirit FM] hima1978:
Greeeeeeeeat!

It works! Apparently, the problem was with the method :D

btw, i have build 15 and it is working :)
[Spirit FM] mikereidis:
I'm sorry if you're feeling angry...

I've done my best to warn people since I learned of the problem in August, shortly after releasing the first FM support for Galaxy S CyanogenMod.

A warning about this always comes up the first time anyone tries to use this non-default GalaxyS ALSA mode. I was about to remove it and ICS came along which provides no other method...

Everyone can choose for themselves if they accept the risk. I've had several requests to keep this support, and no requests to remove it. See the post directly above for an example of someone who seems happier with the support, and is accepting the risk.

It is very rare that hardware and firmware allow themselves to be damaged by applications software. Last incident I recall was with IBM PC monitors in the 1980's. In my opinion such systems are "under engineered" since all software has bugs, especially when we are talking about custom ROMs running ICS.

In any case, I accept full responsibility for doing what I can to resolve this issue as soon as possible. I wish there was a simple test I could do, but the nature of this issue seems to require a large test population. If that population accepts the risks, I will take their reports and respond the best I can.
[Spirit FM] hima1978:
One more thing.

Is there a way where the radio plays automatically after i received a notification for SMS, mail or after i receive a call!

Currently, it stops and i have to press than pause button then the play again for it to play the radio.

thanks again mike :)
[Spirit FM] mikereidis:
Feb 22: http://www.mediafire.com/file/w2uda2exad2f36k/Spirit_FM_Radio_v120222.apk

It will be upped to the Market as soon as Google fixes their app update servers.

Mostly bug fixes and hopeful risk reduction for "GalaxyS ALSA", which has been renamed to "GalaxyS Danger". If you use this Audio Method, you will be re-prompted with the updated warning.

"GalaxyS Danger" will work only on wired earphones. Problems during or after phone calls may arise. Be sure to test your needed scenarios before assuming it will work. If audio cuts out, hit the mute/unmute or headset/speaker buttons, repeatedly if necessary.
[Spirit FM] mikereidis:
It worked for me with Team ICSSGS ROM. I think it worked on CM9 Build 16 too but I'm not positive.

Can you get any sounds with FM still running ? For example, playing a music file or setting your buttons to give a clicking noise (if possible).

This might be partly due to the need to play a silent sound file to keep the audio running, but that doesn't give you any solution.

My app does something special for phone calls, but does nothing for audio notifications, or button clicks etc. I probably could add some special handling for notifications, but it would probably be excessive for button clicks.

But for now, the possible speaker damage issues are the highest priority. We have to abandon some functionality for now to see if this issue can be resolved. And we can't expect too much stability from ICS ROMs at this point. (Despite that pretty much everything I use on ICS seems OK, with my light usage at least.)
[Spirit FM] txemax:
Hey.

I installed Spirit FM Radio and then uninstalled.

Now I want it back on and tells me I have no storage space.

I can install any other application but not Spirit.
[Spirit FM] Quinny899:
That's nothing to do with the app. Keep trying
[Spirit FM] mikereidis:
Spirit contains a background service which needs to remain running even when an SD Card is removed.

So it requires internal storage and can't be installed on and run from an external SD Card.

Go to the system settings and select Storage. Then go down and see if there's at least 1 megabyte or so of "Available Space" under "Internal storage. If not you'll have to remove something else that has a background service.
[Spirit FM] txemax:
My Internal Storage = 199 MB.
[Spirit FM] mikereidis:
199 is JUST under 200 so I'm guessing that 200 MB free might be a threshold.

I don't install many apps so I've never had such an issue, but I'll try using up the space and see what happens.

Do you have any media players that you can try removing ? Players are the most likely to have a background service.

System Settings->Applications->Storage Use may also give some clues.
[Spirit FM] txemax:
Thanks again.

No players, only default.

Titanium Backup:

Internal: 309 MB (208 MB free)

SD Card: 6,93 GB (6,46 GB free)

A2SD: 959 MB (905 MB free)
[Spirit FM] nemanja066:
Is there a risk to use Spirit FM only through headphones? Use the latest version spirit fm on the market! So far no problems, I listen with headphones!

Samsung i9000 Galaxy S , ICS RC4.2
[Spirit FM] mikereidis:
Yes. Can you help me get my app working on this device on your ROM or any/stock ROM etc ?

My app works with x10 mini, but not any of the other SE phones, and not the x10 mini PRO AFAIK. And I don't think we ever got speaker working. I don't have any SE phone, but Kess78 often posts here and he has an X10 mini.

My app has a "ssd utility" that can be used to setup audio paths.

For HEADSET_FM try:

adb shell /data/data/com.mikersmicros.fm/files/ssd 1 39

and for HEADPHONE_FM:

adb shell /data/data/com.mikersmicros.fm/files/ssd 1 43

Here's one of my posts on the subject: http://xdaforums.com/showpost.php?p=15662244&postcount=718

Another: http://xdaforums.com/showpost.php?p=17322150&postcount=1151

If you can offer any insights into Sony Ericsson FM, especially audio routing, I hope we can share info. :)

A wonderful bonus on the SE x10 mini is that standard Android recording apps can record the FM. FM recording is rare on Android.
[Spirit FM] mikereidis:
I had hoped the Feb 10 fixes would stop the problem, but it appears they didn't.

So I really don't know what the risk level is with the new code. I think it's been minimised, but I'd wait at least 1 month with no new reports before I'd say the problem is likely gone.

Use the Feb 22 version, use earphones only, and at not excessive volume (say 75% or less), and I think the risk is minimised.

But with this problem, that's just a guess. For all I know the new simpler code could kill everybody's speakers. But the odds are I think much higher than 1 million to 1 for 100% destruction. :)

Feb 22 is on the Market now.
[Spirit FM] qzem:
That is great. The reason is why I ask this, i sold my Legend (it served me good!), cause I got very good offer for it, and i only add a few euros to buy much faster phone (Samsung Galaxy W I8150). There is CM9 around the corner for this phone, and of course FM radio problems are here again. I will try your app soon, and see if it works. Thanks for the work you are doing here. I hope you do earn enaugh money to feed and dress your family. I wish you the best!!!

Greets

EDIT: I've flashed alpha version of CM9, and test Spirit FM radio app. But there was no audio. It looked like some stations are found, but no audio was produced on headset or speaker. FM radio uses a SI4709 chip. How can I provide you any debug info. And what exactly would you need to know to try and fix this?
[Spirit FM] mikereidis:
:)

Sales are ramping up nicely & I think ICS support and improving support for stock, un-rooted devices are both helping. I got a Desire HD today and will now have it working on the large numbers of stock unrooted Desire's of various types.

Si4709 indicates a Galaxy S/S2 class of device, so I think the "GalaxyS Danger" audio method is most likely to work. But if it's more similar to the S2 this probably won't work. Heed the warning, but for a quick test I think any risk is very minimal.

I think I heard a report of a stock un-rooted Galaxy W working with the Samsung audio method. You can go to Menu->Settings->Audio->Method and try them out, but on CM9 the Samsung* ones probably won't work.

Send me a debug log with Menu->Help->EM Logs and after a few seconds. enter "Galaxy W" in the email text and press send.
[Spirit FM] qzem:
@mike

I've send you a logcat, if you need anything else, you can write on my email :).
[Spirit FM] Presjar:
Has anybody got this working on a Galaxy Note? Could you please post what settings you are using?

Thanks
[Spirit FM] mikereidis:
You have the International version that has FM ? The North American version removed the FM chip, as with all Samsung Galaxy class phones.

Are you running a stock ROM ? Rooted or not ? If rooted my app will run OK, but I'm not sure anyone has audio working yet.

For stock, if you deny SU it will try to use the Samsung API, but I think my app still isn't working on S2 class devices yet.

Try setting Menu->Settings->Audio->Method to "Samsung" or "Samsung2".

There's an app here that works on my S and is supposed to work on S2: http://dl.dropbox.com/u/48940039/screenfree_fm_radio_v_1_0_1.apk

Can you try that app and report ? You might be able to run that app and my app at the same time.

I hope to have the S2 and Note cracked soon, so your help is useful...

Please send me a debug log with Menu->Help->EM Logs and after a few seconds. enter "Note" in the email text and press send.
[Spirit FM] mikereidis:
Re: your Galaxy W I8150.

As you said, with stock rooted ROM you were using the "old" low level Samsung Silicon Labs API, with audio method Samsung2.

The W has a different audio system than the Galaxy S or S2 etc, I think.

For CM you have no audio. The debug logs shows you have a /dev/msm_audio_dev_ctrl device and ALSA controls.

These are the interesting lines for the W:

dev_id: 28 dev_cap: 0x00000011 dev_name:handset_fmradio_rx

dev_id: 29 dev_cap: 0x00000011 dev_name:headset_fmradio_rx

dev_id: 30 dev_cap: 0x00000002 dev_name:headset_fmradio_tx

dev_id: 31 dev_cap: 0x00000011 dev_name:speaker_fmradio_rx

dev_id: 38 dev_cap: 0x00000011 dev_name:headset_fmradio_only_rx

dev_id: 39 dev_cap: 0x00000011 dev_name:speaker_fmradio_only_rx

30 is tantalizing us with prospects of FM transmit ("headset_fmradio_tx"), but the si4708/4709 don't do transmit...

So here are some adb shell commands to try while the app is running and volume set up. I'll write "ssd" where I mean "/data/data/com.mikersmicros.fm_unlock/files/ssd", 1 and 2 are enable and disable command pairs, and separated by an ALSA volume control command for 31/48:

ssd 3 1 headset_fmradio_rx

ssd 4 2 headset_fmradio_rx 31

ssd 3 2 headset_fmradio_rx

ssd 3 1 speaker_fmradio_rx

ssd 4 2 speaker_fmradio_rx 31

ssd 3 2 speaker_fmradio_rx

ssd 3 1 handset_fmradio_rx

ssd 4 2 handset_fmradio_rx 31

ssd 3 2 handset_fmradio_rx

ssd 3 1 headset_fmradio_only_rx

ssd 4 2 headset_fmradio_only_rx 31

ssd 3 2 headset_fmradio_only_rx

ssd 3 1 speaker_fmradio_only_rx

ssd 4 2 speaker_fmradio_only_rx 31

ssd 3 2 speaker_fmradio_only_rx

Hopefully one or more of these will produce audio, and won't blow up any speakers...
[Spirit FM] mikereidis:
Feb 24 is on the Market.

The primary change is that it should now work on the HTC Desire HD, and likely several other Broadcom based devices, with a stock, un-rooted ROM.

It works OK on my new/old still un-rooted Desire HD w/ Android 2.3.3. To get speaker mode to work you need to set Audio Method to "None".

I got my Desire HD on EBay for $ 129. :) Much cheaper than the new one 9 months ago for $ 500 new. All the people needing 2012 tech makes slightly older stuff a relative bargain.

Haven't heard back from HTC about getting old devices since last week. Hoping there's more action than talk ahead.
[Spirit FM] mikereidis:
WooHoo ! :)

Bluetooth is always interesting, but most phones don't support it. If it did, most likely the stock FM app would support Bluetooth. If so, most likely you would just pair and connect your BT and it would just automatically work.

On CM it is less likely that BT could work. Is your BT high audio quality A2DP, or just voice quality ?

"Handset" should mean the speaker where you hear phone calls. That's different than the back speaker. At some point my app will support more than just speaker/headset but for now handset isn't needed, and may even cause problems when interrupted by a phone call.

I'll see what I can do about next release. I might add a custom method that allows you to specify command lines. But I could use more info...

Did you find the "ssd 4 2" volume commands were needed ? If you change the last number to 0 or 48 does it go quiet or to maximum volume ?

So if you do this, does the headset go on and off ? :

ssd 3 1 headset_fmradio_rx

ssd 3 2 headset_fmradio_rx

And same for speaker ?:

ssd 3 1 speaker_fmradio_rx

ssd 3 2 speaker_fmradio_rx

It would be interesting if this turned on both headset and speaker at the same time:

ssd 3 1 headset_fmradio_rx

ssd 3 1 speaker_fmradio_rx

What happens with this ? It may be just like headset above, but perhaps it ensure notification sounds won't interrupt ? Just guessing...:

ssd 3 1 headset_fmradio_only_rx

ssd 3 2 headset_fmradio_only_rx
[Spirit FM] qzem:
Those commands were not needed cause volume up and down worked with the button.
[Spirit FM] ErwinP:
Just reporting: when changing the audio method setting to msm7x30 and manually activating bluetooth before launch, this apps works GREAT on CM9-rc0.

Big thanks!

Erwin
[Spirit FM] mhulsegge:
Just wanted to say, I love this app, hence the reason I bought it.

Has been working great in pretty much every Rom I've used on my HTC Desire.

Currently running MIUI-AU ICS. After last updates it also resumes playing after receiving a call.

Thanks Mike for all your hard work!
[Spirit FM] mikereidis:
Good... And the first I've heard of a "no other audio" function.

With using commands to enable FM audio I'd guess that getting a phone call doesn't turn off FM. Is that right ?
[Spirit FM] mikereidis:
Great ! Happy to see more success reports coming in... :)

So you're the ROM dev and this is for HTc Buzz / Wildfire ?

AFAIK that's a Broadcom based device, and I think we should be able to make it work with BT off. Perhaps it doesn't use /dev/ttyHS0 or the other few common BT UARTS ? Or the Broadcom *.hcd file isn't found under /system ?

I'd like to get a debug log from you. As always, it's Menu->Help->EM Logs and please put Buzz CM9 in the email test before hitting send.

Thanks !
[Spirit FM] mikereidis:
Great ! Thank you. :)

I have a Desire HD for testing now, so I should be able to better support the various HTCs, especially the Desires, and other BcM4329 devices.

There is code on the Desires for FM transmit also. I'm looking forward to seeing if transmit is possible. I don't think anyone has ever even tried before...
[Spirit FM] Ok_Kaleidoscope5109:
didnt seem to work on my SGS2 with CM7