yashsingh1/xdaforums huggingface dataset:
[Huawei Ideos X5 U8800] mikereidis:
I'm not positive, but I don't think libfm_wan_api.so is FM related. WAN is usually for Wide Area Network" (Internet really). There aren't enough strings in the library to understand it much, but I see no references to it in other libraries or binaries.

libfm_hal.so DOES seem to be for FM. There are references to it in libandroid_runtime.so and that lib has a bunch of FM code in it, including stuff from android_hardware_fm.cpp that implements "android.hardware.fm" etc.

libfm_hal.so also has few strings, but one piece of useful info is a reference to ro.config.fm_type . When I look at /build.prop for your "SystemDumpOfOfficial2.3Beta" I see:

ro.config.fm_type=libbcmfm_if

So I think the "SystemDumpOfOfficial2.3Beta" is configured for a Broadcom FM chip. Perhaps this is meant for u8800 pro ? I see lots of u8800 references, but also at least one "U8800Pro_2.3_AR".

I see no ro.config.fm_type in the /build.prop of the u9000 system dump Özgürce just uploaded. I also see no libfm_hal.so but the libfm_wan_api.so is there.
[Huawei Ideos X5 U8800] dancer_69:
I think that the broadcom related stuff is for U8800 pro mode which have this fm chip.

Seems that huawei uses the same kernel source for both models. Recently they released the kernel source for U8800(the one for pro model was released before), but as some users which compare them, reported the kernel is the same. Huawei seems that wanted to fool us, with just change the name.
[Huawei Ideos X5 U8800] mikereidis:
Using the same kernel is pretty normal for all companies. You reduce engineering costs with a tradeoff of using a bit more memory.
[Huawei Ideos X5 U8800] mikereidis:
Thanks ! What's strange about this dump is that there are 3 FM apps:

FM.apk

FMRadio_Home3.apk

FMRadio_Home3_hdpi.apk

The 1st is the Huawei app.

The 2nd and 3rd are "com.fihtdc.fmradio" and seem for different screen resolutions.

fihtdc seems to be the infamous FoxConn. Perhaps they built these phones.
[Huawei Ideos X5 U8800] mikereidis:
Here's a summary of my findings:

- The stock apps have dependencies that some ROMs may support and others don't (such as the ICS alpha). So although the stock apps may work on some ROMs it's not a general solution, which is what my app tries to be; ROM independent.

So I don't think I'll look much further at getting the stock apps to run right now, but if anyone wants to try I may be able to help a bit.

- It seems as if most of the issues with crashing or lagging are occurring on stock ROMs. I've made some minor fixes for a Feb 5 release that may help:

http://www.mediafire.com/file/v8oapnc9suajz5i/Spirit_FM_Radio_v120205.apk

This version does NOT need Debug->BC 20780 set.

It DOES still support the alternate SU method with "Use fm_hcitool" enabled.

If it crashes with SU AND Audio->Method qdsp5v2, or you want to experiment with audio, you can try setting Audio->Method to none. (Optional for testing, but prevents interference.) Then, select Menu->Test->Audio and select any of the last 4 options. Do an enable to start, then to switch, do a disable of the old and an enable of the new.

To test the ALSA volume controls, select Menu->Test->Volume. Then select any of the "fmradio_headset" or "fm_radio_speaker" selections by scrolling down.
[Huawei Ideos X5 U8800] axistr:
I've just tried the Feb 5 release. First start I enabled the su access, then it was crashed.

Here is the logs --> http://pastebin.com/qZ49yzRM

At that time whenever I opened the app, it was crashed. So I removed the su access, and enable use_fm_hcitool. Gave a su acces and started app again. I got sound but again one side has a lower volume. Speaker works. Tried Test->Volume options, nothing changed still I got highest volume.

I changed the Volume ctrl system to Huawei. I don't know it caused the problem but app was crashed again after a while.

Here is the logs --> http://pastebin.com/VxqsPzNq

After that cleared the options and started the app again. Set Audio->Method to none. I've got an audio with Test-Audio options. Now both side has the same volume. I also can switch to speaker from there. With Test-Volume options there is no difference.

I'm on the .35 CM7 02 Feb.
[Huawei Ideos X5 U8800] axistr:
OK, after closing the app I got a call. No ring tone, just vibrate. Speakers weren't working both in call and audio. So I couldn't make a conversation. After reboot it has been restored.

I see some other people also experienced this.
[Huawei Ideos X5 U8800] alex1301:
OMG!!! It's working!!!!!!

