This fix not sending callheld indicator update in three way calling
scenario with call placed from HF. This was affecting
TC_AG_TWC_BV_05_I qualification test case.
If ongoing calls were changed while there is waiting call, callheld and
call indicators should be updated to match new calls state. This was
affecting TC_AG_TCA_BV_05_I qualification test case.
If incoming call is being rejected following phone_state_change are
being send to handsfree HAL (probably due to some intermediate state
when incoming call is being rejected):
active=0 hold=0 state=idle
active=0 hold=0 state=incoming
active=0 hold=0 state=idle
active=0 hold=0 state=idle
To avoid sending bogus RING and callsetup=1 indicators this needs to be
tracked. This was afecting TC_AG_ICR_BV_01_I,TC_AG_ICR_BV_02_I and
TC_AG_TWC_BV_02_I qualification test cases.
This add disconnecting SCO if last call was dropped (required by
Java 'virtual voice call'). Also make sure that SCO is connected
only there were no calls present before phone state change. This
makes sure SCO won't be re-connected in three way calling scenarios
when user choose to not use audio on BT headset.
This patch adds support for WBS mode in handsfree HAl as well as
redefining current modes.
"persist.sys.bluetooth.handsfree" property can be used to tune
handsfree HAL. Setting it to "hfp" or "hfp_wbs" values enables HFP
profile with narrowband only or with both narrowband and wideband
speech support. Any other value or lack of property defaults to
HSP only mode.
There are few cases when framework doesn't call connect_audio method
from HAL but we should do it internally. Call connect_audio if
we started dialing or we accepted incoming call. Also if headset
connects during active call, start SCO connection. We don't have to
disconnect SCO internally, because Android always call disconect_audio
when call has finished.
This adds code needed for translating phone_state_change command to
call, callsetup and callheld indicators. Android HAL specifcy common
type for all calls state but only subset of values are valid for
phone_state_change.
It will service codec nogotiation and establish SCO connection with
negotiated parameters. If SCO establishment failed, try to connect
with mandatory codec CVSD.
It will handle AT+BAC command and update list of available codecs.
It will check if mandatory codec CVSD is present on list and, if
Wide Band Speech supported, MSBC codec is on next place. Other codecs
can be also used after extending codecs_defaults array.
It will also handle incorrect SLC establishment, when HF supports
Codec Negotiation, but didn't send AT+BAC.
Unfortunately HAL is not getting call, callsetup and callheld
indicators values directly from Android Framework and those need to be
chosen based on number of active/hold calls and call state that
triggered phone state change.
This patch adds only basic call state handling (no three way call).