yashsingh1/xdaforums huggingface dataset:
[Spirit FM] LenAsh:
Perhaps I'm being thick... at first the problem I described was that AFTER using Spirit, hearing a caller or a caller hearing me was a no-no until a reboot.

Then I added that AFTER making a call (from a fresh boot or reboot), Spirit's audio was very "weird".

So,my previous comment then means once a call is made (and Spirit has not been run), CM11 leaves the audio sub-system in some weird state.

Ignore me if I'm off track...!
[Spirit FM] mikereidis:
Oh, OK.

Yes, if you are having problems, even when Spirit hasn't been run after a reboot, then that's very likely a CM problem, unless you have some audio mod like Viper loaded.

Some apps, especially intrusive or virus apps, automatically run something at boot time. Spirit does not do that, so generally no Spirit code ever runs unless Spirit was started.

One little exception is that using media controls (lockscreen, wired headset, BT) will call a "Notification Receiver" in Spirit, but if FM is not on, it should do nothing and immediately return.
[Spirit FM] Meerhie:
any news on that "spirit2 stops working after 4 mins on ville" thing? sent ya logcat days ago.
[Spirit FM] guhvanoh:
I use Spirit2 on my Z2 fone and I must say over the past few weeks, the sound quality has gone down remarkably. If it wasn't for the fact that I'm addicted to the BBC Radio 4 Today Programme, I'd be screaming on the train into work. That plus the time it takes to unmute...
[Spirit FM] EB10000:
Spirit2

Hi

I'm on Neatrom kitkat 4.4.4 or Galaxy S2. I just purchased Spirit2. It worked great on first install. I was very pleased especially since Viper4Android eq is supported. But then after I rebooted the phone it stooped working. When I launch it get stuck on splash screen. I hit the back key and its does not respond to any key strokes.. No way to close it but by force kill...

Tried uninstalling, booting into CWM clear dalvik, cache and reinstalling from marked. No luck. Tried Nandroid recovery of my rom from a few weeks back. Installed Spirit2 and once again it worked even after reboot. But then while I was using it it froze and I had to force kill it. Rebooted and problem is back... Not working anymore, this time even nandroid restore not helping... Please fix or refund...

Thanks
[Spirit FM] mikereidis:
Do NOT enter decimal points for Volume Scale. :)

In my developer console I can see someone crashed my app by setting Volume Scale to 99.9 .

To make matters worse, it appears that doing this re-crashes the app on each new start.

The easiest solution removes all presets etc. Select "Clear data" under Settings -> Applications -> Manage Applications -> Spirit FM Radio .

To avoid removing all presets, one could edit the file: com.mikersmicros.fm_preferences.xml with a command like:

adb shell "grep -v scale /data/data/com.mikersmicros.fm/shared_prefs/com.mikersmicros.fm_preferences.xml > /sdcard/fm.tmp; cp /sdcard/fm.tmp /data/data/com.mikersmicros.fm/shared_prefs/com.mikersmicros.fm_preferences.xml"
[Spirit FM] mikereidis:
COOL ! It Works !! :) :eek: :D

Pretty simple when it's straight to a paired BT headset.

Yes, audio quality seems pretty AM like, but my BT headset is a $35 cheapie anyway.

At least this will be a proof of FM radio for those wondering if their antenna is connected or not, when we haven't enabled analog audio yet.
[Spirit FM] mikereidis:
If you have the "No Audio" problem, or simply want to test the early direct to Bluetooth headset feature, this August 1st version is available:

http://www.mediafire.com/file/83xx440332bb3eg/Spirit_FM_Radio_v110801.apk

Requirements:

- Basic BT headset.

- Broadcom FM chip.

- Bluetooth must be on, and a working hcitool (or hcitoo) utility available, as on many Bluez BT stack devices. UART mode may never work with this as I suspect I'd need to add a LOT of code to initialize BT RF etc, etc.

I've been noticing some of the recently posted Motorola devices support Bluez (or compatible APIs?) but don't have hcitool. Copying this utility from another phone will likely work; I might include one with my app in future.

