yashsingh1/xdaforums huggingface dataset:
[Spirit FM] coditos:
Yum!

It seems that you don't like Material style very much! ;)

Holo could be a nice alternative. Would it be possible to see it somehow?

Thanks!
[Spirit FM] juniorhxcx:
Thank you, I'm happy and hoping to use the radio in CM12 or Omnirom. Thank you for your very good work.
[Spirit FM] :
:( Not for me.

The free Spirit2 beta demands superuser, granted, but daemon does not start.

There is no frequency input panel where i could put "7" into to get a bug report. It simply does not show.

But:

If I install the official playstore version for L off playstore FM works. Calls and bluetooth i did not test.

The threshold for stereo output seems to be a bit high in comparison with the "older" november version. But stereo is there on

strong stations.

I am going to reinstall the ROM without FM app and if Mike has time he maybe will send me a beta for install outside Aroma.

Maybe the whole thing is about having the app as a system app? My best guess .. :o
[Spirit FM] Calvin Gross:
I tested the free version sf_150225.apk on LG G2 D802, using SlimKat, Kernel 3.4.0-Slim-4.4.4-KK+

2 issues are found:

1. Open Spirit2 F then wifi icon will disappear from the notification bar

2. Bluetooth does not work after using Spirit2 F, cannot be active anymore.
[Spirit FM] WaseemAlkurdi:
Oddly, the link for SpiritF Open is down.

Can anyone share or PM it please?
[Spirit FM] :
It's the download at the bottom of the post

http://xdaforums.com/showpost.php?p=57006081&postcount=1
[Spirit FM] Calvin Gross:
Spirit2 Free http://xdaforums.com/apps/spirit-fm/app-spirit2-free-source-real-fm-radio-t2951455

Download link http://xdaforums.com/attachment.php?attachmentid=3183813&d=1424903282
[Spirit FM] mikereidis:
I am running the kernel that comes with cm-12-20150222-UNOFFICIAL-i9100.zip

uname -a says it is: Linux localhost 3.0.64-CM-g8ea001c #8 SMP PREEMPT Sun Feb 22 18:39:58 BRT 2015 armv7l GNU/Linux

SELinux makes no difference, as long as Spirit has root/SU, and you should see a message for that if so.

There are a million things that can be different, with settings and apps and such, and I haven't used my GS2 as an actual phone in a few years now.

Did you try Menu-Analog to use Analog Audio ?

The latest releases you can disable RDS via Menu-Settings-Tuner-RDS-Stop. Try that for a while.
[Spirit FM] mikereidis:
I was briefly running ArchiDroid_V3.0.2-i9300.zip a few days ago, and it worked fine for me.
[Spirit FM] mikereidis:
Thanks. :)

I will take the blame for #2, but #1 is a problem on every G2 Lollipop ROM I have tried, and it annoys the heck out of me because I use WiFi to install, run and test on 13 different devices.

It's the same problem if you use BT without Spirit. Every time, or every second time you turn BT (or FM) on, it kills the wifi connection. I scoured the XDA threads and nobody has a working fix yet.

I'm still considering a tiny addition to Spirit to auto-toggle wifi after starting.
[Spirit FM] SnijbooN1982:
If I understand it correctly, I just have to be patient (until the next beta release, a CM patch update or a new kernel) or is there anything else I can do myself (just requested access to the google+ beta group), or do you have an update on any of these items?
[Spirit FM] mikereidis:
EDIT: Just looked at your previous post and you say Spirit "works" but signal is very low ? In the latest beta releases (maybe not released yet) you can change the antenna setting at Menu-Settings-Tuner to "Internal", but I'm not sure why you would need to. It should be automatic.

Xperia Z1 and some similar Sony devices are working with CM12 now (though still with horrible audio unless Analog mode is used.)

Your is Xperia T aka "Mint " ?

Official CM12 ? I see a few variant ROMs on XDA.

The official CM12 kernel config file seems to be here: https://github.com/CyanogenMod/andr...-12.0/arch/arm/configs/cm_blue_mint_defconfig

And it appears to include the FM driver needed.

Can you send me a debug log from Spirit ? Tap the frequency button, enter the number 7 and tap "OK". After 20 seconds or so, press Send from your email client.
[Spirit FM] SnijbooN1982:
Yes the app is starting, I can search for radio stations, however due to the poor signal it doesn't find much (2 or 3 in total) and the ones it does find I can hear some music / talking very much in the background,

so from a technical perspective it's working, but it's not usable in the current state.

Yes, it's 'Mint'.

Running on CyanogenMod 12 - Neo's Homebuilds

