yashsingh1/xdaforums huggingface dataset:
[Spirit FM] mikereidis:
OK. I posted a utility and instructions a few pages back that, if I recall correctly, someone with an HD2 used to get audio working. I'm too busy or I'd link it for you.

Regardless, it's just a test utility and proof this can be done. I'm hoping to get this integrated into my next app release due within a day or 2.
[Spirit FM] mikereidis:
OK, thanks. A few people have this issue and I'll try to get it fixed ASAP.
[Spirit FM] magnus48:
Testing this with Hd2 and latest miui 1.5.13

I've included hcitool and ssd to system/xbin and changed permisions for both.

ssd 1 switch on the radio

but nothing more.

With spirit swicht on is OK, but no audio and no RDS.

Which dependenies I'm missing?
[Spirit FM] CR5N:
Try ssd 4 or 5 then ssd 1. Works on hd2 running tytung nexus hd2 v2.7.
[Spirit FM] nospam:
I have the Motorola Atrix, and this is the result of hcitool command:

with bluetooth off:

# hcitool cmd 4 1

< HCI Command: ogf 0x04, ocf 0x0001, plen 0

Send failed: File descriptor in bad state

with bluetooth on:

# hcitool cmd 4 1

< HCI Command: ogf 0x04, ocf 0x0001, plen 0

> HCI Event: 0x0e plen 12

01 01 10 00 04 0C 03 04 0F 00 17 42

Will I be able to use your app on my Motorola Atrix? Thanks. :)

I apologize if this query was answered already.
[Spirit FM] david-olivier:
Thanks a lot !
[Spirit FM] marinos35:
HTC Desire

CM7 n65

Works well!!!

Only problem so far is when I plug in/out the earplugs I have no sound at all and I have to power off and on the radio for the sound to come back.

Keep up the good work!

Waiting for the recording and a nicer ui
[Spirit FM] mikereidis:
Sorry I have to go for a while without reading the thread for questions or whatever. But here it is:

FM access via HCI UART for BT stack with no HCI access.

Zip file is here:

https://docs.google.com/leaf?id=0B7...FiNWMtYmFmMzE3NGFiOTlj&hl=en&authkey=CKyX-M0L

This is very experimental. If you doubt your technical skills, please don't try this yet.

This is only for Broadcom based devices. It requires root.

Zip contains:

App: FMRadio_v2010.apk

Daemon: bcprp

Script: bcfm

Script: bcbt

It's probably best if you boot fresh with BT off.

bcprp is a drop in replacement for /system/bin/brcm_patchram_plus, but currently I'm not using it that way. It has same syntax as brcm_patchram_plus and adds "--initbaud" to be able to set initial baud rate.

Unzip contents. Check your /init.?.rc file where ? is name of your device. For example on my device it's /init.thunderg.rc. Look at the line starting with "service hciattach". On mine its:

service hciattach /system/bin/brcm_patchram_plus -d --baudrate 3000000 --patchram /system/bin/BCM4325D1_004.002.004.0218.0248.hcd --enable_hci /dev/ttyHS0

If yours actually runs the real hciattach, this approach might work. Please let me know. Take those parameters and edt them into the bcfm file, but be SURE to remove the "--enable_hci" option. If you leave it in, the bcprp acts exactly like the original brcm_patchram_plus (more or less) and will try to start bluetooth.

Repeating the above, edit bcfm as appropriate given what you saw above, WITHOUT "--enable_hci". For now, don't worry about bcbt

Install:

adb remount

adb push bcprp /system/bin/bcprp

adb push bcfm /system/bin/bcfm

adb shell chmod 777 /system/bin/bcprp

adb shell chmod 777 /system/bin/bcfm

Install the app:

adb install -r FMRadio_v2010.apk

Start the app, and hopefully after 5-20 seconds it should start and work. You will be prompted for SU to start the daemon as root.

Check adb logcat for clues if it doesn't work.

One possible issue is permissions. My CM port doesn't seem to have this issue, but I've seen it before. Possible solution:

adb shell chmod 777 /dev

adb shell chmod 777 /dev/socket

Look for /dev/socket/srv_sprt and /dev/socket/cli_sprt .

The daemon should create the former and the app the latter.
[Spirit FM] mikereidis:
Fastest way to find out is to try it. I did some quick googles and I think it has the Broadcom chip, and you have a working hcitool, so I'd bet it WOULD work.

You may have no audio though, but hopefully that could be fixed soon.
[Spirit FM] mikereidis:
Glad it works that well for you; thanks for your report ! :)

