yashsingh1/xdaforums huggingface dataset:
[Spirit FM] D_Angelos:
i have lgp990 with latest cm10 and i downloaded the latest version of spirit fm..it seems to work fine(signal,frequency,name of station) but i cannot hear anything...what to do?

thank u very much
[Spirit FM] mikereidis:
What to do ? Regrettably the only answer I have right now is to find someone who can figure out how to enable the FM audio. :(

I made some "last ditch" efforts in the last week to try and re-enable the LG P9xx devices that haven't been working since ICS ROMs appeared. But it appears I was unsuccessful, so I'm giving up on all LG devices, except the Optimus One P500, which I have and which is/was much easier to support.

Going forward I'll be concentrating on popular, newer, more high end devices, especially those from Samsung and HTC. I'll consider other devices though, such as the LG Optimus G.
[Spirit FM] mikereidis:
I'm quoting the original (to Nov. 12, 2012) post 2 device compatibility list for Spirit to preserve the information, albeit messy.

I am still trying to maintain it at least partly, as of Dec 19, 2012, or whatever "Last edited" date you see at bottom.
[Spirit FM] R2D2_NZ:
Mike, I admire your tenacity against what must seem at times to be almost insurmountable odds. This is just to let you know how much I appreciate the FM functionality your app has enabled on my HTC sensation.

Even if you should decide to abandon the struggle to overcome the obstacles the carriers and HTC insist on erecting, I have a darn good FM solution, thanks to your efforts.

Salut, my friend.

R2
[Spirit FM] mikereidis:
:)

And the GS3 ? Sensation is 4th in this months sales stats, just behind GS3 in 3rd.

I appreciate the "mission of OTA FM", against Googles' indifference and the US carriers hostility. But it doesn't drive me.

My mission is 2 parts:

1 - Fill a niche that can provide a sustainable income.

2 - Job satisfaction, which comes from:

2a - Working for "myself" instead of some corporation and all the benefits that provides.

2b - The engineers goal of having his creation out in the world, doing useful stuff. In over 2 decades of professional software development, there is likely very little code I wrote still in operation, other than this project.

The next step in job satisfaction is the 2nd phase of Spirit, which will concentrate on fewer devices. I hope for this to raise quality and functionality, reduce support and testing burdens and still provide sufficient income.

In a way I can feel a bit bad about "leaving behind" less popular and less expensive devices, but that's the price to pay for my sanity and satisfaction. And any/everyone is welcome to start another FM app project, but there don't seem to be many takers still.

Currently 5 phones represent 56% of my income, and in phase2 I may limit myself to 20 or so with about 6 different "architectures" and 75%. But phase1 will remain, with about 60 phones well covered, but relatively few updates I think.
[Spirit FM] mikereidis:
Hi xUmaRix. I don't see any posts from you in the last 7 days.

Are you having some trouble or are you reporting success ?

From the log I can see the app is started fine, with a Broadcom chip and using the daemon in BT sockets mode. I don't see any evidence of RDS data reception though.
[Spirit FM] mikereidis:
Hi Idk.

Logcat looks good. If the seek (scan) is working well, then I'd think there must be an antenna connection. The RSSI thing is strange; it's possible a different firmware (*.hcd) file might fix that.

Does seeking work well for a variety of strong stations ?

This won't tell us any more than we already know, but if you wanted to see the RSSI in the logs the following should work:

adb shell mkdir /sdcard/sprt

adb shell mkdir /sdcard/sprt/opt

adb shell mkdir /sdcard/sprt/opt/dbg

adb shell touch /sdcard/sprt/opt/dbg/custom

adb shell "echo 1 > sdcard/sprt/opt/dbg/evt"
[Spirit FM] mikereidis:
Thanks Rage2.

The thumbnail pic shows me your preset buttons are too stretched. I'll fix that asap.

I see the 43L22 has 4 stereo audio analog inputs. The spec sheet specifically mentions FM as a use for those inputs, so we can hope the reference design connected the audio.

