yashsingh1/xdaforums huggingface dataset:
[Spirit FM] seraser:
Yes, CM7 on spica.

I havent any signal, some times show me -128, or -108, but in all frequency, I think no seek any signal.

Have you look my log?

edit:

Finally, yes is your app the reason of the noise or talk to earphones, I need firs enable your app, and then I can listen these sounds routed of the speaker of the phone to the earphones.
[Spirit FM] mikereidis:
Motorola has traditionally used Texas Instruments FM/combo chips, and unfortunately they haven't kept pace with the other, more sensitive chips from Broadcom, Qualcomm and Silicon Labs.

TI is in the midst of exiting the mobile business; not 100% sure about their FM/combo chips; and even Motorola has been moving to other chips recently.

I haven't heard about lack of RDS on Xperia Z. If rooted you can try setting Debug-> FM API to "Low Level" and restart Spirit.

Spirit shouldn't use much CPU unless digital audio is in use.

Most of my work for the last year has been enabling and fixing audio issues.

As I've said in the last 3 posts (LOL): I encourage anyone with these phones and some skills to find out how to enable the FM audio.
[Spirit FM] mikereidis:
Post #1 of this thread has digital audio support info:

Digital audio support:

Rooted International Galaxy S, S2, S3, Note, Note2.

Rooted HTC One XL, One S, Evo 4G LTE, Sony Xperia T.

Most stock Sony 2012-2013 devices.

The "One XL" is the Qualcomm SOC based LTE variant, as sold by AT&T as (confusingly) a "One X", or Internationally as the "One XL".

The International OneX that uses the NVidia chipset does not support digital audio.

No, it's not related to DAB, just normal 88-108 MHz FM. So far, AFAIK, there are no production Android devices that support DAB, at least none that are readily available in the 1st World.

As stated in post #1, this is what digital audio support can provide:

Bluetooth A2DP headsets in CD quality stereo.

Recording in CD quality stereo.

External visualizers, equalizers and effects.

Internal Wave and FFT visual: 5x8 dB & log2 43 - 22,050 Hz.

If you don't want or need any of these features, stick with the default of analog audio, which is easier on the CPU and battery.

For digital audio, set Menu-> Settings-> Audio-> Method to "Digital Auto" and restart Spirit. For analog, use the default of "Automatic".
[Spirit FM] Lagkage:
zicoxx wrote about how to enable FM audio on this device here: http://xdaforums.com/showthread.php?p=41799017#post41799017 and here: http://xdaforums.com/showthread.php?p=41828581#post41828581

Could you try this and see if it helps?
[Spirit FM] pmn1:
I'd love to help, but I do not know what to do.
[Spirit FM] mikereidis:
Spirit Light (free as in beer) June 8: http://d-h.st/rOC

- I haven't sold the Light version for a few months now, and I'm in a good mood (after a month mostly away from coding), so here is a legitimately released "free as in beer" copy of the Light version.

Run it, re-upload it, pass it around or whatever, as long as it's not modified.

I am making no commitment to updates or anything for any free version.

- Experimental support for LG Optimus 4X HD P880.

Device name "x3" should automatically set new Audio-> Method = "LG P880".

Report audio problems with phone calls or system sounds or audio notifications, and I'll suggest options and will be able to make the settings automatic.

Support may never be official, but I'll consider it if sufficient requests come from people reporting few problems.

...

Oh yeah, I forgot about that.

I'll see what I can do; check back within 24 hours... :)
[Spirit FM] young440:
Works good on the Inspire 4G. You just need to click it to the back speaker then to the headphones to get sound.

Very nice job! Superb app!
[Spirit FM] itsmemario:
Any progress on Optimus 3D (4.0.4) ? ^^
[Spirit FM] zicoxx:
Very Thanks,

I test it on my rom (mokeeOS 08062013 baseCM10.1 RC5) but unfortunaly no audio..nothing..i'm sorry..

Also when i select in Audio Settings LG P880 (or automatically) no audio..

So only when i use the alsa conf "trick" (enabling INB2) audio works..
[Spirit FM] mikereidis:
Spirit Light June 11: http://d-h.st/i5I

