yashsingh1/xdaforums huggingface dataset:
[Spirit FM] mikereidis:
I have your log, thanks.

The 3 Audio Methods most likely to work for the Hero are CyanogenMod, HTC and msm7x30 (the first of 4).

There seems to be no CM FM app on your ROM or the official CM7 GSM Hero ROM. So I'm guessing that nobody has had FM with audio working on CM ROMs, except perhaps with my app. (?)

The audio library appears to have FM routing support, but I presume it doesn't work otherwise the CyanogenMod audio method would work, and I'd guess the CM FM app would be available. If the library DID work, the CM app from an HTC Legend might work.

Are you able to run "adb shell" commands from a connected PC ? I could give you some commands to try. They could also be entered from a terminal emulator app, but typing commands on a phone isn't easy.

Any information you have about others with the Hero running any FM app may be useful. I don't have time right now to dig into the source code for the kernel etc.
[Spirit FM] mikereidis:
Thanks for your log.

In theory the HTC audio method should work, and worked months ago on Desire HD CM, but I know it's broken on some CM ROMs. It writes to /sys/class/htc_accessory/fm/flag. You can do the same from adb shell with:

adb shell "echo fm_speaker > /sys/class/htc_accessory/fm/flag"

adb shell cat /sys/class/htc_accessory/fm/flag

adb shell "echo fm_headset > /sys/class/htc_accessory/fm/flag"

adb shell cat /sys/class/htc_accessory/fm/flag

8250 won't work, sorry for the mislead. qdsp5v2 is what should work, but I see there's a dependency in my code on device names, which your audio driver doesn't seem to support.

So I will try to fix qdsp5v2 and/or come up with a workaround as soon as I can. I'm pretty sure that fixing this will enable new device/ROM combinations so it's an important fix.

EDIT: Looking a bit closer, some of my log output is suspect, so I'm not so sure anymore...
[Spirit FM] mikereidis:
Thanks !

It looks like you are having the exact same problem as in the post above this. :)

I'll find a fix or workaround asap.
[Spirit FM] mikereidis:
From email:

I wrote what's below before I re-read your problem description. You have a different problem I guess.

I'll try to find a solution when I test out some ICS ROMs. There may not be one though, unless and until the ICS ROMs include support for FM audio routing. The "GalaxyS ALSA" audio method is not very good because it goes around the ROM audio libraries, instead of through them.

I'll leave this original response below:

-----

I see this same problem using my app or the stock Samsung FM app on a stock derived ROM (Darky).

