yashsingh1/xdaforums huggingface dataset:
[Spirit FM] mikereidis:
No, it's all good. I'm not positive, but I think the improvements you speak of require hardware mods to the phone. Beyond that I guess that using some other audio output, or reducing output volume with amp'd speakers will minimise this interference.

I just checked a few schematics and my own notes and it seems using the common/ground jack connection for FM antenna must be a defacto standard. I guess that makes sense.

This Wikipedia image seems to show the 19 KHz stereo pilot at 10% strength, while the 57 KHz RBDS is at 5%. Not sure if that's a standard but I'd guess they'd want stereo to have priority over RDS: http://en.wikipedia.org/wiki/File:RDS_vs_DirectBand_FM-spectrum2.svg

I can't afford anything expensive. I was hoping to get FM transmit out of an Android phone but AFAICT, there is no Android device that can physically support this in stock form. I tried with my Legend, and all FM registers seemed OK, but no carrier whatsoever.

For both Bluetooth A2DP, and FM testing I was thinking of getting something like this: http://www.newegg.com/Product/Product.aspx?Item=N82E16875982214

Motorola Bluetooth In-Car Speakerphone Handsfree Car Kit with Built In Digital FM Transmitter

Descriptions says "Digital FM Transmitter (no RDS)", but I wouldn't be surprised if it was a TI BT/FM combo chip, and perhaps it could be hacked.

For a decent RDS transmitter I'd prefer to get something like an eval board based on one of the FM chips I support for the sake of easy knowledge transfer. Perhaps with a Silicon Labs SI471x chip, since they don't keep the tech info so secret.

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

Got a laugh out of this from http://en.wikipedia.org/wiki/Radio_Data_System :

"Scrolling Program Service messages are illegal in the U.K.[citation needed] and expressly forbidden by the RDS standards for all countries because of the potential of distracting drivers on the road and causing problems with receiver memory stores."

And then...

"Scrolling messages are, however, widely used in mainland Europe and are common in the U.S."

But my copy of "U.S. RBDS Standard - April 1998" says about PS:

"This text may be changed as required by the station, but shall not be scrolled or flashed or altered in a manner that would be

disturbing or distracting to the viewer (i.e. not more frequently than once per minute)."

So, "disturbing or distracting" is debatable, but the "i.e." seems to clarify that, and many stations thus are non-compliant with this aspect of the standard. Not that they'd care unless someone sued them....
[Spirit FM] skatt127:
Hello, Mike.

Thank you for Spirit FM.
[Spirit FM] dancer_69:
@mikereidis

I just get a Haweii Ideos X5, which according to specifications here:

http://www.huaweidevice.com/worldwide/technicaIndex.do?method=gotoProductSupport&productId=3547&tb=0

supports fm radio. The official rom hasn't any fm application though

Is it possible to make Spirit work for this device too?

How can I find which chip has(to help you to understand if is possible)?
[Spirit FM] mikereidis:
Sure. :)

You're running Oxygen on a Desire ? And/or CyanogenMod on an HD2 ?
[Spirit FM] mikereidis:
Install the app and try it.

You should see a debug string in the middle like:

Fm:BC Sh:1 Su:1 Bt:0 Ht:0 H2:1 Mo:BCH UA Hv:4 Ma:15 BC

This post tells you how to interpret that:

http://xdaforums.com/showpost.php?p=14391233&postcount=381

Please post your results.
[Spirit FM] dancer_69:
Here is the the debug string:

Sorry, Compatible FM chip not found

Fm:?? Sh=1 Su=1 Bt=1 Ht=1 H2=0

Mo:UNK HT Hv:4 Ma:29 Ot
[Spirit FM] mikereidis:
Thanks.

So the manufacturer of your Bluetooth chip is Qualcomm. That is unusual.

Qualcomm has their own FM chip, but I'm not sure you have one. Or you might have a Silicon Labs FM chip, or no chip at all.

If you can:

- Reboot your phone,

- Start my app, and

- Select Menu -> Email Logs

