From: hcj <1224667075@qq.com> Date: Tue, 5 Nov 2024 08:53:43 +0000 (+0800) Subject: 电话MIC mute修改 X-Git-Tag: fd230_release_V1.3.102~126^2~4 X-Git-Url: http://git.snicker.com.cn/css/static/gitweb.css?a=commitdiff_plain;h=8bc3ac87c5f42ccce8610717d5b5fce12347bc3d;p=mirrors%2FFD230.git 电话MIC mute修改 --- diff --git a/code/sdk/application/wearable/fd230app/nativeui/phoneservice/include/PhoneAudio.h b/code/sdk/application/wearable/fd230app/nativeui/phoneservice/include/PhoneAudio.h index 218acc023..0fc217683 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/phoneservice/include/PhoneAudio.h +++ b/code/sdk/application/wearable/fd230app/nativeui/phoneservice/include/PhoneAudio.h @@ -73,7 +73,7 @@ int32 PhoneCAT1AudioGetVolume(void); bool PhoneCATAudioSetVolume(int32 volume); -int32_t PhoneAudioSetMicMuteCat1(bool isMute); + #ifdef __cplusplus } diff --git a/code/sdk/application/wearable/fd230app/nativeui/phoneservice/include/PhoneServiceC.h b/code/sdk/application/wearable/fd230app/nativeui/phoneservice/include/PhoneServiceC.h index 0cf660c3f..3c456f974 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/phoneservice/include/PhoneServiceC.h +++ b/code/sdk/application/wearable/fd230app/nativeui/phoneservice/include/PhoneServiceC.h @@ -26,6 +26,7 @@ void cat1_audio_AudioSetup(void); void cat1_audio_AudioRelease(void); +int32_t PhoneAudioSetMicMuteCat1(bool isMute); #ifdef __cplusplus } diff --git a/code/sdk/application/wearable/fd230app/nativeui/phoneservice/src/PhoneAudio.cpp b/code/sdk/application/wearable/fd230app/nativeui/phoneservice/src/PhoneAudio.cpp index 4e9ed76b7..0812d3f02 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/phoneservice/src/PhoneAudio.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/phoneservice/src/PhoneAudio.cpp @@ -17,6 +17,8 @@ #include "audio_manager_c_wrapper.h" #include "CallerLogModel.h" #include "cat1_ctl.h" +#include "PhoneServiceC.h" + #ifdef __cplusplus extern "C" { #endif @@ -143,7 +145,6 @@ bool PhoneAudioSetMicMute(bool isMute) //cat1取消静音 int32_t PhoneAudioSetMicMuteCat1(bool isMute) { - return 0; int32_t ret; if(!volte_voice_state()) diff --git a/code/sdk/application/wearable/fd230app/nativeui/phoneservice/src/PhoneService.cpp b/code/sdk/application/wearable/fd230app/nativeui/phoneservice/src/PhoneService.cpp index 1760f8829..69aeef9ee 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/phoneservice/src/PhoneService.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/phoneservice/src/PhoneService.cpp @@ -396,14 +396,17 @@ void cat1_audio_AudioSetup(void) if(stopPhonePlayingMusic()) { BtA2dpSnkAudioDestroy(); - sleep(1);//等待释放音频 + sleep(1);//等待释放音频 } uapi_cat1_start_volte_voice(); + usleep(5000);//等待释放音频 + } void cat1_audio_AudioRelease(void) { uapi_cat1_stop_volte_voice(); + //usleep(5000); } @@ -2129,9 +2132,14 @@ bool SetMicMute(bool isMute) return PhoneAudioSetMicMute(isMute); } +static bool data; int32_t SetMicMutecat1(bool isMute) { - return PhoneAudioSetMicMuteCat1(isMute); + + data=isMute; + do_custom_cmd_service_check_msg(CUSTOM_CMD_MSG_CAT1_MIC_CTRL, &data, sizeof(bool)); + return 0; + } // 获取SCO的连接状态 diff --git a/code/sdk/drivers/peripheral/utils/custom_cmd_service.c b/code/sdk/drivers/peripheral/utils/custom_cmd_service.c index 50ae4ae0c..89d52a4d9 100644 --- a/code/sdk/drivers/peripheral/utils/custom_cmd_service.c +++ b/code/sdk/drivers/peripheral/utils/custom_cmd_service.c @@ -315,6 +315,9 @@ static void custom_cmd_service_check_task(void const *arg) case CUSTOM_CMD_MSG_CAT1_AUDIO_STOP: cat1_audio_AudioRelease(); break; + case CUSTOM_CMD_MSG_CAT1_MIC_CTRL: + PhoneAudioSetMicMuteCat1(mail.data[0]); + break; default: PRINT("Unknown CUSTOM_CMD_MSG cmd 0x%02X \r\n", mail.cmd); diff --git a/code/sdk/drivers/peripheral/utils/custom_runtime.c b/code/sdk/drivers/peripheral/utils/custom_runtime.c index c0c9a51a6..006fff13e 100644 --- a/code/sdk/drivers/peripheral/utils/custom_runtime.c +++ b/code/sdk/drivers/peripheral/utils/custom_runtime.c @@ -102,7 +102,7 @@ typedef struct uint8_t screen_always_on_status;//屏幕是否常亮状态 uint8_t wear_status; uint8_t shutting_down_status;//是否处于关机状态 - uint8_t transmitting_status;//是否处于关机状态 + uint8_t transmitting_status;//是否处于ble传输状态 } runtime_status_t; diff --git a/code/sdk/drivers/peripheral/utils/custom_utils.h b/code/sdk/drivers/peripheral/utils/custom_utils.h index 6926468af..014351919 100644 --- a/code/sdk/drivers/peripheral/utils/custom_utils.h +++ b/code/sdk/drivers/peripheral/utils/custom_utils.h @@ -237,6 +237,8 @@ uint32_t uapi_calendar_store_date(void); #define CUSTOM_CMD_MSG_CAT1_AUDIO_START 0x13 #define CUSTOM_CMD_MSG_CAT1_AUDIO_STOP 0x14 + +#define CUSTOM_CMD_MSG_CAT1_MIC_CTRL 0x15 typedef enum { BR_HFP_CONNECT=1, BR_HFP_DISCONNECT,