Loading hal/audio_hw.c +8 −0 Original line number Diff line number Diff line Loading @@ -1778,6 +1778,10 @@ exit: if (ret != 0) { if (out->pcm) ALOGE("%s: error %d - %s", __func__, ret, pcm_get_error(out->pcm)); if (out->usecase == USECASE_COMPRESS_VOIP_CALL) { voice_extn_compress_voip_close_output_stream(&out->stream.common); out->standby = true; } out_standby(&out->stream.common); usleep(bytes * 1000000 / audio_stream_frame_size(&out->stream.common) / out_get_sample_rate(&out->stream.common)); Loading Loading @@ -2184,6 +2188,10 @@ exit: pthread_mutex_unlock(&in->lock); if (ret != 0) { if (in->usecase == USECASE_COMPRESS_VOIP_CALL) { voice_extn_compress_voip_close_input_stream(&in->stream.common); in->standby = true; } in_standby(&in->stream.common); ALOGV("%s: read failed - sleeping for buffer duration", __func__); usleep(bytes * 1000000 / audio_stream_frame_size(&in->stream.common) / Loading hal/voice_extn/compress_voip.c +15 −7 Original line number Diff line number Diff line Loading @@ -561,6 +561,9 @@ int voice_extn_compress_voip_start_output_stream(struct stream_out *out) ALOGD("%s: enter", __func__); if (!voip_data.out_stream_count) ret = voice_extn_compress_voip_open_output_stream(out); ret = voip_start_call(adev, &out->config); out->pcm = voip_data.pcm_rx; uc_info = get_usecase_from_list(adev, USECASE_COMPRESS_VOIP_CALL); Loading @@ -579,6 +582,9 @@ int voice_extn_compress_voip_start_input_stream(struct stream_in *in) ALOGD("%s: enter", __func__); if (!voip_data.in_stream_count) ret = voice_extn_compress_voip_open_input_stream(in); ret = voip_start_call(adev, &in->config); in->pcm = voip_data.pcm_tx; Loading @@ -593,10 +599,11 @@ int voice_extn_compress_voip_close_output_stream(struct audio_stream *stream) int ret = 0; ALOGD("%s: enter", __func__); if (voip_data.out_stream_count > 0) { voip_data.out_stream_count--; ret = voip_stop_call(adev); voip_data.out_stream = NULL; } ALOGV("%s: exit: status(%d)", __func__, ret); return ret; Loading Loading @@ -633,12 +640,13 @@ int voice_extn_compress_voip_close_input_stream(struct audio_stream *stream) ALOGD("%s: enter", __func__); if(voip_data.in_stream_count > 0) { voip_data.in_stream_count--; status = voip_stop_call(adev); } ALOGV("%s: exit: status(%d)", __func__, status); return status; } int voice_extn_compress_voip_open_input_stream(struct stream_in *in) Loading Loading
hal/audio_hw.c +8 −0 Original line number Diff line number Diff line Loading @@ -1778,6 +1778,10 @@ exit: if (ret != 0) { if (out->pcm) ALOGE("%s: error %d - %s", __func__, ret, pcm_get_error(out->pcm)); if (out->usecase == USECASE_COMPRESS_VOIP_CALL) { voice_extn_compress_voip_close_output_stream(&out->stream.common); out->standby = true; } out_standby(&out->stream.common); usleep(bytes * 1000000 / audio_stream_frame_size(&out->stream.common) / out_get_sample_rate(&out->stream.common)); Loading Loading @@ -2184,6 +2188,10 @@ exit: pthread_mutex_unlock(&in->lock); if (ret != 0) { if (in->usecase == USECASE_COMPRESS_VOIP_CALL) { voice_extn_compress_voip_close_input_stream(&in->stream.common); in->standby = true; } in_standby(&in->stream.common); ALOGV("%s: read failed - sleeping for buffer duration", __func__); usleep(bytes * 1000000 / audio_stream_frame_size(&in->stream.common) / Loading
hal/voice_extn/compress_voip.c +15 −7 Original line number Diff line number Diff line Loading @@ -561,6 +561,9 @@ int voice_extn_compress_voip_start_output_stream(struct stream_out *out) ALOGD("%s: enter", __func__); if (!voip_data.out_stream_count) ret = voice_extn_compress_voip_open_output_stream(out); ret = voip_start_call(adev, &out->config); out->pcm = voip_data.pcm_rx; uc_info = get_usecase_from_list(adev, USECASE_COMPRESS_VOIP_CALL); Loading @@ -579,6 +582,9 @@ int voice_extn_compress_voip_start_input_stream(struct stream_in *in) ALOGD("%s: enter", __func__); if (!voip_data.in_stream_count) ret = voice_extn_compress_voip_open_input_stream(in); ret = voip_start_call(adev, &in->config); in->pcm = voip_data.pcm_tx; Loading @@ -593,10 +599,11 @@ int voice_extn_compress_voip_close_output_stream(struct audio_stream *stream) int ret = 0; ALOGD("%s: enter", __func__); if (voip_data.out_stream_count > 0) { voip_data.out_stream_count--; ret = voip_stop_call(adev); voip_data.out_stream = NULL; } ALOGV("%s: exit: status(%d)", __func__, ret); return ret; Loading Loading @@ -633,12 +640,13 @@ int voice_extn_compress_voip_close_input_stream(struct audio_stream *stream) ALOGD("%s: enter", __func__); if(voip_data.in_stream_count > 0) { voip_data.in_stream_count--; status = voip_stop_call(adev); } ALOGV("%s: exit: status(%d)", __func__, status); return status; } int voice_extn_compress_voip_open_input_stream(struct stream_in *in) Loading