yashsingh1/xdaforums huggingface dataset:
[Spirit FM] mikereidis:
Thanks. The Atrix is one of my most requested phones for FM support. Very popular device with nobody getting FM to work means a big pent up demand. I wish I could fill it, but can't. :(

Too many people see "FM" in the chip description and assume it must be possible (without impractical hardware mods). And sites like pdadb have some FM mistakes also.

But this AT&T "mistake" is less believable, because unlike the Galaxy S2, there was never an Atrix 1 variant that supported FM (AFAIK).

And Motorola phones with FM all seem to use TI chips. So I think the Motorola FM app doesn't support Broadcom chips anyway.
[Spirit FM] mikereidis:
Thanks, yes radio-tavarua.c is the source code for the V4L /dev/radio0 driver.

Since you are seeing "Fm:V4" that means /dev/radio0 is there and seems to work.

I will release a new version of my app soon that supports RSSI and my guess/hope is that we'll see evidence that tuning works and shows good signal strength on known stations.

There is still some work to do to get audio functioning though. Hopefully soon...

Sending me your logs would be useful. Select Menu -> Help -> EM Logs, wait a few seconds, enter your phone model in the email and press send. Thanks !
[Spirit FM] Kess78:
Hi Mike,

I know you have other stuff to do for the app but have you started the development or research about AF ?

I think some Samsung devices on BC that your app supports have AF with stock app. It could have some clues...
[Spirit FM] mikereidis:
AFAIK, all I have to do is write one alternate frequency to an AF register, and I guess it will switch to the alternate if the RSSI drops too low.

I already have code that parses the AF from the RDS.

I will make an experimental addition for the next release of my app.
[Spirit FM] Kess78:
Cool, I'm waiting for this feature for so long !

Thanks :)
[Spirit FM] tbd@immigrantsong.de:
Have you made any more progress on the Streak? I can get audio out through the headset, but not the speaker. I would really like to get audio through bluetooth though.
[Spirit FM] idkidk:
This is interesting, but without headset cable there isn't FM Signal.... :(

Idk
[Spirit FM] tbd@immigrantsong.de:
True, but that is true for all devices.
[Spirit FM] mikereidis:
He DID say "audio through bluetooth" though. For that, some Broadcom devices can send audio to BT headset with low "voice quality". Enable Settings -> Debug -> BCM BT Headset for that experimental option.

Some devices work better than others without a headset/antenna. My super cheap $80 Galaxy i5500 with the newer BCM 20780 works the best, Galaxy S is 2nd, LG P500 3rd, and the HTC Legend with TI chip the worst.

Tavarua FM chips have an option for "Internal Antenna". I will be interested to see how well that works.
[Spirit FM] mikereidis:
See my post above about the experimental, low quality BT headset option. I'm not sure it will get any better than that.

Besides the fact that I don't have a Streak, and that reverse engineering it has taken (and will take) a lot of time, I have 2 big challenges:

- Many ROMs.

- Lack of feedback from Streak users. (Especially more technically capable users.)

I had an email the other day from someone saying Speaker/Headset stopped working. So I presume it WAS working for him at one point. "Rooted with the stock firmware 2.2.2".

I asked him to set the debug option "fm_hcitool" option. I haven't heard back so don't know if it worked.

Some people have said "Volume doesn't work", but when I've asked for details I haven't gotten any.

I've asked a few people if Speaker/Headset worked after a reboot, but have had very few answers.

So I will do a few mods to the Dell Streak audio method to be more like fm_hcitool. AND I will create a detailed questionaire so hopefully I will get better feedback on the exact issues on different ROMs.

I MIGHT consider buying a used Streak for my own testing, but wouldn't do so until I had sold enough apps to pay the $300 or so minimum price I've seen locally. But despite the great relative response I've had, I don't see that happening anytime soon.
[Spirit FM] mikereidis:
Google Galaxy Nexus FM ??

There have been some indications the new Galaxy Nexus would include an FM radio.

If anyone has any info, I'm very interested to know. I've opened a thread on the Galaxy Nexus General forum: http://xdaforums.com/showthread.php?p=18641418
[Spirit FM] Kess78:
Hi Mike,

I found this for Nexus Prime, it speaks about FM :

https://docs.google.com/document/d/1a6808W2GwBkBX8x1YwaW3tYm3JSzkp87uQBNWY3TFmE/edit?hl=en_US&pli=1
[Spirit FM] mikereidis:
Yes, thanks.

Supercurio's probe results was the most credible reference I could find.

But he says there "FM Radio app is not present."

The only other FM reference there is for the Audio Codec:

