yashsingh1/xdaforums huggingface dataset:
[Spirit FM] mikereidis:
Spirit2 August 30 is now on Play.

- Disables Google Now hotword detection if needed on startup and kills/restarts the googlequicksearchbox app with new config if changed.

If changed, the original state is restored on FM stop, or a subsequent stop if Spirit crashed/died quickly.

This affects both Homescreen and Everywhere "OK Google" hotword detection.

AFAICT, hotword detection is often a battery killer anyway, though less so if hardware and software are "in tune" (MotoX, Nexus 5, neither which have FM).

Without detection, you have to turn screen on and hit the microphone icon, which should be hollow with hotword detection off now.

Hotword detection has been becoming an increasing problem with Spirit2, as more run Google Now and/or the Google Experience Launcher.

Plain voice searches seem OK when running FM. The audio pauses the same as when audio notifications come in.

But hotword detection requires the microphone to constantly be open. This conflicts with Spirits' use of an audio input port to read the digital FM audio data from. And because Spirit does this at low level without "telling" Android, problems arise. There may be better ways to do this, but it wasn't much of a problem until recently, now that non-Nexus devices can officially run Google Experience Launcher and hotword detection became much more common.
[Spirit FM] mervluk:
Seen it now. I discovered a few months ago that I had to disable (in my case) both Google Search and Voice Dialling which both jumped in when Spirit2 was playing. No problem as I don't use either. I tried this morning just disabling the Hotword Detection option, but Google Search still spontaneously opened and Spirit 2 audio stopped so I've reverted to the TB freezer too.
[Spirit FM] Meerhie:
will try that with google detection:

@ hicannon:

i tried mixing your / showP / faux123 ( i do know showP personally since a few weeks and through him i came to all with KControl kernel :D ) enhancements with voltage control without success, hence i am no programmer.

So, i have found now Canucks Kernel, which is based on 3.4.82 and have all Spirit FM needs and Voltage features, and many more you all broght to us. Just compiling it. i expect wifi working with that kernel.
[Spirit FM] Spock0785:
Nice Work, Einstein^^.

Works on my Cyanogenmod 11 latest Nightly very Well :)

But can you include an Testversion, so that i dont need to attach an Headset Cable?

Because in my Car there is normaly an Double DIN Radio. But i use an other Single DIN Radio so there is space under the Radio/Receiver, there i can put in my Mobile Phone and test how it works without external Antenna in only about 10cm(maximum, should be closer) space to the Receiver Unit.

Because if i want to have Music from my Mobile. I can use USB, Bluetooth or the "ext IN" in the Radio.

But FM Transmitting is also intresting. But not with extra Cable :-/
[Spirit FM] nicesoni_ash:
I tried both versions. Here is the result..

Spirit 1

Spirit 2

_____________

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

Fueled by 7000mAh ZeroLemon Battery
[Spirit FM] mikereidis:
The Spirit FM receive apps work without headset/antenna plugged in.

But my transmit tests showed that it was absolutely impossible to detect ANY transmission without at least a short length of wire connected to the headset jack. And decent audio quality required much more than a short length of wire, ideally a full length Tx antenna very close to a full length Rx antenna, oriented the same way.

So I decided it was OK to require something plugged in for transmit.

There is also a theoretical possibility of transmitter damage when no antenna is connected. Somewhere around 1 watt or so, transmitter damage is almost guaranteed.

These chips probably put out less than 30 milliwatts though, and my tests indicate no transmitter damage with no antenna at these low power levels.

But, for version 1 of an app especially, the last thing I want to hear is reports of hardware damage, so I'm being extra careful at this time.
[Spirit FM] mikereidis:
Power error or not fully starting indicate the kernel FM driver is not "complete" and fully initialized.

If it WAS complete and initialized, Spirit would appear to "work", albeit with RSSI = 0 or negative.

There are 2 parts to the kernel driver:

radio-iris (which creates /dev/radio0 and which you have), and