AFAIK, that's unusual the earplug re-plugging kills the audio. Does other audio work OK though ? On the 3 phones I've personally tested on, all with CM7 go to speaker when unplugging and return to headset (unless set to speaker manually) when re-plugged.
[Spirit FM] GatorRuss:
I tried it on my rooted Atrix running the latest OTA 1.8.3, deodexed running GladiAtrix 3 b.02 with Steel Blue v1.6 on top.

The app installed fine, and seemed to run fine, I was able to change stations, and change a few of the settings. I was unable to get a FM signal of any kind; I don't have any headphones on me right now, but I did have a 3.5mm jack to 3.5mm jack that is ~ 3' long, that I plugged in for a possible antenna, but the FM signal bars didn't flicker.

Hope this helps.
[Spirit FM] rollon76:
No sound, no signal on Wildfire CM7 night75
[Spirit FM] nospam:
Like GatorRuss said, the app works - able to change stations/settings but no audio (with and without headphones). HTH
[Spirit FM] marinos35:
What do you mean with other audio? When plugging/unplugging the earplugs at talk or a call or any other problem the audio switches from the one output to the other with no problems. When I try that at your program, it kills the first output but it doesn't enable the other. If I press the fm power button and reopen it, I regain the audio to the output which was already set at the android system.

Btw the other button is only for mute?
[Spirit FM] mikereidis:
OK, thanks to both of you.

If you aren't seeing some bars of signal strength in the upper left area, and there is no RDS data showing, then it seems the app is unable to see the FM chip.

I'm pretty busy so for now I'm going to have to wait until I have more time, or someone with time and expertise can try my app on this phone and figure out if it can work and what is required.
[Spirit FM] greddyrx7:
Ok whenever you can! Just don't forger us!:D
[Spirit FM] Oncet:
Spirit FM on samsung

Hello,

Did someone test spirit FM on Samsung Gaxy SII X (Hercules)? I tried it. It Installs well but no Sound at all? IS is working for someone on Samsung Hercules?

TIA
[Spirit FM] mikereidis:
There's a stock FM app, right ? And you've tried with Menu -> Settings -> Audio -> Method set to "Samsung" ?

Give me a week and I hope to have something new to test for the Samsung "Galaxy S2 family" devices, including the Note.

Can you try this Galaxy S FM widget ? :

https://market.android.com/details?id=com.demboos.galaxy.radio.widget..

If that widget works, I think it shouldn't be too hard to get my app working. If not, I just have more studying to do.
[Spirit FM] smalltownguy:
Does it work without on the Inspire without plugging in a headset? I can use the stock fm tuner with a wired headset as an antenna, but I'd prefer to use my bluetooth stereo headset, which the stock app doesn't allow. I would use it in a gym that is broadcasting its TV channels over fm, so reception shouldn't be an issue.

Thanks,

DD
[Spirit FM] Tscherno Bill:
Hi, I have a Galaxy Note with latest stock ROM and after starting the app i get the following massage:

"Error: No FM accessible"

So is the device supported? Thx!
[Spirit FM] mikereidis:
My app does not require a headset to be plugged in, but reception is much better with it. Some devices/chips are better than others with no antenna. I think the newest Broadcom chips are the best, at least the one on my super cheap Galaxy i5500 is.

Bluetooth headsets generally won't work at this time. I may be able to Bluetooth enable some devices this month, but likely mostly on newer devices with stock proprietary FM/Bluetooth stacks, if at all.
[Spirit FM] mikereidis:
Post 2000. :)

I guess your Note is un-rooted. If you root it and give my app SU, it should "work", but with no audio.

As I said in post 1995:
[Spirit FM] mikereidis:
Post 2001. :)

December was my best sales month ever, so Spirit FM lives on, for another year at least, and likely/hopefully indefinitely.

This month I hope to round out device support with stock ROM/ proprietary support that will also hopefully not require root / SU.

I also hope to design an architecture that was never really designed in the first place, it just "happened".

Maybe, hopefully, some code will be open sourced, and simultaneous, alternative apps might be possible.

Maybe, perhaps, some slight variant of the ST-Ericsson originated proposed Android FM API will be supported.

Thanks all, and welcome to 2112. ;) :) :D
[Spirit FM] tufeijoe:
Hi Mike,

I have another phone which equiped MSM7625 chip. But I don't know the FM radio chip. And your Spirit doesn't work. I'm sure it should have some chip as Official 2.2 system can make it work.

My question is how do I know the real chip it use?

And is it Tavarua but I have checked the kernel which didn't enable it on official system and FM works.