But that doesn't prove anything. First, I don't think he has the exact source code for the kernel on the phone. I've heard the source code is expected to be released in about a month. But maybe I'm wrong, for the kernel code at least.

Second, there are "phantom" FM definitions for a number of Samsung Galaxy devices that don't have the FM chip: The Galaxy Tab, I think the Nexus S and the Galaxy S2 devices with no FM chip, such as AT&T and T-Mobile variants.

So my thinking now is that Google won't be releasing an FM app. Whether or not there's a Silicon Labs FM chip remains to be seen, but I suspect Google went cheap as with the Nexus S and there is no usable FM chip.

But I'm just guessing.

If Google was ever to release an open source FM app, and the GUI was nice, I would strongly consider attaching my existing code to it. But Google has never said they would support FM, and their only statements have been that they won't.
[Spirit FM] mikereidis:
I couldn't get the AF registers working the way I'd thought on Broadcom or TI.

So I'll do it by software, which should be more flexible and consistent anyway.

I've never seen AF work on any radio, so I don't know how it tends to function. Two local stations broadcast AF lists with only their current frequency, so that's like no AF.

Our national broadcaster has two local stations that send usable AF lists: CBC Radio 1 and 2. The first sends 4 different "rotating" lists of 1 frequency each, none of them the current frequency. The 2nd sends 3 lists of 1, and 1 is the current frequency.

For both CBC Radio 1 and 2, none of the AFs can be received at all here, so it's effectively unusable here, but testable.

So here's the algorithm I'm working on:

- From RDS data create an ordered list of all AFs, including current frequency. Eg: 91, 92, 93.

- If RSSI drops below value X, for Y consecutive polls taking place Z seconds apart, initiate an AF search.

- AF search starts at next frequency in order. Eg, from current frequency 92, go to 93, then 91, then back to original 92.

- AF search stops if RSSI is greater than or equal to X, or if returned to original frequency.

There are many possible variations, but this seems good to start. X might be 16-20, Y might be 4 and Z might be 0.5 seconds. (?)
[Spirit FM] Kess78:
I did not understant did you manage to recieve the list of AF that a radio stream via RDS ?

If this is the case well your algorithm will works fine I think this is how it works in every radio.

For the values i thinks Z could be like 1.5 seconds beacause when you walk they often are some liltle drop of signal. I think 15 can be ok for X, on my device RDS is recieved at 16 and stereo starts at 18. Be able to customize this values would be nice.
[Spirit FM] mikereidis:
Yes, this has been working for a long time, but it only sends the info to log (lines starting with "New RDS AF:"). Now I'll do something with the data,

Same with traffic information I've seen in many people's logs. I'm trying to concentrate more on paid features now, so things like this will get more attention.

Thanks, yeah, I was concerned about unneeded searches due to a temporary bad antenna position.

I've been assuming that AF was more useful when travelling by car or train. Do you think it's useful when walking ?

For me I think it would be most useful when I was about 100 Km from each station, as these stations are roughly 200 Km apart. But here in an urban area with many local transmitters, not useful at all.
[Spirit FM] Kess78:
You are right this is pretty useless while walking...

Also you will need the PI code to make sure the AF is from the right radio station.
[Spirit FM] alonsosjumper:
Hello, i´ve bought your application and i´ve installed the 17th October version but i have a problem. Buttons to change frequency (|< , >| , << and >>) don´t work. When I press these buttons, they don´t do anything. What´s the problem?

Another thing, do you have in mind a function to record Radio FM?
[Spirit FM] mikereidis:
Hi, yes, sorry, I accidentally left some test code in Oct 17. Thanks for your purchase ! :)

The previous test release was Oct 6 at http://www.mediafire.com/file/tudguh28n4lojob/Spirit_FM_Radio_v111006.apk . The buttons should work OK on that version.

I'll be posting a new release as soon as I can.

Re: recording: This is not possible on most phones. But it should be possible on some of the more recent and higher end phones.

So hopefully, eventually, recording can be supported. I don't see that happening this year though.
[Spirit FM] zAm1987:
This is really a great app!

The market version won't really work on my Dell Streak, however the latest version from this thread does work (with a few debug options enabled). Only speaker/headset switching won't work, but that's no problem for me

I'm looking forward to buy the unlocker, but is the unlocker compatible with the version vom this thread?
[Spirit FM] Quinny899:
I've just found out that my

NETBOOK

