yashsingh1/xdaforums huggingface dataset:
[Spirit FM] Codeplayer:
Its true, FM is dying on handheld devices, but some "Real" PDAs like CAT S61 still rock it. Also, Android head units are massively popular an affordable. I just got a head unit from Xtrons that has this lousy UI for car FM tuner. I guess its not too bad, but still, it could be much better and customizable. I would easily pay 8€ or more to get a premium ui for the fm tuner, but there is nothing out there. And I know I am not the only one. I searched and searched but could not find any screenshots of spirit2.
[Spirit FM] Popke523:
Anyone run spirit fm on redmi note 4/4x (mido)? because i get this error
[Spirit FM] tmshohelrana007@gmail.com:
Thanks
[Spirit FM] Popke523:
I'm attaching logcat with spirit 1 and spiritf. Maybe someone knows how to run spirit on mido
[Spirit FM] curiousrom:
Most Recent Spirit2 Real FM Radio

No, the most recent Spirit2 Real FM Radio I found is version 2015-12-22. See this post it includes screenshot, apk attachment download & workaround for the Speaker output option not working while headphone is connected for the antenna: Spirit2 Real FM Radio Download

Some screenshots in the post linked above & also in web.archive.org December 2016 snapshot: https://web.archive.org/web/20161206233105/https://play.google.com/store/apps/details?id=fm.a2d.s2

***
[Spirit FM] blue whale:
[MENTION=4122877]curiousrom[/MENTION], it works

I tried spirit2 fm from 2015-12-22.

first with normal headphones plugged in :

-the phone display the little headphone icon in the status bar

-spirit2 starts with ''icon speaker'' and the sound is through headphones

-I click the ''icon speaker'', now the icon is ''headphone'' and the sound goes to the speaker of the phone (mono speaker on samsung S2)

second, headphones cut , so only a long wire for antenna :

-the phone display the little headphone icon in the status bar

-spirit2 starts with ''icon speaker'' and there is zero sound

-I click the ''icon speaker'', now the icon is ''headphone'' and there is zero sound

3, headphones cut , so only a long wire for antenna :

-the phone display the little headphone icon in the status bar

-installation of ''routeur audio'' with Audio Policy for media(music) > Loud Speaker

-spirit2 starts with ''icon speaker'' and there is sound thru the speaker

-I click the ''icon speaker'', now the icon is ''headphone'' and there is sound thru the speaker
[Spirit FM] blue whale:
On the redmi 3 SE snapdragon, there is a radio FM app but spirit does not work. I upload the app
[Spirit FM] curiousrom:
Thanks :good: for this very complete report & mentioning your device model.

Could you edit your post and add the firmware it's running too please?

Maybe you could also Thanks the post where you got the apk from as it shows to other users that it was useful to you.

***
[Spirit FM] amirsat2012:
How to play it with s9+ from Korea:G965N

Thx

Envoyé de mon SM-G965F en utilisant Tapatalk
[Spirit FM] d10sarg:
any radio is compatible with d850?
[Spirit FM] kos25k:
any radio for pie dudes?
[Spirit FM] slidefriday:
Anyone have an idea how to make this work in Samsung Galaxy C5?
[Spirit FM] ahmedmoselhi:
deceased app (and developer) with no support from anybody. should anyone try to fork this app or just delete the hole project as most of new phones not supported by it
[Spirit FM] meekspace:
Why delete it?

I still use an old phone that runs this app quite well.

As to the thread not being supported, I responded to your post ?
[Spirit FM] Fax Max:
Turn up the radio!
[Spirit FM] kos25k:
any new version soon?
[Spirit FM] Jazzrock71:
Hi to everybody, I read that app developer has passed away, very sad new ....

Does anybody know on wich devices it run with original ROM? Where can I find the apk file to download and try?

thanks
[Spirit FM] montanita:
:good:
[Spirit FM] sasukepl:
spirit fm work on samsung galaxy note 10+ sm-n975f
[Spirit FM] supermaxkato:
Nextradio is a great alternative if you don't have root (spirit 2 requires root). You should try it on your Note 10.

Also I have a rooted Moto e4 and e5 with working native Moto fm radio (which uses headset as antenna). But spirit 2 doesn't work and says "Error starting tuner API" and it might need a different kernel. Any thoughts for me on why the stock Moto app works but spirit 2 doesn't?
[Spirit FM] sasukepl:
could you put link to the nextradio
[Spirit FM] kos25k:
Does this moto radio play on all devices?

