[CLOSED] Cyanogenmod, Legend, FM Radio & MONEY [MODS PLEASE CLOSE THREAD]

Status
Not open for further replies.
Search This thread

qzem

Senior Member
Jun 23, 2010
1,594
1,030
This is what I have found in datasheets about Bluetooth and FM radio, if it is any help.

Bluetooth and FM Operation Power Modes
The following Bluetooth and FM operation power modes are available:
• Shutdown mode: This mode is similar to WLAN Shutdown mode.
- Lowest power-consumption state of the device.
- Entered by driving BT_EN low (can alternately be left floating).
- Used when BT and FM functionalities are not required.
- The entire device, including the internal Power Management (PM), is switched off (only power-rails leakage path). There is no retention capability (to keep the memory voltage high enough to function).
- Power-up and full initialization is required in order to exit.
- Supplies (DC2DC and VIO) are not needed, but can be applied. Digital IOs are only defined if VIO is applied.
- Clocks (SCLK and FREF) are not required, but can be applied (as failsafe inputs).
• Bluetooth Deep Sleep mode:
- Low-power state of the device.
- Entered through a deep-sleep protocol with the host (HCILL).
- Used when FM-only functionality is needed or when BTH is in low-power mode (for example, scan/sniff intervals).
- Only the 32KHz portion of the device is active. The FREF cell is off. A fast clock is not required, but can be applied.
- Core (VDD) voltage is reduced to 0.9 V. The memories array (VDDAR) voltage is reduced to 1.05 V.
- All other PM modules are switched off, except for the KA LDOs and the DIGBGAP modules, which are in on/hibernate mode.
- Digital logic and memories are kept in a retention state, with no need for re-initialization.
• Bluetooth IP Active modes:
- Standby: When the ARM and all other peripherals are active, but the device is not transmitting or receiving. BT-IP (DRPb) PM is off.
- Idle (Big Sleep): The same as above, but the Advanced RISC Microprocessor (ARM) is idle
(clock is gated).
- Transmit mode: When BTH is transmitting. BT (DRPb) PM is entirely on.
- Receive mode: When BTH is receiving. BT (DRPb) PM is entirely on, except for CL1P5 LDO.
• FM IP Active modes:
- FM IP OFF/Reset: When Bluetooth is used and FM is not required (BT_EN=H).
- FM TX: When FM is transmitting. FM (AFE) PM is entirely on.
- FM RX: When FM is receiving. FM (AFE) PM is entirely on.


Tommorow I will dive into btipsd and see if I can find anything usefull.
 

ali ba

Retired Recognized Developer
May 30, 2010
576
258
Vienna
derhofbauer.at
By "The wl1273 driver in the Linux kernel" do you mean the TI provided W1273 driver in the CM7 ROM ?
Nope.


I had thought that driver was for WiFi only, or perhaps WiFi + Bluethooth. Or does my seeing an rfkill device mean FM radio is in there too ? Would it create a /dev/radio device ?
sdio.ko will enable you to use bluetooth and send serial commands to the FM part of the chip. You won't get /dev/radio because you will need to control FM via bluetooth.


There are some FM init BTS files that may enable FM.
They are loaded by btipsd as soon as you enable FM radio.


My understanding is that the WL1273 WiFi driver in the mainline Linux kernel (not the Android kernel) is WiFi only.
There's support for ti1273 radio in Linux (CONFIG_RADIO_WL1273, 2.7.37) but it's I2C only.


RevEng has been a specialty of mine, so I think if it can be done, I have a good chance.
Hell yeah, then you are the man!


Quickest route to a working FM radio on Legend is to find an existing app for another phone that works.
All the real work is done in the framework (C, C++), the app is not responsible for controlling the hardware.


But TI also has a driver, and it's meant for Android.
That one doesn't compile on msm7k, it's for the OMAP platform. We never got it to compile, because it needs headers that HTC deliberately removed from their kernel sources. They are not released as GPL, so that's even legal.
 

qzem