You must ensure your BT headset is paired, AND connected. Go to Settings -> Wireless & Network -> Bluetooth settings and ensure you have one BT headset listed that says "Connected to phone audio" or similar. If it's only paired, you should be able to click and connect.

In my app select the 2nd Audio Method sfu_sdcs_bt. (It replaces sfu_sdcs_plus.) Toggle Mute/Unmute or Speaker/Headset and hopefully you will hear audio on the BT headset.

If sfu_sdcs was already working for you, it should continue to work, in addition to the BT headset. If it doesn't work, try the following:

adb shell hcitool con

You should get something like:

Connections:

> ACL 00:0C:78:78:D4:67 handle 12 state 1 lm MASTER AUTH ENCRYPT mtu 1021 credits 6/6

If there is more than one entry, the app only works with the first. The ACL "handle" (12 in this case) is what the app needs to complete this.

I think BT audio is likely best when phone volume is at maximum, and volume is controlled on the BT headset.

I'm not too familar with my cheap Yada YD-V1 BT headset, or any BT headset, but it's making annoying 4 quick "boop" noises in increasing frequencies every 3 seconds now (in addition to the FM audio). My first try it didn't do that. I don't know why it's doing this now. Low battery ? Some phone config ?

I have no idea if this is compatible with making or receiving phone calls while listening. My Broadcom phone is still SIM locked. Please let me know if you can.

Audio quality is somewhat awful, but perhaps not much worse than the speaker. Bandwidth is somewhat less than 4 KHz, even worse than the 10 KHz of AM.

Hopefully we'll find a way to support A2DP headsets and get best quality digital audio to the speakers/analog headsets at some point.
[Spirit FM] denzel09:
I will do others tests with next CM7 release in this week ;)

Ps, about previous post, i have not understand if i must use necessary bluetooth headphone for test your last app version...
[Spirit FM] mikereidis:
Yes, you can try the BT headset test I explained for your "No Audio" problem.

I noted a problem in your logs I think MIGHT be resolved by starting BT before starting my FM app. If you could start BT manually, then start my app and send me the log file, I'll be able to tell if we are getting farther now.
[Spirit FM] mikereidis:
August 2nd versions of the FM and Unlocker apps are now on the Market.

I hope these fix the Unlock problems completely.

- Volume Scale accepts and uses fractional decimal numbers such as 99.9 or 5.4 without crashing.

- Previously unlocked installs should automatically convert to new mechanism.

- Unlocker now displays a code to be entered into the FM app via Menu -> Unlock. Effect should be instant, or power cycle the app or phone.

- Re-Unlocking may be needed if the app is completely removed or if the FM app data is cleared.

PLEASE let me know if you have any problems...
[Spirit FM] xmguy:
Does the app work with the INC 2? I tried it on stock GB and says no compatible chip.

(Fm:BC Sh:1 Su:0 Bt:1 Ht:0 H2:0 Mo:BCU)
[Spirit FM] sfortier:
Ops!

No help on galaxy5... :(
[Spirit FM] xmguy:
If you can support Inc 2 soon. I'll buy. Want to support you! :D
[Spirit FM] psyke83:
Mike, sfortier,

An update on the I5500 Cyanogen port: I added some code to the kernel & libaudio, thanks to OuNao.

For reference, here's the commits:

https://github.com/psyke83/android_...ede50a559291f960af9cb504692858b6500ea#diff-16

https://github.com/psyke83/android_...ede50a559291f960af9cb504692858b6500ea#diff-17

https://github.com/psyke83/android_...mmit/5326eb9b654804b57b5adbb78f92476b7ddc037d

https://github.com/psyke83/europa_kernel/commit/686a73fe1654357075661ae55e3404234f65e2a8

I released version 1.0 of the ROM, but I didn't include these changes. However, I have a hotfix that can be installed with CWM:

http://www.multiupload.com/Z0BIAOA5R6

This hotfix includes the patched kernel, libaudio, and also stock FM radio (just to enable the speaker, and require Bluetooth activation). I understand that the stock FM app may not be useful to use, but it won't do any harm anyway.

The radio is still not working. I'll take a better look at it tomorrow, after I've slept ;).
[Spirit FM] mikereidis:
So this is a Verizon / HTC Incredible 2 ? And apparently it's pretty much the same as an HTC Incredible S ?

