yashsingh1/xdaforums huggingface dataset:
[Spirit FM] mikereidis:
ALERT/WARNING: IF YOU HAVE A GALAXY S !!!

My worst nightmare ! :(

I think it's possible permanent speaker damage may be occurring.

Only for Samsung Galaxy S or other Silicon Labs based devices: Do not run my app. Do not run the CM7 FM APP.

I think the CM FM app was doing the same thing, and I think that at least part of the problem lies in the CM kernel.

I removed all older versions of my app and the only left, including on the Market is the "August 27" version. This version disables all support for Silicon Labs FM chips.

Angry mobs: Please put the torches down and let's discuss this calmly.

I hope beyond hope this isn't true, but I flashed a completely new ROM (Darky 9.2 Resurrection) and pulled the battery, and the speaker still sounds awful.

Some food for thought: http://xdaforums.com/showpost.php?p=8218737&postcount=194

"This one's a real gem: it can cause real damage. What the buggy code tries to do is disable the Left and Right inputs from the FM radio: the pin enables as well as the mixer.

What it really does in the process is: disable the on-chip thermal sensor (WM8994_TSHUT_ENA) AND thermal shutdown capability (WM8994_TSHUT_OPDIS), again because the _MASKs are inverted, but nothing's ORed in so these bits are set to 0. Go figure!

Clock output on GPIO (WM8994_OPCLK_ENA) is disabled as well, but that's probably not a biggie compared to the rest..."

AFAICT, the CM kernel still has the bugs in the earlier Samsung kernels.
[Spirit FM] Zatta:
Mike, relax and enjoy your days with your family.

I am listening to FM radio right now, ignoring your advice completely but doing so through my headset. On a Samsung galaxy s i9000, fugumod kernel (1157).

If you need some more info please ask, I am ready to give more info or logcats or whatever more ingo you need until wednesday than I'll go back to my job at sea (and rely on a 15 kbs/s connection).

Tapatalked u see
[Spirit FM] krishnandu.sarkar:
It works fine on Mik's CM7 6.5.7 LG Optimus One. Though it needs to turn on Bluetooth. But that's fine, I can understand the reason :)

Thanks a lot :)
[Spirit FM] sharper00:
Apologies if this is covered somewhere within the 106 pages of this thread - is it possible to change the headset media controls? By default they control volume but I'd like them to switch station.
[Spirit FM] mikereidis:
Thanks Zatta !

Based on the feedback I've had, I'm tending to think my app may not have caused any damage. I recall I was doing tests writing to the dangerous register number 1 of the WM8994. It controls some mixing aspects AND some power/pin functions.

I think I will update my app to allow Silicon Labs support, but only after a user presses OK to a disclaimer/warning. I should do that for all chips anyway.

Just let me know if you see any issues with any version...
[Spirit FM] mikereidis:
Great !

I also have an Optimus One (P500h) and usually test on Mik's CM7 ROM.

Bluetooth ON shouldn't be needed unless you haven't given my app superuser rights. My app should be able to work in a UART mode, directly communicating with the Bluetooth/FM/WiFi combo chip.
[Spirit FM] mikereidis:
This is on my "To Do" list. Hopefully soon.
[Spirit FM] xmguy:
Mike a important update. After too many issues with CM7 I've reverted back to stock for the time being. Now your app DOES work on stock Gingerbread (that is ROOTED). However the app is NOT causing the distortion. Not sure if the FM chip is damaged. But even the STOCK FM app has this audio issue to some degree. Now your app MAY beable to compensate for the issue. Also your app seems to override and block the stock app from starting. Only when I uninstalled Spirit FM and rebooted the phone would the app work. But then again why would I EVER use any other FM app! :D
[Spirit FM] mikereidis:
Archos 101 Tablet: http://en.wikipedia.org/wiki/Archos_101

I had a question about support of this device via email. Startup debug line was:

FM?? Sh:1 Su:0 BT:1 Ht:1 H2:0 Mo: UNK HT Hv:4 Ma:13 T1

My responses:

You have a Texas Instruments (TI) chip. You seem to be on a stock ROM (or didn't give my app SuperUser access). In some cases that can work.

I'm seeing that my code doesn't detect your TI chip properly, and I can improve the detection. I can let you know when I have a new version to try.

We may have some other problems though. As far as I can tell, this device doesn't have a stock FM app and nobody has ever seen FM working on it.

So it's possible that the antenna and audio connections needed aren't there. But we can try...
[Spirit FM] mikereidis:
Great ! I'd be interested to know if the faster Daemon mode (sprtd) is working, or if it falls back to hcitool. The former would show "Mo:TIH SD" at startup and the latter "Mo:TIH HT"

I guess the FM Launch audio method is working on a stock ROM as hoped.

I commend Motorola for using the open Bluez stack, or at least providing compatible APIs. (And condemn for bootloader locks.)

I'm wondering now if anyone has ever had the Motorola FM app working on CM7. Or perhaps it also relies on the Motorola "framework" like most stock FM apps.

Well MY app didn't do it, LOL ! (I think/hope.) There are only one pair of stereo analog outputs, so if it sounds OK on headphones then any problem would likely be in the TI audio chip speaker outputs I'd think, since that sound file you sent me doesn't sound anything like speaker damage. But we don't have schematics so I'm not sure if some external transistor or something might be responsible.

Did you get this phone new ? I'd think you would have noticed this with the stock FM app on the stock ROM in speaker mode when it was new and before you installed CM.

It sounds like you are saying the overdrive/slight warble effect is less with the stock app. If you haven't tried this yet, I'd try rebooting, starting the stock app, stopping it, then running my app to see if it's better. Or you could even try leaving the stock app running, but that's less likely to work.

Besides lowering the volume values, the only compensation my app COULD do would require that we figure out what commands to send to the audio chip, and how to send them. There is nothing like that at present.

If you haven't yet, try FM_launch2 in addition to FM_launch, FMRadioOn. fm_on and sfu_sdcs.

Hmm, Interesting... I'm not sure why it'd block the stock app from starting. The CM FM app and mine can more or less co-exist.

If my app is in the background, it doesn't send any FM HCI commands. It's possible the Motorola app sees the FM chip is powered and assumes that another instance of itself is already running. A logcat might give a clue.

And having to uninstall my app is doubly strange, assuming my app and the FM has been terminated. It would be nice if they could more or less co-exist, as it might assist in trouble-shooting.
[Spirit FM] xmguy:
Alot to reply to so let me lay this out. App shows "TIH SD".

I doubt your app caused it. I got this phone from Asurian referb. I think the fm app was like that at start. I remember having doubts. Guess your app can go louder so any existing problems are compounded. But your app is NOT the cause.

As far as using the stock radio app. I've tried shutting down by fc the spirit and moto fm app. No luck moto app just stays on Launching Fm Radio...please wait. Tried a reboot. Stock fm radio will run as long is spirit hasn't been started. Once it is moto fm will not work. Even after toggling speaker output and play pause buttons in spirit.spirit

This should also work on the STOCK Droid 2, 3 and X2 as long as they are rooted.

The audio issue is probably related to a bad resistor or cap in the fm out chip. The voltage is dropping in the cap/resistor. But you should add the results to your app and on fda. Its confirmed.
[Spirit FM] mikereidis:
OK, great ! That's the sprtd Daemon mode that is much more CPU efficient than hcitool, especially with RDS.

Thanks for all the info.

Main thing I see in the log you sent is that turning off the Motorola app shuts down the Bluetooth. My app does the same, but only if it turned BT on at the start. Like my app, the Motorola app might leave the BT state alone if BT was on when it started. (Otherwise it might really annoy BT headset users.)

My app can't adjust if the BT power state is toggled while it's running. So it results in a lot of log errors. The only fix at this time is to restart my app.
[Spirit FM] mikereidis:
Samsung Galaxy S support is re-enabled on latest August 31 Market version. For Galnet MIUI see: http://xdaforums.com/showpost.php?p=16992464&postcount=1052

After no credible user reports, I'm declaring the speaker damage concerns dubious or very isolated.

For an issue such as this I wanted to act quickly and err on the side of caution.

I returned the Galaxy S with the speaker problem and will likely get a new one soon after some other issues are addressed.
[Spirit FM] mikereidis:
vAugust 31 is now on the Market:

What's in this version:

1. Samsung Galaxy S support re-enabled. Speaker issues appear dubious or very isolated.

2. Improve detection of TI and Broadcom FM chips for Archos etc.

3. Fix reversion to North American RDS values on orientation change or return to app.

4. Email Logs uses /data/local/tmp/sprt_debug.txt instead of /sdcard/sprt_debug.txt .

5. Fix NullPointerException on phone call mute/unmute.
[Spirit FM] armarra:
X10 mini no audio with spirit fm.

I understand that this app does not work with the mini pro which has a keyboard.

I am using the app with the x10 mini that does not have the keyboard, so it is surely not the pro.

i have

checked that the bluetooth is connected by listening to the music player with bluetooth headset.

checked that the spirit fm radio is set to Australia and sony ericsson audio method.

I can hear the bleep of the volume as I lift it to maximum but no music/talk from the radio, despite the RDS displaying information and adverts.

I have toggled the headphone/speaker button

I have toggled the play / pause button

I have lifted the aerial/headphone wire

I have clicked all the debug toggles

I have even selected All instead of sony ericsson.

I have tried mono instead of stereo, but that did nothing and was a long shot.

Does the x10 mini really work with this ??

the phone has superuser access and I know this for sure because I've installed setcpu which needs root and it does adjust the phone speed.

any ideas ....:)

