yashsingh1/xdaforums huggingface dataset:
[LG Optimus 3D] ilie321:
ok

new version v2.2 is out

download here

install this new apk's and add file 'libfmradio.so' in system/lib overwriting the existing one

reboot phone

info:

- solved low sound power problem

- solved RDS loading CPU (this has been a challenge with c++ and ndk-build) -- pls report if is ok now

- added demphasis filter option

- added text scroll for RDS

- minor things fixed

Report bugs and dont blame me if your phone will be broken :D

PS will be nice if someone will get all translation files and all changes and do a flashable zip + apk's :D

and you all can change graphics etc i dont care :p
[LG Optimus 3D] VfBStuttgart27:
Wow great thanks:):good:

Will do tomorrow evening. If someone is faster - Good:laugh::D

Edit: BTW: I can't try if RDS overload is better now - Never had problems:laugh: I also never had problems with WiFi, Bluetooth and loudness:D

I'm on PACman (4.2.2)
[LG Optimus 3D] daniel.mota:
Thanks ilie, great work!

I'll do the translation to portuguese (portugal/brasil) tomorrow.

Tell me one thing, do you think it would be possible to route the radio sound through Audio Fx Widget?

It would greatly improve the sound quality, specially when listening to music!
[LG Optimus 3D] speedyranger:
translation to Italian and Romanian.
[LG Optimus 3D] nico1969:
added Italian language here
[LG Optimus 3D] speedyranger:
what is RSSI?

i change that value but i can see any diference.:o

any way, v2.0 work fine with RDS...load cpu is ok(46-50-57%)
[LG Optimus 3D] Vector17-Darkroom:
New Mod Radio FM 2.2 by Vector17 The Darkroom Team

Files Updated 29-04-2013 "New Languages"

Thanks For FM Radio Application to Defcomg and ilie321.

​

Mod FM Radio 2.2:

Download to SD card, flash from recovery and reboot that´s all.

Need by root

Contains: Applications and files needed for operation.

( FM Radio, Services )

Languages: English, German by ( VfBStuttgart27 ), slovak by ( krija ), Italian, Portugal & Brazil ( daniel.mota ), Romanian ( speedyranger ), Spanish ( Vector17 )

MOD_FM_Radio_2.2_ICS_P920.zip - 1.75 MB

Spanish Support: http://www.thedarkroomteam.com/index.php?topic=949.0

FM Radio 2.2 by ilie321

Updated application FM Radio 2.2 by ( ilie321 ) Thanks great work ilie321

- solved low sound power problem

- solved RDS loading CPU (this has been a challenge with c++ and ndk-build) -- pls report if is ok now

- added demphasis filter option

- added text scroll for RDS

- minor things fixed
[LG Optimus 3D] ilie321:
some answers

- cant route trough any sound processing tool the output is analog and is directly sent to audio amplifier

- RSSI http://en.wikipedia.org/wiki/Received_signal_strength_indication is like a threshold of signal power when you search for stations

- from 50% on CPU for RDS now should be 2-3% so battery drain will be ok

- you guys can remove this 2 apps from the zip :FM Transmitter and SManager

they are useless (fm transmitter cant work on our phone cuz of hardware missing connections and smanager was for routing sound on first version)

if you flash the zip you need to uninstall first the older version where apps are not system apps
[LG Optimus 3D] defcomg:
Good Job Guys Looking Good

Will Upload new Zip with your Changes and remove da useless crap tx and sman.

Good job dude this is real dev what you doing :D you should submit your code to cyanogen review.cyanogenmod.org/ lol suck it LG
[LG Optimus 3D] daniel.mota:
How to delete the older version?

Just delete the apks and leave out all the rest?

EDIT: Maybe simply unninstalling :eek::eek::eek:
[LG Optimus 3D] Vector17-Darkroom:
Hello defcomg am a great admirer of your work, all i did was download your application and modify any image to mod and implement my language. Then some friend of the forum came and asked to implement his, then another and then another.

But all the credit of course is yours and ilie321. My function is purely graphical usually in my contributions.

But it would be an honor to make a small contribution in this work of yours.

Right now I'm removing applications disclaimed. Thank you very much, if at any time I can be of help feel free to tell me.

