[Galaxy S I9000 Android Development] supercurio:
Yep nsgtr34, for reference, here is the asound.conf by default provided in XXJM2.

# Android ALSA configuration file for the GalaxyS audio.

########################################################################
#	{name "Playback Path"	value 2}	# 0:OFF 1:RCV 2:SPK 3:HP 4:DUAL 5:BT 6:RING_SPK 7:RING_HP 8:RING_DUAL 9:EXTRA_DOCK_SPEAKER 10:TV_OUT
#	{name "Output Volume"	value 30}	# min:0 max:48
#	{name "Output Volume - RCV"	value 2}# min:0 max:7
#	{name "Output Volume - SPK/EAR"	value 8} # min:0 max:15
#	{name "MIC Path"	value 1}	# 0:Main Mic 1:Sub MIC
#	{name "Voice Call Path"	value 1}	# 0:OFF 1:RCV 2:SPK 3:HP 4:BT
#	{name "Voice Memo Path"	value 1}	# 0:OFF 1:MAIN 2:SUB 3:EAR 4:BT
#	{name "MIC Gain"	value 5,5}	# min:0 max:15
#	{name "FM Radio Path"	value 1}	# 0:OFF 1:SPK 2:HP 3:SPK_MIX 4:HP_MIX
#	{name "Idle Mode"	value 1}	# 0:off 1:on
#########################################################################

##
## Mixer Devices
##

ctl.AndroidPlayback {
type hw
card 0
}

ctl.AndroidRecord {
type hw
card 0
}

##
## Playback Devices
##

pcm.AndroidPlayback {
type hooks
slave.pcm {
type hw
card 0
device 0	# Must be of type "digital audio playback"
}
hooks.0 {
type ctl_elems
hook_args [
# Enable audio output from the DSP
]
}
}

pcm.AndroidPlayback_Earpiece {
type hooks
slave.pcm {
type hw
card 0
device 0	# Must be of type "digital audio playback"
}
hooks.0 {
type ctl_elems
hook_args [
# Enable audio output from the DSP
{name "Voice Call Path"	value 1}	# 0:OFF 1:RCV 2:SPK 3:HP 4:DUAL 5:BT 6:RING_SPK 7:RING_HP 8:RING_DUAL 9:EXTRA_DOCK_SPEAKER 10:TV_OUT
]
}
}

pcm.AndroidPlayback_Speaker {
type hooks
slave.pcm {
type hw
card 0
device 0	# Must be of type "digital audio playback"
}
hooks.0 {
type ctl_elems
hook_args [
# Enable audio output from the DSP
{name "Playback Path"	value 2}	# 0:OFF 1:RCV 2:SPK 3:HP 4:DUAL 5:BT 6:RING_SPK 7:RING_HP 8:RING_DUAL 9:EXTRA_DOCK_SPEAKER 10:TV_OUT
]
}
}

pcm.AndroidPlayback_Headset {
type hooks
slave.pcm {
type hw
card 0
device 0	# Must be of type "digital audio playback"
}
hooks.0 {
type ctl_elems
hook_args [
# Enable audio output from the DSP
{name "Playback Path"	value 3}	# 0:OFF 1:RCV 2:SPK 3:HP 4:DUAL 5:BT 6:RING_SPK 7:RING_HP 8:RING_DUAL 9:EXTRA_DOCK_SPEAKER 10:TV_OUT
]
}
}

pcm.AndroidPlayback_Bluetooth {
type hooks
slave.pcm {
type hw
card 0
device 0	# Must be of type "digital audio playback"
}
hooks.0 {
type ctl_elems
hook_args [
# Enable audio output from the DSP
{name "Playback Path"	value 4}	# 0:OFF 1:RCV 2:SPK 3:HP 4:DUAL 5:BT 6:RING_SPK 7:RING_HP 8:RING_DUAL 9:EXTRA_DOCK_SPEAKER 10:TV_OUT
]
}
}

