yashsingh1/xdaforums huggingface dataset:
[Spirit FM] susersuser:
Dear mikereidis,

did you have any time to check streamimg FM sound output to bluetooth headset?
[Spirit FM] fratoff91:
Hi.. I've a samsung galaxy w gt i8150. Since i have updated the spirit fm light some days ago, i can't heard nothing... I had set the audio method on qdsp5v2 altern and my country (italy) yet. Can someone help me, please? I have cm9 beta 2 unofficial...

Inviato dal mio GT-I8150 cm9 usando Tapatalk 2 Pro
[Spirit FM] Lagkage:
I have one problem with Play Audiotrack. When it is enabled and Silent Loop Off is set, I can't change the volume after a little time when i turn off my screen, then I set Play Audiotrack to disable and unchecked Silent Loop Off and restarted Spirit, but then Spirit started to play in both speaker and headset. I have Debug>Galaxy S2 set to June15.

I am using an I9100 with CM10. The problem with playing in both speaker and headset only happened two times, but the problem with not could change the volume with screen off still persists.
[Spirit FM] ssauger:
Speaker/Headset Mode

Hi, first great app. I tried Oct 14 and found a issue that was not present in the September 24 version. When i switch between speaker/headset nothing happens. Have to go into settings > audio > method and hit an other audio method like automatic. Now i can switch headset/speaker mode until i close the app. On every app restart it works only after the steps i wrote above.

CM10 latest nightly I9100
[Spirit FM] tejadakenneth:
please provide a radio band from the philippines thanks :)
[Spirit FM] mikereidis:
Maybe early 2013, on devices that use digital audio and will be able to record digitally and directly.

My targets would include Galaxy S3, HTC OneX and similar higher end recent devices that I have in my test fleet.

Digital audio is not possible on most older phones.

That said, theoretically some Broadcom & TI FM chips may be able to send FM internally in a combination chip, and I may find a way to enable such a solution.

AFAICT, there is not a single stock Android phone that supports this, though the hardware may be there, and I see clues the OEMs may enable this at some time.
[Spirit FM] mikereidis:
Use World, Australia or Europe, depending on the channel spacing you need.

I will at some point reduce the bands to 5, which is all that is needed.
[Spirit FM] mikereidis:
Anyone having audio problems with the Oct 12 or 14 releases should try setting Debug-> Play Audiotrack to "Disable".

This solves some audio problems, such as background volume control, on the phones I've tested, but appears to be causing problems on some other devices.

If you have Debug-> Silent Loop set to "Enable", this will conflict with Play Audiotrack. Use only one or the other.
[Spirit FM] mikereidis:
Thanks.

Besides the Galaxy S, the only other devices that enable Silent Loop by default are GS2 and Note. Play Audiotrack is superior, so I tried that and also saw some problems, but I don't recall a volume control issue.

I'll look into it further.
[Spirit FM] mikereidis:
Changing audio method is an interesting clue.

I've finally started seeing the GS2 speaker/headset issues that many people have been reporting; it may be more of a problem with the latest ROM releases.
[Spirit FM] mikereidis:
Oct 16, also on Play: http://d-h.st/aOS

- Fix Galaxy S2 and Note no speaker problem on Oct 14 release.

- Maybe fix for Galaxy S plus GT-i9001. Please report.

Galaxy S GT-i9000: I've had at least one report of no audio or low volume on CM 9.1 stable. I couldn't reproduce in a quick test with no phone calls.

But this problem for the reporter was fixed by reverting to the previous Silent Loop method:

- Set Debug-> Play AudioTrack to "Disable".

- Check/Enable Debug-> Silent Loop.

- Restart Spirit.
[Spirit FM] claudiosala80:
Still not working for me (Samsulng S Plus). Do you want updated log?

Note: Spirit worked with my ROM, so it doesnt' seem related to the ROM
[Spirit FM] minidou-77:
Thanks for having fixe the sound on the I9100;)
[Spirit FM] mikereidis:
Yes, send a new log. Do this immediately after pressing/selecting:

- Mute

- Unmute (Same button of course)

- Speaker (Presumes you started in headset mode with speaker icon active on button.)

Also, can you confirm October 5 release works and October 12 doesn't ?

Free Oct 12: http://d-h.st/fRQ

Free Oct 5: http://d-h.st/PA6

I'm reasonably sure you're right this was broken by Spirit and not the ROM; I've had at least one other email report.

The Galaxy S+ got swept up in the fixes for Desire HD/Z etc, and I presume the "fixes" broke on the S+.
[Spirit FM] mikereidis:
Great. :)