debug log just shared.
[Spirit FM] mustasusi:
[MENTION=3575078]mikereidis[/MENTION]

Check this out! Seems that Samsung is back to business:

View attachment 3189569

Original source:http://www.gsmarena.com/samsung_unpacks_galaxy_s6_and_galaxy_s6_edge_at_mwc_2015-news-11376.php
[Spirit FM] zander21510:
Hi a question: using latest playstore beta in analog mode, the sound is way too loud and at minimum volume (mute) its still playing fairly loud. I read in a previous post something about volume scale or something but I couldn't find anything in the options. Let me know what I can do to help

Edit: also sometimes I can't get it to play at all, not sure what setting I fooled around with but eventually I was able to get the tuner working in digital and analog mode. When its not working it makes pops and if on speaker with the volume turned on enough it makes a screeching feedback sound. Most of the time from a fresh install (cleared data and/or uninstall/reinstall) I get the API failed to start and I need a kernel with FM support (even though on the same nightly version I got analog/digital working)
[Spirit FM] mikereidis:
No.

There is no FM radio on GS6, except maybe the rare US Sprint variant.

That site is often wrong about phones having FM, and I see that IMO false info on no other site.

I'd be happy to be wrong and might get one if it has FM (based on XDA popularity; Samsung is losing market share among enthusiasts.)

I had assumptions about GS4, and hopes about Note3, GS5 and even Note4, all dashed.

And even Samsung mid-range phones are losing FM now.

So I gave up on hoping about Samsung, yet GS3 and GS2 are still the most popular in my terminally declining sales stats.
[Spirit FM] mikereidis:
Thanks for your report.

Does it sound OK in digital mode ?

My Z1 and Z2 tablet both running CM12 sound horrible without a fix to an ACDB config file.
[Spirit FM] zander21510:
Its an all or nothing thing, either both work or neither work. Fairly sire it doesn't have to do with forcing the device type. When it does work digital works fine, obviously analog sounds better quality it's just loud. I'll try and see what setting gets it to work and report back

Edit: Apparently I just screwed around with too many settings. Clearing data, only setting device to Z2C, and restarting, I can get analog and digital. Analog is too loud and RDS no longer works (it did in the stable playstore version)
[Spirit FM] :
Interestingly I was coming back on the bus from the local main town and the radio just wouldn't work. Digital just had a weird noise and analog was there but still had the same kind of noise on top of it. However I'm not sure if it was interference from the bus and I was on Kk now im over on LP and at home it's fine on analog. Digital works but distorting a bit.
[Spirit FM] mikereidis:
A new debug release is due soon, after I've tested what I have now better.

Always surprising how many bugs get fixed each beta release.
[Spirit FM] mikereidis:
Is that on LG G3 D855 ?

I lost track of where the G3 is as far as FM, but mostly concerned about CM12 right now.

Your G3 is stock and rooted ? Stock kernel or another ?

Next beta, due soon, should be better.

For the microphone pre-processing distortion issue, the best solution I've found so far is creating or modifying the /system/etc/audio_platform_info.xml file. I've spent a week now on this and looking at alternatives.

This is what the next release does with the right Menu-> selection:

If you had no such file, this would work:

<?xml version="1.0" encoding="ISO-8859-1"?>
<audio_platform_info>
<acdb_ids>
<device name="SND_DEVICE_IN_CAMCORDER_MIC" acdb_id="0" />
</acdb_ids>
</audio_platform_info>

If the file exists, it will be modified to add the ...CAMCORDER... line.

This turns off mic pre-processing for anything that selects Camcorder or Back Mic. That might be a concern for you; then again maybe it would be better...

But I think it may be better than modifying the regular mic, which might affect phone calls, or VOIP at least.
[Spirit FM] :
Yes G3 D855 (3gb model) just running 20H stock rooted with chupachubs 4.2 until I can run run both cm12 and stock through multirom
[Spirit FM] feriber:
I've tried last beta (s2_150225) you sent me, working in analog mode and with RDS OFF, and now i can listen the radio for almost half an hour. Then the app turns off reseting the radio (i noticed how the phone reconnects with the operator).

I used to restart completely the phone to have it 100% operative.

Thanks....
[Spirit FM] Czechnolog:
[MENTION=3575078]mikereidis[/MENTION] - please can you check this issue on

http://xdaforums.com/showpost.php?p=59231117&postcount=1

Phone: Xperia T = LT30p / supported device

OS: CM 12 - 5.0.2 - official source

Spirit FM version: 2

I tested it and it has some strange noise in the background when playing FM.

Especially trebles are destroyed.

I tried the different earphone, I tried restart - nothing worked.