Using /dev/snd/controlC1 instead of /dev/snd/controlC0.
[Spirit FM] eFCiKay:
works great now with headphones. (P880 @ CM10.1 RC5)

but no output at speaker

thanks anyway so far :)
[Spirit FM] hth3heretic:
Thanks, never thought I could still listen to AM/FM radio nowadays

it worked like a charm on my CM9.1 HTC Legend Android 4.0.4, thank you

Using Jun 11 version
[Spirit FM] mikereidis:
:)

Legend was my first Android phone and the first running Spirit. My wife has it now and I still test on it occasionally. Now with CM9 I think, as Darky ROM GB just seemed too ancient.
[Spirit FM] mikereidis:
HTC One X International (Tegra) and HTC Amaze seem to have problems with bad reception or tuning on recent CM releases.

I saw this on my One X International with CM10.1 June 10, but March versions seemed OK.

These phones both use TI FM/combo chips and my guess is that something is that something is messed up with the /dev/tifm driver in the kernel.

I will be looking into this further.

EDIT: I may have been fooled because a few local stations aren't transmitting, and many of the rest reduce power substantially after 1:00 AM or so.
[Spirit FM] mikereidis:
Spirit Free June 12: http://d-h.st/CsN

Also on Play.

- Stereo enabled on Free version. (May or may not be disabled in future; no promises.)

- Hopefully better support for LG Optimus 4X HD P880:

Doesn't mute INB2 Switch'es. Maybe speaker will work ?

Automatically enables Debug Silent Loop to keep audio working & with volume control in background.

No automatic setting of Audio-> Volume Scale to 10 or similar. I think it might be better to reduce one or more of these ALSA controls:

INB Volume

Headphone Volume

Speaker Volume
[Spirit FM] slackhead:
Just wondering if it supports the MSM7225A chips used in the LG E400? I did try but I couldn't get any sound and I'm not sure if it's an audio problem or a problem with the FM Chip (or something else entirely).

Any ideas?

PS I'm in the UK and I couldn't find which band that is meant to be.
[Spirit FM] harpon:
Thank you , HD2 paranoidAndroid 2.54 and 2.9 running perfect.

Good work, good app.

:laugh:
[Spirit FM] mikereidis:
The SOC/CPU (MSM7225A) is never an issue. The issues are the FM chip and the audio path.

The LG E400 has a Qualcomm Tavarua FM chip and Spirit can support that with the Qualcomm Iris V4L support.

I never figured out how to enable FM audio on the E400 though. I don't expect that to change, but somebody someday may figure it out.

Band doesn't matter much, but in the UK the "World 200 KHz" setting is probably best.
[Spirit FM] mikereidis:
For phones with no FM audio support:

I posted this on the Razr I thread, but it's of general interest.

If Spirit "works" but no audio can be heard, somebody with the time and the skills (and/or the the abiility and time to learn), may be able to figure out how to enable FM audio.

If the info gets passed back to me, I can try to incorporate it into Spirit. It's a LOT of work (though it may sound simple). That's why I don't have the time to do the work myself to support the many many hundreds of phones I don't support at present. Even if I had the time to do the work, I don't have the resources to obtain and maintain code for anything but the most popular Android devices.

----------

Having time is pretty much essential, even for me, first to get it working at all, then to make it work well in the midst of phone-calls and other audio interruptions.

I also don't have time to write much of a tutorial, although I'll consider that when I have some time.

This AlsaMixer app can be useful: https://play.google.com/store/apps/details?id=com.skvalex.alsamixer&hl=enhttps://play.google.com/store/apps/details?id=com.skvalex.alsamixer&hl=en

Also command line utilities via ADB shell: alsamixer, amixer, aplay. The Spirit ssd utility does pretty much the same as these, but using the lowest level and undocumented kernel ALSA API, to avoid the need for ALSA libraries, config files etc.

Also one can Google "Android ALSA" for info.

On older phones it is more common to open an analog audio channel for FM just by setting ALSA controls. Recent phones are more likely to use digital audio, and many require that a "Hostless PCM transfer" be set up. This is more complicated, but can be set up using aplay or ssd.
[Spirit FM] slackhead:
I installed alsamixer and got a message that alsa wasn't installed.