I can try to see if there is any evidence of an FM chip.

"Email Logs" doesn't properly attach the debug file however. If you see this, perhaps you can retrieve and send the file:

/sdcard/sprt_debug.txt

You need a mounted and writeable SDCard of course. My email is my username here plus @gmail.com

What I'm most interested in is the outputs of:

adb shell "ls -l -R /dev"

adb shell "dmesg"

If dmesg isn't available, you could run

adb shell "cat /proc/kmsg > /sdcard/dmesg.txt"

and hit Ctrl-C after several seconds.
[Spirit FM] mikereidis:
Yes, I've found a few clues about digital audio on Broadcom chips. It would be a nice way to bypass analog audio routing issues, but it will come with it's own set of problems.

I've found the Samsung Galaxy Ace (or Cooper) GT-S5830 has the same setup as the Galaxy 5 and Mini. A CM port attempt for the Ace is rumoured but not confirmed.

The service manual for the Ace shows the same block diagrams. The I2S is shown not connected, and usually the PCM port is reserved for Bluetooth. If the schematic is correct I think FM must be analog.

I can't find any info on MAX8899. I've sent a request to Maxim ICs for info.

Looking at the Samsung kernel sources for the Galaxy 5, it appears the EXTAMP commands are sent via SMD RPC just like snd_set_device etc.

I'm starting to think the target of the RPC is the baseband processor which controls audio routing via I2C or something to the MAX8899. This keeps the end control code away from the GPL Linux code, and I'd guess it may have Qualcomm code they will never release.
[Spirit FM] psyke83:
Mike & sfortier,

First of all, in v1.1hotfix2 I have upgraded the version of brcm_patchram_plus against the latest vanilla upstream source (as the CyanogenMod version is 4-5 revisions behind): http://android.git.kernel.org/?p=pl...62e134fd9564cfb027b71c20;hb=refs/heads/master

I modified the hciattach service to use the new parameter, "--pcm_role slave". This should theoretically fix issues with the SCO protocol, i.e. allow headsets to function properly, but I have no BT devices to test. The newer code also fixes initialization issues (there's usually a 50% chance of Bluetooth failing to initialize on phone boot, especially when wifi is also enabled at boot - now it seems to be initializing every time). It's possible that this may also be another step towards getting the radio working.

Another resource I found that may be useful (the G5 is BCM2049 B0, but I assume the BCM2048 may be more similar to ours compared to the BCM43XX chips): http://svn.jacekowski.org/host_mode/trunk/drivers/media/radio/radio-bcm2048.c

Let's compare it to the code in CyanogenMod for the stock FM radio app (that is already enabled/used in my port): https://github.com/CyanogenMod/andr...read/core/jni/android_hardware_fm_bcm4325.cpp

I'm checking it out now, but it's far too late here and I need sleep ;).
[Spirit FM] mikereidis:
Great ! :)

AFAIR, Mono or Stereo are all the selections Qualcomm provides.

I see some sig_blend here too, but I'm not sure that's accessible without writing a new driver: https://android.googlesource.com/ke...o-3.4-jb-mr2/drivers/media/radio/radio-iris.c

If there's a proprietary V4L control, Spirit2 provides a way to access it.
[Spirit FM] updateing:
I managed to add FM into OnePlus One kernel as well. But the difference is RSSI is constantly -150 in Spirit2. No error showed up, but audio from mic is "repeated" in headphones. Is that the same as zero in Spirit1? I'm currently running CM12.1 so I can not test with Spirit1.

EDIT: I also added "qcom,iris-fm" lines in Oppo's DTSI, which is not present in http://xdaforums.com/showpost.php?p=57408010&postcount=25
[Spirit FM] ryvandal:
Quick question. I have a note 4 from TELUS.

Would spirit FM work for my phone or is the note 4 without the FM transmitter?
[Spirit FM] JustArchi:
You could really do some research and check yourself. Or even try any free Spirit APK released by Mike to find out.

