yashsingh1/xdaforums huggingface dataset:
[Spirit FM] canttwaittt:
When i run this app, i can only hear myself, is there anyway to solve this?
[Spirit FM] mikereidis:
Spirit2 does not work on the very different G variant: GT-I9100g.

Spirit1 generally works, but you may need a private beta release for Lollipop+. Email me mikereidis@gmail.com .
[Spirit FM] canttwaittt:
I sent you email :)
[Spirit FM] dankaren:
M8 GPE Marshmallow

I can't get FM to start on Android 6 GPE(rooted), It worked on 5.1. What do I need to do to get it working?

Thanks
[Spirit FM] dsvictor:
Does it support Galaxy note 4. SM-N910G
[Spirit FM] bcastro16:
Does this work for nexus 4 on Android M?
[Spirit FM] mikereidis:
For profit/business reasons, Google ALWAYS disables FM unfixably on every Nexus.*

*Except ancient, original Nexus One which still required a custom kernel and an app.
[Spirit FM] mikereidis:
SM-N910G FM is permanently disabled, like most Samsungs the last few years.
[Spirit FM] mikereidis:
Spirit2 latest release ?

Paid or free version ?

If GPE 6 is out I'll try it on my own M8 and see.

FM driver in kernel might be disabled, or there might be some new SELinux security setting for FM driver.
[Spirit FM] dankaren:
FREE VERSION

http://xdaforums.com/showthread.php?t=2708589
[Spirit FM] iateshaggy:
is there any work on the htc m9 being done. i'd happily pay for an app like this so i could use fm transmittion as an audio output.
[Spirit FM] mikereidis:
I tried the flashable ROM using the systemless method and SuperSU v2.56.

The lsmod shows radio_iris_transport.ko loaded.

Kernel dmesg shows:

[ 477.629593] c3 7864 iris_radio: Error while enabling RECV FM -19
[ 477.629733] c3 7864 iris_radio: __radio_hci_request, hci dev is null
[ 477.629753] c3 7864 iris_radio: Default data read failed for PHY_CFG -22

My logcat shows:

11-09 22:55:29.001 E/s2tnrqcv( 9289): chip_ctrl_set VIDIOC_S_CTRL Error id: 0x8000004 value: 1 errno: 19 (No such device)
11-09 22:55:29.001 E/s2tnrqcv( 9289): chip_imp_state_sg PRIVATE_IRIS_STATE 1 error for: 1
11-09 22:55:29.001 E/s2tnrqcv( 9289): chip_ctrl_set VIDIOC_S_CTRL Error id: 0x9b0971 value: 7 errno: 22 (Invalid argument)
11-09 22:55:29.001 E/s2tnrqcv( 9289): chip_imp_state_sg VIDIOC_G_TUNER errno: 22 (Invalid argument)

And same after setenforce 0, chmod 777 /dev/radio0, and chown 10086:10086 /dev/radio0 .

So,... Qualcomm FM kernel driver seems broken, and I'm not sure why.

Let's see how CM13 and MM kernels do on M8 and other Qualcomm FM/combo devices like MotoG 2013, Xperia Z/Z1,...
[Spirit FM] mikereidis:
I don't think the Spirit 1 and 2 receive apps even work on HTC M9, never mind the Spirit Transmit app.

The only devices with transmit are Xperia Z, Z1 and other Qualcomm FM chip devices from Sony in that era/few years.
[Spirit FM] fj45:
Spirit fm for G3

Hi, new to this forum. Pretty pissed at the world right now when I realized my new G3 doesn't have the fm function as the providers here in Canada all supply the D852. So does this spirit fm app work now on the LG G3 D852?

Jeff
[Spirit FM] skatt127:
You're right.
[Spirit FM] mikereidis:
vAugust 14:

http://www.mediafire.com/file/urhd2gcs516iimg/Spirit_FM_Radio_v110814.apk

- Hopefully audio fixes for FM_Launch audio methods on Droid X etc.

- May cause audio problems on Broadcom devices due to disabling of "Mystery Commands" to ease testing on Samsung MAX8899 devices.

On my LG P500 with BCM4325, randomly every 1 of 2 powerups results in strange buzzing or whistling noises. Power cycling generally fixes this.

