[HTC Incredible S] htcInc88:
I have spent +10 hours trying to figure this out and my hair is starting to fall. I have read way too many pages of on forums, and I should be doing homework and readings rather than fixing this.

I flashed my phone with 3 different roms, kitkat, 2 different cm, 11 and 10.1, none of them made a difference.

Right now I am on 10.1 and my headset works, I can listen to music just fine but the buttons do nothing, we are talking about a wired headset.

Then I click the play/forward/backward button a bunch of times and it will start to register with the phone, so I will be able to use the buttons, but I cant hear through the headset, it plays music from my phone speaker.

I tried to do a debug, but adb logcat is stuck on -waiting for device-. I tried to fix that until I discovered an app called Broadcast Monitor. This app shows me some things.

When I plug in my headphones it will type the following:

android.intent.action.HEADSET_PLUG

state: 1

name:Headset

microphone: 0

When I disconnect them:

android.intent.action.HEADSET_PLUG

state: 0

name:Headset

microphone: 0

When I press the buttons immediately after plugging my headset in, nothing is registered.

If I play with the buttons long enough after a while it will type this:

2014-03-12 12:39:09

android.intent.action.HEADSET_PLUG

state: 0

name:Headset

microphone: 0

2014-03-12 12:39:14

android.media.action.OPEN_AUDIO_EFFECT_CONTROL_SESSION

android.media.extra.AUDIO_SESSION: 166

android.media.extra.PACKAGE_NAME: com.jrtstudio.music

2014-03-12 12:39:14

android.media.action.OPEN_AUDIO_EFFECT_CONTROL_SESSION

android.media.extra.AUDIO_SESSION: 166

android.media.extra.PACKAGE_NAME: com.jrtstudio.music

I tried it a second time, I got something similar but there was music in the earphones for a moment:

2014-03-12 12:57:54

android.media.action.OPEN_AUDIO_EFFECT_CONTROL_SESSION

android.media.extra.AUDIO_SESSION: 206

android.media.extra.PACKAGE_NAME: com.jrtstudio.music

2014-03-12 12:57:54

android.media.action.OPEN_AUDIO_EFFECT_CONTROL_SESSION

android.media.extra.AUDIO_SESSION: 206

android.media.extra.PACKAGE_NAME: com.jrtstudio.music

2014-03-12 12:57:54

android.media.extra.AUDIO_BECOMING_NOISY

2014-03-12 12:57:55

android.media.action.OPEN_AUDIO_EFFECT_CONTROL_SESSION

android.media.extra.AUDIO_SESSION: 206

android.media.extra.PACKAGE_NAME: com.jrtstudio.music

2014-03-12 12:57:55

android.media.action.OPEN_AUDIO_EFFECT_CONTROL_SESSION

android.media.extra.AUDIO_SESSION: 206

android.media.extra.PACKAGE_NAME: com.jrtstudio.music

2014-03-12 12:57:56

android.intent.action.HEADSET_PLUG

state: 0

name:Headset

microphone: 0

Then I reset the monitor and it shows the following, note that this is after I got the buttons to work and no sound from the headset:

2014-03-12 01:01:22

android.media.SCO_AUDIO_STATE_CHANGED

android.media.EXTRA_RINGER_MODE: 0

2014-03-12 01:01:22

android.media.ACTION_SCO_AUDIO_STATE_UPDATED

android.media.extra.SCO_AUDIO_PREVIOUS_STATE:-1

android-media.extra.SCO_AUDIO_STATE:0

2014-03-12 01:01:22

android.intent.action.HEADSET_PLUG

state: 0

microphone: 0

name: Headset

And if I press buttons after this:

2014-03-12 01:01:29

android.media.action.OPEN_AUDIO_EFFECT_CONTROL_SESSION

android.media.extra.AUDIO_SESSION: 219

android.media.extra.PACKAGE_NAME: com.jrtstudio.music

2014-03-12 01:01:29

android.media.action.OPEN_AUDIO_EFFECT_CONTROL_SESSION

android.media.extra.AUDIO_SESSION: 219

android.media.extra.PACKAGE_NAME: com.jrtstudio.music

2014-03-12 01:01:36

android.media.action.OPEN_AUDIO_EFFECT_CONTROL_SESSION

android.media.extra.AUDIO_SESSION: 219

android.media.extra.PACKAGE_NAME: com.jrtstudio.music

2014-03-12 01:01:36

android.media.action.OPEN_AUDIO_EFFECT_CONTROL_SESSION

android.media.extra.AUDIO_SESSION: 219

android.media.extra.PACKAGE_NAME: com.jrtstudio.music

Ive checked the forums and im not the only htc inc s user to experience this, and i have wiped dalvik/cache/data for every single flash i did, i even tried changing cwm from 5.0.2.0 to 6.0.4.5 to 6.0.4.7. Right now it is 5.0.2.0 and I installed CyanVivo_10.1_08.15_VDEC Fix with gapps-jb-20130301-signed.