Loading system/conf/interop_database.conf +5 −0 Original line number Diff line number Diff line Loading @@ -878,3 +878,8 @@ BSK10 = Name_Based # 0x03f6-0xa001 - Brydge C-Type Wireless Desktop Keyboard [INTEROP_HOGP_FORCE_MTU_EXCHANGE] 0x03f6-0xa001 = Vndr_Prdt_Based # Some devices claim to support HFP in EIR but do not actually support it. [INTEROP_DISABLE_HF_PROFILE] JBL Flip 5 = Name_Based JBL Flip 6 = Name_Based system/device/include/interop.h +3 −0 Original line number Diff line number Diff line Loading @@ -362,6 +362,9 @@ typedef enum { // Some HOGP devices requires MTU exchange be part of the initial setup to function. INTEROP_HOGP_FORCE_MTU_EXCHANGE, // Some devices claim to support HFP in EIR but does not actually support it. INTEROP_DISABLE_HF_PROFILE, END_OF_INTEROP_LIST } interop_feature_t; Loading system/device/src/interop.cc +1 −0 Original line number Diff line number Diff line Loading @@ -393,6 +393,7 @@ static const char* interop_feature_string_(const interop_feature_t feature) { CASE_RETURN_STR(INTEROP_HID_PREF_CONN_ZERO_LATENCY); CASE_RETURN_STR(INTEROP_HOGP_LONG_REPORT); CASE_RETURN_STR(INTEROP_HOGP_FORCE_MTU_EXCHANGE); CASE_RETURN_STR(INTEROP_DISABLE_HF_PROFILE); } return UNKNOWN_INTEROP_FEATURE; } Loading system/gd/rust/linux/stack/src/bluetooth_media.rs +11 −3 Original line number Diff line number Diff line Loading @@ -15,7 +15,7 @@ use bt_topshim::profiles::avrcp::{ use bt_topshim::profiles::csis::{ BtCsisConnectionState, CsisClient, CsisClientCallbacks, CsisClientCallbacksDispatcher, }; use bt_topshim::profiles::hfp::interop_insert_call_when_sco_start; use bt_topshim::profiles::hfp::{interop_disable_hf_profile, interop_insert_call_when_sco_start}; use bt_topshim::profiles::hfp::{ BthfAudioState, BthfConnectionState, CallHoldCommand, CallInfo, CallState, EscoCodingFormat, Hfp, HfpCallbacks, HfpCallbacksDispatcher, HfpCodecBitId, HfpCodecFormat, HfpCodecId, Loading Loading @@ -2553,15 +2553,23 @@ impl BluetoothMedia { } fn adapter_get_classic_audio_profiles(&self, addr: RawAddress) -> HashSet<Profile> { let name = self.adapter_get_remote_name(addr); let device = BluetoothDevice::new(addr, "".to_string()); self.adapter let mut profiles: HashSet<_> = self .adapter .lock() .unwrap() .get_remote_uuids(device) .into_iter() .filter_map(|u| UuidHelper::is_known_profile(&u)) .filter(|u| MEDIA_CLASSIC_AUDIO_PROFILES.contains(u)) .collect() .collect(); if interop_disable_hf_profile(name) { profiles.remove(&Profile::Hfp); } profiles } pub fn get_hfp_connection_state(&self) -> ProfileConnectionState { Loading system/gd/rust/topshim/hfp/hfp_shim.cc +4 −0 Original line number Diff line number Diff line Loading @@ -383,6 +383,10 @@ bool interop_insert_call_when_sco_start(RawAddress addr) { return interop_match_addr(interop_feature_t::INTEROP_INSERT_CALL_WHEN_SCO_START, &addr); } bool interop_disable_hf_profile(const char* name) { return interop_match_name(interop_feature_t::INTEROP_DISABLE_HF_PROFILE, name); } } // namespace rust } // namespace topshim } // namespace bluetooth Loading
system/conf/interop_database.conf +5 −0 Original line number Diff line number Diff line Loading @@ -878,3 +878,8 @@ BSK10 = Name_Based # 0x03f6-0xa001 - Brydge C-Type Wireless Desktop Keyboard [INTEROP_HOGP_FORCE_MTU_EXCHANGE] 0x03f6-0xa001 = Vndr_Prdt_Based # Some devices claim to support HFP in EIR but do not actually support it. [INTEROP_DISABLE_HF_PROFILE] JBL Flip 5 = Name_Based JBL Flip 6 = Name_Based
system/device/include/interop.h +3 −0 Original line number Diff line number Diff line Loading @@ -362,6 +362,9 @@ typedef enum { // Some HOGP devices requires MTU exchange be part of the initial setup to function. INTEROP_HOGP_FORCE_MTU_EXCHANGE, // Some devices claim to support HFP in EIR but does not actually support it. INTEROP_DISABLE_HF_PROFILE, END_OF_INTEROP_LIST } interop_feature_t; Loading
system/device/src/interop.cc +1 −0 Original line number Diff line number Diff line Loading @@ -393,6 +393,7 @@ static const char* interop_feature_string_(const interop_feature_t feature) { CASE_RETURN_STR(INTEROP_HID_PREF_CONN_ZERO_LATENCY); CASE_RETURN_STR(INTEROP_HOGP_LONG_REPORT); CASE_RETURN_STR(INTEROP_HOGP_FORCE_MTU_EXCHANGE); CASE_RETURN_STR(INTEROP_DISABLE_HF_PROFILE); } return UNKNOWN_INTEROP_FEATURE; } Loading
system/gd/rust/linux/stack/src/bluetooth_media.rs +11 −3 Original line number Diff line number Diff line Loading @@ -15,7 +15,7 @@ use bt_topshim::profiles::avrcp::{ use bt_topshim::profiles::csis::{ BtCsisConnectionState, CsisClient, CsisClientCallbacks, CsisClientCallbacksDispatcher, }; use bt_topshim::profiles::hfp::interop_insert_call_when_sco_start; use bt_topshim::profiles::hfp::{interop_disable_hf_profile, interop_insert_call_when_sco_start}; use bt_topshim::profiles::hfp::{ BthfAudioState, BthfConnectionState, CallHoldCommand, CallInfo, CallState, EscoCodingFormat, Hfp, HfpCallbacks, HfpCallbacksDispatcher, HfpCodecBitId, HfpCodecFormat, HfpCodecId, Loading Loading @@ -2553,15 +2553,23 @@ impl BluetoothMedia { } fn adapter_get_classic_audio_profiles(&self, addr: RawAddress) -> HashSet<Profile> { let name = self.adapter_get_remote_name(addr); let device = BluetoothDevice::new(addr, "".to_string()); self.adapter let mut profiles: HashSet<_> = self .adapter .lock() .unwrap() .get_remote_uuids(device) .into_iter() .filter_map(|u| UuidHelper::is_known_profile(&u)) .filter(|u| MEDIA_CLASSIC_AUDIO_PROFILES.contains(u)) .collect() .collect(); if interop_disable_hf_profile(name) { profiles.remove(&Profile::Hfp); } profiles } pub fn get_hfp_connection_state(&self) -> ProfileConnectionState { Loading
system/gd/rust/topshim/hfp/hfp_shim.cc +4 −0 Original line number Diff line number Diff line Loading @@ -383,6 +383,10 @@ bool interop_insert_call_when_sco_start(RawAddress addr) { return interop_match_addr(interop_feature_t::INTEROP_INSERT_CALL_WHEN_SCO_START, &addr); } bool interop_disable_hf_profile(const char* name) { return interop_match_name(interop_feature_t::INTEROP_DISABLE_HF_PROFILE, name); } } // namespace rust } // namespace topshim } // namespace bluetooth