I don't want to be harsh or anything, but Mike already has enough work to keep maintaining this masterpiece :).
[Spirit FM] CqN:
This is good news! Congratulations!

---------- Post added at 10:28 AM ---------- Previous post was at 09:54 AM ----------

Will this get into Mike's code automatially?
[Spirit FM] mikereidis:
Yes. :)

OTOH, I've TRIED not to be like some developers who ignore questions or say RTFM when TFM or TFFAQ does not address the specific question.

There are NO "stupid questions" and posting publicly is encouraged compared to emailing me privately.

I've faced many threads myself where 5-10 minutes of reading the first page and last few pages doesn't answer my question.
[Spirit FM] mikereidis:
No, 100% impossible.

No FM receive.

No FM transmit.

Unlocking, rooting etc. won't help.

Hacking and resoldering is 1000% impractical.

Nothing will work except getting a new phone.
[Spirit FM] mikereidis:
1+1 is 100% factory FM disabled/broken. Nothing will make it work.

More detail here: http://xdaforums.com/apps/spirit-fm/spiritfm-oneplus-one-t2866431
[Spirit FM] updateing:
I've read the thread but the experiment made there seems to be incomplete, since he didn't add FM device into device tree. I did this and got something different (don't know whether it reveals another result though)
[Spirit FM] mikereidis:
What was different ? Microphone audio or RSSI ?

Mic audio is just a side effect of an unsupportable device.

If RSSI is around 0 or negative, that usually means the FM antenna pin is grounded, or in rare cases floating. In some cases a different combo chip generation might report -150 and another 0.

What's important is seeing RSSI change more or less predictably when tuning or moving the wired headset plugged in as an antenna.

If you are able to acheive this, then something may be possible.
[Spirit FM] updateing:
Got it. I was just wondering why it was -150 rather than 0 in that thread.
[Spirit FM] shantur:
[MENTION=3575078]mikereidis[/MENTION]

Any plans for supporting old devices like Htc Sensation in Lollipop supported Spirit2?
[Spirit FM] mikereidis:
No.

But there is a beta release of Spirit1 that works on many Lollipop devices.

The Sensation is among a LARGE group of old HTC devices for which Spirit1 has some awful audio conflicts however, and that issue was never and will never be fully resolved.
[Spirit FM] shantur:
[MENTION=3575078]mikereidis[/MENTION]

Thanks.

Would you be able to release source for old devices which you don't plan to support so that anyone else can pick up.
[Spirit FM] feriber:
I've given another try to your apps two months later (i've upgraded the rom few times since) and i've found the same behaviors with both free and stock apps (both last versions).

They start playing radio, and five minutes later, the phone restarts itself.

I don't want bother you, but peharps you can have a look at these two files i have attached.

They are taken with an utility called "Bootlog Uptime" that after a crash takes "/proc/last_kmsg" so perhaps you tehy can help you can finding the issue that makes my phone reboot it self

Thank you a lot.
[Spirit FM] pt80chip:
FM Radio on LG V410

[MENTION=3575078]mikereidis[/MENTION] or anyone else who has a solution

I bought the LG V410 and rooted it. Then I bought spirit 2 in the app store which didn't work. I got a refund (within 15 minutes) and bought spirit 1. That didn't work either.

Would the radio work with a custom ROM or is this one of those devices which have the FM receiver disabled? I am looking to put a tablet in my car but don't want to forgo the FM radio, if you can recommend an inexpensive 7" tablet (up to $150) which has FM I would be open to that as well.

Thank in advance!
[Spirit FM] mikereidis:
I've released source code for Spirit2, which somebody could use to add support for any phone. It supports analog audio too.

Spirit1 source code is a horrible mess that was rushed for many years. I feel I'm doing the world a favor by NOT releasing it, and only releasing Spirit2.

Spirit2 was DESIGNED and even RE-DESIGNED for SELinux/Lollipop.

Spirit1 was hacked together as quickly as I could and re-hacked to add features and fix bugs.