- Enabled I2S on Broadcom to test.

- Miscellaneous fixes.
[Spirit FM] mikereidis:
I presume the CM FM app has the same no audio problem as my app ?

There's no new information for me in either file. I started my Broadcom support with the info in the CM/MIUI android_hardware_fm_bcm4325.cpp.

I added RDS support with the info from Nokia's radio-bcm2048.c. AFAICT these 2 and their header files are the only public information on Broadcom FM chips.

I managed to find a new file however that Wyrm and I are hoping will result in a digital audio option. AFAICT though, it will require the use of the Bluetooth PCM port on the Broadcom chip, so it won't be available for Bluetooth audio.

The vAugust 14 above disables the use of the commands that are causing some trouble on the Samsung devices. Perhaps it will also bring us closer to a fix.
[Spirit FM] HD2MAX:
Ok notify me if there is anything new, have you tried talking to supercurio?

Nothing, all the same on my p990.
[Spirit FM] xmguy:
I'm still noticing the overdrive sound. Even at low volume. It has a warble sound if you will.

To add the sound issue seems to happen much more when the signal is stronger. Maybe rf overdrive. If the signal from the station is weaker the sound is better.

Also RT and PS do not seem to update when screen is off. Even if app in view.

Logs emailed
[Spirit FM] mikereidis:
I posted a message on one of his very busy threads and sent a PM some time ago, with no response.

I believe that if his drivers are loaded in the kernel, I can send the needed commands to the audio chip.

But working "blind" is often almost impossible. I'd prefer to wait until I get a Samsung device with this chip that I can test myself.

Digital audio is another route that may produce results on many devices.
[Spirit FM] mikereidis:
In the past they always updated (at least in the memory of the service).

But it was clearly a waste of CPU and battery when nobody can see it, so I think I did the proper thing by turning RDS off when screen is off or app isn't visible.

On Android, apps are terminated when the screen is off or app is not in view. That's the way it works, and it generally makes sense I think.

Services can keep running, as mine does to deal with media buttons or volume or pausing during phone calls.

But if your goal is a quicker update of the RDS data at screen on time, I'm not sure the tradeoff of higher battery usage is worth it.

I CAN see however how someone might want to quickly turn on their screen briefly to see a song name. Perhaps in future that could be an option.
[Spirit FM] sfortier:
This file http://www.multiupload.com/QCQPLPTK54 has the registers of nokia bcm2048.c, CM bcm4325.c and G5 btld daemon strings.

There some diferences, including a I2C_FM_REG_VOLUME_CTRL(0xf8) to volume control!

Maybe this is the trick!!!
[Spirit FM] mikereidis:
On my BCM4325, reading from or writing to these high registers can cause bad things to happen.

Can you tell me where the 4 registers in the last "I" column came from ? Three of those are the only new ones to me.

Wyrm told me about register 0xF8 the other day. He said "it's a 16 bit register, volume range is 0-256, default is 256". But he's working with 4329 while I have 4325.

But when I try to write to 0xf8, I lose the station and get static. And then it seems the frequency is slowly tuned back to the station. Strange...

If you want to try, here are some commands to read/write reg 0xf8:

Read 2 byte:

hcitool cmd 3f 15 f8 1 2

I get:

01 15 FC 00 F8 01 78 66

0x6678 is 26,232 decimal

Write 2 bytes: 0x00fa= 250 decimal

hcitoo cmd 3f 15 f8 0 fa 0

Write 2 bytes: 0xfffe= 65534 decimal

hcitoo cmd 3f 15 f8 0 fe ff

Write 1 byte: 0x0080 = 128 decimal

hcitoo cmd 3f 15 f8 0 80

This is likely obvious to you, but I would not assume the registers referenced in the btld on your Galaxy 5 indicate the G5 BCM chip supports them all. Identical binaries from a single source code tree can appear on multiple platforms, just because that's easier. I'd presume though the software would adjust for chip specific capabilities.
[Spirit FM] mikereidis:
Yes. There is likely some way to reduce the gain. From the Audio chip data manual:

6.2.4 FM Radio/Auxiliary Stereo Input

"The auxiliary inputs AUXL/FML and AUXR/FMR can be used as the left and right stereo inputs,