Updated the new zip file.

MOD_FM_Radio_2.2_ICS_P920_es_en_de_it_sk.zip - 1.75 MB

---------- Post added at 12:26 PM ---------- Previous post was at 12:15 PM ----------

You can use any application like root explorer go to. / System / app / and delete it manually.
[LG Optimus 3D] daniel.mota:
Here you have portuguese translation.

Valid for Portugal, Brasil and all other pt speaking countries.
[LG Optimus 3D] ilie321:
if is system app (= is found in system/bin ) you need to delete it (if you will flash the new zip and last version on your phone was in system/apps you dont need to do anything)

if you have installed like normal app uninstall it like a normal app
[LG Optimus 3D] nic85:
not working for me :( flashed via TWRP
[LG Optimus 3D] Vector17-Darkroom:
dont work or dont flash?

Do you have permission from SuperSu or SuperUser?
[LG Optimus 3D] nic85:
don't work.. open app, give permission with superuser but then I can't do anything
[LG Optimus 3D] daniel.mota:
Yes, mine was in data/app, unninstalling did it.

I've posted portuguese translation a few posts back.
[LG Optimus 3D] nic85:
app FC
[LG Optimus 3D] Vector17-Darkroom:
Implemented new languages Mod FM Radio 2.2

Languages: English, German by ( VfBStuttgart27 ), slovak by ( krija ), Italian, Portugal & Brazil ( daniel.mota ), Romanian ( speedyranger ), Spanish ( Vector17 )

http://xdaforums.com/showpost.php?p=40826866&postcount=266
[LG Optimus 3D] daniel.mota:
Uninstall both FmRxApp and FMService.

Make sure both apks are deleted from /system/app and data/app folders (if exist).

Flash the zip in recovery.
[LG Optimus 3D] nic85:
done. get this
[LG Optimus 3D] nic85:
fixed permission, now it's working. thanks

---------- Post added at 06:46 PM ---------- Previous post was at 06:13 PM ----------

worked once.. then these errors again :(
[LG Optimus 3D] ilie321:
go to settings apps and delete saved data for fmrxapp

also try to reboot your phone it may help

post logcat of your phone with 'fm' word as filter when you start the app
[LG Optimus 3D] nic85:
here's the log

http://db.tt/Bf6bXj3I
[LG Optimus 3D] ilie321:
at work the proxy server of the factory dont allow me to see this file so i will try form home later

EDIT: hmm strange log

what kernel and rom do you have?

please go in my previous posts and get those 3 files

go to system apps and delete fmrxapp and fmservice apk's

install the apps you downloaded like any other app

go to system/lib and paste libfmradio.so

reboot phone just in case and try again (if it hang up fist time close and reopen the app)
[LG Optimus 3D] CyberBOG:
Hi thanks too all for hard work

i have installed it on my LG P920 and works 100%

only problem i get is when i go to settings

goes back to radio mode and does not let me enter setting or any other menu ..

help plz thanks
[LG Optimus 3D] ilie321:
very strange what rom and kernel you have? try older versions and see if any difference

you can enter in settings by menu or by sweeping on the screen with finger to the left

same problems in this way also?
[LG Optimus 3D] CyberBOG:
Thanks for the speedy reply

tryed swiping to the left ... but get same thing app returns to Radio Mode

here is a image os Rom version and Kernel
[LG Optimus 3D] ilie321:
try with first version and see

you will have no sound but see if it works
[LG Optimus 3D] Vaimaster:
Will we have any update soon?has anyone tried to put the script in spirit fm so it can work?
[LG Optimus 3D] xbsall:
Tested 2.2 with my ROMs and it works.

[Youtube]bONm_sDCzWI[/youtube]

Big thanks to everyone who was part of this project.

:thumbup:
[LG Optimus 3D] Vector17-Darkroom:
I like the new text position, Nice Mod Xbsall :good:
[LG Optimus 3D] ilie321:
Im planning an update monday after orthodox holiday. Excuse me for my English and God bless us all
[LG Optimus 3D] Vector17-Darkroom:
Thanks ilie321 :good: we are waiting for your update ;)
[LG Optimus 3D] VfBStuttgart27:
How to translate the rest of the App?

Hi guys:laugh:

How can we translate the things of the app which aren't translated yet?

Like this:

It's not in strings files.

Thanks for answer:)
[LG Optimus 3D] Vector17-Darkroom:
FmRxApp2.2 / smali / com / ti / fmrxapp / FmRxApp.smali