pcm.AndroidPlayback_Earpiece_normal {
type hooks
slave.pcm {
type hw
card 0
device 0	# Must be of type "digital audio playback"
}
hooks.0 {
type ctl_elems
hook_args [
# Enable audio output from the DSP
# {name "MIC Path"	value 0}	# 0:Main Mic 1:Sub MIC
{name "Playback Path"	value 1}	# 0:OFF 1:RCV 2:SPK 3:HP 4:DUAL 5:BT 6:RING_SPK 7:RING_HP 8:RING_DUAL 9:EXTRA_DOCK_SPEAKER 10:TV_OUT
]
}
}

pcm.AndroidPlayback_Speaker_normal {
type hooks
slave.pcm {
type hw
card 0
device 0	# Must be of type "digital audio playback"
}
hooks.0 {
type ctl_elems
hook_args [
# Enable audio output from the DSP
{name "Playback Path"	value 2}	# 0:OFF 1:RCV 2:SPK 3:HP 4:DUAL 5:BT 6:RING_SPK 7:RING_HP 8:RING_DUAL 9:EXTRA_DOCK_SPEAKER 10:TV_OUT
]
}
}

pcm.AndroidPlayback_Headset_normal {
type hooks
slave.pcm {
type hw
card 0
device 0	# Must be of type "digital audio playback"
}
hooks.0 {
type ctl_elems
hook_args [
# Enable audio output from the DSP
{name "Playback Path"	value 3}	# 0:OFF 1:RCV 2:SPK 3:HP 4:DUAL 5:BT 6:RING_SPK 7:RING_HP 8:RING_DUAL 9:EXTRA_DOCK_SPEAKER 10:TV_OUT
]
}
}

pcm.AndroidPlayback_Bluetooth_normal {
type hooks
slave.pcm {
type hw
card 0
device 0	# Must be of type "digital audio playback"
}
hooks.0 {
type ctl_elems
hook_args [
# Enable audio output from the DSP
{name "Playback Path"	value 4}	# 0:OFF 1:RCV 2:SPK 3:HP 4:DUAL 5:BT 6:RING_SPK 7:RING_HP 8:RING_DUAL 9:EXTRA_DOCK_SPEAKER 10:TV_OUT
]
}
}

pcm.AndroidPlayback_Speaker_Headset_normal {
type hooks
slave.pcm {
type hw
card 0
device 0	# Must be of type "digital audio playback"
}
hooks.0 {
type ctl_elems
hook_args [
# Enable audio output from the DSP
{name "Playback Path"	value 5}	# 0:OFF 1:RCV 2:SPK 3:HP 4:DUAL 5:BT 6:RING_SPK 7:RING_HP 8:RING_DUAL 9:EXTRA_DOCK_SPEAKER 10:TV_OUT
]
}
}

pcm.AndroidPlayback_ExtraDockSpeaker_normal {
type hooks
slave.pcm {
type hw
card 0
device 0	# Must be of type "digital audio playback"
}
hooks.0 {
type ctl_elems
hook_args [
# Enable audio output from the DSP
{name "Playback Path"	value 9}	# 0:OFF 1:RCV 2:SPK 3:HP 4:DUAL 5:BT 6:RING_SPK 7:RING_HP 8:RING_DUAL 9:EXTRA_DOCK_SPEAKER 10:TV_OUT
]
}
}

pcm.AndroidPlayback_TvOut_normal {
type hooks
slave.pcm {
type hw
card 0
device 0	# Must be of type "digital audio playback"
}
hooks.0 {
type ctl_elems
hook_args [
# Enable audio output from the DSP
{name "Playback Path"	value 10} # 0:OFF 1:RCV 2:SPK 3:HP 4:DUAL 5:BT 6:RING_SPK 7:RING_HP 8:RING_DUAL 9:EXTRA_DOCK_SPEAKER 10:TV_OUT
]
}
}

