[HTC Sensation] david.f.girault:
audio bug

Hi all. Still on 20151210 version, and have a bug when I plug the iBeats hears-plug in my XE:

12-14 10:08:20.042 566 605 V WiredAccessoryManager: Headset UEVENT: {SUBSYSTEM=switch, SEQNUM=3720, ACTION=change, SWITCH_STATE=1, SWITCH_NAME=Headset, DEVPATH=/devices/virtual/switch/h2w}
12-14 10:08:20.046 566 605 V WiredAccessoryManager: newName=Headset newState=1 headsetState=1 prev headsetState=0
12-14 10:08:20.046 566 605 I WiredAccessoryManager: MSG_NEW_DEVICE_STATE
12-14 10:08:20.046 566 566 V WiredAccessoryManager: headsetName: connected
12-14 10:08:20.071 13052 13095 I AudioFlinger: openOutput(), module 1 Device 4, SamplingRate 8000, Format 0x000001, Channels 1, flags 1
12-14 10:08:20.071 13052 13095 D AudioHardwareMSM8660: AudioHardware::openOutputStream devices 4 format 1 channels 1 samplerate 8000 flags 1
12-14 10:08:20.071 13052 13095 D AudioHardwareMSM8660: SampleRate 44.1k
12-14 10:08:20.071 13052 13095 E AudioHardwareMSM8660: android::status_t android_audio_legacy::AudioHardware::AudioStreamOutMSM8x60::set(android_audio_legacy::AudioHardware*, uint32_t, int*, uint32_t*, uint32_t*): Setting up c
12-14 10:08:20.073 13052 13095 I AudioFlinger: AudioStreamOut::open(), mHalFormatIsLinearPcm = 1
12-14 10:08:20.078 13052 13095 D AudioHardwareMSM8660: SampleRate 44.1k
12-14 10:08:20.078 13052 13095 D AudioHardwareMSM8660: Bufsize 4800
12-14 10:08:20.078 13052 13095 I AudioFlinger: HAL output buffer size 1200 frames, normal sink buffer size 1200 frames
12-14 10:08:20.078 13052 13095 D AudioHardwareMSM8660: Bufsize 4800
12-14 10:08:20.078 13052 13095 D AudioHardwareMSM8660: SampleRate 44.1k
12-14 10:08:20.078 13052 13095 D AudioHardwareMSM8660: Bufsize 4800
12-14 10:08:20.078 13052 13095 D AudioHardwareMSM8660: SampleRate 44.1k
12-14 10:08:20.079 13052 14543 I AudioFlinger: AudioFlinger's thread 0xaf578000 ready to run
12-14 10:08:20.086 13052 13095 I AudioFlinger: openOutput(), module 1 Device 4, SamplingRate 8000, Format 0x1000000, Channels 1, flags 1
12-14 10:08:20.087 13052 13095 D AudioHardwareMSM8660: AudioHardware::openOutputStream devices 4 format 16777216 channels 1 samplerate 8000 flags 1
12-14 10:08:20.087 13052 13095 D AudioHardwareMSM8660: SampleRate 44.1k
12-14 10:08:20.087 13052 13095 E AudioHardwareMSM8660: android::status_t android_audio_legacy::AudioHardware::AudioStreamOutMSM8x60::set(android_audio_legacy::AudioHardware*, uint32_t, int*, uint32_t*, uint32_t*): Setting up c
12-14 10:08:20.087 13052 13095 I AudioFlinger: AudioStreamOut::open(), mHalFormatIsLinearPcm = 1
12-14 10:08:20.087 13052 13095 D AudioHardwareMSM8660: SampleRate 44.1k
12-14 10:08:20.087 13052 13095 D AudioHardwareMSM8660: Bufsize 4800
12-14 10:08:20.087 13052 13095 I AudioFlinger: HAL output buffer size 1200 frames, normal sink buffer size 1200 frames
12-14 10:08:20.087 13052 13095 D AudioHardwareMSM8660: Bufsize 4800
12-14 10:08:20.087 13052 13095 D AudioHardwareMSM8660: SampleRate 44.1k
12-14 10:08:20.087 13052 13095 D AudioHardwareMSM8660: Bufsize 4800
12-14 10:08:20.087 13052 13095 D AudioHardwareMSM8660: SampleRate 44.1k
12-14 10:08:20.087 13052 13089 E bt_a2dp_hw: adev_set_parameters: ERROR: set param called even when stream out is null
12-14 10:08:20.100 13052 14544 I AudioFlinger: AudioFlinger's thread 0xaf57a000 ready to run
12-14 10:08:20.113 13052 13095 D AudioHardwareMSM8660: closeOutputStream called
12-14 10:08:20.113 13052 13095 W AudioHardwareMSM8660: Attempt to close invalid output stream
12-14 10:08:20.129 13052 13095 D AudioHardwareMSM8660: closeOutputStream called
--------- beginning of crash
12-14 10:08:20.130 13052 13091 F libc : Fatal signal 11 (SIGSEGV), code 1, fault addr 0x18 in tid 13091 (AudioOut_2)
12-14 10:08:20.138 208 208 I DEBUG : property debug.db.uid not set; NOT waiting for gdb.
12-14 10:08:20.139 208 208 I DEBUG : HINT: adb shell setprop debug.db.uid 100000
12-14 10:08:20.139 208 208 I DEBUG : HINT: adb forward tcp:5039 tcp:5039
12-14 10:08:20.151 208 208 F DEBUG : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
12-14 10:08:20.151 208 208 F DEBUG : Build fingerprint: 'tmous/htc_pyramid/pyramid:4.0.3/IML74K/356011.14:user/release-keys'
12-14 10:08:20.151 208 208 F DEBUG : Revision: '0'
12-14 10:08:20.151 208 208 F DEBUG : ABI: 'arm'
12-14 10:08:20.152 208 208 F DEBUG : pid: 13052, tid: 13091, name: AudioOut_2 >>> /system/bin/mediaserver <<<
12-14 10:08:20.152 208 208 F DEBUG : signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x18
12-14 10:08:20.152 566 697 W NativeCrashListener: Couldn't find ProcessRecord for pid 13052
12-14 10:08:20.384 208 208 F DEBUG : r0 00000003 r1 b25747d0 r2 b2575a98 r3 00000000
12-14 10:08:20.384 208 208 E DEBUG : AM write failed: Broken pipe
12-14 10:08:20.384 208 208 F DEBUG : r4 00000000 r5 b6015a00 r6 00000000 r7 b2578c94
12-14 10:08:20.384 208 208 F DEBUG : r8 b25747d0 r9 b6015a5c sl b1840000 fp b1841c88
12-14 10:08:20.384 208 208 F DEBUG : ip 00000000 sp b2249708 lr 00000000 pc b256e35c cpsr 60070010
12-14 10:08:20.458 208 208 F DEBUG :
12-14 10:08:20.458 208 208 F DEBUG : backtrace:
12-14 10:08:20.458 208 208 F DEBUG : #00 pc 0000b35c /system/lib/hw/audio.primary.msm8660.so (android_audio_legacy::AudioHardware::doRouting(android_audio_legacy::AudioHardware::AudioStreamInMSM8x60*, unsigned int)+
12-14 10:08:20.458 208 208 F DEBUG : #01 pc 0000dc98 /system/lib/hw/audio.primary.msm8660.so (android_audio_legacy::AudioHardware::AudioStreamOutMSM8x60::setParameters(android::String8 const&)+128)
12-14 10:08:20.458 208 208 F DEBUG : #02 pc 0000f0d0 /system/lib/hw/audio.primary.msm8660.so
12-14 10:08:20.458 208 208 F DEBUG : #03 pc 0002d0e5 /system/lib/libaudioflinger.so
12-14 10:08:20.458 208 208 F DEBUG : #04 pc 0002d153 /system/lib/libaudioflinger.so
12-14 10:08:20.458 208 208 F DEBUG : #05 pc 0003100f /system/lib/libaudioflinger.so
12-14 10:08:20.459 208 208 F DEBUG : #06 pc 000335df /system/lib/libaudioflinger.so
12-14 10:08:20.459 208 208 F DEBUG : #07 pc 000101c1 /system/lib/libutils.so (android::Thread::_threadLoop(void*)+112)
12-14 10:08:20.459 208 208 F DEBUG : #08 pc 0003f983 /system/lib/libc.so (__pthread_start(void*)+30)
12-14 10:08:20.459 208 208 F DEBUG : #09 pc 00019efd /system/lib/libc.so (__start_thread+6)
12-14 10:08:21.112 208 208 F DEBUG :
12-14 10:08:21.112 208 208 F DEBUG : Tombstone written to: /data/tombstones/tombstone_01
12-14 10:08:21.122 199 199 I ServiceManager: service 'media.audio_flinger' died
12-14 10:08:21.122 199 199 I ServiceManager: service 'media.player' died
12-14 10:08:21.122 199 199 I ServiceManager: service 'media.resource_manager' died
12-14 10:08:21.122 199 199 I ServiceManager: service 'media.camera' died
12-14 10:08:21.122 199 199 I ServiceManager: service 'media.audio_policy' died
12-14 10:08:21.122 199 199 I ServiceManager: service 'media.radio' died
12-14 10:08:21.122 199 199 I ServiceManager: service 'media.sound_trigger_hw' died
12-14 10:08:21.122 692 1411 W IMediaDeathNotifier: media server died
12-14 10:08:21.123 692 1411 E MediaPlayer: error (100, 0)
12-14 10:08:21.123 11477 11489 W IMediaDeathNotifier: media server died
12-14 10:08:21.123 11477 11489 E MediaPlayer: error (100, 0)
12-14 10:08:21.125 566 831 W AudioSystem: AudioPolicyService server died!
12-14 10:08:21.125 13874 13885 W AudioSystem: AudioPolicyService server died!
12-14 10:08:21.126 692 14242 W AudioSystem: AudioPolicyService server died!
12-14 10:08:21.142 566 636 I ServiceManager: Waiting for service media.audio_policy...
12-14 10:08:21.160 11477 11489 W MessageQueue: Handler (android.media.MediaPlayer$EventHandler) {b3ad199} sending message to a Handler on a dead thread
12-14 10:08:21.160 11477 11489 W MessageQueue: java.lang.IllegalStateException: Handler (android.media.MediaPlayer$EventHandler) {b3ad199} sending message to a Handler on a dead thread
12-14 10:08:21.160 11477 11489 W MessageQueue: at android.os.MessageQueue.enqueueMessage(MessageQueue.java:543)
12-14 10:08:21.160 11477 11489 W MessageQueue: at android.os.Handler.enqueueMessage(Handler.java:631)
12-14 10:08:21.160 11477 11489 W MessageQueue: at android.os.Handler.sendMessageAtTime(Handler.java:600)
12-14 10:08:21.160 11477 11489 W MessageQueue: at android.os.Handler.sendMessageDelayed(Handler.java:570)
12-14 10:08:21.160 11477 11489 W MessageQueue: at android.os.Handler.sendMessage(Handler.java:507)
12-14 10:08:21.160 11477 11489 W MessageQueue: at android.media.MediaPlayer.postEventFromNative(MediaPlayer.java:2988)
12-14 10:08:21.160 692 1411 W MessageQueue: Handler (android.media.MediaPlayer$EventHandler) {b42cd0c} sending message to a Handler on a dead thread
12-14 10:08:21.160 692 1411 W MessageQueue: java.lang.IllegalStateException: Handler (android.media.MediaPlayer$EventHandler) {b42cd0c} sending message to a Handler on a dead thread
12-14 10:08:21.160 692 1411 W MessageQueue: at android.os.MessageQueue.enqueueMessage(MessageQueue.java:543)
12-14 10:08:21.160 692 1411 W MessageQueue: at android.os.Handler.enqueueMessage(Handler.java:631)
12-14 10:08:21.160 692 1411 W MessageQueue: at android.os.Handler.sendMessageAtTime(Handler.java:600)
12-14 10:08:21.160 692 1411 W MessageQueue: at android.os.Handler.sendMessageDelayed(Handler.java:570)
12-14 10:08:21.160 692 1411 W MessageQueue: at android.os.Handler.sendMessage(Handler.java:507)
12-14 10:08:21.160 692 1411 W MessageQueue: at android.media.MediaPlayer.postEventFromNative(MediaPlayer.java:2988)
12-14 10:08:21.177 11477 12591 W AudioSystem: AudioFlinger server died!
12-14 10:08:21.178 692 739 W AudioSystem: AudioFlinger server died!
12-14 10:08:21.178 566 1184 W AudioSystem: AudioFlinger server died!
12-14 10:08:21.184 566 583 I BootReceiver: Copying /data/tombstones/tombstone_01 to DropBox (SYSTEM_TOMBSTONE)
12-14 10:08:21.925 14557 14557 I mediaserver: ServiceManager: 0xb5fce120
12-14 10:08:21.925 14557 14557 I AudioFlinger: Using default 3000 mSec as standby time.
12-14 10:08:21.928 14557 14557 I CameraService: CameraService started (pid=14557)
12-14 10:08:21.928 14557 14557 I CameraService: CameraService process starting
12-14 10:08:21.965 14557 14557 I mediaserver: type=1400 audit(0.0:154): avc: denied { execmod } for path="/system/lib/libmmjpeg.so" dev="mmcblk0p22" ino=1274 scontext=u:r:mediaserver:s0 tcontext=u:object_r:system_file:s0 tclas
12-14 10:08:21.972 14557 14557 W linker : /system/lib/libmmjpeg.so has text relocations. This is wasting memory and prevents security hardening. Please fix.
12-14 10:08:21.973 14557 14557 W linker : /system/lib/libmmstillomx.so has text relocations. This is wasting memory and prevents security hardening. Please fix.
12-14 10:08:21.973 14557 14557 W linker : /system/lib/libimage-jpeg-enc-omx-comp.so has text relocations. This is wasting memory and prevents security hardening. Please fix.
12-14 10:08:21.978 14557 14557 W linker : /system/lib/libHTC_DIS.so has text relocations. This is wasting memory and prevents security hardening. Please fix.
12-14 10:08:21.979 14557 14557 W linker : /system/lib/libmmipl.so has text relocations. This is wasting memory and prevents security hardening. Please fix.
12-14 10:08:21.984 14557 14557 W linker : /system/lib/libcameraasd.so has text relocations. This is wasting memory and prevents security hardening. Please fix.
12-14 10:08:21.984 14557 14557 W linker : /system/lib/libgemini.so has text relocations. This is wasting memory and prevents security hardening. Please fix.
12-14 10:08:21.984 14557 14557 W linker : /system/lib/libimage-omx-common.so has text relocations. This is wasting memory and prevents security hardening. Please fix.
12-14 10:08:22.001 14557 14557 I CameraService: Loaded "msm8660 Camera Wrapper" camera module
12-14 10:08:22.001 14557 14557 I CameraFlashlight: Opening camera 0
12-14 10:08:22.142 566 636 I ServiceManager: Waiting for service media.audio_policy...
12-14 10:08:22.152 692 1053 I CameraManagerGlobal: Connecting to camera service
12-14 10:08:22.153 692 1053 E CameraManagerGlobal: Camera service is unavailable
12-14 10:08:22.242 221 14559 W linker : /system/lib/libchromatix_s5k3h1gx_zsl.so has text relocations. This is wasting memory and prevents security hardening. Please fix.
12-14 10:08:22.235 14559 14559 I mm-qcamera-daem: type=1400 audit(0.0:155): avc: denied { execmod } for path="/system/lib/libchromatix_s5k3h1gx_zsl.so" dev="mmcblk0p22" ino=1139 scontext=u:r:mm-qcamerad:s0 tcontext=u:object_r:
12-14 10:08:22.259 221 14559 W linker : /system/lib/libcam_oem_plugin.so has text relocations. This is wasting memory and prevents security hardening. Please fix.
12-14 10:08:22.255 14559 14559 I mm-qcamera-daem: type=1400 audit(0.0:156): avc: denied { write } for name="/" dev="mmcblk0p23" ino=2 scontext=u:r:mm-qcamerad:s0 tcontext=u:object_r:system_data_file:s0 tclass=dir permissive=1
12-14 10:08:22.255 14559 14559 I mm-qcamera-daem: type=1400 audit(0.0:157): avc: denied { remove_name } for name="cam_socket0" dev="mmcblk0p23" ino=13 scontext=u:r:mm-qcamerad:s0 tcontext=u:object_r:system_data_file:s0 tclass=
12-14 10:08:22.265 14559 14559 I mm-qcamera-daem: type=1400 audit(0.0:158): avc: denied { add_name } for name="cam_socket0" scontext=u:r:mm-qcamerad:s0 tcontext=u:object_r:system_data_file:s0 tclass=dir permissive=1
12-14 10:08:22.313 14557 14568 D libEGL : loaded /system/lib/egl/libEGL_adreno200.so
12-14 10:08:22.315 566 1525 I : mpu3050_resume: Resuming to 0070
12-14 10:08:22.315 566 1525 I : mpu3050_suspend: suspending sensors to 0070
12-14 10:08:22.316 566 1525 I : mpu3050_suspend: Will resume next to 0070
12-14 10:08:22.322 14557 14568 D libEGL : loaded /system/lib/egl/libGLESv1_CM_adreno200.so
12-14 10:08:22.335 566 1525 I MPL-ml : Actual ODR: 25 Hz
12-14 10:08:22.347 566 2924 I : mpu3050_resume: Resuming to 0070
12-14 10:08:22.347 566 2924 I : mpu3050_suspend: suspending sensors to 0070
12-14 10:08:22.347 566 2924 I : mpu3050_suspend: Will resume next to 0070
12-14 10:08:22.362 14557 14568 D libEGL : loaded /system/lib/egl/libGLESv2_adreno200.so
12-14 10:08:22.365 566 2924 I MPL-ml : Actual ODR: 25 Hz
...

Add so on. AudioFlinger crash with SIGSEGV every 3-5s until I unplug my beat headset.