yashsingh1/xdaforums huggingface dataset:
[Spirit FM] mikereidis:
Thanks for the clarification seraser and sfortier.

OK, so this phone supports FM as stock so clearly it's possible.

So this is subpsyke's unofficial CM port. I've asked on his thread here. I looked at the libaudio source at https://github.com/psyke83/android_device_samsung_galaxy5/tree/gingerbread/libaudio and I can see there's no FM audio support yet.

I imagine it will be added at some point, and my app and the CM app will be able to work.

But we might be able to enable it more directly by sending Ioctls to the /dev/msm_snd driver.

Are you able to run adb commands from a connected PC, or shell commands from a terminal emulator ?

If you run:

adb shell /data/data/com.mikersmicros.fm/files/ssd 1 0

or on the phone:

/data/data/com.mikersmicros.fm/files/ssd 1 0

you will hopefully see a list of audio devices. If there are any than contain the letters "FM" or otherwise look like they might be for FM Speaker or FM Headset, then the number could be used:

adb shell /data/data/com.mikersmicros.fm/files/ssd 1 NUMBER

and that will hopefully enable FM audio for you. Best to do this while the FM app is running.

Also, your device might support ALSA FM audio switching. This command may show us useful information:

adb shell /data/data/com.mikersmicros.fm/files/ssd 4 0

It's the same as above except the second last number is 4.

Thanks !
[Spirit FM] mikereidis:
Keying on length is possible. But I can't imagine a good algorithm to determine when they "seem to be reversed". Yes we humans can do that but computers aren't that intelligent; they just follow simple orders.

I could possibly do something on a station by station basis to swap them. IE. you configure that this station swaps them but others don't.

But I think that trying to "de-scroll" blocks of 8 characters so they fit into 64 characters is going to be impossible to do except possibly for that one specific station that's bothering you. It might be easier to petition the station to change, LOL. :)
[Spirit FM] kushdeck:
mirror:

http://dev-host.org/tv3blk5jkobq/Spirit_FMRadio_v202.apk

-deck
[Spirit FM] mikereidis:
Yes, I'm afraid I think the Spica will never have FM radio. The best thread I found is: http://forum.samdroid.net/f38/fm-radio-spica-under-development-2674/

I also looked at the schematic again and saw no sign of hope.

IF the FM antenna/headset wire is hooked up it might be possible, via digital audio if need be.
[Spirit FM] mikereidis:
This is the first posted version 2.02 It's ancient now

I see you are doing this on lots of threads, and your PM seems spammy

Silly me, I still have a working link to that version in my first post last edited May 9 !
[Spirit FM] FiendFyre:
Still doesn't seem to work for d800 :(

Says I have to have a gs3/4 or some other phones and the actual app just seems dead as well.
[Spirit FM] mikereidis:
Ohhhhhhhhhhhhhhhhhhhhhhhhhhh !

Spirit1 may work if you manually set Audio-> Method to "Digital LG2".

Spirit2 is much more picky than Spirit1 about using the ROM's "ro.product.device" to identify the device.

Sadly, many ROMs now use custom, non-standard values for ro.product.device, which I believe also affects which apps can or can't be downloaded from Play.

The official LG value is "G2". I also added support for "LS980" which is used by the CM11 for the Sprint variant.

Long term solution for Spirit2 is to find better ways to identify the device. Spirit1 uses other clues, but has a CRAZY amount of very complicated and fragile code to do so. Eg. consider that many modern ROMs, stock and not, have firmware files for 2 or more OEMs of Bluetooth chips. So just detecting firmware files doesn't guarantee which FM/combo chip is present.

Short term for Spirit2, I can try to download a bunch of variant ROMs to see the values and accommodate them. If would help if you can provide a URL to your ROM, or the ro.product.device value in /system/build.prop or visible via "adb shell getprop".
[Spirit FM] yigal66:
For D800 ro.product.device is g2. I hope it help to make FM working on our phone.
[Spirit FM] FiendFyre:
The value I found was d800

Edit: Changed the ro.product.device to G2 and I'll find out what happens

Had a friend install Spirit 1 on my d800 so I could test it, and it gives me a power error? The phone was literally plugged in.

The exact message was "SU:2 FM:QCV Su:1 Bt:3 Ht:0 Mo:V4D"
[Spirit FM] mikereidis:
That indicates a Qualcomm V4L driver was detected. The Sprint G2 uses a Broadcom chip for BT/FM/WiFi.

The D800 doesn't use Qualcomm WCN3660/3680 chip for BT/FM/WiFi, does it ? The D803 service manual shows Broadcom.

Maybe a custom kernel ? Or just a vestigial driver that can't work.

