yashsingh1/xdaforums huggingface dataset:
[Spirit FM] mikereidis:
To follow up and add: As I posted Jan 14:

"V Preset Buttons 3" sets the background color BEHIND the bottom 3 preset buttons.

But to set the buttons themselves, use "T Preset". It's 4th from the bottom under "UI Elements".

For example I set mine to "cyan 10 1 blue 20" and it creates rounded buttons with a radius of 10 pixels (device independent pixels ?) that have blue text on a black background. The 20 sets the text size, and 1 is weight, which allows changing the relative sizes of things.
[Spirit FM] alonsosjumper:
Hello Mike. How do i can get the unlocked version of 20th January? I have the Unlocked version of December (Market) but i wish have this unlocked version.

Another question, the function Record, what function is for? Is to record FM Audio of the Radio? Does it work on Galaxy S?

Thanks.
[Spirit FM] Quinny899:
What I've got so far:

Issues I've encountered so far:

How do I increase the distance between the buttons?

How do I change the text colour on the top?
[Spirit FM] Quinny899:
Changed the whole UI through 7zip on my computer

Just need to change the buttons and we will have a full ics UI :D

Here's a download of the newest free version with that UI. I have the pro version mike ;), check your pm.

http://db.tt/3jPUriH2

Stuff I changed:

Original template icon, goes better with ics.

Red > ICS Blue

Cyan > ICS Blue

Light grey > ICS grey

As many new icons as I could
[Spirit FM] mikereidis:
I emailed it.

Yes, it's to record FM audio. It's an experimental feature I had when this thread was started almost 9 months ago. I've re-enabled it because I know it should work on the Galaxy Note.

Record won't work on most phones. I haven't seen it work on my Galaxy S yet, or on any of my test phones, but I haven't tried all my ROMs yet.

I know the Galaxy S has the hardware needed, but software (ROMs audio libraries) needs to support it too. To enable it may require low level writes to the WM8994 audio chip registers.
[Spirit FM] alonsosjumper:
Thank you!

Do you believe that you will can do work the record function correctly in Galaxy S in future versions?

Is an option in which i´m interested.
[Spirit FM] Quinny899:
One last theming question

What the hell is the format for the RadioText?

It doesn't work with any other format. It is the only piece of text left white on my screen

I've tried:

#bgcolour 1 1 #textcolour

And:

#bgcolour 1 5 #textcolour 20

Both hide the text totally, failing at the second 1 or the 5
[Spirit FM] mikereidis:
I'll check my code/layout later but I don't think there's any way to increase the size of the inter-button gaps yet.

You could set button radius (2nd value) to large values, such as 60, and this makes buttons oval, with more space at the ends, but the middles still almost touch.

One way to change style for things like buttons, is to use a ROM with different styles, or customise the style on that ROM. For example, on MIUI for Galaxy S the default button style has radiused corners and my app uses that without customisation.

Text stuff in the next post.
[Spirit FM] mikereidis:
I hope so. On my other 3 cheaper test phones I don't think record is possible.
[Spirit FM] alonsosjumper:
Thank you.

One doubt, where are the records save in? In which folder?
[Spirit FM] mikereidis:
Customisation of text colours.

Elements starting with "T" are TextView Elements and support up to 5 parameters. "V" signifies more generic View elements that have no text and only support the first 3 parameters.

"Force" elements are an easy way to over-ride lower level element customisations without deleting them all. "Default" elements provide default values for lower level elements that aren't specified.

There are often multiple levels at which UI elements can be customised. "T All" is the highest level TextView and applies to all TextViews.

One level down: "T TB is for Text Buttons only (such as preset buttons), while "T TV" is for non-buttons (such as RSSI number).

Lowest level: "T RSSI text", "T Preset" etc.

So, for example, "T All Force" over-rides any other settings for TextView elements. "T All Default" only applies if a specific setting is not made for TextView Elements.

So the easiest ways to change all Text colours is to use "T All" or "T TB" or "T TV", all either in their Force or Default variants.

If you want to change just a text colour, without changing background colour etc., use "placeholders", which are any non valid parameters.

Example: "d d d red d" should set text colour to red, while leaving background colour, radius, weight and text size at defaults. I use "d" for default because it's not a valid number or colour.

No guarantees at this time that everything should work as I've documented here, but that is the intent.
[Spirit FM] mikereidis:
On the SD card under /sdcard .
[Spirit FM] mikereidis:
Same as all the others, using "T RadioText". Works for me. Try the defaults as I posted above and see if that works. If it persists, send me a log.
[Spirit FM] Quinny899:
Finished :D