pcm.AndroidPlayback_Earpiece_ringtone {
type hooks
slave.pcm {
type hw
card 0
device 0	# Must be of type "digital audio playback"
}
hooks.0 {
type ctl_elems
hook_args [
# Enable audio output from the DSP
{name "Playback Path"	value 6}	# 0:OFF 1:RCV 2:SPK 3:HP 4:DUAL 5:BT 6:RING_SPK 7:RING_HP 8:RING_DUAL 9:EXTRA_DOCK_SPEAKER
]
}
}

pcm.AndroidPlayback_Speaker_ringtone {
type hooks
slave.pcm {
type hw
card 0
device 0	# Must be of type "digital audio playback"
}
hooks.0 {
type ctl_elems
hook_args [
# Enable audio output from the DSP
{name "Playback Path"	value 6}	# 0:OFF 1:RCV 2:SPK 3:HP 4:DUAL 5:BT 6:RING_SPK 7:RING_HP 8:RING_DUAL 9:EXTRA_DOCK_SPEAKER
]
}
}

pcm.AndroidPlayback_Headset_ringtone {
type hooks
slave.pcm {
type hw
card 0
device 0	# Must be of type "digital audio playback"
}
hooks.0 {
type ctl_elems
hook_args [
# Enable audio output from the DSP
{name "Playback Path"	value 7}	# 0:OFF 1:RCV 2:SPK 3:HP 4:DUAL 5:BT 6:RING_SPK 7:RING_HP 8:RING_DUAL 9:EXTRA_DOCK_SPEAKER
]
}
}

pcm.AndroidPlayback_Bluetooth_ringtone {
type hooks
slave.pcm {
type hw
card 0
device 0	# Must be of type "digital audio playback"
}
hooks.0 {
type ctl_elems
hook_args [
# Enable audio output from the DSP
{name "Playback Path"	value 4}	# 0:OFF 1:RCV 2:SPK 3:HP 4:DUAL 5:BT 6:RING_SPK 7:RING_HP 8:RING_DUAL 9:EXTRA_DOCK_SPEAKER
]
}
}

pcm.AndroidPlayback_Speaker_Headset_ringtone {
type hooks
slave.pcm {
type hw
card 0
device 0	# Must be of type "digital audio playback"
}
hooks.0 {
type ctl_elems
hook_args [
# Enable audio output from the DSP
{name "Playback Path"	value 8}	# 0:OFF 1:RCV 2:SPK 3:HP 4:DUAL 5:BT 6:RING_SPK 7:RING_HP 8:RING_DUAL 9:EXTRA_DOCK_SPEAKER
]
}
}

pcm.AndroidPlayback_Earpiece_incall {
type hooks
slave.pcm {
type hw
card 0
device 0	# Must be of type "digital audio playback"
}
hooks.0 {
type ctl_elems
hook_args [
# Enable audio output from the DSP
#{name "MIC Path"	value 0}	# 0:Main Mic 1:Sub MIC
{name "Voice Call Path"	value 1}	# 0:OFF 1:RCV 2:SPK 3:HP 4:BT
]
}
}

pcm.AndroidPlayback_Speaker_incall {
type hooks
slave.pcm {
type hw
card 0
device 0	# Must be of type "digital audio playback"
}
hooks.0 {
type ctl_elems
hook_args [
# Enable audio output from the DSP
#{name "MIC Path"	value 0}	# 0:Main Mic 1:Sub MIC
{name "Voice Call Path"	value 2}	# 0:OFF 1:RCV 2:SPK 3:HP 4:BT
]
}
}

pcm.AndroidPlayback_Headset_incall {
type hooks
slave.pcm {
type hw
card 0
device 0	# Must be of type "digital audio playback"
}
hooks.0 {
type ctl_elems
hook_args [
# Enable audio output from the DSP
{name "Voice Call Path"	value 3}	# 0:OFF 1:RCV 2:SPK 3:HP 4:BT
]
}
}

