diff options
author | Jakub Pawlowski <jpawlowski@google.com> | 2018-03-02 02:22:33 -0800 |
---|---|---|
committer | Jakub Pawlowski <jpawlowski@google.com> | 2018-03-05 21:51:59 +0000 |
commit | 16a63404814c4b1bcf2de6e1a624b5bd8b6b1cf6 (patch) | |
tree | e4da40cdbe2c7b4a5263b6cbd24e04e75cd87771 /udrv | |
parent | d96facb53f0fa7a036af8c0aeb37f3df0505faf7 (diff) | |
download | bt-16a63404814c4b1bcf2de6e1a624b5bd8b6b1cf6.tar.gz |
Use proper sockets for A2DP and Hearing Aid HAL
Test: bond both Hearing Aid and Headset, try to stream to devices separately
Bug: 69623109
Change-Id: I81c9baa65d2ef114d4e964db29beb85def2629ae
Diffstat (limited to 'udrv')
-rw-r--r-- | udrv/include/uipc.h | 4 | ||||
-rw-r--r-- | udrv/ulinux/uipc.cc | 13 |
2 files changed, 6 insertions, 11 deletions
diff --git a/udrv/include/uipc.h b/udrv/include/uipc.h index bd1c8bf67..78c6ed38a 100644 --- a/udrv/include/uipc.h +++ b/udrv/include/uipc.h @@ -90,9 +90,11 @@ std::unique_ptr<tUIPC_STATE> UIPC_Init(); * * @param ch_id Channel ID * @param p_cback Callback handler + * @param socket_path Path to the socket * @return true on success, otherwise false */ -bool UIPC_Open(tUIPC_STATE& uipc, tUIPC_CH_ID ch_id, tUIPC_RCV_CBACK* p_cback); +bool UIPC_Open(tUIPC_STATE& uipc, tUIPC_CH_ID ch_id, tUIPC_RCV_CBACK* p_cback, + const char* socket_path); /** * Closes a channel in UIPC or the entire UIPC module diff --git a/udrv/ulinux/uipc.cc b/udrv/ulinux/uipc.cc index 73c7cb2e4..e2f295028 100644 --- a/udrv/ulinux/uipc.cc +++ b/udrv/ulinux/uipc.cc @@ -539,7 +539,8 @@ std::unique_ptr<tUIPC_STATE> UIPC_Init() { ** Returns true in case of success, false in case of failure. ** ******************************************************************************/ -bool UIPC_Open(tUIPC_STATE& uipc, tUIPC_CH_ID ch_id, tUIPC_RCV_CBACK* p_cback) { +bool UIPC_Open(tUIPC_STATE& uipc, tUIPC_CH_ID ch_id, tUIPC_RCV_CBACK* p_cback, + const char* socket_path) { BTIF_TRACE_DEBUG("UIPC_Open : ch_id %d, p_cback %x", ch_id, p_cback); std::lock_guard<std::recursive_mutex> lock(uipc.mutex); @@ -553,15 +554,7 @@ bool UIPC_Open(tUIPC_STATE& uipc, tUIPC_CH_ID ch_id, tUIPC_RCV_CBACK* p_cback) { return 0; } - switch (ch_id) { - case UIPC_CH_ID_AV_CTRL: - uipc_setup_server_locked(uipc, ch_id, A2DP_CTRL_PATH, p_cback); - break; - - case UIPC_CH_ID_AV_AUDIO: - uipc_setup_server_locked(uipc, ch_id, A2DP_DATA_PATH, p_cback); - break; - } + uipc_setup_server_locked(uipc, ch_id, socket_path, p_cback); return true; } |