yashsingh1/xdaforums huggingface dataset:
[Spirit FM] mikereidis:
Thanks ! Got it, no problem...

I think the dev just decided modules support wasn't needed. And he was right, except for FM.

That's how it's been since January. It's not a Spirit issue, it's a Qualcomm FM "transport" driver issue. The radio-iris-transport won't load unless it's a module. That's a Qualcomm source code "limitation", or "bug" if you will.

That's not a problem; the exception is caught on purpose. I added this code so Spirit will detect the lack of modules, and refuse to try and use /dev/radio0 in that case. Otherwise, the kernel crashes and reboots the phone, and people see that as a Spirit bug. Better not to work than to crash/reboot.
[Spirit FM] mikereidis:
Official Sony Z series support coming:

Xperia Z1 C6903 now purchased: http://www.ebay.com/itm/Sony-XPERIA...ED-2-2GHz-Quad-Core-20-7MP-16GB-/200997148747

Must be "buying week", LOL. I presume "Factory Unlocked" pretty much guarantees an unlockable bootloader.

I went with Z1 because it's reasonably recent, and my sales stats show that Z1 and Z1 compact pretty much pay for the phone. Xperia Z is popular too, but I think/hope that Z1 testing will cover the original Z and it's variants.

AFAICT, pretty much every Sony phone (and 1 tablet) from Xperia T (September 2012) to Xperia Z1 compact (January 2014) uses Qualcomm FM/combo chip and Qualcomm audio.

I'm guessing that my Z2 Tablet, and the Z2 phone are the start of a series using Broadcom FM/combo chips with Qualcomm audio. Or maybe they'll go back to Qualcomm; hard to say.

I'm still looking forward to an official Z series Spirit FM Transmit app, but I'm pretty sure it won't be possible on the Z2 or other Broadcom FM/combo chip devices.
[Spirit FM] LenAsh:
Pretty sure the Z2 Phone is Qualcomm FM... but the CM11 download has a BCM Wifi driver... eek

radio-iris-transport and init.qcom.fm.sh are present though
[Spirit FM] mikereidis:
Yeah, Same on my Z2 tablet.

I checked the Z2 phone info I could find and found enough evidence it's Broadcom FM/combo too.

Pretty much every phone with Qualcomm SOC has Qualcomm FM stuff included, whether the chip is there or not. That's part of the reason GPEs such as MotoG, Z Ultra and M8 (?) leave the FM driver there, to my benefit.

It's been common for 1-2 years now for OEMs to build "Universal ROMs" for all/many of their phones, and even more so Universal kernels. Makes the work much easier when there are many phones and variants to update.

This made the original FM and audio chip detection code in Spirit unreliable, requiring a lot of now half-broken ID tricks, LOL.

Vestigial Broadcom stuff is also common on Qualcomm FM chipped devices. On custom and AOSP ROMs as much as stock too. There are now huge numbers and phones that the most popular ROMs run on, such as CM, AOKP, and many others.

Right now there only seem to be 2 important OEMs of FM/combo chips (Besides Mediatek in the "developing world"): Qualcomm and Broadcom. TI is dead and Silicon Labs was for Samsung flagships that no longer have FM. Qualcomm has done well the last 2 years, but Broadcom started as the leader, and is making a resurgence.

On the plus side with Broadcom, I see a new libbt-fmrds.so library, that I'm hoping is a better solution than my UART and BT shim modes. Qualcomms purpose built V4L FM driver is a lot easier than trying to share FM with Bluetooth over the same comms channel.

Spec and review sites usually talk SOC only, and sometimes audio chip. It's very rare they mention the FM/combo chip, unless it's a teardown of the most popular/anticipated flagships. That's my excuse for buying a device without knowing the FM chip... ;)
[Spirit FM] mikereidis:
Both Spirit1 and Spirit2 are updated on Play. Spirit1 is a 10% rolling update, to try and ensure fewer problems. Spirit2 is 20%. Beta testers are 100%

Spirit1 July 18:

- LG G2 audio fixes.

- Plus previous test releases after last "production" April 8 update as briefly described here and in more detail in the quoted text below.

Jul 9:

- Restrict BT shim install to HTC One M7 and LG G2 (unless HCI Access=Shim).

- BT shim removal via Menu-> Test-> BC-> BT Shim Remove/

Jun 28:

- LG G2 audio.

- Bluedroid BT Shim addon.d recovery restore script for Broadcom (DHD/One/G2/etc).

- Audio-> Method renaming.

- Sony QC Transmit.

Spirit2 July 18:

- LG G2 audio fixes.