It's unfortunate that the very large number of S2 users have suffered so many Play releases that alternately fixed and broke speaker/headset switching.

I think there are still several unusual S2 audio problems, especially with phone calls and/or removing & inserting the wired headset at certain times.

Most people have wired headset inserted as an antenna, and may use speaker or headset. A phone call comes in and while ringing or "talking" the wired headset may be removed. After the call the wired headset is re-plugged. There ends up being a lot of scenarios to test for.

At this point it's almost always true that major fixups for some device & ROM combinations inevitably break support on others. And in many cases I don't hear about problems until a new Play release has been out for 24-48 hours.

My approach at this time is to keep Spirit in a "maintenance mode" where I just try to fix bugs, without new features. (Despite things like the new not yet functional Record settings nobody has mentioned yet, LOL.)
[Spirit FM] claudiosala80:
Hello Mike.

I sent log file by mail

Before upgrade for the first time from 5 oct to 12 oct, Spirit was working.

Now, if I remove and install the version of 5 oct, still not working.

ROM is the same, but I did the operations I wrote in first post.

Thank you for your job

Claudio
[Spirit FM] minidou-77:
I've noticed it yesterday ^^

Is it any working yet ?

And will the S2 be compatible ?
[Spirit FM] mikereidis:
The parameters don't function yet, but Menu->Test->Record still works as before. I had at least one happy user when he saw I changed the defaults to good quality instead of mono 8K.

S2: I don't know. Maybe. :)

Galaxy Note has almost identical audio hardware, and Samsung officially supports recording in their FM app for the Note, but not for the GS2. AFAIK nobody has ever recorded FM on a GS2.

I've come to realize though that most phones can probably support a "poor mans'" FM record, with sufficient software.

- Method 1 is to play FM on the speaker and record from one of the microphones. Quality will likely be low, mono and containing environmental noise.

- Method 2 is to wire a special headset plug to feedback one channel to a wired headset microphone input. Quality should be better, but still mono.

Hypothetically a stereo arrangement might be possible through micro-usb jacks wired for a car dock, but nobody wants a "dongle" hanging on their phone.

Any method of FM recording may be interrupted by a phone call, or some other audio function. Heck, button click and other noises could be recorded too, or pause recording.

I will try out methods 1 and 2 this year at some point, at least.
[Spirit FM] mikereidis:
October 17, also on Play: http://d-h.st/lfR

- Fixes for Galaxy S+ & W. I hope they work now and the other improvements make up for the 3 day outage.

- Galaxy S reverted to Silent Loop method of volume control and keeping audio chip powered. The newer method using Play AudioTrack and PCM Open caused some problems on CM 9.1 stable at least.
[Spirit FM] claudiosala80:
Great work! It is working now!

Many many many thanks!
[Spirit FM] mikereidis:
:)

I'm interested to know if Galaxy S+/W or other affected users were having audio problems before Oct 14 that are resolved now.

Heck, same for any Desire HD/Z/One V other "qdsp5v2..." users. I know there were a number of nasty audio issues, but my testing indicates most are now fixed.

I get LOTS of reports when things are broken, but not so many when fixes are in.
[Spirit FM] valspats:
Hi mikereidis. First that is an excellent job your doing here. I use your free app on my SGS for half a year now and i had no problem since a recent update in my rom (costum JB). I have attached an image in this post. Do you know why is this happening? I use semaphore 2.4.0 kernel and i have enabled the radio module. I've also given spirit fm app super user permission. I used 2.4.0 kernel with the previous rom and the app was working fine.
[Spirit FM] langer hans:
Hi, on the S3 9305 (LTE) Board we were wondering if there is support in this device for FM Radio. What I can say is that it has the BCM4334 inside, but seems to lack the Silicon Labs chip the GSM SGS3 uses. Any info about it? It may be, that the FM Part ist wired up on the BCM, but I can't test this...

0_a155@android:/ # find / -name "*bcm4*"
system/bin/bcm4334.hcd
system/bin/bcm4334_murata.hcd
system/bin/bcm4334_semco.hcd
sys/devices/platform/bcm4334_bluetooth
sys/bus/platform/devices/bcm4334_bluetooth
sys/bus/platform/drivers/bcm4334_bluetooth
sys/bus/platform/drivers/bcm4334_bluetooth/bcm4334_bluetooth
sys/bus/platform/drivers/bcm4329_wlan
ind: /data: Value too large for defined data type
|u0_a155@android:/ #
[Spirit FM] mikereidis:
"FM:BC2" means Spirit is trying to use the Broadcom combo chip which can't work on SGS.