respectively, of the FM radio. In that case (because both input amplifiers are busy), the other input

terminals are discarded and set to a high-impedance state. Both microphone amplification stages amplify

the FM radio stereo signal. Both amplification stage outputs are connected to the ADC input. The left and

right channel inputs of the FM radio can also be output through an audio output stage (mono output stage

in case of mono input FM radio, stereo output stage in case of stereo input FM radio).

"

So my guess is that the gain is set high to amplify small microphone signals. The stock FM app likely lowers that gain. There might even be some automatic gain/level control messing with things.

If you had some way to lower microphone gain before starting the FM app, we may be able to eliminate the overdrive, without setting chip volume really low.

I presume you've tried the Volume Scale option, reducing it to perhaps 10-20 from default 100 ? Perhaps that raises S/N ?

I would hope there is some driver Ioctl or AudioManager->SetParameters() function that could be called.

/dev/snd/mixer might do the trick.
[Spirit FM] dancer_69:
I sent you the sprt_debug, but I couldn't find it on my sdcard, to sent it too in case there is a problem.

I also attached here the dev and dmesg outputs.
[Spirit FM] sfortier:
Test results...

# hcitool cmd 3f 15 f8 1 2

hcitool cmd 3f 15 f8 1 2

< HCI Command: ogf 0x3f, ocf 0x0015, plen 3

F8 01 02

> HCI Event: 0x0e plen 8

01 15 FC 00 F8 01 00 01

# hcitool cmd 3f 15 f8 0 fa 0

hcitool cmd 3f 15 f8 0 fa 0

< HCI Command: ogf 0x3f, ocf 0x0015, plen 4

F8 00 FA 00

> HCI Event: 0x0e plen 6

01 15 FC 00 F8 00

# hcitool cmd 3f 15 f8 1 2

hcitool cmd 3f 15 f8 1 2

< HCI Command: ogf 0x3f, ocf 0x0015, plen 3

F8 01 02

> HCI Event: 0x0e plen 8

01 15 FC 00 F8 01 FA 00

# hcitool cmd 3f 15 f8 0 fe ff

hcitool cmd 3f 15 f8 0 fe ff

< HCI Command: ogf 0x3f, ocf 0x0015, plen 4

F8 00 FE FF

> HCI Event: 0x0e plen 6

01 15 FC 00 F8 00

# hcitool cmd 3f 15 f8 1 2

hcitool cmd 3f 15 f8 1 2

< HCI Command: ogf 0x3f, ocf 0x0015, plen 3

F8 01 02

> HCI Event: 0x0e plen 8

01 15 FC 00 F8 01 FE FF

# hcitool cmd 3f 15 f8 1 2

hcitool cmd 3f 15 f8 1 2

< HCI Command: ogf 0x3f, ocf 0x0015, plen 3

F8 01 02

> HCI Event: 0x0e plen 8

01 15 FC 00 F8 01 FE FF

Aparently the volume is by default set to 01, with these commands I can set to a higher value, but get still no audio (only static)...

The "I" column has the "new" registers in G5-BTLD:

I2C_FM_RES_PRESCAN_QUALITY	(0xde)

I2C_FM_REG_VOLUME_CTRL	(0xf8)

I2C_FM_REG_BLEND_MUTE	(0xf9)

I2C_FM_SEARCH_BOUNDARY	(0xfb)

I2C_FM_REG_SNR	(0xdf) - this I forgot to put on the file... :)

Maybe the 0xf9 need to be set to something...
[Spirit FM] sanpsa:
I got a Huawei u8800 running CM7, no stock fm app, but strangely advertised with FM radio!

If there is any interest to try and getting your app to work, would be happy to test and provide feedback.

Debug:

Fm:BC Sh:1 Bt:1 Ht:1 H2:0 Mo:BCH SD Hv:4 Ma:29 Ot

For starters, when i change frequency, in notification menu the frequency is always stuck at FM 64.0.
[Spirit FM] mikereidis:
Well, thank you. This confirms you have Qualcomm Tavarua FM. I think it also tends to indicate Huawei intended to release an FM app. They might still do so, who knows ?

But where do we go from here ? I would need to buy one of these devices, spend an unknown amount of time trying to get it to work, and hope that it WILL work, without too many problems.