Senior Member
Jun 23, 2010
1,594
1,030
Ok what I did is I've opened btipsd in Ms Visual Studio first, and I found a lot of commands I've copied the ones that were obviously reffering to fm radio. They are in the attachment called FMRADIO. Then I've tried to examine btipsd with aplication RecStudio, which could be, as I found out, used for reverse engeneering. This aplication, gave me a view into Procedures, Symbols, Prototypes and Sections. I didn't realy know what should I search for, so I've tried with procedures and the one that I thought could be important is called BTL_BMG_RadioOffProcessorCb. I've also attached it. There are also a lot of symbols reffering to fm radio such as FM_RX_SM_CompareCmdTypes, etc. But unfortunatly I really don't know what I need to find, so someone else could try with mentioned tool, or some other tool and see if he could find anything usefull.
 

Attachments

  • FMRADIO.txt
    2.6 KB · Views: 48
  • BTL_BMG_RadioOffProcessorCB.txt
    16.8 KB · Views: 21

mikereidis

Inactive Recognized Developer
Jan 28, 2011
7,823
4,146
Ottawa/Gatineau, Canada
Ok what I did is I've opened btipsd in Ms Visual Studio first

Thanks qzem.

I think I'm darn close to getting FM audio out of this phone now.

I've found enough HCI commands to convince me the FM radio is working now. My only problem now, for a proof of concept, is somehow routing the audio out through the speaker or earphones. I might take a "break" however and see if the transmitter works... LOL. ;)

My apparent proof is that I tune to an unused frequency (for static AKA the big bang energy) and the RSSI goes up when I pull the earphones/antenna higher. I drop the antenna it goes lower. I remove the headphones it goes to around 0 or some negative numbers FFFF, FFFE etc.

It does almost the same when I tune to a local FM station, except the RSSI doesn't move much from low antenna to high antenna, but does drop when I remove the antenna.

So, I'm reasonably sure I just gotta route the audio somehow.

----------------------------
EDIT: Hmmm, maybe the earphones don't connect analog to the FM chip. Perhaps they are digital only as far as software and constants are concerned. That's how they get "normal" output... I bet...

Do I need an app to write the PCM (or whatever) data stream from the chip/I2S to the speakers or earphones ? Codec ? I'm using the default mode of 2 channel stereo w/ 16 bits per sample and 48 Khz sampling.
----------------------------


I won't explain the below, but for anyone interested who might want to experiment:

# FM_POWER_MODE: FM Core power up (0=down)
adb shell hcitool cmd 0x3f 0x137 0x01 0x01

# FM_WRITE: POWER_SET: POWER_SET_FM (|POWER_SET_RDS=3) , need twice ? error 3 first time
adb shell hcitool cmd 0x3f 0x135 0x20 0x02 0x00 0x00 0x01
sleep 10
adb shell hcitool cmd 0x3f 0x135 0x20 0x02 0x00 0x00 0x01

# FM_WRITE: AUDIO_ENABLE: AUDIO_ENABLE_ANALOG
adb shell hcitool cmd 0x3f 0x135 0x1d 0x02 0x00 0x00 0x02

# FM_WRITE: I2S_MODE_CONFIG_SET: AUDIO_ANALOG
adb shell hcitool cmd 0x3f 0x135 0x1f 0x02 0x00 0x00 0x01

# FM_READ: VOLUME
adb shell hcitool cmd 0x3f 0x133 0x1C 0x02 0x00

# FM_WRITE: VOLUME = maximum
adb shell hcitool cmd 0x3f 0x135 0x1C 0x02 0x00 0xff 0xff

# FM_WRITE: TUNER_MODE_SET, TUNER_MODE_STOP_SEARCH
adb shell hcitool cmd 0x3f 0x135 0x2d 0x02 0x00 0x00 0x00

# FM_WRITE: TUNER_MODE_SET, TUNER_MODE_PRESET
adb shell hcitool cmd 0x3f 0x135 0x2d 0x02 0x00 0x00 0x01

# FM_WRITE: BAND_SET, OTHER=0 : JAPAN=1
adb shell hcitool cmd 0x3f 0x135 0x10 0x02 0x00 0x00 0x00

# FM_WRITE: FREQ_SET, 88.5 MHZ : 20 steps up from 87.5 #0-410 for 87.5-108 MHZ (other=not japan), 50 khz steps
# 76-108, 76-90 japan, 87.5-108 other
adb shell hcitool cmd 0x3f 0x135 0x0a 0x02 0x00 0x00 0x14