If someone asks me for the code to enable audio (major magic here) in Spirit1 for some of the audio methods, I'd be happy to share it, as I've already done several times in this thread.
[Spirit FM] mikereidis:
If a major Android OEM widely sells a tablet with usable FM, I would most likely have heard about it.

So IMO no FM for V410. Email me mikereidis@gmail.com if you need an order cancelled.

The only tablets with FM I can recommend are from Sony.

I enjoy my Xperia Z2 10 inch tab, but it cost about $400 when I got it last year. I prefer the Qualcomm FM/combo chip in the original Tablet Z and Z1 tablet.

I've watched Ebay prices onTablet Z and Z1 tablet before, but felt that buying new was a better deal. It was hard to find any under $300.

You could consider a 6.4 inch Z Ultra, maybe in your price range used. I almost got one but didn't want to get a phone with little custom ROMing activity. I NEED to get the same phones that most of my customers have to test properly.

A bonus with the older Qualcomm FM/combo chip Sony Z and Z1 series is they can transmit FM too with my transmit app or a setting in Spirit2. But it's kind of a "gimmick" due to limited range and audio quality.
[Spirit FM] mesiu84:
Hi, I'm trying to run radio on GT-i9300 with no success. I've tried CM12.1 and CM11 but both don't work with Spirit v1 and v2. Has anyone some idea how to make it work? I haven't been testing it with stock ROM (the stock radio also) because I've bought this phone with CM11 installed. As I can see /dev/fmradio exist so this phone should have FM Radio. When I try open Spirit 2, I've got this:

ERROR: Tuner did not start or stop

This device may need a kernel with working FM driver.

The same message is on CM11 and CM12.1

Does anyone know how to solve this? Do I need some modified kernel? Which one if I do?

Thank you
[Spirit FM] guhvanoh:
I just tested Spirit2 on my SGS3, same model as yours, running CM12.1 from 20150531. Spirit2 runs great and I didn't have to do anything special to get it to run. My Spirit2 version is 2015_04_14. I've run both Spirit and Spirit2 on this fone since CM10. I would try reinstalling CM12.1 again and seeing whether that works.

HTH
[Spirit FM] mesiu84:
From where have you downloaded that ROM? Are you using some custom kernel or only the default CM?
[Spirit FM] mesiu84:
I've found the cm12.1 ROM but still have the same problem. In the meantime I've also found some stock ROM and installed it. When I opened the FM Radio application all looks fine, but when I turn it ON i have to wait a lot of time (about 30 sec) to get started, and even then I can't hear any sound. So it looks like some problem with FM Tuner. Did anyone have the same problem?
[Spirit FM] guhvanoh:
I use stock CM12.1 from the SGS3 thread here at xda. See the [5.1.1][Build 9][BETA][2015-05-31] CyanogenMod 12.1 for i9300 in the Galaxy S III Android Development thread.
[Spirit FM] shantur:
[MENTION=3575078]mikereidis[/MENTION]

I can try to add support for HTC Sensation ( pyramid ) in Spirit2 if you can give me code for audio (msm8660 qdsp6v2) and bcm4329 to enable FM.
[Spirit FM] Zviratko:
Z3 transmit mode?

Hi,

