yashsingh1/xdaforums huggingface dataset:
[Spirit FM] guhvanoh:
Will test this out in the morning and let you know how it goes. So far it sounds good. Thanks!

[UPDATE] Apart from the buffer glitch, it sounds wonderful. I'll be staying on this version for a while. The train into work goes thru some areas that have poor reception. Spirit2 performed admirably in those areas. Thanks!
[Spirit FM] mikereidis:
:)

Spirit1 has not had license checks for years, due to the inevitable problems a few paid customers had.

Spirit2 stopped using license check code earlier this year. Again, despite a whole bunch of wonderful new code, some paid users had problems, so I completely ripped that code out.

IMO it's just not worth it to inconvenience (at minimum) even a few paid customers, for what would likely be no more than a few extra sales (no doubt to angry "customers").

I'd love to have something bullet-proof, even if only to give paid supporters just a few extra features, but it doesn't seem possible. Even if my code and Google's code were perfect, Google servers regularly have temporary problems.
[Spirit FM] mikereidis:
Email me mikereidis@gmail.com at any time for a copy.

Google servers regularly have temporary problems, once a month at least, and this may be one.

If you are logged into the same Google account as the account of purchase, Google should NEVER ask for another payment, or even ALLOW you to purchase again if you wanted.

None of my apps use any license checking at this time. Simple, normal "sideload" installs work fine (if you enable "Unknown Sources"). Nothing fancy like Titanium Backup is needed, and Spirit1 even has a method to save and load settings.
[Spirit FM] mikereidis:
Updated 0911 Xperimental release ONLY on Play for Beta test customers: https://play.google.com/apps/testing/fm.a2d.s2

- Xperia Z2 stock audio switching speed enhancement.

- Disable "Google Now audio defense" because of some audio issues.

- GS1 GT-I9000 volume boosted further to 4* instead of 3*.

- Speaker mode enhancements:

These devices again have speaker mode background volume control, as they did previously as of 0830 release: HTC One M7 & M8, Qualcomm devices including HTC OneXL, MotoG, Xperia Z, Z1. Background volume control uses Media/Music volume which generally has 16 volume steps, instead of 5.

These devices are still stuck with speaker mode volume control only when screen is unlocked: All Spirit2 supported Samsungs: GS1, GS2, GS3, Note1, Note2.

These devices were updated to use new Spirit2 speaker mode (hopefully more compatible), but as a result, are now stuck with speaker mode volume control only when screen is unlocked: LG G2, Xperia Z2.

Hopefully the speaker mode volume control issues will be resolved.

I consider speaker mode to be the last BIG feature that Spirit2 absolutely needs to support. I haven't felt it appropriate to tackle new features and UI changes until this was done, so this begins to open the door to other issues. That said, there are always stability issues that need time to deal with, including external things like Google Now that might best be handled by creative work-arounds.
[Spirit FM] mikereidis:
Spirit2 September 12 is the 3rd experimental release, after Sept 10 and 11. Each has major differences for most phones in switching to speaker mode and back, and the handling of speaker volume control.

0910, 0911 and 0912 are available below, and on Play to beta customers. Last "stable" Spirit2 was 0830.

I hope to get feedback about which releases/methods are most compatible/trouble-free, most useful and least annoying.

I'm most concerned about problems with phone calls that interrupt or come after FM, especially in "edge" cases such as plugging and unplugging wired headset in a given pattern. Sometimes, 1 or both sides of a phone call might be silent.

0910: http://d-h.st/Iau

0911: http://d-h.st/HdO

0912: http://d-h.st/9KX

September 12 release today changes all devices, except GS1, GS2 and Note1, to use generic speaker switch code from Spirit 1's digital audio mode. Spirit1's real code though has all sorts of exceptions for stock devices, and specific releases that's a pain to maintain. This is clean, but I'm not sure if some other problems may arise. The positive is that volume control for speaker always works, and uses the standard Music stream with 15 settings.

GS1, GS2 and Note1 all use the newer Spirit2 "Call Stream" code, at least for now. This gives speaker mode, but with speaker volume control tied to call volume, and only changeable when screen is unlocked.

Here's a matrix of the changes that I won't explain any better at this time:

C = Call volume stream
M = Music volume stream
- = Didn't work at all

ok = Full Volume Control
nv = No Volume Control at all
uv = Unlk Volume Control (Only when screen on and unlocked)

0830 0910 0911 0912
GS3 Cnv Cuv Cuv Mok
GS2 - Cuv Cuv Cuv
GS1 - Cuv Cuv Cuv

