[Optimus L3, L5, L7 Original Android Development] ssurell:
[bug] Headphone kills mic e610

This has been a persistent bug with all CM based ROMs for e610: Plugging in plain stereo aux. or headphone disables the phones internal mic.

Flashed Beta10 directly from stock JB 4.1.2, and then flashed gapps micro (left kernel alone).

Some e610 proprietary stuff is missing that differentiates; headset with external mic, and headphone without mic.

I so don't want to leave my beloved CM11 again, but stock JB is such a work horse.

-logcat-(plug-in, unplug headphone)

V/WiredAccessoryManager( 514): Headset UEVENT: {SUBSYSTEM=switch, SWITCH_STATE=

2, DEVPATH=/devices/virtual/switch/h2w, SEQNUM=1781, ACTION=change, SWITCH_NAME=

Headset}

V/WiredAccessoryManager( 514): newName=Headset newState=2 headsetState=2 prev h

eadsetState=0

V/WiredAccessoryManager( 514): device Headset connected

W/AudioPolicyManager7627a( 143): checkOutputsForDevice() could not open output

for device 8

W/AudioPolicyManager7627a( 143): checkOutputsForDevice() could not open output

for device 8

W/AudioPolicyManager7627a( 143): checkOutputsForDevice() could not open output

for device 8

I/HeadsetService( 684): Headset=true; Bluetooth=false ; USB=false

D/WiredHeadsetManager( 676): mReceiver: ACTION_HEADSET_PLUG

D/WiredHeadsetManager( 676): state: 1

D/WiredHeadsetManager( 676): name: Headset

D/WiredHeadsetManager( 676): Wired headset connected: true

D/AudioRouter( 676): onWireHeadsetConnection true

D/BluetoothManager( 676): isBluetoothAvailable()...

D/BluetoothManager( 676): ==> false

I/AudioRouter( 676): Audio mode changing to WIRED_HEADSET

D/AudioRouter( 676): AudioMode: WIRED_HEADSET

D/AudioRouter( 676): Supported AudioMode: WIRED_HEADSET, SPEAKER

D/CallHandlerServiceProxy( 676): CallHandlerService not conneccted. Skipping on

AudioModeChange().

D/CallHandlerServiceProxy( 676): CallHandlerService not conneccted. SkippingonS

upportedAudioModeChange().

I/HeadsetService( 684): Selected configuration: headset

W/SurfaceFlinger( 140): Ignoring duplicate VSYNC event from HWC (t=153304759988

)

W/SurfaceFlinger( 140): Ignoring duplicate VSYNC event from HWC (t=154255249988

)

D/MobileDataStateTracker( 514): default: setPolicyDataEnable(enabled=true)

V/WiredAccessoryManager( 514): Headset UEVENT: {SUBSYSTEM=switch, SWITCH_STATE=

0, DEVPATH=/devices/virtual/switch/h2w, SEQNUM=1782, ACTION=change, SWITCH_NAME=

No Device}

V/WiredAccessoryManager( 514): newName=No Device newState=0 headsetState=0 prev

headsetState=2

V/WiredAccessoryManager( 514): device No Device disconnected

I/HeadsetService( 684): Headset=true; Bluetooth=false ; USB=false

V/Zygote ( 2023): Switching descriptor 32 to /dev/null

V/Zygote ( 2023): Switching descriptor 9 to /dev/null

I/ActivityManager( 514): Start proc com.andrew.apollo for broadcast com.andrew.

apollo/.MediaButtonIntentReceiver: pid=2023 uid=10019 gids={50019, 1028, 1015, 3

003}

D/ActivityThread( 2023): handleBindApplication:com.andrew.apollo

D/ActivityThread( 2023): setTargetHeapUtilization:0.25

D/ActivityThread( 2023): setTargetHeapMinFree:524288

V/Zygote ( 2036): Switching descriptor 32 to /dev/null

V/Zygote ( 2036): Switching descriptor 9 to /dev/null

I/ActivityManager( 514): Start proc com.andrew.apollo:main for service com.andr

ew.apollo/.MusicPlaybackService: pid=2036 uid=10019 gids={50019, 1028, 1015, 300

3}

I/ActivityManager( 514): Killing 1680:com.android.gallery3d/u0a36 (adj 15): emp

ty #14

D/ActivityThread( 2036): handleBindApplication:com.andrew.apollo:main

D/ActivityThread( 2036): setTargetHeapUtilization:0.25

D/ActivityThread( 2036): setTargetHeapMinFree:524288

I/MediaFocusControl( 514): Remote Control registerMediaButtonIntent() for P

endingIntent{41b351f8: PendingIntentRecord{41c8c0c8 com.andrew.apollo broadcastI

ntent}}

V/MediaFocusControl( 514): updating focussed RCC change to RCD: CallingPackageN

ame:com.andrew.apollo isFocussed:false isAvailable:true

W/WakefulBroadcastReceiver( 2036): No active wake lock id #1

I/HeadsetService( 684): Headset=false; Bluetooth=false ; USB=false

D/WiredHeadsetManager( 676): mReceiver: ACTION_HEADSET_PLUG

D/WiredHeadsetManager( 676): state: 0

D/WiredHeadsetManager( 676): name: No Device

D/WiredHeadsetManager( 676): Wired headset connected: false

D/AudioRouter( 676): onWireHeadsetConnection false

D/BluetoothManager( 676): isBluetoothAvailable()...

D/BluetoothManager( 676): ==> false

I/AudioRouter( 676): Audio mode changing to EARPIECE

D/AudioRouter( 676): AudioMode: EARPIECE

D/AudioRouter( 676): Supported AudioMode: EARPIECE, SPEAKER

D/CallHandlerServiceProxy( 676): CallHandlerService not conneccted. Skipping on

AudioModeChange().

D/CallHandlerServiceProxy( 676): CallHandlerService not conneccted. SkippingonS

upportedAudioModeChange().

I/HeadsetService( 684): Selected configuration: speaker

W/SurfaceFlinger( 140): Ignoring duplicate VSYNC event from HWC (t=168996133321

)

^C

shell/su is not permitting kmsg or dmesg, so I don't know how to get those.

stock 4.1.2 JB (v20 baseband) logcat comparison excerpts

---------------plug headphone------------------

I/AudioHardwareMSM76XXA( 144): Routing audio to Wired Headset

E/AudioHardwareMSM76XXA( 144): [LGE] Final outputDevices 8 new:3 mCur:0

W/AudioHardwareMSM76XXA( 144): rpc_snd_set_device(3, 1, 1)

W/AudioHardwareMSM76XXA( 144): rpc_snd_set_device(5, 3, 1, 1)

------------------unplug headphone------------------

I/AudioHardwareMSM76XXA( 144): Routing audio to Speakerphone

E/AudioHardwareMSM76XXA( 144): [LGE] Final outputDevices 2 new:0 mCur:3

W/AudioHardwareMSM76XXA( 144): rpc_snd_set_device(0, 1, 1)

W/AudioHardwareMSM76XXA( 144): rpc_snd_set_device(22, 23, 1, 1)