- GS3/Note2 & G2 speaker mode.

- Plus previous test releases after last "production" April 13 update as briefly described here and in more detail in the quoted text below.

Jul 9:

- Enforce unknown.

- Detect One, G2.

- Menu BT Shim install/remove.

Jun 28:

- LG G2 fixes.

- Sony = Internal Antenna pin.

- Re-enable RSSI.

- Code 46 = Remove BT shim.

- Speaker mode volume for some.

- HTC One Mini -> One.

Jun 21:

- GS3/Note2 stock 4.3-4.4 audio fix.

Jun 18:

- GS3/Note2 stock KitKat 4.4 audio fix.

- HTC One M7/LG G2 /system/addon.d/ script to maintain BT shim after ROM update.
[Spirit FM] LenAsh:
Hope you find a way of supporting Sony's latest stuff.

If you get stuck in to the Sony FM radio stuff, the stereo blend threshold needs improvement....! It does try to hold on to weak signals AND maintain extreme stereo seperation a little too desperately - gets very hissy.
[Spirit FM] a66fm:
it works..kind of...

1.you have to manually start bluetooth before starting spirit1, if you don't you receive power error SU:2 Fm:QVC Su:1 Bt:0 Ht:0 Mo:V4D

2.the app starts and you can start scaning the fm band but after a few seconds it frezes and you can not change the frequency

:crying:
[Spirit FM] marcioafoliveira:
I really can't do Spirit FM work. I installed the free apk on 1st post and it says No FM Accessible but I looked in settings and changed what I think it was to change but still not working but this time spirit find radio stations but audio dont work. I cant hear any sound...

I have HTC One S c2 with CM10.2 ;)
[Spirit FM] mervluk:
Just an ob, I haven't noticed this at all with Spirit 2 on the Z (6603). But of course I'm using the Sony stock kernel. I'd be interested to hear how it compares with the alternatives, for fm. Even the "old" problem of having to start up and close the stock fm after a reboot before being able to tune Spirit 2 has disappeared with the latest beta. I was laughing as you bought two Sony's just as I thought you had them sorted! Spirit 1 too seems still to go down as far as single digit reported signal strength without getting static, though I now use Spirit 2 in preference as it seems to work better with audio mods, the pernickety but powerful Viper4Android especially. Stock fm seems a bit more dull sound throughout the range though I've hardly needed to try it, except briefly.
[Spirit FM] somboons:
Mike,

Could I ask you? for LG G2 what's ASOP ROM can run or work very well of your FM?

I read your comment in this http://xdaforums.com/showpost.php?p=54068182&postcount=8038

sorry I'm normal user I don't understand how to path kernel.I like Mahdi ROM and want to use your FM app.
[Spirit FM] mikereidis:
The good news is that I have a Z2 tablet now and I'm seeing pretty much the same issues.

It will be fixed, hopefully in the next few days.

Is your z2 6503 stock and unrooted ?
[Spirit FM] mikereidis:
The free version is old now, but it might help to set Menu-> Settings-> Audio-> Method to "HTC OneXL.S ALSA". Or try "Digital QCOM...". Digital is not supposed to work in the free version, but there was a bug for a while.

Email me mikereidis@gmail.com for a newer test version.
[Spirit FM] mikereidis:
For LG G2, CM11 works fine and may be easiest, with easy OTA updates. Some people don't like that CM isn't based on the latest sources, but unless you know what that means, it may not bother you.

Also Slimkat works, as well as the latest versions of Vanir.

Mahdi is quite popular, and Render kernel can run on it, but it hasn't worked. I don't know if the Mahdi or Render devs have applied my patches, or if they will in future.
[Spirit FM] mikereidis:
The way is underway: getting Sony's into my hands and spending time on them.

With Spirit2, if we know which Qualcomm V4L private control to set, and can figure out the data for setting, we can simply enter a number in the frequency set dialog: http://xdaforums.com/showpost.php?p=49511462&postcount=329
[Spirit FM] mikereidis:
That's because the antenna select control was only being set in Spirit2 for Xperia T and related devices, instead of all Sony's. Spirit2 didn't set it at all, so it was left in whatever state a previous app (stock Sony FM) left it in, assuming it ran once after reboot.

When Spirit uses the stock OEM FM API, things can be different than when using the low level V4L API. The stock API may be more likely to set controls "properly" (or not), but it tends to give same results as stock FM app.

For better or worse, Spirit2 does not have OEM FM API supports.