It looks like it is issue of Spirit FM 2 because it has many users.

Thanks.
[Spirit FM] shadowcliffs:
Anyway to make spirit2 working on Note 3 Sprint variant N900p which has native fm support with their stock KitKat rom?

Here's my research done on this phone about fm:

http://xdaforums.com/note-3-sprint/general/one-seen-fm-nextradio-lollipop-t3027285
[Spirit FM] mikereidis:
Post 9001. :)

There is a new March 6 20150306 beta release of Spirit2 on Play for beta users now.

Yesterday's March 5 beta had a solution for lo-fi digital audio on Xperia Z2, Z1 and similar running CM12 and most other AOSP Lollipop ROMs. Perhaps for LG G3 as well.

But that solution worked in mono only, and today's is in stereo. If you applied yesterdays fix, uninstall it first before applying the new.

To fix: Menu->ACDB->IAF, then restart Spirit2 after waiting 10-15 seconds. Reboot if problems.

To restore to previous config: Menu->ACDB->RAF and restart as for the fix.

The fix creates (if it doesn't exist) or slightly modifies the /system/etc/audio_platform_info.xml file, and saves the original as /system/etc/audio_platform_info.xml.orig ,

The fixed file has '<device name="SND_DEVICE_IN_CAMCORDER_MIC" acdb_id="34" />' added to the "<acdb_ids>" section.

This will likely change the audio for camcording, maybe for the better in some cases.

Updates to the ROM may undo this fix. I have not yet found a better solution.
[Spirit FM] mikereidis:
You are likely having the problem I have spent most of the last 2 weeks trying to solve.

The March 6 beta has a fix at Menu->ACDB->IAF. See the post above for some more details. Hardware/DSP microphone pre-processing is getting enabled on some Lollipop ROMs, and it messes up the much higher-fi FM audio.

Email me mikereidis@gmail.com to try the beta, or try the new free version here: http://xdaforums.com/attachment.php?attachmentid=3196753&d=1425629257
[Spirit FM] mikereidis:
Somebody has posted several times on this thread about getting Spirit1 working, on stock ROM only, with a complicated series of steps.

Spirit1 or Spirit2 can support the FM tuner chip, but I have no idea how the audio part works, and that's half of the work of supporting a new phone FM architecture.

Because the Sprint Note3 is very rare and the only Note3 with FM, I can't buy one and support it officially. And the experiments I have tried remotely have not worked.

The problem with Broadcom FM chips is that every phone connects the audio in a different, proprietary way. And all this stuff is unpublished and requires reverse engineering.
[Spirit FM] zander21510:
Just confirming the ACDB fix works on my Z3C beautifully. Digital now sounds great, volume is good, & equalizer works. Great job, thanks!

Also: is it supposed to screw around with Bluetooth, whenever I listen at work, it shuts off my Bluetooth and doesn't turn it back on. Manually turning it back on works fine, it just seems odd that it turns it off.
[Spirit FM] mikereidis:
This might be fixable by toggling Speaker/Headset and Mute/Unmute a few times. Possibly trying Audio Method FM Launch instead of FM Launch 2 might help.

I noted from some logs of the stock Motorola app that the app calls to setParameters("FM_launch=on") may need to be done before setParameters("FM_routing=DEVICE_OUT_WIRED_HEADPHO NE").

I'll try to get a new version of the app out in the next 12-15 hours with these modifications.

I'm happy to see at least that you aren't having the problems SaurusX is having with Droid X. He hears bursts of static and multiple signals, but AFAIR nobody else with a Droid X is reporting this.
[Spirit FM] mikereidis:
I've been looking to create a Station Info setting that allows customising what you see there. I think for most people that PI number looks ugly because it doesn't mean anything to them. If I was a user instead of an FM developer I'd feel the same.

That's the first of heard of any PTY issue, but most people aren't as knowledgable about RDS. Do you have any radios that show the same problem ? It would be useful to know if this happens with a Europe band also (and yes the names will be different).

The code is simple enough that my suspicion is that this is an FM chip issue. Just about every RDS "packet" contains this info. My code does a confirmation process that requires the same number at least twice in a row, to avoid RDS error issues I've sometimes seen.

Watching "adb logcat" for lines with either of these would be interesting:

Can RDS Program Type

New RDS Program Type

"Can" means a new unconfirmed, candidate PTY, and "New" means it's been confirmed and will be displayed. These are followed by the values in hexadecimal.

There are a bunch of other RDS related log messages you can see when the screen is displaying the app that you may find interesting. I'm curious if others see the same number of RDS errors I see on most stations.
[Spirit FM] xmguy:
Yeah. As I said my Grundig Ocean Boy 510 RDS radio will display the PTY data as POP (which is Country in US). on Local FM STATION 105.3 WOWC. About 3 miles from transmitter. I'm emailing the aLog cat data from the WOWC radio RDS Stream to you.

This station also (annoyingly) uses the PS area for artist/song/station id as well as RT.

I'm a very big fan of RDS technology. That's why I love your app so! :D
[Spirit FM] xmguy:
Today's "nightly" build of CM 7 for the Droid X, Fixes FM issues.

"(2011-08-10 09:33:44)

OMAP4: Added FM API to support FM on OMAP4 (android_hardware_libhardware_legacy)"

http://cm-nightlies.appspot.com/?device=cdma_shadow
[Spirit FM] xmguy:
Mike ,

I've noticed sometimes the audio sounds overdriven. Distorted. But still lower than the levels used on the stock X rom and stock fm app. I've got it set to Fm Launch 2 set and volume range at 80. Am i doing something wrong? Thanks
[Spirit FM] mikereidis:
>This station also (annoyingly) uses the PS area for artist/song/station id as well as RT.

Yes, plenty of stations do that, scrolled of course since it's only 8 characters. I think some radios don't support Radiotext because 64 character displays cost money and the single 8 character display shows PS.

There aren't any standards for this, according to the RDS/RBDS spec, although driver distraction techniques are discouraged. Radio stations do whatever they want, and what their RDS encoder allows.

And radio is a very poor business, so I'd guess an engineer sets it up once and passes some random instructions to the DJs.

>OMAP4: Added FM API to support FM on OMAP4

Interesting. I'm not sure this affects you as the Droid X uses a TI OMAP3630-1000 SOC (System On Chip), which is OMAP3.

There's not much you could do "wrong". Is there a CM FM app on your phone and if so, does it sound the same ?

On Qualcomm SOCs there is a PGA (Programmable Gain Amplifier) in the path commonly used for FM. There are some APIs that can set this. You may have something similar.

I've seen many complaints about FM volume on stock FM apps.

I think your device uses a TI TWL5030 (also known as CPCAP or TPS65950) for a variety of purposes including audio amplification.
[Spirit FM] mikereidis:
EDIT: You discovered a bug... It appears to be a strange compiler bug, which is pretty unusual. Fixed in next release, hopefully soon.

Country in the US RBDS mapping is code 10 (decimal).

Your logs indicate the TI FM chip is returning code 0, which is undefined:

08-10 12:04:44.752 D/fm_hrdw ( 3284): Can RDS Program Type: 0x0

08-10 12:04:44.752 D/fm_hrdw ( 3284): New RDS Program Type: 0x0

Every RDS/RBDS group ("packet") contains both Program ID and Program Type. And you have only a few little RDS errors in your log...
[Spirit FM] xmguy:
Mike,

Thanks for the quick replies. I noticed with most Stock FM Radio apps the volume was very low. I'm not sure what API app I could get to change that system value. Most apps I know of only change the system values not the FM Radio audio path.

I look forward to the next update.
[Spirit FM] mikereidis:
August 11 version.

Experimental: If you have no problems you can wait for a better tested version. Takes several seconds longer to start when default Reg Dump is enabled.

http://www.mediafire.com/file/nqr1oh2ms4p024t/Spirit_FM_Radio_v110811.apk

- RDS fix for Soft Rock, Top 40, Country, Classical etc (PTY above 7).

- 2 new Debug options for log messages. On by default, check to turn off:

Reg Dump: Dumps default values of FM chip registers to log at power on.

Reg Verify: Verifies all register writes. Some errors, such as frequency set, are normal.

- 3 new Debug options for Broadcom / Samsung s5570 mini (GT-S5570) for denzel09 / Tjstyle:

BC AR 1: Broadcom Audio Routing Command 1

BC AR 2: Broadcom Audio Routing Command 2

BC Vol: Broadcom Volume

To test this issue, Check all 3, REBOOT phone (Very important here) and start app.

With a headset/antenna inserted, hopefully tuning will work, RSSI signal strength / bars will show, and RDS will be available with RSSI 30+.

Please send me a log at this point.

On my LG P500, I get strange sounds when I do this, but tuning etc works fine. I have to uncheck BC AR 1 or BC AR 2 and power cycle the app to get normal FM audio. To get volume control I have to uncheck BC Vol also.
[Spirit FM] denzel09:
Debug send you... you say me if you need other log ;)
[Spirit FM] xmguy:
A log cat file attached (in email). Using new version with all 3 debug settings on. Rds pty shows correctly. Rf gain/sensitivity seems a bit weak. My guess is that can't be changed without also increasing the s/n.
[Spirit FM] mikereidis:
The "BC AR x" and "BC Vol" settings make no difference for TI based devices such as the Droid X.

