yashsingh1/xdaforums huggingface dataset:
[Spirit FM] mikereidis:
What code & from where are you trying to build ?

android.hardware.fmradio is for/from Qualcomm code such as this: https://www.codeaurora.org/cgit/ext...java/android/hardware/fmradio/FmReceiver.java

But FmReceiver.OnScanListener is for/from the ST-Ericsson proposed FM API (com.stericsson.hardware.fm.FmReceiver) such as this: https://android-review.googlesource.com/#/c/20507/

The 2 are different APIs.
[Spirit FM] mikereidis:
Your question is unclear.

Weak signals may result in lower volume, especially on some FM chips and phones.

For best signal, use a longer headset cable, stretch it out, and arrange for best signal via RSSI or audio quality.
[Spirit FM] Tfranc:
I´m having the same problem, dont you have all the project available ?

Best regards
[Spirit FM] Mysterion1:
Hi! I tested Spirit FM on my LG P880 Optimus 4X HD and the FM Radio now finally works! Thanks for that!

But: the audio is VERY loud, even on a low volume level. When I lower the volume too much the radio sound is combined with a strange noise. When I lower the volume more, there is just that noise.
[Spirit FM] jr_718:
Anyway this will work for note 3 sm-N900V
[Spirit FM] mikereidis:
Somebody else figured out the basics of FM audio on this phone and I integrated that into Spirit.

But I don't have a P880, and don't expect to get one, so I can't support it properly.

Audio may SEEM deceptively simple: On, Off, Speaker. But FM audio specifics have been half of my work for a while now.
[Spirit FM] mikereidis:
No comprendo.
[Spirit FM] aavvaallooss:
I think that maybe he is asking for source code or something like that.

Hablas español???
[Spirit FM] Tfranc:
hello,

Yes i´m asking for the source code if its possible.

Best Regards
[Spirit FM] Mardon:
I think you wont get the spiritfm sources. Because of the paid version.

Gesendet von meinem GT-S5830 mit Tapatalk
[Spirit FM] Tfranc:
Source Code

Hi,

Yes, im asking for the source code if its possible. Because im doing a project for my school and ill need to use the radio of the tablet.

Best regards
[Spirit FM] mikereidis:
Which tablet ?

The only known tablet over 6 inches that Spirit or Spirit2 will work on is the Sony Xperia Tablet Z or very similar. FM is not possible on most tablets, and the others are usually Mediatek chip based, which I don't support (at present.)

See next post about source.
[Spirit FM] Tfranc:
spirits fm

Sorry for the question, but do you have any date to release the source code of spirits fm2? Because i´ve some hurry to make this app, because i need to deliver it until november.

Or if you can give me some help to create a realy simple app using the RDS of the tablet, like it is used with spirits FM

Best regards
[Spirit FM] JustArchi:
Mike, if you decide to create a repo, which is possible to add to CM manifests and build from source then it would be more than awesome. I'll be happy to include it as built-in in my CM rom :).

Looking forward to Spirit2, with sources or without.
[Spirit FM] radioing:
SG4 FM radio

Looking in the GT-I9500 service manual I have to confirm that the FM radio implemented in BCM4335 is not used. The BCM4335 (IC U803) FM_RFIN (G9), FM_DAC_OUT1 (A5), and FM_DAC_OUT2 (A6) pins are not connected to anywhere and only Bluetooth and WiFi subsections are used. Besides, I haven't found any other chip for FM radio in GT-I9500.

I'm sorry for bad news :(
[Spirit FM] cajunflavoredbob:
Hey Mike. I just pulled the trigger on a Sony Z1 c6903. Saw it for a good price and couldn't pass it up. It's got FM built in with a stock app. I didn't see it specifically listed, but I assume it wouldn't be far off from the Xperia Z/ZL. I guess if nothing else, I'll see how well it works tomorrow afternoon when it arrives. It'll be great to be able to finally use Spirit daily again. I've really been missing having FM on my phone...
[Spirit FM] kitrax59:
Not really sure but was just reading. Post #6721 :)
[Spirit FM] Tfranc:
tablet

Yes, the app Spirit works perfectly in my tablet, and that´s why i was asking for it
[Spirit FM] mikereidis:
I'm guessing I will.

I've never put up a Github or other repo before, but can learn, and presume I'll be steered the right way if needed. :)
[Spirit FM] mikereidis:
Thanks for checking the schematic, but I wrote off FM capability as soon as a few people sent debug logs showing bad RSSI values.