# FM_READ: FREQ set doesn't stick ?
adb shell hcitool cmd 0x3f 0x133 0x0a 0x02 0x00

# FM_READ: RSSI getting FFFF now, sometimes fffe ? Static ?
adb shell hcitool cmd 0x3f 0x133 0x01 0x02 0x00


# WL1273_MOST_MODE_SET, WL1273_RX_MONO = 1/ WL1273_RX_STEREO = 0 (Reversed for Tx ???)
adb shell hcitool cmd 0x3f 0x135 0x0c 0x02 0x00 0x00 0x00
 
Last edited:
  • Like
Reactions: Epsylon3

qzem

Senior Member
Jun 23, 2010
1,594
1,030
Do I need an app to write the PCM (or whatever) data stream from the chip/I2S to the speakers or earphones ? Codec ? I'm using the default mode of 2 channel stereo w/ 16 bits per sample and 48 Khz sampling.

Hm when you mentioned codec, I've remebered that I did come across one, when searching the net for TI WL1273 information. You can finde source code here. Maybe it will give you some ideas :).
 
Last edited:

mikereidis

Inactive Recognized Developer
Jan 28, 2011
7,823
4,146
Ottawa/Gatineau, Canada
On a tip from pisaro I found a new trick in the puzzle of solving the audio routing problem:

adb shell 'echo "fm_headset" > /sys/class/htc_accessory/fm/flag'

Also "fm_speaker" works.

But no audio output yet. :( But I'm almost positive this will be solved.

Based on pisaro's comments, it seems the above is for an analog interface. It's for the HTC Tattoo but I'm guessing it would also work on the Legend

The command:
adb shell cat /sys/class/switch/h2w/state
nicely shows when the earphones are connected and also shows when fm_headset or fm_speaker are set.


As for Tx, no joy yet there either. I was hoping to detect a carrier, but nothing even within a few inches.
 

qzem

Senior Member
Jun 23, 2010
1,594
1,030
Hey mike, here is the file you've been looking for (I've seen your post on tatoo forum) called FMInit_300. Ohw btw I've found out that Pulse mini has the same hardware as legend, and also FM radio, so maybe you can get something from their forum too.
 

Attachments

  • FMInit_300.rar
    8 KB · Views: 32

ali ba

Retired Recognized Developer
May 30, 2010
576
258
Vienna
derhofbauer.at
Hey mike, here is the file you've been looking for (I've seen your post on tatoo forum) called FMInit_300.

All firmware files you could possibly need are in /system/etc/firmware.

To better know what's going on take a look at the original init.legend.rc:
Code:
service btips /system/bin/btipsd --logfile /data/btips/btips_log.txt -no_android_log
    socket bluetooth stream 660 bluetooth bluetooth
    socket dbus_bluetooth stream 660 bluetooth bluetooth
    group bluetooth net_bt_admin misc
    disabled # the MCP monitor service is responsible for bringing up the daemon
    oneshot


Note the debug output being directed to "/data/btips/btips_log.txt". Removing "-no_android_log" could help getting more debug output.

Of course you can manually start btipsd and check the logs to see which firmware it loads. It's spitting out quite a lot of debug info.
 
Last edited:

mikereidis

Inactive Recognized Developer
Jan 28, 2011
7,823
4,146
Ottawa/Gatineau, Canada
@mikereidis

Hey man, I hope you didn't give up already:rolleyes:!

:) Absolutely not ! Just may not post much when deep in "the machine".

I KNOW this will work when the audio routing mystery is solved, so I've gone ahead and started on a radio app. It's minimal at present but it:

- controls power on or off
- changes and displays volume
- changes and displays frequency
- scans up or down
- shows RSSI (signal level) as expected when a station is tuned in and the antenna is moved

Sooner or later the audio routing will be solved, and I hope to have an app ready to go at that time. At present it requires a few kluges that require root access. The app development is giving me a nice break from racking my brains over audio routing.


A few days ago I started a "monster" thread in the general Android development section documenting what I've learned about the TI FM Radio and asking for some technical assistance.

So far not a single response to my 10 monster posts of technical info. But that's OK cause I'd prefer to clean up some of that before the thread gets too much notice. And please note, developer type posts only on that thread. I've seen several other threads for different devices using the TI FM Radio, so I think a cross-device thread is appropriate for devs to share info.