ONE Cok Cuv Cok Mok
LG2 Mok Mok Cuv Mok
XZ2 Mok Mok Cuv Mok

OM8 Cok Cuv Cok Mok
OXL Cok Cuv Cok Mok
MOG Cok Cuv Cok Mok
XPZ Cok Cuv Cok Mok
XZ1 Cok Cuv Cok Mok

Thanks :)
[Spirit FM] wyvernwaddell:
Hi Mike,

I'm trying to get Spirit 2 to work on my HTC One Max running Cyanogenmod. i have the european variant of the phone that has a working fm radio. I'm sure it works because Spirit 2 used to work on my stock sense rom. Since switching to CM, my radio works no longer. The dev (flyhalf205) was kind enough to build for me with the fm module enabled in the kernel, but Spirit 2 still fails. I have a pastebin here http://pastebin.com/sV4CDSyq

Might you have any thoughts on what might not be working? the Fail code on the phone is SU:2 FM:QCV Su:1 Bt:0 Ht:0 Mo:V4D
[Spirit FM] mikereidis:
One Max is RARE. My sales stats show precisely one for Spirit1, one for Spirit2, and one cancelled order for Spirit1 on the Verizon variant t6wl.

And I have just one debug log, on a stock unrooted t6ul.

The log shows the Qualcomm FM chip is not starting properly. This generally happens when the radio-iris-transport.ko kernel module is not available or doesn't work.

This is a common-ish problem, and usually happens because the kernel config file does not enable that module AS a module (instead of built into the kernel) or does not enable kernel modules support at all.

radio-iris-transport NEEDS to be built as a module or it won't work usually. (Exception on One M8 for some reason.)

I'd have more info with a 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.
[Spirit FM] wyvernwaddell:
You should be getting a log shortly :) I may help the dev do some testing to get this working right..be happy to help you too, if you wish. That said, I know it's not one of your more popular phones, so no worries if you're busy with other things. If we can figure it out, I'll post the results here too.
[Spirit FM] mikereidis:
Got the log, thanks.

I see you show up in the sales stats with One M7 for Spirit1 and Z Ultra GPE for Spirit2, and not One Max, so stats don't tell the whole story... :)

Log shows there is no /system/lib/modules/ directory. We need that, and at least a working radio-iris-transport.ko loadable module file in that directory.

If there is some alternative kernel, it might work.
[Spirit FM] :
Speaker volume on I9000

Hi Mike,

very good news.

The 2014-09-12 version of Spirit2 FM allows for speaker output PLUS volume control.

Ok, it does not work on lockscreen. But for me it is more important that the volume itself has increased and is controllable.

Audio is properly muted when receiving calls or when making calls.

Audio returns after end of call activities.

Other activities, such as watching video during an FM session, interrupts FM audio and properly restores after end.

GREAT!
[Spirit FM] mikereidis:
Fabulous ! :)

I was worried about releasing Sept 12 for all Spirit2 users, but there are no bug reports in my email or on XDA the last 12 hours. It seems the only way to do comprehensive testing is to release to ALL customers on Play.

Is your GT-I9000 speaker volume good ? Mine is pretty quiet and difficult to hear at 1 metre, even at full volume and using media players OR Spirit.

I'm just realizing now that my speaker may have been partly broken a long time ago from the Galaxy S speaker breakage issue. I think I have a good spare speaker somewhere I should try.
[Spirit FM] :
Hi!

Oh, yes. Speaker volume is very good. At nearly full volume i can hear the fm very well in the next room.

At lowest possible volume it is just as good to listen while working.

I still use AT-VT but had to put it down to 0 amplification.

Sidenote:

To get good sound from the I9000 speaker it is necessary to build something like a bass reflex speaker cabinet for the speaker.

Simplest way is to put a matchbox under the upper edge of the phone (on usb connector side, that is) and have it placed on a hard

surface.

Or, if you are a non-smoker like me, put a pencil under the longer edge to lift the speaker.

:laugh:

Try it, it helps. Otherwise the sound is faint and tinny.

Ah i wish we could use the FM chip inside of the device to decode DAB+ signals .... Would that be possible theoretically ?

Have a great sunday!
[Spirit FM] mervluk:
I think there might be a test DAB capable mobile phone somewhere, but probably built like a brick due to the necessary hardware.