radio-iris-transport (which makes it work and which I think you don't have)

Usually, the kernel needs to support modules for radio-iris-transport to load properly. This can be proven when "adb shell lsmod" does not return a "/proc/modules" error at least.
[Spirit FM] akashj17:
Very good app
[Spirit FM] nicesoni_ash:
So that means Kernel wasn't built with proper commits or changes? What should I ask the kernel dev to do now so we can be sure?

_____________

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

Fueled by 7000mAh ZeroLemon Battery
[Spirit FM] chris787:
Nice1

Thanks!
[Spirit FM] Meerhie:
radio stops playing, even if google hot word thing is disabled. does it happen if radio signal is low maybe ?

i personally feel, under 4.4 its more buggy as with 4.2.2.

didnt start playing after first launch, have to change frequency and back. cannot enter frequency directly, but sometimes it works.
[Spirit FM] johnny_cage:
On gt-i9070 cm11 4.4.4 carbonrom works good but there are some bugs.

Doesn't works in speaker mode and after using spirit if i try to call someone, i can't hear anything.

I don't know if this are known issues.

Thank you for your attention and for this great app
[Spirit FM] mikereidis:
From a USB connected PC run "adb shell". Or use a terminal or terminal emulator app to open a shell command prompt. You should get a shell prompt like this:

shell@m8:/ $

Run "lsmod". If the kernel does not have modules support, you should see this error message:

shell@m8:/ $ lsmod
/proc/modules: No such file or directory
1|shell@m8:/ $

If there is no "lsmod" command, try "ls /proc/modules". This is bad:

1|shell@m8:/ $ ls /proc/modules
/proc/modules: No such file or directory
1|shell@m8:/ $

This would be good, but indicate no iris transport module loaded:

shell@m8:/ $ lsmod
1|shell@m8:/ $

This is what you REALLY want:

root@evita:/ # lsmod
radio_iris_transport 2286 0 - Live 0x00000000
root@evita:/ #

If there is no error, but also no iris transport module loaded, look for the module with "ls -l /system/lib/modules":

root@evita:/ # ls -l /system/lib/modules
-rw-r--r-- root root 5992 2008-08-01 08:00 radio-iris-transport.ko
-rw-r--r-- root root 2559 2008-08-01 08:00 scsi_wait_scan.ko
root@evita:/ #

Then do "su" and "insmod ...":

255|root@evita:/ # su
root@evita:/ # insmod /system/lib/modules/radio-iris-transport.ko
255|root@evita:/ #

To see what might have happened, run "dmesg" and look at the last few lines.
[Spirit FM] mikereidis:
No, low signal will not stop FM from playing.

Yes, clearly there are some bad/strange problems happening.

Edit: Removed some wrong info.

Can you send me an email mikereidis@gmail.com ?

And a debug log if you have Spirit1, again I presume ? From Spirit1, tap the frequency button, enter the number 7 and tap "OK". After 20 seconds or so, press Send from your email client.
[Spirit FM] mikereidis:
Galaxy S Advance, GT-I9070, yes I think these are known problems. I don't have one, don't expect to get one, and there's a good chance such problems will never be solved. :(

You should be able to avoid rebooting to fix audio issues, if you enable Menu-> Settings-> Debug-> Power Restart Media. This resets the whole audio system when FM is turned off.

This is "brute force" solution, but it's better than having to reboot.
[Spirit FM] mikereidis:
Spirit FM at a Cross-Roads ?

I feel as if Spirit may be at a "cross-roads" at this point. IE, a place where directions should be sorted out before proceeding...

- More CM ROMs are including an FM app now, and that may spread to other AOSP ROMs. This is only for devices with Qualcomm chips, so far at least, since the app is almost unchanged Qualcomm code.

- Android One is about to be released, and should include a Google FM radio app, the first ever publicly released or acknowledged Google FM app anyway. I have no clear idea, but my guess is this will be for Qualcomm chips only. Regardless, it could cover more chips, and could be open sourced...

These things are fine. I'm all for open source and competition and progress. I'm not complaining. But I WILL have to live with this, and there's no way to escape that my revenue, and ability to keep Spirit full time+ may be diminished.

Android L is another big issue. I looked at it for a few days after first release and got some idea where the "massive root app breakage" will impact Spirit. But I've had no time to fix the coming problems yet, and I think some re-architecting of the overall design would be best. Basically, things will likely be easier (and future security enhancements/breakage will have less effect) from a daemon launched with full SU rights, and the best SELinux can provide.

My guess right now is that I'll be unable to update Spirit1 for Android L and later. Spirit1 is like a huge ball of parts, held together in many places with weak glue, velcro and duct tape. It's very difficult to impossible now to make any changes to fix some phones, without breaking things for other phones.

That's just the way it is with Spirit1. I put it together quickly, and changed a LOT of things in the last 3+ years, for new phones, ROMs, Android releases, etc. I took my time designing Spirit2 to avoid most of the Spirit1 problems, but it still doesn't have all, or many, of the Spirit1 features and phone etc. supports.

As always, I can't predict the next several months, but I'll have some decisions to make, and not everyone will be happy, least of all myself.

I am happy at least that Spirit2 supports most of the recent (and many not so recent; eg Galaxy S) Spirit1 supported phones. Most people using Spirit1 on a phone that came out in the last few years, should be able to use Spirit2.

So, if you need your GS2 or GS3 to run Spirit on Android L, Spirit2 will do that.

OTOH, if you're still running a Desire HD or similar vintage, it likely won't run Android L, at least not well. And Spirit1 will hopefully continue to work, even if updates cease or become rare.
[Spirit FM] Meerhie:
[MENTION=4698029]Mike[/MENTION]: i´m talking about spirit2. when radio stops, i get in dmesg:

10268.414007] iris_radio: Err on disable FM -4