has a broadcom wireless chip :O it has an Android dual boot on it (it was built in when I bought it). I'll find out what chip it is exactly, but it would be really cool if we could get FM on it :D It's an Acer Aspire One D255 by the way
[Spirit FM] Quinny899:
It seems to be a Broadcom 4311
[Spirit FM] mikereidis:
Yes, Unlocker works with all versions released in the last few months.
[Spirit FM] mikereidis:
It appears to be WiFi only: http://www.broadcom.com/products/Wireless-LAN/802.11-Wireless-LAN-Solutions/BCM4311

If you had Broadcom or TI Bluetooth there might be a chance. But it's rare for the antenna and other connections to be made unless it was designed for FM.

Win7 mobile or Android dual boot...
[Spirit FM] Quinny899:
It's android 2.1 on the dual boot. I'll try and nick some drivers from somewhere.

THIS IS MY 600th POST! :D
[Spirit FM] mikereidis:
:)

I saw Atheros Bluetooth drivers on some webpage, but it had other manufacturers too so perhaps was generic.
[Spirit FM] mikereidis:
Finally... :)

Oct 27 test release. Hopefully will update Market version soon.

http://www.mediafire.com/file/docs2dtb6od3zae/Spirit_FM_Radio_v111027.apk

Changes include:

- Experimental AF support via Settings -> Debug -> AF Mode -> RDS. Restart app after enabling. Need to tune station with RDS on, and leave channel on screen for at least 10-20 seconds for AF list to build. If it switches with screen off (and thus RDS off), it won't be able to switch back.

- Dell Streak Audio Method (with Debug -> Use fm_hcitool off ie UNchecked) should be similar to the way fm_hcitool does speaker/headset switching. Hopefully will help on some ROMs, but may still need phone reboot to switch modes.

- Settings -> Debug -> Use ringer VCS enables a "hack" that uses the ringer volume control should the app lose media volume focus while in background.

- Settings -> Debug -> Silent Loop now uses an MP3 file instead of a FLAC file as many stock ROMs don't support FLAC. May resolve ringer/media volume focus issues.

- V4L support now includes RSSI signal strength monitoring. Hopefully we can at least verify basic tuning is working on Qualcomm Tavarua devices, or ZTE Blade etc. with V4L driver for Si470x chips.

- Samsung Si470x devices such as Galaxy S should be less prone to RDS data errors.

- Updated help and other text, and added capability to bring up Unlocker in Market.

- Speaker problem warning dialogs for Galaxy S ALSA/MIUI Audio Method.
[Spirit FM] Kess78:
Hi Mike,

I tested the new version, and AF works !

There is only one problem but I think I know what is wrong.

When the app scan the frequency, it stops to the first AF with high RSSI, but even if this is not the right station on this frequency. In Paris the band is full of stations so almost all the AF scan stops on a wrong station. I think that when the AF scan stops on a frequency with high RSSI, the app must look at the PI code of this station, and stops on this frequency if is the same as the original station.

Thanks for this feature :)
[Spirit FM] Quinny899:
Any idea why in the newest version your app suddenly needs Bluetooth on my Desire HD? I haven't updated anything other than your app.
[Spirit FM] alonsosjumper:
I wrote you a email last day. I don´t know if you have seen it.

Another question. Where appears the list of frequencies of the AF??
[Spirit FM] Cadocson:
Hi!

I only recently started using your app (also bought it in the market) and absolutely love it.

I experience only one Issue when running it on the latest cyanogenmod nightly on my HTC Ace. The Media Volume setting and the volume buttons only work the first time I run the app. Every other time it just maxes. Rebooting makes it work again for one time.

- Ulrich
[Spirit FM] mikereidis:
Good... Yes the code does not enforce a PI match yet, but it will, perhaps optional if RSSI is not high enough for RDS. In some cases a "partial" PI match might work, for stations that sometimes have a regional program and sometimes don't.

The RSSI threshold is hard coded to 16 at present but can be configurable, as well as time delays and a "regional" switch. The search stops at first station with at least 16 RSSI, but it might also search for strongest station.

I'm thinking it might also be useful to allow AF lists to be manually customizable for highest priority stations. At present the list order is somewhat random when there are multiple lists.

Given all the above, and the issues I've faced so far, AF is not a simple feature, but it's clearly useful, in Europe at least.
[Spirit FM] mikereidis:
No. This is most likely to happen because the UART mode failed to start for some reason.

I will check on my phones, and look at the code to see.

It may be useful if you could send me logs. Start with Bluetooth off, and my app not running, then start my app and then send logs. Thanks !
[Spirit FM] mikereidis:
I'll respond to your email questions here on the thread after dinner.

The AF list info only appears in the "logcat" logs at this time. I'll make it available in the GUI. Here's what "logcat" shows:

10-28 01:27:50.877 D/fm_hrdw ( 8619): af_list_commit tuned: 90700 method b: 1 count: 9 was: 8

10-28 01:27:50.877 D/fm_hrdw ( 8619): af_list_commit freq: 95.1 reg: 1

10-28 01:27:50.881 D/fm_hrdw ( 8619): af_list_commit freq: 98.1 reg: 1

10-28 01:27:50.881 D/fm_hrdw ( 8619): af_list_commit freq: 102.1 reg: 0

10-28 01:27:50.888 D/fm_hrdw ( 8619): af_list_commit freq: 88.7 reg: 0

10-28 01:27:50.892 D/fm_hrdw ( 8619): af_list_commit freq: 99.5 reg: 1

10-28 01:27:50.892 D/fm_hrdw ( 8619): af_list_commit freq: 94.3 reg: 1

10-28 01:27:50.892 D/fm_hrdw ( 8619): af_list_commit freq: 91.9 reg: 1

10-28 01:27:50.892 D/fm_hrdw ( 8619): af_list_commit freq: 88.3 reg: 1

10-28 01:27:50.892 D/fm_hrdw ( 8619): af_list_commit freq: 95.5 reg: 1

This is a "Method B" list for 90.7. It has 9 AFs and 7 of them may be "regional variant" programming, while 2 should have same audio/programming.
[Spirit FM] mikereidis:
Thanks !

So if you don't stop the app, volume controls are OK ? Even if the app is off screen, or the screen is turned off and locked ?

But then you re-start the app and volume doesn't work anymore ? Does it show "Ringer Volume" at this point or "Media Volume".

It may help if you can try to describe the problem more precisely.

Also if you could send me logs when the problem arises... Use Menu -> Email Logs if you are unlocked.

It's possible one of the variants of the CyanogenMod Audio Method may help. There are also quite a few audio options under Debug we can try, but it's best if the problem is understood better first.
[Spirit FM] mikereidis:
Sorry for my delay, I've had back problems. :(

If you post on this thread, I usually reply within 24 hours. Sometimes email gets misplaced.

This is just a small problem and I hope fixed now. Don't worry.

It caused a LOT of error messages in the kernel log.

"Frequency Graphic" is normal. It means the top box with cyan/blue and numbers from 90 to 105 is for frequency control and display.

Select "Volume Graphic" to make it for volume. It will still look like Frequency from 90 to 105 though. I will fix this. "Volume Graphic" is mostly for people who can't use the hardware volume buttons due to some problem.

I will better explain all the Debug options in a later post. Many will not take effect until the app is restarted. Normally, you should not need to set any of these. They are only for specific reasons, such as to fix some problem or test an experimental feature like AF.

Let me know if anything isn't clear. I understand second languages are difficult. :)
[Spirit FM] Kess78:
What would be also nice is to save preset not with frequency but with PI, so each preset could be a station. Then when we listen to it and the frequency switch to another this one replace the one in the preset. And when we open the radio in another city the app directly does an AF scan and pick the new city frequency. I guess this is a lot of work...
[Spirit FM] mikereidis:
Yes, I plan to make various settings customisable/displayable per station, and this will be done by making a "station" the same as a preset.

I will support a Scan function that automatically adds stations as presets in the current preset list.

Multiple preset lists can be used for multiple cities. if needed or desired.

Amount of work is never known until it is done. :)
[Spirit FM] mikereidis:
I've been reading some interesting things about http://radiodns.org/ tonight.

Too bad it doesn't seem well supported by the broadcasters...
[Spirit FM] akalos:
great app,thanks

but

Huawei u8800 Pro,not working with handsfree

volume keys too

:confused:
[Spirit FM] UP.EagleEye:
Hey Mike! I have a Captivate, with the CM 7.1 ROM.

I can hear slight clicking in the headphones as I make adustments to settings, and the signal meter does look like it's getting some signal, but I'm not even getting static. I've tried all the audi settings, and most of the debug settings and still nothing. I have uninstalled and reinstalled the latest free version. If I can get it working I will be more than happy to buy the key to unlock :)

Do I have any options or suggestions for this? Does the type of headphone make a difference? How could I tell if the FM jumper was off, or even what FM chip might be installed?

Sorry for the overload of Q's...
[Spirit FM] mikereidis:
In general, the app can't work with Bluetooth headsets, although there is an experimental option for some Broadcom based devices.

You need to use a wired headset for an antenna, and to listen, although most devices work over speaker also.

