yashsingh1/xdaforums huggingface dataset:
[Spirit FM] mikereidis:
Version September 18 is now on the Market: https://market.android.com/details?id=com.mikersmicros.fm

Audio Method "GalaxyS CM7" has been slightly improved.

Audio Method "GalaxyS MIUI ALSA" is now working on MIUI US and Galnet MIUI.

I tested MIUI US versions 1.9.2 and 1.9.9, and Galnet MIUI Chameleon RC3 and Final.

No media player workaround should be needed.

Fast "Chipmunk" music should now be gone.
[Spirit FM] mike_tbu:
But how to root xperia mini pro (Sk17i)?

I've tried many ways - using apps like GingerBreak, z4Root, SuperOneClick and they didn't work properly.
[Spirit FM] veenone:
Hi Mike,

This update version works like a charm on my galnet miui!!

The radio works right away after I chose "GalaxyS MIUI ALSA".

But there's a glitch though, using the earphone, the sound sometimes stops; but it can be solved by switching the output to speaker then switch back to earphone.

As promised, I'll buy the unlocker right away since it works on my phone now ;)
[Spirit FM] mikereidis:
Well I'm not really in the "rooting business", but...

From what I read the common rooting techniques require unlocking the bootloader.

The most successful technique seems to be by DoomLord at his thread here: http://xdaforums.com/showthread.php?t=1216783

If you do it, read well. I can't take any responsibility for any problems that arise.
[Spirit FM] mikereidis:
Great !

I've been running on CM7 overnight to test, but I'll try Galnet now. I think this might happen if the phone gets very busy running apps.
[Spirit FM] arch07:
I don't know. May be he has other Dell? I have Dell Streak 5.

New update (today) - sound play through headset. WOW!

BUT when i try to switch sound to speaker - i hear silence...

Then i try select "require antenna" on start - and program can't start with or without headset until i select "optional antenna". So program can't detect headset.

New update fix old "Dell Streack bug" and make new :)

Сan I help to catch this bug? mail me if i can. arch07(dog)yandex.ru
[Spirit FM] mikereidis:
Thanks !

I updated the descriptions en francais. Can you check them ?

I just noticed that setting a language makes me see reviews in that language. Nice...

At least Google is doing a few things well for their 30% take on every app.
[Spirit FM] mikereidis:
Yes, it's possible different Streak models react differently. Perhaps if you set to speaker, then reboot, it will work on speaker. Same for headset, with reboot needed.

If you are capable of running adb shell, or can run commands through a terminal app, these commands SHOULD switch to Headset or Speaker:

/data/data/com.mikersmicros.fm/files/fm_hcitool 9 1

/data/data/com.mikersmicros.fm/files/fm_hcitool 9 2

But if it's not working in my app it's unlikely to work on the command line.

I'm working on a new version of my app that makes headset/antenna issues show a warning only.

On some devices it appears difficult (or impossible?) to detect if headset is plugged in or not.
[Spirit FM] sfortier:
You can try libaudio from subpsyke CM7.1 for G5.

Download this package http://www.multiupload.com/9D8N5A57CP

Extract libaudio.so and libaudiopolicy.so and adb push to your /system/lib/ folder.

S5570 audio hardware is so similar to i5500, maybe this works...
[Spirit FM] arch07:
It all working with reboot!

thanks - but do you think that it is easy method of switching?

about detecting headset - is there in operating system some standart "flags"?

when i connect wire headset it shows an icon.
[Spirit FM] mikereidis:
No it's not easy.

But at least we've confirmed some useful information. I presume that once you boot, you're stuck in the configured mode and can't switch to the other. Or is there one way you can switch after a boot ? Like Headset -> Speaker or vice versa ?

I will look at the kernel code I found and try to find the proper solution.

The /sys/class/switch/h2w/state pseudo file is what I use at present. If you run:

adb shell cat /sys/class/switch/h2w/state

on many phones you will get "0" if no headset, and some other number if there IS a headset.

