yashsingh1/xdaforums huggingface dataset:
[HTC One Max] Flyhalf205:
I have my first test building now on my slower build machine. Should be done in about 2 hours. I'll send you a PM with the download link.
[HTC One Max] osquitar:
Hello Fly.

Csn I test the build also?

Thks
[HTC One Max] osquitar:
Tested, I did a dirty flash and FM Radio doesnt work.

Thanks for the try
[HTC One Max] wyvernwaddell:
It failed for me too, but here's a pastebin, if anyone wants to take a look at it. http://pastebin.com/sV4CDSyq

This line seemed relevant, but what do I know?

D/fm_hrdw ( 7986): file_find: can't open directory /system/bin/.ext errno: 13 (EACCES Permission denied)
[HTC One Max] Flyhalf205:
Try giving this boot a flash. I doubt it will still make a difference.

https://www.androidfilehost.com/?fid=23622183712470462
[HTC One Max] wyvernwaddell:
It didn't change anything-I couldn't get a logcat cause I'm at work..will try and get you one later today.
[HTC One Max] osquitar:
Same here... Doesnt work
[HTC One Max] wyvernwaddell:
About the fm radio thing..

Here's what Mike over at spirit fm forum said:

The log shows the Qualcomm FM chip is not starting properly. This generally happens when the radio-iris-transport.ko kernel module is not available or doesn't work.

This is a common-ish problem, and usually happens because the kernel config file does not enable that module AS a module (instead of built into the kernel) or does not enable kernel modules support at all.

radio-iris-transport NEEDS to be built as a module or it won't work usually. (Exception on One M8 for some reason.)

Later Comment:Log shows there is no /system/lib/modules/ directory. We need that, and at least a working radio-iris-transport.ko loadable module file in that directory.

I'd have more info with a debug log from Spirit1. Tap the frequency button, enter the number 7 and tap "OK". After 20 seconds or so, press Send from your email client.

Anyone who want's to help him get this working should send him a log via spirit 1 or spirit UL following the directions above. Assuming you're on the t6 build, that is. This won't work on verizon or sprint.
[HTC One Max] ktimque:
[MENTION=3082717]Flyhalf205[/MENTION]