pcm.AndroidPlayback_Bluetooth_incall {
type hooks
slave.pcm {
type hw
card 0
device 0	# Must be of type "digital audio playback"
}
hooks.0 {
type ctl_elems
hook_args [
# Enable audio output from the DSP
{name "Voice Call Path"	value 4}	# 0:OFF 1:RCV 2:SPK 3:HP 4:BT
]
}
}

pcm.AndroidPlayback_Speaker_Headset_incall {
type hooks
slave.pcm {
type hw
card 0
device 0	# Must be of type "digital audio playback"
}
hooks.0 {
type ctl_elems
hook_args [
# Enable audio output from the DSP
#{name "MIC Path"	value 1}	# 0:Main Mic 1:Sub MIC
{name "Voice Call Path"	value 2}	# 0:OFF 1:RCV 2:SPK 3:HP 4:BT
]
}
}

#
# FMRadio
#
pcm.AndroidPlayback_Speaker_fmradio {
type hooks
slave.pcm {
type hw
card 0
device 0	# Must be of type "digital audio playback"
}
hooks.0 {
type ctl_elems
hook_args [
# Enable audio output from the DSP
{name "FM Radio Path"	value 1}	# 0:OFF 1:SPK 2:HP 3:SPK_MIX 4:HP_MIX
]
}
}

pcm.AndroidPlayback_Headset_fmradio {
type hooks
slave.pcm {
type hw
card 0
device 0	# Must be of type "digital audio playback"
}
hooks.0 {
type ctl_elems
hook_args [
# Enable audio output from the DSP
{name "FM Radio Path"	value 2}	# 0:OFF 1:SPK 2:HP 3:SPK_MIX 4:HP_MIX
]
}
}

pcm.AndroidPlayback_Speaker_Headset_fmradio {
type hooks
slave.pcm {
type hw
card 0
device 0	# Must be of type "digital audio playback"
}
hooks.0 {
type ctl_elems
hook_args [
# Enable audio output from the DSP
{name "FM Radio Path"	value 5}	# 0:OFF 1:SPK 2:HP 3:SPK_MIX 4:HP_MIX 5:DUAL MIX
]
}
}
#
# FM Radio + AP Play
#
pcm.AndroidPlayback_Speaker_dualinput {
type hooks
slave.pcm {
type hw
card 0
device 0	# Must be of type "digital audio playback"
}
hooks.0 {
type ctl_elems
hook_args [
# Enable audio output from the DSP
{name "FM Radio Path"	value 3}	# 0:OFF 1:SPK 2:HP 3:SPK_MIX 4:HP_MIX
]
}
}

pcm.AndroidPlayback_Headset_dualinput {
type hooks
slave.pcm {
type hw
card 0
device 0	# Must be of type "digital audio playback"
}
hooks.0 {
type ctl_elems
hook_args [
# Enable audio output from the DSP
{name "FM Radio Path"	value 4}	# 0:OFF 1:SPK 2:HP 3:SPK_MIX 4:HP_MIX
]
}
}

pcm.AndroidPlayback_Speaker_Headset_dualinput {
type hooks
slave.pcm {
type hw
card 0
device 0	# Must be of type "digital audio playback"
}
hooks.0 {
type ctl_elems
hook_args [
# Enable audio output from the DSP
{name "FM Radio Path"	value 5}	# 0:OFF 1:SPK 2:HP 3:SPK_MIX 4:HP_MIX 5:SPK_HP_MIX
]
}
}

#
# Video Call - Output stream
#
pcm.AndroidPlayback_Earpiece_videocall {
type hooks
slave.pcm {
type hw
card 1
device 0	# Must be of type "digital audio playback"
}
hooks.0 {
type ctl_elems
hook_args [
# Enable audio output from the DSP
{name "Voice Call Path"	value 1}	# 0:OFF 1:RCV 2:SPK 3:HP 4:BT
]
}
}

pcm.AndroidPlayback_Speaker_videocall {
type hooks
slave.pcm {
type hw
card 1
device 0	# Must be of type "digital audio playback"
}
hooks.0 {
type ctl_elems
hook_args [
# Enable audio output from the DSP
{name "Voice Call Path"	value 2}	# 0:OFF 1:RCV 2:SPK 3:HP 4:BT
]
}
}