There is also a "Headset Listener" callback in Android, but there seems to be no guarantee it will be called, at least at startup.

I'll look into this further and I'll try to release a new version later tonight with some fixes.
[Spirit FM] kepke:
I finally had the chance to test the miui fix.

What can I say? Amazing work!

Works Great on both 1.9.9 and 1.9.16.

Thank you so much.
[Spirit FM] falan:
Please, you tell me! :o
[Spirit FM] mikereidis:
Testing version Sept. 19:

http://www.mediafire.com/file/h61d4y1slefyei9/Spirit_FM_Radio_v110919.apk

Requires Android 2.2 (Froyo) or higher in this version. (Temporary.)

- Lots of small fixes and changes. Little testing, so likely has some issues.

- Unlocked apps can now select functions for Media Button Previous/Next (or equivalent lock-screen controls): Volume, Seek or Nothing.

- Possible fix for occasional audio dropouts with GalaxyS ALSA MIUI.

- Possible fix for audio focus / volume control issues.

- Hopefully better headset/antenna detection, as well as a Warning option; the new default.
[Spirit FM] mikereidis:
kepke has a Galaxy S, not the S2 as you have.
[Spirit FM] falan:
AH! OK, :(, thank you.
[Spirit FM] mikereidis:
Nobody has yet sent me a log for a Galaxy S2 (I think). Can you select Menu -> Email Logs and send me yours ? It's easier with the Sept 18 version. The new one today hides it (unless you are unlocked) and you have to tap the frequency button and enter 1 to send the logs.

I had remote access to an S2 the other week. Unfortunately remote access didn't help me with audio issues; I couldn't hear the phone. But I DID get some useful mixer data.

The service manual shows FM connected to Line1 on the audio chip.

If you, or anyone else, was comfortable using adb shell commands, we could try a few things.
[Spirit FM] arch07:
dell streak

version "Testing Sept. 19" nothing new :(

-no antenna detect (and no any warnings without antenna)

-no switching without reboot

P.S. cat /sys/class/switch/h2w/state - allways return "0"
[Spirit FM] r666t:
Broadcom BCM4329

Hi,

Do you know if it will be supported de Broadcom BCM4329 chip? This chip are in Huawei tablets and now it's impossible that work with Spirit FM.

Thanks for all!
[Spirit FM] Kess78:
It works, I see it in French :)
[Spirit FM] GirlKillu:
Hello,

I have a Galaxy S with speedmod T24 kernel (rooted) on android 2.3.3 JVH with no special rom.

Can i use this app to play radio without antenna? Or do i need a special ROM/deodexed something?
[Spirit FM] mikereidis:
Yes, my app can work without headset/antenna on any device/ROM it supports.

If your kernel includes the Samsung FM driver the app should work, but there can sometimes be audio issues.

Fastest way to find out is install it and try. Let me know if it works or not.
[Spirit FM] mikereidis:
My app works fine with the BCM4329 on devices such as the HTC Desire.

But Huawei may not have made the right connections to the chip and then it would be impossible. Huawei tends to make their devices as "inexpensive" as they can.

AFAIK the only Tablet my app works on is the Dell Streak and even that has issues.

I'm not aware of any Android tablet, including the Streak, that has a stock FM radio.
[Spirit FM] mikereidis:
Thanks, I wonder how to determine antenna/headset on the Streak then.

I will put a call out on the Modaco thread for assistance with the speaker/headset issues.

Are you having any volume control problems ?

The antenna check is only done at power on. The option is at Menu -> Settings -> User Interface -> Antenna. By default it's set to Warning, but can also be set to Optional or Require.

When set to Warning you should see a Popup message at power on saying:

"!!!!!!!! For best reception, connect a headset for antenna !!!!"

It should stay for 4 seconds, but testing it on one of my phones I see it's only there for 1-2 seconds. And if my app has to turn on Bluetooth or do something else that takes some time, it may not appear. This feature, like so many, seems simple on the surface, but difficult in reality.
[Spirit FM] GirlKillu:
yeah, thanks!

I've tested it, but i don't hear any sounds, too bad :(

It also lags on me..

But what do you mean with the Samsung FM driver? I just have Speedmod K15-24t running on android 2.3.3, lagfix and root enabled
[Spirit FM] mikereidis:
Most of the Galaxy S kernels have a device at /dev/fmradio or /dev/radio0. I haven't checked your Speedmod kernel though.

When you start the app, there's a debug line starting with "FM: ". Can you type exactly what it says ? I hope it says "FM: SLR" at the beginning and at the end "Mo: SLR".

Also, you will likely need to set the option: Menu -> Settings -> Audio -> Audio Method. Tune to a strong station, ensure the headset is installed and try "GalaxyS CM7" and "GalaxyS MIUI ALSA".

If those don't work you can try all the other methods, and you don't have to leave that settings screen. Try at least "Samsung" (either) and "All".
[Spirit FM] veenone:
Hi Mike,

I found occasional broken audio output after listening to the radio. I couldn't hear dial tone during a call nor other audio output from the speaker. I wonder what cause that? is it because the application terminated unexpectedly or force closed? The issue can be cleared by rebooting the device.

Another one, when I use Galaxy S' default earphone, the radio works perfectly. But when I use my regular headphone (Alessandro MS1 in this case) no sounds are coming out from the application. I wonder what caused that.
[Spirit FM] arch07:
No any problems... it works...

I have BT-off, so programm need 4-10 sec to start - and no any pop-up menu.

But it seems to me - this future is not so important :) And may be window with 2 buttons "start anyway" and "turn off" - easy to realise?

And may be stupid question: Is it necessary to turn on BT on programm start?
[Spirit FM] mikereidis:
It only happens sometimes, and other times it's OK ? Are you experiencing the app terminating unexpectedly ?

It's hard to say what the problem might be. The MIUI audio libraries don't "understand" that FM is or has been playing. That might cause issues. I'll try to test this myself.

It's possible that running a media player or similar might reset the audio without rebooting.

Some people were having this problem with the CM7 FM app, but not mine. I was reading yesterday that the phone hardware can detect if it's connected to line-in of an amp (high impedance), or earphones (low impedance.) But the specs on you headset is 32 ohms ? Seems low enough.

Are they 3 pin or 4 pin ? The phone might react differently with 3 pin.
[Spirit FM] mikereidis:
Thanks, so volume control is OK.

Dell Streak uses Broadcom FM so you should be able to use FM with BT off.

The app may not be seeing your HCI UART port. It's usually /dev/ttyHS0 or /dev/ttyHS1.

If there is a /dev/ttyHS0 port, but the BT UART is /dev/ttyHS1, then that would cause a problem.

If you could send me logs via Menu -> Email Logs, I can give better information.
[Spirit FM] falan:
HI Mike,

I sended you a debug email, I'm not a monster IT technician, but it put a command in adb I think doing
[Spirit FM] GirlKillu:
I have tested it again. I can hear soft music(volume all max) with my earphones plugged in and audio setting set to Samsung but can't receive that many/good channels. CM7 and MIUI doesn't work for me. I also can't receive any channels if i unplug the earphones.
[Spirit FM] mikereidis:
OK, I'll presume you have "SLR" in the Debug line as I asked.

I can try the Speedmod K15-24t kernel. I guess by "android 2.3.3 JVH" you mean you have a stock ROM ? So, yes, "Samsung" audio method is likely best. I have noted that my app is louder on CM7 and MIUI ROMS than on the stock or stock derived (Darky) Galaxy S ROMs. The stock Galaxy S FM app is also quieter, so it's more a ROM issue.

Sometimes different earphones/headsets are better as antenna than others. There's nothing my app or the hardware can do if your FM signals are weak.
[Spirit FM] mikereidis:
Re: Galaxy S2 audio:

Thanks for the log. If you or anyone else would like to experiment. start my app, tune in a good station and set volume half way or so. Be ready to hit the pause button just in case the volume ends up way too high.

I wouldn't bother to try and type these commands by hand. If you can't copy from here and paste into a command window, typing is way too tedious, Here are the most interesting controls:

elid numid: 37

elid name: Line Bypass Playback Volume

cei min: 0

cei max: 31

elid numid: 38

elid name: Line Bypass Playback Switch

cei type: 1 Boolean

elid numid: 51

elid name: Line 1 Playback Volume

cei min: 0

cei max: 31

elid numid: 52

elid name: Line 1 Playback Switch

cei type: 1 Boolean

Headset mode is best for testing, but be careful and place the output away from your ear as a loud blast of audio might happen.

To enable "Bypass":

adb shell /data/data/com.mikersmicros.fm/files/ssd 4 1 38 /dev/snd/controlC0 1

To set bypass to half volume:

adb shell /data/data/com.mikersmicros.fm/files/ssd 4 1 37 /dev/snd/controlC0 15

Similar but "Playback":

adb shell /data/data/com.mikersmicros.fm/files/ssd 4 1 52 /dev/snd/controlC0 1

adb shell /data/data/com.mikersmicros.fm/files/ssd 4 1 51 /dev/snd/controlC0 15

I eagerly await an "It works!" post. :) But experience tempers my hopes on a first round.
[Spirit FM] mikereidis:
MIUI "Anti Eavedropping" :