line 5210

const-string v1, "Please wait.."

line 5213

const-string v2, "Applying new Configuration"

;)
[LG Optimus 3D] VfBStuttgart27:
Thank you:laugh::good:

So.. multilingual isn't possible? Or can someone extract this to strings?
[LG Optimus 3D] VfBStuttgart27:
More translated|German only version

I added a version with more german code:)

Would be great if someone can manage it to get multilingual (see my post above):laugh:

And where I can translate this:

??
[LG Optimus 3D] Vector17-Darkroom:
FmRxApp2.2 / smali / com / ti / fmrxapp

FmRxRdsConfig.smali

Line 1042

const-string v1, "European"
[LG Optimus 3D] VfBStuttgart27:
Thank you:good::good::)

Ok, last question (:fingers-crossed:)

Where to change this text?
[LG Optimus 3D] ilie321:
I will try to extract all strings in next version :) so just wait

Edit: :d who put me to say this, is so borring lol
[LG Optimus 3D] defcomg:
lol @ illie check this audio method sound is better and i think EQ is working routed AUX in to Mixer then used HS DAC For headphones

I will attempt to call LG Libaudflinger method for enabling sound

Need LOGCAT From P940/L9 enabling FM

the Current method is what The Huawei P1 Uses which i assume is what L9 uses

for now i put two options enable 1 2 Disable 3 = exit

its a modded KFMAPP Code

just run it in shell

Hmm i just thought maybe i can use in CM10 to correct HDMI
[LG Optimus 3D] ilie321:
I receive segmentation fault when i try to run it :( you have the source for it?

Sometimes i get "stopped (signal) kfmapp" also qq

Few days ago i found a kfmapp that works on speakerphone only but equalizer has no effect and i tried to compile source but i get linking errors at audio function :s
[LG Optimus 3D] defcomg:
here is the source
[LG Optimus 3D] ilie321:
Thanks i have this version and i've tried almost same think like you but my problem is i cant compile it . I get "undefined reference to ...." for every function from asoundlib.h when linking part of compilation is processed. I found a version of kfmapp that dont use tinymix but same error .

Can you confirm that equalizer is working?
[LG Optimus 3D] defcomg:
No its seems DSP Manager Lite and Audio FX Widget not working it should though

im assuming here the sound Going into Headset is coming from DAC so the FM Radio is digital as its captured from Aux through the input Maybe Acid Audio Might work as its system WIDE

see below my cheap @** Diagram hehe
[LG Optimus 3D] ilie321:
I succeded to compile it :) i tested my routing and yours both work but no equalizer working i continue testing

Edit oops forgot to say nice diagram :D

Look to my diagram :d i just paint it in notepad :p:p:p:eek:

Was joke ofcorse hope you dont mind now passing to serious things......

our inputs are AFMR , AFML right up corner. The signal pass trough ADCR ADCL analog to digital converter and enter in PDM by UL0 UL1 and so on as tinymix command tell to be routed
[LG Optimus 3D] defcomg:
try calling libmedia using extern C
[LG Optimus 3D] ilie321:
ok i promised an update here it is:

EDIT:for ppls that downloaded before this edit pls download again the files sorry for inconvenience

fmrxapp2.3

new in v2.3:

- all strings are now in strings.xml so you can translate it easier

- the annoying noise from start and stop of application in 95% is gone

- added from scratch signal level bar (that's why you need all 3 files from archive or app will not work)

- added manual search buttons

- fixed bug when speaker on and unlock the phone sound pass to headset

Install:

ROOT required

-you need to have at list first version of zip from first post flashed (but V2.2 zip will be nice it has all non used thinks removed)

-add libfmradio.so in system/lib

install both apk like any normal app (note: if you have installed the modded zip you need to copy this two apk in system/apps not install them)

if fail to install === uninstall older versions or delete fmrxapp.apk and fmservice.apk from system/apps

-reboot is required or app may not work properly

enjoy

report bugs

dont blame me if your phone will be broken :)
[LG Optimus 3D] ilie321:
to defomg maybe it helps