AFAIK, there are no RF gain/sensitivity settings on any FM chip. Any such controls are likely internal and automatic.

My experience is that my TI based device (HTC Legend) is less sensitive than my Broadcom device (LG P500). At least the Broadcom device works better with no antenna than the TI based Legend. Although that might be partly due to the aluminum body of the Legend...
[Spirit FM] xmguy:
Ok Atleast the PTY info shows correctly. I can help you test this app any way needed. (to the best of my abilities) I e-mailed my log. Even though TI chips do not benefit from the Debug options. Maybe you can get something from it. Keep up the great work. AWESOME to see a Dev that wants input from it's users and allows good communication. Some I've dealt with don't want any feedback.

BTW (although a bit crude in design) I built a telescoping antenna case /mod for my Droid X last year. I just figured for the sake of things I'd post it here. The FM App works well with it. (yeah, I'm that addicted to FM Radio . lol )

http://www.droidforums.net/forum/droid-x-hacks/110166-droid-x-antenna-rig.html

(image is PRE Spirit FM Radio app or CM7 install)
[Spirit FM] sfortier:
This commands are the hcitool comands on CM7.1 reference libaudio? I tried then on G5 with errors...

Me and subpsyke get a way to "simulate" almost the same audio routing behavior of G5 froyo. I think that the audio routing is ok, but we still get no fm radio audio. Maybe we need some BT-hci command to solve the issue...