To fix it all I do is remove the wired headset and wait, perhaps up to 2-5 seconds. (Long wait when answering.) :(

When a phone call comes in while the headset is inserted, the audio goes to the headset (I think even if you are listening to radio on the speaker, and only using the headset as an antenna).

When the audio output for the phone call goes to the headset, I think the phone also tries to use a headset microphone for audio input, even if the headset doesn't have a microphone. I tried this with the stock Galaxy S earphones. (Everybody seems to call them headsets, even though they are just earphones.)

I can't find any system or FM app setting to change this behaviour, so I'm not sure if there is a better fix available. I'll try to find one but I hope removing the headset is a usable workaround for now at least.
[Spirit FM] mikereidis:
I went back through the posts in this thread. One person with a CDMA HTC Hero reported success, but had some issue later that I never heard back about.

Your device has the standard HTC fm flag that the "HTC" audio methods use, but this may be broken on your kernel. You might have success with an alternative kernel.

For adb shell commands, these are the equivalents for the msm7x30 Audio Method: (replace fm_unlock with fm for the free app)

# For FM speaker

adb shell /data/data/com.mikersmicros.fm_unlock/files/ssd 1 11

# For FM headset

adb shell /data/data/com.mikersmicros.fm_unlock/files/ssd 1 9

But I guess these won't work for you since msm7x30 doesn't work. You can try different numbers.

Ensure the app is running OK, with volume around 75% and a strong signal. Then, while listening on the headset and speaker, try the following:

adb shell /data/data/com.mikersmicros.fm_unlock/files/ssd 1 X

or for the free app:

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

Replacing X with numbers starting at 1 and ending as high as you want to try. Sometimes bad values will reboot the phone. Not very robust drivers if they can't handle an unexpected number...

On an HTC product, likely nothing over 16 or so will work.

While doing the above, if you want to be adventurous, you can run "adb logcat" in a window and see if there is any interesting output when running the ssd commands. I also like to watch kernel messages with "adb shell cat /proc/kmsg", or if that fails, later with "adb shell dmesg".

Let me know...
[Spirit FM] mikereidis:
Unfortunately my conclusion is that FM audio isn't enabled on that ICS ROM. I might be wrong, but qdsp5v2 works on GingerBread ROMs for the Desire HD when it can be opened, as it can on your ICS ROM.

I HAVE found a bug in my qdsp5v2 logging code, but otherwise it appeared to work.

The CyanogenMod methods also seemed to work at least a bit, but clearly you are hearing no audio.

Assuming I'm right, best bet is to ask the ICS ROM devs if they can enable FM audio somehow.
[Spirit FM] mikereidis:
I'm afraid I have the same response as in the post above. Hopefully, I'm wrong and will learn some new trick, or the ICS ROM devs can put some effort into re-enabling FM audio.

I'm getting this feeling that stock(ish) ICS kernels are being used, and when they come from Google, they may not have FM available.

More and more I'm thinking Google hates FM. The proposed Android FM API doesn't seem to be going anywhere fast, and the Google Gerrit servers it was hosted on have been "down" for 4 months now. Sheesh ! :(
[Spirit FM] dtack:
EVO View FM radio

WOW, very impressed by your level of support!

I noticed that the original spec for the Evo View included a FM radio

http://pdadb.net/index.php?m=specs&id=2830&view=1&c=sprint_htc_evo_view_4g

there are several thousand that bought this tablet recently for under $250

and a lot of us sure would like to re-enable the FM

what can I do to help?

Thanks
[Spirit FM] deadmanjokes:
looks great!!

just few question,

if my device don't support this app, will it cause bootloop?

does anyone ever try it on Droid Razr :D?
[Spirit FM] mikereidis:
Wow, 3 days quiet here, but still 12 emails a day... :)

For Samsung Galaxy S, S2, Note, S3 etc:

Very experimental support for stock and stock derived ROMs with the Samsung Proprietary API. Works OK on my Galaxy S with Darky ROM Extreme Edition 10.2.

- Enable Settings->Debug->SA Proprietary.

- Restart the app.

http://www.mediafire.com/file/a12sm7m13smbjub/Spirit_FM_Radio_v120110.apk

- The Audio->Method is best set to the default of CyanogenMod, but might also work on Samsung, or even None or GalaxyS ALSA as a last resort.

Next release I'll re-enable the recording code and I think it will work on the Note, but might also work on Galaxy S/S2 devices.

----

I'd REALLY like to have a Galaxy Note, that 5.3" "Phablet".

I bought an ~8 lb, HP TC4200 WinXP convertible tablet 6 years ago and it's reached retirement age, to be put next to the circa 1994 Sharp organizer with stylus picture drawing and fax connection, LOL.

----

And on the transmit front, I read of some Chinese tablet alleged to do Tx.

----

And more in car entertainment systems w/ radio seem imminent, to say nothing of Google TVs with who knows what sort of RF OTA tuners.
[Spirit FM] mikereidis:
Those "specs" are quite often wrong. Manufacturer or carrier websites are more official. Even they can have errors though, but if you complain they fix it so as not to face false advertising risks.

Just send me logs and I will look. Best with SU/root. Select Menu->Help-EM Logs, wait a few seconds, enter "Evo view" in the email text and press send.
[Spirit FM] mikereidis:
I can't imagine a bootloop. This is a normal app you start by clicking the icon, not a system app that starts by itself.

http://xdaforums.com/showpost.php?p=20820612&postcount=1948

"There is no stock FM app, and nobody has gotten a Motorola app from another phone working, so I think it is very unlikely that anyone can ever get FM to work on the Razr."
[Spirit FM] sharmy3:
Hello Mike,

I know this forum was quiet for a few days. I am just following up on this and see if you found some light on this yet?

Thanks,

---Sharmy
[Spirit FM] mikereidis:
Sorry, I've been distracted.

I just looked at your last log and can see where I need to make some changes.

Does the RSSI update ? Or the Program Type ("Rock" etc.) ?

I'll try to make some progress tonight.
[Spirit FM] sharmy3:
Hello Mike,

Yes, it does show the Program Type ("Classic Rock", "Adult Rock", etc).

Thanks,

---Sharmy
[Spirit FM] mikereidis:
Great ! That means only a few mods were needed. I emailed the Unlocked version.

Here is Jan 11 free: http://www.mediafire.com/file/wj2rbsmttv1xfq9/Spirit_FM_Radio_v120111.apk

Program Service and RadioText should work on the HTC Amaze now with "TI Proprietary".

"TI Proprietary" still broken for x10 mini, except maybe for the Jan 12 I sent.

Proprietary modes should show "XX Proprietary" at startup now.
[Spirit FM] deepakbshetty:
Amazing Work with Samsung prop APIs Mike :)...

