Commit: 3163523575b0b114892fc5e00fc81b46c42eea23
Parent: 7223e60a54f5cbeb475b19ee5dd905eb80e633df
Author: Frédéric Danis <frederic.danis@linux.intel.com>
Committer: Johan Hedberg <johan.hedberg@intel.com>
Date: 2011-08-04 14:02:39
Tree: fd6e37639a50d7764f693505bbc41c53cf3c582d

audio: add profile version to HandsfreeAgent Some phones with HFP Audio Gateway version previous to 1.5 (e.g. Samsung SGH-D600 returning 0x0101 as profile version) do not accept an AT+BRSF with latest features. The Handsfree agent should adapt its AT+BRSF command depending on the remote version, so add version information as parameter of NewConnection method. Here is traces of buggy exchange: < ACL data: handle 12 flags 0x02 dlen 20 L2CAP(d): cid 0x0046 len 16 [psm 3] RFCOMM(d): UIH: cr 1 dlci 10 pf 0 ilen 12 fcs 0xb0 0000: 41 54 2b 42 52 53 46 3d 31 31 38 0d AT+BRSF=118. > ACL data: handle 12 flags 0x02 dlen 18 L2CAP(d): cid 0x0041 len 14 [psm 3] RFCOMM(d): UIH: cr 0 dlci 10 pf 1 ilen 9 fcs 0x76 credits 1 0000: 0d 0a 45 52 52 4f 52 0d 0a ..ERROR.. < ACL data: handle 12 flags 0x02 dlen 8 L2CAP(d): cid 0x0046 len 4 [psm 3] RFCOMM(s): DISC: cr 1 dlci 10 pf 1 ilen 0 fcs 0x6d and after the fix (and corresponding fix in oFono): < ACL data: handle 12 flags 0x02 dlen 19 L2CAP(d): cid 0x0048 len 15 [psm 3] RFCOMM(d): UIH: cr 1 dlci 10 pf 0 ilen 11 fcs 0xb0 0000: 41 54 2b 42 52 53 46 3d 32 32 0d AT+BRSF=22. > ACL data: handle 12 flags 0x02 dlen 28 L2CAP(d): cid 0x0041 len 24 [psm 3] RFCOMM(d): UIH: cr 0 dlci 10 pf 1 ilen 19 fcs 0x76 credits 1 0000: 0d 0a 2b 42 52 53 46 3a 20 33 33 0d 0a 0d 0a 4f ..+BRSF: 33....O 0010: 4b 0d 0a K.. < ACL data: handle 12 flags 0x02 dlen 18 L2CAP(d): cid 0x0048 len 14 [psm 3] RFCOMM(d): UIH: cr 1 dlci 10 pf 0 ilen 10 fcs 0xb0 0000: 41 54 2b 43 49 4e 44 3d 3f 0d AT+CIND=?.

Diffstat

M audio/gateway.c | 87 ++++++++++++++++++++++++++++++++++++++++-
M doc/hfp-api.txt | 2 +-

2 files changed, 87 insertions(+), 2 deletions(-)

View Full Diff | Patch