The audio output pins aren't too important I think. AFAICT, digital FM audio can share the same audio data path as Bluetooth digital audio.

Grounding or disconnecting the FM antenna pins(s) (FM_RFIN) is the common, normal way that FM is disabled in hardware.

Schematics can, and sometimes do lie, especially when there are some phone variants that support FM while others don't, such as for different variants of the Optimus G/Nexus 4. Negative or 0 RSSI values tend to be the clincher, when everything else seems to work otherwise.
[Spirit FM] JustArchi:
It's hard on start but then it's really easy to keep going.

https://github.com/JustArchi/android_packages_apps_Calculator

An example of such ready-to-add repo to local manifest.

If you had any questions regarding github, I'll be pleased to help :).
[Spirit FM] mikereidis:
Yes, I think the Xperia Z1 works fine, and with digital audio on stock rooted and AOSP ROMs.

And Spirit2 should support it, since it uses Qualcomm FM and audio.
[Spirit FM] cajunflavoredbob:
Now I'm even more anxious to get the mail tomorrow.
[Spirit FM] Kess78:
Hi,

Here are the source of a very very basic test FM app I created some times ago. It just initialize the FM and you can scan down and up. I am never been able to make RDS works but I think it's because Im not experienced enough in development. You will have no audio because the way to activate it is diferent from my device.

I also suggest you to take a look at the open source cyanogenmod FM app for sony 2012/2013. You should find everything you need there.

Regards
[Spirit FM] Eddie Dickens:
I've tried to install Spirit FM from the German playstore on my Sony tablet Z SGP321, but playstore says that Spirit FM is not compatible...

Is it possible to install the app from another source?
[Spirit FM] cajunflavoredbob:
Z1 c6903 works right away with Unlocked. Hopefully custom ROMs play nice too.
[Spirit FM] Tfranc:
Hi

First of all, thanks for the help:

But i still have problems, it gives error when i open the app, after installing with eclipse

Best regards
[Spirit FM] GreenGrassnHighTides:
Any Success on the LG G2?

Has anyone got this to work on the AT&T LG G2 (D800, rooted)? When attempting to start the 918fr version, I get the following error message:

_________________________

!Power Error!

SU:2 Fm:QCV Su:1 Bt:0 Ht:0

Mo:V4D

_________________________

I haven't messed with any settings and am in North America (my band is set as such).

I can provide additional information if necessary.
[Spirit FM] mikereidis:
I've enabled it now, thanks for your request.

Google currently has it listed under "Unknown" instead of "Sony" so I disabled it in one of my regular sweeps for new devices.
[Spirit FM] mikereidis:
Yes. :)

When rooted, every device with an antenna connected Qualcomm FM/combo chip works fine in digital or non-digital audio modes.

That's because all devices with Qualcomm FM/combo chip also (must ?) use a Qualcomm audio chip and the generation we've seen for the last 2 years are all the same or compatible.

It's a great chip combo from my point of view, and every Sony phone from the last year uses it.

But I'm sad that this combo is only about 4% of my sales, about 3% via HTC and 1% via Sony.

Samsung Silicon Labs chips lead at around 65% of sales, and most of the rest are Broadcom, and every phone OEM hooks their Broadcom chips to random audio chips in random ways.

The Qualcomm chips did reasonably well this year, but the big devices sellers, like Nexus 4 and 7, don't support FM.
[Spirit FM] mikereidis:
No FM app on US versions of G2, right ?

Spirit "works" on International G2, but without audio, unless you run it simultaneously with the stock FM app.

I built a test version of Spirit that should have enabled audio, but it didn't work.

Is the US version very different in circuitry ? Your error message, and one I've been sent before, indicate a Qualcomm FM chip and API. But the International G2 uses a Broadcom chip for FM.

You could try setting Menu-> Settings-> Debug-> FM Chip to "BCM 433x/207xx" and restart Spirit.

But if there is no stock FM app, I think our chances are small.
[Spirit FM] GreenGrassnHighTides:
I set the fm chip to BCM and restarted, different result now:

The text between the tuner display and buttons reads FM:BC OEM, no error messages. There is no output of sound and the connectivity (?) numbers n the top left range between -16 and 111.

I assume this is the end of the line. That's a bit of a shame since I remember seeing a shipping list somewhere that said the G2 was coming with fm+rds.
[Spirit FM] Eddie Dickens:
Thank you!

