sco link state
system/bt/bta/ag/bta_ag_int.h
/* sco states */
enum {
BTA_AG_SCO_SHUTDOWN_ST, /* no sco listening, all sco connections closed */0
BTA_AG_SCO_LISTEN_ST, /* sco listening */1
BTA_AG_SCO_CODEC_ST, /* sco codec negotiation */2
BTA_AG_SCO_OPENING_ST, /* sco connection opening */3
BTA_AG_SCO_OPEN_CL_ST, /* opening sco connection being closed */4
BTA_AG_SCO_OPEN_XFER_ST, /* opening sco connection being transferred */5
BTA_AG_SCO_OPEN_ST, /* sco open */6
BTA_AG_SCO_CLOSING_ST, /* sco closing */7
BTA_AG_SCO_CLOSE_OP_ST, /* closing sco being opened */8
BTA_AG_SCO_CLOSE_XFER_ST, /* closing sco being transferred */9
BTA_AG_SCO_SHUTTING_ST /* sco shutting down */10
};
一般0->1->2->3->6->7->1->2->3->6->7......
/* sco events */
enum {
BTA_AG_SCO_LISTEN_E, /* listen request */0
BTA_AG_SCO_OPEN_E, /* open request */1
BTA_AG_SCO_XFER_E, /* transfer request */2
BTA_AG_SCO_CN_DONE_E, /* codec negotiation done */3
BTA_AG_SCO_REOPEN_E, /* Retry with other codec when failed */4
BTA_AG_SCO_CLOSE_E, /* close request */5
BTA_AG_SCO_SHUTDOWN_E, /* shutdown request */6
BTA_AG_SCO_CONN_OPEN_E, /* sco open */7
BTA_AG_SCO_CONN_CLOSE_E, /* sco closed */8
BTA_AG_SCO_CI_DATA_E /* SCO data ready */9
};
system/bt/bta/ag/bta_ag_sco.cc