Android streaming audio stops (goes to pause) - android

I have a Galaxy S5 with Android version 6.0.1
Power saving mode is "off" and ultra power saving mode is "off"
I've tried three Internet music streaming apps namely: Pandora, SiriusXM and WDET Radio.
In each case music/audio material plays for awhile (approximately a few minutes) and then the audio turns off with the app at "pause" (play button appears and audio will continue when play button is pressed). This can occur anytime, in other words it doesn't occur just at the end of an audio track.
I've searched on this topic and the only suggestion I could find was to make sure the power savings mode were set to off. I do not have the source code to these apps so I can only log what is enabled by the app.
I captured some logcat traces while filtering on "aud". I had tried various filters (and also no filtering) but I couldn't see a pattern until I filtered on "aud".
I have pasted in a segment of the logcat showing the startup of Pandora which ran from 21:33:53 to 21:39 when the app was closed by me. The entry at:
12-29 21:38:03.712 767-1806/? W/MediaFocusControl: AudioFocus audio focus client died
indicates when muted audio was detected (by listening to it). There was no user intervention to cause this. The logcat entry follows:
12-29 21:33:53.332 767-786/? D/AudioService: getStreamVolume 3 index 0
12-29 21:33:53.332 767-1713/? D/AudioService: getStreamVolume 3 index 0
12-29 21:33:53.572 767-1709/? D/AudioService: getStreamVolume 3 index 0
12-29 21:33:54.282 767-786/? D/AudioService: getStreamVolume 3 index 0
12-29 21:33:55.272 767-786/? D/AudioService: getStreamVolume 3 index 0
12-29 21:33:55.282 767-2423/? D/AudioService: getStreamVolume 3 index 0
12-29 21:33:55.862 767-1807/? D/AudioService: getStreamVolume 3 index 0
12-29 21:33:55.872 767-1709/? D/AudioService: getStreamVolume 3 index 0
12-29 21:33:55.872 767-1579/? D/AudioService: getStreamVolume 3 index 0
12-29 21:33:55.872 767-786/? D/AudioService: getStreamVolume 3 index 0
12-29 21:33:56.212 6009-6177/? W/AudioCapabilities: Unsupported mime audio/mpeg-L1
12-29 21:33:56.212 6009-6177/? W/AudioCapabilities: Unsupported mime audio/mpeg-L2
12-29 21:33:56.222 6009-6177/? W/AudioCapabilities: Unsupported mime audio/x-ms-wma
12-29 21:33:56.222 6009-6177/? W/AudioCapabilities: Unsupported mime audio/x-ima
12-29 21:33:56.222 6009-6177/? W/AudioCapabilities: Unsupported mime audio/evrc
12-29 21:33:56.232 6009-6177/? W/AudioCapabilities: Unsupported mime audio/qcelp
12-29 21:33:56.242 6009-6177/? W/AudioCapabilities: Unsupported mime audio/amr-wb-plus
12-29 21:33:56.252 6009-6177/? W/AudioCapabilities: Unsupported mime audio/qcelp
12-29 21:33:56.252 6009-6177/? W/AudioCapabilities: Unsupported mime audio/evrc
12-29 21:33:56.472 338-338/? E/OMXNodeInstance: setParameter(8e:SEC.aac.dec, ParamAudioAndroidAacPresentation(0x6f400003)) ERROR: UnsupportedIndex(0x8000101a)
12-29 21:33:56.492 338-6215/? I/SEC_AAC_DEC: AudioSpecificConfig 0x 13 90
12-29 21:33:56.582 338-6215/? I/SEC_AAC_DEC: AudioSpecificConfig 0x 13 90
12-29 21:33:56.912 338-29996/? W/AudioPolicyIntefaceImpl: Skipped to add effects on session 113
12-29 21:33:56.912 338-29996/? I/APM::AudioPolicyManager: startOutput() output 2, stream 3, session 113
12-29 21:33:56.922 338-945/? D/audio_hw_primary: out_set_parameters: enter: usecase(0: deep-buffer-playback) kvpairs: routing=2
12-29 21:33:56.922 338-945/? D/audio_hw_hfp: audio_extn_hfp_set_parameters: enter
12-29 21:33:56.922 338-945/? V/audio_hw_primary: out_set_parameters: exit: code(0)
12-29 21:33:56.922 338-945/? D/AudioFlinger: setCurDevice() 0x2
12-29 21:33:56.932 338-945/? I/AudioMixer: create resampler src 44100, 2, dst 48000, 2
12-29 21:33:56.932 338-945/? V/audio_hw_primary: start_output_stream: enter: usecase(0: deep-buffer-playback) devices(0x2)
12-29 21:33:56.932 338-945/? V/audio_hw_primary: select_devices: ENTER
12-29 21:33:56.932 338-945/? V/audio_hw_primary: select_devices: usecase(normal)
12-29 21:33:56.942 338-945/? V/audio_hw_primary: select_devices: usecase(PCM_PLAYBACK)
12-29 21:33:56.942 338-945/? D/audio_hw_primary: select_devices: out_snd_device(2: speaker)
12-29 21:33:56.942 338-945/? D/audio_hw_primary: select_devices: in_snd_device(0: dummy)
12-29 21:33:56.942 338-945/? D/ACDB-LOADER: ACDB -> send_audio_cal, acdb_id = 15, path = 0
12-29 21:33:56.942 338-945/? D/ACDB-LOADER: ACDB -> ACDB_CMD_GET_AUDPROC_COMMON_TOPOLOGY_ID
12-29 21:33:56.942 338-945/? D/ACDB-LOADER: ACDB -> ACDB_CMD_GET_AUDPROC_STREAM_TOPOLOGY_ID
12-29 21:33:56.942 338-945/? D/ACDB-LOADER: ACDB -> send_audtable
12-29 21:33:56.942 338-945/? D/ACDB-LOADER: ACDB -> ACDB_CMD_GET_AUDPROC_COMMON_TABLE
[ 12-29 21:33:56.942 338: 945 D/ ]
ACDBFILE_MGR:Read the devices count as zero, please check the acdb file
12-29 21:33:56.942 338-945/? D/ACDB-LOADER: ACDB -> AUDIO_SET_AUDPROC_CAL
12-29 21:33:56.942 338-945/? D/ACDB-LOADER: ACDB -> send_audvoltable
12-29 21:33:56.942 338-945/? D/ACDB-LOADER: ACDB -> ACDB_CMD_GET_AUDPROC_GAIN_DEP_STEP_TABLE
12-29 21:33:56.942 338-945/? D/ACDB-LOADER: ACDB -> AUDIO_SET_AUDPROC_VOL_CAL
12-29 21:33:56.942 338-945/? D/ACDB-LOADER: ACDB -> AUDIO_SET_AFE_CAL
12-29 21:33:56.942 338-945/? V/audio_hw_primary: enable_snd_device: snd_device(2: speaker, speaker)
12-29 21:33:56.942 338-945/? D/audio_route: ++++ audio_route_update_mixer ==============
12-29 21:33:56.942 338-945/? D/audio_route: Setting mixer control: SPK DRV Volume
12-29 21:33:56.942 338-945/? D/audio_route: Setting mixer control: value: 8
12-29 21:33:56.942 338-945/? D/audio_route: Setting mixer control: RX7 Digital Volume
12-29 21:33:56.942 338-945/? D/audio_route: Setting mixer control: value: 79
12-29 21:33:56.942 338-945/? D/audio_route: Setting mixer control: COMP0 Switch
12-29 21:33:56.942 338-945/? D/audio_route: Setting mixer control: value: 1
12-29 21:33:56.942 338-945/? D/audio_route: Setting mixer control: RX7 MIX1 INP1, value: 5
12-29 21:33:56.942 338-945/? D/audio_route: Setting mixer control: DAC1 Switch
12-29 21:33:56.942 338-945/? D/audio_route: Setting mixer control: value: 1
12-29 21:33:56.942 338-945/? D/audio_route: ------ audio_route_update_mixer ==============
12-29 21:33:56.942 338-945/? V/audio_hw_primary: enable_audio_route: enter: usecase(0)
12-29 21:33:56.942 338-945/? V/audio_hw_primary: enable_audio_route: apply mixer path: deep-buffer-playback
12-29 21:33:56.942 338-945/? D/audio_route: ++++ audio_route_update_mixer ==============
12-29 21:33:56.942 338-945/? D/audio_route: Setting mixer control: SLIMBUS_0_RX Audio Mixer MultiMedia1
12-29 21:33:56.942 338-945/? D/audio_route: Setting mixer control: value: 1
12-29 21:33:56.952 338-945/? D/audio_route: ------ audio_route_update_mixer ==============
12-29 21:33:56.952 338-945/? V/audio_hw_primary: enable_audio_route: exit
12-29 21:33:56.952 338-945/? V/audio_hw_primary: start_output_stream: Opening PCM device card_id(0) device_id(0)
12-29 21:33:56.952 338-945/? V/audio_hw_primary: start_output_stream: exit
12-29 21:33:56.992 338-945/? D/AudioFlinger: mixer(0xb01c0000) Spend too much time to write: delta 54(effect 0)
12-29 21:33:57.062 767-1435/? I/MediaFocusControl: AudioFocus requestAudioFocus() from android.media.AudioManager$c4c6611com.pandora.radio.player.w$1$5c6d376 req=1flags=0x0
12-29 21:33:57.152 338-945/? D/AudioFlinger: mixer(0xb01c0000) throttle end: throttle time(120)
12-29 21:34:09.232 767-1314/? I/AudioService: isMediaSilentMode false
12-29 21:34:09.242 1355-1481/? D/vol.VolumeDialogControl: onVolumeChangedW stream = 3, flags = 4113, lastAudibleStreamVolume = 1
12-29 21:34:09.252 767-1713/? D/AudioService: getStreamVolume 3 index 10
12-29 21:34:09.252 767-2420/? D/AudioService: getStreamVolume 3 index 10
12-29 21:34:09.682 767-1314/? I/AudioService: isMediaSilentMode false
12-29 21:34:09.692 1355-1481/? D/vol.VolumeDialogControl: onVolumeChangedW stream = 3, flags = 4113, lastAudibleStreamVolume = 2
12-29 21:34:09.702 767-1807/? D/AudioService: getStreamVolume 3 index 20
12-29 21:34:09.712 1355-1481/? D/vol.VolumeDialogControl: onVolumeChangedW stream = 3, flags = 4112, lastAudibleStreamVolume = 2
12-29 21:34:09.732 767-1806/? D/AudioService: active stream is 0x8
12-29 21:34:09.732 767-1726/? D/AudioService: getStreamVolume 3 index 20
12-29 21:34:09.742 767-1294/? D/AudioService: getStreamVolume 3 index 20
12-29 21:34:10.102 767-1314/? I/AudioService: isMediaSilentMode false
12-29 21:34:10.112 767-1435/? D/AudioService: getStreamVolume 3 index 30
12-29 21:34:10.112 767-787/? D/AudioService: getStreamVolume 3 index 30
12-29 21:34:10.112 1355-1481/? D/vol.VolumeDialogControl: onVolumeChangedW stream = 3, flags = 4113, lastAudibleStreamVolume = 3
12-29 21:34:10.192 767-786/? D/AudioService: getStreamVolume 3 index 30
12-29 21:34:10.352 1355-1481/? D/vol.VolumeDialogControl: onVolumeChangedW stream = 3, flags = 4112, lastAudibleStreamVolume = 3
12-29 21:34:10.362 767-2424/? D/AudioService: active stream is 0x8
12-29 21:34:10.712 767-1314/? I/AudioService: isMediaSilentMode false
12-29 21:34:10.722 1355-1481/? D/vol.VolumeDialogControl: onVolumeChangedW stream = 3, flags = 4113, lastAudibleStreamVolume = 4
12-29 21:34:10.732 767-1711/? D/AudioService: getStreamVolume 3 index 40
12-29 21:34:10.732 767-1726/? D/AudioService: getStreamVolume 3 index 40
12-29 21:34:10.882 1355-1481/? D/vol.VolumeDialogControl: onVolumeChangedW stream = 3, flags = 4112, lastAudibleStreamVolume = 4
12-29 21:34:10.902 767-2424/? D/AudioService: active stream is 0x8
12-29 21:34:11.242 767-1806/? D/AudioService: getStreamVolume 3 index 40
12-29 21:34:11.602 767-1314/? I/AudioService: isMediaSilentMode false
12-29 21:34:11.612 767-787/? D/AudioService: getStreamVolume 3 index 50
12-29 21:34:11.622 1355-1481/? D/vol.VolumeDialogControl: onVolumeChangedW stream = 3, flags = 4113, lastAudibleStreamVolume = 5
12-29 21:34:11.622 767-786/? D/AudioService: getStreamVolume 3 index 50
12-29 21:34:11.792 1355-1481/? D/vol.VolumeDialogControl: onVolumeChangedW stream = 3, flags = 4112, lastAudibleStreamVolume = 5
12-29 21:34:11.812 767-2423/? D/AudioService: active stream is 0x8
12-29 21:34:12.142 767-1709/? D/AudioService: getStreamVolume 3 index 50
12-29 21:35:31.632 767-786/? D/AudioService: getStreamVolume 3 index 50
12-29 21:35:36.822 767-1711/? D/AudioService: getStreamVolume 3 index 50
12-29 21:35:57.142 338-945/? D/AudioFlinger: mixer(0xb01c0000) throttle end: throttle time(1)
12-29 21:36:17.112 767-1314/? I/AudioService: isMediaSilentMode false
12-29 21:36:17.142 1355-1481/? D/vol.VolumeDialogControl: onVolumeChangedW stream = 3, flags = 4113, lastAudibleStreamVolume = 4
12-29 21:36:17.142 767-1712/? D/AudioService: getStreamVolume 3 index 40
12-29 21:36:17.152 767-1806/? D/AudioService: getStreamVolume 3 index 40
12-29 21:36:17.162 1355-1481/? D/vol.VolumeDialogControl: onVolumeChangedW stream = 3, flags = 4112, lastAudibleStreamVolume = 4
12-29 21:36:17.172 767-1712/? D/AudioService: active stream is 0x8
12-29 21:36:17.592 767-1314/? I/AudioService: isMediaSilentMode false
12-29 21:36:17.602 1355-1481/? D/vol.VolumeDialogControl: onVolumeChangedW stream = 3, flags = 4113, lastAudibleStreamVolume = 3
12-29 21:36:17.622 767-787/? D/AudioService: getStreamVolume 3 index 30
12-29 21:36:17.642 767-2423/? D/AudioService: getStreamVolume 3 index 30
12-29 21:36:17.652 1355-1481/? D/vol.VolumeDialogControl: onVolumeChangedW stream = 3, flags = 4112, lastAudibleStreamVolume = 3
12-29 21:36:17.662 767-2424/? D/AudioService: active stream is 0x8
12-29 21:36:17.662 767-1294/? D/AudioService: getStreamVolume 3 index 30
12-29 21:36:19.392 767-1314/? I/AudioService: isMediaSilentMode false
12-29 21:36:19.392 1355-1481/? D/vol.VolumeDialogControl: onVolumeChangedW stream = 3, flags = 4113, lastAudibleStreamVolume = 4
12-29 21:36:19.412 767-1579/? D/AudioService: getStreamVolume 3 index 40
12-29 21:36:19.412 767-1711/? D/AudioService: getStreamVolume 3 index 40
12-29 21:36:19.612 1355-1481/? D/vol.VolumeDialogControl: onVolumeChangedW stream = 3, flags = 4112, lastAudibleStreamVolume = 4
12-29 21:36:19.622 767-1807/? D/AudioService: active stream is 0x8
12-29 21:36:19.902 1355-1481/? D/vol.VolumeDialogControl: onVolumeChangedW stream = 3, flags = 4113, lastAudibleStreamVolume = 5
12-29 21:36:19.912 767-1314/? I/AudioService: isMediaSilentMode false
12-29 21:36:19.932 767-1579/? D/AudioService: getStreamVolume 3 index 50
12-29 21:36:19.942 767-787/? D/AudioService: getStreamVolume 3 index 50
12-29 21:36:19.962 767-1435/? D/AudioService: getStreamVolume 3 index 50
12-29 21:36:20.142 1355-1481/? D/vol.VolumeDialogControl: onVolumeChangedW stream = 3, flags = 4112, lastAudibleStreamVolume = 5
12-29 21:36:20.162 767-1435/? D/AudioService: active stream is 0x8
12-29 21:36:27.352 338-945/? D/AudioFlinger: mixer(0xb01c0000) throttle end: throttle time(1)
12-29 21:36:45.422 338-945/? D/AudioFlinger: mixer(0xb01c0000) Spend too much time to write: delta 32(effect 2)
12-29 21:36:45.452 338-945/? D/AudioFlinger: mixer(0xb01c0000) throttle end: throttle time(5)
12-29 21:37:11.412 338-29996/? E/OMXNodeInstance: setParameter(91:SEC.aac.dec, ParamAudioAndroidAacPresentation(0x6f400003)) ERROR: UnsupportedIndex(0x8000101a)
12-29 21:37:11.432 338-7398/? I/SEC_AAC_DEC: AudioSpecificConfig 0x 13 90
12-29 21:37:11.462 338-7398/? I/SEC_AAC_DEC: AudioSpecificConfig 0x 13 90
12-29 21:37:40.682 338-923/? I/APM::AudioPolicyManager: stopOutput() output 2, stream 3, session 113
12-29 21:37:41.042 767-2420/? D/AudioService: getStreamVolume 3 index 50
12-29 21:37:41.322 767-1786/? D/AudioService: getStreamVolume 3 index 50
12-29 21:37:41.322 767-1806/? D/AudioService: getStreamVolume 3 index 50
12-29 21:37:41.322 767-2423/? D/AudioService: getStreamVolume 3 index 50
12-29 21:37:41.322 767-786/? D/AudioService: getStreamVolume 3 index 50
12-29 21:37:41.612 338-338/? W/AudioPolicyIntefaceImpl: Skipped to add effects on session 114
12-29 21:37:41.612 338-338/? I/APM::AudioPolicyManager: startOutput() output 2, stream 3, session 114
12-29 21:37:41.622 338-945/? D/audio_hw_primary: out_set_parameters: enter: usecase(0: deep-buffer-playback) kvpairs: routing=2
12-29 21:37:41.622 338-945/? V/audio_hw_primary: select_devices: ENTER
12-29 21:37:41.622 338-945/? V/audio_hw_primary: select_devices: usecase(normal)
12-29 21:37:41.622 338-945/? V/audio_hw_primary: select_devices: usecase(PCM_PLAYBACK)
12-29 21:37:41.622 338-945/? D/audio_hw_hfp: audio_extn_hfp_set_parameters: enter
12-29 21:37:41.622 338-945/? V/audio_hw_primary: out_set_parameters: exit: code(0)
12-29 21:37:41.622 338-945/? D/AudioFlinger: setCurDevice() 0x2
12-29 21:37:41.622 767-1294/? I/MediaFocusControl: AudioFocus requestAudioFocus() from android.media.AudioManager$c4c6611com.pandora.radio.player.w$1$5c6d376 req=1flags=0x0
12-29 21:37:41.632 338-945/? I/AudioMixer: create resampler src 44100, 2, dst 48000, 2
12-29 21:38:00.032 338-945/? D/AudioFlinger: mixer(0xb01c0000) Spend too much time to write: delta 45(effect 2)
12-29 21:38:00.092 338-945/? D/AudioFlinger: mixer(0xb01c0000) throttle end: throttle time(19)
12-29 21:38:03.712 767-1806/? W/MediaFocusControl: AudioFocus audio focus client died
12-29 21:38:03.712 767-1806/? I/MediaFocusControl: AudioFocus removeFocusStackEntry(): removing entry for android.os.BinderProxy#bb512aa
12-29 21:38:04.932 767-2424/? I/MediaFocusControl: AudioFocus requestAudioFocus() from android.media.AudioManager$3900a0 req=1flags=0x0
12-29 21:38:04.942 6009-6009/? D/AudioManager: AudioManager dispatching onAudioFocusChange(-1) for android.media.AudioManager$c4c6611com.pandora.radio.player.w$1$5c6d376
12-29 21:38:05.142 767-1806/? I/MediaFocusControl: AudioFocus abandonAudioFocus() from android.media.AudioManager$c4c6611com.pandora.radio.player.w$1$5c6d376
12-29 21:38:05.152 767-1806/? I/MediaFocusControl: AudioFocus removeFocusStackEntry(): removing entry for android.media.AudioManager$c4c6611com.pandora.radio.player.w$1$5c6d376
12-29 21:38:05.482 338-923/? I/APM::AudioPolicyManager: stopOutput() output 2, stream 3, session 114
12-29 21:38:08.392 338-945/? V/audio_hw_primary: out_standby: enter: usecase(0: deep-buffer-playback)
12-29 21:38:08.572 338-945/? V/audio_hw_primary: stop_output_stream: enter: usecase(0: deep-buffer-playback)
12-29 21:38:08.572 338-945/? V/audio_hw_primary: disable_audio_route: enter: usecase(0)
12-29 21:38:08.572 338-945/? V/audio_hw_primary: disable_audio_route: reset mixer path: deep-buffer-playback
12-29 21:38:08.572 338-945/? D/audio_route: ++++ audio_route_update_mixer ==============
12-29 21:38:08.572 338-945/? D/audio_route: Setting mixer control: SLIMBUS_0_RX Audio Mixer MultiMedia1
12-29 21:38:08.572 338-945/? D/audio_route: Setting mixer control: value: 0
12-29 21:38:08.582 338-945/? D/audio_route: ------ audio_route_update_mixer ==============
12-29 21:38:08.582 338-945/? V/audio_hw_primary: disable_audio_route: exit
12-29 21:38:08.582 338-945/? V/audio_hw_primary: disable_snd_device: snd_device(2: speaker)
12-29 21:38:08.582 338-945/? D/audio_route: ++++ audio_route_update_mixer ==============
12-29 21:38:08.582 338-945/? D/audio_route: Setting mixer control: SPK DRV Volume
12-29 21:38:08.582 338-945/? D/audio_route: Setting mixer control: value: 0
12-29 21:38:08.582 338-945/? D/audio_route: Setting mixer control: RX7 Digital Volume
12-29 21:38:08.582 338-945/? D/audio_route: Setting mixer control: value: 0
12-29 21:38:08.582 338-945/? D/audio_route: Setting mixer control: COMP0 Switch
12-29 21:38:08.582 338-945/? D/audio_route: Setting mixer control: value: 0
12-29 21:38:08.582 338-945/? D/audio_route: Setting mixer control: RX7 MIX1 INP1, value: 0
12-29 21:38:08.582 338-945/? D/audio_route: Setting mixer control: DAC1 Switch
12-29 21:38:08.582 338-945/? D/audio_route: Setting mixer control: value: 0
12-29 21:38:08.592 338-945/? D/audio_route: ------ audio_route_update_mixer ==============
12-29 21:38:08.592 338-945/? V/audio_hw_primary: stop_output_stream: exit: status(0)
12-29 21:38:08.592 338-945/? V/audio_hw_primary: out_standby: exit
12-29 21:39:41.392 767-786/? W/MediaFocusControl: AudioFocus audio focus client died
12-29 21:39:41.392 767-786/? I/MediaFocusControl: AudioFocus removeFocusStackEntry(): removing entry for android.os.BinderProxy#b2a247a
12-29 21:39:41.402 767-2424/? D/AudioService: getStreamVolume 3 index 50
12-29 21:39:41.402 767-1807/? D/AudioService: getStreamVolume 3 index 50
The second instance of audio focus client died occurred at:
12-29 21:39:41.392 767-786/? W/MediaFocusControl: AudioFocus audio focus client died
This occurred after I hit the back button and then closed the app from the media notification.
Both the SiriusXM and WDET Radio app gave similar behavior insofar as the "audio focus client died" and muting behavior is concerned. I am an end user of these apps but since they all behave in a similar manner I am thinking it must have something to do with my device's configuration. This occurs whether I have Wifi or LTE as my data link. Furthermore the same end behavior occurs (loss of audio when it goes to "pause") whether I have either logging enabled through USB or no USB connection.
I haven't noticed this behavior in the past but I can't really say at what point it started to occur.
What can cause audio to unilaterally mute like this?
Is there some setting on my Android that can cause this?
Is there more information I can provide to help resolve this?
Thanks much.
Jim
New Information:
I ran some more tests and found the following logcat patterns (four out of four test results) when the audio focus client was declared dead:
Test 1:
12-30 16:14:05.545 809-911/? I/ActivityManager: Killing 13320:com.bmwgroup.connected.bmw.usa/u0a303 (adj 8): SSR - service for lastStateTime 603s, lastActivityTime 603s
12-30 16:14:05.575 809-911/? V/BroadcastQueue: [background] Process cur broadcast BroadcastRecord{c9a7ef2 u0 null qIdx=4}, state= (APP_RECEIVE) DELIVERED for app ProcessRecord{5a54404 2277:com.google.android.gms.persistent/u0a14}
12-30 16:14:05.595 809-2443/? W/MediaFocusControl: AudioFocus audio focus client died
Test2:
12-30 16:39:59.942 809-832/? I/ActivityManager: Killing 17082:com.bmwgroup.connected.bmw.usa/u0a303 (adj 8): SSR - service for lastStateTime 600s, lastActivityTime 600s
12-30 16:39:59.972 809-1751/? W/MediaFocusControl: AudioFocus audio focus client died
Test3:
12-30 16:50:13.251 809-1741/? I/ActivityManager: Killing 19652:com.bmwgroup.connected.bmw.usa/u0a303 (adj 8): SSR - service for lastStateTime 612s, lastActivityTime 612s
12-30 16:50:13.291 809-1751/? W/MediaFocusControl: AudioFocus audio focus client died
Test4:
12-30 17:10:18.691 809-1747/? I/ActivityManager: Killing 26325:com.bmwgroup.connected.bmw.usa/u0a303 (adj 8): SSR - service for lastStateTime 603s, lastActivityTime 603s
12-30 17:10:18.731 809-1502/? W/MediaFocusControl: AudioFocus audio focus client died
In each case the audio stopped at essentially the same time as the ActivityManager was killing the Connected BMW app.
Does this mean the BMW Connected app has the audio focus even though it is not streaming out audio?
The other apps (SiriusXM, Pandora or WDET Radio) are the ones streaming audio.
I uninstalled the Connected BMW app and each of the three apps (SiriusXM, Pandora and WDET Radio) played continuously for 20 minutes. I never used the connected app anyway.