Set Menu-> Settings-> Debug-> FM Chip to "BCM 433x/207xx" and restart Spirit.
[Spirit FM] mikereidis:
"g2" is the stock value for ALL G2's, no matter the variant, AFAICT. Stock ROMs make life easy in this regard.

But all the different CMs for G2 variants use different values.

Here's Jan 16a beta of Spirit2: http://d-h.st/lBF

It recognizes these ro.product.device values:

ls980

vs980

d800

d801

d802

anything starting with "d80"

Alternatively, for all CMs for all G2's, ro.product.board can be set to "galbi".
[Spirit FM] FiendFyre:
I'm guessing that it's probably because I'm using CM 11 and there is something wrong with the kernel as you said.

What you said to do worked and the app starts up fine now, just not getting audio. The top left says -17 if that helps.
[Spirit FM] mikereidis:
Did your ATT D800 come with a stock FM app ? Or has anyone shown that the FM can work ?

If the wired headset was plugged in as the antenna, then RSSI values at top left should be over 20 when tuned to a good station.

Negative or zero values tend to indicate the FM antenna pin is grounded, rendering it incapable of ever working.

I've been looking through the 3 LG G2 service manuals I can find, for:

LS980 - My Sprint

VS980 - Verizon

D803 - Canadian

Only the Sprint LS980 shows usable FM connections, for antenna, and connections to a switch chip that switches between Bluetooth and FM. (I haven't even tried FM over BT yet; it may not work.)

So, even if some variants had a usable FM antenna connection, omitting this switch chip would also kill any chance of getting usable FM, at least not with audio. (Though I may figure out audio over HCI at some point.)

Anyway, I guess these are the G2 variants out there. I need to figure out which ones have usable FM and which don't. Any help would be appreciated.

Clearly the LS980 Sprint has FM. And International D802 also ?

D800 AT&T
D801 T-Mobile (& Wind Canada)
D802 International
D803 Canada ? Similar to D802 International ?
D805 Latin America
F320 Korea F320i F320s F320l Similar to D802 International
LS980 Sprint CDMA/LTE
VS980 Verizon CDMA/LTE

EDIT: LenAsh has Jan16a Spirit2 working on D802 International.

I'm beginning to suspect that ATT, TMobile and Verizon G2s are all unfixably FM disabled. Only US G2 w/ FM would be Sprint LS980.

I think these may all be good, and no others so far (D804 ?):

D802 International
D803 Canada ? Similar to D802 International ?
D805 Latin America
F320 Korea F320i F320s F320l Similar to D802 International Korean model also has fm radio.
[Spirit FM] MagicLogins:
Using d802 with latest CM11 nightly and this is working very good for now, with not a single tweak to do! You sure are the Radio Android Boss! :good:

a question, is there a possibility to set the a2d.fm as default 'headset plugged in' app and use the headset buttons to switch between favorites? or is it only a spirit1 feature for now? I really don't know which app to buy :eek:
[Spirit FM] tigourubu:
XPERIA ZL - CM 11 - No audio

Hi,

I need help,

After update to cm11 my spirit it's no audio

The before audio method the spirit fm is HTC oneS/X LTE ALSA.

And now? You can help me?
[Spirit FM] shaq1907:
Spirit FM seems incompatible with LG G2 D802 in Google Play for my country:

https://play.google.com/store/apps/details?id=com.mikersmicros.fm_unlock

I know that Jan 15 beta works well with LG G2 (even in Turkish firmwares which is disabled by software, thanks for LG G2 support). Is it incompatible now because it's not final version yet?
[Spirit FM] FiendFyre:
Oh... that sucks, thanks for trying though.
[Spirit FM] mikereidis:
I'll take that as the 1st report that ATT G2 FM is impossible.

Sucks for me too.

I'd guess, based on the posts in each G2 variant specific section, that FM will only work on about 25% of the G2's in the hands of XDA users.

My initial G2 enthusiasm was stoked by it's popularity, but now I'll need to divide the popularity factor by 4.

Demand for FM is always highest on devices where no stock app exists or works. Demand is especially high when FM is impossible, even with root etc. LOL.

I get emails EVERY day about GS4 and Note3. "I'd be happy to buy your app if..." LOL.
[Spirit FM] FiendFyre:
Haha yeah, too many people don't understand the hardware on their phones... you need the chip to be able to use radio, can't just enable it with software.
[Spirit FM] mikereidis:
I'm not too familar with the "headset plugged in" app concept. But Spirit2 should act not too different than other media apps. Try it.

Spirit2 supports media buttons. ROMs usually translate a long press of media buttons, when screen is off, to "fast forward" or "rewind" I think. Spirit2 maps these to tuning, usually between presets, but seek is done if less than 2 presets are set.
[Spirit FM] mikereidis:
There's LOTS of confusion out there that I read every day about FM on Android.

Almost every phone and tablet uses a BT/combo chip, and almost all of them have FM capability.

So the basic hardware is almost always there.

But there are many ways to disable or sabotage FM; the software methods can usually be bypassed, but that usually requires root, sometimes requires a custom kernel, may require a different HCD file, etc.

Sometimes there's just too much work for me to do to support a device stock, so I just concentrate on AOSP ROMs. So sometimes I simplify and tell people it's not possible, instead of explaining why, in the full technical detail to be accurate, which many people will never understand anyway.
[Spirit FM] mikereidis:
If you're a customer, please send me an email.

Quick answer is "I don't know".

Maybe it's the permission problem I worked around in recent releases. The last free version of Spirit1 was in September and doesn't have this fix.
[Spirit FM] mikereidis:
Thanks for the reminder. I disabled many phones on Play, such as G2, because I wasn't able to support it. I can re-enable, but I should wait until there is a G2 friendly version "in production" instead of just "in beta".

Spirit2 should be open to all devices.
[Spirit FM] francyesco:
Im using D802 CM 10.2, when i open the app its just putting itself on a random frequency and than the phone just reboot :( i have no hearphones plugged in, its necessary ?
[Spirit FM] mikereidis:
Yes, plug the wired headphones in.

I often don't test with them out, though it generally works, albeit with reduced signal strength/quality.

If you normally have Bluetooth on, turn it off, or vice versa.

I'm running and testing with CM11 latest nightlies. I don't see any compelling reason to go back to CM10.2 or earlier at this point for a newly supported phone.

Rebooting happens every time when starting FM on stock ROMs, when using Spirit2 or Spirit1 digital audio modes, or anything that accesses ALSA with SU/root.

I haven't figured out why yet, except that it's likely some kernel issue related to the kernel audio drivers.

Maybe CM10.2 uses a kernel more similar to stock than CM11.

And there is no guarantee that the results I see on CM11 for the Sprint LS980 variant are the same you'll see on other variants, with at least somewhat different CM ROMs. If there was sufficient demand, I'd consider getting a d802 at some point; would be nice to have a device I could stick my SIM in and use as a real phone for a while.
[Spirit FM] kraseto:
Worked well on Sony Xperia Z (C6603) with CM 10.2. The version is 2013_12_27 and the audio method is "Digital OneXL/S/Sony".

Thanks man!

:good:
[Spirit FM] kovacsakos91:
How can I use Spirit FM on my Sony X8? It does not working with the default configuration.
[Spirit FM] LenAsh:
Do you see it in the supported device list???
[Spirit FM] kovacsakos91:
No, but there is not any offline fm radio app for x8??
[Spirit FM] mikereidis:
I can only support 2012+ Sony devices.
[Spirit FM] Fnord12:
Quick G2 question: Any idea of when support for the (Sprint) G2 is going to make it out of beta for either Spirit 1 or 2?

Haven't gotten around to buying Spirit 2 yet. (yes I know I can get it for free as I own Spirit 1 but i'd rather buy it)

I just hope it works on CM10.2 (media transfer wasn't working right on CM11 for me, CM10.2's been flawless so far)
[Spirit FM] Mohanned85:
does this work on htc one using cm11?
[Spirit FM] mikereidis:
I've been wondering if I'd EVER officially support LG G2 w/ Spirit1. I added support in Spirit1 primarily because Spirit1 is a better test app than Spirit2 at present. It has many configurable settings that Spirit2 does not have, can support OEM proprietary FM APIs and has many audio methods.

And there has to come a time when new device supports are added only to Spirit2 and not to the "old" Spirit.

Besides that, on AOSP ROMs, what's holding back Spirit1 is the lack of a working non-digital audio method. G2 requires ALSA PCM "hostless transfer" that deals with 2 ports, instead of the usual 1, and I haven't mastered that yet.

I've been meaning to post about the audio stuff I've been working on the last week and a half. This post gives me the opportunity:

Broadcom and Qualcomm FM chips have audio ticks sometimes when doing digital FM audio on Spirit1 or Spirit2. On Spirit2 I've spent 10 days now re-architecting the audio to fix this, despite that the majority of Spirit customers use Samsung devices that don't have this problem.

IMO Google has really messed up with Android audio over the last 4 years. There are 4+ years of complaints from devs about this, and though there have been some nice recent improvements, Android audio still sucks.

They've messed up because there's no way to guarantee not getting audio defects/ticks etc. when using the official Google Java Audiotrack APIs that should support defect free playback. At minimum, every once in a while Java "garbage collection" kicks in and the audio hardware starves for new buffers.

So, I've descended down this "rabbit hole" of Android high performance audio. After reading for days, and watching a Google I/O 2013 video on audio, I've made some nice improvements. Using the low level C/NDK OpelSL ES audio APIs that good game devs use helps. Matching the hardware native sample rates and buffer sizes also really helps on many devices.

And yet there are still some problems, especially on my HTC One so far. Google's answers include adding precise time measuring and logging code, and using other low level tools to engage in a hunt for clues about what's going wrong and how to fix it.

And it's appearing to me that the problems are much worse on stock ROMs, and maybe essentially unsolvable. AOSP code is better. Even Google's IO video indicated that some OEM's stock ROMs were much worse, without mentioning the OEM's names of course.

Topping it all off, the OpelSL ES API does not provide visualizer, equalizer and other effects by default. These MAY be available, but EQ and effects may require a lot more code from me to support. I haven't even tested if Bluetooth audio will work.

I wonder how many people really need EQ and other effects. I've gotten used to using my favourite settings, but with decent headphones, cleaner unprocessed output can be pretty good too.
[Spirit FM] marcolnx:
Hi Mike sorry disturbing.

After testing the free versions I pay for UL version for my u8800 pro.

Now accidentally upgrade with play store but now not working more.

Reading the u8800pro forum i found that the last working version it is 5 March 2013. May i have this version or earlier of spirit UL? Now i'm using the free version of 22 April 2012 (working) . Thanks a lot.

Marco

Sent from my u8800pro
[Spirit FM] Fnord12:
Well.. good news and bad news.

Good news is that I got in on the Spirit 1 beta. Bad news is that Spirit just causes CM10.2 to reboot. Discovered this while attempting to follow the guide to getting spirit working with the LG G2.

It goes from "Please Wait" to frozen and reboot time.

guess i'll have to wait a bit and upgrade to CM11 once they get MTP working properly.
[Spirit FM] eLseven:
works fine on my ace 2, always stereo in poor signal never turn to mono, but in core duos it always turn to mono and then stereo again, sounds bad
[Spirit FM] mervluk:
As a mere user I agree with you about the mess of stock Android audio. I think that's part of the reason why those of us on Stock Roms root, and use system wide audio mods if we're interested in music or other decent listening audio (which Spirit is part of). (I surmise those on custom Roms may have less need, and perhaps opportunity, so need Spirit to do its own thing). So I've always wondered about what added benefit we get from the new bells and whistles of Spirit, apart from the problems? I'd like to see what, if any, difference the mods you've made so far make to the audio glitches that Spirit suffers (but other audio services don't) - that's where I thought the issues were.

