yashsingh1/xdaforums huggingface dataset:
[Nexus One Android Development] z3ntn3l:
True. With Modacos's Desire-Rom you can start the Radio-App and search for Radio-Stations. It finds the Stations but there is no Sound-Output and thats the Problem.
[Nexus One Android Development] Jack_R1:
Looks wrong. As it's written there and pointed earlier, the audio is received by high speed UART. I2S isn't used at all, and I2C is used for control only.

High speed - meaning above the regular top 115200 bps.

Strike that out, I think I was wrong. I just checked the text in the brief, and the text below that I was basing this upon, is just confusing. Second page, right low corner, "FM" says "High speed UART, I2C for control", which lead me to believe that HS UART is used for audio and I2C for control, but reading the top, I guess it's just misleading. 1st page on the right, "FM Control" says "HCI and I2C", while HCI is over HS UART, as noted several lines above, which leaves "FM Audio - bidirectional I2S and PCM", and they're probably selectable - so it would be possible for the audio to have the same path as it has in BT mode.
[Nexus One Android Development] intersectRaven:
Hmmm...the module is loading successfully but upon the FM radio's attempt to open it, it's not waking up. Will have to put some debugging messages somewhere. :(
[Nexus One Android Development] bewA:
which FM app are we trying to use?

The HTC one or the Moto one?
[Nexus One Android Development] Kali-:
Please, stop spoking/asking/posting Motorola stuff, completly unuseful
[Nexus One Android Development] bewA:
excuse me?
[Nexus One Android Development] Vovan888:
I think it is the only logical option for FM audio.

And after looking into btld it really seems that FM radio is controlled with special HCI commands.
[Nexus One Android Development] :
I can tell you that it's definately much more useful than your post.

:cool:
[Nexus One Android Development] intersectRaven:
Just a quick update. Although the driver I ported successfully compiles and loads, it's not playing nice with the built-in bluetooth stack in the kernel. The good thing though is I think I have an idea as to how to rebuild the driver. Hopefully it will work. :)
[Nexus One Android Development] :
Awesome, let me know if you need testing of any kind.
[Nexus One Android Development] thalib_atc:
This is great news ..
[Nexus One Android Development] r8zer:
intersect is the man, his kernals are great and so will this be, this guy is amazing.
[Nexus One Android Development] martin0285:
Don't get ya hopes up!! That being said, IR....you ARE the man and if anyone can do this, I have faith you CAN!!! Good Luck mang!!!
[Nexus One Android Development] intersectRaven:
I was just about to say that as well! :) I'm still too far off to guarantee success so don't anyone get their hopes up yet! :)
[Nexus One Android Development] intersectRaven:
Another status report:

The rebuild of the HS UART driver for connecting the BCM's bluetooth is successful. It seems that the Desire source really won't work when ported directly due to a mistake with the way the wakelock is initialized for the driver. Anyways, the driver I rebuilt already takes care of the problem and the FM radio and btld can now connect successfully. Next up will be the connection to the headset (if I'm reading the logs correctly.). :)

***Also, we're still far off okay? What my efforts prove is that the drivers necessary for the FM radio are now functioning. This does not necessarily mean that it will work. :)
[Nexus One Android Development] :
So awesome, you're just looking at the FM recieve at the moment correct? I'm mainly interested in fm transmit =D.
[Nexus One Android Development] intersectRaven:
Yup. FM receive has drivers so I'm not starting from scratch. (although that HS UART driver thing almost made me do so... :p) :)
[Nexus One Android Development] twflys:
So, I am curious- 'IF' you are able to get this running, would it require root access? Any chance you can make it into an application to sell for muchos dinero on the market?

I recently got a replacement Nexus and with the Froyo update my phone is running top notch. I really don't want to root the thing, but just might if that's going to be the only way to get the FM radio working.

Thanks again for your hard work, win or lose- you have certainly made quite a statement.
[Nexus One Android Development] :
since this is kernel level, you will have to root unfortunately lol

you can do it while remaining stock and with a locked bootloader though
[Nexus One Android Development] bewA:
excellent news so far! :)

