Hi Sir;
For a combo device with both a2dp source and sink service supported, when start connection from remote side(source(mobilephone) or sink(stereo headset)), the avdtp signaling connection setup event will be triggered twice for both local souce and sink service.
For example, when start connection from remote source to local sink, the log is as below:
(23628):[00:00:23.628] (23628):LOG -- l2cap.c.1140: L2CAP_EVENT_CHANNEL_OPENED status 0x0 addr 64:EC:65:80:5B:82 handle 0x80 psm 0x19 local_cid 0x4c remote_cid 0x63 local_mtu 1017, remote_mtu 1024, flush_timeout 0
(23628):[00:00:23.628] (23628):LOG -- l2cap.c.1157: ERTM mode 0, fcs enabled 0
(23628):[00:00:23.628] (23628):LOG -- avdtp.c.985: Connection opened l2cap_signaling_cid 0x4c, avdtp_cid 0x01, con_handle 0x80
(23628):[00:00:23.628] (23628):LOG -- a2dp.c.518: A2DP signaling connection established avdtp_cid 0x01 role 0
(23628):A2DPSrc: Connected to 64:EC:65:80:5B:82, a2dp cid 0x01, local seid 0x02.
(23628):[00:00:23.628] (23628):LOG -- a2dp.c.340: wait a bit, then discover seps
(23628):[00:00:23.628] (23628):LOG -- a2dp.c.298: Config timer start for cid 001
(23628):[00:00:23.628] (23628):LOG -- a2dp.c.518: A2DP signaling connection established avdtp_cid 0x01 role 1
A2DPSnk: Connected to address 64:EC:65:80:5B:82, a2dp cid 0x00, local seid 0x00.
so how to distinguish the connection target service is a2dp source or sink?