I haven't yet had a positive or negative report.

I read that it has a stock FM app, though one report was that the RDS didn't work well. So it should be possible.

It appears your phone has a Broadcom chip and I think you have the Broadcom proprietary Bluetooth stack.

"Su: 0" means you don't have SuperUser / Root (or that you declined that privilege for the app).

If you can root your phone, I think the app will be able to work when Bluetooth is off, by writing directly to the BT chip/UART.

You may still have an audio issue, but we can deal with that once the seems to work otherwise.

EDIT: Stock HTC devices are usually easy to support audio-wise, as they have supported a /sys/class/htc_accessory/fm/flag pseudo-file that is world-writable to select Speaker or Headset.

Without root, or a ROM such as CM7 with the Bluez BT stack, there is little hope unless/until I do a major reverse engineering of the proprietary FM APIs, and even that could be thwarted by permissions issues.
[Spirit FM] mikereidis:
v August 3 is on the Market.

- Re-initialisation fix that will improve/allow operation on some devices when returning to the app after first start.

- Audio Method change mute fix.

- A few UI bugs fixed.

Thanks for the wonderful reviews and ratings ! Unlocker app now shows a 4.9/5 rating with 9 ratings. AND the previously unhappy customer seems to be satisfied now... :)

The base/free app now shows 39674 total installs and 7882 active.

Total of around 50 uncancelled and undeclined sales of the Unlocker now.

I just had my 2nd payday: $141.82 Canadian for the full month of July. Good progress at this early date I think. I think each new device supported results in a spike in new sales.

Ad revenue is pitiful, around $18 total. I may have had bugs related to that, but also the audience for this app is more technical (root), and perhaps less likely to click on silly ads.

So I may remove the ads. Except fot my own, though... :)
[Spirit FM] mikereidis:
Great, thank you !

I think the CM FM app is at least somewhat useful. It's open source, ad-free, and can/should be included in the base ROM. I consider it a "reference FM app".

If someone has issues with my app, the first question I have is "Does the CM app work OK ?". My app and the CM app usually have different bugs, unless it's in the setForceUse() or setDeviceConnectionState() audio stuff.

Once the CM FM app works, my app should also work. The reverse is not necessarily true.

Send me the logs from any FM app, and I'll try to decipher any issues.
[Spirit FM] icke:
Weird...there's still August 2 version on market.:confused:
[Spirit FM] xmguy:
Thank you for the reply. GB is un root able at this time on the Inc 2. Yeah Inc 2 is about the same as the Inc 1 and Inc S. I'm probably gonna go to the CM7 rom once root is obtained. Then I'll buy your app. The RDS SUCKS on the stock FM app. It stops on the PS text but scrolls in Widget mode the PS. No RT, PTY or any other RDS based features. That's why I want your app! BAD!!! :D
[Spirit FM] mikereidis:
Google changed the update interface.

It's now properly "Activated" and "Saved", and I confirmed the update on my phone.
[Spirit FM] mikereidis:
:D

FM on Android is often an afterthought.
[Spirit FM] xmguy:
Yeah. Any phone manufacture needs to be shot if they omit an FM radio LOL!. You should have heard Asurian when I told them my Droid X / X2 replacement MUST have an FM Radio. They were like "can you use Tune-In?" I do use that. But I'm a radio fanatic. I own 3 Radios that can get RDS. 1 I bought on ebay for $80 about 5 years ago from the UK JUST FOR the RDS. I own an HD Radio and many XM Radios. So the work you've put into this app for RDS. I bow to you. If it works I'll pay anything. (well almost anything). I just hope it supports the elusive PI too. :D
[Spirit FM] mikereidis:
BUT, but,... they want you to pay for expensive data plans. Don't you worry that the poor Telco's are going to go bust otherwise ? :D

