/* stop playing tone */
Hal_Tone_Play_End();
+ Hal_Vibrator_Play_End();
lv_alarm_obj_ext_t * ext = alarm_get_ext();
if(ext) {
if(activity_obj != NULL) return;
/* play tone start */
- Hal_NFFS_File_Play_Repeat(AUDIO_ALARM, query_current_volume());
+ uint8_t volume = 0;
+ #ifdef __MMI_USER_PROFILE_SUPPORT__
+ volume = mmi_user_profile_current_mode_alarm_volume_get();
+ #else
+ volume = query_current_volume();
+ #endif
+ Hal_NFFS_File_Play_Repeat(AUDIO_ALARM, volume);
+
+ // vibrate
+ if(true == mmi_watch_vibrate_is_permitted())
+ {
+ Hal_Vibrator_Play_Repeat();
+ }
watch_wakeup_lcd(true);
/* display alarm animation */
if(AUDIO_CTRL_PRIORITY_3 == Hal_Audio_Manage_Start_Req(AUDIO_CTRL_PRIORITY_3,alarm_audio_ctrl_callback))
{
/* play tone start */
- Hal_NFFS_File_Play_Repeat(AUDIO_ALARM, query_current_volume());
+ uint8_t volume = 0;
+ #ifdef __MMI_USER_PROFILE_SUPPORT__
+ volume = mmi_user_profile_current_mode_alarm_volume_get();
+ #else
+ volume = query_current_volume();
+ #endif
+ Hal_NFFS_File_Play_Repeat(AUDIO_ALARM, volume);
+
+ // vibrate
+ if(true == mmi_watch_vibrate_is_permitted())
+ {
+ Hal_Vibrator_Play_Repeat();
+ }
watch_wakeup_lcd(true);
/* display alarm animation */
}
#endif
-
+ uint8_t volume = 0;
+#ifdef __MMI_USER_PROFILE_SUPPORT__
+ volume = mmi_user_profile_current_mode_remind_volume_get();
+#else
+ volume = query_current_volume();
+#endif
Hal_Tone_Play_Onetime((uint32_t *)s_ai_talk_item_info.msg_voice_data_ptr,
s_ai_talk_item_info.msg_voice_data_size,
- query_current_volume(),
+ volume,
mmi_ai_talk_tts_info_result_play_over_cb,
NULL);
if(AUDIO_CTRL_PRIORITY_REMIND == Hal_Audio_Manage_Start_Req(AUDIO_CTRL_PRIORITY_REMIND, mmi_heng_ai_warning_audio_ctrl_callback))
{
if(MMI_HENG_AI_WARNING_TYPE_SLEEP == s_heng_ai_warning_info.type)
- Hal_NFFS_File_Play_Repeat(AUDIO_REMIND_SLEEP, query_current_volume());
+ {
+ uint8_t volume = 0;
+ #ifdef __MMI_USER_PROFILE_SUPPORT__
+ volume = mmi_user_profile_current_mode_remind_volume_get();
+ #else
+ volume = query_current_volume();
+ #endif
+ Hal_NFFS_File_Play_Repeat(AUDIO_REMIND_SLEEP, volume);
+ }
else
- Hal_Vibrator_Play_Repeat();
+ {
+ if(true == mmi_watch_vibrate_is_permitted())
+ Hal_Vibrator_Play_Repeat();
+ }
mmi_heng_ai_warning_screen_create(NULL);
}
} else {
lv_label_set_text_id(audio_ext->label_store, WATCH_TEXT_ID_PLAYING);
audio_ext->play_ongoing = true;
+
+ uint8_t volume = 0;
+ #ifdef __MMI_USER_PROFILE_SUPPORT__
+ volume = HAL_AUDIO_SPK_LEVEL_MAX;
+ #else
+ volume = query_current_volume();
+ #endif
Hal_NFFS_File_Play_Onetime(AUDIO_CALIBRATION_RECORD_FILE,
- query_current_volume(),
+ volume,
audio_calibration_record_file_over_cb,
NULL);
}
if(false == audio_ext->play_ongoing) {
lv_label_set_text_id(audio_ext->label_store, WATCH_TEXT_ID_PLAYING);
audio_ext->play_ongoing = true;
+
+ uint8_t volume = 0;
+ #ifdef __MMI_USER_PROFILE_SUPPORT__
+ volume = HAL_AUDIO_SPK_LEVEL_MAX;
+ #else
+ volume = query_current_volume();
+ #endif
Hal_NFFS_File_Play_Onetime(AUDIO_INCOMING_CALL,
- query_current_volume(),
+ volume,
audio_calibration_music_over_cb,
NULL);
} else {
if(LV_EVENT_CLICKED == e) {
lv_obj_t * label_tip = lv_obj_get_child(btn, NULL);
// play tone
- Hal_NFFS_File_Play_Onetime(AUDIO_INCOMING_CALL, query_current_volume(), NULL, NULL);
+ uint8_t volume = 0;
+ #ifdef __MMI_USER_PROFILE_SUPPORT__
+ volume = HAL_AUDIO_SPK_LEVEL_MAX;
+ #else
+ volume = query_current_volume();
+ #endif
+ Hal_NFFS_File_Play_Onetime(AUDIO_INCOMING_CALL, volume, NULL, NULL);
lv_label_set_text_id(label_tip, WATCH_TEXT_ID_STOP_TEST);
lv_obj_set_event_cb(btn, speaker_stop_btn_event_cb);
case MCI_EVENT_EOS:
lv_label_set_text_id(ht_ext->label_key_state, WATCH_TEXT_ID_MICPHONE_RECORD_CHECK);
Hal_Record_Buffer_Stop_Req(&ht_ext->buffer_size, &duration_ms);
- Hal_Tone_Play_Onetime((uint32_t *)ht_ext->buffer, ht_ext->buffer_size, query_current_volume(), ht_micphone_record_play_over_cb, ht_ext);
+ uint8_t volume = 0;
+ #ifdef __MMI_USER_PROFILE_SUPPORT__
+ volume = HAL_AUDIO_SPK_LEVEL_MAX;
+ #else
+ volume = query_current_volume();
+ #endif
+ Hal_Tone_Play_Onetime((uint32_t *)ht_ext->buffer, ht_ext->buffer_size, volume, ht_micphone_record_play_over_cb, ht_ext);
break;
case MCI_EVENT_ERROR:
/*recoder stop if value is - 996*/
lv_label_set_text(ext->date_label, "");
lv_label_set_text(ext->time_label, "");
- Hal_File_Play_Onetime(AUDIO_INCOMING_CALL, query_current_volume(), NULL, NULL, 0);
+ uint8_t volume = 0;
+#ifdef __MMI_USER_PROFILE_SUPPORT__
+ volume = HAL_AUDIO_SPK_LEVEL_MAX;
+#else
+ volume = query_current_volume();
+#endif
+ Hal_File_Play_Onetime(AUDIO_INCOMING_CALL, volume, NULL, NULL, 0);
lv_obj_t * btn = lv_obj_get_child_back(par, lv_obj_get_child_back(par, NULL));
lv_label_set_text_id((lv_obj_get_child(btn, NULL)), WATCH_TEXT_ID_EMODE_HW_ALARM_STOP);
}
if(ext->hwtest_sel[i++]) { //Play music
- Hal_NFFS_File_Play_Onetime(AUDIO_INCOMING_CALL, query_current_volume(), NULL, NULL);
+ uint8_t volume = 0;
+ #ifdef __MMI_USER_PROFILE_SUPPORT__
+ volume = HAL_AUDIO_SPK_LEVEL_MAX;
+ #else
+ volume = query_current_volume();
+ #endif
+ Hal_NFFS_File_Play_Onetime(AUDIO_INCOMING_CALL, volume, NULL, NULL);
}
if(ext->hwtest_sel[i++]) { //GPS
&& (NULL == lv_watch_get_activity_obj(ACT_ID_PHONE))
)
{
+ #ifdef __MMI_ZHSX_SUPPORT__
+ mmi_protocol_action_low_battery();
+ #endif
// enter low battery mode
printf("enter low battery mode\n");
lowbattery_create_btn_action(NULL);
}
if(AUDIO_CTRL_PRIORITY_8 == Hal_Audio_Manage_Start_Req(AUDIO_CTRL_PRIORITY_8, message_audio_ctrl_callback))
{
- Hal_NFFS_File_Play_Onetime(AUDIO_MSG, query_current_volume(), message_tone_play_onetime_cb, NULL);
+ uint8_t volume = 0;
+ #ifdef __MMI_USER_PROFILE_SUPPORT__
+ volume = mmi_user_profile_current_mode_remind_volume_get();
+ #else
+ volume = query_current_volume();
+ #endif
+ Hal_NFFS_File_Play_Onetime(AUDIO_MSG, volume, message_tone_play_onetime_cb, NULL);
printf("AUDIO_MSG has been played in %s\n",__FUNCTION__);
}
message_ll_item_add(msg_info);
{
s_item_receive_playing = true;
- Hal_NFFS_File_Play_Onetime(AUDIO_WECHAT_RECEIVE, (HAL_SPEAKER_GAIN)query_current_volume(), wechat_receive_audio_play_over_cb, NULL);
- Hal_Vibrator_Play_Onetime(NULL, 1000);
+ uint8_t volume = 0;
+ #ifdef __MMI_USER_PROFILE_SUPPORT__
+ volume = mmi_user_profile_current_mode_remind_volume_get();
+ #else
+ volume = query_current_volume();
+ #endif
+ Hal_NFFS_File_Play_Onetime(AUDIO_WECHAT_RECEIVE, (HAL_SPEAKER_GAIN)volume, wechat_receive_audio_play_over_cb, NULL);
+ if(true == mmi_watch_vibrate_is_permitted())
+ {
+ Hal_Vibrator_Play_Onetime(NULL, 1000);
+ }
}
if(lv_watch_get_activity_obj(ACT_ID_WECHAT_MAIN))
if(AUDIO_CTRL_PRIORITY_5 == Hal_Audio_Manage_Start_Req(AUDIO_CTRL_PRIORITY_5, wechat_chat_list_voice_item_playing_audio_ctrl_callback))
{
WECHAT_DEBUG_PRINTF("[@CHENG_DEBUG][%s][%d]: \n", __FUNCTION__, __LINE__);
- Hal_File_Play_Onetime(msg_item->msg_data_full_file_name, query_current_volume(), wechat_chat_list_voice_item_play_over_cb, list_page_ext, 0);
+ uint8_t volume = 0;
+ #ifdef __MMI_USER_PROFILE_SUPPORT__
+ volume = mmi_user_profile_current_mode_remind_volume_get();
+ #else
+ volume = query_current_volume();
+ #endif
+ Hal_File_Play_Onetime(msg_item->msg_data_full_file_name, volume, wechat_chat_list_voice_item_play_over_cb, list_page_ext, 0);
}
}
{
s_item_receive_playing = true;
- Hal_NFFS_File_Play_Onetime(AUDIO_WECHAT_RECEIVE, (HAL_SPEAKER_GAIN)query_current_volume(), wechat_receive_audio_play_over_cb, NULL);
- Hal_Vibrator_Play_Onetime(NULL, 1000);
+ uint8_t volume = 0;
+ #ifdef __MMI_USER_PROFILE_SUPPORT__
+ volume = mmi_user_profile_current_mode_remind_volume_get();
+ #else
+ volume = query_current_volume();
+ #endif
+ Hal_NFFS_File_Play_Onetime(AUDIO_WECHAT_RECEIVE, (HAL_SPEAKER_GAIN)volume, wechat_receive_audio_play_over_cb, NULL);
+ if(true == mmi_watch_vibrate_is_permitted())
+ {
+ Hal_Vibrator_Play_Onetime(NULL, 1000);
+ }
}
if(lv_watch_get_activity_obj(ACT_ID_WECHAT_MAIN))
if(AUDIO_CTRL_PRIORITY_5 == Hal_Audio_Manage_Start_Req(AUDIO_CTRL_PRIORITY_5, wechat_chat_list_voice_item_playing_audio_ctrl_callback))
{
WECHAT_DEBUG_PRINTF("[@CHENG_DEBUG][%s][%d]: \n", __FUNCTION__, __LINE__);
- Hal_File_Play_Onetime(msg_item->msg_data_full_file_name, query_current_volume(), wechat_chat_list_voice_item_play_over_cb, list_page_ext, 0);
+ uint8_t volume = 0;
+ #ifdef __MMI_USER_PROFILE_SUPPORT__
+ volume = mmi_user_profile_current_mode_remind_volume_get();
+ #else
+ volume = query_current_volume();
+ #endif
+ Hal_File_Play_Onetime(msg_item->msg_data_full_file_name, volume, wechat_chat_list_voice_item_play_over_cb, list_page_ext, 0);
}
}
break;
case MMI_MODEM_CALL_STATE_INCOMING:
+ Hal_Vibrator_Play_End();
Hal_Tone_Play_End();
watch_modem_call_request_udub();
break;
printf("[@CHENG_DEBUG][%s][%d]: \n", __FUNCTION__, __LINE__);
+ Hal_Vibrator_Play_End();
Hal_Tone_Play_End();
//set voice call status
//stop playing tone
Hal_Tone_Play_End();
+ Hal_Vibrator_Play_End();
//ring off
ring_off_action(NULL, LV_EVENT_CLICKED);
}
#endif
Hal_Audio_Manage_End_Ind(AUDIO_CTRL_PRIORITY_1);
+ Hal_Vibrator_Play_End();
Hal_Mem_Set(&call_params, 0, sizeof(phone_call_params_t));
call_params.state = MMI_MODEM_CALL_STATE_NULL;
}
call_params.speaker_volume = volume;
//play tone
- Hal_NFFS_File_Play_Repeat(AUDIO_INCOMING_CALL, query_current_volume());
+ uint8_t ring_volume = 0;
+ #ifdef __MMI_USER_PROFILE_SUPPORT__
+ ring_volume = mmi_user_profile_current_mode_incoming_call_volume_get();
+ #else
+ ring_volume = query_current_volume();
+ #endif
+ Hal_NFFS_File_Play_Repeat(AUDIO_INCOMING_CALL, ring_volume);
+
+ // vibrate
+ if(true == mmi_watch_vibrate_is_permitted())
+ {
+ Hal_Vibrator_Play_Repeat();
+ }
#if USE_LV_WATCH_CALL_LOG
//record time for call log
char * ring_path = mmi_page_main_menu_tts_info_get(index);
if(NULL != ring_path)
{
- Hal_NFFS_File_Play_Onetime(ring_path, (HAL_SPEAKER_GAIN)query_current_volume(), mmi_page_main_menu_tts_play_over_cb, NULL);
+ uint8_t volume = 0;
+ #ifdef __MMI_USER_PROFILE_SUPPORT__
+ volume = mmi_user_profile_current_mode_remind_volume_get();
+ #else
+ volume = query_current_volume();
+ #endif
+ Hal_NFFS_File_Play_Onetime(ring_path, (HAL_SPEAKER_GAIN)volume, mmi_page_main_menu_tts_play_over_cb, NULL);
}
}
}
#endif\r
)\r
{\r
- Hal_NFFS_File_Play_Onetime(AUDIO_SETTING_AUDIO_MSG, query_current_volume(), NULL, 0);\r
+ uint8_t volume = 0;\r
+ #ifdef __MMI_USER_PROFILE_SUPPORT__\r
+ volume = mmi_user_profile_current_mode_new_sms_volume_get();\r
+ #else\r
+ volume = query_current_volume();\r
+ #endif\r
+ Hal_NFFS_File_Play_Onetime(AUDIO_SETTING_AUDIO_MSG, volume, NULL, 0);\r
+ }\r
+ if(true == mmi_watch_vibrate_is_permitted())\r
+ {\r
+ Hal_Vibrator_Play_Onetime(NULL, 1000);\r
}\r
- Hal_Vibrator_Play_Onetime(NULL, 1000);\r
if(0 == Hal_Pm_Get_State())\r
{\r
printf("sms_msg_list_update -----> onkey_wakeup\n");\r
if(AUDIO_CTRL_PRIORITY_TIMER == Hal_Audio_Manage_Start_Req(AUDIO_CTRL_PRIORITY_TIMER, timer_audio_ctrl_callback)) {
//play tone
- Hal_NFFS_File_Play_Repeat(AUDIO_TIMER, query_current_volume());
+ uint8_t volume = 0;
+ #ifdef __MMI_USER_PROFILE_SUPPORT__
+ volume = mmi_user_profile_current_mode_remind_volume_get();
+ #else
+ volume = query_current_volume();
+ #endif
+ Hal_NFFS_File_Play_Repeat(AUDIO_TIMER, volume);
//keep vibrating
- Hal_Vibrator_Play_Repeat();
+ if(true == mmi_watch_vibrate_is_permitted())
+ {
+ Hal_Vibrator_Play_Repeat();
+ }
//wakeup lcd
watch_wakeup_lcd(true);
if(AUDIO_CTRL_PRIORITY_TIMER == priority) {
//play tone
- Hal_NFFS_File_Play_Repeat(AUDIO_TIMER, query_current_volume());
+ uint8_t volume = 0;
+ #ifdef __MMI_USER_PROFILE_SUPPORT__
+ volume = mmi_user_profile_current_mode_remind_volume_get();
+ #else
+ volume = query_current_volume();
+ #endif
+ Hal_NFFS_File_Play_Repeat(AUDIO_TIMER, volume);
//keep vibrating
- Hal_Vibrator_Play_Repeat();
+ if(true == mmi_watch_vibrate_is_permitted())
+ {
+ Hal_Vibrator_Play_Repeat();
+ }
//wakeup lcd
watch_wakeup_lcd(true);