Now it's time for bed :)
[Spirit FM] mikereidis:
Via email:

For one specific phone or "all of them" ? Besides just using the open source CyanogenMod FM app(s), the only usable, documented Android FM API is the CRC/FMTwoO API for Samsung Galaxy S, and the open source widget that API uses some code from,

Pretty much everything else is undocumented/closed source, except for the ST-Ericsson proposed Android FM API, which doesn't seem usable yet and doesn't seem to be going anywhere fast.

My code uses the many low level and/or proprietary methods/APIs that differ between phones and manufacturers.

I am continuing to consider supporting a documented API to enable other FM apps. Most likely I'd support a slight variant of the ST-Ericsson proposed Android FM API, which may be the closest we ever get to an official standard API.

If I do this, it will be after I add support for the manufacturer Proprietary APIs so that most Android devices with FM should work, even un-rooted devices. It would be done in parallel with the re-design of my code and the improvement of the UI in my app. So, maybe in the spring....

I would be happier if the ST-Ericsson proposed Android FM API became accepted and supported widely, and I didn't have to do the above. But I have serious doubts about that, and it likely wouldn't support previously release devices, and I'm reasonably certain this couldn't happen before the spring anyway.
[Spirit FM] mikereidis:
OK, I invite anyone to check your screen capture or try it the modified app and let us know. Due to the changed app signature, you'll have to first remove any existing free app. But you'll lose your settings if they aren't somehow backed up and restored.

Under the Debug button is a Preferences selection that isn't too well tested yet. "Export to SDCard" should backup or write the preferences file to the SDCard root /sdcard/. It's either com.mikersmicros.fm_preferences.xml or com.mikersmicros.fm_unlock_preferences.xml , the latter for Unlocked.

"Import old from SDCard" should import the settings in the free version of the file com.mikersmicros.fm_preferences.xml. The Unlocked com.mikersmicros.fm_unlock_preferences.xml file could be renamed to the former with "adb shell mv /sdcard/com.mikersmicros.fm_preferences.xml /sdcard/com.mikersmicros.fm_unlock_preferences.xml" .

The intention of the above, besides config backup and restore, is to provide a way to share settings with others, or your other phones. Just take the XML file, strip out anything that isn't part of your shared customisation, and then it could be imported to another device, without messing with presets or debug settings etc,

My intention is also to support "profiles". So instead of telling users to set various debug etc. settings, they can just import a "profile" XML file, with all the settings for their particular device, and no settings that aren't.

Most (all?) of the buttons I grabbed from the Android SDK, but they don't have much contrast so it's hard to discern them from a distance. I think my pause, speaker/headset and power buttons are easier to see, but if they had better contrast they'd be much easier to see.

I like the more minimal (blacker) frequency and volume graphics.

I think I could possibly support external image files so that anyone could more easily customise buttons etc.

As for the space between buttons, I could support "margin" or "padding" options at some point. As it is now, you'd have to edit the main.xml files to change this:

android:layout_margin="2dip"

to something like this:

android:layout_margin="10dip"
[Spirit FM] mikereidis:
I very much doubt it. No stock FM app.

Your log shows no Samsung FM driver, nor a V4L driver, and your Bluetooth seems to be by "Cambridge Silicon Radio" (CSR).

CSR has Bluetooth/FM combo chips, but I haven't yet heard of CSR FM in an Android device.

Send me a full log with Menu->Help->EM Logs and I may be able to say more. Or just send me the output from these commands:

ls -l -a /

ls -l -a -R /dev /system /sys

For the most part though, I'd just be looking for files with "FM" in the name.
[Spirit FM] alonsosjumper:
What type of file (format) is the recording? I can´t open it and the size is very small. When i look at on PC puts .PCM but only appears me one of the three recording that i have...
[Spirit FM] painter_:
Sent a PM with the requested output.

Thanks again.
[Spirit FM] mikereidis:
Well...

That CSR chip gives some hope that FM is possible. But I can't find any Android/Linux drivers.

Of interest is the /sys/module/mt20xx/parameters directory:

-rw-r--r-- root root 4096 2012-01-21 15:12 debug

-rw-r--r-- root root 4096 2012-01-21 15:12 optimize_vco

-rw-r--r-- root root 4096 2012-01-21 15:12 radio_antenna