But on the other hand, having got Spirit1 and an audio mod working in (what seems to me) a perfect marriage, it'd take the proverbial wild horses to move me back to Spirit2, so I'll await others' verdicts. (Not least in case of the "there's three of us in this marriage" problem I've had previously, if you see what I mean!) Meanwhile I still think of Spirit2 as "all or nothing" and Spirit1 as offering a bit of pick-and-mix to experiment between versions and settings, necessary to get the best out of it.
[Spirit FM] rman500:
Will it work on the Huawei Glory?

I have a Huawei Glory H868C and can't get Spirit FM to work. I know that its not on the list of supported devices, but this phone comes with a stock FM app. However, the stock FM app sucks, so I was wondering if there were some special settings I need to try or if it just won't work.
[Spirit FM] luck33:
Very good online FM app, thanks for sharing.
[Spirit FM] unxdabar:
Bluetooth and Spirit Unlocked

Hi,

Device: Galaxy S3 GT-I9300

Headset: Bluetooth Sony MDR-1RBT

Is it posible to use without cable over Bluetooth?

The S3 need a cable with 3.5 mm phone connector as antenna.

regards
[Spirit FM] mikereidis:
I (almost) always have time for customers/supporters. :)

2012 releases are ANCIENT now.

Here's the free version for March 5, 2013, for you or anyone to verify it works: http://d-h.st/DVI