Στάλθηκε από το Redmi 4 μου χρησιμοποιώντας Tapatalk
[Spirit FM] mervluk:
I had this problem on an earlier Moto, necessitating several attempts at starting Spirit.

It doesn't seem to happen since upgrading to the latest Magisk, perhaps because the way of communicating root with apps has been corrected? With de Witts Viper and a sound boost app, the sound is now better than anything else. The reason why it's now kept solely as an an FM phone.
[Spirit FM] anuradhabhowmick:
92.7
[Spirit FM] D_Saint:
is there s spirit2 version for samsung S3 mini i8190n with cm13?

pLEASE?
[Spirit FM] algarues:
I have a huawei mate 20 with FM radio

The stock radio app is disappointing, but the phone is not rooted.

Does anybody know if it is possible to bypass the root requirements of the app with ADB commands similar to greenify or others?

Thanks
[Spirit FM] devender bhatia:
Ok
[Spirit FM] algarues:
Using Shizuku somehow might be an option too...
[Spirit FM] Rmin89:
Hi, and sorry for my english

I bought Galaxy A71 also for the integrated Radio FM but i discover that italian version NOT have radio fm. But in Android Option there are AT RADIO SERVICE pre-installed.

I have already downloaded many apk of fm radio ( FMplayer, Radio FM, TuneIn, NextRadio, SimpleRadio ecc... ) but none of these work or work with streaming

I've downloded Spirit2 of this topic but ask me the root, insn't there another way whitout root? The phone is new and not proper mine but family. I don't want to give it to Samsung

Thanks
[Spirit FM] kos25k:
I think this project is dead.Maybe you can ask on Samsung forums if u can flash another country's firmware with odin,so radio to work bro!
[Spirit FM] alex dimcea:
Is it possible to make RDS-PI work on Spirit FM 1? (Samsung Core i8262)
[Spirit FM] Johnye Bravo:
I know the development of this App is dead, but I just installed CyanogenMod 14.1 on a Samsung Galaxy S3 to replace my broken phone, and noticed it doesn't include the offline FM Radio app, although the stock software did. I travel by train on a daily basis and the radio is a very nice commodity to have.

I tried NextRadio 3.0 and 6.0 but it seems it only supports Galaxy S4 and above.

Then I tried both Spirit (sf_150317.apk) and Spirit2 (spirit2_2015.12.22.apk) but for some reason it can't get root access, I get the same error as Eibs on page 465:

His error "went away" after a few reboots, but I didn't have the same luck.

I tried enabling root for Apps in Developer mode, installing SuperSU Free 2.78 and 2.82 with TWRP to grant it root, which does but doesn't seem to work, and checked if root was installed/working correctly with Root Checker Basic, which is.

No clue on what to do or try next...

EDIT:

I wiped the Galaxy S3 and installed LineageOS 14.1 (Android 7.1.2), repeated all steps above but the problem still remains.

EDIT2:

I had the SD card formatted as combined internal storage which was slowing down the phone, so I (supposedly) moved all content back to the internal memory, then formatted the SD card as external memory, which deleted 4 Apps, SpiritF/Spirit2 included. I rebooted the phone because it was reporting 0 bytes free on internal storage to the Play Store, then reinstalled the 4 Apps. Lo and behold, both SpiritF and Spirit2 started working! I guess the problem could have been related to combined storage and/or running SpiritF/Spirit2 from the SD card. SpiritF makes audible clicks when transmitting but Spirit2 works fine, so that solves my problem and this Galaxy S3 will have a new life for hopefully some more years.
[Spirit FM] efi1j:
Hi,

i could not find a version that can work with the lenovo tb3-710i

its now are android 6.0 with custom ROM

can you help?
[Spirit FM] laslo warga:
https://xdaforums.com/t/fix-for-fm-rádió-mindkettő-aosp-és cm-alapú-roms.3157535/page-2

Works at LOS 20.

with qualcomm processor.

exynos unfortunately not.

I tried it.
[Spirit FM] laslo warga:
https://xdaforums.com/t/fix-for-fm-radio-for-both-aosp-and-cm-based-roms.3157535/page-2
[Spirit FM] mikereidis:
Yes, as I've said. Last time I asked him I had no response. He seems busy and doesn't seem to be answering detailed tech questions in his thread.

But I see that sys/devices/virtual/misc/voodoo_sound/wm8994_register_dump can read the registers, and .../wm8994_write can set them.