If PI means Program ID, yes it is supported. along with RT, PS and PT. And the PIs are matched to 3 and 4 letter call signs for the US. If they can't be mapped the numbers turn off after 20 seconds as they annoy some people, but there are still some issues.

If you look at the app screenshots you can see the mapping I made for my local stations that start with "Ott" such as "Ott 88.5 CILV": https://market.android.com/details?id=com.mikersmicros.fm (These can be disabled by switching to United States from default North America, with no other differences now.)

I'm reasonably confident my app will work on the Incredible 2 once root is achieved, if not immediately then after a few tweaks.
[Spirit FM] xmguy:
Yes PI is Program ID. It's the station ID in numbers. I don't give a damn what the Cell companies want.

Do you think there is any way the Samsung Continuum is ever to be supported?
[Spirit FM] mikereidis:
Did something change that immediately lowered audio quality ? I'm not aware of anything that would gradually reduce sound quality.

Perhaps analog support in Spirit1 would be better for you. Should be same as stock then.
[Spirit FM] mikereidis:
Strange...

I think I've had at least one other similar report, maybe in this thread. But I don't think I've seen it personally. I regularly test my GT-I9100, mostly on CM, but often on other ROMs too. GT-I9100 and 9300 are the most popular phones Spirit runs on, so I usually hear of any general problems pretty quick.

Can you check the SuperUser or SuperSU config ? It should show Spirit there as allowed to access SU. This is one of the VERY few areas where first run is different; SU is usually requested only on first run, and tends to be allowed permanently, so subsequent responses are automatic.

I can try to test with Viper again. Last time I tried to get it installed on a few phones, I gave up after an hour or so.

Please email me mikereidis@gmail.com . If you don't have Spirit1 I'd like to send it to you to test,
[Spirit FM] mikereidis:
OK, I don't recall getting a logcat from you and I can find any in my email under your email names/addresses or with "ville" in the title, as would be expected for a Spirit1 log.

Do you have Spirit1 and does it show the same issue ? I've sent you Spirit1, can you send a Spirit1 debug log immediately after the problem happens ?

For the best debug log, from Spirit1, tap the frequency button, enter the number 7 and tap "OK". After 20 seconds or so, press Send from your email client.

Hopefully there will be some clues in the log. Other than that I don't know why this might happen. Nobody is reporting anything like this on ANY phone, and I don't see it on any of mine, including OneXL and many other Qualcomm FM chip devices.

BTW, yes, Bubba kernel from a month or 2 ago has problems with WiFi. I see that on my OneXL running CM11 from the last month or so. It works fine with the CM kernel, where something was changed recently.

I think we aren't going to have much luck running the latest ROMs and kernels on OneS/OneXL, unless some ROM/kernel dev with a good kernel includes the needed FM driver support.

Until I recently got that special built Bubba kernel, I was stuck running the CM11 M release from Jan 4, 2014. If you don't insist on the "latest and greatest", this may be a good bet for you too.

If we haven't already, it would be nice if we could confirm (or un-confirm) that it's the kernel you are using that is related to the problem.
[Spirit FM] mikereidis:
I hope you don't mind my responding on XDA, so everyone can gain.

Good. :)

By default, Spirit1 uses analog (or "non-digital") audio, and that is the main audible difference compared to Spirit2. Spirit1 can be set for digital audio, via Menu-> Settings-> Audio-> Method = "Digital Auto".

In Spirit2, swipe from right to left and enable/check "Visual". That's much more useful/interesting than the default dial, and it doesn't suffer from the buttons too close UI issue with the dial. Maybe I should make Visual the default.

I'd be lying if I said I had enough time to investigate in any detail kernel specific issues reported by one person. Sorry...
[Spirit FM] EB10000:
Thanks. No problem. DorimanX test builds are updated on an weekly basis average. I'll test future builds and report back...

