}
SM_LEAVE_CRITICAL_SECTION(&stream_h->vstream_mutex);
- SM_ENTER_CRITICAL_SECTION_WITH_RETURN(&stream_h->focus_state_mutex, MM_ERROR_SOUND_INTERNAL);
+ SM_ENTER_CRITICAL_SECTION_WITH_RETURN(&stream_h->focus_state_mutex, SOUND_MANAGER_ERROR_INTERNAL);
ret = _destroy_pa_connection_and_unregister_focus(stream_h);
SM_LEAVE_CRITICAL_SECTION(&stream_h->focus_state_mutex);
if (ret == SOUND_MANAGER_ERROR_NONE)
}
if (!is_focus_cb_thread) {
- SM_ENTER_CRITICAL_SECTION_WITH_RETURN(&stream_h->focus_cb_mutex, MM_ERROR_SOUND_INTERNAL);
- SM_ENTER_CRITICAL_SECTION_WITH_UNLOCK_AND_RETURN(&stream_h->focus_state_mutex, &stream_h->focus_cb_mutex, MM_ERROR_SOUND_INTERNAL);
+ SM_ENTER_CRITICAL_SECTION_WITH_RETURN(&stream_h->focus_cb_mutex, SOUND_MANAGER_ERROR_INTERNAL);
+ SM_ENTER_CRITICAL_SECTION_WITH_UNLOCK_AND_RETURN(&stream_h->focus_state_mutex, &stream_h->focus_cb_mutex, SOUND_MANAGER_ERROR_INTERNAL);
} else {
/* If it is inside of the watch cb and if the previous request of this process has not been finished yet,
* the focus state mutex could be still locked. Therefore, it returns error here. */
LOGE("It is not allowed in watch cb thread during the previous request has not been finished yet");
return _convert_sound_manager_error_code(__func__, MM_ERROR_SOUND_INVALID_OPERATION);
}
- SM_ENTER_CRITICAL_SECTION_WITH_RETURN(&stream_h->focus_state_mutex, MM_ERROR_SOUND_INTERNAL);
+ SM_ENTER_CRITICAL_SECTION_WITH_RETURN(&stream_h->focus_state_mutex, SOUND_MANAGER_ERROR_INTERNAL);
}
if (stream_h->acquired_focus & focus_mask) {
return _convert_sound_manager_error_code(__func__, ret);
if (!is_focus_cb_thread) {
- SM_ENTER_CRITICAL_SECTION_WITH_RETURN(&stream_h->focus_cb_mutex, MM_ERROR_SOUND_INTERNAL);
- SM_ENTER_CRITICAL_SECTION_WITH_UNLOCK_AND_RETURN(&stream_h->focus_state_mutex, &stream_h->focus_cb_mutex, MM_ERROR_SOUND_INTERNAL);
+ SM_ENTER_CRITICAL_SECTION_WITH_RETURN(&stream_h->focus_cb_mutex, SOUND_MANAGER_ERROR_INTERNAL);
+ SM_ENTER_CRITICAL_SECTION_WITH_UNLOCK_AND_RETURN(&stream_h->focus_state_mutex, &stream_h->focus_cb_mutex, SOUND_MANAGER_ERROR_INTERNAL);
} else {
/* If it is inside of the watch cb and if the previous request of this process has not been finished yet,
* the focus state mutex could be still locked. Therefore, it returns error here. */
LOGE("It is not allowed in watch cb thread during the previous request has not been finished yet");
return _convert_sound_manager_error_code(__func__, MM_ERROR_SOUND_INVALID_OPERATION);
}
- SM_ENTER_CRITICAL_SECTION_WITH_RETURN(&stream_h->focus_state_mutex, MM_ERROR_SOUND_INTERNAL);
+ SM_ENTER_CRITICAL_SECTION_WITH_RETURN(&stream_h->focus_state_mutex, SOUND_MANAGER_ERROR_INTERNAL);
}
if (!(stream_h->acquired_focus & focus_mask)) {
}
if (!is_focus_cb_thread) {
- SM_ENTER_CRITICAL_SECTION_WITH_RETURN(&stream_h->focus_cb_mutex, MM_ERROR_SOUND_INTERNAL);
- SM_ENTER_CRITICAL_SECTION_WITH_UNLOCK_AND_RETURN(&stream_h->focus_state_mutex, &stream_h->focus_cb_mutex, MM_ERROR_SOUND_INTERNAL);
+ SM_ENTER_CRITICAL_SECTION_WITH_RETURN(&stream_h->focus_cb_mutex, SOUND_MANAGER_ERROR_INTERNAL);
+ SM_ENTER_CRITICAL_SECTION_WITH_UNLOCK_AND_RETURN(&stream_h->focus_state_mutex, &stream_h->focus_cb_mutex, SOUND_MANAGER_ERROR_INTERNAL);
} else {
/* If it is inside of the watch cb and if the previous request of this process has not been finished yet,
* the focus state mutex could be still locked. Therefore, it returns error here. */
LOGE("It is not allowed in watch cb thread during the previous request has not been finished yet");
return _convert_sound_manager_error_code(__func__, MM_ERROR_SOUND_INVALID_OPERATION);
}
- SM_ENTER_CRITICAL_SECTION_WITH_RETURN(&stream_h->focus_state_mutex, MM_ERROR_SOUND_INTERNAL);
+ SM_ENTER_CRITICAL_SECTION_WITH_RETURN(&stream_h->focus_state_mutex, SOUND_MANAGER_ERROR_INTERNAL);
}
if (is_focus_cb_thread && (stream_h->prev_acquired_focus > stream_h->acquired_focus)) {
return _convert_sound_manager_error_code(__func__, ret);
if (!is_focus_cb_thread) {
- SM_ENTER_CRITICAL_SECTION_WITH_RETURN(&stream_h->focus_cb_mutex, MM_ERROR_SOUND_INTERNAL);
- SM_ENTER_CRITICAL_SECTION_WITH_UNLOCK_AND_RETURN(&stream_h->focus_state_mutex, &stream_h->focus_cb_mutex, MM_ERROR_SOUND_INTERNAL);
+ SM_ENTER_CRITICAL_SECTION_WITH_RETURN(&stream_h->focus_cb_mutex, SOUND_MANAGER_ERROR_INTERNAL);
+ SM_ENTER_CRITICAL_SECTION_WITH_UNLOCK_AND_RETURN(&stream_h->focus_state_mutex, &stream_h->focus_cb_mutex, SOUND_MANAGER_ERROR_INTERNAL);
} else {
/* If it is inside of the watch cb and if the previous request of this process has not been finished yet,
* the focus state mutex could be still locked. Therefore, it returns error here. */
LOGE("It is not allowed in watch cb thread during the previous request has not been finished yet");
return _convert_sound_manager_error_code(__func__, MM_ERROR_SOUND_INVALID_OPERATION);
}
- SM_ENTER_CRITICAL_SECTION_WITH_RETURN(&stream_h->focus_state_mutex, MM_ERROR_SOUND_INTERNAL);
+ SM_ENTER_CRITICAL_SECTION_WITH_RETURN(&stream_h->focus_state_mutex, SOUND_MANAGER_ERROR_INTERNAL);
}
if (is_focus_cb_thread && (stream_h->prev_acquired_focus < stream_h->acquired_focus)) {
LOGI(">> enter");
- SM_ENTER_CRITICAL_SECTION_WITH_RETURN(&stream_h->focus_state_mutex, MM_ERROR_SOUND_INTERNAL);
+ SM_ENTER_CRITICAL_SECTION_WITH_RETURN(&stream_h->focus_state_mutex, SOUND_MANAGER_ERROR_INTERNAL);
if (state_for_playback)
*state_for_playback = ((stream_h->acquired_focus & SOUND_STREAM_FOCUS_FOR_PLAYBACK) ? (SOUND_STREAM_FOCUS_STATE_ACQUIRED) : (SOUND_STREAM_FOCUS_STATE_RELEASED));