This usually happens because there is no FM driver loaded.

You said you "enabled the radio module". Does that mean there is a Semaphore app that allows checking an "FM..." setting ? It may not be working for some reason.

Does this ROM have a different default kernel ? Can you try with that ?

I can look closer if you send a debug log with Menu-> Test-> Email-> Logs and after 10-20 seconds press Send.
[Spirit FM] mikereidis:
If the Broadcom chip was antenna wired for FM, Spirit would likely just work with it, at least showing RSSI over 20. But it's never antenna wired on higher end Galaxy devices.

The latest note I added the other day to the compatibility list: GT-i9305 / 9305T may have FM hardware, but stock, un-rooted ROMs are not capable.

There's at least one person on a GT-i9305 thread who claimed FM was working for him when he used a 9300 ROM (or similar, don't try this unless you know what you're doing.)

I've had debug logs sent from stock, un-rooted Australian GT-i9305T and there was no sign of a Silicon Labs FM driver, nor the framework code to support the OEM API.

So, it's possible that loading a kernel with support for the Samsung FM driver will allow FM to be used. I certainly hope so.
[Spirit FM] valspats:
Hi again. Thanks for the answer. I found the solution to my problem. Semaphore is a custom kernel for SGS. It also has an app that manages the kernel in witch you can activate fm support module. Anyway that wasn't the problem because i use this kernel and its updates for about a year know. The problem is when you flash a google apps zip in custom roms. The old version (20120726) of google apps works fine with your app. The new one (20121011) cause this problem. I don't know way but it does. I've double checked! Thanks again for the answer.
[Spirit FM] mikereidis:
I don't see this problem.

I installed Remics-JB 3.0.1.zip.

Then I rebooted to recovery and installed gapps-jb-20121011-signed.zip.

Works for me.
[Spirit FM] simonwil:
Hi Mike. Some feedback FYI ...

Playing through the headset has stopped working for me since the latest update to Spirit Light (Oct17). It seems to ignore the headset button on the main screen and in settings. I have downloaded Spirit Free Oct5b_182 and it works fine through both speaker and headset so a recent change seems to have caused the bug.

I have the i9300 with wanamlite 4.0 (JB)
[Spirit FM] mikereidis:
Oh, wanamlite is a close to stock ROM... I've had a XXDLIB ROM on my gs3 lately.

Set Debug-> Galaxy S2 to "June 15" or "July 12", whichever works better for you. And let me know. Different ROMs have different results with the 3 sub-methods here.

The default is currently "July 27" because I think that may work best on the hordes of GS2s running custom ROMs.

Note that on some ROMs, including stock, Galaxy S* devices have a separate volume control for speaker and headset. So switching to speaker when speaker volume is 0, changes the volume to 0. In Spirit you can see the volume slider move in this case.
[Spirit FM] simonwil:
Thanks for the reply. The fix turned out to be to set the Setting->Audio->Method to Galaxy s3 ALSA (was auto).

Automatic still works on the Free Oct5 version.

Nice app - thanks for your work!
[Spirit FM] mikereidis:
I think that audio method is going to be "sub-standard".

I created it as a lower level method when CM ROMs for GS3 stopped using stock audio libraries. It has a number of known problems.
[Spirit FM] mikereidis:
For FM analog audio headset/speaker switching/enabling I am using more or less the same mechanism that the CM FM app uses. This is why it tends to work best on CM and CM derived ROMs.

But I've been finding it also works on other ROMs, such as the HTC stock ROM for the HTC Legend (or at least the Blayo ROM, derived from stock). So I think many Android device ROMs are using a common base that included an FM headset and FM speaker device. This base may be from Qualcomm who seem to be the leaders in Android audio etc. chipsets.

There are 2 "magic" APIs in the Android framework: setForceUse() and setDeviceConnectionState(). They are not normally available to regular Android apps, but via Java reflection, or perhaps the C++ libraries, they can be accessed.

I can explain further how I'm using setForceUse() and setDeviceConnectionState() if anyone wishes. Knowledge of these functions can help understand some of the audio switching customisation capabilities I recently added.

Beyond the above, I have, or have previously had some code that writes to the /sys/class/htc_accessory/fm/flag file for HTC devices, or that sends Ioctls to a /dev/msm_snd or /dev/msm_audio_ctl device. The Ioctls can be sent by the ssd utility.