Now i was able to download and it works on my SGP321 :)

One question... whats about the upgrade of Spirit2??

Gesendet von meinem SGP321 mit Tapatalk 4
[Spirit FM] cajunflavoredbob:
Where the heck is your donate link?
[Spirit FM] noualit:
No FM over bluethoot gt-s5570(cnm7.2.0)

Hi, testerday I purchase SpiritFM Unlocked, the app work with the default setting on my Samsung Mini (GT-S5570) with CNM 7.2.0.tass (custom room) but I can't ear when connected with stereo headphones over bluethoot. Help please. Thank you very much.
[Spirit FM] bigbop:
Hi Mike,

Saw this on HN (Hacker News) and thought you might find it useful.

https://www.atlassian.com/git

Cheers.
[Spirit FM] mikereidis:
The same was said about the Optimus G supporting FM before it was released. But it appears only a small fraction ever did, and only many months after initial release.

Yes, end of the line I think. No audio is a solvable problem, but negative, 0 or jumping RSSI values indicates the FM chip antenna pin is disabled.

Somebody with an International G2 with stock FM was able to see good RSSI and RDS from Spirit, though I wasn't able to get audio working, after reverse engineering the stock app audio stuff.
[Spirit FM] mikereidis:
Post # 7000. :)

Great ! Thanks for your purchase. :)

I'd guess you don't see the audio wave and frequency analysis visualization if on stock unrooted ROM, but that should be fixed in Spirit2 now that I've realized the cause.

I've always said, for over a year now, that Spirit2 will be a free upgrade to anyone who wants it.

IE I just cancel the Spirit Unlocked purchase, if requested, which I do at anytime on request anyway, even going back years. Then Spirit2 can be bought at any time. I do the same to upgrade Light version users.

I will ask, but won't enforce, people to consider a new purchase if they feel generous / thankful or if they've had a lot of use of Spirit, especially for years now, and especially if they bought it much cheaper than the current price.
[Spirit FM] Eddie Dickens:
Thank you for your answer... :)

Gesendet von meinem SGP321 mit Tapatalk 4
[Spirit FM] mikereidis:
Anyone who feels generous, and wants to send a "tip" can send via Paypal to my email mikereidis@gmail.com . One guy in Singapore did so for $100. :)

I had a donate link between the start of this thread and about July 2011 when I created the current Spirit Unlocked (Unlocker then) as a paid app on Play.

It was nice to get about 5 donations of about $20 each then, but you can't live on $100 every 3-4 months. As a paid app on Play I ended up with about $100 per month as a base, moving slowly up to $200-300 per month towards end of 2011.

After deciding that going "commercial" was the only way to keep Spirit as a full time occupation, I decided that the concept of "donation" was incompatible with "commercial".

"Donation" is a misnomer anyway. The taxmen rightly consider it income. Software development is not really a tax exempt charity in cases like this.
[Spirit FM] mikereidis:
Most phones, and almost all older/less expensive phones, are not capable of digital FM audio features like FM over Bluetooth.

These features are pretty much limited to rooted Galaxy S class, rooted Qualcomm FM, and stock Sony 2012+ devices.

Email me if you wish your order cancelled.
[Spirit FM] mikereidis:
Great !

From your report however I think it may be somewhat unstable and luck and good timing is required.

Weak signal is something I've noticed when certain instability errors are occurring. The tuner "bouncing around" also sounds like instability, although I'm not sure exactly what you mean. I've seen seeks acting strange during the TI problem, and the "adb logcat" is full of errors (non RDS).

I would guess that manually entering frequencies, by tapping the frequency display (eg 101.1) would be easier than using the graphic controls.
[Spirit FM] mikereidis:
Great ! Thanks !

I'd ask where to get fm_radio.rar, but a bit of searching turns up info on a fm_hcitool_speaker utility: Eg. http://android.modaco.com/topic/318792-how-to-tune-a-fm-radio-station/page__st__3

Apparently you rename fm_hcitool_speaker to fm_hcitool then I'd guess you run:

fm_hcitool 9 <something?>

to set the audio path.

I could provide details on how to integrate a utility like this into my app. But it'd be better to determine what it does and put the needed code directly into my app.
[Spirit FM] SaurusX:
Exactly.