I guess the kernel/Android build is pretty generic. Could you send me a "dmesg" output after a cold reboot ? EDIT: Since the 43L22 is "Pin-Compatible w/CS42L52" I'm guessing the CS42L52 is used.

OK I didn't recognise ALSA devices. :o Perhaps something like alsamixer can enable FM audio on devices supporting ALSA.

EDIT: This is an interesting prospect; it may enable FM audio on several devices. Anyone with device drivers in /dev/snd/ and having the "No Sound" problem may be interested in the following:

Do you have any alsa* utilities ? I can try to build an Android version of alsamixer, but the binary from just about any Android device would likely work. My P500h seems to have ALSA support, so I'll try it out.

I don't see anything clearly FM related in your asound.conf file. I'm not familiar enough with ALSA config files to know if that's an issue, but it might not affect the kernel API.

Android devices with ALSA seem to use a alsa_amixer binary. I found one here: http://o2droid.phj.hu/trac/export/5/img_5700/system/bin/alsa_amixer

Perhaps you could try it and see what happens. On my device I get an error: "cannot locate 'snd_mixer_first_elem'". I guess this is because the system/lib/libaudio.so file doesn't contain any of the ALSA API, but yours might.

If this fails, there is an ALSA kernel API that I'd bet should work because Android Sound APIs likely use that api. But it's possible that the mediaserver or some other daemon opens the /dev/snd/controlC0 in exclusive mode. On my device however, it seems to be openable. I'll have to read up on the ALSA kernel API.
[Spirit FM] cos68:
Thanks for the update. It is working great on both my HTC Desire with Oxygen ROM and my LG 540 with CyanogenMod 7 ROM.

I have a few minor issues.

The first issue is when using it with 50 KHz steps as we are using in Denmark. Then when tuning into frequency higher than 100 MHz, then the frequency will be splitted into two lines:

Besides of that I do see problems searching for a channel by using the search buttons. First of all it seems like the frequency searched for are changing in random order. I would have expected the frequencies shown in the display during a search would be sequential like on a normal FM radio.

Both my phones will find a station when doing automatic search, however on my Desire it will show the right frequency when the the search is over, but on my LG 540 the frequency in shown in the display will be a frequency where no station is normally available. Eg.

This station is normally found at 94.1 MHz and the frequency 88.2 MHz is not used in my area. This means that it does find the station but displays the wrong frequency after a search.

Thank you for your application. It just keeps getting better all the time!
[Spirit FM] mikereidis:
Thanks cos68.

Yes and the two line frequency split is worse with eg. 88.001.

Yes, I've seen the "random order" seek update on my Broadcom phone. What happen is 2 registers need to be read and the time between the reads makes the total result inaccurate. I can update the code to read them simultaneously.

And yes I've seen the wrong seek display regularly. Making seek "just work" is surprisingly challenging for such a seemingly easy function. The CM FM app seems to slowly be getting seek functions, and I'll be interested to see how they fare.

I will likely have to overhaul the surprisingly large amount of seek handling code... :)
[Spirit FM] mikereidis:
Whoops, double post; it's late...

I'm currently creating the "red needle" frequency display that allows pressing to change frequency. It's nice when that seeks to the closest station instead of giving static.

And the eventual "Scan for all stations" function needs a good working seek implementation.
[Spirit FM] Kira.Lawliet:
Really noob question, sorry *just found this app out recommended by a friend*

Is the regional band setting should be set for the country nearest you for better audio if the country i'm in is not listed? and what's the PI:-1 at the top left of the screen?

thank you!
[Spirit FM] idkidk:
Hi Mike,

In attach my asound.conf and this is the snd dir:

D:\temp\DD\droid\asdk\tools>adb shell ls -l /dev/snd

crw-rw---- system audio 116, 33 2011-06-17 07:25 timer

crw-rw---- system audio 116, 32 2011-06-17 07:25 controlC1

crw-rw---- system audio 116, 56 2011-06-17 07:25 pcmC1D0c

crw-rw---- system audio 116, 48 2011-06-17 07:25 pcmC1D0p