The S5570 problem is the same on G5... We can cooperate! :)
[Spirit FM] _wyrm:
This is Poke, and it's not on any of the broadcom documents that i have. With this command you have direct access to the ARM7TDMI memory, can extract the chip firmware, etc...
[Spirit FM] xmguy:
I have encountered a new error. I get no audio (from any app) from the speaker until i start the fm radio and click on the headphone/speaker icon. Also when headphones are used when the fm app first starts up the fm audio is routed to the ear piece. Once i click on the speaker icon all works as normal.
[Spirit FM] SaurusX:
Mike, I've been testing the latest market version of Spirit FM. This time I was trying it in my car with he cassette converter and the results were MUCH better than before. Almost as good as the car radio, really. Spirit just isn't as sensitive or as forgiving as the stock Moto FM app, though. What really makes the biggest difference in my testing is the quality of the headphones or plug being used as an antenna. Crappy headphones = crappy reception. I have identical issues that xmguy brought up as well.
[Spirit FM] mikereidis:
Thanks ! The good news is that your logs show the FM chip and app seem to work OK with those 3 debug values checked (Off).

Beyond that all I can say is that you were tuned to 103.0 and RSSI was from 14-17, perhaps enough to indicate a weak signal.

I presume you heard no audio. Did you try tuning different frequencies ? Do the signal strength numbers change as expected ? I presume you have a wired headset to act as an antenna.

I can devise some other tests, but I think you won't get audio until we figure out audio on the GT-i5500.
[Spirit FM] mikereidis:
The 3 options that start with "Debug BC" do nothing for TI devices.

But the last 2 options starting with "Debug Reg" are useful for TI and Broadcom both. The default unchecked state means they are on. (Yes, opposite from what makes better sense.)

Debug Reg Dump dumps to the log the first 64 TI registers or first 128 Broadcom registers, immediately after the first power on command to the chip. I'm hoping to learn if different devices have different default register values. I think some devices may start working if I set specific values for certain registers, instead of relying on defaults. If I go much beyond 64 or 128 registers, bad stuff happens. Seems silly to me that merely reading a register kills proper operation.

Debug Reg Verify does a reg_get() after every reg_set() to verify if the value written can be read back. If they differ, a "reg_set verify error" message is written to the log. In some cases, a difference is normal. For example, frequency registers will not immediately return the written value; a "Preset" command needs to be successfully issued first.

----------

I actually saw your antenna mod some time ago... :) And I see you updated that thread to plug my app, Thanks ! :D

I use amplified speakers to the headphone jack for my testing. One wire seems to be the antenna and has a special wire for that. I'm not sure if it's the same wire on all phones, but it seems OK with both my phones, one LG the other HTC.

Do you have a 4 connection jack ? And do you have 1-3 media buttons on the headset wire ?

It's just after 1:00 AM here and many stations reduce power, after several seconds to minutes of no signal. My working location is not too good for reception, so my RDS testing becomes more challenging. Sometimes I wonder if I broke RDS while testing.