it stops mostly after 5-6 minutes. had the same with 4.2.2 JB, but not that often.
[Spirit FM] lossah:
My sound randomly stops for like 0,5sec when using bluetooth. LG G3 and Spirit 2. :/
[Spirit FM] mikereidis:
There is now a Spirit FM forum: http://xdaforums.com/apps/spirit-fm :)

So everyone please feel free to start a thread with a nicely descriptive title to report bugs, unless there is already a thread for that bug.

This should make it a LOT easier for me to quickly re-ramp up on a specific problem, without having to search and re-read this thread.
[Spirit FM] mikereidis:
FYI, the [MENTION=1731341]Mike S[/MENTION]eems to prevent me from quoting.

"Err on disable FM" can be seen in function iris_fops_release() here: https://android.googlesource.com/ke...d-3.4-kk-fr2/drivers/media/radio/radio-iris.c

This function should only be called if FM is turning off, or at least when the /dev/radio0 V4L FM driver access is closed, which usually only happens at FM switch off time.

It might be due to a bug in the kernel, or the Spirit2 chip access process crashing, or both, in effect.

Would you be able to capture and send me a logcat ?

REALLY Sorry if we've already discussed this, but...

Do you have Spirit1 to try and does it have the same problem ? With Audio-> Method set to "Digital-> Auto" ?

Please email me mikereidis@gmail.com and start a thread in Spirit FM forum and I'll be better able to keep track.
[Spirit FM] mikereidis:
My guess is that the G3 would be happier if sample-rate was 44100 for Bluetooth, rather than the audio and FM chips native 48000 sample-rate.

If you have Spirit1 to test, can you set Audio-> Method to "Digital Auto" and Digital-> Samplerate to 44100 ?

If you don't have Spirit1 to test, please email me mikereidis@gmail.com and I'll send you a test release.
[Spirit FM] Meerhie:
i do not have spirit1. i purchased and gave it back, cause i have no need for two FM apps :P

i will email you logcat as soon as possible. time for bed now :P
[Spirit FM] albertusac:
Don't you make a support for STE devices? :D
[Spirit FM] mikereidis:
Sony ?

Only 2012 (Xperia S) and later Sony phones stock, late 2012+ starting with Xperia T for AOSP.
[Spirit FM] albertusac:
Samsung S III Mini :cyclops:
[Spirit FM] lossah:
With Spirit 1, there is no sound and I get a error,

http://www.ladda-upp.se/bilder/cuhzdrjrrhloqw/

Also "sorry Bluetooth has stopped" everytime I'm opening it. :/
[Spirit FM] mikereidis:
I don't know how you turned S3 mini into STE. To me STE = ST-Ericsson.

Spirit1 has been reported to work on stock S3 mini, as well as CM/AOSP.

There may be some audio issues on CM.

Audio may also have stopped working on CM, as I feared it might some day if/when CM moved to open source audio HAL from binary blob. If so, please report, but there is nothing I can do at this time.
[Spirit FM] LenAsh:
CM11 on Z2 update.

App works fine - BUT once you've used Spirit 2, calling goes belly-up. You either can't hear the caller or the caller can't hear you, or both. Only a reboot solves.
[Spirit FM] albertusac:
S3 Mini uses U8500 Novathor which is developed by STE.

Yes I know it's working, but the Spirit 2's appearance is much sexier than the old one :cyclops:
[Spirit FM] mikereidis:
Well I can't test phone calls on my WiFi Z2 Tablet. But testing audio notifications usually finds any problems with calls since a phone call interruption is handled the same.

EDIT: But you're not mentioning phone call interruptions while FM is playing right ? It's about calling (or being called) after Spirit2 is turned off ?

I was having some audio issues, so I restarted testing after a reboot. ;)

With the wired headset plugged in all the time, and not testing any speaker modes, I couldn't see any problem with audio notifications interrupting FM playing.