Check this question
It may be because the Android OS would have killed the service due to lack of resources. You can make your service foreground to avoid it. Here is the snippit:
private void sendToForeground() {
Notification note = new Notification(0, null,
System.currentTimeMillis());
note.flags |= Notification.FLAG_NO_CLEAR;
startForeground(0, note);
}
Just call it in onCreate of service.

Related

Nougat Music audio volume gets dropped suddenly with "Google quick search bar APP"

In my device which is on Android N (7.1.2),Music Player (Play Music application) Volume suddenly goes down if "Google quick search bar APP" is Launched and Volume comes back to normal as soon as we minimizes the Google quick search bar application
tried to put and debug with logs in below files but didnt get the root cause
frameworks/base/media/java/android/media/AudioManager.java
frameworks/base/services/core/java/com/android/server/audio/AudioService.java
Any advise how the Music Volume Fades in and Fades out ?
Logs for Reference:
01-01 07:52:51.668 437-7351/? D/audio_hw_primary: copl(0xac8c46c0):out of compress_wait
01-01 07:52:51.668 437-7353/? D/audio_hw_primary: copl(0xac8c46c0): writing buffer (65536 bytes) to compress device
01-01 07:52:51.669 437-7353/? D/audio_hw_primary: copl(0xac8c46c0): writing buffer (65536 bytes) to compress device
01-01 07:52:51.672 437-7353/? D/audio_hw_primary: No space available in compress driver, post msg to cb thread
01-01 07:52:51.672 437-7351/? D/audio_hw_primary: copl(0xac8c46c0):calling compress_wait
01-01 07:52:53.839 971-1186/system_process I/Test_log: AudioService.java :handleMessage::msg:{ when=-1ms what=5 arg2=-1000 target=com.android.server.audio.AudioService$AudioHandler }
01-01 07:52:53.839 971-1186/system_process I/Test_log: AudioService.java :handleMessage::msg.what:5
01-01 07:52:53.839 971-1186/system_process I/Test_log: AudioService.java :handleMessage: onPlaySoundEffect:msg.arg1:0
01-01 07:52:53.839 971-1186/system_process I/Test_log: AudioService.java :handleMessage: onPlaySoundEffect:msg.arg2:-1000
01-01 07:52:53.839 971-1186/system_process I/Test_log: onPlaySoundEffect_11111
01-01 07:52:53.840 971-1186/system_process I/Test_log: AudioService.java : onPlaySoundEffect: stackdump
java.lang.Throwable: stack dump
at com.android.server.audio.AudioService$AudioHandler.onPlaySoundEffect(AudioService.java:4689)
at com.android.server.audio.AudioService$AudioHandler.handleMessage(AudioService.java:4811)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:154)
at com.android.server.audio.AudioService$AudioSystemThread.run(AudioService.java:4455)
--------- beginning of system
01-01 07:52:53.840 971-1409/system_process I/ActivityManager: START u0 {act=android.search.action.GLOBAL_SEARCH cat=[com.google.android.googlequicksearchbox.category.SEARCH_WIDGET] flg=0x10008000 cmp=com.google.android.googlequicksearchbox/com.google.android.apps.gsa.searchnow.SearchNowActivity bnds=[191,145][593,243] (has extras)} from uid 10035 on display 0
01-01 07:52:53.862 437-655/? D/audio_hw_primary: start_output_stream: enter: stream(0xac8c41c0)usecase(1: low-latency-playback) devices(0x2)
01-01 07:52:53.862 437-655/? D/audio_hw_primary: select_devices: out_snd_device(2: speaker) in_snd_device(0: )
01-01 07:52:53.862 437-655/? D/hardware_info: hw_info_append_hw_type : device_name = speaker
01-01 07:52:53.862 437-655/? W/audio_hw_utils: audio_extn_utils_update_stream_app_type_cfg: App type could not be selected. Falling back to default
01-01 07:52:53.862 437-655/? I/audio_hw_primary: select_devices Selected apptype: 69936
01-01 07:52:53.863 437-655/? V/audio_hw_dolby: audio_extn_dolby_set_dmid Dolby device manufacturer id is:0
01-01 07:52:53.864 437-655/? V/audio_hw_dolby: audio_extn_dolby_set_license Setting DS1 License, key:0x0 dmid 0
01-01 07:52:53.864 437-655/? E/DAP_HAL: dap_hal_set_hw_info: dmid=0
key 00x
01-01 07:52:53.883 437-655/? E/audio_hw_dolby: audio_extn_dolby_set_license Could not set DS1 License. Status: -1
01-01 07:52:53.883 437-655/? E/audio_hw_dolby: audio_extn_dolby_ds2_set_endpoint: Dolby set endpint :0x2
01-01 07:52:53.883 437-655/? D/soundtrigger: audio_extn_sound_trigger_update_stream_status: uc_id 1 of type 0 for Event 3, with Raise=0
01-01 07:52:53.883 437-655/? D/ACDB-LOADER: ACDB -> send_audio_cal, acdb_id = 14, path = 0
01-01 07:52:53.883 437-655/? D/ACDB-LOADER: ACDB -> send_asm_topology
01-01 07:52:53.883 437-655/? D/ACDB-LOADER: ACDB -> ACDB_CMD_GET_AUDPROC_STREAM_TOPOLOGY_ID
01-01 07:52:53.883 437-655/? D/ACDB-LOADER: ACDB -> send_adm_topology
01-01 07:52:53.883 437-655/? D/ACDB-LOADER: ACDB -> ACDB_CMD_GET_AUDPROC_COMMON_TOPOLOGY_ID
01-01 07:52:53.884 437-655/? D/ACDB-LOADER: ACDB -> send_audtable
01-01 07:52:53.884 437-655/? D/ACDB-LOADER: ACDB -> ACDB_CMD_GET_AUDPROC_COMMON_TABLE_SIZE
01-01 07:52:53.884 437-655/? D/ACDB-LOADER: ACDB -> ACDB_CMD_GET_AUDPROC_COMMON_TABLE
01-01 07:52:53.884 437-655/? D/ACDB-LOADER: ACDB -> AUDIO_SET_AUDPROC_CAL
01-01 07:52:53.884 437-655/? D/ACDB-LOADER: ACDB -> send_audvoltable
01-01 07:52:53.884 437-655/? D/ACDB-LOADER: ACDB -> ACDB_CMD_GET_AUDPROC_GAIN_DEP_STEP_TABLE
01-01 07:52:53.884 437-655/? D/ACDB-LOADER: ACDB -> AUDIO_SET_AUDPROC_VOL_CAL
01-01 07:52:53.884 437-655/? D/ACDB-LOADER: ACDB -> send_afe_cal
01-01 07:52:53.884 437-655/? D/ACDB-LOADER: ACDB -> ACDB_CMD_GET_AFE_COMMON_TABLE
01-01 07:52:53.885 437-655/? D/ACDB-LOADER: ACDB -> AUDIO_SET_AFE_CAL
01-01 07:52:53.885 437-655/? D/ACDB-LOADER: ACDB -> send_hw_delay : acdb_id = 14 path = 0
01-01 07:52:53.885 437-655/? D/ACDB-LOADER: ACDB -> ACDB_AVSYNC_INFO: ACDB_CMD_GET_DEVICE_PROPERTY
01-01 07:52:53.885 437-655/? I/audio_hw_utils: audio_extn_utils_send_app_type_cfg: PLAYBACK app_type 69936, acdb_dev_id 14, sample_rate 48000
01-01 07:52:53.886 437-655/? D/audio_hw_primary: enable_audio_route: apply mixer and update path: low-latency-playback
01-01 07:52:53.887 437-655/? D/audio_hw_primary: select_devices: done
01-01 07:52:53.892 971-1409/system_process I/ActivityManager: Killing 6348:com.android.musicfx/u0a24 (adj 906): empty for 3043s
01-01 07:52:53.900 437-655/? D/msm8916_platform: platform_set_channel_map mixer_ctl_name:Playback Channel Map12
01-01 07:52:53.900 437-655/? D/msm8916_platform: platform_set_channel_map: set mapping(1 2 3 0 0 0 0 0) for channel:2
01-01 07:52:53.900 437-655/? D/audio_hw_primary: start_output_stream: exit
01-01 07:52:53.901 971-1409/system_process D/ActivityTrigger: ActivityTrigger activityPauseTrigger
01-01 07:52:53.923 2096-2096/com.google.android.googlequicksearchbox:search E/LegacyNowServiceClient: skipping logEndstates, service is null
01-01 07:52:53.964 371-371/? W/SurfaceFlinger: couldn't log to binary event log: overflow.
01-01 07:52:53.994 2096-2096/com.google.android.googlequicksearchbox:search V/BoostFramework: BoostFramework() : mPerf = com.qualcomm.qti.Performance#15c0524
01-01 07:52:53.995 2096-2096/com.google.android.googlequicksearchbox:search V/BoostFramework: BoostFramework() : mPerf = com.qualcomm.qti.Performance#b97588d
01-01 07:52:53.995 2096-2096/com.google.android.googlequicksearchbox:search V/BoostFramework: BoostFramework() : mPerf = com.qualcomm.qti.Performance#679da42
01-01 07:52:53.995 2096-2096/com.google.android.googlequicksearchbox:search V/BoostFramework: BoostFramework() : mPerf = com.qualcomm.qti.Performance#36e3a53
01-01 07:52:54.000 2096-2096/com.google.android.googlequicksearchbox:search V/BoostFramework: BoostFramework() : mPerf = com.qualcomm.qti.Performance#9adf089
01-01 07:52:54.000 2096-2096/com.google.android.googlequicksearchbox:search V/BoostFramework: BoostFramework() : mPerf = com.qualcomm.qti.Performance#14f588e
01-01 07:52:54.033 971-1576/system_process D/ActivityManager: cleanUpApplicationRecord -- 6348
01-01 07:52:54.039 2096-2096/com.google.android.googlequicksearchbox:search V/BoostFramework: BoostFramework() : mPerf = com.qualcomm.qti.Performance#84a5e43
01-01 07:52:54.039 2096-2096/com.google.android.googlequicksearchbox:search V/BoostFramework: BoostFramework() : mPerf = com.qualcomm.qti.Performance#b34bcc0
01-01 07:52:54.174 971-1029/system_process I/ActivityManager: Displayed com.google.android.googlequicksearchbox/com.google.android.apps.gsa.searchnow.SearchNowActivity: +247ms
01-01 07:52:54.183 5385-5466/com.android.launcher3 D/OpenGLRenderer: endAllActiveAnimators on 0x898dc380 (RippleDrawable) with handle 0x93e15e20
01-01 07:52:54.190 437-7353/? D/audio_hw_primary: out_set_parameters: enter: usecase(3: compress-offload-playback) kvpairs: routing=2
01-01 07:52:54.245 1217-1217/com.google.android.inputmethod.latin W/InputMethodService: Window size has been changed. This may cause jankiness of resizing window: -1 -> -2
When you play audio on an Android device the application has to request audio focus. The operating system has different ways of dealing with a conflict in audio focus, it either performs audio ducking, stops the audio briefly, or completely hands over control to another application that requests focus:
From Managing audio focus Android documentation:
Two or more Android apps can play audio to the same output stream
simultaneously. The system mixes everything together. While this is
technically impressive, it can be very aggravating to a user. To avoid
every music app playing at the same time, Android introduces the idea
of audio focus. Only one app can hold audio focus at a time.
TL;DR: It sounds to me like the Google Search bar is requesting audio focus, perhaps for voice control, and the OS is ducking your application audio briefly during this action - after which audio focus is handed back to your application.
See Managing audio focus for more detail.