so to put this in simple "special" terms if i'm right you have managed to get the

HTC Radio App to see the FM driver

The next step is to get the app/driver/etc... to detect the headset being plugged in

then browse for stations

and then you need to try and out the audio

is that right?

I'm just trying to establish what step in the process we (i mean IntersectRaven of course) are :)
[Nexus One Android Development] intersectRaven:
I think you're right. :p Anyways, right now, what's finished is the hooks in qdsp6 and the connection of USERIAL to ttyHS0 which is the high speed UART. Next up is either the htc-accessory/fm and htc-accessory/tty access. :)
[Nexus One Android Development] intersectRaven:
Update...we have...static audio...the one you hear between frequencies. I don't know though whether that's a good sign or not. :o
[Nexus One Android Development] christiankk:
Wow - excellent work buddy!:cool:
[Nexus One Android Development] thalib_atc:
I smell some success.. Keep it up intersectRaven.. Will keep the bounty alive.. what do u say people ???
[Nexus One Android Development] bewA:
Nice!!!

Strange how it only gets static but no stations! Is that because its not searching yet and just pumping out the static from some default frequency?

Its surprising the radio app hasn't needed and tweaking and this is all kernel level!!

Sent from my Nexus One
[Nexus One Android Development] intersectRaven:
I'm not really sure. The static changes its "staticity" :p when I change frequency so maybe it's something with the audio decode. I'll work on it later. :)
[Nexus One Android Development] boostern:
Hey guys, I don't know if this is usefull or not, but in the new korean rom there is a new radio, the same as in the new 2.2 desire rom. The version is 5.08.00.04
[Nexus One Android Development] imfloflo:
Maybe try to put an know working station in your region in hard for the begin to test if it's codec related or not ?
[Nexus One Android Development] ibegary:
My bounty piece is still alive.
[Nexus One Android Development] WebghostDK:
So is my bounty :-)
[Nexus One Android Development] mr.sweet:
And I will add 20,- to the bounty!
[Nexus One Android Development] intersectRaven:
Uploading AVS-X version to my MediaFire folder WITH FM SUPPORT!!! Those who promised the bounty please direct yourselves to my Paypal donate button! :D

***Tested on Modaco r19 Desire***
[Nexus One Android Development] minooch:
WOW!

WOW!!!!

Serious? you work magic!!
[Nexus One Android Development] chrs2021:
****ing fantastic news intersect you're the man!
[Nexus One Android Development] intersectRaven:
Just try it out if you don't believe it. (can't believe it myself...) :D
[Nexus One Android Development] minooch:
Oh, i believe you!

I'm just shocked!!! (in a VERY good way)

Cheers
[Nexus One Android Development] :
Where's the linkage love?
[Nexus One Android Development] ibegary:
I should search but I'm no where close to a pc. Anyone have a link to the fm app?
[Nexus One Android Development] minooch:
http://www.mediafire.com/intersectRaven
[Nexus One Android Development] minooch:
desire rom for now
[Nexus One Android Development] intersectRaven:
For those looking for the kernel, here's the link:

http://www.mediafire.com/?dtmmykwmoiy

:)
[Nexus One Android Development] :
I've never pushed a kernel, is it just and update.zip, if not , how can I do it through terminal on the phone?
[Nexus One Android Development] minooch:
just boot to recovery and flash the update.zip - nandroid first (obviously)

PS: doesn't have to be called update.zip