Audio

Method: qdsp5v2

Volume Ctrl Stream: 7 Huawei FM

Debug

Use fm_hcitool (before you enable it don't allow su acces for Spirit Fm and after that allow su acces)

Test>Volume>fmradio_headset_rx 20

Test>Audio>qdsp5v2 headset enable

it's working but when i restart the it's crashing
[Huawei Ideos X5 U8800] mikereidis:
I don't see any evidence of crashing in either log.

But it seems pretty clear the "SU method" needs to change. I will make the working method the default if it seems to work OK on my other devices, but I have a recollection that it didn't work on some, and this method seemed pretty stable in most devices for the last 8+ months.

BTW, my default "SU method" is a bit different to avoid a problem where permissions has to be given for each of the 10-20+ commands used in my app. Some SuperUser.apk implementations authorize by command and not by app.

Volume Control Stream likely won't make any difference on non-stock ROMs, and so far I'm not sure there's a difference on stock ROMs either. In theory, on stock ROMs, it should just make volume control magically work, without any additional code needed in my app.

If setting Audio->Method to qdsp5v2 allows audio to work after closing my app, then that's what to do. On this device setting Audio->Method to none is just for testing.

One impact could be that if my app crashes, audio may not be restored to normal, and thus would require restarting and the stopping my app.

With qdsp5v2, I'm interested to know if the FM mutesAudio->Method properly, when a phone call comes in (or is initiated). It should also unmute when a call is finished.

Thanks !
[Huawei Ideos X5 U8800] mikereidis:
Which ROM ? I see you post in several ROM threads. :)

Can you see if the default Volume Ctrl Stream: 3 - Music helps anything ?

If you are using qdsp5v2 audio method, you shouldn't have to do "Test>Audio>qdsp5v2 headset enable". Does audio not work otherwise ?

Does trying different "Test>Volume>fmradio_headset_rx" settings change volume on one or both channels ?

Hypothetically, a crash at next start might be avoided if you do both audio disables before power off: "Test>Audio>qdsp5v2 headset disable" and "Test>Audio>qdsp5v2 speaker disable"

If you can, it would be great if I could get a log of the crash. If restart always crashes, perhaps turning off SU for the app would allow a restart, which would allow Menu->Help->EM Logs.

Thanks !
[Huawei Ideos X5 U8800] axistr:
Actually I mean with crashing, phone went to reboot when I tried to close the app at that time.

I've tried again now with qdsp5v2 method. This time I got sound from both sides without use_fm_hcitool. But sometimes if I push pause and play I only got from one side. If I do it again I get sound from both sides.

I tried to make a call when radio active audio is muted but again I couldn't hear in call sound. When the call finished radio started to play again. It seems mute function is working. However the app still disables the audio. If I open the app again audio works for the radio. Needed to reboot to restore the audio.

Btw, Test>Volume>fmradio_headset_rx settings doesn't make any difference for me. Only rx_0 mutes the audio.
[Huawei Ideos X5 U8800] mikereidis:
So:

1 - Reboot phone

2 - Start Spirit

3 - Stop Spirit

4 - Start Spirit

5 - Stop Spirit

So it reboots after step 5 ? Or between which steps ? (Programmers and computers both need 100% clear and unambiguous instructions or information, LOL.)

Once my app has been run once with SU, it likely won't really need SU again until reboot. You could likely even run my app without SU at all if you run the following commands first:

chmod 666 /dev/radio0

chmod 666 /dev/msm_audio_dev_ctrl

This, or just disabling SU after the first start, might help prevent any crashes.

Great observations, thanks ! Every clue can be useful. If the problem gets worse when you press pause/play (aka mute/unmute) quickly, or goes away when you leave 10 seconds after a switch before switching back, then something in the ROM may have a shutdown timing issue.

OK, so everything is working except for one very big problem: Once Spirit has been run, all other forms of audio won't work until a reboot. But if Spirit is started again (and doesn't crash), then FM can still work.

So it's as if the audio gets stuck in an FM mode and can't return to normal mode. I think that if someone were to run "killall mediaserver", the audio might work again without rebooting. It's certainly not a preferred method, but if it works it could be a short term solution.

Hmmm. so "fmradio_headset_rx 20" and "fmradio_headset_rx 5" do nothing, but "fmradio_headset_rx 0" mutes the audio... Then does "fmradio_headset_rx 5" restore the audio ?