On the last few nightlies I haven't been able to get MMS working. The APN seems to be missing the MMS info and when trying to create a new one or edit the default one, the changes don't stick after hitting save.
[HTC One Max] Flyhalf205:
The modules are built into the kernel making them already active. I probably need to take a look at the version of the radio-iris driver. On that test build I made. Try removing init.qcom.fm.sh out of /system/etc. I doubt that will do anything though :(

Hmm. Haven't had any issues here. Are you connected to any WiFi at the time of sending or on a network extender? [MENTION=2995885]sbrissen[/MENTION] I know had some issues a while back. Anymore?
[HTC One Max] wyvernwaddell:
It's gonna need this, too...

Log shows there is no /system/lib/modules/ directory. We need that, and at least a working radio-iris-transport.ko loadable module file in that directory.

Tried removing init.qcom.fm.sh out of /system/etc..you're right-it didn't help.
[HTC One Max] mikereidis:
EDIT: See next post.

The radio-iris driver is always built into the kernel from what I've seen on many phones over years. IE, it's NOT a loadable module such as the hypothetical but never ever seen /system/lib/modules/radio-iris.ko (which even can't be built without some mods I think).

This driver "creates" /dev/radio0, but it does not "activate" it fully. For that we need to load radio-iris-transport.ko source: https://github.com/CyanogenMod/andr....0/drivers/media/radio/radio-iris-transport.c

There has been a trend recently to disable modules support in custom kernels, having the needed drivers in the kernel itself, instead of loadable. Maybe for security ? I dunno...

But that "almost always"* conflicts with the use of radio-iris-transport . There has been a "bug" in that driver for years that ONLY allowed it to work if built as a loadable kernel module: /system/lib/modules/radio-iris-transport.ko

So if the kernel does not have modules support PLUS that module, FM can't work.

*"Almost always": I've noted that the HTC One M8 does not have this problem with CM11 (or stock I think). No modules, but FM works fine. I presume somebody somewhere fixed the "radio-iris-transport built into the kernel" bug; maybe Qualcomm did so in preparation for the more secure Android L.
[HTC One Max] mikereidis:
Re: FM drivers:

I see relevant commit messages here: https://github.com/CyanogenMod/android_kernel_htc_msm8974/tree/cm-11.0/drivers/media/radio

I'm guessing that this m8_defconfig file is not used: https://github.com/CyanogenMod/android_kernel_htc_msm8974/blob/cm-11.0/arch/arm/configs/m8_defconfig

Because it specifies a module for radio-iris-transport. But it shows the important requirements without the committed fixes:

CONFIG_MODULES=y
CONFIG_RADIO_IRIS=y
CONFIG_RADIO_IRIS_TRANSPORT=m
[HTC One Max] Flyhalf205:
[MENTION=3575078]mikereidis[/MENTION]

Thanks for the explanation earlier. I will look into that commit. Looks like we need to pick it over.

[MENTION=2389104]wyvernwaddell[/MENTION] or [MENTION=2237426]osquitar[/MENTION]

I'm going to get a test boot.img out with that commit included so i'll get that ready in a few hours.

[MENTION=4161843]ktimque[/MENTION]

Looks like the m7vzw has this issue. Hopefully it is resolved soon.
[HTC One Max] Flyhalf205:
[MENTION=2389104]wyvernwaddell[/MENTION] or [MENTION=2237426]osquitar[/MENTION]

Try this out on that test build https://www.androidfilehost.com/?fid=23622183712472063
[HTC One Max] wyvernwaddell:
Will do;)

Tried it out on the latest nightly and it works perfectly, on both Spirit 1 and Spirit 2. I used the 9/15 regular nightly to test on.[emoji41]

You guys are the bomb!! Thank You!!
[HTC One Max] Flyhalf205:
That is great news. Now I just have to push to CM.
[HTC One Max] wyvernwaddell:
Will be sending you a donation once I can scrounge up some money..I'm kinda po' at the moment, but this is worth some cash to me.. Thanks again!
[HTC One Max] Flyhalf205:
Thank you very much :victory:. I will ask you to try a new build I am building right now. Will ask you to test tomorrow and see if stock FM radio app will work
[HTC One Max] wyvernwaddell:
I'll make sure I check in tomorrow then.
[HTC One Max] Flyhalf205:
Lets try https://www.androidfilehost.com/?fid=23622183712472240
[HTC One Max] osquitar:
First of all congrats. Second, thanks a lot for your effort.

Since yesterday I have gone to WP 8.1 so I can´t test your build.

Again, thanks a lot for your support to this community
[HTC One Max] wyvernwaddell:
tried it..

Spirit 1 and two both start and work, although the radio stations displayed don't seem to match up with the frequencies I know they are using.

The stock radio app starts, but doesn't seem to be doing anything and then says "No response received to tune fm radio station"

Pastebin for the stock radio app: http://pastebin.com/5Ey3gwzV
[HTC One Max] matthewtech770:
Great job Mr flyhalf I look forward to having FM radio on AOSP CM11 no going back to HTC stock now. HeHe :laugh::good::good::laugh:
[HTC One Max] ktimque:
[MENTION=3082717]Flyhalf205[/MENTION]

I updated to snapshot m10 through CM Updater and it bootlooped. It'd show the lockscreen say process.acore and process.media failed and then reboot.
[HTC One Max] gimmeitorilltell:
I've managed to get the stock fm radio working for the most part on my Sprint variant. I can search & select stations & they display correctly but I have no sound. Spirit radio is working great! Thanks to everyone for this, having an FM radio is awesome!
[HTC One Max] Flyhalf205:
Woah! I didn't think FM Radio worked on the Sprint variant. So only Verizon it is not available? And please upload what you got to your git if possible how you were able to get it working.

Review over my commits here: http://review.cyanogenmod.org/#/q/owner:"David+Hays"+status:open,n,z
[HTC One Max] gimmeitorilltell:
I uploaded what I have so far to my git. I'm not sure about Verizon but I'll run a build if anyone can try it. Sprint sense roms came with the FM radio but I didn't think it would work in cm myself. I grabbed some things from the m8 kernel source? Maybe you or someone can figure out the sound issue before I could? Honestly I have no clue why it's almost working but I'm just not afraid to get my hands dirty and try things. In short term I don't know what I'm doing a lot of times but the good Lord seems to steer me in the right direction most times. https://github.com/gimmeitorilltell/android_kernel_htc_msm8960

Edit: I'm curious if this may be why my audio doesn't work? Maybe not even related but It's something that I don't have? http://review.cyanogenmod.org/#/c/73275/

Also the work in my git is ALL YOU FLYHALF! I'm just the guy that tinkers with stuff until it works or breaks! Lol
[HTC One Max] Flyhalf205:
Ha I don't know what I'm doing half the time also. But i'll get a build out for myself and try this. Exciting news though that Sprint can pick it up. But Verizon usually has HTC ground the antennas. But I am sure we can figure this out. I'll start me a Verizon build with the commits I have done and look at yours also.
[HTC One Max] gimmeitorilltell:
Sounds great and if I find out anything more I'll be sure N let ya know so we can get it all merged into the kernel.

I grabbed a log from the fm radio itself. http://pastebin.com/Q6x314Ad

Looking at the log it may just be a simple perm that needs to be set correctly for the powerhal?
[HTC One Max] Flyhalf205:
May be more than just that. I just now found something new in the our init.qcom.rc file. An existing fm_dl service going on with the init fm script in the etc folder which will be removing soon. I am sure we can set it up like the m8. Try this commit and rebuild. I just updated it. http://review.cyanogenmod.org/#/c/73278/
[HTC One Max] gimmeitorilltell:
Hmm I have "most" of those commits already but I did see a few things missing. One is group system & setprop in the init.qcom.rc. Whatever I'm missing can't be much since I can record fm and everything it's supposed to do except make sound. I'm still digging around to see exactly what's causing it.

I believe it should work after next build after picking in some of the perms you linked.
[HTC One Max] Flyhalf205:
Yeah lets definitely try it without the duplicate fm_dl service point to the actual init script. That has a different permission that the one it needs to be.
[HTC One Max] gimmeitorilltell:
I just seen this post after building last night. This explains why I still have no sound I'm sure but we're almost there.
[HTC One Max] jwhood:
So is there hope that Verizon variant will have FM radio also!!!
[HTC One Max] Flyhalf205:
Nope :(
[HTC One Max] jwhood:
Figured damn Verizon in there quest too make us use more data?
[HTC One Max] gimmeitorilltell:
Well I'm still not having any luck with audio from the FM radio app. Although everything seems to work "except" audio. I'll pull another log to see what we might find.

Edit: logcat after messing with some audio stuff. http://pastebin.com/R1exE6m5
[HTC One Max] Flyhalf205:
[MENTION=4779996]gimmeitorilltell[/MENTION]

any luck so far?
[HTC One Max] Flyhalf205:
Do you stay updated with CM nightlies and flash the working boot.img to give you spriti FM?
[HTC One Max] wyvernwaddell:
I'm doing the nightlies every few days or so and then reflashing the kernel you had me test that works. It's been three days since I updated though..busy life.
[HTC One Max] Flyhalf205:
Well in your free time. If you still got that 2nd rom i got you to test. if you could use that boot.img and see if spirit fm still works alright.
[HTC One Max] wyvernwaddell:
With the latest nightly and the boot image from the second ROM you gave me to test, Spirit comes on and works. The frequency numbers it shows me aren't the correct ones for the radio station it plays, but it does show the name of the station correctly. Also, after I turn Spirit off, I have to reboot the phone because something happens to the audio and I can't be heard on calls afterwards if I don't.

But yeah, it works.
[HTC One Max] Flyhalf205:
Crazy. I may know what is causing it but same time I don't. I will get you a couple of boot.img some time in the future. Maybe tonight.
[HTC One Max] Neo:
I may help you solve this issue or I may not but I might change my mind and do it anyway, but then I might not. It all really just depends on how I feel and how I don't feel which is both the question and the answer.
[HTC One Max] Flyhalf205:
[MENTION=2389104]wyvernwaddell[/MENTION]

Try this please http://flyhalf205.com/kernels/t6/AOSP/boot.img
[HTC One Max] wyvernwaddell:
Yup it works..the frequency numbers are still off but the radio works fine.
[HTC One Max] gimmeitorilltell:
Not any closer yet because I have not really messed with this in the past couple of days. Tonight I'm looking over a few things, tho my FM radio is still working all but the sound. I won't give up any time soon. Lol
[HTC One Max] Flyhalf205:
I have a good feeling on this one. http://flyhalf205.com/kernels/t6/AOSP/boot2.img
[HTC One Max] gimmeitorilltell:
Does the scaling_governor have anything to do with the audio working or not?

E/QCOM PowerHAL( 204): Error opening /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor: Permission denied

E/QCOM PowerHAL( 204): Can't obtain scaling governor.
[HTC One Max] Flyhalf205:
I am 99.99% sure it isn't. So have you tried audio with Spirit FM with only the two kernel commits and no device commits? wyvernwaddell says it works just fine without any device modifications.

EDIT: I think I know the fix for the error above you giving though. I'll try to get that before going to sleep.
[HTC One Max] gimmeitorilltell:
This may be a better log to read? http://pastebin.com/9U2fB0Ni It looks like the audiopolicymanager is stumbling.
[HTC One Max] Flyhalf205:
I'm actually not seeing this in my log or international logs...

E/QCOM PowerHAL( 204): Error opening /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor: Permission denied

E/QCOM PowerHAL( 204): Can't obtain scaling governor.

EDIT: [MENTION=4779996]gimmeitorilltell[/MENTION] Try this commit and see if it cleans up your log any.

https://github.com/Flyhalf205/andro...mmit/96560429c6410cd4c1a6edd5eee1fcb332259933
[HTC One Max] wyvernwaddell:
I'll get you guysa log in the morning or so, but it's 2am here and I'm passing out for a few hours...

---------- Post added at 01:47 AM ---------- Previous post was at 01:44 AM ----------

I suspect there are some errors in not noticing much.. The up and down frequency buttons work, but the saved station buttons don't, stuff like that. I will get a logcat in the morning and play with the radio a bit then.

---------- Post added at 01:48 AM ---------- Previous post was at 01:47 AM ----------

The last kernel posted works.
[HTC One Max] Flyhalf205:
[MENTION=2389104]wyvernwaddell[/MENTION]

Alright cool thanks. It looks like the radio iris commits are merged into the CM kernel now. So you can keep up to date with the nightlies and not worry about losing Spirit FM
[HTC One Max] Flyhalf205:
The buttons not working could be part of the app. I don't know how it could be what we are doing. Logcat would work great. But the last kernel. It doesn't have the mixed freq stations and names?

EDIT: Is the buttons working in any of the boot.img you are testing?
[HTC One Max] Flyhalf205:
May have found your audio issue now! Take a look here: https://github.com/Flyhalf205/andro...mmit/7528b8b04e98185fbd77affc9b0a06825f5deb11 at the dsp/snd_soc_msm/snd_soc_msm_2x_Fusion3 file
[HTC One Max] wyvernwaddell:
Sorry folks..

I didn't get to do the logcat today, but should be able to run the next update tomorrow and see if radio works without the other boot image. Sorry about the delay-Life has been hangin' me over the barrel the last week, but hopefully, from here out, it gets better. Oh and when I tested the last boot.img the numbers the radio was showing still didn't match the frequency the station is using.
[HTC One Max] Flyhalf205:
I am going to PM you a build in a little while. Everything is setup correctly of how it should be. Then I will send you a boot.img to try if the included boot.img in the rom doesn't work right.
[HTC One Max] wyvernwaddell:
Cool- I will pick them up in the morning (east coast time)...
[HTC One Max] wyvernwaddell:
The build you sent me works perfectly-the frequencies match the stations, too. I STILL haven't been able to get a log cat because I'm now out of town and away from my home comp, will get you one as soon as I can.

---------- Post added at 11:58 PM ---------- Previous post was at 11:57 PM ----------

Whatever you did, you sure did it right!

---------- Post added 26th September 2014 at 12:28 AM ---------- Previous post was 25th September 2014 at 11:58 PM ----------

Just checked, the stock FM app starts, but there's no sound, and it gives an error about not bring able to change the station. Spirit Radio works great.
[HTC One Max] Flyhalf205:
That's good. I may go ahead and merge then. Everything is setup up correctly just don't know why the error. Would like to hear back from gimmeitorilltell before I merge.
[HTC One Max] gimmeitorilltell:
I updated & grabbed all of your commits and it gives me the same errors as wyvernwaddell, no sound and can't scan channels. I'm gonna revert to try mine again with a few changes. I did grab a log and it didn't change much but it did break the radio functions. I still had the same errors with the QCOM PowerHAL too.
[HTC One Max] matthewtech770:
hay mr. fly did XDA redo there website looks different form other day. :laugh:
[HTC One Max] Flyhalf205:
There very bottom left of the page. You'll see a drop box list there where you can change the themes. I use the 2013 theme.
[HTC One Max] Flyhalf205:
Well that is something I didn't want to hear. We are missing something. The configs are right in the device tree now. But something we are missing. Maybe a lib which I doubt. The spriti FM app has to proprietary libs included which 1 of them we already have in CM. Other is a fm lib. You can check them out at http://flyhalf205.com/FM_Libs.zip

Looks like 1 m7 guy who knows less than I do about this is started working on his phone variant. Hoping we can help each other out.
[HTC One Max] gimmeitorilltell:
Yeah we are so close yet it seems so far away! Well I'm gonna keep at it until its working. I did grab another log so maybe it'll show something different? I have not looked at this yet, just now pulled it after reverting my commits and got the fm radio functioning properly except sound. I believe you should try my kernel commit if you'd like. It seems to be what's allowing my radio to function? Or try downloading to add it into your source?

t6 kernel with fm functions Here is my latest log if you can see anything I might be missing. http://pastebin.com/u8YXY7qg

So the m7 guy is working with the fm radio also? I assume it's for the sprint variant but I'm not sure if the m7 has the iris support or not. I'll search for that thread so maybe we can share ideas?

EDIT: I added that libmiker.so file with no change in sound but thanks for sharing that.

Not sure if I'm getting any closer but I have one more test build before I call it quits for the night. http://pastebin.com/H76hHXi5

I'll let you know how that one goes too.
[HTC One Max] Flyhalf205:
[MENTION=4779996]gimmeitorilltell[/MENTION]

Curious here. Where did you get the updated radio-iris driver? Going to let her have a try.
[HTC One Max] gimmeitorilltell:
I pulled the radio iris from the m8 msm8974 kernel source but I can't really find anything else useful in the m8 source as far as getting the sound to function. I did however find a pretty good read on the fm radio HERE! & believe it to be the right direction?
[HTC One Max] Flyhalf205:
That commit for the audio route is needed. I see you questioned yourself. PRI_TX basically equals NULL for our device. That was a over look i made when porting m7-common. I tried cleaning up the kernel commit. Also looked up code aurora and got this https://github.com/Flyhalf205/andro...mmit/e6daff7779bbcde7dab80d1195f92526e3197407
[HTC One Max] gimmeitorilltell:
Yes I did question that PRI_TX commit but found that it is definitely needed just a little while ago. I also added the code Aurora into my kernel source a few days ago. Another thing, when I edited the and_soc_xxx_file, I pushed it to my phone and tried to reboot but it never would boot. I tried this after editing that PRI_TX to FM_INTERNAL.
[HTC One Max] Flyhalf205:
[MENTION=2389104]wyvernwaddell[/MENTION]

Still running that build I made? Could you try this boot.img out? http://flyhalf205.com/kernels/t6/AOSP/boot.img

[MENTION=4779996]gimmeitorilltell[/MENTION] the boot.img above has the latest kernel commit and all the updated commits that I made in device. So we shall see what happens when she reports back. Fingers crossed.
[HTC One Max] Flyhalf205:
Thought you said you tested changing PRI_TX to FM_INTERNAL and made no change ?
[HTC One Max] gimmeitorilltell:
I did change it but either way it made no difference in my builds. I seen that it is definitely needed tho after reading the thread with spirit radio talk.

I grabbed a log after my latest changes and do not see any more alsa errors like before. http://pastebin.com/jjFBsJPQ & yet one more http://pastebin.com/XurLxyH5

Is anyone else getting any logs from the FM radio app? I'll share my builds if I can get a second tester/helper with sprint or the international variant?

My latest kernel commits & t6-common stuff. https://github.com/gimmeitorilltell...mmit/5661d178f86f332d2b4a8aabd42eb8529dff06e3 && https://github.com/gimmeitorilltell...mmit/da9c6ba96e7d1a2c63a0de150b0bf98a37e2af5b Something just doesn't look right in the t6-common commit but I'l have to look at that in a bit after my late supper.
[HTC One Max] Flyhalf205:
Your logcat is nasty full of other errors too. I don't know why your still getting the powerhal error. And how is your GPS? E/LocSvc_api_v02 errors i see

So I am sure you tried using audio through your headphones and speaker right?
[HTC One Max] gimmeitorilltell:
GPS is off by a quarter of a mile, maybe from dirty flashing,(shh) and yeah I've tried headphones & the device speakers, no go. The only thing I can hear is when I touch the device to change the channel or hit the mute button.

I'd really love to see more logs from other users. I'm sure we could get this ball rolling faster with enough feedback.
[HTC One Max] wyvernwaddell:
Tried this one-it didn't boot.
[HTC One Max] mohamadkg:
hi

no fingerprint for it rom ?

why?
[HTC One Max] gimmeitorilltell:
So my last log was full of errors after dirty flashing. Lol Well anyhow I'm getting closer "I think"? Sure would be great to see more logs from other users interested in FM radio but I guess folks are happy with just spirit fm working. My latest log looks like once we can figure out this AudioPolicyManagerALSA we should have it finished up! I'm open for suggestions where to possibly configure this audio file? I know that it's located in hardware/qcom/audio-caf source but the rest is beyond my knowledge so far. Maybe I should open a Q&A thread concerning this instead of congesting this thread, that is unless you would rather it be here Flyhalf205?

http://pastebin.com/c1k7h1P8
[HTC One Max] Flyhalf205:
Try http://flyhalf205.com/kernels/t6/AOSP/boot3.img with FM Radio stock app please

Someone must build a HAL for it and I have no knowledge of doing that kind of thing. Your welcome to.

You can keep it in this thread. We are trying to make CM better
[HTC One Max] gimmeitorilltell:
Thanks man! I'm thinking that the GPS errors are more from my recovery not wiping very well. Guess it's time I should look into that some more so we can get more accurate logs? The biggest thing I notice is my ringtone is ALWAYS the one I set, even after flashing a clean install of any rom. I wouldn't think that ringtones are stored in Google and reset after signing in. Never had them restore on any other device neither.