Looking in /proc/asound:

root@android:/proc/asound # cat devices

33: : timer

root@android:/proc/asound # cat

cards devices pcm timers version

root@android:/proc/asound # cat cards

--- no soundcards ---

I tried recording some audio and got a 0 byte file.

The log shows this section repeated ad infinitum:

LOG:E/fm_srvc poll_tmr_hndlr ! mpsl.isPlaying
LOG:D/fm_srvc out_set: 2 m_aud_meth: 76 m_aud_meth_htc: 0 m_aud_meth_gals2: 0 m_hw_mute: tr
ue m_am_mute: true
LOG:D/fm_srvc dhrdw_mute_set fd: 6 mute: 1
LOG:D/fm_srvc audio_maint_start
LOG:D/fm_srvc aud_mute_handle unmuting muted_with_focus = false
LOG:D/fm_srvc audio_focus_set: true
LOG:D/fm_srvc audio_focus_set phone_state: 0
LOG:D/fm_srvc_afcs focus_set focus: true vcs: 3 focus_active: true muted_with_focus: false
LOG:D/fm_srvc silent_start silent_active
LOG:D/fm_srvc setForceUse usage: 1 config: 1
LOG:D/fm_srvc setForceUse ret: 0
LOG:D/fm_srvc dhrdw_mute_set fd: 6 mute: 0
LOG:E/fm_srvc silent_start restart must restart playing/looping
LOG:E/fm_srvc silent_start media player error 2: java.io.IOException: Prepare failed.: status=0
x1

I'll read up more on alsa on android to see what I can dig out. I'm used to using it on linux but my knowledge of android/java is pretty limited.
[Spirit FM] 3XTR3M1ST:
I had the Mar 11 release of spirit and it works fine on my Huawei Honor, albeit a little too buggy. But I can put up with it since I loved spirit so much. Today I tried to get an upgrade to Apr 06 and May 08 releases but it just gives me the device not supported error. What did you do to "un-support" my device? No love?:crying::crying:
[Spirit FM] mikereidis:
That's one of the problems with ALSA on Android. Many stock and custom ROMs don't have the ALSA libraries and config files present.

This is why I created my ssd utility. It uses the undocumented lower level kernel API for ALSA. I'd like to make it match the syntax of the common amixer or alsamixer utilities, but for now it has it's own syntax. I'll write up and post a quick tutorial on it.

Linux knowledge is the most important for low level stuff like this. Android/Java can be mostly ignored.

It looks like you have Audio-> Method manually set to "Sony/STE/Android". I don't think that would be automatic. Nothing to worry about there, though for testing using "None" or even "Custom" might be best.
[Spirit FM] JasonZech:
Here is a stupid question. I have a lg spirit 4g (I know. No relationship with the FM app). Does anyone know how to get this to work on this phone? Its similar to the lg motion.
[Spirit FM] mikereidis:
Yeah, I'm afraid so; I've been getting way too many pirate debug logs from "Asia" and I've been hoping to stem the tide.

But I added a "super secret bypass" that may stay in place, at least as long as I don't see it in too many pirate debug logs going forward... :)

From "adb shell" or a terminal app, do this:

mkdir /sdcard/spiritfm

I'm not sure which Audio-> Method you are using; I've removed some methods for un-supported devices. But for "msm7x30 ..." devices there is an "msm7x30 Custom" setting that can be used in conjunction with Debug-> msm_snd_headset and msm_snd_speaker, if you know the numbers.
[Spirit FM] mikereidis:
:) There are no stupid questions.

Well, I did a Google and sadly saw what looked like piracy of Spirit Unlocked on that AndroidForums thread.

That's not the "Spirit" I was hoping to find, particularly given the existence of many free versions of Spirit that are fine for testing.

Does the spirit or motion have a stock FM app in any variant, or has anyone seem FM working at all ?

Does Spirit show an RSSI signal strength at top left of 20 or higher, when tuned to a strong station and with a wired headset plugged in ?