I would be doing what Huawei, a company much larger than 1 person, said they would do but didn't and perhaps couldn't,

Like the TI and Broadcom FM, there is no public documentation for Tavarua, except for the source code in some kernels and the Code Aurora FM app. So some reverse engineering and experimentation is likely required.

And, at the "end of the day", I'd have to be able to sell enough apps to justify the time required. AFAIK this is the only Android device which uses Tavarua. And it's a rather inexpensive phone which tends to be purchased by people who are less likely to buy apps.

Since May I've been promising forthcoming support for Silicon Labs FM chips as found in Samsung devices like Galaxy S and S2. These devices are more expensive phones and seem to have somewhere around 15% of the market or so.

Hopefully in the next week or so I will start adding the Silicon Labs support. While I'm doing that I can try to add some basic support for Tavarua, and we can try that out perhaps. But it will be VERY difficult for me to justify spending much time on a rare chip for a single device that nobody can even prove FM works on.

Sorry for the "reality" but my family's food doesn't grow on magic trees... :)
[Spirit FM] mikereidis:
Can you select Menu -> Email Logs and send me your logs ? Often the Email Logs doesn't work, so if that happens perhaps you can send me /sdcard/sprt_debug.txt .

64.0 means the frequency register is returning 0 or perhaps the registers aren't there. For some reason my detection code thinks it's a Broadcom chip, but that could be because some unneeded Broadcom files are present.

"Ma:29" means it's Qualcomm Bluetooth so perhaps you also have a Tavarua chip.
[Spirit FM] mikereidis:
Thanks ! No, the result is "little endian" so you have to reverse the bytes:

"00 01" becomes "0100" which is hex for 256. Wyrm said that 256 was the default, so you've confirmed that, and confirmed the existence of the 0xf8 volume register I don't have on BCM4325.

You're getting static ? Radio static ? Radio static would get quite loud when volume is raised, versus a low volume "audio static". But if we aren't sure if volume is being properly controlled we may not be able to discern this.

If it's radio static then the audio problems MAY have been solved. We might just have some tuning problem.

Generally speaking, most registers are set to usable default values on power up. I have no documentation on 0xf9 so if that was true, we'd have to experiment. But I have doubts, blending is an audio effect and I think likely wouldn't prevent audio.
[Spirit FM] sanpsa:
Sent, just noticed that you all ready did some research, on the u8800 section, but no hard feelings if it proves to be impossible :)

Stock rom comes with the attached files related to fm radio...
[Spirit FM] mikereidis:
Thanks. Once again, those files indicate they planned an FM radio app. Perhaps it will be released in future.

The ALSA output in the log shows 3 virtual mixer devices that help alleviate my concern about audio routing issues:

fmradio_handset_rx

fmradio_speaker_rx

fmradio_headset_rx

And I think the driver is more or less a standard V4L2 FM driver. So somebody who knows what they are doing might be able to prove the radio works with a command line utility.

Maybe within the next few weeks we can try something.
[Spirit FM] dancer_69:
Ok, this sounds good. If you need any help(something that I can do) PM me.

Thanks.
[Spirit FM] xmguy:
I found if I go lower than 75 on the preamp output then the audio signal is much harder to hear at max volume. I had no clue the mic was tied into the FM output chip. I thought the FM chip just routed the audio to the main audio out on the IC and it came out. I knew it was on a different audio path as the FM is separate from normal audio outs. I can try Audio Manager app see what I can set there.
[Spirit FM] ElTron:
I don't know why but I listen the radio with echoes. I listen two times everything in my Huawei Y635-L01
[Spirit FM] mikereidis:
No, we North American's don't get FM. "They" are killing it as fast as they can.

Robelus wants to sell us bandwidth instead, and Apple, Google, and many others would rather we stream our music for $10 a month and consume their ads.
[Spirit FM] mikereidis:
Two times for the price of just one. ;)

I can't even pronounce Huawei.
[Spirit FM] ElTron:
LoL...

:D:D:D:D

There is not any solution for that echoes?
[Spirit FM] ElTron:
Ah no, sorry the mobil is a LG Fino (not a Huawei Y635)
[Spirit FM] mikereidis:
Latest Spirit2 paid or Spirit2 Free ? Did it just start happening, or is this your first time trying Spirit on the phone ?