ok here it is what i discovered:

mostly using this page OMAPpedia

look at this image i added some numbers for explications

point 1 input of FM analog signal

- we need to be sure that signals go up in the image not on left and pass to analog output so this = tinymix 66 0 so AUX FM Volume =0

- now we need to select the signal that pass to ADC converter for this we do:

tinymix 77 2 // so 2 is FM/AUX you can check in console type tinymix 77 2 and then type just tinymix ang go to line with 77

tinymix 78 2

- now we need to set capture preamplifier volume and amplifier volume just before enter to ADC = tinymix 64 4 and tinymix 65 4 and our signal pass to ADC woot

- the signal pas trough McPDM and PDM_UL from point 2 to point 3

- in point 3 AMIC_UL is amplified again tinymix 27 120

- we need to route it to point 4 audio or voice record orange box MM-UL2

tinymix 54 11 tinymix 55 12 and our signal is in point 4

from here i need to see what is with DL1 mixer i used tinymix 50 1 to enable voice capture route but is not ok the sound must come from media playback with tinymix 51 1 but at list i was able to see that signal is ok in point 4 doing it

- we need to set DL1 volume also = tinymix 9 120 singnal go to point 5 and 6 to DAC and to route it to headset from DAC is

tinymix 73 1 tinymix 74 1 and tinymix 34 1 tinymix 36 1 to enable switches to output

point 8 can help for BT future routing i hope

EDIT: after more testing

i need to see these problem

tinymix 50 1 must be off if sound is recorder and played as multimedia but if i make it off no sound so maybe the app is not recording/playing the file and maybe this is why equalizer not working also

im studying now

hmm if both 50 51 switches are not 1 no audio very strange it should be only 51

i disabled pcm_start(pcm_c); in kfmapp and no sound so app is doing something

why 50 must be 1 and equalizer not working ^^

see in attachment an kfmapp modded with this settings and is doing digital audio routing :)

set "v 1000" before enabling audio with "A" or high sound will result
[LG Optimus 3D] ilie321:
also can you try to compile this kfmapp code is using alsa-lib not tinyalsa
[LG Optimus 3D] krija:
I have FCs with new version 2.3.
[LG Optimus 3D] ilie321:
hmm never had one can you get logcat of the FC and post it

EDIT oops i forgot to comment 1 line download again pls it should work
[LG Optimus 3D] daniel.mota:
I got FCs too.

Will test correct version now.

EDIT: It's working, thanks.

Can't find strings.xml inside the apk, where can I get it?
[LG Optimus 3D] ilie321:
i think i updated too soon i will check why strings are not there

EDIT did you decompiled resources or how did you made last time to get them? this is the only way i think

and i see now sound will stop at transient sounds which is from correcting a bug produced another sry when i tested seams it worked but now is not

i will make adjustments tomorrow again
[LG Optimus 3D] krija:
Thanks too, now it works.
[LG Optimus 3D] ilie321:
ok you guys lose sound after transient sounds ? like bips, sms, calls or is ok
[LG Optimus 3D] defcomg:
Good Progress With New Progress does the EQ take effect
[LG Optimus 3D] chieutim:
It is nice with signal level bar in new 2.3 version.
[LG Optimus 3D] ilie321:
nope but is strange why is needed to have enabled capture and playback inputs from DL1 mixer to have sound ;

everywhere i searched only one at the time was used

normally the app is doing an buffer object where it write and read the pcm stream correct me if im wrong

when it reads is like playback multimedia im stuck here i need to understand what is happening

i will try to use tinyplay to play a file to see if equalizer has effect like this

Question

so anyone has problem in v 2.3 with sound loosing after sms, phone call etc ? or not
[LG Optimus 3D] defcomg:
it could be that the Eq will not work because the Stream is not defined in android we are routing audio directly by directly i mean Low Level C code as opposed to Java With android API's we would need to define it but ICS has FM Stream defined in android/media/AudioSystem.smali i will check what method L9 uses as all omap devices are same the routing method For even the Huawei P1 is the same as o3D.