I successfully get good DAB stereo (not sure DAB+ is available in the UK though the tech supports it, I gather) via the mobile using a cheap Nooelec R282 dongle and external aerial with the R2832U driver and the plug n' play Wavesink app on the phone. (SDR app works too, but I found it a horrendously complicated set up). I believe Mike couldn't get Wavesink to work on stereo with FM in Canada, though. Though it uses up to 25% battery an hour (including everything else running on my phone, and there's quite a bit), so perhaps you need something like the Murgen supplementary battery if your phone has exposed terminals (though helpfully they sent me a dodgy one which doesn't work!), or I think may be the right externally powered USB hub with OTG functionality could also do the job. And not sure the mobile is really mobile any more, unless you like to look like a martian with a dongle sticking out and an aerial stuck on your head (presumably).
[Spirit FM] LenAsh:
Quick update on the Z2 audio weirdness on CM11...

The "caller can't hear me OR I can't hear the caller" issue seems to have resolved (after using Spirit 2) - not sure if it's CM11 or Spirit 2 12/9, or both.

The very strange sound quality issue when you use Spirit 2 AFTER making a call is still present. It sounds like an AM radio with the skip phenomenon you get with sound fading up and down. Full reboot still sorts. Seems like CM11 leaves the audio sub-system in a strange state after a call. This is with a conventional call on the phone, not headset. Not tried that.
[Spirit FM] mikereidis:
Moved.
[Spirit FM] mikereidis:
Good. :) You could try 0910 and 0911 to find out, but I'll be happy to call it fixed regardless. ;)

OK.... Will be fixed in time...
[Spirit FM] mikereidis:
Good,.. Thanks... :)

No DAB is completely impossible with the FM chips in phones.

Most of us smokers use lighters these days I think; or e-cigs and vaporizers, LOL.
[Spirit FM] mikereidis:
One or 2 DAB or HD Radio cellphone prototypes were built back around 2012 I think, LOL.

Besides "Emerging Markets"*, FM chips seem to slowly be moving out of smart devices, led by Samsung at least. And DAB or HD-Radio chips are not replacing them. Digital radio seems pretty non-existent on ANY smart devices, with none known to be in the pipeline.

Basically, data-plans and streaming are looking to leapfrog past "normal" OTA broadcast digital radio.

I've noted that the last of the Apple IPods are officially dead now, and with it, any sort of FM or other OTA broadcast radio on Apple devices.

*"Emerging Markets": Today September 15, is the day that Android One is officially released, and I think all Android One devices have FM radio. So far it looks like Android One sales will ONLY be in India, which I'm not surprised about.

I THINK this means that the first ever Google FM app is released. I have no idea if the source code will be released. The first Android One phone whose specs I looked at showed a MediaTek SOC/chipset. Are they ALL MediaTek ?? I assumed Qualcomm.

MediaTek SOC and FM code has been secret so far. I'm interested to know how this shakes out, but still think it unlikely I will ever support MediaTek.

I still think it would be pretty cool if some widely available Chinese devices had SDR chips built in. There may be some and I just don't know.

I've found that I CAN use a powered USB hub to provide the large power needs of an SDR dongle. Battery gets eaten a LOT slower that way; most power is for the chip I think, and not so much the phone SOC.

I still think it's possible to have a tablet running 24/7 with SDR, IF the kernel supports charging in OTG mode, AND if a Y cable or specially wired cable is used.
[Spirit FM] mikereidis:
Spirit Transmit for rooted Zperia Z*/T devices is finally updated from v1 to v2 (0915) https://play.google.com/store/apps/details?id=fm.a2d.st

V1 is still free to download here: http://d-h.st/ytE

But V2 is for Play customers only. Price is now lowered from 10 Euro to what I'll call the normal price of Euro 7.99 or USD 9.99.

The more financial support I get, the more features I can add. I see 11 sales in August, thank you all... :)

V2 0915:

- Turn off wired headset at start and for each new song (or most ?)

- Raise Music volume to maximum at start

- RDS from music player metadata. PS = song duration in seconds. RT = "Title / Artist / Album"

- Requires Kitkat 4.4+ due to the new standard Android API for reading player metadata.

When starting, if System Security setting for Notification Access for "Spirit Transmit RDS" is not enabled, a screen will be shown to enable it.

This "security" is so that "bad apps" won't send your music and video information (eg porn.avi) to a server somewhere. Spirit Transmit only uses this info to send it via RDS, although the info IS shown in the system logcat at this time.
[Spirit FM] wyvernwaddell:
Hi mike!

Here's a little more info on the HTC one max thing.. I'm not sure what it means personally, but at least he's trying.

CM 11 seems to be using/looking for V4L2?