Running MIUI on my Galaxy S I noticed the following log message:

09-21 03:20:33.570 W/TelephonyManager( 6961): com.mikersmicros.fm is rejected when check anti wiretapping permission

This is due to a new MIUI feature and I guess it prevents my app from detecting the start and end of a phone call. My app uses this to mute the FM during a call and automatically unmute afterward

From: http://miuiandroid.com/2011/09/miui-1-9-9-changelog-full/

"2. Anti eaves-dropping

This weeks update features improved anti-eaves dropping, enable to prohibit app monitoring, monitoring of call information and other actions by third-party sources."

In order to allow my app (and others) to detect phone call state, you need to go to MUIU Settings -> Programs -> Call Settings and switch "Third-party access".

My MIUI 1.9.9 has a bug that shows this switch backwards. So set it to "Off" until the bug is fixed.

My app currently writes a log message containing the incoming number. The line starts with "onCallStateChanged: ". I've disabled the number information in the source for next release. My app makes no use of that number.
[Spirit FM] mikereidis:
I wonder if you were affected by the new MIUI "Anti Eavedropping" feature. See my post above.
[Spirit FM] veenone:
Ok Mike,

I'll try it out and see whether it works out
[Spirit FM] mr xombie:
hi mike.. i'm from GT-S5570 user currently using CM7 ROM from Tj_style.