pcm.AndroidPlayback_Headset_videocall {
type hooks
slave.pcm {
type hw
card 1
device 0	# Must be of type "digital audio playback"
}
hooks.0 {
type ctl_elems
hook_args [
# Enable audio output from the DSP
{name "Voice Call Path"	value 3}	# 0:OFF 1:RCV 2:SPK 3:HP 4:BT
]
}
}

pcm.AndroidPlayback_Bluetooth_videocall {
type hooks
slave.pcm {
type hw
card 1
device 0	# Must be of type "digital audio playback"
}
hooks.0 {
type ctl_elems
hook_args [
# Enable audio output from the DSP
{name "Voice Call Path"	value 4}	# 0:OFF 1:RCV 2:SPK 3:HP 4:BT
]
}
}

##
## Recording device
##

pcm.AndroidRecord {
type hooks
slave.pcm {
type hw
card 0
device 0	# Must be of type "digital audio capture"
}
hooks.0 {
type ctl_elems
hook_args [
{name "MIC Path"	value 0}	# 0:Main Mic 1:Sub MIC
]
}
}

pcm.AndroidRecord_Microphone {
type hooks
slave.pcm {
type hw
card 0
device 0	# Must be of type "digital audio capture"
}
hooks.0 {
type ctl_elems
hook_args [
{name "MIC Path"	value 0}	# 0:Main Mic 1:Sub MIC
]
}
}

pcm.AndroidRecord_Earpiece_normal {
type hooks
slave.pcm {
type hw
card 0
device 0	# Must be of type "digital audio capture"
}
hooks.0 {
type ctl_elems
hook_args [
{name "MIC Path"	value 0}	# 0:Main Mic 1:Sub MIC
]
}
}

pcm.AndroidRecord_Speaker_normal {
type hooks
slave.pcm {
type hw
card 0
device 0	# Must be of type "digital audio capture"
}
hooks.0 {
type ctl_elems
hook_args [
{name "MIC Path"	value 0}	# 0:Main Mic 1:Sub MIC
]
}
}

pcm.AndroidRecord_Headset_normal {
type hooks
slave.pcm {
type hw
card 0
device 0	# Must be of type "digital audio capture"
}
hooks.0 {
type ctl_elems
hook_args [
{name "MIC Path"	value 1}	# 0:Main Mic 1:Sub MIC
]
}
}

pcm.AndroidRecord_Bluetooth_normal {
type hooks
slave.pcm {
type hw
card 0
device 0	# Must be of type "digital audio capture"
}
hooks.0 {
type ctl_elems
hook_args [
{name "MIC Path"	value 2}	# 0:Main Mic 1:Sub MIC 2:BT Voice Command
]
}
}

pcm.AndroidRecord_Speaker_Headset_normal {
type hooks
slave.pcm {
type hw
card 0
device 0	# Must be of type "digital audio capture"
}
hooks.0 {
type ctl_elems
hook_args [
{name "MIC Path"	value 0}	# 0:Main Mic 1:Sub MIC
]
}
}

pcm.AndroidRecord_Speaker_ringtone {
type hooks
slave.pcm {
type hw
card 0
device 0	# Must be of type "digital audio capture"
}
hooks.0 {
type ctl_elems
hook_args [
{name "Playback Path"	value 2}	# 0:OFF 1:RCV 2:SPK 3:HP 4:BT 5:SPK_HP
]
}
}

pcm.AndroidRecord_Headset_ringtone {
type hooks
slave.pcm {
type hw
card 0
device 0	# Must be of type "digital audio capture"
}
hooks.0 {
type ctl_elems
hook_args [
{name "Playback Path"	value 3}	# 0:OFF 1:RCV 2:SPK 3:HP 4:BT
]
}
}