Confirmed works now on Galaxy S2.... ICS Stock 4.0.3 on Debug Mode with CM Method

Issues :

1. Audio switches from headset to speaker while changing audio method

2. Audio stops working completely if we click on audio method samsung and back to CM method again.(Have to go to debug mode and press tune to enable audio again)
[Spirit FM] sharmy3:
Yes, I got the unlocked version and installed it on my Amaze 4G. Yes, it works very well! :D

Do I need to install this while I have the unlocked version on my phone?

Yes, it showed "TI Proprietary" as soon as I open up the app.

Thank you for your hard work, Mike!

---Sharmy
[Spirit FM] mikereidis:
:) :) :D :D

No, the free app is not needed, but it's useful as a test version that won't break a working Unlocked version. I may release free versions on the Market more often than Unlocked to minimize update risk for customers. So Unlocked will be "Stable" and Free will be "Testing".

The main problem is confusion with the Free and Unlocked icons. I will likely make them more distinct than antenna direction.
[Spirit FM] mikereidis:
Good.... But I'm not sure if you are using the Proprietary API. If you are, it will say "SA Proprietary" at startup, if not it will say "FM: SL.....".

Please send me a log with Menu->Help>EM Logs.

(1) Is expected. The code switches speaker and headset while changing Audio Method to help detect a working method, even if it's just a half second of audio.

(2) Hmmm, OK, but not a normal thing somebody does. So you're hitting the Debug button, then SA Proprietary, then tune ?

There's some recording test code there, but I found I have to enable a permission for it. Hopefully a new version tonight.
[Spirit FM] mikereidis:
Jan 12: http://www.mediafire.com/file/3ukc0qaah7bbyea/Spirit_FM_Radio_v120112.apk

TI Proprietary changes. BE SURE to manually enable BLUETOOTH before starting app on TI devices. May improve startup on Broadcom devices also.

Won't work on my HTC Legend but hopefully works on SonyEricsson X10 mini and other HTC TI Proprietary devices.
[Spirit FM] ketrio:
working fine on galaxy s i9000 with I.C.S 4.03 with Cyanogen method.

Sometimes audio stops completely and reboot is needed.

Just a question:

is possible or could be possible route the audio to a bluetooth headset?

(using wired headphones as antenna)

thanks!
[Spirit FM] mikereidis:
The stock app doesn't support it (right ?), so I don't know how hard it would be.