Which FM/combo chip(s) are in this phone ?
[Spirit FM] mikereidis:
It turns out ALSA is of no use on the LG E400. It uses the older Qualcomm /dev/msm_snd device.

From the debug log you sent, Audio-> Method is getting set to "msm7x30 LG" and it uses the right device numbers for speaker and headset on this phone.

So now we're sadly back to where things stood with the LG E400 1-2 years ago: No audio, though the FM tuner part was showing a good RSSI from your log.

One thing to try is enable Debug-> Silent Loop and restart Spirit.

I'll also note that normally this phone would have a init.qcom.fm.sh file in /system/etc . It references a /system/bin/fm_qsoc_patches file I don't see on your ROM .

I've never worked with fm_qsoc_patches as it's only needed on the old Tavarua chips I've never used first hand. But here's the contents of init.qcom.fm.sh and I note that there is a "isAnalog" variable . I think these Tavarua chips could do analog or digital audio, and by default I think it's digital. Switching to analog (or digital) may help.

Note that the getprop command get's initial properties from /system/build.prop.

init.qcom.fm.sh:

#!/system/bin/sh
# Copyright (c) 2009-2011, Code Aurora Forum. All rights reserved.
#...
setprop hw.fm.init 0

mode=`getprop hw.fm.mode`
version=`getprop hw.fm.version`
isAnalog=`getprop hw.fm.isAnalog`

#find the transport type
TRANSPORT=`getprop ro.qualcomm.bt.hci_transport`

LOG_TAG="qcom-fm"
LOG_NAME="${0}:"

loge ()
{
/system/bin/log -t $LOG_TAG -p e "$LOG_NAME $@"
}

logi ()
{
/system/bin/log -t $LOG_TAG -p i "$LOG_NAME $@"
}

failed ()
{
loge "$1: exit code $2"
exit $2
}

logi "In FM shell Script"
logi "mode: $mode"
logi "isAnalog: $isAnalog"
logi "Transport : $TRANSPORT"
logi "Version : $version"

#$fm_qsoc_patches <fm_chipVersion> <enable/disable WCM>
#
case $mode in
"normal")
case $TRANSPORT in
"smd")
logi "inserting the radio transport module"
insmod /system/lib/modules/radio-iris-transport.ko
;;
*)
logi "default transport case "
;;
esac
/system/bin/fm_qsoc_patches $version 0
;;
"wa_enable")
/system/bin/fm_qsoc_patches $version 1
;;
"wa_disable")
/system/bin/fm_qsoc_patches $version 2
;;
"config_dac")
/system/bin/fm_qsoc_patches $version 3 $isAnalog
;;
*)
logi "Shell: Default case"
/system/bin/fm_qsoc_patches $version 0
;;
esac

exit_code_fm_qsoc_patches=$?

case $exit_code_fm_qsoc_patches in
0)
logi "FM QSoC calibration and firmware download succeeded"
;;
*)
failed "FM QSoC firmware download and/or calibration failed" $exit_code_fm_qsoc_patches
;;
esac

setprop hw.fm.init 1

exit 0
[Spirit FM] JasonZech:
I'm sorry about the motion forum. It's sad when people either don't ask for at least use the free app as a base.

As far as the lg spirit I get reception for About a few seconds (over 20 strength). Then it just drops to zero. The spirit does not come with any app (probably due to metropcs).

Not sure on the chip set.

I would love to see this app work on our phone.

---------- Post added at 10:28 PM ---------- Previous post was at 10:21 PM ----------

On AF, they took down the links. I hope that is a little comfort. I know it's not much. But at least a start.
[Spirit FM] slackhead:
The only fm_qsoc_patches I could find is from CM7, which, not surprisingly, segfaults. I'll dig around to see if I find the source, but google isn''t throwing up much, apart other files that reference it. It doesn't appear to be in the GingerBread version I downloaded either.

Many thanks for the help so far.

---------- Post added at 11:16 AM ---------- Previous post was at 11:07 AM ----------

Also, I don't have the radio-iris-transport.ko module, although I do have /dev/radio0 so maybe it isn't needed?
[Spirit FM] Dan Tarbuck:
Hi Guys