If I, or anyone else, discovers the "magic incantations" to enable an FM audio path for some device, the app can be customised to do that via a binary or a script file. I provided some instructions for that perhaps a dozen pages back, and at least one person (and likely 9+ lurkers) is doing that successfully.
[Spirit FM] gugler:
on LGP500 with CM7 android offered me to force close the app at the first run, but the app run fine after that.

btw how do i record from radio station with this app? cannot find any button for doing that.
[Spirit FM] mikereidis:
Hi gugler, Thanks for your report and I'm happy to see it's now working for you. My Broadcom test phone is a P500h that mostly runs CM7, so you should see the same results I do.

Yes, if you hit a button while starting up, and the startup is taking too long, then you will likely get the dialog that allows force closing. Usually you could just select Wait. Startup might take a while if Bluetooth or the daemon or the UART mode needs to be started.

I expect to have a fix for this at some point, but for now I think you could just wait for a bit.

There used to be a record button but AFAICT most devices did not have hardware in place for this. The record feature may return in future if feasible. AFAIK there is not a single Android FM app, stock or not, that allows recording. I'd be interested to hear about any such app.
[Spirit FM] JostVice:
Hello, I tried your app on my Motorola Defy (2.1), installed correctly but no sound. Changed to Europe, speaker-headset but no change. I'm looking for a good FM radio app as the stock one is ugly :)

Also are you looking for someone that make some graphics for it? It could look prettier!