I'm pretty sure the hardware makes it possible though. I know the hardware can digitize the FM audio, but I haven't found a way yet to enable this with software, and there might not be, short of creating my own ROM (which I don't have the resources to do.)

Another problem is that this would create another analog->digital->analog conversion pair, in addition to the 2 others (at least) you get at the transmitter and receiver. So audio quality might be poor.

I think the Galaxy S2 class products can do this better/easier, but there still will be another A->D->A conversion pair.

Perhaps better and easier to get a BT headset with FM buiilt in.
[Spirit FM] mikereidis:
Jan 13: http://www.mediafire.com/file/52jo7vwy63576da/Spirit_FM_Radio_v120113.apk

Another shot at Samsung Proprietary support for Galaxy S2 / Note class devices, in addition to Galaxy S devices w/ FM.

As before, enable Settings-Debug->SA Proprietary and restart. SU/Root should not be needed.
[Spirit FM] danakers:
Hi Mike,

Thanks for your comprehensive reply!

Yes, I did write this :), with facts and figures from radiocentre.org, the UK commercial radio trade body.

Dan
[Spirit FM] Quinny899:
Hey mike!

I've been messing around with the UI elements settings and am trying to make it look more like ics. (It uses the gingerbread compatabilty mode)

How do I change the colour of, say, the preset buttons? I've tried with V Preset Buttons one and set it to #2c545454, which is the ics grey. It didn't work, and I did restart the app.

Any ideas?
[Spirit FM] mikereidis:
Feeling adventurous ? I have to re-read my own notes... LOL :)

My Galaxy S is at very high brightness and my eyes aren't too good, but for background color, an alpha of 7f hex or 127 decimal is about the lowest I can notice a faint hint of gray, over the default black background. So 0x2c seems low to me.

I presume you have enabled User Interface->Custom Elements.

To test I set:

"Color A" to "#7f545454"

"V Preset Buttons 2" to "ca"

"V Preset Buttons 3" to "ca"

Note that this is the background color BEHIND the buttons.

I tried setting the other things, such as radius, weight, text color and text size but they didn't seem to work. Perhaps this broke at some point.

Note that one unfortunate side effect is that colorization of the buttons won't happen anymore. Eg, when you press a button, it briefly goes yellow, and focusing a button with a trackball or similar makes it go orange. Solutions for this are possible, but a big pain.
[Spirit FM] Nitemare_real:
I have a problem and some other users have too.

This problem is when using Spirit FM radio on Onecosmic ICS 4.0.3 RC3 for Samsung Galaxy S.

The problem is after using Spirit FM radio, I can't hear anything in next incoming or outgoing calls, but I'm heard by the other person.

I'm using Samsung ALSA driver because is the only one that allows me using internal speaker or headset.

The problem occurs when switching between headset and speaker. After that, after switching off Spirit FM radio, there is no sound in incoming or outgoing calls.
[Spirit FM] xmguy:
Mike, wondered if you could add a stereo indicator in the app? Thanks. Helps me determine if the signal needs to be on forced mono or not. Thanks!
[Spirit FM] Dusee:
hi!