After turning Spirit2/FM off, I ran a music player to headset and it worked fine. Unplugging and re-plugging resulted in audio to speaker and back to headset again.

Does the problem happen even after a fresh reboot, running Spirit2 to wired headset, turning it off, and making a call ? Can you make the call using the wired headset, keeping it plugged in ?

Using Speaker Mode in Spirit2 can be tricky sometimes. For best results/testing, avoid speaker mode.

Sometimes problems happen if the wired headset is plugged or unplugged while Spirit is running. If a phone call interrupts FM, some people unplug the wired headset while it's ringing, or after answering, rather than listening to the call with the wired headset. That used to be my first instinct.

If you could find some way to consistently show an audio problem without phone calls, I may be able to reproduce the issue.

If you don't know, Spirit1 can be used to reset the phone audio, which at least avoids the need for a reboot.
[Spirit FM] LenAsh:
The only time I have noticed the problem (and I'm only "tentatively" attributing it to Spirit 2 at the moment) is when I've used it and then exited. I never use "speaker mode" and this is purely listening to FM on headphones and then trying to use the phone as a phone after using Spirit 2. The only other things I notice are: while listening to FM on headphones and an SMS is received, I hear a notification sound. When I receive a phone call, no sound is played, the audio just mutes. But I can use the headphones to answer the call (the mic and phones work as hands-free fine).

Perhaps Spirit 2 needs to do an "audio reset" on exit? Perhaps it isn't Spirit 2 doing this...
[Spirit FM] Meerhie:
i have sent you an email with the requested logcat file.
[Spirit FM] mikereidis:
My guess is that it IS a Spirit related issue. Should be reasonably easy to confirm, if you can resist the temptation to listen to radio for 1-24 hours after a fresh reboot.

Are you running stock ROM now, or AOSP/CM ?

Audio reset, like Spirit1 "Power Restart Media" might work around the issue, but I've hoped I would never have to do a hack like this in Spirit2. In Spirit1, it tends to be needed only for non-digital audio modes, and except for Desire HD, for phones I don't have and can't test properly.

Weird stuff like this is why I tell people I can't officially support phones I don't have, and that "having" a phone also means I will likely spend at least 100-200 hours over a few years making needed tweaks and fixes.
[Spirit FM] LenAsh:
I'm currently back on stock (using Spirit 1 as it happens). I wasn't sure whether CM was the culprit or not.

I'm absolutely not suggesting that you spend any time on this, or risk breaking Spirit 2, particularly as you cannot confirm anything without a phone. I will flash CM back and check that it is OK on its own. I can live with rebooting after using the Radio. I only use it once a day for an hour or so. No big deal!
[Spirit FM] mikereidis:
My comment about weird stuff wasn't really directed at you, or the Z2, but rather to the owners of all the other phones I can't support (and prior to my recent purchases, Sony Z* devices).

I am considering the Z2 to be "fully supported" by Spirit, since I have the Z2 tablet, albeit without calling capability. Of course "fully supported" does not mean "without major issues"; more like "I'm committed to solving as best I can, when I can".

Spirit is on a bit of a development hiatus again, my signature status having gone from "On Vacation" to "Doing taxes...", LOL.
[Spirit FM] LenAsh:
Ouch - Taxes....

There are a serious number of commits for the next sirius nightly, so unless I kang it I will wait for that to build before trying CM again. It may be worth letting me do that before you chase a red herring...

EDIT: Kanged 09/04 CM11 - back on it.
[Spirit FM] Lagkage:
Hi again Mike.

With Spirit Transmit I don't hear any audio on my receiver FM radio, but I do see RDS data sometimes. Using Spirit 2 and pressing 48 I hear audio.

Something I would like is to could be able to change RDS data, such as PS, RT and TA. Also could the headset audio be muted while transmitting?

I am using a rooted Sony Xperia Z C6603 with Android 4.2.2 with a bootloader there can't be unlocked unfortunately (My Z2 is unlocked)

Best regards Asger Nørgaard :)
[Spirit FM] LenAsh:
Some more information. If I make a voice call and then start Spirit 2, the sound is like an AM radio. A soft reboot doesn't sort, a hard reboot does.
[Spirit FM] mikereidis:
Xperia Z2:

Voice calls tend to enable a "low pass filter" that eliminates frequencies above 4 Kilohertz. If high fidelity/sample rate VOIP were used, that might at least increase the frequency response.

I'll see what I can find.