Or you can pull the bcm4329 (WiFi Driver) & zImage (Kernal) from the zip and use my tool (ADB Gui)
[Nexus One Android Development] chrs2021:
just tried it *splooge*
[Nexus One Android Development] intersectRaven:
Btw, my kernel uses the updated wifi driver so it won't work without an updated wpa_supplicant (or something...I really didn't go deeper into it). :(
[Nexus One Android Development] tim.embeddedfreelancer:
You are really cool! Just wondering whether you should create another thread for this FM feature. So that you could post the revision history and updates at the 1st post. It would be easier for us to follow the future modifications and enhancements. You own the credits also :)
[Nexus One Android Development] :
say what...?

lol
[Nexus One Android Development] karnovaran:
Bravo intersectRaven! Do you forsee this ever working without the HTC framework? (i.e., on CM)
[Nexus One Android Development] r8zer:
so we need desire rom to try this do we,
[Nexus One Android Development] :
Well, I can't test it since I'm on CM, buty my $20 are on the way to you, since a couple other peopl confirmed. Now it's just of matter of porting it out for other roms.

Now we know the hardware is there 100%. =)
[Nexus One Android Development] intersectRaven:
I did as you recommended. It is nicer to have a changelog and issue list. :)
[Nexus One Android Development] Tech_Boy:
Awesome! Amazing you were able to accomplish this.

How hard do you think it will be to get this to work without desire roms?
[Nexus One Android Development] intersectRaven:
I don't know about that. I'll have to leave it to the ROM makers here. ;)
[Nexus One Android Development] knightnz:
Wow, nice work IR. I had my doubts :)

Maybe one of the TeamDouche bunch can hack the app into submission. If there's not too much of it relying on framework for anything other than the Sense UI then it should probably just be a case of rewriting the functions to call the standard AOSP UI libraries instead (+ maybe a bit of a tidy up). Unfortunately it'd probably take me a good week or so to work my head around it all, I'l leave it to the professionals! ;)

Didn't one of the Acer phones also have a radio app? If so, is that tied into any proprietary libs?
[Nexus One Android Development] bahathir:
Err... any patches code, please? :)

I might want to backport it to my own kernel, using official 2.6.32.9 android.git.

Thank you.
[Nexus One Android Development] intersectRaven:
I'm still going to clean it up before release. Some parts are just plain messy and if you've been monitoring my GitHub, I REALLY don't like messy coding or even commits. :D
[Nexus One Android Development] g4m3rz:
could you upload the fm app apk ? i installed modaco r22.1 but it does not include the FM app :(
[Nexus One Android Development] intersectRaven:
Use r19. I tried the FM app using that revision and it doesn't work for some reason. :confused:
[Nexus One Android Development] jroid:
wow excellent work intersectRaven. Anybody try this on froyo sense??
[Nexus One Android Development] bahathir:
TQ, I can wait :).. Yes, I just found your repositories in github :)