crw-rw---- system audio 116, 0 2011-06-17 07:25 controlC0

crw-rw---- system audio 116, 24 2011-06-17 07:25 pcmC0D0c

crw-rw---- system audio 116, 16 2011-06-17 07:25 pcmC0D0p

in asound ther is some entry related to fmradio, and i've voodoo sound driver v9 installed....

Bye

Idk
[Spirit FM] scoppyxda:
HI,

Yes, I'm using stock HTC Radio

...Transmitter code? You mean you can trasmit over fm what? Audio? A call? might be usefuf in a Car... but with less privacy...

I'm running Reflex S v2.1.2, based on GB with Sense integration.

Here there are details:

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

Bye
[Spirit FM] Rage2:
Thanks for the answer! I hope for you Mike! :)

Here "logcat" and "dmesg" right after loading.
[Spirit FM] mikereidis:
Hi Kira.Lawliet. PI is RDS "Program ID". This is a number that tends to uniquely identify the station within your continent. -1 means it's not set, so I'd guess you are not receiving the RDS data; some stations don't transmit it.

The Regional Band setting configures:

- Low frequency limit, eg: 87.5 Mhz.

- High frequency limit, eg: 108 Mhz.

- Channel offsets and odd/even. North America uses 0.2 Mhz (200 KHz) and odd frequencies, eg 88.1, 88.3, etc.

- "Emphasis" of 75 microseconds (North America) or 50 uS (elsewhere). This affects the audio upper frequency response. I forget which way has more treble (high frequencies).

- RBDS or RDS data. North America uses RBDS, almost everywhere else (but Korea?) uses RDS.

- North America (or United States or Mexico) can map the "Program ID" to station call letters, but it often doesn't work here in Canada.
[Spirit FM] mikereidis:
:)

Yes, every time I mention FM transmit, several people get excited.

Most people want to be able to send audio to their car radio without wires. But I think if ANYONE ever gets FM transmit working on ANY Android phone, it will likely be limited to functions like "FM Walkie Talkie".

I tried Tx with my TI based HTC Legend and I couldn't detect and signal. I have since found a special function in libbluedroid.so that may enable the Tx antenna but have never tried it. My hands are full with receive only.

I would guess that the developers of the HTC FM app were testing out transmit, but it wasn't a supported feature.

For anyone interested, here is the evidence from the HtcFMRadio.odex file on the stock Broadcom based HTC Desire HD. The HTC references seem to indicate that it's not just unused Broadcom library code:

strings HtcFMRadio.odex | grep -i tx

ACTION_TX_CMD_STATE_CHANGED

ACTION_TX_STATE_CHANGED

CMD_ENABLE_TX

CONCURRENCE_TX_ENABLE

CONCURRENCE_TX_TURNOFF

CONCURRENCE_TX_TURNON

DestroyFMTxTuner

ITxTuner.java

Lcom/htc/fm/ITxTuner;

TRANSACTION_enableTx

TRANSACTION_getTxAudioMode

TRANSACTION_getTxCmdState

TRANSACTION_getTxFrequency

TRANSACTION_getTxScanFreq

TRANSACTION_getTxState

TRANSACTION_isTxMute

TRANSACTION_scanChansTx

TRANSACTION_setMonoTx

TRANSACTION_setMuteTx

TRANSACTION_setStereoTx

TRANSACTION_setUnMuteTx

TRANSACTION_setVolumeTx

TRANSACTION_stopScanTx

TRANSACTION_tuneTx

TRANSACTION_turnOffTx

TRANSACTION_turnOnTx

TX_FREQUENCE_END

TX_FREQUENCE_START

#[DestroyFMTxTuner] mTxTuner is null

"[createFMTxTuner] mTxTuner is null

[enableTx]

[enableTx] FM Rx is not turn off

,[enableTx] TX's state is not TurnOff. State:

[enableTx] mTxTuner is null

[getTxAudioMode]

[getTxCmdState]:

[getTxFrequency]:

[getTxScanFreq]