My Issue is i don't know how android tell tinyalsa okay switch stream to multimedia switch to tones all i know its defined in /lib/hwaudio.primary.omap4.so

here is the Source

http://code.metager.de/source/xref/android/4.2/device/ti/panda/audio/audio_hw.c

O3D

.data:0000C744 EXPORT mm_ul2_fmradio
.data:0000C744 mm_ul2_fmradio DCD aMux_ul10, 0, aAmic1, aMux_ul11, 0, aAmic0, aDl1CapturePlay
.data:0000C744 ; DATA XREF: sub_2CAC+194o
.data:0000C744 ; .got:mm_ul2_fmradio_ptro
.data:0000C744 DCD 0x78, 0, 0, 0, 0 ; "DL1 Capture Playback Volume"

L9

.data:0000E15C EXPORT mm_ul2_fmradio_digital
.data:0000E15C mm_ul2_fmradio_digital DCD aMux_ul10, 0, aMmextLeft, aMux_ul11, 0, aMmextRight
.data:0000E15C ; DATA XREF: sub_293C+150o
.data:0000E15C ; .text:off_2C54o
.data:0000E15C DCD aDl1CapturePlay, 0x78, 0, 0, 0, 0 ; "DL1 Capture Playback Volume"

.data:0000E2B0 EXPORT mm_ul2_fmradio
.data:0000E2B0 mm_ul2_fmradio DCD aMux_ul10, 0, aAmic1, aMux_ul11, 0, aAmic0, aDl1CapturePlay
.data:0000E2B0 ; DATA XREF: sub_293C+190o
.data:0000E2B0 ; .text:off_2C68o
.data:0000E2B0 DCD 0x78, 0, 0, 0, 0 ; "DL1 Capture Playback Volume"

.data:0000E234 EXPORT codec_loop_aux_fm_volume

.data:0000E234 codec_loop_aux_fm_volume DCD aAuxFmVolume, 0, 0, 0, 0, 0

.data:0000E234 ; DATA XREF: sub_2CB4+8o

.data:0000E234 ; .text:off_3024o

.data:0000E234 ; "Aux FM Volume"

so according to that if we want digital we should use

aMmextLeft

aMmextRight

instead of aMiC0/1

i will try the lib later on the O3d

So whatever calls audio_policy.default might be the key to routing the audio as a stream built into android im sure the libs will work
[LG Optimus 3D] ilie321:
nice i will try too

mmext left is tinymix 54 9 and right is tinymix 55 10 :)

EDIT no sound with this settings :( cuz for p920 fm is connected to aux of audio chip not on mmext_in

tinycap and tinyplay works but is true somehow android api must know about the stream and im lost about this now
[LG Optimus 3D] ilie321:
if im not wrong we need to attach the equalizer to the audio stream as it say here

http://developer.android.com/reference/android/media/audiofx/Equalizer.html

edit:but third party EQ must work somehow without this

i will try to add the audio route in libfmradio.so maybe it will work :)
[LG Optimus 3D] daniel.mota:
Yes.

I don't completely loose the sound, but it lowers a lot, almost disapearing.

Changing to speaker and back to headphones returns the volume to the previous high level.
[LG Optimus 3D] ilie321:
try to see if any changes with this one test
[LG Optimus 3D] ilie321:
to defomg :after adding the code from kfmapp in libfmradio.so cant open the mixer in c++ even if is marked as C code with extern "C" directive

i will continue trying when i have time

what i found is that libaudioflinger.so from ICS for P920 has alot of FM related strings but how to use this library? in the source for ICS P920 is not included and each phone has adapted versions for hardware of this lib

another thing audiomanager.java call deprecated audiosystem.java which has setParamaters(String String) with this comment

* Sets a group generic audio configuration parameters. The use of these parameters

* are platform dependent, see libaudio
[LG Optimus 3D] defcomg:
ok do you use gtalk?

Edit to call the methods i think you need the follow in libfmradio sources

i will use getNumber of Display as an example

#include [COLOR="Red"]<gui/SurfaceComposerClient.h>[/COLOR]

101static jint [COLOR="Red"]android_view_Display_getDisplayCount[/COLOR](
102 JNIEnv* env, jclass clazz)
103{
104 if (headless) return 1;
105 return [COLOR="Red"]SurfaceComposerClient::getNumberOfDisplays()[/COLOR];
106}