-rw-r--r-- root root 4096 2012-01-21 15:12 tv_antenna

Does this device or some variants have TV capability ? At least some Microtune chips do NTSC (as opposed to the newer digital ATSC). I can pick up some NTSC TV audio channels with FM chips, so the converse may be true.

Run this for some possibly interesting info:

adb shell cat /sys/module/mt20xx/parameters/*

And then the more I look the more tuner stuff I see, including FM chips. But perhaps these are just for kernel drivers on a standard Samsung multi-purpose kernel. Can't hurt to try these though:

adb shell cat //sys/module/ar6000/parameters/*

adb shell cat //sys/module/tda8290/parameters/*

adb shell cat //sys/module/tda9887/parameters/*

adb shell cat //sys/module/tea5761/parameters/*

adb shell cat //sys/module/tea5767/parameters/*

adb shell cat //sys/module/tuner_simple/parameters/*

adb shell cat //sys/module/tuner_xc2028/parameters/*

adb shell cat //sys/module/xc5000/parameters/*

While we're at it, let's look at the ALSA controls to see if any sound promising:

adb shell /data/data/com.mikersmicros.fm/files/ssd 4 0
[Spirit FM] mikereidis:
If it's small, then it's just a file header and record didn't work. You should be able to confirm the function works by selecting one of the first 2 (default or MIC) and seeing if it records from the microphone. When I do that the FM audio usually stops BTW.

I try to use the exact same parameters the Galaxy Note uses, since that's really the only device confirm to have FM record on Android AFAICT.

Output format is THREE_GPP (1). Audio encoder is AAC (3).

Output files work OK on my Linux PC. I'll try to make the parameters configurable.
[Spirit FM] painter_:
The device has no TV output that is advertised. It does have an IR emitter for using as a TV remote.

The outputs are attached.
[Spirit FM] alonsosjumper:
I´ve tried with all the records included default and MIC and with all of them, it builds a file header. With none of them works :(.
[Spirit FM] mikereidis:
Well, at least that leaves us hope. If it doesn't work through the microphone, then we may just need to change the recording parameters.

The "EncodingBitRate" seems strange at 62,900. Channels is set to 1 (Mono) and SamplingRate is 44,100 (CD rate).
[Spirit FM] mikereidis:
Thanks.

It looks like you accidentally did a "cat" of the ssd utility instead of this:

adb shell /data/data/com.mikersmicros.fm/files/ssd 4 0

But my bet is that it would show FM controls. The original Galaxy Tab showed "vestigial" controls from the Galaxy S, and I've seen the same on US variants of the Galaxy S2 that have no FM. :(

Nothing in the other parameters looks promising and clearly there are no /dev/radio* devices. There ARE /dev/video* devices, which in theory could be TV tuners, but they are usually just for the front and rear facing cameras in video mode. I count 6 on your device; if I had one I would poke around further but I really don't think we'll find any usable hidden TV tuners.

I was looking for TV tuner capabilities, not TV-out. There IS a Brazilian version of the original Tab with TV tuners, and there might be variants of the new Tab with TV tuner(s) also.

And Samsung looks to be making "Google TVs" this year that I'd presume have TV tuner(s). So that might help explain why we see evidence of TV tuner drivers (or even FM tuners) in their "universal kernel" for most of their current devices.

But, my final opinion at this time is that there is no way to receive OTA FM on this new Tab. I hope we learn differently in future, but I doubt it.
[Spirit FM] alonsosjumper:
I don´t understand what´s are you telling me :S. Sorry, i would like that you could solve the record for the Samsung Galaxy S.

Sorry by my English :S
[Spirit FM] mikereidis:
The Samsung app doesn't do it so we don't really know if it's feasible. In theory the hardware can do it, but it's not really proven.

In other words, I will try. :)
[Spirit FM] m.ksy:
Hi Mike! How progress with adaptation the program to work on the Motorola?
[Spirit FM] Quinny899:
You missed defy
[Spirit FM] m.ksy:
My phone is Droid X :D
[Spirit FM] Quinny899:
Then why are you commenting on defy roms?
[Spirit FM] m.ksy:
Sorry, but I do not understand you.
[Spirit FM] Kess78:
Hi Mike,

Reccord works on my device, thanks :) Do you think you can make it stereo ?
[Spirit FM] painter_:
Just to close the loop I attached the output of adb shell /data/data/com.mikersmicros.fm/files/ssd 4 0.
[Spirit FM] m.ksy:
On my Droid X work all the methods of record except "voice_uplink, voice_downlink, voice_call". In all cases, the record occurs from a microphone, because I hear my own voice in records.
[Spirit FM] mikereidis:
Good, I'm working on it now. It runs nicely on my Galaxy S the MIUI folk grafted a Motorola API to.

I think in 24 hours I will have a test version. Based on the last 3 proprietary APIs it might take 2-3 rounds of debug logs... :)
[Spirit FM] mikereidis:
Yes. But now I'm wondering why the heck the Samsung FM app sets mono. Perhaps it has some hardware limitation.

Did you use Device 8 (Galaxy Note FM) ?

I pretty much knew this would likely work for you, given your good experience with external apps. But it's nice to confirm the first FM recording via my app. Now everybody will want it, LOL. :)
[Spirit FM] mikereidis:
My app currently uses an API that returns the maximum device number. It will likely prevent some crashes, but fails silently and goes to microphone.

5 - Camcorder would likely be the same microphone (2.1+)

6 - Voice Recognition is usually the same, but tuned for recognition (2.1+)

7 - Voice Communication is same tuned for VOIP and is new for v4 ICS.

8 seems to be Samsung FM, but some devices might use 9, 6, 5 or who knows.

I really don't think most "Droid X era" devices can record FM. Perhaps Desire HD but I've never heard of that.

The only confirmed FM recordings I've heard of now are SonyEricsson X10 mini and Samsung Galaxy S2, Note and perhaps related S2 family devices.
[Spirit FM] mikereidis:
Thanks, No explicit mention of FM.

I think controls 37 and 38 would be used if FM was there, and they might even be named as FM if that was so. They are:

Line Bypass Playback Volume

Line Bypass Playback Switch

A "Line In Bypass" describes how most phones handle FM analog audio. It bypasses the normal digital processing chain and is injected near the end of the chain. Thus DSP and recording etc are difficult, if even possible.

So I think that is that, unless somebody discovers something unexpected some day.
[Spirit FM] Kess78:
I tried with DEFAULT, but it works with all methods...
[Spirit FM] Quinny899:
I made that first recording ages ago with the very early versions that had it. On my GT540 XD
[Spirit FM] mikereidis:
Motorola stock/proprietary API support will take at least another day.

Sadly, it appears it may require root. Motorola appears to require the fmradioservice be started as a system service which requires root or the system UID. The system UID requires signing the app with the Motorola key which of course I don't have. (OTOH, maybe I can just start the stock app and/or send a message to it's service to startup...)

Really, Motorola/Google ? And signed bootloaders etc. ? I wonder if Google will tell Motorola to disable FM entirely on future phones...

Other such "security conscious" FM APIs appear to include Huawei and SonyEricsson.

So far it appears that Samsung, HTC and LG are OK without root, although it remains to be seen if some carriers might lock down the FM even though the OEM didn't...
[Spirit FM] shunsai:
hey mike, how's it going?

it's been a while since i checked in. it looks like your app is making some pretty good progress. it seems you've even gotten back around to toying with recording again. great!

i installed the free app (on my desire z), and tried out a couple of the recording options in the debug menu. i haven't tried it out very extensively yet, but the first 4 recording options, renders the audio silent. it's only when i get to the VOICE_CALL option that the radio plays through. yet and still, i don't think it does any actual recording, but it seems interesting all the same. my thinking lends me to believe it has something to do with the 2-way call recording kernel i have installed. but i don't know.

3 questions i guess:

1) what program can i use to listen to the 3ga files it generates?

2) any chance that the output file could reflect the recording option that was used. somehow i managed to generate a lot of 30kb files (empty i assume) but am not sure exactly which setting they correspond to.

3) *i'll ask by way of private message ;)

keep up the brilliant work!
[Spirit FM] AAccount:
Any update on the calling issue when using onecosmic ics? I filed a bug report on the rom's google code page but it got rejected: https://code.google.com/p/ice-cream-sandwich-sgs/issues/detail?id=293 ?
[Spirit FM] danielma02:
I have the same problem before. Is that problem fixed or not? Thanks!
[Spirit FM] mikereidis:
TI and Motorola Proprietary support: Jan 26: http://www.mediafire.com/file/7cnuj12ul53uwzg/Spirit_FM_Radio_v120126.apk

- Debug options to enable Proprietary modes removed.

- Debug options to DISABLE Proprietary modes added. Proprietary modes are now enabled by default. Order shouldn't matter but tests are done in this order: Broadcom, TI, Motorola and Samsung Galaxy S/S2 class.

So just use defaults, no settings are required. If you prefer the non Proprietary modes, disable that mode, or all of them.

- Improvements for TI Proprietary mode. Hopefully still works on HTC Amaze etc. I don't know if there is any chance for Sony Ericsson X10 mini etc.

- Added support for Motorola Proprietary API. This MIGHT require disabling TI Proprietary, I'm not sure. And there is a small chance that TI Proprietary mode may also work.

Motorola Proprietary mode also works on MIUI for Galaxy S, and may also work on MIUI ROMs for other devices, if the MIUI folk are using that API on other devices.

May require root/SU just to start the "fmradio" service, in the fmradioserver binary.

Will only work if there is a compatible /system/lib/libfmradio_jni.so file. On Motorola devices this is likely associated with libFMRadio.so and libfmradioplayer.so libraries, as well as a /system/bin/fmradioserver binary.

CyanogenMod7 for the Droid X seems to have these files, so it might work. My app doesn't need Motoblur like the stock FM app does, just the bit for FM.

Some devices without these files can be retrofitted, using instructions available for installing the Motorola FM app on devices, such as Bionic, that come with no FM app. I'll get some info.

Since root/SU may be required, my biggest hope for this support is a magic fix for the extremely low signal problems on Droid X etc. If it works, I can dig further.

If this doesn't work with Bluetooth off, try Bluetooth on or vice versa.

Please send me logs, success or not. Thanks !
[Spirit FM] mikereidis:
Hi, well thanks... :)

I'm very pessimistic about FM recording, except on devices where it's been proven (SE X10 mini ?) and/or the stock FM app supports it. Re-enabling the very old MediaPlayer recording code in my app was the easy part. Making it work will be between impossible and very difficult for most devices.

Very difficult may apply to devices like Galaxy S where the schematic convinces me FM record is possible (via Analog -> Digital conversion.) Audio libraries and kernels likely don't support this, and my hands are MORE than full without getting involved in what is effectively ROM building.

Hmmm, well you'd think that if an Android device can record in 3ga, it can also play back. Perhaps we just need to change the extension. I'll add support for the other formats soon. And it would be better if my app showed an error when things aren't working, and perhaps had a simply playback button to hear the last recording.
[Spirit FM] mikereidis:
and danielma02... Sorry no.

EDIT: I think I may have a solution. :) It works on MIUI ROM with GalaxyS ALSA method...

I can understand you're not going to get much "sympathy" for a problem that affects one closed source app, especially when as he says they are volunteers and spread extremely thin.

In theory, if they were accepting feature requests, you could request a feature that enables FM audio, and doesn't have this problem. But I think it's best if we don't push or antagonise them.

It's always debatable where a "bug" or "feature lack" is, but in the end it doesn't matter; only solutions matter.

The best solution I think, is to wait for (or request) the CM devs to support their FM app (or at least FM audio routing) on CM9 as they did on CM7.

But I'll try to clear some time to investigate workarounds now...
[Spirit FM] cdshepherd:
Any idea if this will work on my Samsung galaxy s2 skyrocket (att) . That app seems to run ok on my phone but no radio coming through my speakers. Any ideas will be greatly appreciated
[Spirit FM] mikereidis:
I doubt it.

The "AT&T Samsung Galaxy S II Skyrocket SGH-I727" seems quite similar to the "AT&T Samsung Galaxy S II SGH-I777".

The US variants of the S2 don't have the Silicon Labs FM chip that the International versions do.

Likely the app starts up showing "FM: BC ...". But the Broadcom combination chip on these devices seem to not be wired as needed for FM.

Feel free to send me a debug log and I can look closer. This works better if your device is rooted.

Select Menu->Help->EM Logs and after a few seconds. enter "SkyRocket" in the email text and press send.

I posted some further info on this thread: http://xdaforums.com/showthread.php?p=21849958
[Spirit FM] HoScHaKaL:
dont work zte joe :((
[Spirit FM] cdshepherd:
Log sent. Thanks buddy! I look forward to seeing if this will work or not. :)
[Spirit FM] mikereidis:
Probably the same FM chip as the ZTE Blade ? I may add support soon.

Send me a debug log and I can look closer. This works better if your device is rooted.

Select Menu->Help->EM Logs and after a few seconds. enter "ZTE Joe" in the email text and press send.