[quote name="Flyhalf205" post=55464346]The modules are built into the kernel making them already active. I probably need to take a look at the version of the radio-iris driver.

:([/QUOTE]

Here is the two things in your log that confuses me that the other guys are saying.

But it is loading the module inside the kernel. https://github.com/CyanogenMod/andr.../cm-11.0/drivers/media/radio/radio-iris.c#L15
[Spirit FM] mikereidis:
:)

http://xdaforums.com/showpost.php?p=55471130&postcount=428
[Spirit FM] mikereidis:
For future reference about this common radio-iris-transport problem, I copied my post from here: http://xdaforums.com/showpost.php?p=55472430&postcount=429

Re: FM drivers:

I see relevant commit messages here: https://github.com/CyanogenMod/android_kernel_htc_msm8974/tree/cm-11.0/drivers/media/radio

I'm guessing that this m8_defconfig file is not used: https://github.com/CyanogenMod/android_kernel_htc_msm8974/blob/cm-11.0/arch/arm/configs/m8_defconfig

Because it specifies a module for radio-iris-transport. But it shows the important requirements without the committed fixes:

CONFIG_MODULES=y
CONFIG_RADIO_IRIS=y
CONFIG_RADIO_IRIS_TRANSPORT=m
[Spirit FM] wyvernwaddell:
Spirit one and spirit 2 now can work with the htc one Max t6ul. Flyhalf205 built a test kernel tonight that let it work perfectly! Yay!! I'm expecting whatever he did to make it into the cm11 commits soon ( hopefully)!
[Spirit FM] KoscheiTheDeathless:
I'm not crazy about the new update to Spirit xmit. It has to be force closed to turn off, for one, which I can't imagine is expected behavior. My main gripe is the turning off headphone output bit, though. I prefer the old way, as i like to just turn on xmit with earbuds in, then take them out and be at the exact same spot in the song. The fact that it kills earbud output without pausing means it's skipping part of the song.

Both are just minor niggles, and I can (and have) just go back to xmit 1, but I feel like it at least bears mentioning.
[Spirit FM] mikereidis:
Good. :)

Those of us w/ HTC OneX's, OneS's, etc. would be happy to see FM work on CM kernels again.
[Spirit FM] mikereidis:
No it's not. I'm not noticing this on my Z or Z1, both with stock rooted Kitkat.

What device and ROM/version ?

I'm always happy to get feedback. If it makes sense, I'll make things configurable.

I left wired headset audio on for version 1, for testing as much as anything. But some people have preferred it be off, and that worked better for me too, so the only audio would come from the receiver. Best transmit results come from maximised volume, and that can be annoying coming out of an earphone.

I'm not sure what you mean about taking the earbuds out; out of your ear or unplugging them ? And I don't understand why it would be skipping part of the song.
[Spirit FM] Kess78:
A little trick to increase the volume for Spirit transmit when it's already at the maximum : Go to Settings > Sound > Sound effect, and enable dynamic normaliser. All your songs will then have the same volume which is usually higher than the default maximum volume.

Is it possible that the PS shows the title of the song and the album ? Many car sysstems doesn't have RT and I don't find having just the song duration to be very usefull... Maybe it's not possible because you have to make it scrollable...
[Spirit FM] mikereidis:
That's exactly what TV & Radio stations, and CD producers do as part of the "Loudness Wars".

So EQ is applied then... I haven't even tested that....

Anything is possible. :)

Here in North America, the most common use for PS is scrolled RT, although it's SUPPOSED to be non-distracting for car drivers according to the RBDS spec. My Prius only shows info when car is stopped.

The Qualcomm chip and the API even support scrolling, so it shouldn't be very hard.

But for now I'm back to Spirit2; there's a lot of work to do for Android L, which seems imminent.
[Spirit FM] mikereidis:
Android L / 5.0 / LMP:

I've started the work on Spirit2 to deal with the imminent Android L release.

Access to the FM device and audio drivers will have to be done from a daemon process running with SU/root privilege.

The Spirit2 code was setup to do these things from the app process, using chmod to change device permissions. But this doesn't work with the more secure SELinux setup.

FM device daemon looks good, and will help me remove a few dead layers devoted to the now "old" (especially on Z2 and maybe Z3+) Sony/STE proposed Android FM API.

Audio, OTOH could be tricky. A daemon doesn't have easy access to Android APIs for sound output.

