[LG Optimus Black] redy2006:
@gabwerkz. from the header, AudioHardwareALSA.h

/**
* setMode is called when the audio mode changes. NORMAL mode is for
* standard audio playback, RINGTONE when a ringtone is playing, and IN_CALL
* when a call is in progress.
*/
virtual status_t setMode(int mode);

So,

mode 0 = NORMAL

mode 1 = RINGTONE

mode 2 = IN_CALL

My question is why the audio routed many times? And after mode 2 (in_call) and sets to mode 0 (normal), BT seems activated (or perhaps the audio looking route path to BT).

D/AudioHardwareInterface( 1323): setMode(NORMAL)
D/Omap3ALSA( 1323): route called for devices 00000000 in mode 0...
D/Omap3ALSA( 1323): route called for devices 00000000 in mode 0...
D/Omap3ALSA( 1323): route called for devices 00000002 in mode 0...
V/Omap3ALSAModem( 1323): voiceCallControls: devices 0002 mode 0
D/Omap3ALSA( 1323): route called for devices 00000000 in mode 0...
D/Omap3ALSA( 1323): route called for devices 00000000 in mode 0...
--cut--
D/AudioHardwareInterface( 1323): setMode(RINGTONE)
D/Omap3ALSA( 1323): route called for devices 00000000 in mode 1...
D/Omap3ALSA( 1323): route called for devices 00000000 in mode 1...
D/Omap3ALSA( 1323): route called for devices 00000002 in mode 1...
E/Omap3ALSA( 1323): Why are we routing to a device that isn't supported by this object?!?!?!?!
D/Omap3ALSA( 1323): open called for devices 00000002 in mode 1 channels 00000000...
V/Omap3ALSAModem( 1323): voiceCallControls: devices 0002 mode 1
I/Omap3ALSA( 1323): Initialized ALSA PLAYBACK device default
V/Omap3ALSAModem( 1323): voiceCallControls: devices 0002 mode 1
D/Omap3ALSA( 1323): route called for devices 00000000 in mode 1...
D/Omap3ALSA( 1323): route called for devices 00000000 in mode 1...
--cut--
D/AudioHardwareInterface( 1323): setMode(IN_CALL)
D/Omap3ALSA( 1323): route called for devices 00000000 in mode 2...
D/Omap3ALSA( 1323): route called for devices 00000000 in mode 2...
D/Omap3ALSA( 1323): route called for devices 00000002 in mode 2...
E/Omap3ALSA( 1323): Why are we routing to a device that isn't supported by this object?!?!?!?!
D/Omap3ALSA( 1323): open called for devices 00000002 in mode 2 channels 00000000...
V/Omap3ALSAModem( 1323): voiceCallControls: devices 0002 mode 2
V/Omap3ALSAModem( 1323): New Audio Modem Modes: 0002
V/Omap3ALSAModem( 1323): Start Audio Codec Voice call: 0002
--cut--
D/AudioHardwareInterface( 1323): setMode(NORMAL)
D/Omap3ALSA( 1323): route called for devices 00000000 in mode 0...
D/Omap3ALSA( 1323): route called for devices 00000000 in mode 0...
D/Omap3ALSA( 1323): route called for devices 00000001 in mode 0...
V/Omap3ALSAModem( 1323): voiceCallControls: devices 0001 mode 0
V/Omap3ALSAModem( 1323): Stop Audio Codec Voice call
E/ALSAControl( 1323): Control 'BT Digital Playback Volume' cannot get element info: -2
E/ALSAControl( 1323): Control 'BT Digital Capture Volume' cannot get element info: -2
E/ALSAControl( 1323): Control 'BT Sidetone Volume' cannot get element info: -2
E/ALSAControl( 1323): Control 'BT data out playback MUX' cannot get element info: -2
E/ALSAControl( 1323): Control 'Voice data out MUX' cannot get element info: -2
E/ALSAControl( 1323): Control 'BT Tristate Switch' cannot get element info: -2
E/ALSAControl( 1323): Control 'Enable BT input' cannot get element info: -2
E/ALSAControl( 1323): Control 'Enable BT output' cannot get element info: -2
E/ALSAControl( 1323): Control 'BT Interface Switch' cannot get element info: -2
E/ALSAControl( 1323): Control 'Analog Capture Main Mic Switch' cannot get element info: -2
E/ALSAControl( 1323): Control 'Main Microphone Bias Switch' cannot get element info: -2
D/Omap3ALSA( 1323): route called for devices 00000000 in mode 0...
D/Omap3ALSA( 1323): route called for devices 00000000 in mode 0...
W/AudioHardwareALSA( 1323): [LUCKYJUN77]setMicMute....mMutestate : 0, state :0
D/AudioFlinger( 1323): setParameters(): io 1, keyvalue routing=1, tid 1408, calling tid 1323
D/Omap3ALSA( 1323): route called for devices 00000001 in mode 0...

We already knows the "mode", but I didn't understand yet the route "devices".

-TIA-