Loading hal/audio_hw.c +14 −1 Original line number Diff line number Diff line Loading @@ -3848,6 +3848,12 @@ static int out_on_error(struct audio_stream *stream) if (out->flags & AUDIO_OUTPUT_FLAG_COMPRESS_OFFLOAD) { send_offload_cmd_l(out, OFFLOAD_CMD_ERROR); } if (is_offload_usecase(out->usecase) && out->card_status == CARD_STATUS_OFFLINE) { ALOGD("Setting previous card status if offline"); out->prev_card_status_offline = true; } pthread_mutex_unlock(&out->lock); return status; Loading Loading @@ -5143,6 +5149,9 @@ static int out_get_render_position(const struct audio_stream_out *stream, */ ALOGE(" ERROR: sound card not active, return error"); ret = -EINVAL; } else if (out->prev_card_status_offline) { ALOGE("ERROR: previously sound card was offline,return error"); ret = -EINVAL; } else { ret = 0; adjust_frames_for_device_delay(out, dsp_frames); Loading Loading @@ -5245,6 +5254,9 @@ static int out_get_presentation_position(const struct audio_stream_out *stream, } else if (out->card_status == CARD_STATUS_OFFLINE) { *frames = out->written; clock_gettime(CLOCK_MONOTONIC, timestamp); if (is_offload_usecase(out->usecase)) ret = -EINVAL; else ret = 0; } } Loading Loading @@ -6380,6 +6392,7 @@ int adev_open_output_stream(struct audio_hw_device *dev, out->hal_output_suspend_supported = 0; out->dynamic_pm_qos_config_supported = 0; out->set_dual_mono = false; out->prev_card_status_offline = false; if ((flags & AUDIO_OUTPUT_FLAG_BD) && (property_get_bool("vendor.audio.matrix.limiter.enable", false))) Loading hal/audio_hw.h +1 −0 Original line number Diff line number Diff line Loading @@ -371,6 +371,7 @@ struct stream_out { mix_matrix_params_t pan_scale_params; mix_matrix_params_t downmix_params; bool set_dual_mono; bool prev_card_status_offline; error_log_t *error_log; }; Loading Loading
hal/audio_hw.c +14 −1 Original line number Diff line number Diff line Loading @@ -3848,6 +3848,12 @@ static int out_on_error(struct audio_stream *stream) if (out->flags & AUDIO_OUTPUT_FLAG_COMPRESS_OFFLOAD) { send_offload_cmd_l(out, OFFLOAD_CMD_ERROR); } if (is_offload_usecase(out->usecase) && out->card_status == CARD_STATUS_OFFLINE) { ALOGD("Setting previous card status if offline"); out->prev_card_status_offline = true; } pthread_mutex_unlock(&out->lock); return status; Loading Loading @@ -5143,6 +5149,9 @@ static int out_get_render_position(const struct audio_stream_out *stream, */ ALOGE(" ERROR: sound card not active, return error"); ret = -EINVAL; } else if (out->prev_card_status_offline) { ALOGE("ERROR: previously sound card was offline,return error"); ret = -EINVAL; } else { ret = 0; adjust_frames_for_device_delay(out, dsp_frames); Loading Loading @@ -5245,6 +5254,9 @@ static int out_get_presentation_position(const struct audio_stream_out *stream, } else if (out->card_status == CARD_STATUS_OFFLINE) { *frames = out->written; clock_gettime(CLOCK_MONOTONIC, timestamp); if (is_offload_usecase(out->usecase)) ret = -EINVAL; else ret = 0; } } Loading Loading @@ -6380,6 +6392,7 @@ int adev_open_output_stream(struct audio_hw_device *dev, out->hal_output_suspend_supported = 0; out->dynamic_pm_qos_config_supported = 0; out->set_dual_mono = false; out->prev_card_status_offline = false; if ((flags & AUDIO_OUTPUT_FLAG_BD) && (property_get_bool("vendor.audio.matrix.limiter.enable", false))) Loading
hal/audio_hw.h +1 −0 Original line number Diff line number Diff line Loading @@ -371,6 +371,7 @@ struct stream_out { mix_matrix_params_t pan_scale_params; mix_matrix_params_t downmix_params; bool set_dual_mono; bool prev_card_status_offline; error_log_t *error_log; }; Loading