I'm considering a new approach that reads from the "microphone" as far as Android knows. (But under the cover is secretly switched to an FM input). This might actually help to resolve Google Now problems and GT-I9000 chipmunk issues.
[Spirit FM] mikereidis:
Android One kernel source for the Mediatek devices is released and has a lot of code for various Mediatek chips. FM drivers for Mediatek are here: https://android.googlesource.com/kernel/msm/+/android-4.4.4_r3/drivers/misc/mediatek/fmradio/

I still have no plans at this time to support Mediatek, simply because I don't think it's an efficient use of my time; I might make literally a few extra sales and at the same time make millions of Chinese "non-customers" happy, and sending me 10+ times as many debug logs, LOL. And I'd need many devices and a few years to support properly anyway.

Then again, they might just run the Google FM app.

I haven't seen the Google FM app yet. It might work ONLY on the Android One Mediatek devices. It might be open sourced, or maybe it won't be, like GMail, Play, etc.

It's interesting because this would be the first Google Android FM app. But I think it will be limited to Android One in a few countries, just like SDCard, dual SIM and removable batteries.

Hmm, since an SDCard is needed to "download content" and since some people may not buy one, or may have limited space, it seems to me that the FM app would be even more important as a source of music.
[Spirit FM] Cookie Ninja:
Seriously doubt Google making FM player on One devices open-source. These are mediatek based, has lot of hackability/better use potential by the industrious hacker community in India / Asia, which Google DOES NOT WANT!

Dead Cookies leave no trails...
[Spirit FM] mikereidis:
Android isn't like many other open source projects. Google works on it secretly, then one day, unannounced until the last minute, they "throw it over the wall".

Except for "AOSP", it seems rare for Google to pre-announce whether or not they will release source code for things. I don't know if they have said if they will release "Android One", and same for Android Wear and Google Glass.

Kernel source is of course covered by GPL, so we know Google will release that. But we never know if Google might start using binary blobs, as NVidia has for PC Linux, without any court challenges.

So we don't know if "Google FM" will be closed source like other Google apps, or open like AOSP apps. It may even be a closed source Mediatek FM app, or at least derived from the Mediatek app.

I see various FM kernel drivers here: https://android.googlesource.com/kernel/mediatek/+/android-4.4.4_r3/drivers/misc/mediatek/fmradio/

I'll note that the now released Android One kernel with Mediatek drivers has code for many more chipsets than just the one used in Android One right now. Hopefully this is the start of new GPL co-operation from Mediatek. (Though I still have little incentive to support Mediatek.)

The current Google/Mediatek FM app may only have code for Mediatek chips at this time, and might even be tightly bound to their chips, just like the Qualcomm FM app we see on some CM ROMs now.

I couldn't find an Anbdroid One ROM dump anywhere yesterday. If anyone sees one, please let me know. I'm also interested in a video with a good look at the FM app. I don't want to waste a lot of time watching videos that may only have a brief glance.
[Spirit FM] mikereidis:
Spirit2 0920 HIGHLY EXPERIMENTAL Audio mods, in preparation for Android L: http://d-h.st/0z9

Also available via Play: https://play.google.com/store/apps/details?id=fm.a2d.s2 for those signed up as beta group members: https://play.google.com/apps/testing/fm.a2d.s2

May be glitchy on HTC OneXL, Xperia Z1 and ROMs I haven't tested with (mostly CM11). Xperia Z2 probably stock only.

The method to read digital audio data from the FM chip has a major change.

0912 and earlier use low level ALSA PCM functions to get the digitized audio.

This has problems when the Android audio system is not aware a digital input is being used, and eg Google Now hotword detection can cause problems. It also seems to be broken by the security likely in at least some Android L ROMs, if not all.

This new 0920 Hi-Xperimental release uses the standard Android APIs to read from the microphone input.

Then Spirit sneaks underneath and switches the input from microphone to FM. This seems to be working pretty good, though some phones can have strange audio effects sometimes. Sometimes pressing Pause/Play or rebooting will fix.

Other positive effects, besides mic interference avoidance and Android L support may include:

- Reduction of audio glitching.

- Reduction of CPU/power usage.

- Faster audio switching.

- Less dependence on SU commands.

These mods alone won't guarantee Android L compatibility.

At a minimum the low level tuner code needs to become a root daemon and shed the shackles of the now clearly dead STEricsson ancient proposed and dead Android FM API on which Spirit2 was built. This will be much cleaner. faster and more efficient when done. I've prototyped it and might need a week to fix it up.
[Spirit FM] :
Mike,

just downloaded, will test when Canada ist asleep but as for now, that Europe is awake, have to chop wood at first.