he has rebuild the CM7 and it seems the radio is now working for other members.

and the problem is it's not working for Indonesia region.

can you please add the Indonesia Region in the Spirit FM settings.. thx.. :)
[Spirit FM] mikereidis:
Great ! :) Big thanks to tj_style and the MadTeam: psyke83 & sfortier/OuNao.

Any non-North America selection should work fine for Indonesia. World for example for 50 KHz channels. Europe gives 200 KHz (even) offsets. Australia gives 100 KHz.

What offsets are used in Indonesia ?
[Spirit FM] mikereidis:
You have 38 posts on this thread, going back to July 23.

Apparently tj_style's S5570 CM7 port and my app are working together now.

:D
[Spirit FM] mikereidis:
I am spending time now on trying to enable the Optimus 2X. Menu -> Email Logs would help.

I'm hoping we can enable FM audio through the ALSA driver.

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

EDIT: Not so easy as I had hoped.

The service manual shows a WM8994 audio chip. But the logs I've seen don't show any ALSA driver. :(

So the driver(s) seem to be proprietary NVidia drivers, perhaps in the HAL Nvidia won't release.

There are some nvhost* drivers in /dev, and some nvmm* libraries... If possible without source, it won't be easy...
[Spirit FM] sosquidtaste:
I'm running the CM7 Alpha build for HTC Sensation (using Audio Method qdsp5v2) and am having the same issue as veenone, with a slight twist.

The first time I lock the device after tuning into any FM station, the sound will cut out and will only turn back on if I power on the screen (not necessarily unlock the device-- even powering on the lockscreen does it). Then I need to unlock the device, pause, and restart the FM station within the app. At this point, the sound stays on even when my screen is locked.

If I perform the unlock, pause/restart sequence though, all sounds on my phone are disabled once I close Spirit FM. This includes all ringtones/notification sounds, and my media player, PowerAMP, will not even start playback. If I press play within PowerAMP, the time is frozen in place and will not advance, nor will it playback anything. As in veenone's case, the only solution is to reboot the device-- restarting and pausing a media player is not an option on my device, as all media functions are apparently frozen once the bug shows up.

If I do not do the unlock, pause/restart sequence, but just keep the screen on then power off Spirit FM normally, all sounds will playback properly.

I don't know if this provides any useful clues as to why veenone and I are having the same issue-- or if they're even caused by the same problem since we have two different devices entirely-- but hopefully this is something that might be resolvable.

Let me know if there's any way I can pull up more relevant data. Sorry for the long post :]
[Spirit FM] mikereidis:
Thanks ! I appreciate all details.

I think that, in general, it IS the same problem. The audio libraries for your device likely don't support FM analog audio routing. The qdsp5v2 kernel driver apparently DOES support FM routing, but the audio libs interfere sometime.

I would hope the CM dev(s) will eventually support FM audio routing for their own CM FM app, and then my app should work exactly the same for audio routing.

Can you ask the CM dev(s) if they might be supporting the CM FM app ? Or at least if they might support the audio library stuff so my app will run better ? (The first question may be more "politically correct".)

I've had some thoughts in the past about how to work around such issues, but it hasn't been much of a problem so far. I can reconsider and test some ideas, but I have other neglected features needing attention right now.

The media button support in my app should allow easier pause/play with an earphone cable with a pause button. It also seems to work with the lockscreen controls on some ROMs like CM.

Media button support is no longer in the free app, but exclusive to the unlocked app now.
[Spirit FM] mikereidis:
September 22: REMOVED

This is a testing version with a few risky changes, so you may want to avoid this one if the app is working OK for you.

There are several minor enhancements, fixes and cosmetic changes. Also, more functions are now exclusive to the unlocked app.

This may enable UART mode on some devices, such as Dell Streak.

EDIT: One report from a Dell Streak and many problems were seen.
[Spirit FM] falan:
:( No work

I attached a adb file commad, is it right?
[Spirit FM] veenone:
Hi Mike,

The output sound still broken for me, btw I'm still using the update on 18 Sept.

Regarding the headphone, my headphone has 3 pins, unlike the earphone which has 4. But using the same headphone everything works fine on original Samsung's ROM
[Spirit FM] mikereidis:
Thanks. You got the commands right.

I'll add some enhancements to my ssd utility and perhaps we can try again tomorrow.

Re: Galaxy S2 on MIUI 1.9.9 with no audio.
[Spirit FM] mikereidis:
OK, thanks, I'll run some more tests myself.

Re: Galaxy S on MIUI 1.9.9 with occasional broken audio output after FM.
[Spirit FM] ombranera:
now works on MIUI 1.9.16 with galaxy s? because also in CM7 now works radio fm stock :)
[Spirit FM] mikereidis:
My tests on MIUI 1.9.9 have been good since the last Market release on Sept. 18. You must set Menu -> Settings -> Audio -> Audio Method to "GalaxyS MIUI ALSA".

Yes, the CM7 app is working better now on the latest nightlies. But my app was working OK on CM7 before they fixed the CM app.

MIUI and CM7 share the Linux/Android kernel. But my app works better on CM7 because the CM audio libraries support FM.

The MIUI audio libraries do not support FM so my app pokes the ALSA controls. This works, but has problems sometimes.
[Spirit FM] ombranera:
in fact, i set GalasyS MIUI ALSA, but not work, could be because i flash miui over the lastest cm7 nightly?
[Spirit FM] falan:
OK, I waiting!
[Spirit FM] mikereidis:
I don't think so. I flash back and forth between CM7, Galnet MIUI and MIUI US with no problem. (Except I can't I get 1.9.16 to boot.)

