yashsingh1/xdaforums huggingface dataset:
[Spirit FM] jamesrt:
I'm a happy Samsung Galaxy S I9000 CM9 ICS user (build 17 currently), and I've been looking at Spirit FM for a couple of weeks - enough to have several builds go by (started sometime in middle to late Feb, from memory). I have *NOT* had any problems with my speaker.

The one comment I would make is that in the headphones, Spirit FM is incredibly LOUD. It would have to one of the loudest applications I've ever heard - even with the volume 1 "click" up from silent, it seems very loud. The issue is less if I disable the built-in WM8994 control (aka "voodoo sound"); but it's still loud.

In my opinion, it's entirely possible that it's also too loud for some speakers, and that you're overdriving - which from a non-technical non-audiophile point of view is probably the same statement you've made about "DC offset" above.

Are there any settings inside the app which will attenuate the volume? I did try changing the "volume ctrl stream" from "3" to "5" (I think) - all that did is make it LOUDER. I didn't want to play too much as I like my eardrums the way they are; faulty as they may be. :-)

Is there anything you can suggest? (Not sure what the "Volume Scale" setting actually does - is this going to help??)

Perhaps if there is a way to tone this down a little, it would also help to prevent any potential further re-occurances of speaker damage. (Unless the speaker has an entirely different audio path than the headphone socket - which thinking about it is quite likely, given the whole concept of a WM8994 setting in the first place!)
[Spirit FM] mikereidis:
March 9: http://www.mediafire.com/file/3ykkuk1cn5s2w30/Spirit_FM_Radio_v120309.apk

See the next post for UI changes.

From the new warning for Galaxy S ALSA:

MARCH 9: This audio method has produced 11 reports of speaker damage and is now "DISABLED".

If I multiply the reports by 5, for the silent ones, I estimate it has effected 1% of users. That's too many and I await an improved method.

If you REALLY, ABSOLUTELY insist on taking full responsibility for the risk, and promise not to get angry at me, you can keep reading to learn about a secret workaround.

......

The secret workaround is not needed for the Unlocked app, simply because I don't want to inconvenience customers, and I think most of them understand English and my warnings.

For the free app you need to understand what the Linux/ADB shell is, and how to create a file named with a warning.

Something like this should work: "echo > /sdcard/FM_TEST_ONLY_SPEAKER_DAMAGE_RISK". Please don't make this easy for anyone who always smacks the OK button without reading a warning.
[Spirit FM] mikereidis:
March 9 UI changes: (now that XDA seems to be back up...)

- To better support ICS and other themes, I went back to the scheme where standard Android icons are used for buttons like play/pause etc. This seems the easiest way to automatically mesh with whatever default theme is in effect.

At some point I expect to make it easy to substitute external image files for internal, or Android supplied images.

I got my app working with the ICS Holo theme on a GB ROM, in addition to ICS for Galaxy S and Desire HD.

Set User Interface setting for Theme has a default setting of "System". That means the app doesn't set a specific theme, but uses the system default.
[Spirit FM] Nitemare_real:
is it just disabled for speaker or disabled at all (speaker and headset)?
[Spirit FM] mikereidis:
Thanks for your report. You are among the likely 99+% with no speaker problems. At least one reporter indicated no FM speaker usage, so if true, volume is likely not the problem. BUT..... a dc offset problem could be more likely to break a cone when volume is high.

The Galaxy S WM8994 has seperate outputs for headset and speaker. Both can play at the same time. But, in theory at least, I think it's possible for speaker and headset to be playing different audio sources.

Many phones have at least 2 volume controls/gain settings for FM. One is usually in the FM chip, and many modern devices also have an amp volume control.

I can run my Galaxy S at full blast to speaker or headset and it sounds OK(ish) and doesn't hurt my ears. Same with the stock app on stock derived ROMs like Darky. I have no idea why your experience is so different, except that the gains must be different, perhaps because I have a Canadian GT-i9000m.

"Volume Scale" generally "fixes too loud" issues, but the si4709 FM chip only accepts 16 values from 0-15. So setting "Volume Scale" to 25 (1/4) might only give 4 values: 0%, 25%, 50% and 75%.

Normally a speaker swings back and forth with Alternating Current, say from -2 volts to +volts, or say cone movement of -0.1 cm to +0.1 cm.

A 2 volt unwanted DC offset could change this to 0 volts to +4 volts or 0 cm to 0.2 cm. If 0.2 cm is too much, the cone breaks.