Please email me for Unlocked. I'm tempted to just post it, but some customers don't like that because they feel they've paid and others got the same for free.

I hope you're aware of why support was removed. It was a necessary part of cleaning up the code; there were just too many special cases in the code for this phone, and even with those I think there are known problems.
[Spirit FM] mikereidis:
It may help to set some options manually.

Remove and re-install, or clear app data. Then when Spirit starts, hit Cancel or Back to prevent it from starting. If it crashes before this, deny SU to Spirit.

Then set these under Menu-> Settings:

Debug-> FM API = Low Level

Debug-> FM Chip = BCM 433x / 207xx

Debug-> HCI Access = UART for Bluetooth off operation

or

Debug-> HCI Access = Bluedroid Shim for Bluetooth on, but restart Spirit then reboot

Audio-> Method = Digital LG2 (which only works on Unlocked)
[Spirit FM] mikereidis:
It's always very difficult to support phones I don't have.

With paid versions of Spirit you can try changing Menu-> Settings-> Audio-> Channels to see if that helps.
[Spirit FM] mikereidis:
If starting Spirit doesn't produce a "Device not supported" popup, then:

If you know the FM and audio chips and can set corresponding Spirit settings, it might work.

I don't have the resources to look into this further myself.
[Spirit FM] mikereidis:
Yes. Try Spirit2, or Spirit1 Unlocked with Audio-> Method set to "Digital Auto".