[getTxState] state:

[getTxState]:

[isTxMute]

0[mFMConcurrenceMsgHandler] CONCURRENCE_TX_ENABLE

1[mFMConcurrenceMsgHandler] CONCURRENCE_TX_TURNOFF

0[mFMConcurrenceMsgHandler] CONCURRENCE_TX_TURNON

[scanTx]

[scanTx] mTxTuner is null

[setMonoTx]

[setMuteTx]

[setMuteTx] mTxTuner is null

[setStereoTx]

[setUnMuteTx]

[setVolumeTx]

[stopScanTx]

[tuneTx]

[tuneTx] mTxTuner is null

[turnOffTx]

,[turnOffTx] TX's state is not TurnOn. State:

[turnOffTx] mTxTuner is null

[turnOnTx]

[turnOnTx] FM Rx is not turn off

,[turnOnTx] TX's state is not TurnOff. State:

[turnOnTx] mTxTuner is null

[turnOn] FM Tx is not turn off

broadcastTxCmdState

broadcastTxState

com.htc.fm.TXcmdstatechanged

com.htc.fm.TXstatechanged

com.htc.fm.TxTuner

createFMTxTuner

enableTx

getTxAudioMode

getTxCmdState

getTxFrequency

getTxInfo

getTxScanFreq

getTxState

isTxMute

loadTxTuner

mTxRequestFreq

mTxTuner

mTxTuner is null

onUnbind! Tx is still turn on

scanChansTx

scanTx

setBandTx

setMonoTx

setMuteTx

setStereoTx

setTxMute

setUnMuteTx

setVolumeTx

stopScanTx

tuneTx

turnOffTx

turnOnTx
[Spirit FM] mikereidis:
Yes, very nice ! :)

When I google "FM Radio Path" I get some links to possible further clues. It's possible though that this is just "leftovers" from the Samsung devices that officially support FM via the Silicon Labs chip.

Is "Jupiter" the code name for your Tab ?

I wonder though why there are 2 "Sound Cards" in ALSA. Ie, both controlC0 controlC1 etc,
[Spirit FM] xUmaRix:
Sorry a bit busy here.I dont get sound neither frm headset nor speaker.I try to ls /dev/snd but there r no files or dir.Still trying to figure out Atrix 4G.This is my first android native phone
[Spirit FM] mikereidis:
Hi xUmaRix.

Several people have asked about the Motorola Atrix, and at least one person seemed to have my app running, but with no sound. I believe the Atrix uses the Tegra 2 for sound.

I did some digging and here is what I found. (Don't concern yourself if you don't understand. I'm putting this here for the benefit of myself and others trying to help get FM working on the Atrix,)

There was some speculation that AT&T didn't want real FM because streaming apps give them data revenue. I tend to think that is true for all carriers, and even Google may be complicit, as are the manufacturers. That, IMO, is why FM is unsupported and so hard on Android (and iPhone too).

In January there was a leak of the "Connected Music Player": Motorola Music Player 1.0.179.apk . This seemed to have FM capability but nobody was able to get it working for FM. Many copies were removed via DMCA takedown, but many remain and can be googled via the APK name.

I took a quick peek at an amwrapper.smali file that seems to be the "AudioManager wrapper" for the FM app. The code seems to do the following, more or less:

AudioManager->setParameters ("FM_launch=off");

AudioManager->setParameters ("FM_launch=on");

AudioManager->setParameters ("FM_routing=DEVICE_OUT_WIRED_HEADPHONE");

AudioManager->setParameters ("FM_routing=DEVICE_OUT_SPEAKER");

If I include the code above in my app, it's possible the audio will start working, and it may enable FM audio on other devices too.

I'll try to get this code in my next release and we can see... :)
[Spirit FM] icke:
Sorry, mike...have forgotten to mention that.:o After resetting my Leo twice, the pause/play button is working like it should with v110612.
[Spirit FM] mikereidis:
OK, thanks. You saved me some head scratching... :)

Next release will have several things added that hopefully will make audio work on more devices, and I hope it won't mess up audio on currently supported devices.