LOL, I spent over an hour trying to get Viper working, and couldn't. Some day.... I guess some people have the same issues with Spirit... ;)
[Spirit FM] mikereidis:
0719 test release is working on my Z2 Tablet, stock and unrooted: http://d-h.st/hdi

Only took about 12 hours. :)

It has a new "Sony Z2" Audio-> Method that may also work on older Z devices.

Unlike the stock app, FM over BT is not working. Yet... Not sure if record can work on stock, unrooted.

Next step is to see about rooting...
[Spirit FM] LenAsh:
I get this:Rooted stock
[Spirit FM] Kess78:
To root you can use this easy tool :

http://xdaforums.com/showthread.php?t=2784900

But it may not work with the very latest firmware of Z2.
[Spirit FM] LenAsh:
Uh? I'm already rooted on 314
[Spirit FM] LenAsh:
This seems to describe the register value limits.

https://android.googlesource.com/ke...4-kitkat-mr1/drivers/media/radio/radio-iris.c
[Spirit FM] Floodland:
D806 does support FM radio. In fact, in Argentina it is almost impossible to listen radios using mobile data: Telcos data connections introduces so much latency, lags and constant interruptions in most places that becomes a nightmare to try to use any streaming service.

We name our Telcos Vomistar, Persomal and Oscuro (spanish pun). Companies that in other countries use to provide an acceptable service, in Argentina rob to every customer, in every possible way (equipment prices, services prices, service quality, they even attempt to charge for services you never used/requested). /RANT

In any case, D806 is just a D802 without LTE (another missing service from our robbers).

Best regards
[Spirit FM] MarcusAnthonius:
I9305

Hi Mike,

Can you tell me when I use the free version or the paid version on the Samsung Galaxy S3 LTE that I can have Spirit FM worked?

The normal S3 (I9300) have an FM radio in the original Samsung software, but why the LTE version it has not been unknown to me.

I hope you can help with me.

Thanx,

Marc
[Spirit FM] mikereidis:
:)

I've made sure to not accept the update.

Anyway, I've read the latest updates are fine and my Z2 Tablet BL is unlockable too*.

Since carriers don't control WiFi tablets, I wonder if all WiFi tablet BLs are unlockable.

*Though recommendation is to root first, to back up DRM keys etc. And I'll keep the BL locked for now to make a return easier and in case something breaks in the first few days of use.
[Spirit FM] mikereidis:
Spirit assumes Sony's with /dev/radio0 use Qualcomm FM chips.

If you denied root, I think it would have worked.

Keep root though, and use these settings:

Audio-> Method = Sony Z2

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

Debug-> FM API = OEM Proprietary.

"FM API = Low Level" may also work, but not tested yet.
[Spirit FM] mikereidis:
Thanks for confirming. I think D806 is Argentina only. So just missing bands as opposed to different bands ?

Sounds like pretty much the same as North America, or at least US, Canada and Mexico.

There are 3 main carriers here in Canada, and they don't really compete. But at least we don't have the CDMA issues that US Verizon and Sprint customers have.
[Spirit FM] mikereidis:
GT-I9305 is physically incapable of FM.

ONLY GT-I9300 variant of GS3 can work.

Impossible to fix; root etc does not matter.
[Spirit FM] Floodland:
Yes, D806 is the Argentina only version. And we do not have any LTE service to try, but the stock ROMs do not even show any 4G/LTE options. I saw the LTE bands submenu on the phone secret menu, which could be enabled, but was not able to try if it works or not, as the local infrastructure is still inexistent.

D806 share everything but the baseband respect the international D802. I used D802 kernels, ROMs without issues, as long as the Baseband is not touched, it does work (with D802 baseband you never get any signal, at all)
[Spirit FM] MarcusAnthonius:
Oke thanx for you're answer
[Spirit FM] LenAsh:
I removed SU permission from Spirit and it worked straight off... Hopefully I can play with the blend thresholds! Having said that, with Blend Auto on, it SEEMS to be doing the job - need to try it outside while walking. Setting it to Stereo increases the hiss... whereas blend decreases it. Not sure if the stereo width varies yet. I'll know later...

EDIT: Just done my usual 5 mile walking route and happy to report that the stereo separation tracks the RSSI very well. It seems Sony forgot to add that function in to Radio3.apk. It's mono or stereo. If I change Spirit to forced stereo, it emulates the stock Sony app. I'm not sure whether Spirit uses limits for the separation control - it doesn't seem to reach the same levels of width that the stock app does, but isn't far off. I realise that statement is a little subjective.

The only "bugbear" is the volume control - it's not very granular. If I set the Volume Scale to anything less than 100 (which I do on the LG G2), the volume mutes at lower settings without seemingly offering a broader scale.

