[Spirit FM] mikereidis:
I spent an evening poking around. With a bit more time I could put together some tests. Half my day goes to email and post answering though, so things go slow now.

Here are my "raw notes" should they make you happy or spur someone to poke around themselves or provide some insights: :)

(I see references to FM as an input, which implies recording capability, but I have serious doubts I can support that, especially on custom ROMs (cue all the people who say "Recording would be COOL!" :) ) )

/* GT-i9100G:

android.media:

FMPlayer.class

MediaPlayer.class

AudioService.class

AudioManager.class

AudioSystem.class

public static final int FORCE_NONE = 0;

public static final int FORCE_SPEAKER = 1;

public static final int FOR_COMMUNICATION = 0;

public static final int FOR_FMRADIO = 4;

public static final int MODE_FM_RADIO = 4;

public static final int STREAM_FM_RADIO = 10;

public static final int STREAM_HPH_FM_RADIO = 13;

setMode (4);

setRadioSpeakerOn (false);

libaudio.so

AudioHardwareALSA::setParameters() open FM device

bt_headset_nrec

dualmic_enabled

fm_radio_volume

AudioHardwareALSA::setParameters() close FM device

fm_off

libaudioflinger.so

fm_radio_mute

libaudiopolicy.so

getDeviceForInputSourceNotification returning FM device

fm_radio_mute

FMRadioVolIndex(%d)

FMRadio_volume_index

FMRadio_volume_device

setStrategyMute Fmradio Mute(%d)

fm_radio_volume=off

headset is removed, set mute fm radio

setDeviceConnectionState() input device is FM

setDeviceConnectionState() start FM

fm_radio_volume=on

setDeviceConnectionState() stop FM

set input FM route

libmedia.so

fmradio_turnon

dummy

AudioSystem::setParameters fmradio_turnon received - process it

true

AudioSystem::setParameters calling aps->setDeviceConnectionState 1

false

AudioSystem::setParameters calling aps->setDeviceConnectionState 2

AudioSystem::setParameters fmradio_turnon has unknown value

hw/alsa.omap4.so

ZN7android11ALSAControlD1Ev

_ZN7android28setAlsaCallSPKMuteOnControlsEv

_ZN7android21setAlsaFMGainControlsEii

fmspk_volume_table_abe_dl2

fmspk_volume_table_twl6040

fmear_volume_table_abe_dl1

fmear_volume_table_abe_sdt

fmear_volume_table_twl6040

_ZN7android7String8D1Ev

_ZNK7android12SortedVectorINS_16key_value_pair_tINS_7String8ES2_EEE10do_destroyEPvj

_ZN7android14AudioModemAlsa12setFMEnabledEb

snd_pcm_drain

snd_pcm_close

_ZN7android10audioModemE

_ZN7android15configEqualizerEj

_ZN7android11ALSAControl3setEPKcS2_

_ZN7android18setRingtoneSPKopenEi

_ZN7android14get_codec_gainEiib

_ZN7android15setRingtoneGainEi

_ZN7android26set_fmradio_and_music_modeEPNS_13alsa_handle_tE

Omap4ALSA

OMAP4 ALSA module opened

hw:00

DL2 Mixer Multimedia

DL2 Media Playback Volume

DL2 Mixer Voice

DL2 Voice Playback Volume

do not setAlsaFMGainControls volume %d

setAlsaFMGainControls SPEAKER vol %d

DL2 Capture Playback Volume

Handsfree Playback Volume

setAlsaFMGainControls HEADSET vol %d

DL1 Capture Playback Volume

SDT DL Volume

Headset Playback Volume

DL2 Mixer Capture

s_standby mute FM speaker

DL1 Mixer Capture

s_standby mute FM ear piece

s_standby called drain&close

s_close mute FM speaker

s_close mute FM ear piece

s_close snd_pcm_drain()

s_close snd_pcm_close()

s_close called drain&close

DMIC Equalizer

High-pass 0dB

AMIC Equalizer

AUX Left Playback

AUX Right Playback

DL2 Mono Mixer

HF Left Playback

HF DAC

HF Right Playback

Analog Left Capture Route

Aux/FM Left

Analog Right Capture Route

Aux/FM Right

AMIC UL Volume

AMIC_UL PDM Switch

MUX_UL10

AMic0

MUX_UL11

AMic1

DL1 Media Playback Volume

Initializing devices for OMAP4 ALSA module

MUX_UL00

MUX_UL01

None

main mic selected AMic0 -> IN

sub mic selected AMic1 -> IN

main mic selected %s

sub mic selected %s

DMic0

DMIC1 UL Volume

DMic1

DMIC2 UL Volume

DMic2

DMIC3 UL Volume

%s =volume=%d=

%s =Audion tune=volume=%d=

set:: %s

AudioTuneAPPworking=

[Audio Path] AudioTuneAPPworking, use gain value of sdcard

FMRadio_volume_index

FMRadio_volume_device

FMRadio_volume_index:: %d

FMRadio_volume_device:: %d

music_volume_index

music_volume_index:: %d

music_stream_active

true

music_stream_active:: %d

fm_radio_mute

s_set Check if FM radio mute/unmute is called

Capture Preamplifier Volume

Capture Volume

s_set mute FM speaker

s_set mute FM ear piece

input_source

intput_source:: %d

voip

bVoipMode:: %d

realcall

ringtone_active

bRingtoneMode:: %d

factory_test_route

PBA_ear_loop

amr_wb

bAMRWB:: %d

PropMgr.set failed to validate new value for %s=%s

%s =device=0x%08x= =mode=%d=

========FM codec inner loop ==%d==================

HS Left Playback

Line-In amp

HS Right Playback

AudioSystem::DEVICE_OUT_WIRED_HEADSET - playing music via EAR

========FM ABE loop ==%d==================

Earphone Driver Switch

Earphone Playback Volume

DL1 Mixer Multimedia

Sidetone Mixer Playback

DL1 PDM Switch

DL1 MM_EXT Switch

FM Enabled, DL1 Capture-Playback Vol ON

DL1 BT_VX Switch

DL2 Left Equalizer

Flat response

DL2 Right Equalizer

DL1 Equalizer

TWL6040 Power Mode

High-Performance

========Voip input gain setting ====================

Main Mic

Sub Mic

Headset Mic

Aux FM Volume

OMAP4 ABE set for BT SCO Headset

BT Left

Voice Capture Mixer Capture

BT UL Volume

HS DAC

Low-Power

s_open handle->bufferSize:%d

Failed to initialize ALSA %s device '%s': %s

Initialized ALSA %s device '%s'

Triggering McPDM DL

Triggering McPDM UL

route called for devices %08x in mode %d fm %d...

alsa

Omap4 ALSA module

Texas Instruments

omap.audio.mic.main

omap.audio.mic.sub

omap.audio.dl2l.eq

omap.audio.dl2r.eq

omap.audio.dl1.eq

omap.audio.amic.eq

omap.audio.dmic.eq

omap.audio.sdt.eq

DMic0L

DMic1L

DMic2L

DMic0R

DMic1R

DMic2R

/system/etc/audio/codec/FMRadioSpk.ini

/sdcard/external_sd/FMRadioSpk.ini

/system/etc/audio/codec/FMRadioEar.ini

/sdcard/external_sd/FMRadioEar.ini

*/