Seems strange....
[Huawei Ideos X5 U8800] alex1301:
I am running cm7 120201 fixed . 35 no other volume ctrl is working. When i disable headphone and speaker before i close the app i can restart the app several times. No volume control in test only zero or 10. When i disable su the app starts with sound and crashes. I can't get em logs without su.
[Huawei Ideos X5 U8800] dancer_69:
About audio, killall mediaserver doesn' t restore audio, after spirit FM closes.
[Huawei Ideos X5 U8800] freeko2:
You have to reboot to restore phone mode but there is improvement
[Huawei Ideos X5 U8800] mikereidis:
Thanks...

Without SU the app starts with audio then crashes ? That's a new symptom. Please let me know if that happens with this new version:

Here's Feb 6: http://www.mediafire.com/file/1003o9171yolu16/Spirit_FM_Radio_v120206.apk

It's best to completely remove any previous version of the free app.

It should work with startup defaults. The default "CyanogenMod" Audio Method should work for headset only. It might be more stable than qdsp5v2. With this default method, the speaker/headset and pause/play buttons likely won't work. Go ahead and try them out though.

The alternate SU method still works, but a new default method will hopefully work much better, so there should be no need to set Use fm_hcitool.

Logging should work better, especially when not rooted.

I enabled the seek function in the Feb 5 & 6 releases: The buttons to left and right of frequency button. Let me know if it works.
[Huawei Ideos X5 U8800] axistr:
If I remember correctly it was rebooted at step 3 at that time. But before rebooting I had listened from background for a while when I did back to app it rebooted.

Yes, FM can still work if the app started again.

Will try it with the new version.

Yes, the other options restore the audio with the same volume.

Thanks for all your effort. I'm going to try the new version.:)
[Huawei Ideos X5 U8800] dancer_69:
Just now I tried 6feb version on Miui Elite rom with 2.6.32 kernel.

I haven' t any crash problem(until now), cyanogen method works(I didn' t change anything, just used defaults), I have stereo sound and sound works after I close the app.

Seek buttons don't work. At first audio mutes, and after some seconds return to the frequncy was before. Also the manual frequency buttons seems to respond slower.

than previous versions.

And about volume, no change still. Is always on same level.
[Huawei Ideos X5 U8800] axistr:
I've also tried the Feb6 version. I haven't changed any setting. Just gave su access. No crash. Everything same as @dancer_69 except after first close of the app, audio was gone again. Killall mediaserver command restored the audio. After that, I've tried open/close the app several times, audio worked normally.

Manual freq buttons respond slower after pressing seek buttons but they go normal after pressing them again 2-3 times.
[Huawei Ideos X5 U8800] qwerty12:
Hi,

I just bought the app (my purchase will show up as being bought for a "HTC Desire"). Regardless of whether it works or not on the U8800Pro, I thank you for all the time you're putting into this thread.

Best regards,

qwerty12
[Huawei Ideos X5 U8800] alex1301:
It's working. It's perfect, when you get volume controll to work. Do you need a em log.
[Huawei Ideos X5 U8800] genti7:
i agree its perfect if only volume control is fixed
[Huawei Ideos X5 U8800] mikereidis:
Hi, thanks for mentioning it, I can better gauge interest knowing. I can email the latest Unlocked, but for testing the free version should be fine.

I'll leave it to you and others to decide if a new thread should be started for u8800 pro, or discussion can be moved to my thread. The FM seems different, but the audio/volume issues might be shared.

Please send me a log with the latest version using Menu->Help->EM Logs and after a few seconds. enter "u8800 pro" in the email text and press send.

I see you sent a log on Dec 8. At that time I guess you were running a stock Chinese ROM, but your sig now indicates "genokolar's U8860 2.3.6 (B866) (mostly stock; modified)" ?

That log showed there was a /dev/radio0 device, the same as the u8800/u9000, but I think it's built into a common kernel for the Huawei devices and probably won't work. The log also shows an entry for "bcm-fm" related to /system/etc/bluetooth/init.bcm.chip_off.sh .

I should look at the stock FM app. Perhaps it's in that ROM ?

But I think we have two possible routes to success now: (1) in the original UART mode (if Bluetooth is off and we have root), and (2) the new Broadcom proprietary support.

For (2), in the recent test releases, we should be seeing success right at initial startup with "BC Proprietary" showing. But there may be some special Huawei requirement I'm missing. If it doesn't work with Bluetooth off, try Bluetooth on or vice versa.

For (1), enable Debug->BC 20780 and set Debug->FM Chip to Broadcom. Then restart the app, or better yet, restart the phone. The former is needed for recent Broadcom chips, and your Dec 8 log indicated you may have one.

