[HTC Sensation] david.f.girault:
Yes it work well in previous release (at least for the 20151206) before my upgrade to 20151210.

I just try your audio_policy.conf. Without rebooting, plug my headset result in a strom of message in adb logcat.

So I reboot, and them, all audio is working well. My headset is working again. Logcat after reboot when connecting headset:

12-14 11:33:39.737 565 610 V WiredAccessoryManager: Headset UEVENT: {SUBSYSTEM=switch, SEQNUM=3219, ACTION=change, SWITCH_STATE=
12-14 11:33:39.766 565 610 V WiredAccessoryManager: newName=Headset newState=1 headsetState=1 prev headsetState=0
12-14 11:33:39.772 565 610 I WiredAccessoryManager: MSG_NEW_DEVICE_STATE
12-14 11:33:39.774 565 565 V WiredAccessoryManager: headsetName: connected
12-14 11:33:39.848 211 592 E bt_a2dp_hw: adev_set_parameters: ERROR: set param called even when stream out is null
12-14 11:33:39.850 211 594 D AudioHardwareMSM8660: outputDevices = 0
12-14 11:33:39.858 211 1024 D AudioHardwareMSM8660: AudioHardware::openInputStream devices 100000 format 1 channels 49168 sampler
12-14 11:33:39.868 211 1024 D AudioHardwareMSM8660: AudioHardware::getInputBufferSize sampleRate 48000 format 1 channelCount 1
12-14 11:33:39.869 211 1024 D AudioHardwareMSM8660: getInputBufferSize: sampleRate: 48000 channelCount: 1 bufferSize: 2048
12-14 11:33:39.881 211 1024 I AudioHardwareMSM8660: msm8x60_set_audpre_params not present
12-14 11:33:39.892 211 1024 E AudioFlinger: not enough memory for pipe buffer size=12288
12-14 11:33:39.893 211 592 E bt_a2dp_hw: adev_set_parameters: ERROR: set param called even when stream out is null
12-14 11:33:39.897 211 3477 I AudioFlinger: AudioFlinger's thread 0xb1900000 ready to run
12-14 11:33:39.897 211 1024 D AudioHardwareMSM8660: AudioStreamInMSM8x60::standby()
12-14 11:33:39.897 211 1024 D AudioHardwareMSM8660: aic3254_config: device 1 enabled 0
12-14 11:33:39.897 211 1024 D AudioHardwareMSM8660: aic3254_config: loading effect Playback_Default
12-14 11:33:39.897 565 574 I art : Background partial concurrent mark sweep GC freed 25582(2036KB) AllocSpace objects, 2(40K
12-14 11:33:39.903 211 1024 I HTC Acoustic: set_audio_effect: Playback_Default
12-14 11:33:39.903 211 1024 I HTC Acoustic: set_audio_effect: match with name Playback_Default (1)
12-14 11:33:39.907 211 1024 I HTC Acoustic: found enabled DSP firmwares and return 0
12-14 11:33:39.907 211 1024 D AudioHardwareMSM8660: do_aic3254_control device: 1 mode: 0 record: 0
12-14 11:33:39.956 1088 1088 I HeadsetService: Headset=true; Bluetooth=false ; USB=false; Speaker=false
12-14 11:33:39.962 1088 1088 I HeadsetService: Headset=true; Bluetooth=false ; USB=false; Speaker=false
12-14 11:33:39.962 1088 1088 I HeadsetService: Preferences updated.
12-14 11:33:43.243 565 1939 D NetlinkSocketObserver: NeighborEvent{elapsedMs=222797, 192.168.1.2, [0016179DB9D2], RTM_NEWNEIGH, N
12-14 11:33:49.482 565 1939 D NetlinkSocketObserver: NeighborEvent{elapsedMs=229037, 192.168.0.1, [0018E7FBFFBE], RTM_NEWNEIGH, N
12-14 11:33:50.211 565 587 I PowerManagerService: Going to sleep due to screen timeout (uid 1000)...
12-14 11:33:50.232 565 587 I PowerManagerService: Sleeping (uid 1000)...
12-14 11:33:50.984 565 587 V KeyguardServiceDelegate: onScreenTurnedOff()
12-14 11:33:50.990 565 585 I DisplayManagerService: Display device changed state: "Écran intégré", OFF
12-14 11:33:57.570 565 625 I PowerManagerService: Waking up from sleep (uid 1000)...
12-14 11:33:57.572 565 565 V KeyguardServiceDelegate: onStartedWakingUp()
12-14 11:33:57.573 565 587 I DisplayPowerController: Blocking screen on until initial contents have been drawn.
12-14 11:33:57.573 565 587 V KeyguardServiceDelegate: onScreenTurnedOn(showListener = com.android.server.policy.PhoneWindowManager$2@dbc4ae5)
12-14 11:33:57.624 565 633 E native : do suspend false
12-14 11:33:57.643 211 1024 E bt_a2dp_hw: adev_set_parameters: ERROR: set param called even when stream out is null
12-14 11:33:57.647 565 1442 V KeyguardServiceDelegate: **** SHOWN CALLED ****
12-14 11:33:57.653 565 633 D WifiConfigStore: No blacklist allowed without epno enabled
12-14 11:33:57.704 200 200 D SurfaceFlinger: Set power mode=2, type=0 flinger=0xb6a64000
12-14 11:33:57.704 200 200 D qdhwcomposer: hwc_setPowerMode: Setting mode 2 on display: 0
12-14 11:33:57.705 565 585 I DisplayManagerService: Display device changed state: "Écran intégré", ON
12-14 11:33:57.742 1121 1516 W OpenGLRenderer: Incorrectly called buildLayer on View: FrameLayout, destroying layer...
12-14 11:33:57.921 565 580 I : mpu3050_resume: Resuming to 0070
12-14 11:33:57.922 565 587 I DisplayPowerController: Unblocked screen on after 349 ms
12-14 11:33:59.595 211 594 D AudioHardwareMSM8660: outputDevices = 4
12-14 11:33:59.595 211 594 I AudioHardwareMSM8660: Routing audio to Wired Headset
12-14 11:33:59.595 211 594 D AudioHardwareMSM8660: aic3254_config: device 2 enabled 0
12-14 11:33:59.595 211 594 D AudioHardwareMSM8660: do_aic3254_control device: 2 mode: 0 record: 0
12-14 11:33:59.598 211 594 D AudioHardwareMSM8660: new_rx = 5
12-14 11:33:59.598 211 594 D AudioHardwareMSM8660: new_tx = 3
12-14 11:33:59.598 211 594 D AudioHardwareMSM8660: updateDeviceInfo() called for default case
12-14 11:33:59.598 211 594 D AudioHardwareMSM8660: updateDeviceInfo: E
12-14 11:33:59.598 211 594 D AudioHardwareMSM8660: simple device switch
12-14 11:33:59.599 211 594 D AudioHardwareMSM8660: update TPA2051_SET_MODE to mode 2 success
12-14 11:33:59.599 211 594 D AudioHardwareMSM8660: mCurSndDevice = 2
12-14 11:33:59.599 211 594 D AudioHardwareMSM8660: Bufsize 4800
12-14 11:33:59.599 211 594 D AudioHardwareMSM8660: SampleRate 44.1k
12-14 11:33:59.601 211 592 E AudioHardwareMSM8660: unknown stream
12-14 11:33:59.608 687 687 D PhoneStatusBar: disable: < expand icons* alerts system_info* back HOME RECENT clock SEARCH quick_settings >
12-14 11:33:59.625 211 594 D AudioHardwareMSM8660: SampleRate 44.1k
12-14 11:33:59.625 211 594 D AudioHardwareMSM8660: Bufsize 4800
12-14 11:33:59.631 211 594 D AudioFlinger: mixer(0xb16c0000) throttle end: throttle time(60)
12-14 11:33:59.635 211 594 E AudioHardwareMSM8660: write(): dec_id = 1 cur_rx = 4
12-14 11:33:59.635 211 594 D AudioHardwareMSM8660: do_aic3254_control device: 2 mode: 0 record: 0
12-14 11:33:59.635 211 594 D AudioHardwareMSM8660: do_aic3254_control: set aic3254 rx to 12
12-14 11:33:59.645 211 594 E AudioHardwareMSM8660: cur_rx for pcm playback = 4
12-14 11:33:59.685 1654 1654 V UserPresentBroadcastReceiver: Received Intent { act=android.intent.action.USER_PRESENT flg=0x24000010 cmp=com.google.android.gms/.auth.trustagent.UserPresentBroadcastReceiver }.
12-14 11:33:59.713 211 594 D ACDB-LOADER: ACDB -> send_audio_cal, acdb_id = 10, path = 0
12-14 11:33:59.713 211 594 D ACDB-LOADER: ACDB -> send_adm_topology
12-14 11:33:59.713 211 594 D ACDB-LOADER: ACDB -> ACDB_CMD_GET_AUDPROC_COMMON_TOPOLOGY_ID
12-14 11:33:59.713 211 594 D ACDB-LOADER: ACDB -> send_audtable
12-14 11:33:59.713 211 594 D ACDB-LOADER: ACDB -> ACDB_CMD_GET_AUDPROC_COMMON_TABLE
12-14 11:33:59.713 211 594 D ACDB-LOADER: ACDB -> AUDIO_SET_AUDPROC_CAL
12-14 11:33:59.714 211 594 D ACDB-LOADER: ACDB -> send_audvoltable
12-14 11:33:59.714 211 594 D ACDB-LOADER: ACDB -> ACDB_CMD_GET_AUDPROC_GAIN_DEP_VOLTBL_STEP_COPP
12-14 11:33:59.719 211 594 D ACDB-LOADER: ACDB -> AUDIO_SET_AUDPROC_VOL_CAL
12-14 11:33:59.737 211 594 D AudioHardwareMSM8660: addToTable stream 1
12-14 11:33:59.818 211 594 D AudioHardwareMSM8660: Bufsize 4800
12-14 11:33:59.818 211 594 D AudioHardwareMSM8660: SampleRate 44.1k
12-14 11:33:59.832 211 594 D AudioHardwareMSM8660: Bufsize 4800
12-14 11:33:59.832 211 594 D AudioHardwareMSM8660: SampleRate 44.1k
12-14 11:33:59.833 211 594 D AudioHardwareMSM8660: Bufsize 4800
12-14 11:33:59.833 211 594 D AudioHardwareMSM8660: SampleRate 44.1k
12-14 11:33:59.847 211 594 D AudioHardwareMSM8660: Bufsize 4800
12-14 11:33:59.847 211 594 D AudioHardwareMSM8660: SampleRate 44.1k
12-14 11:33:59.857 211 594 D AudioHardwareMSM8660: Bufsize 4800
12-14 11:33:59.857 211 594 D AudioHardwareMSM8660: SampleRate 44.1k
12-14 11:34:02.817 211 594 D AudioHardwareMSM8660: deleteFromTable stream 1
12-14 11:34:02.817 211 594 D AudioHardwareMSM8660: updateDeviceInfo: E
12-14 11:34:02.817 211 594 D AudioHardwareMSM8660: simple device switch
12-14 11:34:03.235 211 594 D AudioHardwareMSM8660: do_aic3254_control device: 2 mode: 0 record: 0
12-14 11:34:03.235 211 594 D AudioHardwareMSM8660: do_aic3254_control: set aic3254 rx to 29
12-14 11:34:03.632 211 594 I AudioHardwareMSM8660: aic3254 powered off

Logcat when playing :

12-14 11:34:08.733 565 1165 I MediaFocusControl: AudioFocus requestAudioFocus() from android.media.AudioManager@3b6bed1com.cyanogenmod.eleven.MusicPlaybackService$3@9991d36 req=1flags=0x0
12-14 11:34:08.808 1088 1088 I HeadsetService: New audio session: 12
12-14 11:34:08.879 211 596 D NuPlayerDriver: reset(0xb6096ea0)
12-14 11:34:08.879 211 596 D NuPlayerDriver: notifyListener_l(0xb6096ea0), (8, 0, 0)
12-14 11:34:08.899 211 1644 W AMessage: failed to post message as target looper for handler 0 is gone.
12-14 11:34:08.912 211 1644 D NuPlayerDriver: notifyResetComplete(0xb6096ea0)
12-14 11:34:08.926 1498 1498 E MediaPlayer-JNI: JNIMediaPlayerFactory: bIsQCMediaPlayerPresent 0
12-14 11:34:08.926 1498 1498 E MediaPlayer-JNI: JNIMediaPlayerFactory: bIsQCMediaPlayerPresent 0
12-14 11:34:09.132 211 3563 I FFmpegExtractor: android-source:0xb1b85480
12-14 11:34:09.546 211 3563 I FFMPEG : [mp3 @ 0xaf797c00] Skipping 0 bytes of junk at 540521.
12-14 11:34:09.788 211 3563 I FFMPEG : [mp3 @ 0xaf797c00] Estimating duration from bitrate, this may be inaccurate
12-14 11:34:09.788 211 3563 I FFMPEG : Input #0, mp3, from 'android-source:0xb1b85480':
12-14 11:34:09.788 211 3563 I FFMPEG : Metadata:
12-14 11:34:09.788 211 3563 I FFMPEG : Duration: 00:03:28.88, start: 0.000000, bitrate: 212 kb/s
12-14 11:34:09.793 211 3563 I FFMPEG : Stream #0:0: Audio: mp3, 44100 Hz, stereo, s16p, 192 kb/s
12-14 11:34:09.794 211 3563 I FFMPEG : Stream #0:1: Video: png, rgb24(pc), 500x486, 90k tbr, 90k tbn, 90k tbc
12-14 11:34:09.794 211 3563 I FFMPEG : Metadata:
12-14 11:34:09.794 211 3563 I FFMPEG : comment : Cover (front)
12-14 11:34:09.794 211 3563 D FFmpegExtractor: FFmpegExtrator, url: android-source:0xb1b85480, format_name: mp3, format_long_name: MP2/3 (MPEG audio layer 2/3)
12-14 11:34:09.794 211 3563 D FFmpegExtractor: suppoted codec(mp3) by official Stagefright
12-14 11:34:09.795 211 3563 D FFmpegExtractor: ffmpeg detected media content as 'audio/mpeg' with confidence 0.08
12-14 11:34:09.815 211 3562 D NuPlayerDriver: notifyListener_l(0xb6096ea0), (1, 0, 0)
12-14 11:34:09.816 1498 1498 D MediaPlayer: setSubtitleAnchor in MediaPlayer
12-14 11:34:09.844 565 574 I art : Background sticky concurrent mark sweep GC freed 44578(3MB) AllocSpace objects, 9(212KB) LOS objects, 21% free, 13MB/17MB, paused 2.410ms total 168.731ms
12-14 11:34:09.889 211 1024 D NuPlayerDriver: start(0xb6096a20), state is 4, eos is 0
12-14 11:34:10.202 211 3567 E OMXNodeInstance: setConfig(35:google.mp3.decoder, ConfigPriority(0x6f800002)) ERROR: Undefined(0x80001001)
12-14 11:34:10.202 211 3567 I ACodec : codec does not support config priority (err -2147483648)
12-14 11:34:10.223 211 3567 I MediaCodec: MediaCodec will operate in async mode
12-14 11:34:10.232 211 3565 D AudioHardwareMSM8660: Bufsize 4800
12-14 11:34:10.232 211 3565 D AudioHardwareMSM8660: SampleRate 44.1k
12-14 11:34:10.238 211 594 D AudioHardwareMSM8660: outputDevices = 4
12-14 11:34:10.238 211 594 I AudioHardwareMSM8660: Routing audio to Wired Headset
12-14 11:34:10.239 211 1600 D NuPlayerDriver: notifyListener_l(0xb6096a20), (6, 0, 0)
12-14 11:34:10.265 211 594 D AudioHardwareMSM8660: SampleRate 44.1k
12-14 11:34:10.265 211 594 D AudioHardwareMSM8660: Bufsize 4800
12-14 11:34:10.276 211 594 E AudioHardwareMSM8660: write(): dec_id = 1 cur_rx = 4
12-14 11:34:10.276 211 594 D AudioHardwareMSM8660: do_aic3254_control device: 2 mode: 0 record: 0
12-14 11:34:10.276 211 594 D AudioHardwareMSM8660: do_aic3254_control: set aic3254 rx to 12
12-14 11:34:10.281 211 594 E AudioHardwareMSM8660: cur_rx for pcm playback = 4
12-14 11:34:10.353 211 594 D ACDB-LOADER: ACDB -> send_audio_cal, acdb_id = 10, path = 0
12-14 11:34:10.353 211 594 D ACDB-LOADER: ACDB -> send_adm_topology
12-14 11:34:10.353 211 594 D ACDB-LOADER: ACDB -> ACDB_CMD_GET_AUDPROC_COMMON_TOPOLOGY_ID
12-14 11:34:10.353 211 594 D ACDB-LOADER: ACDB -> send_audtable
12-14 11:34:10.353 211 594 D ACDB-LOADER: ACDB -> ACDB_CMD_GET_AUDPROC_COMMON_TABLE
12-14 11:34:10.353 211 594 D ACDB-LOADER: ACDB -> AUDIO_SET_AUDPROC_CAL
12-14 11:34:10.353 211 594 D ACDB-LOADER: ACDB -> send_audvoltable
12-14 11:34:10.353 211 594 D ACDB-LOADER: ACDB -> ACDB_CMD_GET_AUDPROC_GAIN_DEP_VOLTBL_STEP_COPP
12-14 11:34:10.354 211 594 D ACDB-LOADER: ACDB -> AUDIO_SET_AUDPROC_VOL_CAL
12-14 11:34:10.370 211 594 D AudioHardwareMSM8660: addToTable stream 1
12-14 11:34:10.381 211 594 D AudioFlinger: mixer(0xb16c0000) throttle end: throttle time(64)
12-14 11:34:10.406 211 594 D AudioFlinger: mixer(0xb16c0000) throttle end: throttle time(9)
12-14 11:34:19.956 211 594 D AudioFlinger: mixer(0xb16c0000) throttle end: throttle time(3)
...
12-14 11:34:46.563 1088 1088 I HeadsetService: Audio session removed: 12
12-14 11:34:46.564 211 1024 D NuPlayerDriver: notifyListener_l(0xb6096a20), (7, 0, 0)
12-14 11:34:46.596 211 594 D AudioHardwareMSM8660: Bufsize 4800
12-14 11:34:46.596 211 594 D AudioHardwareMSM8660: SampleRate 44.1k
12-14 11:34:46.610 211 594 D AudioHardwareMSM8660: Bufsize 4800
12-14 11:34:46.610 211 594 D AudioHardwareMSM8660: SampleRate 44.1k
12-14 11:34:46.625 211 594 D AudioHardwareMSM8660: Bufsize 4800
12-14 11:34:46.626 211 594 D AudioHardwareMSM8660: SampleRate 44.1k
12-14 11:34:46.639 211 594 D AudioHardwareMSM8660: Bufsize 4800
12-14 11:34:46.639 211 594 D AudioHardwareMSM8660: SampleRate 44.1k
12-14 11:34:46.646 211 594 D AudioHardwareMSM8660: Bufsize 4800
12-14 11:34:46.646 211 594 D AudioHardwareMSM8660: SampleRate 44.1k
12-14 11:34:49.586 211 594 D AudioHardwareMSM8660: deleteFromTable stream 1
12-14 11:34:49.587 211 594 D AudioHardwareMSM8660: updateDeviceInfo: E
12-14 11:34:49.587 211 594 D AudioHardwareMSM8660: simple device switch
12-14 11:34:50.011 211 594 D AudioHardwareMSM8660: do_aic3254_control device: 2 mode: 0 record: 0
12-14 11:34:50.011 211 594 D AudioHardwareMSM8660: do_aic3254_control: set aic3254 rx to 29
12-14 11:34:50.425 211 594 I AudioHardwareMSM8660: aic3254 powered off

Great job. Thanks a lot.