And yes, I want my app to be usable on many other devices, whether they use a compatible TI chip, or the even more popular broadcom line.

So far I haven't tried reverse engineering using one of the stock ROMs mostly because I have just the one phone and it's really handy to keep it in operating condition. I'm mostly been "forward engineering" searching for datasheets and assembling all the info I can find from various internet sources. But I also examine binaries on my CM7 ROM and those I can find on the internet.


I also need to get some bluetooth devices. Some of the TI code indicates the FM radio may be capable of internally transferring audio to and from (for Tx!) bluetooth from and to the radio. So the audio data might never leave the chip, meaning that just standard chip commands might be able to do the routing.


I'm putting over 12 hours per day, 7 days per week into this project. I hope to find a way to make at least a meager income from this over the next 3-6 months, so I can continue. Suggestions on that front are welcome, but I think it'd be via sales in the Android app marketplace(s).

I DO feel I see massive benefits in making apps open source. It's one way I think the lone developer can stand a chance in a marketplace full of larger entities than a single person. Biggest question with open source, though, is how to make money.

But I guess even with open source, one can still place a non-free App in the marketplace, and people might pay and download either because: (a) they want to support the project, (b) they want ad-free or (c) enhanced versions or (d) latest updates or (e) support or (f) they might not even know an APK is downloadable somewhere..


Currently, the GUI of the app is built with Android App Inventor, a somewhat Visual Basic like visual development tool. Unfortunately AppInv has serious limitations at present, but so far I've managed to work around them with scripts and an extender. If the AppInv "Source" (really, a diagram, LOL) was made open I think it could be interesting to see what other people make from it. I could supply the scripts/API, documentation, investigation, support, etc.

So, so far I REALLY like the easy GUI design and end-user (non dev) modifiability of App Inventor. But so far there are very few paid apps out there built with AppInv.
 
Last edited:

qzem

Senior Member
Jun 23, 2010
1,594
1,030
@mikereidis

Me again :D

XDA user eldis have started a thread in Motorola Dorid section about FM radio on this device a year ago. Here is the link. He posted, some links for Ti conectivity drivers and also link to TI's own FM radio test aplication. But as I can read all the stuff reffers to OMAP platform, so I don't know how usefull can this be. I just thought, that maybe you should check out.
 

mikereidis

Inactive Recognized Developer
Jan 28, 2011
7,823
4,146
Ottawa/Gatineau, Canada
@mikereidis

Me again :D

XDA user eldis have started a thread in Motorola Dorid section about FM radio on this device a year ago. Here is the link. He posted, some links for Ti conectivity drivers and also link to TI's own FM radio test aplication. But as I can read all the stuff reffers to OMAP platform, so I don't know how usefull can this be. I just thought, that maybe you should check out.

Thanks qzem, but FYI, I think I've already read just about every FM and BT thread on devices with the TI chips by now, on XDA and elsewhere. (Well every useful one anyway.) Also several threads on devices with Broadcom chips, since those may offer clues to HTC and other manufacturers audio routing. Any device with a 7227 or similar chip may be similar in audio issues. That includes lots of newish budget and mid-range devices including the LG Chic (and LG Optimus One) I tried a few weeks ago.

I've managed to download the latest TI code for their testing utility "fmradio", and other stuff, so I'm not wanting for code right now. I just need to take the time to pore through it and experiment.

My "pre-alpha" level App Inventor app is working nicely now, so I'm ready to move back to solving the audio routing issues. Since the HTC Legend stock FM app works, (it has one right ? I never tried or even looked hard before rooting and CMing), we know the hardware works. And I'm absolutely positive that sooner or later, either I or someone else will solve the routing issue.

Perhaps within the next week or so I'll have an app ready for anyone who wants to test (Audio or no). As is, it might even output sound on some devices.


