FM Radio

167 views
Skip to first unread message

ffxx68

unread,
Jul 17, 2014, 8:06:26 AM7/17/14
to renesas-...@googlegroups.com
Our device (at least the one I have...) has the BCM4329 WiFi/BT/FM chip properly connected to work as an FM radio too.

Issue is that there's no Android standard FM-handling APIs so any manufacturer which has an FM-radio app in their phone made up their customized kernel and application to handle BCM4329 and audio chips to enable FM radio.

Luckily, a good guy has made up an application that is as much generic as possible: "Spirit FM".

See also http://forum.xda-developers.com/showthread.php?t=1059296&page=809

But installing the app wasn't enough to make the FM radio work...

1 - Install the kernel image which I've just recompiled, which adds proper handling of audio routing from FM radio:

 download uImage4 from https://www.dropbox.com/s/hvlfu9qh28h5yu4/uImage4
 adb push arch/arm/boot/uImage4 /tmp/uImage4
 adb shell dd if=/tmp/uImage4 of=/dev/block/mmcblk0p2
 
1 - Need rooting of device. I used procedure as per "Rooting" thread
2 - Install Spirit FM app:
 
 download ul_140408.apk https://www.dropbox.com/s/lccxzpskxxtw80n/ul_140408.apk
 adb install ul_140408.apk

3 - Plug-in hearphones (they are used as FM antenna)
4 - Start Spirit FM app
5 - Settings -> Debug -> HCI Access = Bluedroid shim
6 - Settings -> Audio -> Method = Custom

By default, audio is sent to hearphones. It is possible to switch to "speakers", but that doesn't work out-of-the-box.
SpiritFM (version 1) has a way to exec custom scripts, to handle different manufacturer-specifc audio-routing commands.
Creating these scripts automates app handling of audio:

 adb shell echo "cd /data/data/com.mikersmicros.fm_unlock/files; ./ssd 4 3 9 10; ./ssd 4 2 11 6; ./ssd 4 2 7 2">/sdcard/sprt_hdst
 adb shell echo "cd /data/data/com.mikersmicros.fm_unlock/files; ./ssd 4 3 9 10; ./ssd 4 2 11 1; ./ssd 4 2 7 2">/sdcard/sprt_spkr
 adb shell echo "cd /data/data/com.mikersmicros.fm_unlock/files; ./ssd 4 2 7 32">/sdcard/sprt_mute

Enjoy your radio, even without WiFi!

Note as this is version 1, while version 2 is available on Google Play but not for free... and no customizable scripting is possible there.

I haven't included thje above in the ROM package yet - anyone willing to enhance the ROM, feel free to do it...

marshel

unread,
Jul 18, 2014, 11:03:24 AM7/18/14
to renesas-...@googlegroups.com
Great, will try it later.

Nice work BTW.
Reply all
Reply to author
Forward
0 new messages