WM8994 specs seem to be secret, but this HUGE definitions file can help decipher: https://github.com/project-voodoo/l...5837ce9039998973ed86b31/drivers/star/wm8994.h
[Spirit FM] mikereidis:
:) Thanks, but "Been there, read that".

Those patches haven't been accepted and are still in "Open State". They may break things on other phones. Or they may even be defective.

The CM FM app for SGS just doesn't work at present. Source for something broken doesn't help too much. I don't know if SGS 2 is the same, but the CM FM app development doesn't seem to be progressing too easily, IMO.
[Spirit FM] FadeFx:
Mike, i sent u an email containing the debug log (its realy there...) regarding my cm7-sgs problems with your app...

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

tapatalked
[Spirit FM] mikereidis:
Thanks ! My app doesn't see the Samsung /dev/fmradio or /dev/radio0 devices, so it tries to use the non-functional Broadcom chip FM.

It looks to me like you are running a different kernel than the CM7 kernel. I can see the Linux V4L driver is loaded in the kernel dmesg output:

I2C radio driver for Si470x FM Radio Receivers, Version 1.0.1

But I don't see a corresponding device such as /dev/radio0. Even if there was one, my app wouldn't work with it at present as it doesn't yet support V4L (But I hope to add that soon.)

It's possible you could use a loadable kernel module from elsewhere and run:

insmod Si4709_driver.ko

to load it. But the V4L driver might interfere.

Lastly, I'd bet even if the above were solved, we'd have audio routing issues. The tail of the log shows WM8994 ALSA support, but none of the controls has a setting for FM.

On stock, Darky and CM7 kernels, there are options for FM routing, although the control numbers are different on all of them. Your kernel seems to have Voodoo sound/control support so it's possible the FM routing can be set with wm8994_write.
[Spirit FM] FadeFx:
Ah, gonna try it on Sunday unsig stock kernel and report back then. Also i am in touch with the kernel dev, and if the kernel needs some changes it should be possible.

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

tapatalked
[Spirit FM] xmguy:
Downloaded. I see BC or Broadcom chip diagnosis settings. Will they help with the droid x?
[Spirit FM] Rootax:
If you can sort of convert rds informations into audio tags which can be submitted via last.fm api, would be nice
[Spirit FM] mikereidis:
No. (1) Droid X has a TI chip.

(2) I just put those options back so people besides subpsyke et. al will have working Broadcom support. Samsung 5 series devices don't like those "Mystery Registers" being written while other devices demand it. And I don't have a reliable way yet to distinguish automatically.
[Spirit FM] mikereidis:
Yes it would be nice.

I'd also like lyrics search, and since games are so popular on smart-phones, a "Name that Tune" type game might be interesting too...

Now if I could only think of virtual objects to sell as in app purchases... LOL. :)
[Spirit FM] mikereidis:
Great ! All I need is some reliable way to enable/disable the FM analog audio path to headphones or speaker.

This August 20 version should work better:

http://www.mediafire.com/file/881006yaa5sm4bt/Spirit_FM_Radio_v110820.apk

The audio path was switching off 4-5 seconds after start or headphone/speaker switch because the system thought no audio was playing. I worked around this with a horrible hack that plays a tone. If you hear it you may be able to turn it off by lowering Alarm volume to 0 in the System Sound settings.

If you still have audio problems, toggling speaker/headset and Mute/Unmute may help.

The CM7 kernel has the same FM audio problem the original Samsung firmware did, before the fixes from SuperCurio Voodoo Control. It's in mono and frequency response is phone call quality. Voodoo Control on the CM7 kernel doesn't fix this like it does on the stock or Darky kernels.

Speaker output is even worse. It sounds very overdriven, but with low volume.

A Darky kernel may work better. I'd add Stock or Stock derived, but they may use different ALSA control numbers and I've hardcoded that for now.

Remember to have headphones inserted to act as an antenna, AND to select Menu -> Settings -> Audio Method -> SamsungCM7 (or SamsungDarky).

EDIT: These commands from a connected PC should fix frequency response issues, at least until the next Mute/Unmute, Speaker/Headset or power cycle:

adb shell "echo 621 0 > /sys/devices/virtual/misc/voodoo_sound/wm8994_write"

adb shell "echo 510 1800 > /sys/devices/virtual/misc/voodoo_sound/wm8994_write"

adb shell "echo 520 30 > /sys/devices/virtual/misc/voodoo_sound/wm8994_write"
[Spirit FM] denzel09:
Hi buddy, any good news for samsung s5570 with cm7 ?