"Broadcom" is needed because the app will ignore Broadcom and try to use /dev/radio0 if it exists, despite that it doesn't work.

Unless there is something really weird about the u8800 pro I feel reasonably confident we should be able to get it working. Most phones with FM use Broadcom FM so I have lots of experience with their chips.
[Huawei Ideos X5 U8800] Ozgurce:
There is something wrong with su access for emails. Even I include the em logs, its not sent it to you. It just send a email doesn't include the file. I must everytime copy the file manually. Is it spirit fm problem ?
[Huawei Ideos X5 U8800] mikereidis:
Great ! So we know now that, on your CM ROM at least, mediaserver gets somehow stuck and killing it and letting it restart fixes that.

Were you using qdsp5v2 ? With Miui Elite, dancer_69 seemed to have OK audio after stopping FM, and I presume he was using the default CyanogenMod. For Tavarua w/ CyanogenMod audio method, I made that very simple, at startup it does an FM headset enable, and at shutdown it disables FM headset and speaker.

Using qdsp5v2 results in rapid on/off switching in some places, such as at startup, and that could cause the audio problems we've seen. "Half-baked" software often does that, when trying to start something that hasn't finished stopping completely, or vice-versa.

It would be useful to know if this pattern repeated after a reboot. IE. first start is OK, but first stop kills normal audio, then subsequent starts and stops are OK.

So seek is half working I guess. If audio goes off then returns I'd presume the seek is finished. Manually setting frequency after the seek stops shouldn't cause a lag, but I guess it does until a certain time interval passes, or until you hit the buttons enough times... I'll see if there is an RSSI control I need to set for seeks.
[Huawei Ideos X5 U8800] mikereidis:
My answer is almost always yes for logs. If it's a new release or you see a new issue, then yes, please send the logs.
[Huawei Ideos X5 U8800] mikereidis:
Yes, it's probably a problem with my app. I've been fighting this problem since the logs feature was added and still don't know why. And yet it seems OK with all my 4 phones, with different ROMs, including stock derived.

It might possibly be related to the size of a file. IE. email apps might have a 1 megabyte limit or so. I'd REALLY like to get this fixed asap; I think half of all log emails I get have no attachment.

If you have this problem, it would be useful to know if you can successfully email the log as an attachment using the same email program. The file path for the free release should be /data/data/com.mikersmicros.fm_unlock/cache and the file of interest is sprt_debug.txt . It's the biggest file and the result of combining the other files you may see there.

It's quite possible the email program will refuse to attach a file in the "cache" directory of another app. I set the permissions wide open, but the email client may only attach files on the SDCard for example. Previously I just wrote those files to the SDCard, but that had plenty of "no attachment" problems too, so decided to switch to the app cache directory.

This release I FINALLY figured out why non-rooted devices couldn't capture a logcat. One simple permission was needed. Such a small simple thing in retrospect, but it took me half a year to figure out... (Partly because most non-rooted devices didn't work until recently, so I wasn't too concerned.)
[Huawei Ideos X5 U8800] Ozgurce:
Problem is not file size. I test it now and log file about 530~ KB and i ca't attach from /data/... but If I copy it in sdcard I can copy it.

Isn't another way to you can copy sprt_debug.txt to sdcard when trying to send logs?
[Huawei Ideos X5 U8800] mikereidis:
Yes, I added that to the code last night after I saw log messages from GMail about this. The generic EMail didn't have this problem.

The email program will need the permissions set for SDCard access, but I find it hard to imagine an email app that supported attachments wouldn't have such a permission. Where else would attachments be stored ?

This will effectively put things much the way they were before; the change was an attempt at a fix. So I'm pretty sure some devices will still have problems for still undetermined reasons.

The other approach would put the log in the email text, but 1 megabyte may be way too much for the email body.
[Huawei Ideos X5 U8800] axistr:
@mikereidis, I think I figured out the audio problem after some tests. :)

First of all, with the default Cyanogenmod, when radio is playing in the background, if you do something related audio such as pressing volume+/- button, playing games, calling someone etc. other than the radio, the mediaserver and audio will stuck. At that time radio works if you open the app again after closing. Only reboot or "killall mediaserver" can restore the audio. If you don't do anything with audio and close the radio after listening audio won't stuck. Also, if a call come when the radio playing, the radio keep going to play with this method.