Black screen on phone

I have problem with my 'first' application on android. When I run my program I see only black screen. I found some information and I used Android.sdk abd.exe file to check all running threads on my phone.
I run cmd and set path to android.sdk abd file. Then I executed this commend:
adb logcat -v threadtime
After my console shows this:
01-14 11:54:36.798 2210 2735 D InputDispatcher: notifyMotion - action=ACTION_DOWN(0), id=0, tooltype=1, deviceId=5, source=0x1002, policyFlags=0x0, flags=0x0, metaState=0x0, buttonState=0x0, edgeFlags=0x0, eventTime=1813030619000, downTime=1813030619000,
01-14 11:54:36.799 2210 2734 D InputTransport: channel 'fae6efc com.lge.launcher2/com.lge.launcher2.Launcher (server)' : action=ACTION_DOWN(0), id=0, tooltype=1, deviceId=5, source=0x1002, flags=0x0, edgeFlags=0x0, metaState=0x0, buttonState=0x0, downTime=1813030619000, eventTime=1813030619000, pointerCount=1
01-14 11:54:36.799 2210 2734 D InputTransport: channel '5c6a310 com.android.systemui.ImageWallpaper (server)' : action=ACTION_DOWN(0), id=0, tooltype=1, deviceId=5, source=0x1002, flags=0x1, edgeFlags=0x0, metaState=0x0, buttonState=0x0, downTime=1813030619000, eventTime=1813030619000, pointerCount=1
01-14 11:54:36.800 3567 3567 I ViewRootImpl: ViewRoot's Touch Event : ACTION_DOWN
01-14 11:54:36.847 2210 2735 D InputDispatcher: notifyMotion - action=ACTION_UP(0), id=0, tooltype=1, deviceId=5, source=0x1002, policyFlags=0x0, flags=0x0, metaState=0x0, buttonState=0x0, edgeFlags=0x0, eventTime=1813079025000, downTime=1813030619000,
01-14 11:54:36.847 2210 2734 D InputTransport: channel 'fae6efc com.lge.launcher2/com.lge.launcher2.Launcher (server)' : action=ACTION_UP(0), id=0, tooltype=1, deviceId=5, source=0x1002, flags=0x0, edgeFlags=0x0, metaState=0x0, buttonState=0x0, downTime=1813030619000, eventTime=1813079025000, pointerCount=1
01-14 11:54:36.847 2210 2734 D InputTransport: channel '5c6a310 com.android.systemui.ImageWallpaper (server)' : action=ACTION_UP(0), id=0, tooltype=1, deviceId=5, source=0x1002, flags=0x1, edgeFlags=0x0, metaState=0x0, buttonState=0x0, downTime=1813030619000, eventTime=1813079025000, pointerCount=1
01-14 11:54:36.849 3567 3567 I ViewRootImpl: ViewRoot's Touch Event : ACTION_UP
01-14 11:54:36.850 2210 2940 V SoundPool: play sampleID=1, leftVolume=1.000000, rightVolume=1.000000, priority=0, loop=0, rate=1.000000
01-14 11:54:36.851 2210 2940 V SoundPool: Allocated recycled channel for same sampleID
01-14 11:54:36.851 2210 2940 V SoundPool: play channel 0xb876a680 state = 0
01-14 11:54:36.851 2210 2940 V SoundPool: SoundChannel::play 0xb876a680: sampleID=1, channelID=83, leftVolume=1.000000, rightVolume=1.000000, priority=0, loop=0, rate=1.000000
01-14 11:54:36.851 3567 3567 I Timeline: Timeline: Activity_launch_request id:com.ordenimagesaver time:1813082
01-14 11:54:36.851 403 3522 V APM::AudioPolicyManager: getOutput() device 2, stream 1, samplingRate 0, format 0, channelMask 3, flags 0
01-14 11:54:36.851 403 3522 V APM::AudioPolicyManager: getOutputForDevice() returns output 2
01-14 11:54:36.851 2210 2940 D AudioSystem: getIoDescriptor: ioHandle = 2, index = 0, mIoDescriptors = 0xb897f080
01-14 11:54:36.851 2210 2940 V AudioSystem: getFrameCount() output 2, frameCount 960
01-14 11:54:36.851 403 2941 V APM::AudioPolicyManager: getOutput() device 2, stream 1, samplingRate 0, format 0, channelMask 3, flags 0
01-14 11:54:36.851 403 2941 V APM::AudioPolicyManager: getOutputForDevice() returns output 2
01-14 11:54:36.852 2210 2940 D AudioSystem: getIoDescriptor: ioHandle = 2, index = 0, mIoDescriptors = 0xb897f080
01-14 11:54:36.852 2210 2940 V AudioSystem: getSamplingRate() output 2, sampling rate 48000
01-14 11:54:36.852 2210 2940 V SoundPool: reusing track 0xb8b6b2a8 for sample 1
01-14 11:54:36.852 2210 2940 V AudioTrack: setLoop_l 0 0 0
01-14 11:54:36.852 2210 2940 D AudioTrack: start(): 0xb8b6b2a8
01-14 11:54:36.852 403 403 V AudioFlinger_Tracks: start(4096), calling pid 2210 session 13
01-14 11:54:36.852 403 403 V AudioFlinger_Tracks: ? => ACTIVE (4096) on thread 0xb7fccd88
01-14 11:54:36.852 403 403 V APM::AudioPolicyManager: startOutput() output 2, stream 1, session 13
01-14 11:54:36.852 403 403 V APM::AudioPolicyManager: startOutput() output primary->(primary)(2), stream 1, session 13
01-14 11:54:36.852 403 403 V APM::AudioPolicyManager: setBeaconMute(1) mBeaconMuteRefCount=1 mBeaconPlayingRefCount=0
01-14 11:54:36.852 403 403 V APM::AudioOutputDescriptor: changeRefCount() stream 1, count 1
01-14 11:54:36.852 403 403 V APM::AudioPolicyManager: getNewOutputDevice() selected device 2
01-14 11:54:36.852 403 403 V APM::AudioPolicyManager: setOutputDevice() device 0002 delayMs 0
01-14 11:54:36.852 403 403 V APM::AudioPolicyManager: setOutputDevice() prevDevice 0x0002
01-14 11:54:36.852 403 403 V APM::AudioPolicyEngine: getDeviceForStrategy() remove speaker device. strategy 9 ringermode 1
01-14 11:54:36.852 403 403 V APM::AudioPolicyEngine: getDeviceForStrategy() add headphone device. strategy 9 ringermode 1
01-14 11:54:36.852 403 403 V APM::AudioPolicyManager: setOutputDevice() changing device
01-14 11:54:36.852 403 403 V AudioPolicyService: AudioCommandThread() adding create patch delay 0
01-14 11:54:36.852 403 403 V AudioPolicyService: inserting command: 7 at index 0, num commands 0
01-14 11:54:36.852 2210 3556 I ActivityManager: START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.ordenimagesaver/javafxports.android.FXActivity} from uid 10022 on display 0
01-14 11:54:36.855 403 1455 V AudioPolicyService: AudioCommandThread() processing create audio patch
01-14 11:54:36.855 403 1455 V AudioFlinger_Threads: sendConfigEvent_l() num events 1 event 3
01-14 11:54:36.856 403 1625 V AudioFlinger_Threads: thread 0xb17b1008 type 0 TID 1625 waking up
01-14 11:54:36.856 403 1625 V AudioFlinger_Threads: processConfigEvents_l() remaining events 1
01-14 11:54:36.856 403 1625 D audio_hw_primary: out_set_parameters: enter: usecase(0: deep-buffer-playback) kvpairs: routing=2
01-14 11:54:36.856 403 1625 V audio_hw_primary: out_set_parameters: exit: code(0)
01-14 11:54:36.856 403 1625 V AudioFlinger_Threads: processConfigEvents_l() DONE thread 0xb17b1008
01-14 11:54:36.857 403 1455 V AudioPolicyService: -AudioCommandThread 7
01-14 11:54:36.857 403 1455 V AudioPolicyService: AudioCommandThread() going to sleep
01-14 11:54:36.857 403 403 V APM::AudioPolicyManager: setOutputDevice() createAudioPatch returned 0 patchHandle 103num_sources 1 num_sinks 1
01-14 11:54:36.857 403 403 V AudioPolicyService: AudioCommandThread() adding update audio patch list
01-14 11:54:36.857 403 403 V AudioPolicyService: inserting command: 10 at index 0, num commands 0
01-14 11:54:36.857 403 403 V AudioPolicyService: AudioCommandThread() adding set voice volume volume 0.571429, delayMs 0
01-14 11:54:36.857 403 403 V AudioPolicyService: inserting command: 4 at index 0, num commands 0
01-14 11:54:36.857 403 1455 V AudioPolicyService: AudioCommandThread() processing set voice volume volume 0.571429
01-14 11:54:36.857 403 1455 V AudioPolicyService: -AudioCommandThread 4
01-14 11:54:36.857 403 1455 V AudioPolicyService: AudioCommandThread() going to sleep
01-14 11:54:36.857 403 403 V AudioPolicyService: AudioCommandThread() adding set parameter string fm_volume=0.1115583479, io 2 ,delay 0
01-14 11:54:36.857 403 403 V AudioPolicyService: inserting command: 3 at index 0, num commands 0
01-14 11:54:36.857 403 1455 V AudioPolicyService: AudioCommandThread() processing set parameters string fm_volume=0.1115583479, io 2
01-14 11:54:36.857 403 1455 V AudioFlinger: setParameters(): io 2, keyvalue fm_volume=0.1115583479, calling pid 403
01-14 11:54:36.857 403 1455 V AudioFlinger_Threads: ThreadBase::setParameters() fm_volume=0.1115583479
01-14 11:54:36.857 403 1455 V AudioFlinger_Threads: sendConfigEvent_l() num events 1 event 2
01-14 11:54:36.858 403 1456 V AudioPolicyService: AudioCommandThread() processing update audio patch list
01-14 11:54:36.858 403 1456 V AudioPolicyService: -AudioCommandThread 10
01-14 11:54:36.858 403 1456 V AudioPolicyService: AudioCommandThread() going to sleep
01-14 11:54:36.858 2210 3556 D ActivityManager: setTaskToReturnTo : TaskRecord{dd1e57 #73 A=com.ordenimagesaver U=0 sz=4} / mTaskToReturnTo = 1
01-14 11:54:36.862 2210 3556 D InputDispatcher: Focus left window: Window{fae6efc u0 com.lge.launcher2/com.lge.launcher2.Launcher}
01-14 11:54:36.866 403 1625 V AudioFlinger_Threads: processConfigEvents_l() remaining events 1
01-14 11:54:36.866 403 1625 D audio_hw_primary: out_set_parameters: enter: usecase(0: deep-buffer-playback) kvpairs: fm_volume=0.1115583479
01-14 11:54:36.866 403 1625 D audio_hw_fm: audio_extn_fm_set_parameters: set_fm_volume usecase
01-14 11:54:36.866 403 1625 D audio_hw_fm: fm_set_volume: (0.111558)
01-14 11:54:36.866 403 1625 E audio_hw_fm: fm_set_volume: FM not active, ignoring set_fm_volume call or mute state 0
01-14 11:54:36.866 403 1625 V audio_hw_primary: out_set_parameters: exit: code(0)
01-14 11:54:36.866 403 1625 V AudioFlinger_Threads: processConfigEvents_l() DONE thread 0xb17b1008
01-14 11:54:36.866 403 1455 V AudioPolicyService: -AudioCommandThread 3
01-14 11:54:36.866 403 1455 V AudioPolicyService: AudioCommandThread() going to sleep
01-14 11:54:36.866 403 403 V APM::AudioPolicyManager: checkAndSetVolume() cannot set stream 6 volume with force use = 0 for comm
01-14 11:54:36.866 403 403 V AudioFlinger_Threads: signal playback thread
01-14 11:54:36.868 2210 2940 V SoundPool: delete oldTrack 0x0
01-14 11:54:36.869 2210 3556 D AppWindowTokenEx: AppWindowTokenEx init..
01-14 11:54:36.874 3567 3567 I [LGHome]EVENT: [Launcher.java:5515:onWindowFocusChanged()]onWindowFocusChanged() hasFocus false
01-14 11:54:36.874 3567 3567 I [LGHome]EVENT: [Launcher.java:5541:setEnableShakeHandlers()]disableShakeHandlers
01-14 11:54:36.874 3567 3567 I [LGHome]EVENT: onPause
01-14 11:54:36.877 403 1625 D audio_hw_primary: start_output_stream: enter: stream(0xb7f5d7d8)usecase(0: deep-buffer-playback) devices(0x2)
01-14 11:54:36.877 403 1625 D audio_hw_primary: select_devices: enter and usecase(0)
01-14 11:54:36.877 403 1625 D msm8974_platform_lge: LGE_platform_get_output_snd_device: enter(0:2)
01-14 11:54:36.877 403 1625 V msm8916_platform: platform_get_output_snd_device: enter: output devices(0x2)
01-14 11:54:36.877 403 1625 V msm8916_platform: platform_get_output_snd_device: exit: snd_device(speaker)
01-14 11:54:36.877 403 1625 V platform_apt: lge_get_output_in_mandatory_depth: enter and devices(2)
01-14 11:54:36.877 403 1625 D msm8974_platform_lge: LGE_platform_get_output_snd_device: exit: out_snd_device(speaker)
01-14 11:54:36.877 403 1625 D audio_hw_primary: select_devices: out_snd_device(2: speaker) in_snd_device(0: )
01-14 11:54:36.877 403 1625 D audio_hw_primary: enable_snd_device: enter 2
01-14 11:54:36.877 403 1625 D hardware_info: hw_info_append_hw_type : device_name = speaker
01-14 11:54:36.877 403 1625 D audio_hw_primary: enable_snd_device: snd_device(2: speaker)
01-14 11:54:36.883 403 1625 W audio_hw_utils: audio_extn_utils_update_stream_app_type_cfg: App type could not be selected. Falling back to default
01-14 11:54:36.883 403 1625 I audio_hw_primary: select_devices Selected apptype: 69936
01-14 11:54:36.883 403 1625 V audio_hw_primary: enable_audio_route: enter: usecase(0)
01-14 11:54:36.884 403 1625 E audio_hw_dolby: audio_extn_dolby_ds2_set_endpoint: Dolby set endpint :0x2
01-14 11:54:36.884 403 1625 V msm8916_platform: platform_send_audio_calibration: sending audio calibration for snd_device(2) acdb_id(14)
01-14 11:54:36.884 403 1625 D ACDB-LOADER: ACDB -> send_audio_cal, acdb_id = 14, path = 0
01-14 11:54:36.884 403 1625 D ACDB-LOADER: ACDB -> send_asm_topology
01-14 11:54:36.884 403 1625 D ACDB-LOADER: ACDB -> ACDB_CMD_GET_AUDPROC_STREAM_TOPOLOGY_ID
01-14 11:54:36.884 403 1625 D ACDB-LOADER: ACDB -> send_adm_topology
01-14 11:54:36.884 403 1625 D ACDB-LOADER: ACDB -> ACDB_CMD_GET_AUDPROC_COMMON_TOPOLOGY_ID
01-14 11:54:36.884 403 1625 D ACDB-LOADER: ACDB -> send_audtable
01-14 11:54:36.884 403 1625 D ACDB-LOADER: ACDB -> ACDB_CMD_GET_AUDPROC_COMMON_TABLE_SIZE
01-14 11:54:36.884 403 1625 D ACDB-LOADER: ACDB -> ACDB_CMD_GET_AUDPROC_COMMON_TABLE
01-14 11:54:36.884 403 1625 D ACDB-LOADER: ACDB -> AUDIO_SET_AUDPROC_CAL
01-14 11:54:36.884 403 1625 D ACDB-LOADER: ACDB -> send_audvoltable
01-14 11:54:36.884 403 1625 D ACDB-LOADER: ACDB -> ACDB_CMD_GET_AUDPROC_GAIN_DEP_STEP_TABLE
01-14 11:54:36.884 403 1625 D ACDB-LOADER: ACDB -> AUDIO_SET_AUDPROC_VOL_CAL
01-14 11:54:36.884 403 1625 D ACDB-LOADER: ACDB -> send_afe_cal
01-14 11:54:36.884 403 1625 D ACDB-LOADER: ACDB -> ACDB_CMD_GET_AFE_COMMON_TABLE
01-14 11:54:36.884 403 1625 D ACDB-LOADER: ACDB -> AUDIO_SET_AFE_CAL
01-14 11:54:36.884 403 1625 D ACDB-LOADER: ACDB -> send_hw_delay : acdb_id = 14 path = 0
01-14 11:54:36.884 403 1625 D ACDB-LOADER: ACDB -> ACDB_AVSYNC_INFO: ACDB_CMD_GET_DEVICE_PROPERTY
01-14 11:54:36.884 403 1625 I audio_hw_utils: audio_extn_utils_send_app_type_cfg app_type 69936, acdb_dev_id 14, sample_rate 48000
01-14 11:54:36.884 403 1625 V msm8974_platform_lge: LGE_platform_add_backend_name: enter: 2
01-14 11:54:36.884 403 1625 D audio_hw_primary: enable_audio_route: apply mixer and update path: deep-buffer-playback
01-14 11:54:36.885 403 1625 V audio_hw_primary: enable_audio_route: exit
01-14 11:54:36.885 403 1625 D audio_hw_primary: select_devices: done
01-14 11:54:36.885 403 1625 V audio_hw_primary: start_output_stream: Opening PCM device card_id(0) device_id(0) format(0)
01-14 11:54:36.888 403 1625 V audio_hw_primary: start_output_stream: pcm_prepare
01-14 11:54:36.895 11337 11337 I System.out: usetextureview = false, useswipekeyboard = false
01-14 11:54:36.895 11337 11337 V FXActivity: onCreate called, using 8.60.7-SNAPSHOT
01-14 11:54:36.896 11337 11585 V FXActivity native: Notification queue started
01-14 11:54:36.902 11337 11337 V FXActivity native: appDataDir: /data/user/0/com.ordenimagesaver
01-14 11:54:36.903 11337 11337 V FXActivity: onStart
01-14 11:54:36.903 11337 11337 V FXActivity: onResume
01-14 11:54:36.907 403 1625 D AudioFlinger_Threads: mixer(0xb17b1008) throttle end: throttle time(30)
01-14 11:54:36.908 11337 11337 D PhoneWindow: notifyNavigationBarColor, color=0x: ff000000, token: android.view.ViewRootImplAO$WEx#ab25162
01-14 11:54:36.909 2210 3521 D WindowManager: notifyNavigationBarColor(), token: android.os.BinderProxy#84a02b6, color: ff000000
01-14 11:54:36.918 403 1625 V AudioFlinger_Threads: mixer(0xb17b1008) throttle begin: ret(3840) deltaMs(0) requires sleep 10 ms
01-14 11:54:36.919 2210 2339 I SystemUI[Framework]: PhoneWindowManager.updateSystemUiVisibilityLw() :visibility=0x8600, pkg=com.ordenimagesaver
01-14 11:54:36.920 2210 3044 D InputDispatcher: Focus entered window: Window{31acbb7 u0 com.ordenimagesaver/javafxports.android.FXActivity}
01-14 11:54:36.921 2210 2339 W WindowManager: Call!!!getLGSystemUiVisibility. =0x0
01-14 11:54:36.921 2210 2339 D StatusBarManagerServiceEx: setLGSystemUiVisibility(0x0)
01-14 11:54:36.921 2210 2339 D StatusBarManagerServiceEx: manageNaviBtnDisableList userId=0 what=0x0 pkg=Window{31acbb7 u0 com.ordenimagesaver/javafxports.android.FXActivity}
01-14 11:54:36.921 2210 2339 I SystemUI[Framework]: ==>disabledNaviBtn() what=0x0, token=android.os.Binder#bb24803, pkg=Window{31acbb7 u0 com.ordenimagesaver/javafxports.android.FXActivity}
01-14 11:54:36.921 2210 2339 I SystemUI[Framework]: disableNaviBtn: mDisabledNaviBtn=0x0, mDisableRecords.size=0
01-14 11:54:36.921 2210 2339 D PhoneWindowManagerEx: [PWM]1.notifyNavigationBarColor => mLastColorNavigationBar=0xff000000
01-14 11:54:36.922 3026 3026 I NavigationThemeResource: notify navigation bar color(0xff000000)
01-14 11:54:36.922 3026 3026 I NavigationThemeResource: NavigationKey Color is changed(WHITE_WITH_SHADOW -> WHITE)
01-14 11:54:36.922 3026 3026 I NavigationThemeResource: BarMode=4, Theme=BLACK, LightBackground=false (NOT Transparent)
01-14 11:54:36.922 3026 3026 I NavigationThemeResource: , Keyguard show=false, IME shown=false, Bar vertical=false, Panel expanded=false
01-14 11:54:36.937 11337 11337 V FXEntity: Surface created.
01-14 11:54:36.938 11337 11337 V FXActivity native: [JVDBG] SURFACE created native android window at 0xb798f7c8, surface = 0xbe837b00
01-14 11:54:36.938 403 1625 V AudioFlinger_Threads: track(0xb7fccd88) underrun, framesReady(0) < framesDesired(962)
01-14 11:54:36.938 403 1625 V AudioFlinger_Tracks: presentationComplete() mPresentationCompleteFrames 0 framesWritten 3840
01-14 11:54:36.938 403 1625 V AudioFlinger_Tracks: presentationComplete() reset: mPresentationCompleteFrames 7680 audioHalFrames 3840
01-14 11:54:36.939 11337 11337 I GLASS : Native code is notified that surface has changed (repaintall)!
01-14 11:54:36.940 11337 11337 V FXEntity: Called Surface changed [480, 749], format 4
01-14 11:54:36.940 11337 11337 V FXActivity native: [JVDBG] SURFACE created native android window at 0xb798f7c8, surface = 0xbe837ae0
01-14 11:54:36.941 11337 11337 I GLASS : Native code is notified that surface has changed with size provided (repaintall)!
01-14 11:54:36.941 11337 11337 V FXEntity: Called Surface redraw needed
01-14 11:54:36.941 11337 11337 V FXEntity: Redraw...
01-14 11:54:36.941 11337 11337 I GLASS : Call surfaceRedrawNeeded
01-14 11:54:36.941 11337 11337 I GLASS : Native code is notified that surface needs to be redrawn (repaintall)!
01-14 11:54:36.941 11337 11337 V FXEntity: Wait a while before doing this again...
01-14 11:54:36.943 2210 8114 V SoundPool: process 0xb876a680 channel 83 event BUFFER_END
01-14 11:54:36.943 2210 3309 V SoundPool: awake
01-14 11:54:36.943 2210 3309 V SoundPool: Getting channel from stop list
01-14 11:54:36.943 2210 3309 V SoundPool: stop
01-14 11:54:36.943 2210 3309 D AudioTrack: stop(): 0xb8b6b2a8
01-14 11:54:36.943 403 1635 V AudioFlinger_Tracks: stop(4096), calling pid 2210
01-14 11:54:36.943 403 1635 V AudioFlinger_Tracks: not stopping/stopped => stopping/stopped (4096) on thread 0xb17b1008
01-14 11:54:36.944 2210 3309 V SoundPool: done_l(83)
01-14 11:54:36.944 2210 3309 V SoundPool: move to front
01-14 11:54:36.949 403 1625 V AudioFlinger_Tracks: presentationComplete() mPresentationCompleteFrames 7680 framesWritten 3840
01-14 11:54:36.949 403 1625 V AudioFlinger_Tracks: presentationComplete() mPresentationCompleteFrames 7680 framesWritten 4800
01-14 11:54:36.959 403 1625 V AudioFlinger_Tracks: presentationComplete() mPresentationCompleteFrames 7680 framesWritten 4800
01-14 11:54:36.959 403 1625 V AudioFlinger_Tracks: presentationComplete() mPresentationCompleteFrames 7680 framesWritten 5760
01-14 11:54:36.969 403 1625 V AudioFlinger_Tracks: presentationComplete() mPresentationCompleteFrames 7680 framesWritten 5760
01-14 11:54:36.969 403 1625 V AudioFlinger_Tracks: presentationComplete() mPresentationCompleteFrames 7680 framesWritten 6720
01-14 11:54:36.979 403 1625 V AudioFlinger_Tracks: presentationComplete() mPresentationCompleteFrames 7680 framesWritten 6720
01-14 11:54:36.979 403 1625 V AudioFlinger_Tracks: presentationComplete() mPresentationCompleteFrames 7680 framesWritten 7680
01-14 11:54:36.979 403 1625 V AudioFlinger_Threads: removeTracks_l removing track on session 13
01-14 11:54:36.990 403 1625 V AudioPolicyService: AudioCommandThread() adding stop output 2
01-14 11:54:36.990 403 1625 V AudioPolicyService: inserting command: 5 at index 0, num commands 0
01-14 11:54:36.990 403 1456 V AudioPolicyService: AudioCommandThread() processing stop output 2
01-14 11:54:36.990 403 1456 V APM::AudioPolicyManager: stopOutput() output 2, stream 1, session 13
01-14 11:54:36.990 403 1456 V APM::AudioPolicyManager: setBeaconMute(1) mBeaconMuteRefCount=0 mBeaconPlayingRefCount=0
01-14 11:54:36.990 403 1456 V APM::AudioOutputDescriptor: changeRefCount() stream 1, count 0
01-14 11:54:36.990 403 1456 V APM::AudioPolicyManager: getNewOutputDevice() selected device 0
01-14 11:54:36.990 403 1456 V APM::AudioPolicyManager: setOutputDevice() device 0000 delayMs 160
01-14 11:54:36.990 403 1456 V APM::AudioPolicyManager: setOutputDevice() prevDevice 0x0002
01-14 11:54:36.990 403 1456 V APM::AudioPolicyEngine: getDeviceForStrategy() remove speaker device. strategy 9 ringermode 1
01-14 11:54:36.990 403 1456 V APM::AudioPolicyEngine: getDeviceForStrategy() add headphone device. strategy 9 ringermode 1
01-14 11:54:36.990 403 1456 V APM::AudioPolicyManager: setOutputDevice() setting same device 0x0000 or null device
01-14 11:54:36.990 403 1456 V AudioPolicyService: -AudioCommandThread 5
01-14 11:54:36.990 403 1456 V AudioPolicyService: AudioCommandThread() going to sleep
01-14 11:54:37.141 11337 11337 V FXEntity: Redraw again...
01-14 11:54:37.142 11337 11337 I GLASS : Call surfaceRedrawNeeded
01-14 11:54:37.142 11337 11337 I GLASS : Native code is notified that surface needs to be redrawn (repaintall)!
01-14 11:54:37.152 11337 11337 V FXEntity: Called Surface redraw needed
01-14 11:54:37.152 11337 11337 V FXEntity: Redraw...
01-14 11:54:37.152 11337 11337 I GLASS : Call surfaceRedrawNeeded
01-14 11:54:37.152 11337 11337 I GLASS : Native code is notified that surface needs to be redrawn (repaintall)!
01-14 11:54:37.152 11337 11337 V FXEntity: Wait a while before doing this again...
01-14 11:54:37.352 11337 11337 V FXEntity: Redraw again...
01-14 11:54:37.352 11337 11337 I GLASS : Call surfaceRedrawNeeded
01-14 11:54:37.352 11337 11337 I GLASS : Native code is notified that surface needs to be redrawn (repaintall)!
01-14 11:54:37.369 2210 2419 I ActivityManager: Displayed com.ordenimagesaver/javafxports.android.FXActivity: +487ms
01-14 11:54:37.384 11337 11337 V ViewRootImpl: Contents drawing finished : com.ordenimagesaver/javafxports.android.FXActivity
01-14 11:54:37.385 11337 11337 I Timeline: Timeline: Activity_idle id: android.os.BinderProxy#158b82d time:1813617
01-14 11:54:37.391 3567 3788 E Surface : getSlotFromBufferLocked: unknown buffer: 0xb898a880
01-14 11:54:37.780 3567 3567 I [LGHome]EVENT: onStop
01-14 11:54:37.795 2210 2337 I ProcessStatsService: Prepared write state in 14ms
01-14 11:54:39.934 403 1625 V AudioFlinger_Threads: Audio hardware entering standby, mixer 0xb17b1008, suspend count 0
01-14 11:54:39.934 403 1625 D audio_hw_primary: out_standby: enter: stream (0xb7f5d7d8) usecase(0: deep-buffer-playback)
01-14 11:54:40.121 403 1625 V audio_hw_primary: stop_output_stream: enter: usecase(0: deep-buffer-playback)
01-14 11:54:40.121 403 1625 V audio_hw_primary: disable_audio_route: enter: usecase(0)
01-14 11:54:40.121 403 1625 V msm8974_platform_lge: LGE_platform_add_backend_name: enter: 2
01-14 11:54:40.121 403 1625 D audio_hw_primary: disable_audio_route: reset and update mixer path: deep-buffer-playback
01-14 11:54:40.121 403 1625 V audio_hw_primary: disable_audio_route: exit
01-14 11:54:40.121 403 1625 D audio_hw_primary: disable_snd_device: enter 2
01-14 11:54:40.121 403 1625 D hardware_info: hw_info_append_hw_type : device_name = speaker
01-14 11:54:40.121 403 1625 D audio_hw_primary: disable_snd_device: snd_device(2: speaker)
01-14 11:54:40.123 403 1625 V audio_hw_primary: stop_output_stream: exit: status(0)
01-14 11:54:40.123 403 1625 V audio_hw_primary: out_standby: exit
01-14 11:54:40.123 403 1625 V AudioFlinger_Threads: thread 0xb17b1008 type 0 TID 1625 going to sleep
01-14 11:54:41.259 415 508 I ThermalEngine: Sensor:pa_therm0:27000 mC
I do not see any exceptions and still I have black screen when I run my program on smartphone with Android OS.
The ClassNotFoundException says it can't find the OrdenImageSaver class. It sounds like you're trying to load an image and since that class can't be found, the screen is just displaying black.
Make sure the class is located in the com.ordenimagesaver package. After that, try the following:
Clear app cache
Clear app data
Uninstall app
Restart Android Studio
Run/Debug again

Android microphone input fails while in bluetooth on some devices

I'm working on doing voice recognition using the device microphone while connected to a bluetooth speaker. This works in most cases, but in a few devices I'm getting some failures.
After a few days of debugging, the best I can find is the following log difference:
Failure Log:
V/audio_hw_primary( 270): start_input_stream: enter: usecase(7)
V/voice ( 270): voice_check_and_set_incall_rec_usecase: voice call not active
V/audio_hw_primary( 270): start_input_stream: usecase(7)
D/PreProcess( 270): new SamsungRecord
D/PreProcess( 270): new NS
I/samsungRecord( 270): [samsungrecord] SamsungRecInit
I/samsungRecord( 270): [samsungrecordMIC]Use HardCoding Values
E/samsungRecord( 270): miccalib file can't created. (/data/snd/miccalib.txt)
I/samsungRecord( 270): 1
D/SamsungRecord_NS( 270): [SamsungRecord_NS] Init SR 8000
D/SamsungRecord_NS( 270): [SamsungRecord_NS] getLevel inputsource 6, ret_level 3
V/audio_hw_primary( 270): select_devices: ENTER
V/audio_hw_primary( 270): select_devices: usecase(normal)
V/audio_hw_primary( 270): select_devices: usecase(PCM_CAPTURE)
V/msm8974_platform( 270): platform_get_input_snd_device: enter: out_device(0) in_device(0x8)
V/msm8974_platform( 270): get_INPUT_snd_device: AUDIO_MODE_IN_CALL
E/msm8974_platform( 270): platform_get_input_snd_device: No output device set for voice call
V/msm8974_platform( 270): platform_get_input_snd_device: exit: in_snd_device(none)
V/audio_hw_primary( 270): start_input_stream: Opening PCM device card_id(0) device_id(0), channels 1
E/audio_hw_primary( 270): start_input_stream: cannot open device '/dev/snd/pcmC0D0c': Invalid argument
V/audio_hw_primary( 270): stop_input_stream: enter: usecase(7: audio-record)
V/audio_hw_primary( 270): disable_audio_route: enter: usecase(7)
V/audio_hw_primary( 270): disable_audio_route: reset mixer path: audio-record
D/audio_route( 270): ++++ audio_route_update_mixer ==============
D/audio_route( 270): ------ audio_route_update_mixer ==============
V/audio_hw_primary( 270): disable_audio_route: exit
E/audio_hw_primary( 270): disable_snd_device: Invalid sound device 0
V/audio_hw_primary( 270): stop_input_stream: exit: status(0)
D/audio_hw_primary( 270): start_input_stream: exit: status(-5)
V/audio_hw_primary( 270): in_standby: enter
V/audio_hw_primary( 270): in_standby: exit: status(0)
V/audio_hw_primary( 270): in_read: read failed - sleeping for buffer duration
Successful Log:
V/audio_hw_primary( 387): start_input_stream: enter: usecase(7)
V/voice ( 387): voice_check_and_set_incall_rec_usecase: voice call not active
V/audio_hw_primary( 387): start_input_stream: usecase(7)
D/PreProcess( 387): new SamsungRecord
D/PreProcess( 387): new NS
I/samsungRecord( 387): [samsungrecord] SamsungRecInit
I/samsungRecord( 387): [samsungrecordMIC]Use HardCoding Values
E/samsungRecord( 387): miccalib file can't created. (/data/snd/miccalib.txt)
I/samsungRecord( 387): 1
D/SamsungRecord_NS( 387): [SamsungRecord_NS] Init SR 8000
D/SamsungRecord_NS( 387): [SamsungRecord_NS] getLevel inputsource 6, ret_level 3
V/audio_hw_primary( 387): select_devices: ENTER
V/audio_hw_primary( 387): select_devices: usecase(normal)
V/audio_hw_primary( 387): select_devices: usecase(PCM_CAPTURE)
V/msm8974_platform( 387): platform_get_input_snd_device: enter: out_device(0) in_device(0x8)
V/msm8974_platform( 387): get_INPUT_snd_device: check by Input_source(6)
V/msm8974_platform( 387): platform_get_input_snd_device_by_source: enter: out_device(0) in_device(0x8)
V/msm8974_platform( 387): get_INPUT_snd_device: AUDIO_SOURCE_VOICE_RECOGNITION
V/msm8974_platform( 387): platform_get_input_snd_device: exit: in_snd_device(dummy)
D/audio_hw_primary( 387): select_devices: out_snd_device(0: dummy)
D/audio_hw_primary( 387): select_devices: in_snd_device(124: dummy)
D/ACDB-LOADER( 387): ACDB -> send_audio_cal, acdb_id = 49, path = 1
D/ACDB-LOADER( 387): ACDB -> send_adm_topology
D/ACDB-LOADER( 387): ACDB -> ACDB_CMD_GET_AUDPROC_COMMON_TOPOLOGY_ID
D/ACDB-LOADER( 387): ACDB -> send_audtable
D/ACDB-LOADER( 387): ACDB -> ACDB_CMD_GET_AUDPROC_COMMON_TABLE
D/ACDB-LOADER( 387): ACDB -> AUDIO_SET_AUDPROC_CAL
D/ACDB-LOADER( 387): ACDB -> send_audvoltable
D/ACDB-LOADER( 387): ACDB -> ACDB_CMD_GET_AUDPROC_GAIN_DEP_STEP_TABLE
D/ ( 387): Failed to fetch the lookup information of the device 00000031
E/ACDB-LOADER( 387): Error: ACDB AudProc vol returned = -19
D/ACDB-LOADER( 387): ACDB -> AUDIO_SET_AUDPROC_VOL_CAL
D/ACDB-LOADER( 387): ACDB -> AUDIO_SET_AFE_CAL
V/audio_hw_primary( 387): enable_snd_device: snd_device(124: dummy, dummy)
D/audio_route( 387): ++++ audio_route_update_mixer ==============
D/audio_route( 387): ------ audio_route_update_mixer ==============
V/audio_hw_primary( 387): enable_audio_route: enter: usecase(7)
V/audio_hw_primary( 387): enable_audio_route: apply mixer path: audio-record bt-sco
D/audio_route( 387): ++++ audio_route_update_mixer ==============
D/audio_route( 387): Setting mixer control: MultiMedia1 Mixer AUX_PCM_UL_TX, value: 1
D/audio_route( 387): ------ audio_route_update_mixer ==============
V/audio_hw_primary( 387): enable_audio_route: exit
V/audio_hw_primary( 387): start_input_stream: Opening PCM device card_id(0) device_id(0), channels 1
V/xappmedia.sdk.service.GoogleSpeechRecognizer(18053): Adjusted volume level: 0.0. RMSDB: -2.12
E/Global isDisableMicrophone(18053): isDisableMixrophone:true
E/MusicService(18053): XappAds VolumeLevel Callback OnRmsChanged: rmsDb: -2.12 adjustFol: 0.0
E/NowPlayingFragment OnReceive:(18053): onReceive 1
E/NowPlayingFragment OnReceive:(18053): Mic Animation 1
E/NowPlayingFragment OnReceive:(18053): Volume Change 1
E/NowPlayingFragment OnReceive:(18053): Volume Change 2: Mic Size: 300.0
E/NowPlayingFragment OnReceive:(18053): Volume Change 2: VOl: 0.0
E/NowPlayingFragment OnReceive:(18053): Draw Mic 1
V/audio_hw_primary( 387): start_input_stream: exit
It looks to me like its failing to open an input stream off of the mic. I can't find much information on this, but I think it's probably something to do with how i'm using audio focus. Anyone have any insights?

Audiotrack stops sound randomly, but state is STATE_INITIALIZED and PLAYSTATE_PLAYING

I'm looping and audiotrack with...
audioTrack.setLoopPoints(0, length, -1);
audioTrack.play();
But after random time (several minutes), it stop sounding, but state is STATE_INITIALIZED and PLAYSTATE_PLAYING.
In that moment, I get this message ...
09-20 19:32:27.989: D/audio_hw_primary(176): out_standby: enter: usecase(1: low-latency_playback)
09-20 19:32:28.039: D/audio_hw_primary(176): stop_output_stream: enter: usecase(1: low- latency-playback)
09-20 19:32:28.049: D/audio_hw_primary(176): disable_audio_route: reset mixer path: low-latency-playback
09-20 19:32:28.049: D/audio_hw_primary(176): disable_snd_device: snd_device(2: speaker)
09-20 19:32:28.049: D/audio_hw_primary(176): stop_output_stream: exit: status(0)
09-20 19:32:28.049: D/audio_hw_primary(176): out_standby: exit
I need to loop audiotrack limitless, please, anyone knows how to solve it ?
PD: The stop seems to happen only in versions 4.1 and later.
Seems like the phone is entering stand by, when you configured your MediaPlayer, did you get a wakelock?
yourMediaPlayer.setWakeMode(getApplicationContext(), PowerManager.PARTIAL_WAKE_LOCK);
Don't forget to release your mplayer later.

Android MediaPlayer prepareAsync is failing on Galaxy SIII with Android 4.1.2

I'm trying to listen to a stream from an android device.
Listening to this stream works well on all devices i tested (galaxy s I, Sony etc) but for some reason not on Galaxy SIII android 4.1.2
I have a wrapper class to control the media player but the code translates into this standard code:
mediaPlayer = new MediaPlayer();
mediaPlayer.setAudioStreamType(AudioManager.STREAM_MUSIC);
mediaPlayer.setDataSource("http://46.105.122.141:3634/");
mediaPlayer.setOnPreparedListener(new OnPreparedListener() {
public void onPrepared(MediaPlayer mp) {
mp.start();
}
});
mediaPlayer.prepareAsnyc();
So, this works well on all other devices i tested but on Galaxy SIII after ~30 seconds in prepareAsync i get a Media error (-1, 1004) prepare failed error.
If i change the stream URL with a local radio
mediaPlayer.setDataSource("http://stream2.srr.ro:8000/");
streaming works fine also in galaxy sIII.
The only differences i see between the two streams
http://46.105.122.141:3634/
http://stream2.srr.ro:8000/
is that one one provides the IP and the other one provides a domain name.
Port is different (3024vs 8000)
I can't figure out why this doesn t work on galaxy SIII.
Can you please help?
Thank you!
Dan
EDIT:
Here are the logs :
I see the "This is not a DRM content" which i don't know what it means.
There's the "cache has reached EOS, prepare is done." message.
Any ideas what can be the cause?
06-19 21:57:32.180: V/AwesomePlayer(1919): setDataSource_l: Audio(1), Video(0)
06-19 21:57:32.180: I/AwesomePlayer(1919): AwesomePlayer::setDataSource_l():: This is not a DRM content
06-19 21:57:32.180: I/OMXCodec(1919): Create() mime = audio/mpeg, isAlpAudio = 1
06-19 21:57:32.185: D/dalvikvm(2278): GC_FOR_ALLOC freed 2K, 24% free 45614K/59911K, paused 108ms, total 109ms
06-19 21:57:32.185: W/SignalStrength(2643): getGsmLevel=4
06-19 21:57:32.190: W/SignalStrength(2643): getLevel=4 (SignalStrength: 11 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 gsm|lte 4)
06-19 21:57:32.190: W/SignalStrength(2643): getGsmLevel=4
06-19 21:57:32.190: W/SignalStrength(2643): getLevel=4 (SignalStrength: 11 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 gsm|lte 4)
06-19 21:57:32.190: I/OMXCodec(1919): Successfully allocated and configured OMX node 'OMX.SEC.MP3.Decoder , mIsALPrunning =0'
06-19 21:57:32.190: D/STATUSBAR-NetworkController(2643): onSignalStrengthsChanged signalStrength=SignalStrength: 11 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 gsm|lte 4 level=4
06-19 21:57:32.190: D/STATUSBAR-NetworkController(2643): refreshSignalCluster: data=0 bt=false
06-19 21:57:32.190: D/STATUSBAR-SignalClusterView(2643): mSeparateMobileGroup=8
06-19 21:57:32.190: D/STATUSBAR-SignalClusterView(2643): mSeparateMobileGroup=8
06-19 21:57:32.190: D/STATUSBAR-SignalClusterView(2643): mSeparateMobileGroup=8
06-19 21:57:32.200: W/SignalStrength(2278): getGsmLevel=4
06-19 21:57:32.210: W/SignalStrength(2278): getLevel=4 (SignalStrength: 11 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 gsm|lte 4)
06-19 21:57:32.210: I/ActivityManager(2278): Process com.google.android.apps.maps (pid 18691) (adj 8) has died.
06-19 21:57:32.215: I/ActivityManager(2278): Process com.facebook.katana (pid 16373) (adj 8) has died.
06-19 21:57:32.240: W/SignalStrength(2278): getGsmDbm=-91
06-19 21:57:32.240: W/SignalStrength(2278): getDbm=-91
06-19 21:57:32.240: W/SignalStrength(2278): getGsmAsuLevel=11
06-19 21:57:32.240: W/SignalStrength(2278): getAsuLevel=11
06-19 21:57:32.295: D/AwesomePlayer(1919): cache has reached EOS, prepare is done.
06-19 21:57:32.295: W/AwesomePlayer(1919): abortPrepare() mIsAsyncPrepare (1), err (-2147483648)
06-19 21:57:32.295: V/AwesomePlayer(1919): notifyListner_l() msg (100-MEDIA_ERROR), ext1 (1), ext2 (-2147483648)
06-19 21:57:32.295: E/AwesomePlayer(1919): return http streaming network error
06-19 21:57:32.295: V/MediaPlayerService(1919): [238] notify (0x41f61fa8, 100, 1, -1004)
06-19 21:57:32.410: V/MediaPlayer(19075): message received msg=100, ext1=1, ext2=-1004
06-19 21:57:32.410: E/MediaPlayer(19075): error (1, -1004)
06-19 21:57:32.410: V/MediaPlayer(19075): signal application thread
06-19 21:57:32.410: V/MediaPlayer(19075): prepare complete - status=1
06-19 21:57:32.295: V/MediaPlayerService(1919): [238] notify (0x41f61fa8, 100, 1, -1004)
I came across this exact scenario today, and my problem was that I was behind a firewall that did not allow one traffic on one of the streaming ports.

Categories

Resources