pcm.AndroidRecord_Earpiece_incall {
type hooks
slave.pcm {
type hw
card 0
device 0	# Must be of type "digital audio playback"
}
hooks.0 {
type ctl_elems
hook_args [
# Enable audio output from the DSP
{name "MIC Path"	value 0}	# 0:Main Mic 1:Sub MIC
]
}
}

pcm.AndroidRecord_Speaker_incall {
type hooks
slave.pcm {
type hw
card 0
device 0	# Must be of type "digital audio playback"
}
hooks.0 {
type ctl_elems
hook_args [
# Enable audio output from the DSP
{name "MIC Path"	value 0}	# 0:Main Mic 1:Sub MIC
]
}
}

pcm.AndroidRecord_Headset_incall {
type hooks
slave.pcm {
type hw
card 0
device 0	# Must be of type "digital audio playback"
}
hooks.0 {
type ctl_elems
hook_args [
# Enable audio output from the DSP
{name "MIC Path"	value 1}	# 0:Main Mic 1:Sub MIC
]
}
}

pcm.AndroidRecord_Bluetooth_incall {
type hooks
slave.pcm {
type hw
card 0
device 0	# Must be of type "digital audio playback"
}
hooks.0 {
type ctl_elems
hook_args [
# Enable audio output from the DSP
{name "MIC Path"	value 2}	# 0:Main Mic 1:Sub MIC 2:BT MIC
]
}
}

pcm.AndroidRecord_Speaker_Headset_incall {
type hooks
slave.pcm {
type hw
card 0
device 0	# Must be of type "digital audio playback"
}
hooks.0 {
type ctl_elems
hook_args [
# Enable audio output from the DSP
{name "MIC Path"	value 1}	# 0:Main Mic 1:Sub MIC
{name "Voice Call Path"	value 3}	# 0:OFF 1:RCV 2:SPK 3:HP 4:BT
]
}
}

#
# Video Call - Input stream
#
pcm.AndroidRecord_Earpiece_videocall {
type hooks
slave.pcm {
type hw
card 1
device 0	# Must be of type "digital audio playback"
}
hooks.0 {
type ctl_elems
hook_args [
# Enable audio output from the DSP
# Already called codec path by Video call outputstream
#{name "Voice Call Path"	value 1}	# 0:OFF 1:RCV 2:SPK 3:HP 4:BT
#{name "MIC Path"	value 0}	# 0:Main Mic 1:Sub MIC
]
}
}

pcm.AndroidRecord_Speaker_videocall {
type hooks
slave.pcm {
type hw
card 1
device 0	# Must be of type "digital audio playback"
}
hooks.0 {
type ctl_elems
hook_args [
# Enable audio output from the DSP
# Already called codec path by Video call outputstream
#{name "Voice Call Path"	value 2}	# 0:OFF 1:RCV 2:SPK 3:HP 4:BT
#{name "MIC Path"	value 0}	# 0:Main Mic 1:Sub MIC
]
}
}

pcm.AndroidRecord_Headset_videocall {
type hooks
slave.pcm {
type hw
card 1
device 0	# Must be of type "digital audio playback"
}
hooks.0 {
type ctl_elems
hook_args [
# Enable audio output from the DSP
# Already called codec path by Video call outputstream
#{name "Voice Call Path"	value 3}	# 0:OFF 1:RCV 2:SPK 3:HP 4:BT
#{name "MIC Path"	value 1}	# 0:Main Mic 1:Sub MIC
]
}
}

pcm.AndroidRecord_Bluetooth_videocall {
type hooks
slave.pcm {
type hw
card 1
device 0	# Must be of type "digital audio playback"
}
hooks.0 {
type ctl_elems
hook_args [
# Enable audio output from the DSP
# Already called codec path by Video call outputstream
#{name "Voice Call Path"	value 4}	# 0:OFF 1:RCV 2:SPK 3:HP 4:BT
]
}
}

Pretty long ^^

Some binaries alsa-utils statically compiled for ARM could be useful, especially amixer.