Ah. I didn't realize that I could tap the frequency and manually enter a number. Trying to use the graphical tuner dial results in the tuned freq bouncing around the dial quite a bit, though the actual station doesn't change. For example, I'll tap 101.5 on the dial and it'll change to that, but the displayed frequency will alternate all over the map, but generally stay around 101.5. Trying to set a preset in that condition requires perfect timing of your tap so that 101.5 is displayed just at that moment.

I can hear the station, but only through lots of distortion, which isn't there on the stock Moto app. Unstable for sure.

As a side note, instead of radio station information, below the graphical tuner is the following:

"Fm:TI Sh:1 Bt:1 Ht:1 H2:0 Mo:TIH SD Hv:4 Ma:13 TI"
[Spirit FM] TeutonicWolf:
Thanks! but better careful or you'll set a dangerous precedent for great service! :D

BTW: Do you have a donate button? I don't see one in my browser session for XDA
[Spirit FM] ghiki:
I also, only on 1st "screen" (after opening the app) [obviously with different values since I have one of the 518 HTC Desire's xD]
[Spirit FM] Kess78:
Thanks for the reply.

My phone is a X10 Mini and not the big X10 and officialy the big X10 doesn't have FM Radio I don't know if your app work on it.

I tried to delete hcitool (you posted the commands few pages before) but there is no such file in directory... Without root your app say there is no comptatible FM chip. I'm not on a CM ROM now I am going to switch to see if it works.

EDIT : I have something named hciattach in /bin : hciattach - HCI UART driver initialization utility

Usage:

hciattach [-n] [-p] [-b] [-t timeout] [-s initial_speed] <tty> <type | i

d> [speed] [flow|noflow] [bdaddr]

hciattach -l

Hope you will fix this issue I already love your app !

I attached a screenshot of the SE app if you need some inspiration for the UI (You can scroll horizontally).Microsoft
[Spirit FM] ghiki:
Hm,I think the HTCs FMRADIO UI is a bit prettier than SE's -and more clear-

Also you've pretty UI there (with PSDs), with some modifications would be nice:

http://bharathp666.deviantart.com/art/Android-FM-Radio-175413593
[Spirit FM] cedarman:
dell streak radio

these are the programs that need to be loaded before spirit , any one will do , and one only

fm_hcitool needs to be in xbin

more here : http://android.modaco.com/topic/318792-how-to-tune-a-fm-radio-station/page__st__3
[Spirit FM] mikereidis:
:)

I need SOME "edge" (advantage(s)) to get people to become customers given that it's always possible to crack pay apps, AND I decided to thus use minimal protection (another edge).

I used to have a donate button but disabled it because I felt it conflicted with my commercial goals. And now I'm effectively removing RDS from the free app (after trial) so I figured there would be less goodwill. There will always be a free version though.

But given all the above, if you or anyone still wants to donate my paypal / email address isn't difficult to figure out I think, but I'll PM it to you to avoid spam issues. Thanks !
[Spirit FM] mikereidis:
I made it a button at one point, so it was easier to see it was tappable. But I don't think it looked good like that. Perhaps with a different button style or color scheme....
[Spirit FM] mikereidis:
SE app looks cool, thanks...

You may have a proprietary Texas Instruments Bluetooth stack which doesn't support the open source Bluez hcitool.

If this is true, and copying an hcitool from elsewhere doesn't work, then we might be stuck, for now at least. I haven't added HCI UART support for TI chips as I have for Broadcom, but I could do so given time.

hciattach is used to start the BT stack. The CM ROMs always use the open source Bluez BT stack, AFAIK, and this is one of the many reasons why it's so superior to stock ROMs.

Reading your prior posts I'm not exactly sure how well things are working for you, but I get the impression my app works at least a bit ? If so then you have the Bluez BT stack and could copy an hcitool from another device; I could send you one or point you to one to download. Can you post exactly the debug info that starts with "FM:" when you start my app ?
[Spirit FM] mikereidis:
If you haven't noticed, that's where I got the current icon for my app... :)
[Spirit FM] Kess78:
The debug info : Fm:TI Sh:1 Su:1 Bt:1 Ht:0 H2:0 Mo:TIH SD Hv:4 Ma:13 TI

Yes your app work a bit I have RDS but no sound and sound but no RDS when I lunch the stock app before.

I'm ok to try copy a hcitool and other things you want but I don't think I'll switch to CM as it is not officially suported by my phone (bootloader locked and lots of bugs)
[Spirit FM] _wyrm:
Not a good idea, BlueZ lacks the support to the format of HCI SCO packets used by BCM chips. I tried it here and all i got was a flood of kernel error messages.