This app is awesome, i purchased it last night! Now i can listen to all fm frequencies available locally to me and thats ace, but i bought it to record a confrence over the next 3 days that is being broadcast.

I have tried doing this and it saves it as a .wav file that seems unreadable in any program? i have had one that reads it and that creates a stuttery noise...

I have an international gs3 i9300 rooted with stock rom..

Any help much appreciated.

Dan
[Spirit FM] Conceptunlimited:
Kindly suggest!

I am planning to buy a LG Nexus 4 which doesnt have a FM radio inbuilt. Can your app be installed without rooting the device? Does it work consistently well? How to install? If answer is already in the thread, suggest the page numbers. ;)

Plz Plz suggest. I just couldnt go through all the pages .... too busy these days. sorry.

P.s. Big fan of your app as I used it quite a lot on my SII.:good:
[Spirit FM] Lagkage:
These phones doesn't have FM including the Nexus 4:

From the compatibility list here: http://xdaforums.com/showpost.php?p=13380058&postcount=2
[Spirit FM] mikereidis:
:) It only takes seconds with Google to find pirate-able downloads, so I know I'm not plugging any holes effectively.

I just hope to gently remind people on a few sites that I'm one real person trying to help people needing FM, while making a modest income. I think most devs are lone individuals (who eventually give up), and not large faceless companies with questionable morals using every trick they can to maximise profits.

OK, so nobody knows yet if FM is even possible. Is there any service manual with schematics available ?

Power on spike in RSSI is very unusual; I've never heard of it. It could just be an artifact, or it could be something like Spirit taking over a Broadcom FM/combo chip UART and the BT stack killing that.

Send me a debug log with Menu-> Test-> Email-> Logs. After 20 seconds or so press Send.
[Spirit FM] mikereidis:
/dev/radio0 works fine, via the "Tavarua" driver built into the kernel. The debug log you sent shows RSSI around 40 I think, which is good. So, the tuner is working. Unlocked should show RDS to confirm. Email me and I'll send a test copy.

radio-iris-transport is only needed for the newer WCN3660 "Iris" FM/combo chip. You have the old Tavarua (/ Bahama).

I don't think Qualcomm released the source for fm_qsoc_patches.

Check this FM thread for Huawei x5/Ideos u8800 & x6/Ideos u9000 : http://xdaforums.com/showthread.php?t=1151928

Somewhere there is a user named honking who adapted the Qualcomm app for Huaweu u8800, which has the same chipset. You should try that app, but it may be more likely to work on stock ROM, or at least those with fm_qsoc_patches and the init file. Here's a list of such devices:

- Acer Liquid Metal

- Casio G'zOne Commando C771

- Huawei x5/Ideos u8800, x6/Ideos u9000

- Kyocera Rise C5155

- LG Optimus L7 P700, P705g. Qualcomm FM chip w/ RSSI but no usable Audio-> Method on stock un-rooted it seems.

- LG Optimus Sol E730 (victor)

In March, 2012, I posted why I was giving up on those devices: http://xdaforums.com/showpost.php?p=23241903&postcount=2391
[Spirit FM] mikereidis:
You should try Digital Audio mode. If digital audio works, record should work.

Set Audio-> Method to "Digital Auto" (near the end) and restart Spirit.

I'm still calling Digital Audio experimental, but I've run it for some time successfully on my GS3 with stock rooted JB ROM.
[Spirit FM] mikereidis:
As Lagkage said. AND...

The very similar (and twice the price ?) LG Optimus G has SOME International non-US variants that support FM and come with a stock FM app.

Spirit runs, with perhaps still some issues (?), on these Optimus G's running some custom ROMs; I'm not sure about stock.
[Spirit FM] JasonZech:
I have a feeling this isn't going to work on the lg spirit.
[Spirit FM] mikereidis:
Thanks for the debug log.

Yes, AFAICT FM is not possible on this phone.

The OEM API is not there, but if rooted Spirit can access the Broadcom BCM4334 FM/combo chip.