I'm wondering now if Xperia Z3, Z3 mini and Z3 8" tablet will use the same Broadcom FM/combo chip setup. On one hand, I'd prefer if Sony went back to, and stuck with Qualcomm. On the other, Z2 FM architecture would be a bit of an "orphan" if so.

OT Re taxes: Yes, Ouch LOL. I effectively have to do 6 returns, 3 for Federal and 3 for Quebec "distinct society" Provincial: Wife's personal, My personal, and My business.
[Spirit FM] mikereidis:
BL unlock status never directly affects any of the Spirit apps, only rooted status.

I have a rooted, and so far unlocked (but unlockable) stock C6603. It's running 4.4.2 Build 10.5.A.0.230 . Is 4.4.2 not available for yours yet ?

Yes. There is Qualcomm code in the Spirit Transmit app for PS and RT that I haven't adapted yet, for use on a non-system app. It uses whatever data is set for "remote controls/displays" such as BT AVRCP. I will support this, and eventually there will be some options I think.

Yes, headset audio can be disabled. That happens when using Spirit2 in the code "48" transmit mode right ? I wanted to leave it enabled for first release of the transmit app, as people might get confused otherwise.

I can't think of any reason right now why you can't get audio in Spirit Transmit, but it works in Spirit2 Tx mode. It works on my stock rooted Z and Z1, I think both running 4.4.2.

Furthermore, if Spirit Transmit wasn't setting the audio chip up correctly, running it immediately after Spirit2 in Tx mode should leave the controls in the proper state.

I'll note that one difference is that Spirit2 in Tx mode only enables the FM Transmit MultiMedia1 control, while Spirit Transmit enables the same, PLUS MultiMedia4 and MultiMedia5. The 4 and 5 are needed for some compressed audio files, or playing them results in no audio transmitted.

But this difference just adds additional functionality, and doesn't interfere with the original in my testing.
[Spirit FM] Kess78:
The same thing happened on my Z1C. One day Spirit Tx wasn't transmitting any audio anymore, although it was working with Spirit 1 and the AlsaMixer app. I tried uninstall and install the app again, clearing cache, even reflashing system (no wipe) but the audio was still not working...

I uninstalled the app for two weeks and then when I installed it again the audio was working. Very strange...
[Spirit FM] LenAsh:
Doesn't the fact that Spirit 2 misbehaves after a voice call infers that CM11 is at fault...?
[Spirit FM] mikereidis:
Did you try Spirit2 in the Transmit test mode, entering "code 48" and restarting ?

FM transmission of whatever audio Android is playing is an unusual use case. It requires that output audio streams be intercepted (maybe just some streams, or all, such as notifications/navigation etc.)

Fortunately, this interception seems mostly (or all ?) done in Qualcomms hardware, directly between Qualcomm FM/combo chip and Qualcomm audio chip.

The downside is complications from recent Android audio enhancements. Some of these send compressed audio (MP3 etc) directly to the audio hardware for it to be decoded there, instead of decoding in software, which uses up CPU and battery (and note the strong demand by users for battery savings/long charge life.)

I found that MultiMedia1 needs interception for most "normal" audio, especially uncompressed. For compressions, Spirit Tx added MultiMedia4 and 5. Maybe more can be added.

As explained again (LOL) in next post, Spirit is not using the Android audio HALs (drivers/libraries) "properly". Spirit just sets ALSA controls independently, and hopes the HALs won't over-write the controls, which the HAL can do on the basis that it alone is allowed to change audio controls.

And the reason for not using controls "properly" is that, (for FM receive at least), AOSP HALs often/usually contain no proper support for FM audio. I should explore using proper methods (ALSA use case manager I think) for transmit; it might even work on AOSP, given that Qualcomm FM code is more rarely removed from AOSP.
[Spirit FM] mikereidis:
No.

As explained again (LOL) in previous post, Spirit is not using the Android audio HALs (drivers/libraries) "properly". Spirit just sets ALSA controls independently, and hopes the HALs won't over-write the controls, which the HAL can do on the basis that it alone is allowed to change audio controls.

I'm kind of concerned with the Z2 at this time actually. There's a LOT of ALSA controls Spirit2 sets for Z2; so much so that I optimized the ALSA code for all devices (a bit risky) in order to reduce Pause/Play time from 5 seconds down to 1 second.

The more ALSA controls touched, the more problems might arise.

And I still don't know enough about the Qualcomm audio chip to understand what every control means. There are 660 ALSA controls on my Z2 Tablet (!).

BUT it appears the FM is converted from analog to digital, instead of being processed completely digitally. That's an extra D->A->D conversion, and complicates things on such a multifunctional chip.