As for the Motorola Droid (original aka Droid 1), that's the one that after so much work by some people, it was found that the FM antenna connection went nowhere. The connection point was under an RF shield so would require impractical major surgery to connect. The threads I've read indicate much despair when this was discovered. :(

We Legend owners will not suffer such a fate given that the stock ROM supports the radio fine. (Right?) I'm still not sure yet if the Legend has a decent Tx connection for the transmitter. If not, the Tx may only have a few inches range (which will work for some people), or even none at all.
 
Last edited:

karl_k

Member
Sep 7, 2010
49
3
Hi mikereidis !

Its great that someone has started working on the FM radio for our Legends, i did not dare hope for it anymore.

I see you are making progress and that you want to make some money from your work. I would like to give my 50c to that:

I am supporting several open source projects, not because i have to, but because i want to. I appreciate when people do work that solves problems for everyone, not just their customers. This is why i donate to libreoffice, debian and some CM deveopers. I refuse to buy closed source software that solves a problem only for me.

To make things short, i would really appreciate if you make all your basic work open source, ideally by adding your low-level code to CM so that every radio app can use the hooks. If you then also offer a good radio app on the market i would buy it, or donate to you in any other way. However, i hope you understand that if your app is the only app that is then able to do FM radio on the Legend, and you are not opening the low-level workings for others i would rather do without the FM radio.

You are doing magnificent work, open it for the world to see !
For eternal fame ! :)

I would also suggest you create a donate button here on the forum.
I would donate 10€ immediately.

No offence meant, just my opinion.
Cheers,
Karl
 
  • Like
Reactions: mikereidis

mikereidis

Inactive Recognized Developer
Jan 28, 2011
7,823
4,146
Ottawa/Gatineau, Canada
Just to confirm FM Radio was working fine with the connected earphones. Wired Earphones are needed because the act as antenna.

Thanks ojessie. I presume that FM radio audio can be sent to speaker via a selection, even though the wired phones are installed.

Anyone know the connections/pinout of the earphone jack and switches? Is there any sort of standard for this that allows 3rd party phones to be used ?

I presume one could cut the earphones wire to have an antenna without earphones etc. dangling.
 

mikereidis

Inactive Recognized Developer
Jan 28, 2011
7,823
4,146
Ottawa/Gatineau, Canada
I would also suggest you create a donate button here on the forum.
I would donate 10€ immediately.

Thanks karl_k. Yeah a donate button sounds like a great idea. I'd prefer to prove myself by getting audio functioning first though, just in case I got hit with the proverbial truck or whatever. :)

I presume I can identify doners and pay more attention to their requests for help or new features.

Yeah I think fully open source and information disclosure is best. Although not alway true, I enjoy the expression "Do what you love, the money will come".

My wife and I have an agreement about my employment/this project, and seeing even a small trickle coming in would satisfy the 3 and 6 month milestones I proposed.
 

ali ba

Retired Recognized Developer
May 30, 2010
576
258
Vienna
derhofbauer.at
As far as I know FM radio audio is hard-wired to the headphones. At least that's what's done on a few other devices.


By the way, there's no need to write an FM radio app, CM already has one. We "just" need framework support for TI chips. Have a look at how it's done on broadcom devices - I didn't find it hard to understand, but your mileage my vary.
 

mikereidis

Inactive Recognized Developer
Jan 28, 2011
7,823
4,146
Ottawa/Gatineau, Canada
As far as I know FM radio audio is hard-wired to the headphones. At least that's what's done on a few other devices.

Hard wired ? I'd think there must be some mute type switch somewhere otherwise we might get static when no other audio is playing.

And the stock FM app can send to the speaker OR the earphones right ?

If it was analog hard wired I'd think my enabling analog output would have resulted in audio by now.

I also do:
adb shell 'echo "fm_headset" > /sys/class/htc_accessory/fm/flag'

but this results in no audio. I read something indicating the switch_set_state() might not do anything when writing to the fm flag, as it should.


And yes, I've taken a quick look at the MIUI app. If it supported TI and broadcom, I think it'd have the potential to work on most devices with FM since TI and BC seem to have the majority of the FM chip market tied up. I'll look at it further once I figure out audio. Re: audio routing being the current gating factor: "So close, yet so far", LOL. :)


BTW, something has seemed funny about attempting to turn on bluetooth on this CM7 ROM I installed a week or two ago. The GUI settings never show it as enabled, even despite that I ran "bttest enabled" fine from adb shell and clearly I see the FM radio portion working.

I picked up a cheap BT headset tonight, but the settings GUI won't let me scan for devices due to this. Perhaps I can find out how to do that with hcitool. And/or maybe update CM7 ?
 
Last edited:
Status
Not open for further replies.