the app is working fine, it finds the stations, rds is working too, but no audio :(

my phone is a LG Optimus 2x and MIUI rom.

any advice?

thanks!
[Spirit FM] mikereidis:
Yes, I've had reports of this. But it didn't happen with earlier builds ? (Not sure.)

Switching to speaker before turning the app off might help.

I'll make this a priority.
[Spirit FM] mikereidis:
Sure. I had one a long time ago, and it kept flickering for some reason and was disabled. Still have room on the screen allocated, and will see what I can do.

I'm hoping to complete basic support for the Motorola proprietary API soon, BTW. Will likely need several test rounds...
[Spirit FM] mikereidis:
This has been so since August at least, unfortunately.

My recent post on the subject: http://forums.miuiandroid.com/showthread.php?9524-Why-isn-t-there-an-FM-radio/page4

So, you can switch to CM or some other ROM or wait, hope or find some MIUI dev who can put the needed FM audio enabling code in. Perhaps some future ICS release.

Or,... if/when I have some time I can look closer at this and try to see what the CM devs did, but without writing ROM code I may be rather limited in options.
[Spirit FM] Nitemare_real:
Ok, thankyou very much.

By the way, from the first moment I installed Spirit FM Radio (android 2.2), I have never seen RDS info (text) on screen, but all these "texts"? Do I have to change any configuration option? or may be this is only a paid-version feature? you can see what I see in this screenshot.
[Spirit FM] Dusee:
ohh, thats sad :( btw thank you, me and other miui users would love it :)
[Spirit FM] mikereidis:
Yes, RDS is a paid version exclusive feature.

I'm trying to reproduce the OneCosmic ICS Galaxy S call receive audio issue, and can't right now.

Can you explain better about the headset/speaker switching ? And what steps exactly lead to this problem ?

I HAVE seen other issues, as in the past. Sometimes FM audio doesn't work at startup. Sometimes that results in loud clicking noises when speaker and headset are switched. Restart the app and it's generally OK.

FM audio is turned off for a phone call but not restored afterward. Restart the app to fix/

Also, if a call comes in with earphones inserted, phone call audio goes over the earphones, unless and until they are unplugged.
[Spirit FM] goodoane:
With RC3 and your app FM work ok first time (using alsa driver).How to reproduce: open radio fm then close the app , then try to dial someone and everything is ok with audio. Then if another call is recieved or dialed no audio out (internal speacker or external). Just a reboot of the phone bring audio back. If radio fm is been used again first time is working and after that no audio on phone calls.
[Spirit FM] Nitemare_real:
Right, that is.

Yes, there is no need to switch between internal speaker and headset when running Spirit FM. Next call -> no audio (speaker nor headset)
[Spirit FM] xmguy:
Thanks Mike. Will be glad to test if you need it.
[Spirit FM] xmguy:
Didnt see the Bionic (and assume) the Razr on the first supported devices page. The ONLY Fm radio app that has full features and support. If you could ever get the app to run without root access. Wow!
[Spirit FM] comanche243:
Hi Mike,

We had an email conversation on Sgs & CM9 call issues.

I turn the Radio off and remove headset. Then if someone calls me or I call somebody, the other party doesn't hear me. If I plug the headset back, it works sometimes over headset though. But not without the headset.

Thank you for your work!
[Spirit FM] mikereidis:
Post 2, the Bionic is the 4th device listed. :) Of only 4 in the TI section. Wish I could put the Droid X there, but too many people have low signal problems.

I should have done it before, but just now added this entry for the Razr:

"- Motorola Razr. There is no stock FM app, and nobody has gotten a Motorola app from another phone working, so I think it is very unlikely that anyone can ever get FM to work on the Razr."

Actually, I think TI based devices with a working hcitool can run without root. This includes stock Motorola and SE X10 mini devices, because they use the Bluez stack. It also includes TI devices, including HTC products, running CyanogenMod or any other ROM with a Bluez stack and working hcitool.

But the hcitool method is slowish and clunky, especially with RDS, so root is useful to get direct Bluez HCI access.

As for the Motorola proprietary API, yes it's coming, and should work on stock, unrooted devices. The Broadcom, HTC TI and Samsung Galaxy S/S2 proprietary APIs are pretty much working already, so Motorola is the last major target.

Downsides include being stuck with proprietary limitations. For example, Samsung API shuts radio off when earphone is unplugged, and broadcom gives no access to RDS PI,

What's funny is that I'm testing Motorola support on my Galaxy S running MIUI. The MIUI folk created an app using the Motorola proprietary API, and then moved that app to the Galaxy S by emulating the Moto API, LOL. :)

