Lines Matching refs:bd_addr

144 static bool is_active_device(const RawAddress& bd_addr) {  in is_active_device()  argument
145 return !active_bda.IsEmpty() && active_bda == bd_addr; in is_active_device()
159 static bool is_connected(RawAddress* bd_addr) { in is_connected() argument
163 (!bd_addr || *bd_addr == btif_hf_cb[i].connected_bda)) in is_connected()
178 static int btif_hf_idx_by_bdaddr(RawAddress* bd_addr) { in btif_hf_idx_by_bdaddr() argument
180 if (*bd_addr == btif_hf_cb[i].connected_bda) return i; in btif_hf_idx_by_bdaddr()
266 static bool IsSlcConnected(RawAddress* bd_addr) { in IsSlcConnected() argument
267 if (!bd_addr) { in IsSlcConnected()
271 int idx = btif_hf_idx_by_bdaddr(bd_addr); in IsSlcConnected()
274 << *bd_addr; in IsSlcConnected()
324 if (p_data->open.bd_addr == btif_hf_cb[idx].connected_bda) { in btif_hf_upstreams_evt()
330 << p_data->open.bd_addr; in btif_hf_upstreams_evt()
338 << ", p_data bda: " << p_data->open.bd_addr in btif_hf_upstreams_evt()
341 BTHF_CONNECTION_STATE_DISCONNECTED, &(p_data->open.bd_addr)); in btif_hf_upstreams_evt()
350 if (btif_hf_cb[idx].connected_bda != p_data->open.bd_addr) { in btif_hf_upstreams_evt()
356 << ", p_data bda: " << p_data->open.bd_addr in btif_hf_upstreams_evt()
367 btif_hf_cb[idx].connected_bda = p_data->open.bd_addr; in btif_hf_upstreams_evt()
380 << p_data->open.bd_addr << " is ignored"; in btif_hf_upstreams_evt()
638 static bt_status_t connect_int(RawAddress* bd_addr, uint16_t uuid) { in connect_int() argument
640 if (is_connected(bd_addr)) { in connect_int()
642 bd_addr->ToString().c_str()); in connect_int()
663 bd_addr->ToString().c_str(), btif_max_hf_clients); in connect_int()
667 hf_cb->connected_bda = *bd_addr; in connect_int()
710 bt_status_t Connect(RawAddress* bd_addr) override;
711 bt_status_t Disconnect(RawAddress* bd_addr) override;
712 bt_status_t ConnectAudio(RawAddress* bd_addr) override;
713 bt_status_t DisconnectAudio(RawAddress* bd_addr) override;
714 bt_status_t StartVoiceRecognition(RawAddress* bd_addr) override;
715 bt_status_t StopVoiceRecognition(RawAddress* bd_addr) override;
717 RawAddress* bd_addr) override;
721 RawAddress* bd_addr) override;
722 bt_status_t CopsResponse(const char* cops, RawAddress* bd_addr) override;
726 RawAddress* bd_addr) override;
728 RawAddress* bd_addr) override;
730 RawAddress* bd_addr) override;
735 RawAddress* bd_addr) override;
739 const char* name, RawAddress* bd_addr) override;
743 bt_status_t SendBsir(bool value, RawAddress* bd_addr) override;
780 bt_status_t HeadsetInterface::Connect(RawAddress* bd_addr) { in Connect() argument
782 return btif_queue_connect(UUID_SERVCLASS_AG_HANDSFREE, bd_addr, connect_int); in Connect()
785 bt_status_t HeadsetInterface::Disconnect(RawAddress* bd_addr) { in Disconnect() argument
787 int idx = btif_hf_idx_by_bdaddr(bd_addr); in Disconnect()
792 if (!is_connected(bd_addr)) { in Disconnect()
794 bd_addr->ToString().c_str()); in Disconnect()
801 bt_status_t HeadsetInterface::ConnectAudio(RawAddress* bd_addr) { in ConnectAudio() argument
803 int idx = btif_hf_idx_by_bdaddr(bd_addr); in ConnectAudio()
809 if (!IsSlcConnected(bd_addr)) { in ConnectAudio()
810 LOG(ERROR) << ": SLC not connected for " << *bd_addr; in ConnectAudio()
822 bt_status_t HeadsetInterface::DisconnectAudio(RawAddress* bd_addr) { in DisconnectAudio() argument
824 int idx = btif_hf_idx_by_bdaddr(bd_addr); in DisconnectAudio()
829 if (!is_connected(bd_addr)) { in DisconnectAudio()
831 bd_addr->ToString().c_str()); in DisconnectAudio()
838 bt_status_t HeadsetInterface::StartVoiceRecognition(RawAddress* bd_addr) { in StartVoiceRecognition() argument
840 int idx = btif_hf_idx_by_bdaddr(bd_addr); in StartVoiceRecognition()
845 if (!is_connected(bd_addr)) { in StartVoiceRecognition()
847 bd_addr->ToString().c_str()); in StartVoiceRecognition()
861 bt_status_t HeadsetInterface::StopVoiceRecognition(RawAddress* bd_addr) { in StopVoiceRecognition() argument
863 int idx = btif_hf_idx_by_bdaddr(bd_addr); in StopVoiceRecognition()
869 if (!is_connected(bd_addr)) { in StopVoiceRecognition()
871 bd_addr->ToString().c_str()); in StopVoiceRecognition()
886 RawAddress* bd_addr) { in VolumeControl() argument
888 int idx = btif_hf_idx_by_bdaddr(bd_addr); in VolumeControl()
893 if (!is_connected(bd_addr)) { in VolumeControl()
895 bd_addr->ToString().c_str()); in VolumeControl()
908 int batt_chg, RawAddress* bd_addr) { in DeviceStatusNotification() argument
910 if (!bd_addr) { in DeviceStatusNotification()
914 int idx = btif_hf_idx_by_bdaddr(bd_addr); in DeviceStatusNotification()
917 bd_addr->ToString().c_str()); in DeviceStatusNotification()
936 RawAddress* bd_addr) { in CopsResponse() argument
938 int idx = btif_hf_idx_by_bdaddr(bd_addr); in CopsResponse()
943 if (!is_connected(bd_addr)) { in CopsResponse()
945 bd_addr->ToString().c_str()); in CopsResponse()
960 RawAddress* bd_addr) { in CindResponse() argument
962 int idx = btif_hf_idx_by_bdaddr(bd_addr); in CindResponse()
967 if (!is_connected(bd_addr)) { in CindResponse()
969 bd_addr->ToString().c_str()); in CindResponse()
989 RawAddress* bd_addr) { in FormattedAtResponse() argument
992 int idx = btif_hf_idx_by_bdaddr(bd_addr); in FormattedAtResponse()
997 if (!is_connected(bd_addr)) { in FormattedAtResponse()
999 bd_addr->ToString().c_str()); in FormattedAtResponse()
1009 int error_code, RawAddress* bd_addr) { in AtResponse() argument
1011 int idx = btif_hf_idx_by_bdaddr(bd_addr); in AtResponse()
1016 if (!is_connected(bd_addr)) { in AtResponse()
1018 bd_addr->ToString().c_str()); in AtResponse()
1030 bthf_call_addrtype_t type, RawAddress* bd_addr) { in ClccResponse() argument
1032 int idx = btif_hf_idx_by_bdaddr(bd_addr); in ClccResponse()
1037 if (!is_connected(bd_addr)) { in ClccResponse()
1039 bd_addr->ToString().c_str()); in ClccResponse()
1083 RawAddress* bd_addr) { in PhoneStateChange() argument
1085 if (!bd_addr) { in PhoneStateChange()
1089 int idx = btif_hf_idx_by_bdaddr(bd_addr); in PhoneStateChange()
1092 bd_addr->ToString().c_str()); in PhoneStateChange()
1096 if (!IsSlcConnected(bd_addr)) { in PhoneStateChange()
1097 LOG(WARNING) << ": SLC not connected for " << *bd_addr; in PhoneStateChange()
1105 << ", addr=" << *bd_addr << ", num_active=" << num_active in PhoneStateChange()
1109 LOG(INFO) << __func__ << ": idx=" << idx << ", addr=" << *bd_addr in PhoneStateChange()
1181 if (is_active_device(*bd_addr)) { in PhoneStateChange()
1210 if (is_active_device(*bd_addr)) { in PhoneStateChange()
1265 if (!(num_active + num_held) && is_active_device(*bd_addr)) { in PhoneStateChange()
1274 !(num_active + num_held) && is_active_device(*bd_addr)) { in PhoneStateChange()
1383 bt_status_t HeadsetInterface::SendBsir(bool value, RawAddress* bd_addr) { in SendBsir() argument
1385 int idx = btif_hf_idx_by_bdaddr(bd_addr); in SendBsir()
1388 bd_addr->ToString().c_str()); in SendBsir()
1391 if (!is_connected(bd_addr)) { in SendBsir()
1393 bd_addr->ToString().c_str()); in SendBsir()