Possible BT chip is manufacturer 29 (you said is Qcom?) and possible chip is WCN2243 which said is (BT/FM) combo.
[Spirit FM] n1nj44:
Works here too with Huawei Ideos X5, but can't control volume and sound is coming only from right channel, also crashing sometimes when closing the app. ROM is CM7:)
[Spirit FM] mikereidis:
Jan 4, hoping 3rd time is the charm...

http://www.mediafire.com/file/mjxtuin66bcb5kc/Spirit_FM_Radio_v120104.apk

As before, only intended for testing TI proprietary on devices like the HTC Amaze, Legend, Tattoo or Sony Ericsson x10 mini etc.

Some essential changes were made for the Amaze and some others and there is no way Jan 2 or 3 could work. Hard to test without hardware... Manufacturers had it pretty easy compared to this, besides normal forward engineering.

Instructions are unchanged, but RDS was re-enabled for the proprietary mode:
[Spirit FM] mikereidis:
Yes, 29 is Qualcomm and WCN2243 is one of their Tavarua chips.

The only Tavarua driver I know about is the V4L driver. It should create a /dev/radio0 device, or at least a device with "radio" in the name.

Maybe the driver can be loaded with "insmod".

My app can't access a driver unless the permissions are world read/write and my app sometimes needs su to run chmod on it.

If no /dev/radio* driver exists, and the FM app works, there must be some other method.

I'd be very interested to see some logs from the device.
[Spirit FM] mikereidis:
OK, thanks for your report. At least I can gauge interest in Ideos support.
[Spirit FM] Tscherno Bill:
So the app is not working even with a rooted Note right now, as no audio = no sound = no reason to buy the app?
[Spirit FM] mikereidis:
I don't have a Note, but from the reports I've had. yes, there is no audio, but when rooted, everything else is OK. So the paid app gives working RDS for example, but still no audio. Interesting perhaps, but almost useless.

The free version is a compatibility test, except for a few things like RDS.

I'm almost 100% sure I can enable the audio, it just takes some time to figure out, usually by hours or days of reverse engineering effort. I hope to complete this in the next week or so. I will need some people to test and report. Time will tell...

Some people have been asking for this fix since shortly after the Galaxy S2 first came out, but the request and feature list is always backed up. I also try to increase efficiency by scheduling together similar items. One month I might do UI improvements. Another month, such as this month, I add a number of new proprietary FM APIs, including this Samsung one as well as various Broadcom, TI and other supports.
[Spirit FM] vlad072:
I don't understand what it is... I have during auto-tuning ranges over the whole scale just over three seconds, and therefore did not capture, and so the circle...

CM 6.5.8, dev lg optimus 1
[Spirit FM] Kess78:
Hi Mike,

I tried the new version, it works and have sound but I still have the debug info line. So does it works correctly ?

Without su permission there is no sound and RSSI is 0 :(
[Spirit FM] vlad072:
mods, delete this post please, I dont known how to do...
[Spirit FM] el_Salmon:
Hi,

What is the Audio setting for a Nexus One ROM based on AOSP, like Blandroid? I have tested all of "Cyanogen..." and "HTC", but it doesn't sound. Thanks!
[Spirit FM] vlad072:
try qsd8250
[Spirit FM] sharmy3:
As per my email (EM Logs) to you, it works great! However I notice it is not displaying RDS info (artist, song). Do I need to apply the unlock app to it for it to work?

Thanks,

---Sharmy
[Spirit FM] mikereidis:
Woohoo ! :) Third time WAS the charm... It's a huge rush when people report success, particularly on phones notably different than mine....

No, the old unlock app won't work on the latest free/test apps. I'm trying to leave RDS enabled when I test new APIs, as with this version.

Just ensure you have Settings->User Interface->RDS set to "On", but that is the default. Program Service (8 characters in middle/middle) works for me, as does Program Type (middle/right), but PI (middle left) and RadioText (low) do not.

If you or anyone else with this working on TI or BC proprietary can send me logs, that would help... Thanks !
[Spirit FM] mikereidis:
Thank you vlad072, yes "qsd8250" is the most likely to work.

Someone with a stock ROM reported here that nothing would work, including qsd8250. That is because the stock kernel seems to have no way to enable FM audio, I presume because FM was not supported at all by Google. So a different kernel may be the only way to get FM audio if you stick with a stock/AOSP ROM.

He apparently used an Oxygen kernel and I think he switched to the OxygeN1Mod ROM. I think this kernel might also work: http://xdaforums.com/showthread.php?t=693375