Great app in theory, but this particular X10 mini does not get audio.
[Spirit FM] cos68:
Thanks, your fix for my error report recently is working perfect!

Thanks,

Claus
[Spirit FM] sahil324:
FM for Nexus s

I dont know if anyone has asked about it in 107 pages . can it be possible that this app works on Nexus s ...?
[Spirit FM] FadeFx:
Finaly we got stereo on sgs-cm7 (fugumod)

Thanx mike...

----------------------------------------

tapatalked
[Spirit FM] xmguy:
I'd send a aLog cat file. but aLog cat isn't working for me now. If I can get it working I will. However BT IS staying on with Spirit FM running. Most of the time it shuts down after closing the app. Not always.
[Spirit FM] xmguy:
Updated (8/31) app now shuts down BT when Spirit FM app running. Stock Gingerbread. Droid X.
[Spirit FM] Kess78:
Hi,

I have a x10 mini and the app works fine on it, I got sound, but I'm not using a BT headset...

When i just install the app, I don't have audio on first start. I need to go in the Settings and set SonyEricsson method. Also you need to set the Volume Scale to a low value (I set 4). Once you have done that you need to do a clean restart of the app and normally you will have audio. I have absolutly no issue with the app at the moment...

I hope this helps you.

And congratulation Mike for the support of the Galaxy S !
[Spirit FM] FadeFx:
You can still use terminal emulator and enter

su

logcat

@Mike after using your app (31.08) i still have the problem that there is no sound in phone calls...

----------------------------------------

tapatalked
[Spirit FM] denzel09:
Hi mik any good news?
[Spirit FM] mikereidis:
"Search this Thread" on Nexus gives 37 results.

My device compatibility list is in post 2: http://xdaforums.com/showpost.php?p=13380058&postcount=2

The Nexus S is among the devices in the list that says:

"These devices contain Broadcom chips, but appear to be unable to receive FM. They show unusual RSSI values, that jump rapidly between such values as: -128, 0, 16, and 55. None of these devices have a stock FM app, nor will any other FM app function. My theory is that these devices lack the hardware connections to operate, and may even be deliberately disabled"

BOO to Google for commissioning a Galaxy S variant without the Silicon Labs FM AND without usable Broadcom FM support.
[Spirit FM] mikereidis:
Great !

My memory is fuzzy, I presume stereo wasn't working with my previous releases and the Fugumod dev fixed this. Was/is the frequency response good ?

The SamsungCM7 audio method writes to /sys/devices/virtual/misc/voodoo_sound/wm8994_write to restore good frequency response. Is that pseudo file (wm8994_write) present on Fugumod ?
[Spirit FM] mikereidis:
I hope to buy a GT-I5503 Galaxy 5 in the next few days so I can hopefully solve the Galaxy 5 series audio problems.
[Spirit FM] mikereidis:
I got an email from you at 1:50 PM with the subject "Debug Log vAug 3 samsung continuum galaxy s". There is no attachment. Was that from the Droid X or the Samsung ? I'm not sure if this is due to change from sdcard file to /data/local/tmp/sprt_debug.txt or because it's from your Samsung.

When my app/the radio is powered off, it reverts BT power state to that which it detected at startup. So if my app starts with BT off, then turns BT on (as it must for TI chips), it should turn BT back off at exit. If BT was on at startup, the app should leave BT on when exiting.

The user or some other app could of course change BT power state at any time.
[Spirit FM] mikereidis:
OK, thanks. I presume you mean phone call audio (receive at least) won't work while FM is running, or even after FM is powered off. So I guess you can't use your device as a phone while, or even AFTER, FM is used, unless you reboot. That's a drag...

The ALSA API gives an option (0) to turn the FM audio path off, but it always returns an error in my experience. Setting to speaker or headset (1 or 2) works, but not the disable (0).

I managed to get the CM FM app somewhat working at one point; the biggest issue was that tuning was crazy. Have you ever had the CM FM app working, and did you see if it had the same problem ?

In some cases I managed to get the sfu_sdcs audio method used on other CM ROMs partly working. It's possible this method might avoid the issue. You could even try switching to it before powering off FM to see if that helps.
[Spirit FM] mikereidis:
Thanks for your help Kess78.