If the ROM audio library could change amp gain by itself, we could try some things...

You can send me a debug log with Menu->Help->EM Logs and after a few seconds. enter "Too lound" in the email text and press send.
[Spirit FM] mikereidis:
It's easy to find out. :)

Both.

At least one reporter claimed to never use the speaker mode.
[Spirit FM] JohnstonF:
I'm using the free app from the market hand there is no sound

Samsung gt i9000

Cm9 build 17

Semaphore kernel 0.91

Anyone know of a fix?
[Spirit FM] longthanh:
Would this work with the Xperia x10
[Spirit FM] thermskin:
Hi

After usage and after turned off I don't have audio in games and apps. Only reboot can fix it. I'm using lordclockan ics 5.1 on my dhd.

Am I the missing something?

Btw great app now I don't have to go back to BlackICE GB.

best regards

t.
[Spirit FM] onesolo:
I have the same problem... hope this can be fixed
[Spirit FM] mikereidis:
You should have seen a message popup explaining this. Answer is on previous page of this thread, but it's not intended for people who don't read popup warning and explanation messages. Sorry if that sounds bad...
[Spirit FM] mikereidis:
Takes just a minute or two to find out.

Likely only the mini at this point. Hopefully others soon.
[Spirit FM] mikereidis:
Known problem, I don't have a solution yet.
[Spirit FM] thisegzz:
So the GalaxyS ALSA mode may cause speaker damage, but does that mean headphones also won't work anymore? Because I never use my speaker but always headphones, and I'm willing to take the risk if it's only bad for the speaker.
[Spirit FM] mikereidis:
That's correct I "disabled" both.

Damage has been reported by at least 1 person that said they weren't using the speaker mode.
[Spirit FM] jamesrt:
Interesting; as far as I know, I've got a "standard" international I9000 (not carrier modded, or locked, or anything); assuming there is anything like a "standard" of course!

Well, I'll try and have a fiddle and see how I get on.

Done. Actually, as I personally think more debugging information is better than insufficient, it's been done 3 times; the first two with the WM8994 control enabled; #1 with "analog gain" at -10db, #2 with "analog gain" at 0db; and the 3rd time with the WM8994 control disabled.

Hope that wasn't too overwhelming!

Thanks.
[Spirit FM] mikereidis:
I've been favouring Team ICSSGS for Galaxy S because it appears more popular.

But I just flashed CM9 B17 and I see the loudness excessive on earphones, but not speaker. I don't recall B16 doing this, but I dunno.

It's likely one or more of the variables Voodoo sound can control, and that are under /sys/devices/virtual/misc/wm8994_sound . Or you could just switch to Ice Cold Sandwich... :D

Because the FM chip only has 16 volume levels, using Volume Scale is equivalent to just limiting yourself to the first half (at 50) or first quarter (at 25) of the scale.
[Spirit FM] jamesrt:
Hmm... Haven't heard of that one; and can't seem to find an I9000 version either, only for HTC phones.

Interesting; I can't recall if I was on B16 or the "experimental" (pre17) when I first installed Spirit. I'll drop a note onto the CM9 bug thread - mind if I name drop you?

Maybe I will - but I'll need a link (subtle hint!)

Thanks for looking into it.
[Spirit FM] longthanh:
does this app work on xperia x10?
[Spirit FM] mikereidis:
I have too many phones now and am getting the ROMs mixed up, LOL. I meant team ICSSGS: http://xdaforums.com/showthread.php?t=1398223

But as I count posts and views it looks like CM9 may have become more a bit more popular now.

No, please don't mention my name or app. :D I self banned myself from further posts on the CM7 SGS thread since there was a view that I was promoting my commercial app.

