hfp_ag.c (69640b0415f56819bd291fc538e1576195bcb19b) hfp_ag.c (80702f974ddb5c630bf5dd81eed9f27699da2a0c)
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

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

643 break;
644 }
645 return 0;
646}
647
648static void hfp_ag_slc_established(hfp_connection_t * hfp_connection){
649 hfp_connection->state = HFP_SERVICE_LEVEL_CONNECTION_ESTABLISHED;
650 hfp_emit_slc_connection_event(hfp_connection->local_role, 0, hfp_connection->acl_handle, hfp_connection->remote_addr);
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

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

643 break;
644 }
645 return 0;
646}
647
648static void hfp_ag_slc_established(hfp_connection_t * hfp_connection){
649 hfp_connection->state = HFP_SERVICE_LEVEL_CONNECTION_ESTABLISHED;
650 hfp_emit_slc_connection_event(hfp_connection->local_role, 0, hfp_connection->acl_handle, hfp_connection->remote_addr);
651
651
652 // HFP 4.35: "When [...] a new Service Level Connection is established all indicators are activated by default."
653 uint16_t i;
654 for (i=0;i<hfp_connection->ag_indicators_nr;i++){
655 hfp_connection->ag_indicators[i].enabled = 1;
656 }
657
652 // if active call exist, set per-hfp_connection state active, too (when audio is on)
653 if (hfp_gsm_call_status() == HFP_CALL_STATUS_ACTIVE_OR_HELD_CALL_IS_PRESENT){
654 hfp_connection->call_state = HFP_CALL_W4_AUDIO_CONNECTION_FOR_ACTIVE;
655 }
656 // if AG is ringing, also start ringing on the HF
657 if (hfp_gsm_call_status() == HFP_CALL_STATUS_NO_HELD_OR_ACTIVE_CALLS){
658 switch (hfp_gsm_callsetup_status()){
659 case HFP_CALLSETUP_STATUS_INCOMING_CALL_SETUP_IN_PROGRESS:

--- 2501 unchanged lines hidden ---
658 // if active call exist, set per-hfp_connection state active, too (when audio is on)
659 if (hfp_gsm_call_status() == HFP_CALL_STATUS_ACTIVE_OR_HELD_CALL_IS_PRESENT){
660 hfp_connection->call_state = HFP_CALL_W4_AUDIO_CONNECTION_FOR_ACTIVE;
661 }
662 // if AG is ringing, also start ringing on the HF
663 if (hfp_gsm_call_status() == HFP_CALL_STATUS_NO_HELD_OR_ACTIVE_CALLS){
664 switch (hfp_gsm_callsetup_status()){
665 case HFP_CALLSETUP_STATUS_INCOMING_CALL_SETUP_IN_PROGRESS:

--- 2501 unchanged lines hidden ---