Bye ;)
[Spirit FM] mikereidis:
I'm working on a Galaxy S with CM7 now and learning about the Samsung libaudio code.

I'm planning to buy an i5503 model soon and when I decipher the MAX8899 audio chip issues I think I should be able to enable all the Galaxy 5 series devices with that chip.
[Spirit FM] psyke83:
Just to help show that you made a good investment...

Almost all (or perhaps all) of the Samsung msm7k phones use the MAX8899 IC. That includes the Europa (I5500/3), Callisto (I5508), Tass (S5570), Cooper (S5830), Fit (S5670) and maybe a few more.

The Europa and Callisto have identical Bluetooth chips (BCM2049B0) and the rest seem to have a slightly newer revision (BCM2049C0).

Speaking of Bluetooth, I found something that may be useful In the Samsung platform source release for the SHW-M290S (Korean Gio). They have included system/bluetooth/brcm_patchram_plus, and there are two changes vs upstream that may affect us.

Original upstream:

unsigned char hci_write_pcm_slave_mode[] =
{ 0x01, 0x1C, 0xFC, 0x05, 0x00, 0x02, 0x00, 0x00, 0x00 };
unsigned char hci_write_pcm_master_mode[] =
{ 0x01, 0x1C, 0xFC, 0x05, 0x00, 0x02, 0x00, 0x01, 0x01 };

Samsung:

unsigned char hci_write_pcm_slave_mode[] =
{ 0x01, 0x1C, 0xFC, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00 };
unsigned char hci_write_pcm_master_mode[] =
{ 0x01, 0x1C, 0xFC, 0x05, 0x00, 0x02, 0x00, 0x01, 0x01 };

Also, on the original:

read(uart_fd, &buffer[0], 2);

It's commented out in the Samsung version:

//	read(uart_fd, &buffer[0], 2); //for BCM4330B1