I've tested mostly on 1.9.9 because I couldn't get 1.9.16 to boot. I'll try the 1.9.23.

Make sure my app has SU privilege. The debug line at startup should say "Su: 1".

I find the newer MIUI method for granting SU to be cumbersome.

EDIT: I tried the 1.9.23 MIUI here: http://ienet.org/ienet.org/rom/V8-1.9.23 from this thread: http://xdaforums.com/showthread.php?t=1241509

and it seems to work OK, once I allow SU access. You have to start the SuperUser app and set Menu -> Settings -> ROOT permission to on. I'm new to MIUI and can never remember to go to Settings, and there's a "Manage Permissions" switch that I flip with no result.

After ROOT permission is on, you need to start my app and when prompted select Remember and Allow. If you don't get prompted, and my app was previously started without SU access, the easiest way to fix this is remove my app and re-install. Very cumbersome and I'm relatively new to MIUI so I don't know if there are easier ways as there are in CM or many other ROMs.
[Spirit FM] deepakbshetty:
Works on Galaxy S2 on Stock Rom ..... Doesnt work on CM 7 Nightlies ....

Sending u logs on email ....
[Spirit FM] mikereidis:
Thanks !

Did you use Audio Method "Samsung" for the stock ROM ?

Yes, I'm trying to figure out if the ALSA driver in the CM7 kernel can be poked to enable FM audio.
[Spirit FM] roofrider:
mike,