But RSSI signal strength at top left was always 0, -16, or -17, same as I've seen on many BCM433x chips when their FM antenna was shorted to ground.

I presume you see the same, even when tuned to a strong station with the wired headset plugged in.

Even if FM "worked" there are no obvious ALSA driver controls for FM audio. There are several references to "Internal FM" but that's only for devices using the Qualcomm WCN3660 FM/combo chips, which this phone doesn't have.
[Spirit FM] JasonZech:
Kinda had a feeling. Thanks for the effort though. I am rooted and custom ROM. Since I saw the info on the motion forum I had hopes. But that's alright. :). Thank you again. Have a great year!
[Spirit FM] Conceptunlimited:
Link didn't open. Will your app work on Nexus 4 without rooting?
[Spirit FM] benjdm:
I'm pretty sure the Nexus 4 doesn't have an FM radio.
[Spirit FM] Lagkage:
Spirit won't work with rooting or without rooting. The Nexus 4 doesn't have hardware capable of FM radio.
[Spirit FM] seffparker:
Why this app automatically turn on bluetooth?

what is connection bw bluetooth and FM :)

FM stop working when bluetooth turned off manually?

whats all these?
[Spirit FM] 089man:
Best sound mod für s2, works great with spirit.. Great sound..

http://xdaforums.com/showthread.php?p=39156703

I9100 Tapatalk 2, Rom1 Rootbox / Rom2 SlimBean , Kernel Dorimanx
[Spirit FM] mikereidis:
Most FM chips are part of "combo" or "combination" chips that also handle WiFi and Bluetooth. Usually the FM is controlled with Bluetooth HCI commands.

The BT issue is a 2 year old issue/limitation. I will try to eventually add code that detects a change in BT state and effectively does a big reset.

Assuming your ROM uses the normal open source Bluez BT stack, you can work around it by manually enabling BT, I think automatically by setting Debug-> HCI Access to "BT Socket".

Normally, when BT is off, Spirit connects directly to the Broadcom "BT/combo chip" UART. If BT is then started, then the BT stack takes over the UART and that causes a conflict.

Same problem happens if you turn BT off while Spirit is running.
[Spirit FM] mikereidis:
New Qualcomm based Nexus 7:

http://www.androidpolice.com/2013/0...-just-popped-up-in-fcc-and-bluetooth-filings/

I expect to buy the new Nexus 7, whether or not it is capable of FM.

My original base Nexus 7 has been and remains IMO good value for money for the $200+ paid, despite no native FM. I use it to read morning news, check the Spirit UI at small tablet size, and occasionally experiment with the Dongle SDR radio solution: http://xdaforums.com/showpost.php?p=38887290&postcount=5603 . I have 2 now US discontinued docks on order that I will rewire for dongle and amplified speaker connections.

My initial N7 plan had been to try and enable FM. I saw no easy way to add an antenna connection and never went farther, and nobody else seems to have either.

Tegra chipset was fine for performance at the time, but remains unpopular in phones.

The NEW N7 chipset is Qualcomm: CPU APQ-8064, WWAN wtr1605l, FM+WLAN WCN3660.

As with every Nexus (except the now ancient N1) I expect the 2 WCN3660 FM antenna pins to be grounded, rendering FM unusable for receive OR transmit. But there is always some possibility for a simple hack.

I guess that with data capability (in all new N7's ?), Google will be pushing their music sales & services & whatever "Google Radio" streaming services they come up with.

So this may or may not be my second Android device with no usable internal FM, but assuming the price is reasonable (say $300-350 or less), I can't imagine not getting one.

With the popularity of high end Qualcomm devices this year, just having a device with a popular audio system to examine can be useful, even if the "Internal FM" ALSA controls are effectively dead.
[Spirit FM] maconic:
A2DP

Hi Folks,

is there any doc on how to get Radio Audio over Bluetooth working? I don't see any option in the App or any mention in the docs :(

Device: SGS3

THX!

Cheers,

MaC
[Spirit FM] Lagkage:
Is your GS3 rooted? Then go into settings and choose Audio>Method>Digital Auto and the FM audio should go to the BT device automatically when connected.