hfp_hf.c (a7ba78b0d5bb6b2e24b4107a6c5dbf7072936758) hfp_hf.c (553a4a561f786fff6050306fb8f8ca8e28d447d4)
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

--- 574 unchanged lines hidden (view full) ---

583
584 case HFP_VRA_W4_VOICE_RECOGNITION_OFF:
585 hfp_connection->vra_state = HFP_VRA_VOICE_RECOGNITION_OFF;
586 hfp_connection->vra_state_requested = hfp_connection->vra_state;
587 hfp_connection->activate_voice_recognition = false;
588 if (hfp_connection->activate_voice_recognition){
589 hfp_hf_activate_voice_recognition(hfp_connection->acl_handle);
590 } else {
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

--- 574 unchanged lines hidden (view full) ---

583
584 case HFP_VRA_W4_VOICE_RECOGNITION_OFF:
585 hfp_connection->vra_state = HFP_VRA_VOICE_RECOGNITION_OFF;
586 hfp_connection->vra_state_requested = hfp_connection->vra_state;
587 hfp_connection->activate_voice_recognition = false;
588 if (hfp_connection->activate_voice_recognition){
589 hfp_hf_activate_voice_recognition(hfp_connection->acl_handle);
590 } else {
591 hfp_emit_voice_recognition_state_event(hfp_connection, ERROR_CODE_SUCCESS);
591 hfp_emit_voice_recognition_disabled(hfp_connection, ERROR_CODE_SUCCESS);
592 }
593 break;
594
595 case HFP_VRA_W4_VOICE_RECOGNITION_ACTIVATED:
596 hfp_connection->vra_state = HFP_VRA_VOICE_RECOGNITION_ACTIVATED;
597 hfp_connection->vra_state_requested = hfp_connection->vra_state;
598 hfp_connection->activate_voice_recognition = false;
599 if (hfp_connection->deactivate_voice_recognition){
600 hfp_hf_deactivate_voice_recognition(hfp_connection->acl_handle);
601 } else {
592 }
593 break;
594
595 case HFP_VRA_W4_VOICE_RECOGNITION_ACTIVATED:
596 hfp_connection->vra_state = HFP_VRA_VOICE_RECOGNITION_ACTIVATED;
597 hfp_connection->vra_state_requested = hfp_connection->vra_state;
598 hfp_connection->activate_voice_recognition = false;
599 if (hfp_connection->deactivate_voice_recognition){
600 hfp_hf_deactivate_voice_recognition(hfp_connection->acl_handle);
601 } else {
602 hfp_emit_voice_recognition_state_event(hfp_connection, ERROR_CODE_SUCCESS);
602 hfp_emit_voice_recognition_enabled(hfp_connection, ERROR_CODE_SUCCESS);
603 }
604 break;
605
606
607 case HFP_VRA_W4_ENHANCED_VOICE_RECOGNITION_READY_FOR_AUDIO:
608 hfp_connection->vra_state = HFP_VRA_ENHANCED_VOICE_RECOGNITION_READY_FOR_AUDIO;
609 hfp_connection->vra_state_requested = hfp_connection->vra_state;
610 hfp_connection->activate_voice_recognition = false;

--- 670 unchanged lines hidden (view full) ---

1281 case HFP_VRA_W4_ENHANCED_VOICE_RECOGNITION_READY_FOR_AUDIO:
1282 hfp_emit_enhanced_voice_recognition_hf_ready_for_audio_event(hfp_connection, ERROR_CODE_UNSPECIFIED_ERROR);
1283 break;
1284 default:
1285 if (hfp_connection->vra_state_requested == hfp_connection->vra_state){
1286 break;
1287 }
1288 hfp_connection->vra_state_requested = hfp_connection->vra_state;
603 }
604 break;
605
606
607 case HFP_VRA_W4_ENHANCED_VOICE_RECOGNITION_READY_FOR_AUDIO:
608 hfp_connection->vra_state = HFP_VRA_ENHANCED_VOICE_RECOGNITION_READY_FOR_AUDIO;
609 hfp_connection->vra_state_requested = hfp_connection->vra_state;
610 hfp_connection->activate_voice_recognition = false;

--- 670 unchanged lines hidden (view full) ---

1281 case HFP_VRA_W4_ENHANCED_VOICE_RECOGNITION_READY_FOR_AUDIO:
1282 hfp_emit_enhanced_voice_recognition_hf_ready_for_audio_event(hfp_connection, ERROR_CODE_UNSPECIFIED_ERROR);
1283 break;
1284 default:
1285 if (hfp_connection->vra_state_requested == hfp_connection->vra_state){
1286 break;
1287 }
1288 hfp_connection->vra_state_requested = hfp_connection->vra_state;
1289 hfp_emit_voice_recognition_state_event(hfp_connection, ERROR_CODE_UNSPECIFIED_ERROR);
1289 hfp_emit_voice_recognition_enabled(hfp_connection, ERROR_CODE_UNSPECIFIED_ERROR);
1290 hfp_reset_context_flags(hfp_connection);
1291 return;
1292 }
1293 event_emited = hfp_hf_switch_on_ok_pending(hfp_connection, ERROR_CODE_UNSPECIFIED_ERROR);
1294 if (!event_emited){
1295 hfp_emit_event(hfp_connection, HFP_SUBEVENT_COMPLETE, 1);
1296 }
1297 hfp_reset_context_flags(hfp_connection);

--- 861 unchanged lines hidden ---
1290 hfp_reset_context_flags(hfp_connection);
1291 return;
1292 }
1293 event_emited = hfp_hf_switch_on_ok_pending(hfp_connection, ERROR_CODE_UNSPECIFIED_ERROR);
1294 if (!event_emited){
1295 hfp_emit_event(hfp_connection, HFP_SUBEVENT_COMPLETE, 1);
1296 }
1297 hfp_reset_context_flags(hfp_connection);

--- 861 unchanged lines hidden ---