I'm doing a rebuild of the ROM with Samsung's version of brcm_patchram_plus (and I've configured the service to use the slave pcm mode).

Samsung have also released their bluez stack source which has some changes compared to upstream. The question is, why do they release the source for bluez and brcm_patchram_plus, but not even use it in the official ROMs? The official ROMs all seem to use the btld stack (which also does the patch ram function)...
[Spirit FM] mikereidis:
Haven't bought it yet. :D Are these all relatively less expensive devices ? It seems like Samsung phones with FM had Silicon Labs FM and WM8994 audio, and the new Galaxy S2 still does ? But the newer ones are Broadcom.

Write_SCO_PCM_Int_Param: SCO_Routing, PCM_Interface_Rate, Frame_Type, Sync_Mode, Clock_Mode

PCM, 512 KBps, Short, Slave, Slave

PCM, 512 KBps, Short, Master, Master

PCM, 128 KBps, Short, Slave, Slave

PCM, 512 KBps, Short, Master, Master

So the only difference is the new code sets 128 KBps for Slave Mode. Perhaps some new limit due to a bug or slower hardware ?

I assume that's from proc_patchram(). It just reads 2 bytes from the UART after reading the event bytes from the hci_download_minidriver command. And the bytes are over-written and never used. Perhaps it's an anachronism that's been removed.

The original code would block I believe, which is bad of course. My code uses a 5 second timeout. I've changed it now to 2 seconds due to this, and hopefully it won't cause any other problems.

So the BCM4330 is one of Broadcom's newest combo chips ? I see it's in the Galaxy S2.

I dunno, perhaps they planned or are planning to move to Bluez ? I think Bluez had less functionality years ago, prompting TI and Broadcom to build their own stacks. Now, Bluez may be good enough, and likely better in several ways, that the proprietary stacks are being tossed aside by the OEMs.

The OEMs will need to toss the proprietary FM APIs though too. That could be one of the sticking points in favor of the old APIs. OEMs don't like allocating people/money to rewriting software like FM apps.

I think the patchram functionality will always be with us, as long as there are chips like the existing ones that have firmware fixed in actual read-only memory that can't be reflashed. It would be nice though if it could be added to hciattach as the Broadcom patchram code comments indicate.
[Spirit FM] psyke83:
As far as I'm aware, the G5 is the least expensive option from the list I mentioned, but the situation may be different in the United States.

Quite possibly. CyanogenMod on the G5 has a bug in which Bluetooth initialization can be hit-or-miss. When configured to use brcm_patchram_plus (and actually load a .hcd file) , the Bluetooth chip will completely refuse to initialize on certain boots (especially if wifi is enabled on boot). This never happens on stock roms (which of course, don't use brcm_patchram_plus), nor does it happen if I use the plain "hciattach" tool to initialize the hci device (without patched firmware). With brcm_patchram_plus, if I limit the serial speed to something low, it never fails either. Perhaps this will solve the issue.

Well, I'll keep Samsung's modifications for my port. In the short time I've been testing, I haven't experienced any Bluetooth initialization problems (fingers crossed).

I guess so... I'm too poor to own any phones better than the G5, so I don't know ;).

Maybe it's extending an olive branch to the open-source community. Since we can't get the proprietary Broadcom source, Samsung are providing some modifications to bluez to assist the modding community. The differences I spotted seem not to be too significant.

Well, it seems that Samsung are relying on the closed MAX8899 IC, but if there was a way to standardize the FM API without the need to distribute restricted code, I'm sure they would welcome such a move (to make their lives easier).

Well, hciattach is obsoleted by brcm_patchram_plus. For the latter, the patchram function is completely optional (i.e., you can set up the hci connection without a .hcd patchram file).
[Spirit FM] mikereidis:
August 21 version for Samsung Galaxy S. Minor fixes. I haven't even tried it on anything else.

http://www.mediafire.com/file/wuac9bb7l2un15u/Spirit_FM_Radio_v110821.apk

Tested on CM7, Insanity cm-034 ROM with standard kernel, Neo Platypus 9.5 and latest Neo 16 kernel.

One known issue is that audio dies after 1 hour. Toggling Mute/Unmute fixes it for another hour.

Audio also dies if you enter Settings screen or Email Logs.
[Spirit FM] mikereidis:
There IS a standard Linux FM API. It's the radio portion of the V4L Video for Linux API created for TV (and FM) tuner hardware.

And there are V4L drivers available now for all 4 FM chips I'm aware of in Android devices: Broadcom, TI, Silicon Labs and Qualcomm.

But V4L doesn't support a lot of more advanced features. Qualcomm added proprietary V4L extensions. Samsung created their own FM driver for the Si4709. Etc.

For the last 9 months or so SonyEricsson has been working on a "standardised" Android FM API. It's very rich, has lots of features, and would take a lot of work to make drivers and apps that support a lot of it.

But I haven't seen any indication that anybody but SonyEricsson might support this API. And SE isn't in the best financial shape with regards to Android devices. So I'm afraid this effort is likely to flop.

So here we are with a mess of APIs, proprietary and not, and access methods and audio routing issues.
[Spirit FM] denzel09:
Thanks man ;)
[Spirit FM] pirrera:
It really works in SGS CM7. No need of stock headphones and volume can be controlled. Well done. Thank you.
[Spirit FM] FadeFx:
Hi mike, as promised i tested with cm7 sgs nightly #94 stock kernel just now, it seems like tuner is working as it finds stations, but i get no audio. Hopefully u can see in the logs whats going on, as i still am not sure if my fm chip got broken some time ago before spirit-fm

If i use a special sequence of changing frequency - changing speakermode - play/pause i get some strange noise, that seems to be some interference from CPU.

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

tapatalked
[Spirit FM] Victorino86:
Great work

I'm on the 2.0.8 (from the market), the volume issue is solved, sweet!

RDS is working, just wondering what are the letters i get below the 4 bars.

Also i see there is already TPY on the right.

Not sure how the scan should work :p

BTW, keep going best FM app! Gonna buy the donate version for sure.
[Spirit FM] cos68:
Sounds great. I haven't seen anything but the PS information in your application, even though I know that more stations in my area send both RT and PT but I guess I will have to test it outside to see if I can get a better signal then.

Thanks for your answer!
[Spirit FM] MonacoHias:
You are probably right. Especially with the last one: best and (for now) unique FM RDS Radio. I wished I could push your app on the (German) market ...

If you want to offer a paid version as well - differences between free -> paid could be:

- store more than xx stations

- the desired recording functionality

- skins / skinning

- streaming radio :rolleyes: -> one app for all radio-listening

- something more in my mind ...

Anyway, I hope you keep a well featured free version as well. ;)
[Spirit FM] mikereidis:
Great ! :)

3 or 4 letters under signal bars should be a US callsign, starting with W or K I should disable that for regions outside North America and just show the number. There's also a few databases on the Internet I might hook into.

Long press (hold for 1/2 second or more) the frequency up/down buttons to seek to the next strong station. As I say, broken on Broadcom in v2.0.8 and should be fixed in next.