What ROM are you using ? Stock ? Rooted ? Is there a stock FM app on this device ? And "volume keys too" means what ?

Support for "V4L" on Huawei u8800 is very preliminary and experiment still. I'm not sure about the "Pro" version.

Can you tell me what the debug line says at startup ? It starts with "FM: ".

Also please send me logs after startup. Select Menu -> Help -> EM Logs, wait a few seconds, enter "Huawei u8800 Pro" in the email text and press Send to send me the log.

Thanks !
[Spirit FM] mikereidis:
In general, debug settings wont fix a "No audio" problem. Only "Audio Method" will.

I suspect the app starts for you with the debug line starting with "FM: BC", meaning it's trying to use the Broadcom chip, which won't work. Likely the RSSI jumps around quite a bit in a repeating pattern, more or less.

There are many threads on the subject, but here's a quote from http://en.wikipedia.org/wiki/Samsung_Galaxy_S :

AT&T, and many other carriers, have variants of the Samsung Galaxy S/S2/etc. phones which have the Silicon Labs Si4709 FM chip removed.

IMO, they want to save a few bucks by removing the chip AND more important, they want to increase their profits on data plans.

If you want FM on a phone, you really have to ensure it's there when you buy it. For Galaxy S2 etc, it seems better to get the pure Samsung version. I think just about all US carriers of the S2 omit the FM chip.

And Google's Nexus S and Galaxy Nexus also omit the FM chip.

:(
[Spirit FM] SaurusX:
Mike, you may remember (maybe not) that I was having problems getting your app to work reliably on CM7 on my Droid X. Basically, I've never been able to get Spirit to work on the same level as the stock Motorola FM Radio app. Well, as of the October 7 build of MIUI, the Droid X port of MIUI now has an FM radio that works like a dream. The DX is using the Motorola Defy as a base and is being ported from there. Is there a log or something that I could run and post here that maybe you could analyze? Maybe there is something there that you could see being initialized or called or doing something that Spirit isn't doing. I'd love to get Spirit at the same level as the MIUI radio app so that I could use it in CM7. Just let me know.
[Spirit FM] ozqeee:
hi

i try spirit fm radio and get stations but only the problem that is no out put to head set may this mean program not support my headset its like in pic my phne is htc pro 2 system android fx7.1
[Spirit FM] mikereidis:
Yes, I remember and still have several pages of notes.

Your last post here was August 11 and you wrote: "Almost as good as the car radio, really." so I presumed the issue was fixed: http://xdaforums.com/showpost.php?p=16570586&postcount=909

Can you explain better what you mean by "...work on the same level as the stock Motorola FM Radio app." ?

Do signals seem weak, or are there "...overlapping voices and ... pulsating static bursts" as you reported before ?

Can I presume the Droid X CM7 still doesn't have the CM FM app ? If it did I'd ask how well it worked.

When you say "The DX is using the Motorola Defy as a base and is being ported from there." do you mean the MIUI port is using a Motorola kernel and perhaps Motorola libraries and apps ? Can you tell if it's the MIUI FM app, or is it a Motorola FM app ?

Does my app work on the MIUI ROM ? Whether it does or not, please try running it on MIUI and select Menu -> Help -> EM Logs to send me the logs. Use my latest test app at http://www.mediafire.com/file/docs2dtb6od3zae/Spirit_FM_Radio_v111027.apk

Try my app with Bluetooth off and on. Also, with Bluetooth on, can you try running my app after the MIUI FM app has been running ? And also try to run it WHILE the MIUI app is running. If the MIUI app is doing something "right", then I'd hope it would stay "right" when my app is run.

It would be great if you could get a TI FM chip register dump while the MIUI app is running. Run this and send me the rd.txt file:

adb shell "for i in 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f 10 11 12 13 14 15 16 17 18 19 1a 1b 1c 1d 1e 1f 20 21 22 23 24 25 26 27 28 29 2a 2b 2c 2d 2e 2f 30 31 32 33 34 35 36 37 38 39 3a 3b 3c 3d 3e 3f 57; do hcitool cmd 3f 133 $i 2 0;done" > rd.txt

Or on the phone in a terminal app if you don't have adb installed on a PC:

cd /sdcard/

rm rd.txt

for i in 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f 10 11 12 13 14 15 16 17 18 19 1a 1b 1c 1d 1e 1f 20 21 22 23 24 25 26 27 28 29 2a 2b 2c 2d 2e 2f 30 31 32 33 34 35 36 37 38 39 3a 3b 3c 3d 3e 3f 57; do hcitool cmd 3f 133 $i 2 0 >> rd.txt; done

Thanks !