Feel free to post that FM headset volume is too loud, without mentioning any app name (LOL, as if they wouldn't know)

But I think their likely response is that FM isn't supported.

Note their post 1 says: "FM Radio does not work." They mean the CM FM app and will only fix problems that affect that app (which isn't ready and may not be for quite a while.)

Whereas Team ICSSGS says: "Fully working FM Radio(AOSP does not support FM, download Spirit FM from Android Market)"

There are a number of open source "zealots" in the CM world that find closed source to be distasteful. I can understand a bit, but...
[Spirit FM] mikereidis:
No..........
[Spirit FM] mikereidis:
Where are you setting these values ? Voodoo Sound doesn't seem to work on the CM9 B17 kernel.

Here's a few ways that are probably better to reduce volume:

# Default is 1

adb shell "echo 0> /sys/devices/virtual/misc/wm8994_sound/fm_radio_headset_normalize_gain"

# Default is 47

adb shell "echo 20 > /sys/devices/virtual/misc/wm8994_sound/headphone_amplifier_level"
[Spirit FM] qzem:
Hey mike!

I finally got the time to test fm app again :D. I've tested 7th march and 9th march version on ms Galaxy W I8150 with CM9, and qdsp5v2 alt just make my phone freeze again:(.

Cheers
[Spirit FM] Quinny899:
So mike, on the subject of UI revamp, I was thinking why don't we base it on the Radio itself? The icon is a scaled down 600*600 image, so if that was at full you could have buttons on it in a curve for options and a "screen" for frequency and RDS

I'll make a demo now, see how it goes
[Spirit FM] mikereidis:
I don't understand why, and a freeze makes log collection difficult, unless you run logcat via adb shell on a connected pc.

You have shell commands that work right ? So you should be able to use the new audio method "Custom". This uses shell scripts or binaries or just files with a shell command: /sdcard/sprt_mute, /sdcard/sprt_hdst and /sdcard/sprt_spkr.

So if you had a command to enable headphones "/blah/blah/ssd 1 2 3 4" you could set this up with:

adb shell "echo \"/blah/blah/ssd 1 2 3 4\" > /sdcard/sprt_hdst"

Note the \" for a quote inside quotes. Just use plain " if running from inside "adb shell" or a terminal app or similar.

Run this:

adb shell cat /sdcard/sprt_hdst

to verify it's correct.

Sometimes I've seen that running a command from the adb shell manually can do things that won't work from the app, but not too often.

It's possible this will freeze also, but you'd think then that entering commands manually would freeze.
[Spirit FM] mikereidis:
That's an idea. but it will be difficult to get all the buttons and graphics in the right place and of the right size. The app supports an external image file as a background in case you don't know or remember.

But I need to concentrate on Motorola support for the next week or so. I'm happy to have the Ics theme support now, but it distracted me from that for a few days at least.
[Spirit FM] Quinny899:
This is what I've got so far. I plan to add preset buttons to the left, as well as 2 buttons (Left, long press scan left), and right (long press, scan right)

Can you PM your source code so I can add these in, as I think you used Java to code the layout
[Spirit FM] mikereidis:
Umm, no offence intended, but I hope you didn't get the impression we were collaborating at the source code level.

You might think it's just a few small changes, but these things snowball and next thing you know we're spending weeks on something I've put less priority on than Motorola support.

The people with Motorola devices just want something that works, and they don't care (much yet) about how it looks.

In theory, I think you can do what you want with just XML changes.

I hope to provide a public API at some point for those who want a customised UI but that's easier than it sounds. Thankfully, I can still change whatever I want in the code with no regard for how it might affect someone using a public API... And there are MANY changes to come.

Regards...
[Spirit FM] Quinny899:
I never found an XML layout configuration, so I assumed you were coding it with Java layouts, which would need the source, but I can work without it, as I should be able to redirect to new layout XMLs anyway

And no offence taken
[Spirit FM] mikereidis:
The most important is res/layout/main.xml, and within that res/layout/display.xml.

For landscape mode (Paid only) there is also res/layout-land-finger/main.xml.

The other 3 are for settings edits and the status bar/notification screen.

As before, if it's liked, I'll be happy to consider including your mods in some way at some time.
[Spirit FM] mikereidis:
Gee, I have had at least 3 emails from people who somehow rooted their Galaxy S and installed ICS. But they can't figure out my "secret workaround"...

Is it really that easy to root and install ICS ?

I estimated damage was happening to 1% of Galaxy S users, but I now realise:

If I further assume that only 20% of those users are running ICS, then that means 5% of ICS Galaxy S users have experienced damage. And most of that was likely within 1 month of use. And neither low volume, nor using only headset mode seem to lower the risk.
[Spirit FM] jamesrt:
Correct; the latest couple of CM9 builds have disabled the Voodoo Sound interface in favour of their own "DSP Manager" application.

In the "DSP Manager", there is a WM8994 tab, and that has a "Amplifier Level" setting for the Headset.

I believe that in some point in the future, Voodoo Sound will also work, but not yet.

Yes, results in an immediate reduction of volume (Spirit FM was playing at the time, obviously).

Note that the path disappears if the "Enable WM8994 Control" setting is turned off in the "DSP Manager" application (which makes sense from an API point of view):

/system/bin/sh: cannot create /sys/devices/virtual/misc/wm8994_sound/fm_radio_headset_normalize_gain: No such file or directory

However, this isn't a major problem, as volume levels are much lower anyway without the CM8994 enabled from the DSP Manager.

Ok, this one is more interesting! This is obviously a API which directly equates to the "Headset Amplifier level" slider control I was talking about above. When I checked on my phone, the "default" setting was actually "57", not "47"; and I had the slider set to "0dB" (trying to hear quiet video soundtrack on a train can be a challenge at times...)

Manually pushing the slider back down to -10 dB and rechecking the value (echo /sys/devices/..../headphone_amplifier_level), and it did indeed state "47". And after writing "20" to it, the slider value in the GUI was "-37 dB"; which adds up. Literally, in this case!

At any rate, I'm personally satisfied with the results of echo 0 > /sys/.../fm_radio_headset_normalize_gain in resolving the issue.

Thanks for looking into that. (I've purchased the unlocked version too, to really say "Thanks!")
[Spirit FM] mikereidis:
Hmmm, the Voodoo kernel portions are open source, but not the app I think. So that may be the reason for the DSP Mgr app trying to replace it.

Aha ! Thanks, I didn't think to slide the tabs left to uncover WM8994. Amplifier level lowering works fine, but it probably reduces level for all apps. It says "Microphone", but when you click it says "Headset amplifier level".

Yeah, without DSP Mgr you're likely back to default values as seen on the Team ICSSGS ROM.

Thanks ! :)
[Spirit FM] jamesrt:
As far as I know, it does, yes.

Rapidly heading off-topic here, but I think where it says "Microphone" is the "header" for the next section... In my opinion, it isn't a very good GUI - sometimes (frequently!) it says "functionality not supported on your device", but if I exit and re-enter in the other rotation (i.e. go from Landscape to Portrait or vice versa) it works. Also it annoys me that if you do rotate in app, then it resets back to the default tab and doesn't stay on the tab you were on. If I had more time (to learn how!) I'd fix it and submit some patches. Maybe when my real life gets less complicated ... whenever that's going to be!
[Spirit FM] pritishd:
I am a Galaxy S user on ICS. I recently updated the app, and now the radio does not work.

What information do you need from me so that you are able to put a fix?
[Spirit FM] cba1986:
Read this:

http://xdaforums.com/showpost.php?p=23428950&postcount=2458

NOTE: I used this app for almost six month always using Galaxy S ALSA mode and never had any trouble. On both GB and ICS.
[Spirit FM] mikereidis:
Thanks cba1986.

Yes, read the post cba1986 linked to.
[Spirit FM] locomotive96:
Any news for the Motorola FM propieatary being worked on? Sorry, I know I misspelled that.
[Spirit FM] mikereidis:
On topic enough for me on my thread. :)

Yes, the line is like an underline for the topic. I did that previously and I see it's still true for the Audio section of Debug settings. So I just added these lines twice, one above General and one above Audio:

<PreferenceCategory>

</PreferenceCategory>

And the section names now have lines on top and bottom. Takes a bit more space though.

It can be difficult to deal with rotation. Basically the app gets destroyed and restarted. Apps need someway to maintain their "state data" and re-create everything as if the app had been running all along.

Don't know if you noticed, but the Unlocked app has settings for fixing Landscape or Portrait, or automatic switching. I've swatted many but I'm sure I still have rotation bugs, even on the free app because of the way I allow this to be configured. Rotation at startup is worst.
[Spirit FM] mikereidis:
That's OK, I'm switching to the term "OEM API" anyway. :D

Well here's what I've got, besides an estimate of sometime this week:

- I got it working at lower levels on my Droid X, but only by hacking a binary file for permissions. And that won't work on the hordes of stock, un-rooted devices out there that needs to be my primary target.

- So I'm now working on the higher level API the stock radio app uses to communicate with it's lower level service APK. But it's not clear yet if even this will be able to work on un-rooted devices.

As an aside I've noted that Motorola seems to be using Broadcom combo/FM chips, for the first time I think, in at least one of their new phones: the Photon. My app seems to work (rooted), but volume control may be a problem.

AFAIK, almost every previous Motorola device with FM has been using TI chips, so this is an interesting change, and may change the Motorola OEM API. It appears the 2009 Zeppelin was Broadcom too.
[Spirit FM] mikereidis:
I updated the Market/Play to remove view-ability and download-ability for 77 of the 1,174 Android devices my app is otherwise "available" to.

If anyone can't see or download my app anymore, for a working device, let me know. Some ROMs will mis-identify a device.

"Available" doesn't mean the remaining 1,097 devices will work. In fact my guess is that only 300 or so support FM, and my app might work on 150-200 for now, if I'm lucky.

And "devices" can be misleading to some extent. I exclude all 24 "devices" that are Samsung Galaxy Tabs of various generations. Likely though that there are variations for most.

Now I expect I won't get so many emails from all the people with devices that can never support FM. And 1 star reviews will diminish. :)

Should have done this many months ago, but I wanted to be sure FM seemed impossible on those devices before blacklisting them.
[Spirit FM] Nitemare_real:
Mike says using "adb" but... I assume I can use any file manager installed in my device to create a text file... can't I?
[Spirit FM] vurp0:
I have a problem with this app (Galaxy S with ICS) that's particularly annoying and easy to fix. The problem is that when doing other stuff on the phone, Android decides to kill the app (free memory!) and I have to open it and mute/unmute it. This doesn't happen when it's in my pocket with the app in the foreground, of course, but otherwise this gets very annoying. This could be fixed with a notification or some hack to keep it in memory.

Otherwise, this is the best app I've decided to download, because I'm, honestly, addicted to radio.:D
[Spirit FM] Barracuda72:
Yes, U8800 Pro has FM chip (it's Broadcom 4329, WiFi + Bluetooth + FM Receiver/Transmitter - http://www.broadcom.com/products/Wireless-LAN/802.11-Wireless-LAN-Solutions/BCM4329), and, of course, there is a stock FM app. I'm has some experience in reverse-engeneering, especially with ARM devices, but I'm complete n00b in Android and Java at all =) I've tried to decompile stock FM app, but it seems to use native Firmware methods (aquireFdNative, etc).

It's very sad joke - U8800 users, who didn't has stock FM app, can use radio on custom ROM's, and we - with official radio support - can't
[Spirit FM] myechophone:
I am using Kyocera Echo. Here is the debug info... Fm:BC Sh:1 Su:1 Bt:3 Ht:0 H2:0 Mo:BCH SD Hv:4 Ma:15 BC

No audio, no frequency. Anything which I can debug or change to see if FM is supported for my device?
[Spirit FM] cba1986:
Why don't you try it and report back?
[Spirit FM] Muaddib69:
So (forgive me if is a re-re-re-repeated question, I've "just" read only 10-15 pages before this one), is known the problem that, while using SpiritFM with headphones, you receive an incoming call, then you unplug headphones, and accept call by touching whatever button on screen, and then you can't hear nothing thru the speaker? And if at this moment, you plug headphones, the call is there "flowing" thru headphones but NOT thru speaker?

PS: Thanks for your app, FM'olics love you.
[Spirit FM] mikereidis:
Probably. I've never personally used a file manager to create a file.

But please don't post an easy solution anywhere. My intent has been to create a barrier requiring the knowledge or intelligence of someone who will understand and accept the risk.

One person has emailed me repeatedly about this. I gave 3 options: Wait for a fix, Figure out the workaround or Buy the paid app, the last 2 with the understanding of possible damage.

He "wore me down" and when asked I provided a URL for an old version but he insists in having the ICS theme, LOL (and doesn't want to pay I guess). I figured at least if he had speaker damage with an old version it wouldn't be quite as bad...
[Spirit FM] mikereidis:
Easy to fix ? I wouldn't be so sure...

My app contains a service and calls APIs that should identify it as a background audio service. A service such as this should never be killed by Android unless there were VERY severe memory constraints.

If the service WAS killed, it's most likely the audio would keep running. If you terminate my app and/or the service in a "brutal" way (with no normal shutdown), you will likely still hear the audio.

AND, if the service was killed, the next time you started the app, the FM radio would be initialized from scratch and start again.

So I think something else is going on. When you see this problem can you send me debug logs ? I'll presume you know how.

And... which version of my app are you running ? Older versions than March 4 or so had to loop a silent audio file to keep the audio path open. If the CPU was burdened this could result in 2-3 seconds elapsing with no restart of the loop and this would kill audio.
[Spirit FM] Muaddib69:
I having the

exact same issue

. Radio sound stops, not just the app. When I restart the app I must change to speaker and then to headphones to make it work.

Galaxy S international no-branded.

Cooked rom Dark Knight 3. (ICS 404)

Last Spirit FM (working and assuming risks)

Voodoo 3.1.1 (just in case is needed)