Spirit2 AOSP version works on my Z3 (D6603). Is there any possibility that transmit mode will work? (It doesn't seem to work for me).

Thanks
[Spirit FM] mikereidis:
No. :(

Z2 and Z3 switched to using Broadcom FM/combo chips instead of the earlier Qualcomm devices.

The Broadcom chips don't even support FM transmit any more, antenna connection or not.

I was disappointed with this aspect of my Z2 tablet; I probably would have gotten a Z or Z1 tablet instead. The upside was that it allowed me to support Z2 and Z3.

And sadly the Broadcom chip analog outputs are used; Z2 and Z3 are among the VERY few modern devices in which FM audio is still analog. Step down for Sony I think, and maybe because they were rushed to change from the Qualcomm chips they were using for years.

And I have no idea about the new Z4 or Z3+.
[Spirit FM] mikereidis:
It might take me some time, but I can try to help you, just as long as it's not going to take too much of my time.

I WANT to say the Broadcom code in Spirit2 should work on earlier Broadcom chip generations, but there ARE some differences to account for and I'd have to dig that info up.

There's also complications with the audio code, like the horrible hack of resetting the audio system completely when Spirit stops.

I'll dig up what I can when I can.

But getting Spirit2 working on an older device like that could take a LOT of effort; If I tried to do it "the right way", with testing and fixing, it could easily take me 100 hours I think.

Can you remind me of why we're talking about getting old phone support into Spirit2 ? Spirit1 should work on that device, but to get it working on Lollipop you'd need the beta I have never released beyond the Google Play beta and that means it's not free.

If I released a Lollipop compatible-(ish) free version of Spirit1 would that be good for you ? I don't recall if open source was a must for you.
[Spirit FM] mikereidis:
What versions of Spirit1 and Spirit2 are you using ? Free or paid ?

If you're a customer, please email me at mikereidis@gmail.com .

The most common problem is lack of SU/root. Go into SuperSU and ensure Spirit has SU permissions.

Custom kernels occasionally have no FM driver support, but not often.

GT-I9300 is the most popular phone in my sales statistics. I have one, as well as related GT-N7100, and they are VERY well supported.

My 9300 runs the most popular unofficial CM12.1 found here, though I'm still running the 0516 release: http://xdaforums.com/galaxy-s3/development/5-1-x-cyanogenmod-12-1-t3066864

I'm not seeing any such problems, nor is the developer of that ROM JustArchi who posted here recently and has done so several times.
[Spirit FM] shantur:
I have been developing ROMs for sensation for long and always missed fm support. As you said you are not going to support old devices I want to make sure sensation has FM support in future as well.

Also i might try implementing it in my ROMs.
[Spirit FM] JustArchi:
Yup, it should work flawlessly, and it does in my case. As long as it's installed in "normal" /data/app way everything should work like a charm.

Perhaps you forgot to enable root?

In fact, I'm not that satisfied with the state my CM is, due to nightmare exynos 4 SoC, but kernel's radio sysfs is one of the few things that should work flawlessly :D.
[Spirit FM] erwin9:
Hello, I am trying the li_141204.apk => Spirit Light to see if it is working on my device and if the paid version (Spirit 1 I guess) is good or me.

This is to listen to FM Radio while riding my moto, with a bluetooth Sena system in my helmet paired with my phone. Note: I am in Europe.

Well, one good news and one bad, but maybe I am doing someting wrong:

- it is working on my device which is a Samsung Galaxy Ace GT-S5830 (Stock ROM Android 2.3.6, and I want to stick to the stock ROM with just root, no mod)

- no sound on the bluetooth.

When starting Spirit Light, it detects bluetooth and says it will send the audio to it.

But there's no sound in my helmet speakers.

While if I get out of Spirit Light and just listens to a MP3 file for example, I do hear the music in my helmet speakers.

So either I'm doing something wrong in Spirit Light, or there's a setup I missed, or there is an incompatibility somewhere, or there's a bug ...

Any way to get this working on my phone ? Should I try a different version ?

Thank you in advance for any help.
[Spirit FM] mikereidis:
He emailed me and it appears the stock FM app on a stock derived ROM didn't work either.

It's very likely a hardware problem that can't be fixed. I have heard about 3-4 cases like this in the last 3 years, so it seems rare.

I suspect lightning, static, or a power surge damaged the FM chip. The RF front end can be sensitive to signals and damage both.
[Spirit FM] mikereidis:
Older phones use analog audio for FM, so digital features like FM audio over Bluetooth can't work.

You might consider a Sony BT headset with FM built-in, like the MW-1 I have.

Sony phones also generally support FM over Bluetooth with stock ROM and stock Sony FM app.

Spirit2 primarily supports digital audio, so any Spirit2 supported phone with do FM over Bluetooth. If you want to use an older phone, the original Galaxy S GT-I9000 can work, but I'd recommend newer/faster like GT-I9100, GT-N7000, GT-I9300 or GT-N7100.
[Spirit FM] shantur:
[MENTION=3575078]mikereidis[/MENTION]

Can you please tell me if https://github.com/mikereidis/spirit2_free/blob/master/jni/tnr/bch_hci.c#L666 hci commands are valid for bcm4329

Thanks,

Shantur
[Spirit FM] tomlemange:
I don't see any letters when I launch spirit1. Spirit2 gives me an error about no tuner api so I'm assuming spirit2 won't have any chance of working for me. I am rooted but my phone is an Asian version of the mate2 which uses a HiSilicon Kirin910 CPU whereas the NA version uses a qualcomm. When I scan channels in spirit1, the signal meter changes from channel to channel and is stopping on my local stations so it must recognize the tuner, no?
[Spirit FM] mikereidis:
Yes.

There are some differences around registers 0xfb, 0xfc and 0xfd I had to deal with, but other than that pretty much the same registers are used from BCM4325 to current BCM chips.
[Spirit FM] mikereidis:
Yes, the tuner is being recognized and works.

On MANY phones enabling FM audio is the hard part. Many phones have many different ways to do this, as seen for all the settings under Audio-> Method.
[Spirit FM] tomlemange:
So if I try all the different methods in the program, and none of them produce audio, then there is likely no hope for me?
[Spirit FM] mikereidis:
Correct. :(
[Spirit FM] tomlemange:
Blast! I do appreciate all your help though! :)
[Spirit FM] poong chin hong:
hi mike

Hi. I'm using spirit 2 On cm10.1 Galaxy pocket Neo.it says unknown device when I started the app. I tried to edit the name like s5310. But it still didn't work
[Spirit FM] mikereidis:
Hi, :)

If it doesn't work, then it doesn't work.

I have no knowledge of Neo.
[Spirit FM] gwozdziu114:
which options i need to change for run spirit1 on my galaxy s plus? (i9001) I have this ROM:

[GT-I9001][ROM][ION][5.1.1][LMY48B] CyanogenMod 12.1 by ADC-Team [Release 07/06/2015] Lollipop

on android rom's 4.x everything works fine
[Spirit FM] mikereidis:
If you are a customer, please email me at mikereidis@gmail.com .

Only customers have access to an Android 5+ compatible beta release.
[Spirit FM] hamudistan:
I,m just testing moltenmotherboard rom (pure AOSP) on my lg p880 and bought spirit2 cause spirit1 gives no sounds on this rom. Somehow the app seems to work with headphones but only as some kind of microphone. I hear me breathing and the sounds of the keys when I tap. Any way to get this working, cause I saw in this thread reports of p500 and p900 working

Gesendet von meinem SM-T520 mit Tapatalk
[Spirit FM] tomlemange:
I picked up a cheap Moto G so I could use SpiritF. Works great! I'm assuming that in order to save preset stations you need to get the paid version? When I would use the stock FM app on my Huawei Ascend Mate 2, I could switch between my presets using the inline button on my headphones, is this an option available in the paid version?
[Spirit FM] mikereidis:
Thanks for your support. :)

But email me mikereidis@gmail.com if you want it refunded.

Spirit2 will not work on P880. Spirit1 DID work somewhat on some P880 ROMs but only a few and with problems.

Hearing yourself via the microphone is a failure mode of Spirit2. It connects microphone to audio output and then "sneaks in" and switches microphone to the non-standard FM input. If the switch fails, you hear microphone.
[Spirit FM] mikereidis:
Great !

Yes, and yes.

Station switching is permanently on, not optional like on Spirit1.

If you have no presets or just one, it will seek up or down. Otherwise it switches between presets.

This can be done with wired headset media buttons, A2DP BT AVCRP headset or similar, notification shade, widget or lock-screen controls.
[Spirit FM] tomlemange:
I purchased Spirit2, is there a way to change how the buttons on my headset interact with the app? Only have volume + - and play/pause on my headset, I'd like to make the play/pause switch stations.