I've also tried with qdsp5v2 method. If I gave su access to app at first time, I can't change to qdsp5v2 phone goes to reboot in settings screen. Then, I cleared the cache and the su access. Started the app again without su and I could change to the qdsp5v2. Btw, without su, the app didn't give any sound. Then, I gave the su access at the next start. As before, speaker and play/pause buttons work with this method. Also, this method pause the audio when a call comes but again audio will stuck if you do something related with audio same as the default method. Again, If you go back to app, radio works.

If other friends confirm this problem, it will be good. I hope these informations can help you.
[Huawei Ideos X5 U8800] mikereidis:
Feb 8: http://www.mediafire.com/file/eb1s5tg8d4ecyl1/Spirit_FM_Radio_v120208.apk

- Ability to create and attach debug logs should be much improved, especially without SU.

If you enable Debug->Extra Logs and have SU, the Android bugreport utility output will be included. It might include phone numbers or IMEIs or similar info. It also takes around 20 seconds on one of my phones before the app will respond again.

- If you enable Debug->BC 20780 the app should kill the mediaserver when exiting. It's a hack but hopefully it restores other audio.

- Seek might be improved.

- Menu->Test->Volume provides some new test options: 3 for qdsp5v2 and 3 for setFmVolume. Neither are dependent on Audio Method. The first sends a hopefully usable fm volume set command, and the last tries to call a similar function from Java and may be more likely to work with stock ROMs (and might crash otherwise).

The qdsp5v2 volume method requires open permissions on /dev/msm_audio_dev_ctrl so SU must have been used at least once since startup, or you can run "chmod 666 /dev/msm_audio_dev_ctrl".

- If you are feeling courageous, you can try Menu->Test->Record. While the FM is playing, start with "Start 7", wait 5 seconds, then hit "stop". Repeat this with "start 8" and "start 9". Lower numbers down to 4 might work, but at some point you will be recording the microphone.

Files are in "*.3gpp" format on the /sdcard/ and start with "FMRecording". This is another area which might crash.
[Huawei Ideos X5 U8800] mikereidis:
That's great info ! :)

Yes, I've seen at least one log showing audio was stuck and sounds couldn't get through. Some ROMs click or beep when pressing buttons, and that's enough to get it stuck. And notifications or attempts at a ringtone are all the same.

With Feb 8, "killall mediaserver" should be done at shutdown, if you enable Debug->BC 20780. A hopeful workaround for now.

Changing audio method switches the audio back and forth between speaker and headset to help people test if the audio method will work for them. I think this is too fast for the digital audio controls.

In order for qdsp5v2 to work, permissions need to be opened on /dev/msm_audio_dev_ctrl, either automatically with SU or manually with "chmod 666 /dev/msm_audio_dev_ctrl". Once the permissions are open, they stay open until reboot. This should explain your observations.

I'd like to think we can find a more stable method to get audio. Analog audio would be great for this, but the driver code I've seen always uses digital.

I will likely/hopefully be able achieve this on stock ROMs, using the stock methods. I don't know if that will work on other ROMs, unless they have sufficient stock library code. Methods like qdsp5v2 are useful on ROMs which don't support FM audio routing, but often have problems since the ROM libraries are not aware that FM audio is running and that can create conflict.
[Huawei Ideos X5 U8800] genti7:
as soon as you set qdsp5v2 audio method the phone freezes (oxygen stock kernel)
[Huawei Ideos X5 U8800] axistr:
I've installed the Feb8 version just now.

Seek is working good now. As you said Debug->BC 20780 kills the mediaserver after close so if the audio was stuck, then goes to normal. I couldn't test Menu->Test->Volume because on the volume test screen the app crashes. Here are the logs -->

http://pastebin.com/Y9MbxWQ4 - Cyanogen

http://pastebin.com/ZwcBaDnt - qdsp5v2

With su, "chmod 666 dev/msm_audio_dev_ctrl" or use_fm_hcitool I couldn't back to qdsp5v2, every time phone goes to reboot on settings screen. I managed to change again with removing su access. Same as Cyanogenmod except pause/play and speaker works.

For the "record" mod, method 7, 6, and 5 recorded something. 8 and 9 didn't record anything but I haven't experienced any crash with records.
[Huawei Ideos X5 U8800] alex1301:
fc when i am in the debug volume settings
[Huawei Ideos X5 U8800] Tcm9669:
Feb6 version: Worked, but only static (Stock ROM B136 AND Oxygen latest version)

Feb8 version: FC all the time (Oxygen latest version)

EDIT: Downgraded to Feb6, same story :/