See this for a summary of the emails we exchanged: http://xdaforums.com/showpost.php?p=19109600&postcount=1571
[Spirit FM] mikereidis:
You start a seek and it doesn't stop ? This started happening with a new version ?

Usually that only happens if you have no headset plugged in for an antenna,

Make sure you haven't accidentally enabled Settings->Debug->BC 20780/4330. It should be OFF and NOT checked.

Clearing the app data or un-installing and re-installing may help if this is a settings issue.

If it persists, please send me a log with Menu->Help->EM Logs immediately after seeing the problem for the 3 second loop, and put "vlad072" in the message text before pressing Send. Thanks !
[Spirit FM] mikereidis:
I'd REALLY like to see this working on Sony Ericsson devices, so thanks for trying. Please send me a log.

The SE FM app I've seen clearly indicates their use of the TI stack has some very important differences.

The debug info line indicates the TI Proprietary mode didn't work, so it went to one of the normal, old modes. I'll have to change this so it clearly shows "TI Proprietary".

Sound is still done more or less as before so I think SU is still needed, at least for now. I can't imagine why no SU would give RSSI problems, assuming other things work.
[Spirit FM] sharmy3:
Alright.

I show that RDS is set to "On". On the main screen of the app just says "8chars!" showing in the middle. I tried several stations that I know has RDS capabilities. Nada. It just gives me dumb looks showing "8chars!" instead. LOL

Thanks again, Mike!

---Sharmy

---------- Post added at 03:23 PM ---------- Previous post was at 03:18 PM ----------

In addition to that, I notice when Spirit FM app is running, it should show up on the notification bar on top. It didn't. Is that normal?

Thanks,

---Sharmy
[Spirit FM] vlad072:
>You start a seek and it doesn't stop ? This started happening with a new version ?

<yes, search runs around

>Usually that only happens if you have no headset plugged in for an antenna,

<yes, headset is plugged

>Make sure you haven't accidentally enabled Settings->Debug->BC 20780/4330. It should be OFF and NOT checked

<all checkboxes in debug sets is uncheked

>Clearing the app data or un-installing and re-installing may help if this is a settings issue.

<none of this helps

I do not understand how to attach a log to a forum, so sent it to my mail

p.s. SFM app december 13th
[Spirit FM] tufeijoe:
The bad thing is I don't have /dev/radio0 or related. So it must using something else and that's why I saw strange device ttySrvChn1 before.

Anyway, here's the logcat.
[Spirit FM] Quinny899:
I'm using BeatMod ice cream sandwich on my Desire HD. We get connection to the FM chip, but no audio :(

I'll send you the logs
[Spirit FM] j0hn83:
hi there Mike. I'm running a HTC Hero (GSM) aslso known as HTC G2 Touch. I'm running elelinux rom from here. Its a customized CM7 based rom.

Basically it detects the radio, and has full signal strength, but no sound. I have went through the whole list, trying all the audio settings, but with no luck.

i "think" I've sent EM Logs. Please advise if there's anything you need from me. I'd be more than happy to pay for your app if it works on my phone, as the HTC G2 touch wasn't even advertised as having an FM radio. A few £ to enable HARDWARE is a bargain to be honest.
[Spirit FM] mikereidis:
Normal for the free version.

As for RDS, there must be something else needed for the Amaze proprietary HTC/TI API; I'll try to figure that out.
[Spirit FM] Quinny899:
About to test the new version of BeatMod ics with your app. See how it goes and fire some logs at your inbox (and probably miss, I am crap at throwing things XD)
[Spirit FM] mikereidis:
It looks like you are correct.

There are messages there from "ServiceChannel" and I think it's higher layer TtyServiceSwitch. This line looks like an open:

E/ServiceChannel( 373): yanjunwei: fd = 30, mTtyDir = /dev/ttySrvChn1

And you can see lines like "java.lang.IllegalStateException: success" which shows a calling stack from the FM stuff to ServiceChannel.

A google on "ttySrvChn1" only links to this thread but a google on "ServiceChannel huawei" links here: http://xdaforums.com/showthread.php?t=1001132&page=102 where around June MajesticTouch said:

Unless this is a new way to control a common chip via Bluetooth/HCI, then it's something I've never seen before, and would likely require a new reverse engineering effort for this new API.

I say a common chip (like Broadcom) only because it's possible (but unlikely) to ignore FM built into the main SOC and use external capability. If it's a dedicated Qualcomm FM chip then that is unlikely, but Qualcomm has a main SOC with this Tavarua stuff.
[Spirit FM] crestofawave:
Hello!

