I have been having an issues playing audio files using MediaPlayer on MarshMallow where it stops too soon like a second or so.
The audio file is a .wav file with a length just under 3 seconds. It has the following properties:
Codec: PCM S16 LE(araw)
Channels: Mono
Sample rate: 8000 Hz
Bit per sample: 16
I have had this issue on the following devices:
OnePlus One - Android version:6.0.1
Nexus 6 - Android version:6.0.1
Nexus 5 - Android version:6.0.1
The same code works on previous versions of Android.
From initial looks it looks due to the implementation of NuPlayer and the removal of AwesomePlayer. In Lollipop it was optional in developer settings to use NuPlayer.
Has anyone experienced this? what did you do to fix this?
My code put simply does the following:
String mAudioFilePath = "path to audio file"
MediaPlayer player = new MediaPlayer();
player.setWakeMode(getActivity(), PowerManager.PARTIAL_WAKE_LOCK);
player.reset();
player.setDataSource(mAudioFilePath);
player.setOnPreparedListener(new MediaPlayer.OnPreparedListener() {
#Override
public void onPrepared(MediaPlayer mp) {
mp.start();
audioSeekBar.setProgress(0);
audioSeekBar.setMax(100);
updateProgressBar();
}
});
player.prepareAsync();
updateProgressBar() - updates the audioSeekBar and is stopped from updating the SeekBar using:
player.setOnCompletionListener(new MediaPlayer.OnCompletionListener() {
#Override
public void onCompletion(MediaPlayer mp) {
mHandler.removeCallbacks(mUpdateTimeTask);
audioSeekBar.setProgress(0);
audioSeekBar.setMax(100);
player.stop();
player.reset();
}
});
I get the following stack-trace:
05-01 18:53:18.344 31287-31287/? D/LockScreen: [ChargingTimeHelper] skip updating, mPreLevel: 71, curLevel: 71
05-01 18:53:23.582 7326-7441/? D/audio_hw_primary: out_set_parameters: enter: usecase(1: low-latency-playback) kvpairs: routing=2
05-01 18:53:23.593 7326-7441/? D/audio_hw_primary: start_output_stream: enter: stream(0xb5f77600)usecase(1: low-latency-playback) devices(0x2)
05-01 18:53:23.593 7326-7441/? D/audio_hw_primary: start_output_stream: enter: usecase(1: low-latency-playback) devices(0x2)
05-01 18:53:23.594 7326-7441/? D/audio_hw_primary: select_devices: out_snd_device(2: speaker) in_snd_device(0: )
05-01 18:53:23.594 7326-7441/? W/msm8974_platform: Codec backend bitwidth 16, samplerate 48000
05-01 18:53:23.594 7326-7441/? D/hardware_info: hw_info_append_hw_type : device_name = speaker
05-01 18:53:23.594 7326-7441/? I/msm8974_platform: platform_send_audio_calibration: sending audio calibration for snd_device(2) acdb_id(15)
05-01 18:53:23.594 7326-7441/? D/ACDB-LOADER: ACDB -> send_audio_cal, acdb_id = 15, path = 0
05-01 18:53:23.594 7326-7441/? D/ACDB-LOADER: ACDB -> send_adm_topology
05-01 18:53:23.594 7326-7441/? D/ACDB-LOADER: ACDB -> ACDB_CMD_GET_AUDPROC_COMMON_TOPOLOGY_ID
05-01 18:53:23.594 7326-7441/? D/ACDB-LOADER: ACDB -> send_asm_topology
05-01 18:53:23.594 7326-7441/? D/ACDB-LOADER: ACDB -> ACDB_CMD_GET_AUDPROC_STREAM_TOPOLOGY_ID
05-01 18:53:23.594 7326-7441/? D/ACDB-LOADER: ACDB -> send_audtable
05-01 18:53:23.594 7326-7441/? D/ACDB-LOADER: ACDB -> ACDB_CMD_GET_AUDPROC_COMMON_TABLE
05-01 18:53:23.594 7326-7441/? D/ACDB-LOADER: ACDB -> AUDIO_SET_AUDPROC_CAL
05-01 18:53:23.594 7326-7441/? D/ACDB-LOADER: ACDB -> send_audvoltable
05-01 18:53:23.594 7326-7441/? D/ACDB-LOADER: ACDB -> ACDB_CMD_GET_AUDPROC_GAIN_DEP_STEP_TABLE
[ 05-01 18:53:23.594 7326: 7441 D/ ]
Failed to fetch the lookup information of the device 0000000F
05-01 18:53:23.594 7326-7441/? E/ACDB-LOADER: Error: ACDB AudProc vol returned = -19
05-01 18:53:23.594 7326-7441/? D/ACDB-LOADER: ACDB -> AUDIO_SET_AUDPROC_VOL_CAL
05-01 18:53:23.594 7326-7441/? D/ACDB-LOADER: ACDB -> send_afe_cal
05-01 18:53:23.594 7326-7441/? D/ACDB-LOADER: ACDB -> ACDB_CMD_GET_AFE_COMMON_TABLE
[ 05-01 18:53:23.594 7326: 7441 D/ ]
Failed to fetch the lookup information of the device 0000000F
05-01 18:53:23.594 7326-7441/? E/ACDB-LOADER: Error: ACDB AFE returned = -19
05-01 18:53:23.594 7326-7441/? D/ACDB-LOADER: ACDB -> AUDIO_SET_AFE_CAL
05-01 18:53:23.601 7326-7441/? D/audio_hw_primary: select_devices: done
05-01 18:53:23.604 7326-7052/? I/FFmpegExtractor: android-source:0xaeaf9240
05-01 18:53:23.605 7326-7052/? D/FFmpegExtractor: suppoted codec(pcm_s16le) by official Stagefright
05-01 18:53:23.605 7326-7052/? D/FFmpegExtractor: ffmpeg detected media content as 'audio/x-wav' with confidence 0.08
05-01 18:53:23.607 7326-7051/? D/NuPlayerDriver: notifyListener_l(0xb5f26b60), (1, 0, 0)
05-01 18:53:23.611 7326-7447/? D/NuPlayerDriver: start(0xb5f26b60), state is 4, eos is 0
05-01 18:53:23.611 7326-7051/? I/GenericSource: start
05-01 18:53:23.612 7326-7051/? I/MetaData: srte: (int32_t) 8000
05-01 18:53:23.612 7326-7051/? I/MetaData: sbit: (int32_t) 16
05-01 18:53:23.612 7326-7051/? I/MetaData: pfmt: (int32_t) 1
05-01 18:53:23.612 7326-7051/? I/MetaData: mime: (char*) audio/raw
05-01 18:53:23.612 7326-7051/? I/MetaData: inpS: (int32_t) 32768
05-01 18:53:23.612 7326-7051/? I/MetaData: dura: (int64_t) 2950000
05-01 18:53:23.612 7326-7051/? I/MetaData: chnm: (int32_t) 0
05-01 18:53:23.612 7326-7051/? I/MetaData: #chn: (int32_t) 1
05-01 18:53:23.612 7326-7051/? I/AudioPolicyManagerCustom: PCM offload property is enabled
05-01 18:53:23.612 7326-7051/? I/AVNuUtils: No channel mask, try channel count
05-01 18:53:23.612 7326-7051/? W/AVNuUtils: No bitrate info
05-01 18:53:23.612 7326-7051/? I/NuPlayer: canOffloadDecodedPCMStream
05-01 18:53:23.612 7326-7051/? I/MetaData: srte: (int32_t) 8000
05-01 18:53:23.612 7326-7051/? I/MetaData: sbit: (int32_t) 16
05-01 18:53:23.612 7326-7051/? I/MetaData: mime: (char*) audio/raw
05-01 18:53:23.612 7326-7051/? I/MetaData: dura: (int64_t) 2950000
05-01 18:53:23.612 7326-7051/? I/MetaData: chnm: (int32_t) 1
05-01 18:53:23.612 7326-7051/? I/MetaData: #chn: (int32_t) 1
05-01 18:53:23.612 7326-7051/? I/AVNuUtils: decision 0 mime audio/raw
05-01 18:53:23.612 7326-7051/? I/MetaData: srte: (int32_t) 8000
05-01 18:53:23.612 7326-7051/? I/MetaData: sbit: (int32_t) 16
05-01 18:53:23.612 7326-7051/? I/MetaData: mime: (char*) audio/raw
05-01 18:53:23.612 7326-7051/? I/MetaData: dura: (int64_t) 2950000
05-01 18:53:23.612 7326-7051/? I/MetaData: chnm: (int32_t) 1
05-01 18:53:23.612 7326-7051/? I/MetaData: #chn: (int32_t) 1
05-01 18:53:23.613 7326-7051/? I/AudioPolicyManagerCustom: PCM offload property is enabled
05-01 18:53:23.613 7326-7051/? I/NuPlayer: PCM offload decided: 0
05-01 18:53:23.613 7326-7051/? I/MetaData: srte: (int32_t) 8000
05-01 18:53:23.613 7326-7051/? I/MetaData: sbit: (int32_t) 16
05-01 18:53:23.613 7326-7051/? I/MetaData: pfmt: (int32_t) 1
05-01 18:53:23.613 7326-7051/? I/MetaData: mime: (char*) audio/raw
05-01 18:53:23.613 7326-7051/? I/MetaData: inpS: (int32_t) 32768
05-01 18:53:23.613 7326-7051/? I/MetaData: dura: (int64_t) 2950000
05-01 18:53:23.613 7326-7051/? I/MetaData: chnm: (int32_t) 0
05-01 18:53:23.613 7326-7051/? I/MetaData: #chn: (int32_t) 1
05-01 18:53:23.614 7326-7051/? I/AudioPolicyManagerCustom: PCM offload property is enabled
05-01 18:53:23.614 7326-7051/? I/AVNuUtils: No channel mask, try channel count
05-01 18:53:23.614 7326-7051/? W/AVNuUtils: No bitrate info
05-01 18:53:23.614 7326-7051/? I/NuPlayer: canOffloadDecodedPCMStream
05-01 18:53:23.614 7326-7051/? I/MetaData: srte: (int32_t) 8000
05-01 18:53:23.614 7326-7051/? I/MetaData: sbit: (int32_t) 16
05-01 18:53:23.614 7326-7051/? I/MetaData: mime: (char*) audio/raw
05-01 18:53:23.614 7326-7051/? I/MetaData: dura: (int64_t) 2950000
05-01 18:53:23.614 7326-7051/? I/MetaData: chnm: (int32_t) 1
05-01 18:53:23.614 7326-7051/? I/MetaData: #chn: (int32_t) 1
05-01 18:53:23.614 7326-7051/? I/AVNuUtils: decision 0 mime audio/raw
05-01 18:53:23.614 7326-7051/? I/MetaData: srte: (int32_t) 8000
05-01 18:53:23.614 7326-7051/? I/MetaData: sbit: (int32_t) 16
05-01 18:53:23.615 7326-7051/? I/MetaData: mime: (char*) audio/raw
05-01 18:53:23.615 7326-7051/? I/MetaData: dura: (int64_t) 2950000
05-01 18:53:23.615 7326-7051/? I/MetaData: chnm: (int32_t) 1
05-01 18:53:23.615 7326-7051/? I/MetaData: #chn: (int32_t) 1
05-01 18:53:23.615 7326-7051/? I/AudioPolicyManagerCustom: PCM offload property is enabled
05-01 18:53:23.615 7326-7051/? I/NuPlayer: PCM offload decided: 0
05-01 18:53:23.621 7326-7055/? E/OMXNodeInstance: setConfig(53:google.raw.decoder, ConfigPriority(0x6f800002)) ERROR: Undefined(0x80001001)
05-01 18:53:23.621 7326-7055/? I/ACodec: codec does not support config priority (err -2147483648)
05-01 18:53:23.622 7326-7055/? I/MediaCodec: MediaCodec will operate in async mode
05-01 18:53:23.687 7326-7441/? D/audio_hw_primary: out_set_parameters: enter: usecase(1: low-latency-playback) kvpairs: routing=2
05-01 18:53:23.688 7326-7051/? D/NuPlayerDriver: notifyListener_l(0xb5f26b60), (6, 0, 0)
05-01 18:53:23.688 7326-7054/? I/NuPlayerDecoder: [audio] saw output EOS
05-01 18:53:24.314 5072-5286/? D/HeadsetStateMachine: Disconnected process message: 10, size: 0
05-01 18:53:24.315 31287-31287/? D/LockScreen: [BatteryInfoTracker] Received: android.intent.action.BATTERY_CHANGED
05-01 18:53:24.315 31287-31287/? D/LockScreen: [ChargingTimeHelper] update charging, scale: 100, mPreLevel: 71, curLevel: 71, mPreTime: 66930510, curTime: 67110512, plug: 2, mStatsStarted: true
05-01 18:53:24.315 31287-31287/? D/LockScreen: [ChargingTimeHelper] skip updating, mPreLevel: 71, curLevel: 71
05-01 18:53:25.440 7326-7053/? E/NuPlayerRenderer: CHECK_EQ(copy mAudioSink->frameSize(), 0) failed b/25372978
05-01 18:53:25.440 7326-7053/? E/NuPlayerRenderer: mAudioSink->frameSize() 2
05-01 18:53:25.440 7326-7053/? E/NuPlayerRenderer: bytes to copy 14431
05-01 18:53:25.440 7326-7053/? E/NuPlayerRenderer: entry size 14431, entry offset 0
05-01 18:53:25.440 7326-7051/? E/NuPlayer: audio track encountered an error (-2147483648)
05-01 18:53:25.440 7326-7051/? D/NuPlayerDriver: notifyListener_l(0xb5f26b60), (100, 1, -2147483648)
05-01 18:53:25.440 7326-7051/? D/NuPlayerDriver: notifyListener_l(0xb5f26b60), (2, 0, 0)
05-01 18:53:25.440 4711-4726/com.example.myapp E/MediaPlayer: error (1, -2147483648)
05-01 18:53:25.440 4711-4711/com.example.myapp E/MediaPlayer: Error (1,-2147483648)
05-01 18:53:25.442 7326-7447/? D/NuPlayerDriver: stop(0xb5f26b60)
05-01 18:53:25.442 7326-7447/? D/NuPlayerDriver: notifyListener_l(0xb5f26b60), (8, 0, 0)
05-01 18:53:25.442 7326-7448/? D/NuPlayerDriver: reset(0xb5f26b60)
05-01 18:53:25.446 7326-7051/? D/NuPlayerDriver: notifyResetComplete(0xb5f26b60)
05-01 18:53:25.447 7326-7326/? D/NuPlayerDriver: reset(0xb5f26b60)
05-01 18:53:28.446 7326-7441/? D/audio_hw_primary: out_standby: enter: stream (0xb5f77600) usecase(1: low-latency-playback)
Any help is greatly appreciated
Related
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.
That's what I get when I try to addFrame(). Have anyone faced with that?
08-28 18:04:37.371 511-1685/? E/audio_hw_utils:
audio_extn_utils_send_app_type_cfg: Could not get ctl for mixer cmd - Audio Stream 43 App Type Cfg
08-28 18:04:37.371 511-1685/? E/voice: voice_is_in_call_rec_stream: input stream is NULL
08-28 18:04:37.371 511-1685/? E/ACDB-LOADER: Error: ACDB AudProc vol returned = -19
08-28 18:04:37.393 511-1685/? E/voice: voice_is_in_call_rec_stream: input stream is NULL
08-28 18:04:37.394 511-1685/? E/ACDB-LOADER: Error: ACDB_CMD_GET_AUDPROC_COMMON_TABLE_SIZE Returned = -19
08-28 18:04:37.394 511-1685/? E/ACDB-LOADER: Error: ACDB audproc returned = -19
08-28 18:04:37.394 511-1685/? E/ACDB-LOADER: Error: ACDB AudProc vol returned = -19
08-28 18:04:37.394 511-1685/? E/ACDB-LOADER: Error: ACDB AFE returned = -19
08-28 18:04:37.395 511-1685/? E/ACDB-LOADER: Error: ACDB AudProc vol returned = -19
So there wasn't a problem. It was ok to just ignore that. The problem was a high resolution of images. Encoder just needs a huge amount of time to process all of them. To solve that I just decreased the resolution of images. I hope that will help somebody.
I am developing an app and using one plus 3 (Android 7.0, Oxygens OS 4.0.3, API 24). PeopleActivity is called if you have more than one contact with same phone number. In my default SMS App, it opens Quick Contact so there is some problem in my app or implementation because of which it opens PeopleActivity. But I am unable to figure out what. Any pointers in right direction appreciated.
Faulty Code
private View.OnClickListener onImageClick(final String phNumber) {
return new View.OnClickListener() {
#Override
public void onClick(View v) {
Intent intent = new Intent(ContactsContract.Intents.SHOW_OR_CREATE_CONTACT,
Uri.fromParts("tel", phNumber, null));
v.getContext().startActivity(intent);
}
};
}
LogCat
04-16 07:40:25.917 1364-29446/? I/ActivityManager: START u0 {act=com.android.contacts.action.SHOW_OR_CREATE_CONTACT dat=tel:xxxxxxxxxxxxx cmp=com.android.contacts/.activities.ShowOrCreateActivity} from uid 10151 pid 20127 on display 0
04-16 07:40:25.918 762-1076/? D/APM_AudioPolicyManager: startOutput() output 13, stream 1, session 73
04-16 07:40:25.918 762-1076/? D/AudioPolicyManagerCustom: getNewOutputDevice() selected device 2
04-16 07:40:25.918 762-1076/? D/APM_AudioPolicyManager: setOutputDevice() device 0002 delayMs 0
04-16 07:40:25.922 762-1211/? D/audio_hw_primary: out_set_parameters: enter: usecase(1: low-latency-playback) kvpairs: routing=2
04-16 07:40:25.922 762-1211/? D/audio_hw_extn: audio_extn_set_anc_parameters: anc_enabled:0
04-16 07:40:25.922 762-1211/? D/audio_hw_spkr_prot: audio_extn_fbsp_set_parameters: Speaker protection disabled
04-16 07:40:25.923 762-1076/? D/APM_AudioPolicyManager: startOutput()--
04-16 07:40:25.923 762-1211/? D/audio_hw_primary: start_output_stream: enter: stream(0xe87fd000)usecase(1: low-latency-playback) devices(0x2)
04-16 07:40:25.924 762-1211/? D/audio_hw_primary: select_devices for use case (low-latency-playback)
04-16 07:40:25.924 762-1211/? D/audio_hw_primary: select_devices: out_snd_device(2: speaker) in_snd_device(0: )
04-16 07:40:25.924 762-1211/? I/msm8974_platform: platform_check_and_set_codec_backend_cfg:becf: afe: bitwidth 16, samplerate 48000 channels 2, backend_idx 0 usecase = 1 device (speaker)
04-16 07:40:25.924 762-1211/? D/msm8974_platform: platform_can_split_snd_device: snd_device(2) num devices(1) new_snd_devices(0)
04-16 07:40:25.924 762-1211/? I/msm8974_platform: platform_check_and_set_codec_backend_cfg: new_snd_devices[0] is 2
04-16 07:40:25.924 762-1211/? I/msm8974_platform: platform_check_codec_backend_cfg:becf: afe: bitwidth 16, samplerate 48000 channels 2, backend_idx 0 usecase = 1 device (speaker)
04-16 07:40:25.924 762-1211/? D/msm8974_platform: platform_check_codec_backend_cfg:becf: afe: playback on non-44.1-support device Configure afe to default Sample Rate(48k)
04-16 07:40:25.924 762-1211/? I/msm8974_platform: platform_check_codec_backend_cfg:becf: afe: Codec selected backend: 0 updated bit width: 16 and sample rate: 48000
04-16 07:40:25.924 762-1211/? D/audio_hw_primary: check_usecases_codec_backend:becf: force routing 0
04-16 07:40:25.924 762-1211/? D/audio_hw_primary: check_usecases_codec_backend:becf: check_usecases num.of Usecases to switch 0
04-16 07:40:25.924 762-1211/? D/hardware_info: hw_info_append_hw_type : device_name = speaker
04-16 07:40:25.924 762-1211/? D/msm8974_platform: platform_can_split_snd_device: snd_device(2) num devices(0) new_snd_devices(0)
04-16 07:40:25.924 762-1211/? D/audio_hw_primary: enable_snd_device: snd_device(2: speaker)
04-16 07:40:25.924 762-1211/? I/soundtrigger: audio_extn_sound_trigger_update_device_status: device 0x2 of type 0 for Event 1, with Raise=0
04-16 07:40:25.924 474-2481/? E/ANDR-PERF-RESOURCEQS: Failed to apply optimization [4, 0]
04-16 07:40:25.924 762-1211/? D/aud_dev_arbi: acquireOneDevice: device owner for device 2 is 1
04-16 07:40:25.929 762-1211/? I/audio_hw_primary: select_devices Selected apptype: 69937
04-16 07:40:25.930 762-1211/? D/soundtrigger: audio_extn_sound_trigger_update_stream_status: uc_id 1 of type 0 for Event 3, with Raise=0
04-16 07:40:25.930 762-1211/? I/audio_hw_utils: audio_extn_utils_send_app_type_cfg PLAYBACK app_type 69937, acdb_dev_id 15, sample_rate 48000
04-16 07:40:25.930 762-1211/? I/audio_hw_utils: audio_extn_utils_send_app_type_cfg:becf: adm: app_type 69936, acdb_dev_id 15, sample_rate 48000
04-16 07:40:25.930 762-1211/? D/msm8974_platform: platform_can_split_snd_device: snd_device(2) num devices(1) new_snd_devices(-403700752)
04-16 07:40:25.930 762-1211/? D/ACDB-LOADER: ACDB -> send_audio_cal, acdb_id = 15, path = 0, app id = 0x11131, sample rate = 48000
04-16 07:40:25.930 762-1211/? D/ACDB-LOADER: ACDB -> send_asm_topology
04-16 07:40:25.930 762-1211/? D/ACDB-LOADER: ACDB -> ACDB_CMD_GET_AUDPROC_STREAM_TOPOLOGY_ID
04-16 07:40:25.930 762-1211/? D/ACDB-LOADER: ACDB -> send_adm_topology
04-16 07:40:25.930 762-1211/? D/ACDB-LOADER: ACDB -> ACDB_CMD_GET_AUDPROC_COMMON_TOPOLOGY_ID
04-16 07:40:25.930 762-1211/? D/ACDB-LOADER: ACDB -> send_audtable
04-16 07:40:25.930 762-1211/? D/ACDB-LOADER: ACDB -> ACDB_CMD_GET_AUDPROC_COMMON_TABLE_SIZE
04-16 07:40:25.930 762-1211/? D/ACDB-LOADER: ACDB -> ACDB_CMD_GET_AUDPROC_COMMON_TABLE
04-16 07:40:25.930 762-1211/? D/ACDB-LOADER: ACDB -> AUDIO_SET_AUDPROC_CAL
04-16 07:40:25.930 762-1211/? D/ACDB-LOADER: ACDB -> send_audvoltable
04-16 07:40:25.930 762-1211/? D/ACDB-LOADER: ACDB -> ACDB_CMD_GET_AUDPROC_GAIN_DEP_STEP_TABLE, vol index 5
04-16 07:40:25.930 762-1211/? D/ACDB-LOADER: ACDB -> AUDIO_SET_VOL_CAL cal type = 12
04-16 07:40:25.930 762-1211/? D/ACDB-LOADER: ACDB -> send_audstrmtable
04-16 07:40:25.930 762-1211/? D/ACDB-LOADER: ACDB -> ACDB_CMD_GET_AUDPROC_STREAM_TABLE_V2
04-16 07:40:25.930 762-1211/? D/ACDB-LOADER: ACDB -> audstrm_cal->cal_type.cal_data.cal_size = 16
04-16 07:40:25.930 762-1211/? D/ACDB-LOADER: ACDB -> send_afe_topology
04-16 07:40:25.930 762-1211/? D/ACDB-LOADER: ACDB -> ACDB_CMD_GET_AFE_TOPOLOGY_ID
04-16 07:40:25.930 762-1211/? D/ACDB-LOADER: ACDB -> GET_AFE_TOPOLOGY_ID for adcd_id 15, Topology Id 1025e
04-16 07:40:25.930 762-1211/? D/ACDB-LOADER: ACDB -> send_afe_cal
04-16 07:40:25.930 762-1211/? D/ACDB-LOADER: ACDB -> ACDB_CMD_GET_AFE_COMMON_TABLE
04-16 07:40:25.930 762-1211/? D/ACDB-LOADER: ACDB -> AUDIO_SET_AFE_CAL
04-16 07:40:25.930 762-1211/? D/ACDB-LOADER: ACDB -> send_hw_delay : acdb_id = 15 path = 0
04-16 07:40:25.930 762-1211/? D/ACDB-LOADER: ACDB -> ACDB_AVSYNC_INFO: ACDB_CMD_GET_DEVICE_PROPERTY
04-16 07:40:25.931 762-1211/? D/audio_hw_primary: enable_audio_route: apply mixer and update path: low-latency-playback quat_i2s
04-16 07:40:25.931 1364-29446/? D/ActivityTrigger: ActivityTrigger activityPauseTrigger
04-16 07:40:25.931 762-1211/? D/audio_hw_primary: select_devices: done
04-16 07:40:25.934 762-1211/? D/msm8974_platform: platform_set_channel_map mixer_ctl_name:Playback Channel Map15
04-16 07:40:25.934 762-1211/? D/msm8974_platform: platform_set_channel_map: set mapping(1 2 0 0 0 0 0 0) for channel:2
04-16 07:40:25.936 20127-23884/in.smslite D/AppTracker: App Event: stop
04-16 07:40:25.965 21309-23885/? D/AppTracker: App Event: start
04-16 07:40:25.976 1364-3044/? E/OnePlusAppBootManager: # startActivityLocked # aInfo = null
04-16 07:40:25.976 1364-3044/? I/ActivityManager: START u0 {act=android.intent.action.SEARCH cmp=com.android.contacts/.activities.PeopleActivity (has extras)} from uid 10125 pid 21309 on display 0
04-16 07:40:25.977 21309-21309/? D/AndroidRuntime: Shutting down VM
--------- beginning of crash
04-16 07:40:25.978 21309-21309/? E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.android.contacts, PID: 21309
android.content.ActivityNotFoundException: Unable to find explicit activity class {com.android.contacts/com.android.contacts.activities.PeopleActivity}; have you declared this activity in your AndroidManifest.xml?
at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1983)
at android.app.Instrumentation.execStartActivity(Instrumentation.java:1696)
at android.app.Activity.startActivityForResult(Activity.java:4290)
at android.app.Activity.startActivityForResult(Activity.java:4249)
at android.app.Activity.startActivity(Activity.java:4588)
at android.app.Activity.startActivity(Activity.java:4548)
at com.android.contacts.activities.ShowOrCreateActivity.onQueryComplete(ShowOrCreateActivity.java:191)
at com.android.contacts.util.NotifyingAsyncQueryHandler.onQueryComplete(NotifyingAsyncQueryHandler.java:61)
at android.content.AsyncQueryHandler.handleMessage(AsyncQueryHandler.java:344)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6209)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:865)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:755)
04-16 07:40:25.978 21309-21309/? D/AppTracker: App Event: crash
04-16 07:40:25.981 1364-1850/? W/ActivityManager: Force finishing activity com.android.contacts/.activities.ShowOrCreateActivity
04-16 07:40:25.982 1364-23887/? V/MDM_DropBox: record:system_app_crash
04-16 07:40:25.984 1364-1850/? D/ActivityTrigger: ActivityTrigger activityPauseTrigger
04-16 07:40:25.985 1364-1850/? W/ActivityManager: Force finishing activity in.smslite/.activity.MainActivity
04-16 07:40:25.987 1364-29445/? W/InputMethodManagerService: Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy#a6c8de9 attribute=null, token = android.os.BinderProxy#b795472
04-16 07:40:25.987 1364-1798/? D/OSTracker: OS Event: system_app_crash
04-16 07:40:25.990 762-1211/? D/audio_hw_primary: start_output_stream: exit
04-16 07:40:25.993 1364-1850/? V/WindowManager: just for Front small Window: = Window{9c90a61 u0 net.oneplus.launcher.wallpaper.BlurWallpaper}
04-16 07:40:26.005 21309-21309/? I/Process: Sending signal. PID: 21309 SIG: 9
04-16 07:40:26.016 1364-28534/? V/WindowManager: just for Front small Window: = Window{9c90a61 u0 net.oneplus.launcher.wallpaper.BlurWallpaper}
04-16 07:40:26.018 1364-1777/? W/InputDispatcher: channel 'af18670 com.android.contacts/com.android.contacts.activities.ShowOrCreateActivity (server)' ~ Consumer closed input channel or an error occurred. events=0x9
04-16 07:40:26.019 1364-1777/? E/InputDispatcher: channel 'af18670 com.android.contacts/com.android.contacts.activities.ShowOrCreateActivity (server)' ~ Channel is unrecoverably broken and will be disposed!
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.
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?