Also, for fm you want something like 1.536 Mhz of audio bandwidth, considerably more than the 128Khz for SCO audio. The device would a need a fast UART for it to work.

It will require some gnireenigne magic. Broadcom doesn't support (doesn't want to support) FM audio through the PCM/SCO port. I figured a way to hack the chip to support it.

My hack enables any hardware which supports normal BT SCO audio to also support FM Audio.

If you are curious, BCM4329 has 256KB ROM, 56KB RAM, and runs ThreadX RTOS.

md5sum: 2cddb787df950bd7ce9ba395b0da4481 bcm4329-rom.bin

Unfortunately, as Mike's app is commercial/closed source, i can't contribute the hci commands to make it work. You guys will need to wait until we release our GPL Kernel driver. :D
[Spirit FM] mikereidis:
v July 14:

http://www.mediafire.com/file/dtw5c2st33i2v42/Spirit_FM_Radio_v110714.apk

- Orientation config support was disabled at the last minute due to unexpected issues. :(

- Fixed Texas Instruments "instability" problem when external hcitool command is run, such as on CM ROMs when volume changed or speaker/headset toggled. Hopefully this fix will help resolve the Motorola etc. problems.

- For Motorola, Dell etc, added "fm_hcitool" Audio Method. Runs "fm_hcitool 9 1" for headset or "fm_hcitool 9 2" for speaker. May be very similar to qsd8250 method (/dev/msm_audio_ctl).

- App messages are clearer that app is in 7 day trial mode, and not unlocked. Twenty (20) seconds after RadioText update, RT is replaced with promotional message and PT displays "RDS+ trial".
[Spirit FM] mikereidis:
OK, thanks. The hcitool install we could try later if needed. Can you try the July 14 version I just uploaded to mediafire at URL in above post ? It fixes the problems on my Legend and I think should help enable other TI based devices.
[Spirit FM] mikereidis:
I added an "fm_hcitool" Audio Method to the July 14 version as posted above. You need to install the utility into /system/bin or /system/xbin or similar.

Could you try that ?
[Spirit FM] mikereidis:
I changed it to a button in v July 14. If anyone has an opinion about better or worse, please let me know.

Can you try the latest ?
[Spirit FM] mikereidis:
My direct UART mode has no dependencies in BlueZ. I wasn't even sure if FM via SCO was possible, but you seem to be indicating it IS. :) But if it's a proprietary BCM protocol that's hard to figure out, that's an obstacle.

16 bit, 8 KHz sampled mono is better than no audio at all, although certainly not ideal.

Most of the BCM HCI UARTs seem to run at 3 MHz. If my code reads audio directly from the UART, is it possible to run higher than 8 KHz sample rate ?

LOL ! Took me 3 looks to parse your word. I've only gotten this far because RevEng is 1 of my specialties...

Please tell us more ! :)

:( There's a downside to closed source ?

Well there's lots for me to do while waiting; thanks !
[Spirit FM] mikereidis:
FM on CyanogenMod.

I spent at least a day over the last several days looking over the latest FM and related code on CyanogenMod. At least 4 different areas:

- App,

- Framework,

- Hardware and JNI components,

- Audio.

As always, kudos to CM for being open source (and BSD licensed to allow commercial use). MIUI is reportedly going more open, hopefully soon.

CM low level support for various things is useful for my app, and some source might be usable in my app on other ROMs.

AFAICT relatively little has been changing in the CM FM "app". There seems to be a bunch of small UI customisations for specific devices and resolutions/densities. This kinda seems like fragmentation....

There is some interesting new audio code that may imply some support for FM Record and Transmit, even via BT A2DP. But it could just be dead code derived from some vendor source.

There's some support for Silicon Labs (Samsung etc.) SI4708 and SI4709. I'm not sure if this actually works yet on any downloadable ROM.

There's seek support for TI, but it only seems enabled on the Click/Tattoo so far, with new buttons in the UI.

I see on my Legend and other TI devices that RDS power is turned on now, but there's no public code at present to do anything further. I suspect there will likely be a good bit of time before CM supports RDS, but I don't know how far along "they" might be. It was quite a bit of work for me, and is never really finished as there are always more features to add or bugs to fix.

I'll be happy to see audio and framework code added to various devices, as it will help me to support more devices also.
[Spirit FM] xhitm3n:
does it work any rom?