Thank again, and Bravo!!, for your Passion and Incredible efforts make Nexus One a Legendary. :)
[Nexus One Android Development] chrisvuong:
sucks when you can use Radio FM but no Wifi :(..between those i prefer Wifi..Cus You can listen to the Radio by Wifi..better waiting for new Kernel fix
[Nexus One Android Development] WebghostDK:
Will try and write a app for this when i get off work.

Anyway you should get the $20 soon :D
[Nexus One Android Development] Eclair~:
We need alternative radio applications.. with this hack, I'm sure those will spawn eventually.
[Nexus One Android Development] thalib_atc:
it seems like the FM application it self is buggy or it's a problem with froyo radio.. cant say which one for sure.. i get audio for once that's the startup of the phone.. once if i close the application it does'nt open for some reason.. and have to reboot again.. which is a bit of a problem
[Nexus One Android Development] rohandhruva:
Awesome work IntersectRaven! Just to be sure, there is no way to get this working on stock Froyo (FRF91) yet, right? Has anyone tried porting over the desire FM app to stock?
[Nexus One Android Development] intersectRaven:
It should work BUT there's no FM app so it would be useless. :p
[Nexus One Android Development] rohandhruva:
Yes, I thought as much too :(

How difficult would it be for someone to port the desire FM application to N1? Theoretically, now that your kernel provides the same interface, can't we just rip out the apk and install it on N1? Probably someone who has experience in porting over apps could share their ideas :)
[Nexus One Android Development] intersectRaven:
The FM radio of the desire relies too much on the HTC framework so it's not that simple. Although you are correct that my kernel will now make it easier for developers to do so. :)
[Nexus One Android Development] rohandhruva:
Amen to that!

So, before I go ahead and try it, I would just like to confirm -- I will download the MCR desire r19 prebake (http://coblitz.codeen.org/www.romra...te-modacocustomrom-nexusone-desire-signed.zip) and install your kernel. The prebake does have FM radio by default included, right?

However, I have the Froyo radio. Will it cause a problem with the FM? (some people have been reporting that). What version of radio are you on? Eclair? The 32.26.00.24U_4.04.00.03_2 included in desire rom kitchen?
[Nexus One Android Development] intersectRaven:
Yes it does have the FM radio included. I'm currently on FroYo radio so I see no problem with the version. To be specific, my radio version is: 4.06.00.12_7. :)
[Nexus One Android Development] imfloflo:
Just a question the desire and the nexus are very similar can we flash the new radio, can it help resolve some bug on FM porting ?

Which other Device have FM radio in ? we can find another FM radio apps maybe
[Nexus One Android Development] rohandhruva:
Thank you so much! I can't wait to try it :D
[Nexus One Android Development] intersectRaven:
NEVER FLASH THE RADIO OF THE DESIRE TO THE N1! YOU WILL BRICK YOUR N1! :eek:However similar they may be, there are still differences which are mirrored in the radio. :)
[Nexus One Android Development] bewA:
I've had a look here and these are the ones that have FM Radio

HTC Incredible

T-mobile Pulse Mini

HTC Desire
[Nexus One Android Development] bewA:
I've just baked a pulse mini rom from MoDaCo :)

Obviously i'm not going to flash it on my N1 coz that would be dumb ;)

Although i'm not sure what the dependencies are!
[Nexus One Android Development] bewA:
ok i ripped out the FM Radio APK from the Pulse Mini ROM and it refused to install...

D/PackageManager( 111): Scanning package com.huawei.android.FMRadio
I/PackageManager( 111): /data/app/com.huawei.android.FMRadio-1.apk changed; unpacking
E/PackageManager( 111): Package com.huawei.android.FMRadio has mismatched uid: 10107 on disk, 10109 in settings
D/installd( 89): CheckZipAlign: --- END '/data/app/com.huawei.android.FMRadio-1.apk' (not needed) ---
D/installd( 89): DexInv: --- BEGIN '/data/app/com.huawei.android.FMRadio-1.apk' ---
W/dalvikvm( 1987): DexOptZ: zip archive '/data/app/com.huawei.android.FMRadio-1.apk' does not include classes.dex
W/installd( 89): DexInv: --- END '/data/app/com.huawei.android.FMRadio-1.apk' --- status=0xff00, process failed
E/installd( 89): dexopt failed on '/data/dalvik-cache/data@app@com.huawei.android.FMRadio-1.apk@classes.dex' res = 65280
W/PackageManager( 111): Package couldn't be installed in /data/app/com.huawei.android.FMRadio-1.apk
[Nexus One Android Development] imfloflo:
@bewA maybe need some other lib *.so files to run on our N1
[Nexus One Android Development] bewA:
true!

after doing a bit of researching I think I might need to deodex the apk but i've got no idea how to even do that! but I'm googling, but this might not even help in any case as you have said there will be other files I would probably need!
[Nexus One Android Development] :
This kernel at the moment only allows for FM receive correct? Are there any phone which have transmit drivers that are open source? Do you believe it will be possible for FM transmit to be enabled?
[Nexus One Android Development] Kali-:
bewA: this kernel work only with desire port for n1 because it need HTC FM Radio app which depend on HTC framework, other app from other manufacturer simply won't work
[Nexus One Android Development] Daneshm90:
Use autodeodexer ;)
[Nexus One Android Development] treoking:
Do you think that this development may be implemented in other ROMs in a few days?

The work is incredible, get something that Google doesn't even attempt, but the obligation of having to use the Desire ROM takes away merit...

Still, very great work... I'll hope all of use can enjoy this hack and remember your name every time we listen the radio...

Regards...
[Nexus One Android Development] MrNameless:
Guys, i installed successfully FM radio , but it crashes!
[Nexus One Android Development] Daneshm90:
bewA,

META-INF/MANIFEST.MF has invalid digest for classes.dex in /data/app/vmdl1995
tmp

Did u resign the apk ? Also u might have to remove the shared:uid if it has any inside the manifest.xml
[Nexus One Android Development] Daneshm90:
Can u post the log, also did it have any shared:uid ? if it did u might have to find other apks that have the same uid and bring those over as well, thats how i got droidx's fm radio to "work" on stock android, work as in just show stations, no sound :cool:
[Nexus One Android Development] bewA:
I resigned using your script/program which allowed it to be installed :) thanks :)