ur sep 23 version is working just fine. but even wen the media volume is set to min-0, still there is faint noise coming frm the headset/speaker.

also initially during startup there is a huge burst of volume and then attenuates,any way to avoid that?
[Spirit FM] mikereidis:
Noise or FM audio ? Does it go away if you press Mute ? I could probably do a mute when volume is 0.

Yes, I was testing last night and it blew me out of my seat ! I'll see what I can do; I should be able to fix this.
[Spirit FM] roofrider:
noise...once i reduce the vol to min using the hard volume keys,there is still noise coming..noise that u get u it's not tuned to any station.

sry..wat exactly did u mean by mute button? i pressed the pause and there was no noise..it was all paused but after that the seek is not working,really pissing wen seek doesnt work :D
[Spirit FM] mikereidis:
September 25, a new testing version: http://www.mediafire.com/file/l4g266rm69nqr0u/Spirit_FM_Radio_v110925.apk

- Fixes the high volume audio blast at startup on Galaxy 5 series (Usually.)

- Galaxy 5 series startup improved when Bluetooth is off. Be sure to set Settings -> Debug -> BCM 20780 for Galaxy 5*.

- Volume Scale can be set to 0 to turn off volume control in app. Can be useful for CM ROMs when Bluetooth is on, as it allows the CM audio library code to set volume. This prevents my app and the library code from "fighting" for volume control.

- A large number of other fixes and enhancements, including startup and error handling.
[Spirit FM] mikereidis:
Thanks.

The Sept 25 version should eliminate the loud startup volume. On my GT-I5500 I also set Audio -> Volume Scale to 10 because it's much too loud otherwise.

I hear the hissing. I think it's something in the audio library FM routing code. I can mute the FM chip, turn volume down to 0, and even turn the FM off and the hissing is still there, speaker or headset. Only Pause (aka Mute) eliminates it because it turns the FM audio path completely off.
[Spirit FM] deepakbshetty:
Yh! works on "Samsung" as well as "ALL"

Hoping to see fix on CM 7 for GS2 soon :)