All bug reports welcome ! :)
[Spirit FM] mikereidis:
My response to a PM. Please post questions and info of general interest on the thread, thanks !

Hi, MIUI has their own FM app but it doesn't work on many of their latest Gingerbread releases because they went with the proprietary BT stack, LOL.

You have a Desire or Desire HD ? Should work with BT off, although audio might be an issue. I'm slowly working on getting audio enabled on many device and ROM combinations.
[Spirit FM] kcfong2:
This works on my HD2 Nexus One. Thank you. Now to only incorporate it into Spirit!
[Spirit FM] mikereidis:
For the new HTC OneX+:

Set Menu-> Settings-> Audio-> Method to "HTC OneX QCom".

Will be automatic in next release.

Funny that 3 variants have 3 different FM chips:

OneX International: Texas Instruments w/ Nvidia Tegra3 SOC

OneX+ : Broadcom w/ Nvidia Tegra3 SOC

OneX LTE: Qualcomm w/ Qualcomm S4 SOC
[Spirit FM] Steppenwolfie:
Sorry to hear that, anyway there's an ICS leak with a fully functional FM radio app. And hopefully an official stock ROM coming from LG in the next days. Would that open up some possibilities for us CM10 users? Sorry to bother you with similar questions, but since the situation is evolving I thought it was worth a shot asking.
[Spirit FM] mikereidis:
Thanks for the info; that's interesting. I'm happy to re-analyze when there is new information.

If there is an ICS with a working FM app, Spirit should either work with an existing Audio-> Method setting, or I could make it work if I spent some time examining the FM app. I someone could try the various Audio-> Method settings, I'd be interested to know if any work.

The problem with most/many custom ROMs is that their audio libraries are open source and don't contain any FM audio features if they've come from Google/AOSP. IMO, blame Google (to some extent) for this.

The OEM audio libraries are usually closed source and contain the FM audio secrets. Some custom ROMs include these libraries unchanged in binary format, and this may allow Spirit to use the same methods as on stock ROMs.

If I can figure out the low level FM audio stuff, I can work around these problems. Usually this involves sending "IOCtls" (control commands) to device drivers, ideally standard ALSA drivers, though the various controls are not standard.

The LG P990 however, uses rather closed Nvidia APIs I have almost no information about. I've heard Nvidia has loosened up their hardware documents a bit, but I don't think the software APIs, and those may be somewhat dependent on the OEM, device architecture etc. anyway.

All that said, I'm moving away from LG support anyway, though I'll be happy to make individual exceptions for any OEM with a very popular high end device with a supported or supportable architecture. It's possible the Optimus G, Nexus 4 and similar devices might qualify.
[Spirit FM] xmguy:
Let's hope eventually the new RAZR line will work.
[Spirit FM] mikereidis:
November 14 Spirit FM Radio Free: http://d-h.st/rky

Also on Play.

- Audio Methods renamed.

- HTC OneX+ Audio-> Method = "HTC OneX/X+ Int".

- For GT-i9100G Audio-> Method of "i9100G/LGP92x/TWL6040" now enables Debug-> Play Audiotrack to support background volume control.

Also, the compatibility list in post 2 has been heavily reformatted and is now limited to about 62 devices.
[Spirit FM] mikereidis:
Comments welcome on pricing change to Light version.

I'm concerned about people's impressions. A change like this will likely have some people saying "greedy dev", and I hope I can moderate any such perceptions.

I've been kind of wanting to get rid of the Light version, for new sales. Existing users should always be able to re-install, but it would be nice to stop future sales.

Light was originally created as an initially 99 cent alternative to the Free version I stopped hosting on Play. The reasoning was that anyone complaining about "bait & switch" or whatever, would be complaining about 99 cents, and thus reasonably easy to dismiss.

But Light users have as much technical support needs, and theirs may even be a bit higher than Unlocked users. And I want to get on with Spirit phase2 development without worrying too much about excessive and increasing amounts of support.