I have a question on how to get audio to work. I'm into tech stuff but my experience with android is only about a month. My phone is a Desire Z running the Virtuous Quattro ICS ROM which I flashed today. A user that ran the same ROM did get spirit to work on his device, so I thought "Hey it should work for me as well?"

I tried to use it, did configure all I could and I was able to get a signal (1-2 bars from 35 to 50 at max) plus RDS. However, I get no audio. I tried the all of the cyanogenmod methods, HTC, the ones for my CPU, and even ones that were not for my CPU. More specifically, upon testing the qdsp5v2 (which someone reported it'd work on his dz/g2) it "restarted".

I should also denote that the broadcom option from debug was something I did not change, seeing as my phone "restarted" it discouraged me from further messing with anything I had not already tested. (lol) ADB was running when this happened, but sadly, I started it again right afterwards, so I doubt that any info that would enlighten on the subject is there.

So the question is obviously, what steps should I take to make this work? I'd prefer some pointers/directions (from the safest to the most dangerous settings) on the matter before I do anything stupid and potentially break my phone. I am also using DSP Manager, don't know if it's relevant but just incase.

Thanks in advance for reading this, and please excuse my noob-ness!
[Spirit FM] mikereidis:
You tried qsd8250 right ? Mediaserver probably steals it by keeping it open for itself and I've found no backdoor yet.

All the FM audio problems that were solved on some Android 2.x ROMs will have to be fixed again for Android 4.x ICS ROMs, in pretty much the same way. The ROM developers are in the proper and best position to do this, and/or at least to provide the information about how an FM app might enable an FM audio path.

The problem is that ICS ROMs are generally from the AOSP code and Google ignores/disable FM capabilities.
[Spirit FM] mikereidis:
I believe I've had success reports on the Hero. Can I presume there's no CM FM app on your ROM ?

Are there other CM ROMs for your device and do you know if they have a CM FM app ? If so the elelinux ROM may need to add code that was added to those other ROMs.
[Spirit FM] Quinny899:
Totally silent on 8250 :(
[Spirit FM] mikereidis:
Hi, it's highly unlikely we will break anything.

Setting audio method to qdsp5v2 is all we need to do, but I guess we need to find out how to do that without rebooting your phone. :)

Can you remove and re-install the app and leave it at defaults, then send me logs ?

For sending the logs, select Menu->Help->EM Logs, and after a few seconds enter "Desire Z ICS" in the email text and press Send. Thanks !
[Spirit FM] crestofawave:
Sure thing, I'm on it.

Edit: Removed, Installed, Restarted, then sent the logs. The email should be there.
[Spirit FM] mikereidis:
From email:

(If my response is non-trivial, or the issues are of general interest, I share publicly, but don't identify the person.)

Great ! Thanks for your report and all your thoughts.

10 seconds is excessive. It's around 1 second or less on my cheapest $80 Samsung i5500 phone with CM7, and about 2 seconds on my LG P500 with a stock derived ROM (slower than I expected actually).

Can you send me logs immediately after these 10 second page changes ? Press Menu->Email Logs and after a few seconds enter LG Chat in the text and press Send.

No, the help hasn't been updated, and the UI stuff is "advanced" and subject to change anyway and almost nobody is using it yet.

The best documentation at this time is here: http://xdaforums.com/showpost.php?p=19332582&postcount=1611 Note that you have to enable "Custom Elements" under Settings->User Interface to enable this.

Yes, auto preset will be added at some point.

Recording is something I'd like to see in the next 6 months, but it will require an unknown amount of work, and will never work on all phones my app can run on. Older and less expensive phones are unable to record FM due to lack of needed hardware. I had a record feature around April but it didn't seem to work on any phones at that point.

I agree, I've thought of that. Only one of my test phones, the HTC Legend, support 3 buttons. The other 3, including the much nicer Galaxy S, only have 1 button.

Currently Prev and Next do seek down and up, but I'd like to add previous and next preset. The single button could be configured to do the same as a Next button would (once I add the code).

I've also had thoughts that pressing the single button and holding it for more than 1-2 seconds, could change the mode of that button. So you could switch between pause control, volume control, seek control and next preset control.

The text size can be customised with the UI features, but there are some downsides to using those features. I can add a dedicated text size option at some point.

I don't provide options to turn off the frequency or volume graphics, but I can.

Under Settings->User Interface you can disable some of the button lines, such as "Frequency Buttons 1 & 2". The first is for the seek and frequency set/display button, while the 2nd is for the frequency up/down and debug button. After changing these you must at least press Back from the app, and return to the app to restart the UI.

Wonderful... I usually edit out the "great app" parts, but figured I'd leave them in for once. :)