mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-02-06 03:40:16 +00:00
hfp_ag: update API
This commit is contained in:
parent
c95b5b3c7c
commit
f0c27a954c
@ -171,7 +171,7 @@ static void show_usage(void){
|
||||
// printf("M - simulate call from 7654321 dropped\n");
|
||||
printf("n - Disable Voice Recognition | N - Enable Voice Recognition\n");
|
||||
printf("z - Disable Enhanced Voice Recognition | Z - Enable Enhanced Voice Recognition\n");
|
||||
printf("1 - EVR report starting sound | 2 - EVR report ready for input\n");
|
||||
printf("1 - EVR play sound | 2 - EVR report ready for audio input\n");
|
||||
printf("3 - EVR report processing input | 4 - EVR send message\n");
|
||||
|
||||
printf("o - Set speaker volume to 0 (minimum) | O - Set speaker volume to 9 (default)\n");
|
||||
@ -342,13 +342,13 @@ static void stdin_process(char cmd){
|
||||
|
||||
case '1':
|
||||
log_info("USER:\'%c\'", cmd);
|
||||
printf("Enhanced_Voice Recognition: report starting sound\n");
|
||||
status = hfp_ag_enhanced_voice_recognition_report_starting_sound(acl_handle);
|
||||
printf("Enhanced_Voice Recognition: play sound\n");
|
||||
status = hfp_ag_enhanced_voice_recognition_report_sending_audio(acl_handle);
|
||||
break;
|
||||
case '2':
|
||||
log_info("USER:\'%c\'", cmd);
|
||||
printf("Enhanced_Voice Recognition: report ready for input\n");
|
||||
status = hfp_ag_enhanced_voice_recognition_report_ready_for_input(acl_handle);
|
||||
printf("Enhanced_Voice Recognition: report ready for audio input\n");
|
||||
status = hfp_ag_enhanced_voice_recognition_report_ready_for_audio(acl_handle);
|
||||
break;
|
||||
case '3':
|
||||
log_info("USER:\'%c\'", cmd);
|
||||
|
@ -2776,10 +2776,10 @@ static uint8_t hfp_ag_enhanced_voice_recognition_send_state(hci_con_handle_t acl
|
||||
return status;
|
||||
}
|
||||
|
||||
uint8_t hfp_ag_enhanced_voice_recognition_report_starting_sound(hci_con_handle_t acl_handle){
|
||||
uint8_t hfp_ag_enhanced_voice_recognition_report_sending_audio(hci_con_handle_t acl_handle){
|
||||
return hfp_ag_enhanced_voice_recognition_send_state(acl_handle, HFP_VOICE_RECOGNITION_STATE_AG_IS_STARTING_SOUND);
|
||||
}
|
||||
uint8_t hfp_ag_enhanced_voice_recognition_report_ready_for_input(hci_con_handle_t acl_handle){
|
||||
uint8_t hfp_ag_enhanced_voice_recognition_report_ready_for_audio(hci_con_handle_t acl_handle){
|
||||
return hfp_ag_enhanced_voice_recognition_send_state(acl_handle, HFP_VOICE_RECOGNITION_STATE_AG_READY_TO_ACCEPT_AUDIO_INPUT);
|
||||
}
|
||||
uint8_t hfp_ag_enhanced_voice_recognition_report_processing_input(hci_con_handle_t acl_handle){
|
||||
|
@ -306,7 +306,7 @@ uint8_t hfp_ag_activate_enhanced_voice_recognition(hci_con_handle_t acl_handle);
|
||||
* - ERROR_CODE_UNKNOWN_CONNECTION_IDENTIFIER if connection does not exist, or
|
||||
* - ERROR_CODE_COMMAND_DISALLOWED if AG or HF does not support enhanced voice recognition
|
||||
*/
|
||||
uint8_t hfp_ag_enhanced_voice_recognition_report_starting_sound(hci_con_handle_t acl_handle);
|
||||
uint8_t hfp_ag_enhanced_voice_recognition_report_sending_audio(hci_con_handle_t acl_handle);
|
||||
|
||||
/*
|
||||
* @brief Notify HF that AG is ready for input.
|
||||
@ -317,7 +317,7 @@ uint8_t hfp_ag_enhanced_voice_recognition_report_starting_sound(hci_con_handle_t
|
||||
* - ERROR_CODE_UNKNOWN_CONNECTION_IDENTIFIER if connection does not exist, or
|
||||
* - ERROR_CODE_COMMAND_DISALLOWED if AG or HF does not support enhanced voice recognition
|
||||
*/
|
||||
uint8_t hfp_ag_enhanced_voice_recognition_report_ready_for_input(hci_con_handle_t acl_handle);
|
||||
uint8_t hfp_ag_enhanced_voice_recognition_report_ready_for_audio(hci_con_handle_t acl_handle);
|
||||
|
||||
/*
|
||||
* @brief Notify that AG is processing input.
|
||||
|
@ -166,7 +166,20 @@ static void show_usage(void){
|
||||
printf("M - simulate outgoing call to 1234567\n");
|
||||
printf("n - Disable Voice Recognition | N - Enable Voice Recognition\n");
|
||||
printf("z - Disable Enhanced Voice Recognition | Z - Enable Enhanced Voice Recognition\n");
|
||||
|
||||
|
||||
printf("1 - Activate Enhanced Voice Recognition\n");
|
||||
printf("2 - eAVR Status ready for audio input\n");
|
||||
printf("3 - eAVR Play sound\n");
|
||||
printf("4 - eAVR Processing Input\n");
|
||||
printf("5 - Deactivate Enhanced Voice Recognition\n");
|
||||
printf("6 - aAVR Msg, Status ready_for_input\n");
|
||||
printf("7 - aAVR Msg Processing Input\n");
|
||||
printf("8 - aAVR Msg Processing Input\n");
|
||||
printf("9 - eAVR Msg Processing Input\n");
|
||||
printf("* - eAVR Msg, Status ready_for_input\n");
|
||||
printf("@ - eAVR Msg, Status ready_for_input\n");
|
||||
|
||||
|
||||
printf("o - Set speaker volume to 0 (minimum) | O - Set speaker volume to 9 (default)\n");
|
||||
printf("p - Set speaker volume to 12 (higher) | P - Set speaker volume to 15 (maximum)\n");
|
||||
printf("q - Set microphone gain to 0 (minimum) | Q - Set microphone gain to 9 (default)\n");
|
||||
@ -335,15 +348,15 @@ static void stdin_process(char cmd){
|
||||
hfp_ag_activate_enhanced_voice_recognition(acl_handle);
|
||||
break;
|
||||
case '2':
|
||||
printf("EVR Status ready_for_input\n");
|
||||
hfp_ag_enhanced_voice_recognition_ready_for_input(acl_handle);
|
||||
printf("aAVR Status ready for audio input\n");
|
||||
hfp_ag_enhanced_voice_recognition_ready_for_audio(acl_handle);
|
||||
break;
|
||||
case '3':
|
||||
printf("EVR Send audio outputt\n");
|
||||
hfp_ag_enhanced_voice_recognition_starting_sound(acl_handle);
|
||||
printf("aAVR Play sound\n");
|
||||
hfp_ag_enhanced_voice_recognition_play_sound(acl_handle);
|
||||
break;
|
||||
case '4':
|
||||
printf("EVR Processing Input\n");
|
||||
printf("aAVR Processing Input\n");
|
||||
hfp_ag_enhanced_voice_recognition_processing_input(acl_handle);
|
||||
break;
|
||||
|
||||
@ -356,7 +369,7 @@ static void stdin_process(char cmd){
|
||||
hfp_voice_recognition_message_t msg = {
|
||||
0xAB13, 0, 1, (uint8_t *) "test"
|
||||
};
|
||||
printf("EVR Msg, Status ready_for_input\n");
|
||||
printf("aAVR Msg, Status ready_for_input\n");
|
||||
hfp_ag_enhanced_voice_recognition_message(acl_handle, HFP_VOICE_RECOGNITION_STATE_AG_READY_TO_ACCEPT_AUDIO_INPUT, msg);
|
||||
break;
|
||||
}
|
||||
@ -366,7 +379,7 @@ static void stdin_process(char cmd){
|
||||
hfp_voice_recognition_message_t msg = {
|
||||
0xAB14, 1, 1, (uint8_t *) "test"
|
||||
};
|
||||
printf("EVR Msg Processing Input\n");
|
||||
printf("aAVR Msg Processing Input\n");
|
||||
hfp_ag_enhanced_voice_recognition_message(acl_handle, HFP_VOICE_RECOGNITION_STATE_AG_IS_PROCESSING_AUDIO_INPUT, msg);
|
||||
break;
|
||||
}
|
||||
@ -376,7 +389,7 @@ static void stdin_process(char cmd){
|
||||
hfp_voice_recognition_message_t msg = {
|
||||
0xAB13, 0, 2, (uint8_t *) "test"
|
||||
};
|
||||
printf("EVR Msg Processing Input\n");
|
||||
printf("aAVR Msg Processing Input\n");
|
||||
hfp_ag_enhanced_voice_recognition_message(acl_handle, HFP_VOICE_RECOGNITION_STATE_AG_IS_PROCESSING_AUDIO_INPUT, msg);
|
||||
break;
|
||||
}
|
||||
@ -386,7 +399,7 @@ static void stdin_process(char cmd){
|
||||
hfp_voice_recognition_message_t msg = {
|
||||
0xAB13, 0, 3, (uint8_t *) "test"
|
||||
};
|
||||
printf("EVR Msg Processing Input\n");
|
||||
printf("aAVR Msg Processing Input\n");
|
||||
hfp_ag_enhanced_voice_recognition_message(acl_handle, HFP_VOICE_RECOGNITION_STATE_AG_IS_PROCESSING_AUDIO_INPUT, msg);
|
||||
break;
|
||||
}
|
||||
@ -395,7 +408,7 @@ static void stdin_process(char cmd){
|
||||
hfp_voice_recognition_message_t msg = {
|
||||
0xAB13, 2, 1, (uint8_t *) "test"
|
||||
};
|
||||
printf("EVR Msg, Status ready_for_input\n");
|
||||
printf("aAVR Msg, Status ready_for_input\n");
|
||||
hfp_ag_enhanced_voice_recognition_message(acl_handle, HFP_VOICE_RECOGNITION_STATE_AG_READY_TO_ACCEPT_AUDIO_INPUT, msg);
|
||||
break;
|
||||
}
|
||||
@ -404,7 +417,7 @@ static void stdin_process(char cmd){
|
||||
hfp_voice_recognition_message_t msg = {
|
||||
0xAB13, 3, 1, (uint8_t *) "test"
|
||||
};
|
||||
printf("EVR Msg, Status ready_for_input\n");
|
||||
printf("aAVR Msg, Status ready_for_input\n");
|
||||
hfp_ag_enhanced_voice_recognition_message(acl_handle, HFP_VOICE_RECOGNITION_STATE_AG_READY_TO_ACCEPT_AUDIO_INPUT, msg);
|
||||
break;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user