You can try the Analog audio option. It's in the Settings or via Menu.

Email me mikereidis@gmail.com please if you are a customer.
[Spirit FM] ElTron:
Now it works ok. I have only changed the headphones. It is strange but it works now without echoes.
[Spirit FM] maxelm2:
The application will be acted on Xiaomi Redmi Note 2?
[Spirit FM] diyar95:
Thank you it works good :)
[Spirit FM] mikereidis:
If it doesn't work now, it likely never will.

If it is rooted, has a Qualcomm FM/combo chip, and that chips' FM antenna pin is connected to wired headset, then it should work.
[Spirit FM] aaron13:
Is there something I can do to prevent the speakers making a disturbing noise when I pull the earphones out during playing FM radio? (my rom is nemesis 3.6 with agni kernel 4.6 and my phone ia a N7100 Spirit2_14-04-2015 is the radio version)
[Spirit FM] mikereidis:
Please email me at mikereidis@gmail.com
[Spirit FM] Marek89:
Hi, spirit is a great application, radio play without earphone. But someone tried to somehow finish the hardware antenna to the phone?
[Spirit FM] mikereidis:
Sorry, I don't understand your question.

The headset cable acts as the FM antenna.

If the wired headset is not plugged in, reception will be low.
[Spirit FM] OsniNO:
Hi!

Spirit2 won't work in my device, but Spirit1 works great

Samsung Galaxy S Duos 2 GT-S7582L using CM 11 and CM 12.1. Galaxy Trend Plus has same hardware.

To Spirit1 work, I change Settings - Audio - Method - and choose Samsung Galaxy S3/Note/S2_ICS

Just for report, but it would be great to be able to use Spirit2 in my device

Thanks!
[Spirit FM] andruha90:
XIaomi Mi4i and Redmi2

Good day. I want to buy Xiaomi Mi4i or Xiaomi Redmi 2 . The program will work on those phones? Thanks
[Spirit FM] mikereidis:
There's probably a hacky way, in analog mode.

Are you a customer ?
[Spirit FM] OsniNO:
Troubleshooting

- When first open Spirit2, I get Unknown Device error

- If I try to use radio with default settings, I get error Tuner API did not start or stop / This device may need a kernel with a working FM

- I go to Set > Service > Tuner Plugin > choose BCH, and now don't get API error, but hear my own voice (altered like in Talking Tom)

- Go to Set > Audio > Mode. Digital and TestMic hear my own voice. In Analog I don't hear anything

- Then I go to Set > Service > Audio Plugin. I tried all, none provides sound

Sinal strenght of tested radio stations is 30~45
[Spirit FM] nashed:
not working in CM12

it was working good in Cm11 but when i update to CM12 ( night owl ) not working , on N7000 ... it open then a message with su : 2 fm : bc2 su : 1 bt : 0 ht : 0 appear , any idea to help , or i have to change Kernal ??
[Spirit FM] mikereidis:
Which versions of Spirit1 and Spirit2 ? Do Menu-> About in both and let me know what it says in the first line.
[Spirit FM] mikereidis:
Which version of Spirit1 ? Do Menu-> About and let me know what it says in the first line.

Email me mikereidis@gmail.com . There is a beta release of Spirit1 that works on some Lollipop+ ROMs.
[Spirit FM] nashed:
it says ( Spirit FM UL v 2014_12_16)
[Spirit FM] OsniNO:
It's version 2015-04-14
[Spirit FM] Walter Dnes:
How do I get Spirit on a phone that doesn't have Google Play? Will it work if I purchase it on Google Play with my Galaxy Tab4, and then transfer the apk over to my PC and then over to the phone? I have a rooted LG-P999 and there are conflicting reports about whether the FM radio works or not. About Phone shows Android 4.0.4 and Kernel Version 2.6.32.59-CM9-faux123-050. I believe that it may need version 1 of Spirit.
[Spirit FM] mikereidis:
See my following post for a new way to buy Spirit via a new Official XDA app.

There's a free version of Spirit1 (li_141204.apk) here that you can use to test: http://xdaforums.com/showpost.php?p=57261804&postcount=8695