Top Liked Posts

  • There are no posts matching your filters.
  • 4
    @mikereidis

    Hey man, I hope you didn't give up already:rolleyes:!

    :) Absolutely not ! Just may not post much when deep in "the machine".

    I KNOW this will work when the audio routing mystery is solved, so I've gone ahead and started on a radio app. It's minimal at present but it:

    - controls power on or off
    - changes and displays volume
    - changes and displays frequency
    - scans up or down
    - shows RSSI (signal level) as expected when a station is tuned in and the antenna is moved

    Sooner or later the audio routing will be solved, and I hope to have an app ready to go at that time. At present it requires a few kluges that require root access. The app development is giving me a nice break from racking my brains over audio routing.


    A few days ago I started a "monster" thread in the general Android development section documenting what I've learned about the TI FM Radio and asking for some technical assistance.

    So far not a single response to my 10 monster posts of technical info. But that's OK cause I'd prefer to clean up some of that before the thread gets too much notice. And please note, developer type posts only on that thread. I've seen several other threads for different devices using the TI FM Radio, so I think a cross-device thread is appropriate for devs to share info.

    And yes, I want my app to be usable on many other devices, whether they use a compatible TI chip, or the even more popular broadcom line.

    So far I haven't tried reverse engineering using one of the stock ROMs mostly because I have just the one phone and it's really handy to keep it in operating condition. I'm mostly been "forward engineering" searching for datasheets and assembling all the info I can find from various internet sources. But I also examine binaries on my CM7 ROM and those I can find on the internet.


    I also need to get some bluetooth devices. Some of the TI code indicates the FM radio may be capable of internally transferring audio to and from (for Tx!) bluetooth from and to the radio. So the audio data might never leave the chip, meaning that just standard chip commands might be able to do the routing.


    I'm putting over 12 hours per day, 7 days per week into this project. I hope to find a way to make at least a meager income from this over the next 3-6 months, so I can continue. Suggestions on that front are welcome, but I think it'd be via sales in the Android app marketplace(s).

    I DO feel I see massive benefits in making apps open source. It's one way I think the lone developer can stand a chance in a marketplace full of larger entities than a single person. Biggest question with open source, though, is how to make money.

    But I guess even with open source, one can still place a non-free App in the marketplace, and people might pay and download either because: (a) they want to support the project, (b) they want ad-free or (c) enhanced versions or (d) latest updates or (e) support or (f) they might not even know an APK is downloadable somewhere..


    Currently, the GUI of the app is built with Android App Inventor, a somewhat Visual Basic like visual development tool. Unfortunately AppInv has serious limitations at present, but so far I've managed to work around them with scripts and an extender. If the AppInv "Source" (really, a diagram, LOL) was made open I think it could be interesting to see what other people make from it. I could supply the scripts/API, documentation, investigation, support, etc.

    So, so far I REALLY like the easy GUI design and end-user (non dev) modifiability of App Inventor. But so far there are very few paid apps out there built with AppInv.
    3
    Well it sounds like you're making some awesome progress. I eagerly await. [=

    Sent from my Legend using XDA App

    :) Now I'M stoked ! 5.5 days from old AI app to new Java app, with credit due to CodeAurora and a few lines of code credited to MIUI and/or CM ;) Most of that time was spent learning more about the Android SDK and learning the Aurora code.

    Here's a "sneak peek" at version 2:

    Direct:
    https://docs.google.com/uc?id=0B7UP...Tg4YjYtYzkyODg2MDdiMDhj&export=download&hl=en

    Page:
    https://docs.google.com/leaf?id=0B7UP2cIqyQXGYTY3ZDQ2MDEtYzk4ZC00Yjc2LTg4YjYtYzkyODg2MDdiMDhj&hl=en


    It's "hot off the presses", so who knows what strange bugs it might have on your phone. But it seems to be working nicely on mine.

    It shouldn't need any of the previous files, but they shouldn't interfere. Due to the shared lineage with the CM app, it's possible there might be some conflict in naming or somesuch.

    As before, it requires a working hcitool. No "daemon mode", but I'll be investigating the dbus APIs for direct bluetooth access. But hcitool works fine for now. It will create a file named "cmdout" in the /sdcard directory; this is used to read FM registers.

    It needs SU (root) only to run the speaker/headset switching code, due to the bug in my older CM ROM.

    You MUST switch bluetooth on manually before starting. When it starts, it should power up, go to speaker and tune to 98.1.

    Note: The app has some code to handle muting during phone calls. I haven't tested to see if it works yet. If someone would like to test incoming/outgoing to see what happens, please let me know. I don't use this phone as a phone anymore, LOL. :)

    For some reason, this app doesn't show up in the "recent applications" list. It can be returned to by (re)launching via home screen or whatever.

    ------------------
    Instructions:
    Click on "98.1" and get a dialog to enter a new frequency. Click to left/right and go down/up one channel. Long press on either to seek to next channel with an RSSI of 24 or greater.

    Hardware volume control buttons should work. Turn up if you hear no sound. Hit speaker at lower left to mute, again to unmute. Power button should go off and on.

    Find a favourite station and long press one of the 5 preset buttons to set etc.

    Menu button gives some non-working options like scan. "Start recording" creates file(s) on the SD card, but I haven't seen if an actual recording can be made (it can't as of now I think). "Disable Speaker" switches audio to headset. "Enable Speaker" goes back to speaker.

    Under "Settings", the mono/stereo switch should work. The "Regional Band" may partly work for other areas, but I have some code fixed to North America at the moment. Revert to factory defaults should work.

    There should be multiple preset lists configurable but I haven't checked that much.

    The display should reconfigure between landscape and portrait.

    Please report back here...
    1
    I'd consider doing development on this. I was wondering why there was no FM Radio app on CM7, LOL. :D

    At the very least I can commit to finding all the info I can gather on this issue. I have no (satisfactory) employment at present and want to break into the Android specific field.

    I have 14 years experience in embedded Linux development, including lots of low level kernel stuff. In a previous life (more decades ago than I dare admit) I did electronics engineering stuff, and I still love the low level nuts and bolts.

    I'm pretty new to Android however, got my first cellphone (ever!) 17 days ago, first Android phone 15 days ago, and my Legend yesterday.

    I think I can learn quick, I'm CM7 nightly, S-Off, new radio one day after getting it, LOL. :D


    So my point is I, and this project, could use help in areas of Android specific knowledge.

    Does anyone know if the normal FM radio app I've used before is proprietary Google code ?

    Are there any generic FM radio apps that would work if standard drivers existed ?

    My quick research on this is that only a driver might be needed. A V4L (video 4 linux) driver, which I have already had some experience with.

    But there DOES seem to be a V4L driver already for Linux for the TI WL1273 chip apparently used in the Legend, and apparently a number of other phones. So in theory, this job might be as easy as integrating an already written driver in to the CM kernel, as a kernel module or 2. There MIGHT be some copyright issues with any chip firmware though.

    Alas, some comments indicate using such a driver might interfere with Bluetooth functionality.

    Interesting stuff about the 1273 chip is that it may support an FM transmitter, and it supposedly supports WiFi N. But who knows if needed hardware support might not be on the PCBs.
    1
    ^ wow! where have you been all our android lives, bro? link on the post above yours answers some, if not of all, of your questions & covers a lot, i guess. cheers!

    :) Cheers...

    I've been reading that there IS an FM Radio app integrated into CM now. It comes from MIUI, a chinese group of some sort that also makes an Android ROM.

    The app apparently uses /dev/radio* which is the standard V4L radio interface. I have these also on my Hauuppage PVR boards I used for HTPC before I went completely digital for movies, tv, etc.

    So yes, what we need is integration of a driver into CM kernel, but coding may be needed to fix bluetooth driver interference etc. And of course who knows what else might be needed.

    I'm reading that FM is much more important to those without data to stream. Not all of us live in wireless data dense cities and countries.

    Would be interesting to see what frequency range can be received and maybe transmitted.


    Would be MOST cool to stream from video camera to transmitter for local "pirate TV" type functionality, LOL. ;) :D Actually can't imagine ATSC or even NTSC (or PAL etc.) encoding possible, but wireless streaming will do the job...
    1
    Thanks. :)

    Please feel free to close this thread; it served it's purpose 4 years ago and there is probably nothing meaningful to say at this point, about FM on the now ancient HTC Legend.

    Sure.

    And good luck with android auto i saw you made some significant advancements :)