Edit: Just read the only supported chips are Broadcom and T1, Motorola defy uses WL1271 dunno which one is that :(
[Spirit FM] bucaneer:
Not working for Dell Streak StreakDroid 1.9

The app installs from the market. On starting no sound!. The streak radio app does work.

Am i missing something?
[Spirit FM] Rage2:
Install this application on the tablet Wits A81E. It is built WG7310, which includes TI WL1271.

...... no sound. :(
[Spirit FM] mikereidis:
Hi JostVice, and bucaneer and Rage2.

The v2.0.9 on the Market is best updated to v2.0.19 here: http://download664.mediafire.com/9opbwjx5exsg/72noebovkvo0hh1/FMRadio_v2019.zip

So you know, there is no supported Android API for FM radio. My app usually tries to work more or less directly with the hardware, and this sometimes works and sometimes doesn't. On most devices, SU/Root capability is required unfortunately. Thus, most devices with stock ROMs can't be supported. Exceptions include devices with a working hcitool utility and TI devices with a working btipsd_cli. If your TI devices runs btipsd, but no btipsd_cli is available, one from another device may work. The app is most likely to work on CyanogenMod (CM) or CM derived ROMs, but DOES work on several other ROMs.

The 2 most common problems are (1) It doesn't work, and (2) It works but there is no sound.

With v2.0.19 you should get a "Sorry..." dialog for (1). For (2) it should start OK and if you have a headset/antenna it should show some signal strength in upper left when tuned to a strong channel. RDS data may also work, and seeking may work (via long pressing the left/right arrows.)

With v2.0.19, after startup you should see some debug text starting with "Fm:". If you could post/pm that text it would be helpful. The "adb logcat" output may also be helpful if you know what that is.

I'll try to read about your devices to see what audio chipsets are in use and what "tricks" may be required for sound. If you could point me to source code for your device it may help. Also a listing of devices "adb shell ls -l -R /dev" and "adb shell dmesg". If you don't know what I'm talking about, don't worry about it.

Yes, the WL1271 is a TI chip and is supported.

Yes, the UI has had very little work in the last several months as I've been concentrating on bug fixes and device support. I'm now working on the UI. I don't really need any help now, but I will likely make UI customisations easier with features such as supporting an overlay image.
[Spirit FM] scoppyxda:
Hi Mike,

You know, i found out Rds working with my stock radio! I think your app waked up some sleeping function.

Dont you think you can put your app as an add on to the stock radio?

If you need it, when on pc i can send you the fm file.

Regards
[Spirit FM] mikereidis:
Hi scoppyxda,

Is this on your HTC Desire using the stock HTC app ?

Yes, my app enables the RDS power. I wouldn't be surprised if someone at HTC decided to disable this prior to "shipping" their app.

If it's just that single function, that sounds like a job for a 99 cent app. :)

I have an HTC Legend and didn't notice that with the stock HTC app, but the Legend uses a TI chip (which HTC short-changed a bit) while most phones, including the Desire, use a Broadcom chip.

I've seen there is transmitter code in the HTC app also. Perhaps if I enabled the Tx power bit... ;)

EDIT: What ROM are you running ? Stock ? Usually the stock ROM uses a proprietary BT stack that my app won't work with, so I'm somewhat curious as to how this might be working...
[Spirit FM] mikereidis:
Spirit FM Radio v11.06.12

http://www.mediafire.com/file/ahyjjazeat4xcm4/Spirit_FM_Radio_v110612.apk

I changed the version numbering scheme to reflect the date of release. Yes, June 12 was 4 days ago, but I wanted that date to be first. ;)

This version starts the UI overhaul, and is the first to feature ads. I'll try to release a new version and/or an ad remover in the next day or two.

- Headset cable media buttons are supported on Android v2.2+. Play/pause toggles mute and next and previous are volume up and down. Will be configurable for seek or next preset etc. in a future release.

- UI should look less ugly on most common resolutions and densities. It may be stretched or squished on some though. Please let me know.

- Mute/Unmute button now uses icons for pause and play. A new button for speaker/headset switching is between mute and power.

- The area above the frequency display is blank but will soon receive a "needle" frequency indicator with touch/drag capability for tuning.

- Up/Down frequency buttons now have icons for fast-forward and rewind. The Next and Previous icons are for Seek Up and Down buttons. Seek is still available via long press on the Freq Up/Down buttons, but dedicated buttons are easier.

- The APK now includes the sprtd daemon and the ssd audio hack utility. Once the app is installed, they are both in /data/data/com.mikersmicros.fm/files/. It's best to delete both old versions from /system/bin and reference /data/data/com.mikersmicros.fm/files/ssd directly from any audio customisation script.

- For several versions now, temporary files are no longer used. Any stray files on sdcard, starting with "fm" or "sprt" can be removed.

Please let me know how it works...
[Spirit FM] icke:
Thank U, mikereidis!

UI is much more comfortable for my fat fingers.:D

But I have a little issue: when I press pause butten and then play, sound don't come back. Have to press headset/speaker button twice to get sound.

But still great app!
[Spirit FM] mikereidis:
OK, thanks. That shouldn't be too hard to fix.
[Spirit FM] mikereidis:
Thanks Rage2. Which ROM ? Stock but rooted ? A pointer to the source code, if you know, would be helpful.

The /dev/snd files indicate you have an ALSA driver for audio. Perhaps if we figure out the right Ioctls or data to write to the /dev/snd/controlC0 device, we can enable audio.

I presume/hope there is a stock FM app for this device. If there is not, it's possible the analog audio is not connected anywhere. But are you getting RDS data or signal strength indication, or even seek to known stations working ? If so the antenna connection is active and audio would also more likely be connected.

EDIT: I did some reading and I guess this is a not very well known "Chinese" product. I saw absolutely no reference to FM capabilities.

But I suspect this product used a reference design, that may have included FM antenna and audio connections, despite lack of advertised or enabled FM functionality. Wolfson audio chips tend to be quality devices, so it seems strange to see it on an inexpensive product, but that is surely what the reference design they used included.

I just looked more closely at the log. The good news is that it appears your device has a standard open source Bluez Bluetooth stack that works well with the app and the daemon. The bad news is that I don't see any evidence of signal being received. Do you have a headset/earphones connected ? The cable is supposed to act as an antenna. Tune to a known strong channel and see if you see any bars of signal strength in the upper left.
[Spirit FM] hama2:
Spirit_FM_Radio_v110612

and

Version 2.0.2 of the "Spirit FM Radio"

works on CM7 Nightlys wit HTC Desire HD (ACE) fine
[Spirit FM] idkidk:
Hi Mike,

In attach logcat.

1) RSSI Value?

2) As Usual no sound, but signal go up and down (for some "strongest" station) like a blinking led... :confused:

3) UI now is more friendly, scan work! fantastic!

Good job man!

TIA

Idk
[Spirit FM] haker305:
Happy to see this app constantly getting better :).
[Spirit FM] mikereidis:
:) I have to keep running to stay ahead of the CM FM app.

There seem to be several people checking in changes to the CM app, but AFAICT they are working in "spare time" and their progress seems a bit slow.
[Spirit FM] kilador:
I have an i9000 with Cm10. Which audio method should I choose for JB?

Also, is my speaker safe if I use Spirit FM only with the headset and never with the speaker?

Thanks!
[Spirit FM] rainyguy:
Hopefully it can support Note 2 LTE one day. :)
[Spirit FM] mikereidis:
Audio method selection is automatic. Should be same as "Galaxy S ICS". A warning will popup that confirms this.

GS Speaker safety from post 3: "Avoiding use of the speaker does not help. So far, nothing is known to reduce risk."