But I'm afraid I have serious doubts about LG P999. Some P990s were working on some ROMs, using Menu>Setting>Audio->Method = LG P990 or perhaps "Samsung Broadcom". This is for the audio. Tuner part is likely to work, but useless without audio.
[Spirit FM] mikereidis:
I've been selling my apps via Paypal for those who want to avoid Google Play. But updates are a manual hassle and Amazon app store is horrible for developers.

Thanksfully !... Some apps can now be downloaded/bought via a new Alpha level Official XDA App available here: http://xdaforums.com/andr.../labs-t3241866 . Download here: http://xdaforums.com/devd...t/dl/?id=15343

I have made available the Spirit FM apps, both paid and free/donation as well as my Android Auto Headunit app.

Pricing is a bit less than on Play, and I believe it avoids VAT and other taxes, which your country may require you to voluntarily (LOL) submit.

There seem to be rave reviews for the XDA Forums section of this app, and the Apps and Xposed Mods section seems to work at least. I/We have been waiting for a good alternative to Google Play for apps Google won't allow on Play and I think/hope this may be it. It supports APK updates and Paypal.

I haven't tried installing a paid app from it yet; Headunit might be the first, or among the 1st at least. Many questions about buying apps this way remain to be answered, but for the most part it seems likely to be equivalent to doing Paypal outside any app.

Thanks !
[Spirit FM] mikereidis:
That's a paid version of Spirit2, and you've posted that you aren't a customer.

Sadly, it appears that lately most of the technical support requests on this thread/forum are from non-customers, and a majority of those people seem to be running paid versions of my apps.

"Everybody" seems to be claiming they didn't know or their friend "lent them a copy", etc.

Yes, a few of those cases may be honest mistakes, but let's be real here... HUGE numbers of people pirate software, and some of those people "add insult to injury" by asking for free technical support too.

NOT COOL MAN, not cool. This is why so many cool apps die/disappear or don't get written in the 1st place. More money on iPhone too.

No, I don't mean to single you out, yeah I'm sure you have a feasible "reason".

But just look back over the last few pages of posts. See all those cases where someone poses a hard problem that takes work to figure out, and I ask them to email me ? Most of those in the last few months were "non customers" running paid versions of my apps.

I try to keep that private to email, but I'm tired of it and I'm ready to close this thread.

Customers can email me anytime at mikereidis@gmail.com . So can people who might become customers and need a bit of help or a test copy to try.
[Spirit FM] mikereidis:
If you're a customer, email me mikereidis@gmail.com for a copy of the beta, or sign up to get betas with the instructions here: http://xdaforums.com/showpost.php?p=57079402&postcount=795

Please tell me you ARE a customer, I REALLY want to be able to trust people posting here, If you ARE, please don't take offense to the below because it doesn't apply to you.

If you're NOT a customer, please buy the app or at least stop using the paid version and use a free version.

Please see my post above this for why I'm tired of people asking for support for unpaid paid versions.

Maybe I'll just close this thread...
[Spirit FM] mikereidis:
Spirit2 2015_12_20_beta (Android 4.1+) is available on Play as a beta for a few days.

It's the same as 2015_12_22, which you'll only see if you are on Android MM 6+.

The changes are really for Android 6+ only:

- Speaker mode fixed on Android 6+ ROMs and maybe some earlier ones.

- Fixes startup problems on HTC One M8 (and perhaps some other Qualcomm FM/combo chip based devices) running stock or GPE Android 6.

For stock HTC Android 6, you'll have to start Spirit2 twice after a reboot.
[Spirit FM] K0CMOHABT:
Free version worked on Oneplus X, I have not yet set up, and only mono sound through headphones...
[Spirit FM] mikereidis:
Thanks for your report. ::)

That makes 1+X the first OnePlus device that has FM Radio.

Spirit1 or Spirit2 ? What version name when doing Menu> About ?
[Spirit FM] K0CMOHABT:
SpiritF 2015_03_17_beta

if press play button sounds good

if unpressed play button - sound only from right

in digital mode bad quality

in analog mode good quality

no RDS show
[Spirit FM] ido135:
mono sound

the sound is good with analog mode but the battery drain fast in my galaxy note 2 n7100 4.4.4