hfp_ag.c (52cbdd6d3880c77ec62f9d1f2274edd76197d563) | hfp_ag.c (e83c202541a02b09236bd4dc8c266a0bbc81f536) |
---|---|
1/* 2 * Copyright (C) 2014 BlueKitchen GmbH 3 * 4 * Redistribution and use in source and binary forms, with or without 5 * modification, are permitted provided that the following conditions 6 * are met: 7 * 8 * 1. Redistributions of source code must retain the above copyright --- 2664 unchanged lines hidden (view full) --- 2673 hfp_connection->vra_state_requested = HFP_VRA_W2_SEND_VOICE_RECOGNITION_OFF; 2674 hfp_connection->command = HFP_CMD_AG_ACTIVATE_VOICE_RECOGNITION; 2675 hfp_ag_run_for_context(hfp_connection); 2676 } 2677 return status; 2678} 2679 2680 | 1/* 2 * Copyright (C) 2014 BlueKitchen GmbH 3 * 4 * Redistribution and use in source and binary forms, with or without 5 * modification, are permitted provided that the following conditions 6 * are met: 7 * 8 * 1. Redistributions of source code must retain the above copyright --- 2664 unchanged lines hidden (view full) --- 2673 hfp_connection->vra_state_requested = HFP_VRA_W2_SEND_VOICE_RECOGNITION_OFF; 2674 hfp_connection->command = HFP_CMD_AG_ACTIVATE_VOICE_RECOGNITION; 2675 hfp_ag_run_for_context(hfp_connection); 2676 } 2677 return status; 2678} 2679 2680 |
2681uint8_t hfp_ag_enhanced_voice_recognition_activate(hci_con_handle_t acl_handle){ | 2681uint8_t hfp_ag_activate_enhanced_voice_recognition(hci_con_handle_t acl_handle){ |
2682 if (!get_bit(hfp_supported_features, HFP_AGSF_VOICE_RECOGNITION_FUNCTION)){ 2683 return ERROR_CODE_COMMAND_DISALLOWED; 2684 } 2685 2686 hfp_connection_t * hfp_connection = get_hfp_ag_connection_context_for_acl_handle(acl_handle); 2687 if (!hfp_connection){ 2688 return ERROR_CODE_UNKNOWN_CONNECTION_IDENTIFIER; 2689 } --- 4 unchanged lines hidden (view full) --- 2694 2695 hfp_connection->command = HFP_CMD_AG_ACTIVATE_ENHANCED_VOICE_RECOGNITION; 2696 hfp_connection->ag_vra_state = HFP_VOICE_RECOGNITION_STATE_AG_READY; 2697 hfp_connection->ag_vra_status = HFP_VRA_W4_ENHANCED_VOICE_RECOGNITION_ACTIVATED; 2698 hfp_ag_run_for_context(hfp_connection); 2699 return ERROR_CODE_SUCCESS; 2700} 2701 | 2682 if (!get_bit(hfp_supported_features, HFP_AGSF_VOICE_RECOGNITION_FUNCTION)){ 2683 return ERROR_CODE_COMMAND_DISALLOWED; 2684 } 2685 2686 hfp_connection_t * hfp_connection = get_hfp_ag_connection_context_for_acl_handle(acl_handle); 2687 if (!hfp_connection){ 2688 return ERROR_CODE_UNKNOWN_CONNECTION_IDENTIFIER; 2689 } --- 4 unchanged lines hidden (view full) --- 2694 2695 hfp_connection->command = HFP_CMD_AG_ACTIVATE_ENHANCED_VOICE_RECOGNITION; 2696 hfp_connection->ag_vra_state = HFP_VOICE_RECOGNITION_STATE_AG_READY; 2697 hfp_connection->ag_vra_status = HFP_VRA_W4_ENHANCED_VOICE_RECOGNITION_ACTIVATED; 2698 hfp_ag_run_for_context(hfp_connection); 2699 return ERROR_CODE_SUCCESS; 2700} 2701 |
2702uint8_t hfp_ag_enhanced_voice_recognition_deactivate(hci_con_handle_t acl_handle){ | 2702uint8_t hfp_ag_deactivate_enhanced_voice_recognition(hci_con_handle_t acl_handle){ |
2703 if (!get_bit(hfp_supported_features, HFP_AGSF_VOICE_RECOGNITION_FUNCTION)){ 2704 return ERROR_CODE_COMMAND_DISALLOWED; 2705 } 2706 2707 hfp_connection_t * hfp_connection = get_hfp_ag_connection_context_for_acl_handle(acl_handle); 2708 if (!hfp_connection){ 2709 return ERROR_CODE_UNKNOWN_CONNECTION_IDENTIFIER; 2710 } --- 206 unchanged lines hidden --- | 2703 if (!get_bit(hfp_supported_features, HFP_AGSF_VOICE_RECOGNITION_FUNCTION)){ 2704 return ERROR_CODE_COMMAND_DISALLOWED; 2705 } 2706 2707 hfp_connection_t * hfp_connection = get_hfp_ag_connection_context_for_acl_handle(acl_handle); 2708 if (!hfp_connection){ 2709 return ERROR_CODE_UNKNOWN_CONNECTION_IDENTIFIER; 2710 } --- 206 unchanged lines hidden --- |