All in all - better than the stock app and very usable.

CM11 on the Z2 is an interesting prospect. Presumably Spirit won't be using the current stock Broadcom driver though...
[Spirit FM] a66fm:
:good: it's working !!!

only a few issues left to be fixed

signal strength is "locked" at the initial value so regardless of having a better or worse reception as you're moving around the signal change is not reflected to the display's reading.

pi is always 0

radio text is not dispayed

if you move from a station that has an rds to an other that doesn't have rds the last ps message is "frozen" on the display

:fingers-crossed:
[Spirit FM] mikereidis:
:)

LOL, never underestimate the amount of work required.

LenAsh said: 'The only "bugbear" is the volume control'

There are hundreds of problems that will be found and fixed over the next few years. And hundreds more lower priority issues that will never be fixed.

Broadcom OEM API does not supply PI or Radiotext.

To get these, if you have root, as they'd also be on AOSP ROMs, low level access is required. I rooted last night and tested this OK, but haven't got an ALSA or digital audio method working yet.

For low level access, set Debug-> FM Chip to "BCM 433x/207xx" and Debug-> FM API to "Low Level". If Bluetooth is off it should work, but will require 5-10 seconds to start. BT on operation requires setting HCI Access to Bluedroid Shim, rebooting, and ensuring that no BT device is connected (may be paired). May also have to manually set Audio-> Method to "Sony Z2".

I should be able to fix the frozen PS. This issue has been there for years when using OEM Broadcom FM API, but so few of my customers use this mode that it's been lowest priority.

Signal strength was a sacrifice I had to make (in the short term at least) to get FM working.

So, there are 4 issues here, all related to the Broadcom API. Use low level mode and they are all fixed, and you too will no longer care much about the Broadcom issues.

I've noted that volume is way too high for speaker. Volume Scale can adjust, but then it's too low for headset. Volume adjustments can be slow sometimes too.

Recording to MP4s works, if you set Digital-> Source to 9. But FM audio is disabled while doing this.
[Spirit FM] mikereidis:
I've only just begun to support the Z2 devices.

See post above. Low level access works, and is better, unless you need to change Bluetooth power state while FM is running for some reason.

I tried, but don't yet have any AOSP capable audio methods.

I'm a bit hesitant to jump into ROMs. There's a Z2 Tablet thread in which several people reported inexplicable bricking after flashing.

Spirit just sets the Broadcom API or Broadcom chip to one of the 4 values, and the API/chip takes it from there. Thankfully, the API supports all that the chip supports.

Mono of course forces mono.

Stereo TRIES to force stereo, regardless of noise, but of course stereo becomes impossible when the 19/57 KHz pilot can't be detected.

Switch picks a spot at which stereo/mono switches abruptly, though there must be some time delay and/or hysterysis.

Blend AKA Auto is usually the default, and gradually blends the two channels together, to attempt to keep noise below a certain level. I don't recall the parameters being settable.

I haven't figured out yet why notification shade controls aren't working most of the time. Once or twice I DID see them.
[Spirit FM] a66fm:
i was on rooted 17.1.1.A.0.402 branded (Vodafone Gr) until this afternoon that i flashed 17.1.2.A.0.314 unbranded and was also rooted.

if i switch to lo level and reboot the first time i start the app it will indeed take 5-6 seconds to start up and unfortunately it will freeze 10-20 seconds later...

i can send you the log files if you believe it will help :)

sorry for being so anxious to have spirit up and running ...just think of me as a radio fan that has moved after a year from a samsung s4 to a sony z2 mainly for it's lack of an fm radio plus blaming himself for not keeping the s3 he had :)

edit/update

after a few freezes/restarts pi and signal level is now working

thank you :)
[Spirit FM] mikereidis:
:)

No logs at this stage. I usually find the most common problems sooner or later. Sometimes a problem can only be reproduced with very specific steps, like reboot, run stock FM app, turn BT off, run Spirit, etc.
[Spirit FM] mikereidis:
Xperia Z2 FM over Bluetooth is done by,...

Recording to a file like /data/data/com.sonyericsson.fmradio/files/FmOnBTRec-904480696.3gpp and playing that file over BT somehow.

LOL ! :)

This is exactly how I was thinking of bringing digital audio to stock unrooted GS2/GS3/Note/Note2*...

But done by a major phone and electronics manufacturer it seems a bit funny.

*I DID get a lot of requests for digital audio/BT support on these (and many other) phones,