I tried disabling countries, but that prevents existing customers from re-installing. Same when I disabled devices.

Google seems to have no way to continue to service existing customers yet stop selling to new customers. The only tool seems to be price, which I could set to 99+ dollars, which should reduce sales to accident levels.

So I've decided I might as well experiment a bit with price. And there's no such thing as a fair or reasonable price, even moreso perhaps with something like an app. Willing buyers meet willing sellers and X sales are made at Y price.

And I cancel any order at any time, so that provides a price protection, and a way to upgrade to Unlocked for the difference.

For a long time, since the 99 cent start, Light has been arbitrarily set at 25% of the Unlocked price. I've changed it to 50% and might try that for a week. Normally there is about 1 Unlocked sale for every 2 Light sales, so we'll see what happens.

Light is a nice way to assess the app for those who aren't aware of my cancel/upgrade policies or don't have time to worry about emailing me. So a number of Unlocked sales result from older Light sales. So all the effects may not be seen immediately; there may be longer term impacts.

OTOH, I imagine many people might go straight to Unlocked. I saw this effect when I "forced" people who had been using the Free version to decide for Light or Unlocked. Many went straight to Unlocked. Once people decide to pay something, that's the biggest mental hurdle, the question of which level is easier.

And when I say "forced" I mean that buying Light or Unlocked was the only way to continue to get automated Play updates. The Free version continues to be available in post 1 links, for those who don't mind the manual installation.
[Spirit FM] Lagkage:
http://review.cyanogenmod.org/#/c/26281/

Would this mean anything to Spirit?
[Spirit FM] mikereidis:
Thanks for the tip ! Yes it could impact me/Spirit greatly.

I have over 2,800 customers with Galaxy S2, the most popular phone with Spirit. Number is certainly higher as it only represents first sale.

I'm sure well over 2,000 are dependent on a closed source Samsung audio library in the current CM ROMs. When (not if ?) the CM folk move to an open source library I'll have another Audio-> Method to figure out.

I presume this is the open source "new way". Ideally, FM audio support would be baked in there, but I doubt it.

Problem is, I've tried to bypass the audio library on GS2 and Note, using the ALSA controls. But for unknown reasons, I couldn't make it work.

I'll look at the code you pointed to, and start looking at a 2nd effort to eliminate audio library dependence.

I'll probably get a LOT of email if I don't find a solution pre-emptively. I'll ideally watch CM nightlies for GS2/Note releases and put an "old way" switch into the code, once I know the date or another way to identify "new way" ROMs.

More ideally, the new way would be better, but I doubt that, at least without several months of tweaks.
[Spirit FM] mfenetre:
Hey Mikereidis,

According to LG France, the Nexus 4 has FM hardware capability, see http://xdaforums.com/showthread.php?t=1963623&page=9, bottom of the page.

If indeed that's the case, would you try to make Spirit FM work on the Nexus 4? I sure hope so ;) !

Anyway, thanks for your hard work!
[Spirit FM] rmont:
Is possible translate Spirit to other language?

I can help you to translate to brazilian portuguese.

Enviado de meu GT-I9300 usando o Tapatalk 2
[Spirit FM] Carson_ls:
Hi Mike,

Tried to installed the free version before proceed to the paid version but i'm no luck! I can't open either the app on my SGS II custom rom - Slim Bean 4.1.2!

Is this app works for any country in asia? Anyway keep up the good work and hopefully soon it's getting work for this custom rom and i'm going for it.... Sure!
[Spirit FM] mikereidis:
For GS2 & Note:

Yes, there is an experimental CM10 ROM here that includes this new audio library: http://xdaforums.com/showthread.php?t=1891222 (Seems kind of unstable to me though.)

And sure enough, Spirit isn't able to enable FM audio on this ROM.

The good news is that the CM code reveals the secrets I was looking for. There are no ALSA controls for FM, you have to go lower. And this lower level access has a good chance of enabling FM record capability on the S2, otherwise limited to Note and S3.

This will be great if I can get a fix in before it's needed and avoid hundreds of additional emails.