As or the Visual check-box on Spirit2, I'm afraid I found another bug. Switching to Visual disables EQ support (Viper4Android FX latest version).

Can you confirm this?

Thanks
[Spirit FM] mikereidis:
I don't have Viper installed on any phone, so I can't confirm.

Spirit does "normal, standard" stuff for the Visualizer so I'm not sure there is any "fault" in Spirit.

EQ's intercept audio, and modify it. Visualizers also intercept audio, so it's understandable that there can be conflicts. They are designed to work together though, so any conflicts are likely due to a bug somewhere, in Android, in the HALs, in the kernel, in the EQ, or almost anywhere.

For Spirit, the interception details are handled by Android; Spirit just uses a few simple, standard APIs to get the waveform and FFT data.
[Spirit FM] mikereidis:
Spirit2 September 10 (0910): http://d-h.st/Iau

Also on Play for Beta test customers: https://play.google.com/apps/testing/fm.a2d.s2

VERY Experimental !

Google Now audio defense:

- Google Now "OK Google" hotword detection is becoming more of a problem. This experimental defence temporarily renames the "PCM device" that Spirit2 and the Google Search app (for microphone) may "fight" for.

If Spirit2 crashes, audio may be messed up a bit. Start and stop Spirit to restore.

Speaker for all:

- Devices without a working speaker mode now work, specifically GS2 GT-I9100, Note1 GT-N7000, and GS1 GT-I9000 (but with low volume for GS1). Other devices may see changes.

LG G2 and Xperia Z2 still use the old Spirit1 method of switching speaker and headset. That method is sometimes problematic and can be very different between phones and even ROMs for one phone.

Except for these 2 exceptions, the code for headset/speaker selection is now the same for all devices, and uses more standard Android higher level APIs. Basically, Spirit2 speaker mode sets up audio as if it's a Voice/VOIP call. This provides the only standard known way to enable/disable "SpeakerPhone" while a wired headset is plugged in (for FM antenna only.)

But volume is handled differently in the SpeakerPhone mode. It is "Call Volume", not the usual "Media/Music Volume". Volume will only work when the screen is on and unlocked (for some crazy reason). A notable issue is that Call Volume only has 6 steps, instead of the usual 15, and volume can not be reduced to zero.

44.1K sample rate for all:

- Even when audio chips, such as Qualcomms', used on all non-Samsung devices, use 48K sample-rate natively, there are sometimes circumstances where using the base, Android standard "must always work" 44.1K rate may be better. For example, when using a BT headset that doesn't work well with 48K rates.

At some point, this should be selectable, as in Spirit1. But for an experimental release, all 44.1K.

GT-I9000 volume boost:

- Audio sample values multiplied by 3 for better volume. Speaker is still very low, but at least it's working now.
[Spirit FM] guhvanoh:
I'll stick with Spirit2 tho I have both. It would be nice to get the near instantaneous sound back when unmuting instead of having to wait for 5 secs. At first I thought that I'd done something wrong and needed to restart Spirit2.
[Spirit FM] mikereidis:
Yeah, it IS pretty long; most devices take a second at most, often quicker.

On stock ROM, I did this:

setDeviceConnectionState (0x80000, DEVICE_STATE_AVAILABLE, "");

For AOSP ROM I have to do:

utils.alsa_bool_set ("SLIMBUS_0_RX Port Mixer SLIM_0_TX", 1);
utils.ssd_commit ();

// <path name="capture-fm">
utils.alsa_bool_set ("AIF1_CAP Mixer SLIM TX7", 1);
utils.alsa_enum_set ("SLIM TX7 MUX", 9); // DEC2
utils.alsa_enum_set ("DEC2 MUX", 2); // ADC5
utils.alsa_int_set ("DEC2 Volume", 80);//83); // !! default 84 distorts on CM11
utils.alsa_int_set ("ADC5 Volume", 4);