But since HTC and Samsung starting cutting off access to the FM APIs, and most people are happy with stock apps, when available, I'm now focused on AOSP and have little interest in OEM APIs.
[Spirit FM] LenAsh:
For my addled brain... CM (AOSP) audio is non functioning and/or WIP? I'm twitching to make the jump to CM, but not without FM - by that I mean I can darn well wait!

Cheers.
[Spirit FM] mikereidis:
Hard to say until someone tests it.

If the CM ROM uses open source audio HAL, less likely.

If it uses Sony stock binary blobs (as many CM ROMs do when new at least), more likely.

It comes down to whether or not this code works:

setDeviceConnectionState (0x80000, DEVICE_STATE_AVAILABLE, "");

Usually for AOSP I must create an ALSA method and/or a digital audio method. I have neither yet, just the stock friendly "Sony Z2" method.

If I get bored and my new Z1 doesn't show up in a few hours, I might try CM myself.
[Spirit FM] LenAsh:
Yeah - you know you want to!

LOL
[Spirit FM] mustasusi:
Sadly, there is no way to downgrade back to 4.3 once updated to Kitkat (my phone is 4.4.2 out of the box). I spent the recent couple of days just to figure it out that Samsung hard-coded the 4.4.2 TW bootloader to not support older versions, either TW\CM. As for now I'm stuck on a Kitkat official ROM and a digital tuner that only picks up the odd frequencies (I need the even ones as well, if I could tweak it somehow that would be nice) and another one that operates tuner as should but without playing anything. If you can be more precise at least about the settings to start with then just switch ROMs and kernels around it, until hopefully a piece of luck shines on. Note(3) that only the ROM I started with can get Next Radio to work. I flashed another official 4.4.2 (NAB) and all I get is that "thinking" circle as I push the [play] button for 20 secs or so then back to a [play] icon instead of [stop] as if it's playing. I have a Nandroid of the version the phone came with and I just restore it in case Next radio won't play. Strangely the stock kernel totally confuses Spirit so it can't access FM. Beast Mode allows it to launch and show freq, signal bar, RDS and move.

I also came across this thread:

Is it still relevant for today's devices?
[Spirit FM] mikereidis:
Set Debug-> FM Chip to "BCM 433x/207xx". Likely there is a /dev/radio0 or /dev/fmradio there confusing Spirit.

More relevant than ever. :)
[Spirit FM] mustasusi:
Already set. I'm willing to look into it. The antenna looks very strong on this device, it's a shame to miss the great potential, along side with the rest of Samsung benefits.

Can you link me to more info sheets?
[Spirit FM] rdifra:
good morning

i'm in trouble with spirit2, I can't get it working on my device.

after testing spirit free (it works on my phone,rooted s advance with aosp 4.4.4 )

(settings->audio->method-> Galaxys3/Note/S2_ICS)

I've decided to buy the app (07/17 on the play store) even if my phone is not in the supported devices.

I've tweaked build.prop to pass the message that my phone is not supported but there is no way, spirit2 stay on 'Tuner Start' (top left screen)

my questions are...:

can I have a refund or a change with spirit1?

if I buy spirit1, it will work on my phone (as 'spirit free' does?)

thank you
[Spirit FM] mikereidis:
Email me mikereidis@gmail.com . I'll cancel your Spirit2 order and send a copy of Spirit1 to try.

Spirit2 won't work on that phone. Spirit1 should.
[Spirit FM] mikereidis:
Sony Z2/Z2 tablet:

New July 22 betas via Play are up for for Spirit1 digital audio and Spirit2.

Probably only works on stock ROMs at this time.
[Spirit FM] rdifra:
thank you

do you need my order numer on googleplay?
[Spirit FM] mikereidis:
Order number or email ID of purchase (which most people email me from, and which I check,)

At one time it was easy to search on people's names, but in the name of privacy, Google stopped letting paid app devs from seeing or searching on it.
[Spirit FM] LenAsh:
Volume uncontrollable on digital for me on stock.
[Spirit FM] mikereidis:
Works for me. :)

Spirit1 digital audio mode or Spirit2 or both ?

On screen volume control or hardware buttons or both ?

Bluetooth on or off ? Try the other.

Try speaker mode and headset mode.

Difference between phone and tablet is that phone volume adjusts phone/ringer volume by default, and a tablet adjusts media volume. You can try going into system volume settings and specifically set media volume.

Got my Z1 now. I see it doesn't pause audio unless I use the new "Sony Z2" audio method, which is clearly not just for Z2's. Issues like this follow the Sony Android version more than the phone it seems.
[Spirit FM] binu.udaya:
Quite a useful app
[Spirit FM] mikereidis:
...next post...