电话MIC mute修改
authorhcj <1224667075@qq.com>
Tue, 5 Nov 2024 08:53:43 +0000 (16:53 +0800)
committerhcj <1224667075@qq.com>
Tue, 5 Nov 2024 08:53:43 +0000 (16:53 +0800)
code/sdk/application/wearable/fd230app/nativeui/phoneservice/include/PhoneAudio.h
code/sdk/application/wearable/fd230app/nativeui/phoneservice/include/PhoneServiceC.h
code/sdk/application/wearable/fd230app/nativeui/phoneservice/src/PhoneAudio.cpp
code/sdk/application/wearable/fd230app/nativeui/phoneservice/src/PhoneService.cpp
code/sdk/drivers/peripheral/utils/custom_cmd_service.c
code/sdk/drivers/peripheral/utils/custom_runtime.c
code/sdk/drivers/peripheral/utils/custom_utils.h

index 4e9ed76..0812d3f 100644 (file)
@@ -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())
index 1760f88..69aeef9 100644 (file)
@@ -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的连接状态
index 50ae4ae..89d52a4 100644 (file)
@@ -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);
index c0c9a51..006fff1 100644 (file)
@@ -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;
 
 
index 6926468..0143519 100644 (file)
@@ -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,