But I think stock ROMs may refuse to play over Bluetooth if a wired headset is plugged in (all the way).

It definitely helps reception. But the S3 CAN work without an external antenna, with strong transmitters. Spirit does not enforce having a wired headset plugged in, though the Samsung stock FM API won't allow it.
[Spirit FM] rman500:
I am able to start the app without getting a "Device not supported" popup, however I do get a popup that says "Power Error / SU: 0 FM: bc. As far as my fm and audio chips go, I do not know them. If you have any suggestions on how to figure out what they are I would greatly appreciate it.
[Spirit FM] Fnord12:
Well, progress, of a sort.

Steps I did:

Turn Bluetooth off

Start spirit, hit stop

Change FM API

Change FM Chip

Change HCl access to bluedroid shim (I like leaving bluetooth on for the car)

Attempt to close app with power button, watch as spirit enables bluetooth then freezes and reboots.

Start spirit post reboot then hit stop.

Go to change Audio method, freeze and reboot.

post reboot, start spirit again. notice audio method never got changed.

tried the steps for BT off and Uart for HCL and it still reboots at Audio method.

guess spirit doesn't like CM10.2 or something? i'll have to try upgrading to CM11 later or something.
[Spirit FM] mikereidis:
SU:0 indicates your phone is not rooted or Spirit doesn't have root/SU.

Without SU/root, it will be even less likely to work.
[Spirit FM] rman500:
But my phone is rooted. I tried removing Spirit from Superuser and then re-granting it root permissions, but the only difference was that it now says SU: 2 under the Power Error. Do you think I should just mess around with the settings some more and see if I can make anything work?

Thank you for taking the time to help me
[Spirit FM] mikereidis:
Yeah, it's the digital audio, and digital is the only method that works on AOSP right now.

I saw the exact same problem on stock ROM; Change audio method to digital and it reboots.

My guess is that the CM10.2 kernel is the stock kernel, or very similar.
[Spirit FM] mikereidis:
Email:

Hi, A search by your email address indicates you're a customer of the full Spirit Unlocked, not Light. :)

I will be dropping Spirit2 price for at least 24 hours on Feb 1, and every 1st of a month.

I can also cancel Spirit1 orders, for an upgrade of the difference in price. I request that anyone asking for a refund read this: http://xdaforums.com/showthread.php?p=49414141

There's another recent post about pricing here too: http://xdaforums.com/showpost.php?p=49630182&postcount=366

Thanks,

Mike.
[Spirit FM] Fnord12:
Bother, well thanks for the help. Something tells me Spirit 2 (bought it a couple days ago, got in on the beta earlier) is failing for much the same reason.

Attempting to shoehorn CM11 on it now.

edit: woot, CM11's working.. posting in the other thread now
[Spirit FM] eLseven:
it doesn't work sir even i turn to mono force, sounds weird if sound doesn't constantly stereo or mono.

it occured to stock fm radio app too, but in my ace 2 spiritfm always sounds stereo

thanks for replying sir
[Spirit FM] mikereidis:
This Jan 15 beta is now active on Play, but in a staged rollout for non-beta users for only 5% today. I wonder if new buyers always get the new version when staging a rollout ?

The main change, as quoted from Jan 15, is support for LG G2. On AOSP ROMs besides CM11 you will need to manually set Audio-> Method to "Digital LG2".

I've also enabled G2 on Play for purchase now. Sadly, since LG used one stock "G2" device name for all variants, this will result in many disappointed users of Verizon devices, or others that can't support FM. Maybe a popup would be nice for this.
[Spirit FM] francyesco:
So, Just a stupid question, how LG can have a working version of theyr FM APP on stock? Impossibile to replicate?