utils.alsa_bool_set ("AIF1_CAP Mixer SLIM TX8", 1);
utils.alsa_enum_set ("SLIM TX8 MUX", 8); // DEC1
utils.alsa_enum_set ("DEC1 MUX", 2); // ADC6
utils.alsa_int_set ("DEC1 Volume", 80);//83); // !! default 84 distorts on CM11
utils.alsa_int_set ("ADC6 Volume", 4);

utils.alsa_enum_set ("SLIM_0_TX Channels", 1); // 2
utils.ssd_commit ();

utils.alsa_enum_set ("CLASS_H_DSM MUX", 1); // DSM_HPHL_RX1
utils.alsa_enum_set ("RX2 MIX1 INP1", 6); // RX2
utils.alsa_enum_set ("RX1 MIX1 INP1", 5); // RX1

utils.alsa_bool_set ("HPHL DAC Switch", 1);
utils.alsa_enum_set ("SLIM_0_RX Channels", 1); // 2
utils.alsa_enum_set ("SLIM RX2 MUX", 1); // AIF1_PB
//utils.alsa_int_set ("Internal FM RX Volume", 37);
utils.ssd_commit ();

utils.sys_run ("/data/data/fm.a2d.s2/files/ssd 5 8 44100 2 /dev/snd/pcmC0D25p /dev/snd/pcmC0D25c &", false);//true);

I hope I find a less intense method.
[Spirit FM] guhvanoh:
I am on stock .314 tho. So I'm guessing that should work. On my SGS3, it's not a problem at all. Unmuting is instantaneous.
[Spirit FM] Meerhie:
[MENTION=3575078]mikereidis[/MENTION]

i have answered your mail and will send spirit1 log, too, if the problem appears with spirit 1 on ville. btw: spirit2 generally runs on htc one mini ( m4 )? it did start, but my kernel does not have radio iris yet.
[Spirit FM] mikereidis:
August 19 release does it the old stock only way: http://d-h.st/onL

I presume that's faster ? Is audio quality about the same ?

I should detect stock ROM and do it that way for stock.
[Spirit FM] Meerhie:
what i can say about spirit1: sound gets away every 13 seconds for 1 second. entering a frequency directly doesnt work ( like in spirit 2 often ) and pressing backward search makes spirit1 moving forward in freqency band. ( just one or two times ). but the main problem of spirit 2, stopping completely after 4 mins, does not happen.

i cannt send you the log now, cause my Ville does not have any internet connection right now. at home i can send it through wireless.
[Spirit FM] JustArchi:
Thank you Mike!
[Spirit FM] mervluk:
Yep. I found I had to disable Google Search on XZ 4.4.2 to escape the Google Now bug constantly interfering. Tried the latest 10.09) Spirit2 version but after use of any other player app, Spirit would have no audio no matter what (stop/start, fc) until a reboot. Tried several times again and same thing happened, also happened after any system sound. And when Spirit2 has no audio on my phone Spirit1 doesn't either, whereas normally after using Spirit2 then Spirit 1 (digital audio) goes mono only until a reboot. Have reverted to Spirit2 (Aug 30) and all is good, with the occasional silences (up to one minute) but it almost invariably comes back without any user action, which is only a slight inconvenience far outweighed by the superior audio quality.
[Spirit FM] dsvictor:
wtf!

I bought this app from play store. And I was using this app from the last 1year, this app is amazing. But today I formatted my handset and try to install it again. It says some this like this in the photo attached. Dev please look into this.
[Spirit FM] nicesoni_ash:
Error meant your credit card expired however if your have bought this app, you shouldn't have this error. Just mail mike ur details and he will help you.

_____________

Sent from my GT-I9300 powered by Temasek Rom & Boeffla Kernel

Fueled by 7000mAh ZeroLemon Battery
[Spirit FM] mervluk:
Or, I have this problem when I reformat with a number of my apps that make a licence check. The solution is that Titanium Backup (if you had it installed) has an option to restore the original Android ID to your phone which cures it and allows the correct check. For just Spirit I think the Dev can supply you the app. I think send him an e-mail from your google address you used with the original Play account under which you bought the app.