It's not perfect, but it's a good start for someone who has no Motorola test device yet. I'll be scouting for deals on some old used devices, like a Droid X or HTC Desire soon.
[Spirit FM] mikereidis:
Thanks, I'm still looking.

First phone call after FM works OK ? Then 2nd call fails ? That seems awful strange; I wonder why the first call works ? I hope this isn't a radio/baseband related issue.

So, a workaround would be to run the FM after every phone call, to get back to that "1 good call" state. Hmmm...
[Spirit FM] mikereidis:
OK, you say "the other party doesn't hear me". That seems different to what others are reporting, namely that its the Rx Receive side that breaks. IE. the phone with Spirit doesn't put received audio to the speaker or headset.

By "works sometimes over headset" do you mean you have a headset with a microphone for calls ? If so then this is a Tx problem, and I guess you are having it for all calls, not on the 2nd and subsequent calls as for the OneCosmic reports.

I don't have any such headset with a microphone to test, but I'd guess something gets confused about whether a headset is plugged in or not, and perhaps whether it has a microphone or not.

I was trying the teamhacksung Build 14 the other night, and I think my app was working at one point. Then it stopped working, and reboots and app reinstalls didn't help.

So I came to a tentative conclusion that Build 14 wasn't stable enough, in regards to FM, to do further testing. I've now gone back to OneCosmic RC3.1 for ICS testing and can try a teamhacksung build again after I try to chase down the 2nd call receive problem.
[Spirit FM] comanche243:
Hi Mike,

Sorry I was wrong in the description: I wasn't able to hear other party. Other party can hear me OK.
[Spirit FM] adam526:
Same for me with Galaxy S Onecosmic RC3.1 using ALSA driver! Please let me know, when this is sorted out. Till then I wont have fm radio :(
[Spirit FM] android1999:
VOLUME

I am having galaxymini with Cm 7.1.0.

This app works but volume is uncontrollable. Please help
[Spirit FM] mikereidis:
Enable Menu->Settings->Debug->BC 2020780/4330 Gal5+

Restart the app, or better yet, restart the phone.

And if that doesn't help, and your Bluetooth is on, you can try Bluetooth off or vice versa.
[Spirit FM] mikereidis:
Jan 20: http://www.mediafire.com/file/sf66ttxazrx6la8/Spirit_FM_Radio_v120120.apk

- Logging should work better on un-rooted devices.

- Some minor UI additions under Settings->User Interface:

- Antenna has new values of "Monitor & Mute" and "Monitor & Off". These are intended to monitor the earphone jack/antenna and either mute the FM or turn FM off when nothing is plugged in. I haven't actually tested this yet... :)

- Media Button Pause/Play has new values of "Volume Up" and "Seek Up".

- 6 new checkboxes from "Display Status" to "Display RadioText" allow disabling or enabling of the display elements. Leave and return to the app to apply (no strict "full app/service restart" needed.)

- Debug button has a Record selection. At the bottom is "record_stop". The rest can start recording in the given device. Near the botton is "record_start 8" which I think should work on the Samsung Galaxy Note. On most other devices, likely nothing will work. Some will reboot some phones because manufacturers take shortcuts ALWAYS. :( Files should show up on the sdcard with a filename such as FMRecording12296.3ga .

- Biggest change is a lot of work done on the BC Proprietary Mode. Sometimes my LG P500 will hang on the "Please Wait" dialog, If so, just hit the back key.

As before, enable Menu->Settings->Debug->BC Proprietary and restart the app, or better yet, restart the phone. If Bluetooth off doesn't work, try Bluetooth on or vice versa.

Audio method still needs to be set. On LG P500 use "LG", on i5500/Galaxy 5 etc, use "Samsung2".

Root is not needed. All my testing is done after denying SU to the app.

Success or not, if you try BC Proprietary Mode please send me logs with Menu->Help->EM Logs and enter the model of your device, the ROM name and version in the email text. Thanks !