Wow, you set Volume Scale to 4 ? That's pretty low; there must be a lot of unwanted amplification there. I hope we can find out how to normalize that to 100 or so; I think the audio quality may improve.

FYI, don't set Volume Scale to 0.5 or lower or you will trigger the code I have to set fixed volume values.

:D Every new device creates a bump in downloads and sales and gives me more experience with different audio etc. chips. Too bad it also creates new issues to fix and lengthens my release testing time...
[Spirit FM] mikereidis:
"No audio" is a common and frustrating problem. Different devices and ROMs require different Audio Methods. Please try what Kess78 has posted. You can also try selecting each Audio Method in sequence, hoping to find one that works.

What ROM are you running ? Stock rooted or CM or ???

When you change volume, does the screen show "Media Volume" ? I only hear blips when changing the Ringer Volume.

For Broadcom based devices such as yours, there is low quality experimental BT headset support when you select Audio Method "sfu_sdcs_bt" (the 2nd option, note the _bt at the end.) But I don't think anyone else but me has reported this working.

In general, wired headsets must be used at this time for audio, although speaker output also works on most devices.

Make sure the "BC MR 1" and "BC MR 2" debug toggles are off (UN-checked). The other 2 just provide more detail in debug logs.
[Spirit FM] denzel09:
Ok mik thanks ;)
[Spirit FM] xmguy:
Yeah I was trying my Samsung Continuum again with the updated app. See if it would work. At app startup I get "FM: BC Sh:1 Su:1 Bt:0 Ht:0 H2:0 Mo: BCH UA Hv:4 Ma: 15 BC"
[Spirit FM] mikereidis:
OK, last you mentioned, it's rooted and running a custom Froyo ROM. Does anything work, like RSSI or RDS ? I'll presume no audio.

Does the stock ROM support FM ? I searched a user manual PDF and found no mention. If there's no stock FM (or any working FM app) and the RSSI is jumping (-128, 0, 16, 55,...) we might as well give up now...

There is no hcitool binary, so I'd guess the proprietary Broadcom BT stack is in use. Otherwise, with BT on, a command like this would produce 12 bytes of output:

adb shell /data/data/com.mikersmicros.fm/files/hcitool cmd 4 1

It's annoying that Samsung puts the "Galaxy S" label on so many different phones. The REAL Gal S (GT-i9000) has a Silicon Labs FM chip, but this "poor stepchild" of the Gal S family (SCH-1400) only seems to have the Broadcom combo chip.

"Mo: BCH UA" means that my app has successfully started Broadcom HCI Uart App mode. If BT was ON when starting my app, the HCI socket and hcitool modes likely wouldn't work, and my app would turn BT OFF to get to the Uart mode.

I can't find any service manual/schematics for this device. It might use the WM8994 (like i9000) or MAX8899 (like Gal 5) audio chip, or something different. Samsung seems to use ALSA audio APIs so there may be a /dev/snd/controlC0 pseudo-file we can use to enable an FM audio path.

Debug logs would be useful. Using Menu->Email Logs, the sprt_debug.txt file is now written to /data/local/tmp instead of /sdcard. Previous releases might work better for sending logs.
[Spirit FM] xmguy:
"If there's no stock FM (or any working FM app) and the RSSI is jumping (-128, 0, 16, 55,...) we might as well give up now..."

Yep the RSSI was going nuts. Now that I enable BT it reads no compatible chip. Oh well!

I went ahead and attached the correct logs. Emailed them.
[Spirit FM] FadeFx:
Nope, file is missing and frequencys are high only, no lower frequencys, here the ls:

adc_osr128 headphone_eq_b4_gain
dac_direct headphone_eq_b5_gain
dac_osr128 headphone_eq_bands_values
debug_log mono_downmix
dev power
digital_gain recording_preset
fll_tuning speaker_tuning
headphone_amplifier_level stereo_expansion
headphone_eq stereo_expansion_gain
headphone_eq_b1_gain subsystem
headphone_eq_b2_gain uevent
headphone_eq_b3_gain version

----------------------------------------

tapatalked
[Spirit FM] FadeFx:
Cm FM app had the same result here, the stations have been somewhere completely different, but i could not find a sheme, so tuning was totally messed up. For audio method, i will try that today.

----------------------------------------

tapatalked
[Spirit FM] mikereidis:
These specific values are seen most often: -128, 0, 16, 55.

So you have the proprietary Broadcom BT stack then. My app SHOULD try with BT ON and fail, then turn BT OFF, try again and succeed in the UART mode. I'll try to fix this, but it won't help on this phone.