static JNINativeMethod gMethods[] = {
115 { "nativeClassInit", "()V",
116 (void*)nativeClassInit },
117 { "getDisplayCount", "()I",
118 [COLOR="Red"] (void*)android_view_Display_getDisplayCount[/COLOR] },
119	{ "init", "(I)V",

so we can deduce the following

#include "AudioPolicyService.h"
#include "AudioFlinger.h"

AudioFlinger::setFMRxActive(bool);

AudioFlinger::setFmVolume(float);

AudioPolicyService::AudioCommandThread::fmVolumeCommand(float,int);

AudioPolicyService::isFmMute(void);

AudioFlinger::PlaybackThread::setFMRxActive(bool);

AudioPolicyService::isFmMute(void);

AudioPolicyService::setFmRadioSpeakerMode(bool);

AudioPolicyService::setVoiceVolume(float,int);

so for example

AudioFlinger::setFMRxActive(bool);

could go in

static int nativeJFmRx_EnableAudioRouting(JNIEnv *env, jobject obj,jlong jContextValue)
{
int status = 0 ;
bool sound = true;
V4L2_JBTL_LOGD("nativeJFmRx_enableAudioRouting(): Entered");

AudioFlinger::setFMRxActive(sound);

nativeJFmRx_Callback(jContext,status, FM_RX_CMD_ENABLE_AUDIO,status);

V4L2_JBTL_LOGD("nativeJFmRx_enableAudioRouting(): Exit");
return FM_PENDING;
}

assuming AudioFlinger::setFMRxActive(); method is what turns fm audio on

in Android.MK you would need to add

LOCAL_C_INCLUDES:=

and include the path to libaudioflinger
[LG Optimus 3D] ilie321:
i will try but i need a lot of platform related libs like AudioPolicyService.h, AudioFlinger.h and theirs "include" for our device from where i get them???

nop i dont have gtalk but i can install it

EDIT I think i found another way still involve 2-3 tinymix commands but is java coding

principle is this

just for test start kfmapp tune a station but do not enable audio at all

now go to internet and get an app like this: link

start it, start mic capturing

go to console and type tinymix 78 2 take care of audio volume before typing this not to be to high

normally you hear radio now but may be very distorted

go and move equalizer bars (like audioFX or any third party) it will work :)

i got the source for this mic app and i will try to play with it to see if i can get a clear audio also all digital processing can provoke distortions. Lets see what we get :)
[LG Optimus 3D] ilie321:
result looks veryyyyy nice if everything works ok we have radio with equalizer soon

the sound is ok i need 1-2 days to finish all and if no big problems appear is done
[LG Optimus 3D] defcomg:
cool man take your time :D
[LG Optimus 3D] ilie321:
just status update:

it will take a lil longer that expected i need to mute the output stream when seeking or mute because equalizer processing is inserting noise that is heard into headset; also i cant enable speaker in digital way i tried many things seams on our phone only second mixer called DL2 can route digital audio to speaker (i may try to do this with tinymix but it will be messy)

i lost a lot of time with annoying noise at start of radio most of it is because equalizer is already starting processing the audio buffer

interacting with other sounds and calls seams ok

and tomorrow im at work
[LG Optimus 3D] defcomg:
yes sensei we shall await on you next update
[LG Optimus 3D] ilie321:
私は日本語が好きです。お大事に。 :d
[LG Optimus 3D] ilie321:
ok personally i like more the analog sound from last version but here it is the digital version

FmRxApp3.0

this will work if you have v2.3 installed (if not follow instruction from there and only change the fmrxapp.apk with the one from here)

if you have last version in system/apps just paste it over it

this version may have many bugs post them and i will try to solve as i can

maybe i can join analog and digital in a single app with selection possibility

info:

i use FXaudio widget from v28b Xball acid 7.0

i disabled awsomebeats it make sound bad on my phone for every app

try with equalizer disabled if sound is poor

sometimes app may start with bad sound try to restart it

SOUND is 2CH PCM 16b SR 44100Hz

enjoy and dont blame me if your phone will be broken :p
[LG Optimus 3D] defcomg:
Lol Awesome