As for removing the shared:uid i dont know how to do that :(

I'm a complete n00b i'm just trying to help the best way I can! :)

Had learn most of this smali/baksmali/signing/deodexing today!

Here's the logcat if that's any help!

http://pastebin.com/3HvwKzVb

I'm not sure if there is any point in pursuing this but as its a none Sense ROM I thought i'd give it a go! :)
[Nexus One Android Development] Daneshm90:
Im already on it with Mr.Nameless. Will keep u posted.
[Nexus One Android Development] bewA:
ok :) I'm no expert as you may have noticed but if you need any help or testing I don't mind :)
[Nexus One Android Development] imfloflo:
Can we you this one too for test ? Desire/Froyo rom : http://xdaforums.com/showthread.php?t=722236 ?

So to be clear for the moment some of you success to have FM working with Modaco Desire r19 rom that's all.

We need a Desire rom cause we need some files of the HTC framework.

Is it possible to extract all needed files from desire to put it on Froyo rom ? just the concept for the moment ? theoricaly ?
[Nexus One Android Development] bewA:
I'm not sure that ROM will work as its just "sense ui look/feel" so i doubt its got any of the rosie/sense framework.
[Nexus One Android Development] MrNameless:
yeah, it won't work!
[Nexus One Android Development] imfloflo:
Ok it's just look, my bad, the title of the thread trapped me ^^ I should have read all the post
[Nexus One Android Development] rohandhruva:
I'm having some problems with this. It sometimes works, and most of the times doesn't. I just hear the static-y noise we get between frequencies. Scanning seems to pause at all the valid FM stations, but later on I can't tune to them. Once by chance I did get some music playing, but even then I wasn't able to change it or scan over channels. So it's really very unpredictable. Is it me, or does this happen to everyone? I am on MCR Desire r19.

My logcat - http://pastebin.com/Ck2p1h6m
[Nexus One Android Development] Daneshm90:
K im at work, so i gotta get back to work lol. This is wht i have so far, if anyones on stock froyo try installing this and working ur way through it.

Link

U'll see the main screen of the app with the sliders or wht not, and then few seconds later, BAM a force close. Will work on it in evening.

Fyi, this is htcfmradio.apk from a desire to nexus port.
[Nexus One Android Development] WebghostDK:
NICE!

Hope you get it working! :)
[Nexus One Android Development] MrNameless:
we are working together , if this could intererst :)
[Nexus One Android Development] Daneshm90:
K considering its pointless to try to even make this app into a standalone w/o a kernel that supports fm, what we need is someone with a stock rom / intersect's kernel + fm patch or w/e. Until then i dont think theres any point.
[Nexus One Android Development] bewA:
What do you mean?

