OSDN Git Service

Ignore RFCOMM close event in case of collision
authorSatish Kodishala <skodisha@codeaurora.org>
Fri, 10 Jul 2015 09:36:07 +0000 (15:06 +0530)
committerLinux Build Service Account <lnxbuild@localhost>
Wed, 24 Aug 2016 14:09:23 +0000 (08:09 -0600)
commitd1792d2cbe38f9dc5f17c5a504e83abfe032b004
treef0ae60ade828eb68ca3ca93b5ba8cfcde90f285e
parente1e5259ac4e995a0197f9c2de4206936da4b63a0
Ignore RFCOMM close event in case of collision

When Multi-hf is enabled, if outgoing and incoming to/from
HF collide, ignore RFCOMM close event if HF is already connected.

CRs-fixed: 869792
Change-Id: I1ed5b17de13ed66c2add4c2377949cdffe968c48

Handle unknown codecs sent by HF

Use case:
1. Connect to headset supporting CVSD, mSBC and other codecs.
2. Verify if headset sending AT+BAC with supported codecs.
3. Check if SCO is established with mSBC codec.

Failure:
SCO is established with CVSD codec.

Root cause:
When parsing AT+BAC command, if unknown codec is received,
we are falling back to CVSD although mSBC is supported in HF.

Fix:
AT+BAC parsing function modified to return correct codecs
supported by HF when it encounters unknown codecs in arguments
of AT+BAC.

CRs-fixed: 861222
Change-Id: Ibc6a72b749280dc70a355270f37f4316468c1a4f

Clear remote BD address if SDP search fails

Use case:
1. Enable multi hf.
2. Pair and connect to a headset.
3. Turn off headset and try connecting to headset from AG.
4. After the connection fails, turn on headset.
5. Make sure headset initiates HF connection to AG.
6. Make MO/MT call, switch from headset to AG, vice versa using headset.

Failure:
When call is transferred from AG to headset, headset initiated
SCO connection request is rejected by AG.

Root cause:
For outgoing connection in step 3, SDP search fails. BD address of
remote headset is stored in scb[0]. BD address of headset with which
we tried to connect is not cleared in scb[0].

When incoming HF connection request is accepted in step 5, BD address
of headset is stored in scb[1]. Now, BD address of the same headset is
stored in both scb[0], scb[1].

When SCO connection request is received from headset, we get scb
information using BD address. However, since BD address in scb[0]
is not cleared, we end up selecting scb[0] for which there is no
headset connected. This makes us think that remote is initiating
SCO connection without SLC and we reject the SCO connection.

Fix:
Clear the BD address of remote when SDP search fails.

CRs-fixed: 861209
Change-Id: Iff3e1f2a25988c3eb55d6914cae6ac8427a7e211

BT: HFP1.7: Do not upstream invalid BIND set event.

Incase remote HS sends incorrect BIND set command during
SLC, do not upstream the event to BT apps to avoid disconnection.

Change-Id: Ie2d52a97ab179174e219ebe0c17f9d1f66545367
CRs-Fixed: 809572

Do not reset SSR parameters on SCO link.

When Headset is connected during active call, HFP is connected
first. Due to active call SCO is also established, when SCO is
established we disable SSR. When a2dp is connected after SCO
connection it enables SSR. This enabling of SSR is causing ACL
disconnect.

When there is new profile connection on same device which has SCO
we should not enable SSR. It should be enabled only when there
is no SCO.

Change-Id: I25263a148a13136174a67867a822ba3497a11f8e
bta/ag/bta_ag_cmd.c
bta/dm/bta_dm_pm.c
btif/src/btif_hf.c