I haven't seen any logs.
[Spirit FM] mikereidis:
Thanks... So I guess the Fugumod dev fixed the stereo, but not the frequency reponse. Without wm8994_write, it's more difficult to set the proper registers.

I wonder if the Voodoo Sound Control paid app has a loadable module for this kernel. But perhaps it would be easier to ask the dev for this.

If the bass is gone, I'd think the highest frequencies are gone too. The original Samsung kernel used filters suitable for voice, topping out around 4-8 KHz I think, Unsuitable for decent music.
[Spirit FM] Kess78:
Hi,

I tested with different value of Volume Scale and I think audio quality is the same... I'm ok to try to have a normal value, just tell me what you logs or anything else you need and I'll give it to you :)

I think the x10 mini has a TI FM chip, debug info start with FM:TI.

I think you will need to restart the app after picking a method. Because when I start the app with SonyEricsson and have sound, when I select another method and then go back to SonyEricsoon I don't have sound untill I restart the app.
[Spirit FM] FadeFx:
Voodoo Control Plus breaks the system if the kernel sports voodoo sound, so not a good idea to try as all cm7 kernels have voodoo sound. i will ask nikademus to implement wm8994_write if possible.
[Spirit FM] mikereidis:
Hi, Thanks... :)

If audio quality is OK then I'm not too concerned right now.

Yes, you are right, so the BT experimental support won't work.

I think I know why this happens. I'll release a new version in the next 10-16 hours with a fix I hope will work. If you could test it, that would be great.

I don't think we ever got the speaker working, did we ? For headset mode (when speaker icon shows) I use HEADSET_FM (39). For speaker mode I use HEADPHONE_FM (43). Does anything happen when you toggle headset/speaker ?
[Spirit FM] mikereidis:
OK. But I think there are different levels of voodoo sound support. Some, like on the Galaxy S with stock ROM (with voodoo kernel) or Darky, have sysfs "files" for FM bass enhancement etc. And some have that wm8994_write.

I thought that the module in the plus version might over-ride the in kernel support, but perhaps it only works on stock kernels without any in kernel support.
[Spirit FM] Kess78:
Sure I'll test it :)

No speaker is not working. When I hit the headset/speaker button, the sound in the headset stops after 3 or 4 seconds. After that, when I hit the volume key, the sound goes back into the headset.
[Spirit FM] mikereidis:
Droid X with CM7 nightly. Someone is reporting audio issues where it "constantly skips" or is "consistently choppy". This affects both of his 2 Droid X's.

EDIT: "Short burst of good audio (half a second) followed by a half a second of fuzz, and this repeats over and over consistently." Happens with good signal or static.

Ever seen this ? SaurusX was having issues with "bursts of static and multiple signals", but I think this was resolved and was an RF issue as opposed to this audio issue.

RSSI is good in the 50s and RDS is fine. Both FM_launch and FM_launch2 were tried.

Thanks !
[Spirit FM] FadeFx:
sont know about non cm7 kernels as i am on cm7 since pre nightly times and never used a samsung gingerbread rom before. but with cm7 voodoo control plus definitely breaks the system as you get bootloops if you try to inject the modules.

however, i tried to switch to audiomode sfu_sdcs before shutting down spirit-fm, but still there is no sound in calls afterwards, also if i leave it to that setting, then reboot, start the app in sfu_sdcs and exit it, i still have no audio in calls. can i somehow test something for you to find out what happens?
[Spirit FM] mikereidis:
Can you try this ? :

1 - Switch Audio Method to "htcflag".

2 - Reboot.

3 - Start my app. There should be no audio.

4 - See if phone audio works.

5 - Stop my app.

6 - See if phone audio works.

"htcflag" should do nothing and be benign on Samsung. If phone audio is stll broken, then something besides audio routing code is breaking it. (But I doubt this.)

sfu_sdcs SHOULD work on CM7 for any device that supports the CM FM app. So it might be interfering. But I couldn't get sfu_sdcs working.

I read on the CM7 nightly thread for Galaxy S yesterday that the CM FM app is expected to be fixed soon. I hope there will be fixes for libaudio / sfu_sdcs. Regardless, if the CM FM app works OK, I can check the source and make my app work OK too.
[Spirit FM] FadeFx:
testing now...

the cm7 fm app is fixed by some kernel fixes afaik, but i doubt that they make it into fugumod, as that one is realy far from stock, it is 2.6.36 now and nika is working hard towards 2.6.37 stock cm7 is 2.6.35.2 or something iirc

edit: you are right, its working with htcflag.