Sent from my Nexus One
[Nexus One Android Development] Daneshm90:
Like if we have a stock rom (not a propietary rom) + a kernel that SUPPORTS fm radio, then that will be a good base to try and get the htcfmradio.apk to work w/o the sense framework.
[Nexus One Android Development] bewA:
How about the modaco froyo? That's fairly stock?

I could go to that one if that helps?

Sent from my Nexus One
[Nexus One Android Development] Daneshm90:
Edit: miss read ur post ;)

U can go on it, but we still need a kernel that supports fm.
[Nexus One Android Development] rohandhruva:
Can't someone install the IntersectRaven's kernel on top of stock rom? For example, I have MCR r21 running, and I could install the kernel. Can I then help you in testing out your modifications?
[Nexus One Android Development] Daneshm90:
Yea sure, if it works then let me know and we'll use that as a base.
[Nexus One Android Development] bewA:
Well I'm running cm6-rc1 with ir's latest FM kernel and tried FM radio app you posted as wip which TV's as you said, hows that?

Sent from my Nexus One
[Nexus One Android Development] Daneshm90:
Thats good, so now we have a based, awesome.

TV's <- ?

Im assuming its a synonym for force-close lol ? Anyway could u post ur log ?
[Nexus One Android Development] rohandhruva:
Here's the logcat on my MCR r21 with the IR kernel -- http://pastebin.com/QjVQxrt2

EDIT: I had actually opened and closed the app twice, just to be sure.
[Nexus One Android Development] bewA:
Yea force close lol! Stupid auto correct :) ill post that shortly :D

Sent from my Nexus One
[Nexus One Android Development] bewA:
here's my log cat from my cm6-rc1 with ir's latest kernel :)

http://pastebin.com/r9MzV890

If you need anything let me know :)
[Nexus One Android Development] rohandhruva:
The kernel which I was trying had a bug. The new bug fixed kernel (20100713_1658) by IntersectRaven still causes a FC of the FM app, but works perfectly on Desire rom.

Here is the logcat on this new kernel, on Nexus One ROM: http://pastebin.com/pNFuUFqg

It is almost the same, but I hope it helps.
[Nexus One Android Development] MrNameless:
http://xdaforums.com/showthread.php?p=7171613

here is the actually PROJ
[Nexus One Android Development] wornbat:
Unbelievable. FM on Nexus One it works well with

alpha19-update-modacocustomrom-nexusone-desire-signed.zip

And the Kernel here

Desire Rom [Kernel] [.35-rcX]intersectRaven's Kernel (FM SUPPORT!!!)07/15/2010 03:12pm

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

Still a little buggy but just to have it working is great.. Something it was never meant to have.

Good Work

Wombat
[Nexus One Android Development] bewA:
we know ;)

R23 has support as well.
[Nexus One Android Development] stonner:
FM apk and Kernel updgrade on MODACO r 16 ROM ??

Hey guys , i understand the latest Kernel supports FM Radio , but my query is this i've NEXUS One with MODACO CUSTOM ROM r 16 (FRF50) , Froyo 2.2 , with a current Kernel 2.6.32.9-27220-g328f560 and a base band Version is 32.36.00.28u_4.06.00.12_7

kindly advice what should i do to have this amazing feature tested that is FM RADIO working on my device , do i need to convert it to DESIRE ROM , or a simple kernel UPGRADE with FM apk installation will do ?

would appreciate if you can pass on some direct links to download.
[Nexus One Android Development] bewA:
Well you need to upgrade to the latest MoDaCo Froyo build (R22 i think) for a start.

Then flash one of intersectRaven's FM Kernels (look for his thread, in this forum).

But having said that there is no FM radio app for non sense rom's so none of that will do anything for you.

If you want Radio you will have to flash MoDaCo's Nexus Desire R23 ROM but that is buggy as its a work in progress (wip)..