Loading system/btif/src/bluetooth.cc +6 −0 Original line number Diff line number Diff line Loading @@ -87,6 +87,7 @@ #include "common/metrics.h" #include "common/os_utils.h" #include "device/include/device_iot_config.h" #include "device/include/esco_parameters.h" #include "device/include/interop.h" #include "device/include/interop_config.h" #include "include/check.h" Loading Loading @@ -489,6 +490,10 @@ static bool get_swb_supported() { return hfp_hal_interface::get_swb_supported(); } static bool is_coding_format_supported(esco_coding_format_t coding_format) { return hfp_hal_interface::is_coding_format_supported(coding_format); } bool is_common_criteria_mode() { return is_bluetooth_uid() && common_criteria_mode; } Loading Loading @@ -1205,6 +1210,7 @@ EXPORT_SYMBOL bt_interface_t bluetoothInterface = { set_event_filter_connection_setup_all_devices, .get_wbs_supported = get_wbs_supported, .get_swb_supported = get_swb_supported, .is_coding_format_supported = is_coding_format_supported, .metadata_changed = metadata_changed, .interop_match_addr = interop_match_addr, .interop_match_name = interop_match_name, Loading system/gd/rust/linux/client/src/dbus_iface.rs +12 −4 Original line number Diff line number Diff line Loading @@ -10,7 +10,7 @@ use bt_topshim::profiles::a2dp::{ }; use bt_topshim::profiles::avrcp::PlayerMetadata; use bt_topshim::profiles::gatt::{AdvertisingStatus, GattStatus, LePhy}; use bt_topshim::profiles::hfp::HfpCodecCapability; use bt_topshim::profiles::hfp::{EscoCodingFormat, HfpCodecBitId, HfpCodecFormat}; use bt_topshim::profiles::hid_host::BthhReportType; use bt_topshim::profiles::sdp::{ BtSdpDipRecord, BtSdpHeaderOverlay, BtSdpMasRecord, BtSdpMnsRecord, BtSdpMpsRecord, Loading Loading @@ -435,13 +435,16 @@ impl_dbus_arg_from_into!(A2dpCodecSampleRate, i32); impl_dbus_arg_from_into!(A2dpCodecBitsPerSample, i32); impl_dbus_arg_from_into!(A2dpCodecChannelMode, i32); impl_dbus_arg_from_into!(HfpCodecCapability, i32); impl_dbus_arg_from_into!(EscoCodingFormat, u8); impl_dbus_arg_from_into!(HfpCodecBitId, i32); impl_dbus_arg_from_into!(HfpCodecFormat, i32); #[dbus_propmap(BluetoothAudioDevice)] pub struct BluetoothAudioDeviceDBus { address: String, name: String, a2dp_caps: Vec<A2dpCodecConfig>, hfp_cap: HfpCodecCapability, hfp_cap: HfpCodecFormat, absolute_volume: bool, } Loading Loading @@ -1001,6 +1004,11 @@ impl IBluetooth for BluetoothDBus { fn get_supported_roles(&self) -> Vec<BtAdapterRole> { dbus_generated!() } #[dbus_method("IsCodingFormatSupported")] fn is_coding_format_supported(&self, coding_format: EscoCodingFormat) -> bool { dbus_generated!() } } pub(crate) struct BluetoothQALegacyDBus { Loading Loading @@ -2656,7 +2664,7 @@ impl IBluetoothMedia for BluetoothMediaDBus { &mut self, address: String, sco_offload: bool, disabled_codecs: HfpCodecCapability, disabled_codecs: HfpCodecBitId, ) -> bool { dbus_generated!() } Loading system/gd/rust/linux/service/src/iface_bluetooth.rs +8 −0 Original line number Diff line number Diff line Loading @@ -5,6 +5,8 @@ use bt_topshim::btif::{ use bt_topshim::profiles::socket::SocketType; use bt_topshim::profiles::ProfileConnectionState; use bt_topshim::profiles::hfp::EscoCodingFormat; use bt_topshim::profiles::hid_host::BthhReportType; use bt_topshim::profiles::sdp::{ Loading Loading @@ -424,6 +426,7 @@ impl DBusArg for BtSdpRecord { } impl_dbus_arg_enum!(BtDiscMode); impl_dbus_arg_from_into!(EscoCodingFormat, u8); #[allow(dead_code)] struct IBluetoothDBus {} Loading Loading @@ -712,6 +715,11 @@ impl IBluetooth for IBluetoothDBus { fn get_supported_roles(&self) -> Vec<BtAdapterRole> { dbus_generated!() } #[dbus_method("IsCodingFormatSupported", DBusLog::Disable)] fn is_coding_format_supported(&self, coding_format: EscoCodingFormat) -> bool { dbus_generated!() } } impl_dbus_arg_enum!(SocketType); Loading system/gd/rust/linux/service/src/iface_bluetooth_media.rs +5 −4 Original line number Diff line number Diff line Loading @@ -3,7 +3,7 @@ use bt_topshim::profiles::a2dp::{ A2dpCodecSampleRate, PresentationPosition, }; use bt_topshim::profiles::avrcp::PlayerMetadata; use bt_topshim::profiles::hfp::HfpCodecCapability; use bt_topshim::profiles::hfp::{HfpCodecBitId, HfpCodecFormat}; use btstack::bluetooth_media::{BluetoothAudioDevice, IBluetoothMedia, IBluetoothMediaCallback}; use btstack::RPCProxy; Loading Loading @@ -43,11 +43,12 @@ pub struct BluetoothAudioDeviceDBus { address: String, name: String, a2dp_caps: Vec<A2dpCodecConfig>, hfp_cap: HfpCodecCapability, hfp_cap: HfpCodecFormat, absolute_volume: bool, } impl_dbus_arg_from_into!(HfpCodecCapability, i32); impl_dbus_arg_from_into!(HfpCodecBitId, i32); impl_dbus_arg_from_into!(HfpCodecFormat, i32); impl_dbus_arg_enum!(A2dpCodecIndex); impl_dbus_arg_from_into!(A2dpCodecSampleRate, i32); impl_dbus_arg_from_into!(A2dpCodecBitsPerSample, i32); Loading Loading @@ -254,7 +255,7 @@ impl IBluetoothMedia for IBluetoothMediaDBus { &mut self, address: String, sco_offload: bool, disabled_codecs: HfpCodecCapability, disabled_codecs: HfpCodecBitId, ) -> bool { dbus_generated!() } Loading system/gd/rust/linux/stack/src/bluetooth.rs +8 −0 Original line number Diff line number Diff line Loading @@ -10,6 +10,7 @@ use bt_topshim::btif::{ use bt_topshim::{ controller, metrics, profiles::gatt::GattStatus, profiles::hfp::EscoCodingFormat, profiles::hid_host::{ BthhConnectionState, BthhHidInfo, BthhProtocolMode, BthhReportType, BthhStatus, HHCallbacks, HHCallbacksDispatcher, HidHost, Loading Loading @@ -251,6 +252,9 @@ pub trait IBluetooth { /// Returns a list of all the roles that are supported. fn get_supported_roles(&self) -> Vec<BtAdapterRole>; /// Returns whether the coding format is supported. fn is_coding_format_supported(&self, coding_format: EscoCodingFormat) -> bool; } /// Adapter API for Bluetooth qualification and verification. Loading Loading @@ -2797,6 +2801,10 @@ impl IBluetooth for Bluetooth { roles } fn is_coding_format_supported(&self, coding_format: EscoCodingFormat) -> bool { self.intf.lock().unwrap().is_coding_format_supported(coding_format as u8) } } impl BtifSdpCallbacks for Bluetooth { Loading Loading
system/btif/src/bluetooth.cc +6 −0 Original line number Diff line number Diff line Loading @@ -87,6 +87,7 @@ #include "common/metrics.h" #include "common/os_utils.h" #include "device/include/device_iot_config.h" #include "device/include/esco_parameters.h" #include "device/include/interop.h" #include "device/include/interop_config.h" #include "include/check.h" Loading Loading @@ -489,6 +490,10 @@ static bool get_swb_supported() { return hfp_hal_interface::get_swb_supported(); } static bool is_coding_format_supported(esco_coding_format_t coding_format) { return hfp_hal_interface::is_coding_format_supported(coding_format); } bool is_common_criteria_mode() { return is_bluetooth_uid() && common_criteria_mode; } Loading Loading @@ -1205,6 +1210,7 @@ EXPORT_SYMBOL bt_interface_t bluetoothInterface = { set_event_filter_connection_setup_all_devices, .get_wbs_supported = get_wbs_supported, .get_swb_supported = get_swb_supported, .is_coding_format_supported = is_coding_format_supported, .metadata_changed = metadata_changed, .interop_match_addr = interop_match_addr, .interop_match_name = interop_match_name, Loading
system/gd/rust/linux/client/src/dbus_iface.rs +12 −4 Original line number Diff line number Diff line Loading @@ -10,7 +10,7 @@ use bt_topshim::profiles::a2dp::{ }; use bt_topshim::profiles::avrcp::PlayerMetadata; use bt_topshim::profiles::gatt::{AdvertisingStatus, GattStatus, LePhy}; use bt_topshim::profiles::hfp::HfpCodecCapability; use bt_topshim::profiles::hfp::{EscoCodingFormat, HfpCodecBitId, HfpCodecFormat}; use bt_topshim::profiles::hid_host::BthhReportType; use bt_topshim::profiles::sdp::{ BtSdpDipRecord, BtSdpHeaderOverlay, BtSdpMasRecord, BtSdpMnsRecord, BtSdpMpsRecord, Loading Loading @@ -435,13 +435,16 @@ impl_dbus_arg_from_into!(A2dpCodecSampleRate, i32); impl_dbus_arg_from_into!(A2dpCodecBitsPerSample, i32); impl_dbus_arg_from_into!(A2dpCodecChannelMode, i32); impl_dbus_arg_from_into!(HfpCodecCapability, i32); impl_dbus_arg_from_into!(EscoCodingFormat, u8); impl_dbus_arg_from_into!(HfpCodecBitId, i32); impl_dbus_arg_from_into!(HfpCodecFormat, i32); #[dbus_propmap(BluetoothAudioDevice)] pub struct BluetoothAudioDeviceDBus { address: String, name: String, a2dp_caps: Vec<A2dpCodecConfig>, hfp_cap: HfpCodecCapability, hfp_cap: HfpCodecFormat, absolute_volume: bool, } Loading Loading @@ -1001,6 +1004,11 @@ impl IBluetooth for BluetoothDBus { fn get_supported_roles(&self) -> Vec<BtAdapterRole> { dbus_generated!() } #[dbus_method("IsCodingFormatSupported")] fn is_coding_format_supported(&self, coding_format: EscoCodingFormat) -> bool { dbus_generated!() } } pub(crate) struct BluetoothQALegacyDBus { Loading Loading @@ -2656,7 +2664,7 @@ impl IBluetoothMedia for BluetoothMediaDBus { &mut self, address: String, sco_offload: bool, disabled_codecs: HfpCodecCapability, disabled_codecs: HfpCodecBitId, ) -> bool { dbus_generated!() } Loading
system/gd/rust/linux/service/src/iface_bluetooth.rs +8 −0 Original line number Diff line number Diff line Loading @@ -5,6 +5,8 @@ use bt_topshim::btif::{ use bt_topshim::profiles::socket::SocketType; use bt_topshim::profiles::ProfileConnectionState; use bt_topshim::profiles::hfp::EscoCodingFormat; use bt_topshim::profiles::hid_host::BthhReportType; use bt_topshim::profiles::sdp::{ Loading Loading @@ -424,6 +426,7 @@ impl DBusArg for BtSdpRecord { } impl_dbus_arg_enum!(BtDiscMode); impl_dbus_arg_from_into!(EscoCodingFormat, u8); #[allow(dead_code)] struct IBluetoothDBus {} Loading Loading @@ -712,6 +715,11 @@ impl IBluetooth for IBluetoothDBus { fn get_supported_roles(&self) -> Vec<BtAdapterRole> { dbus_generated!() } #[dbus_method("IsCodingFormatSupported", DBusLog::Disable)] fn is_coding_format_supported(&self, coding_format: EscoCodingFormat) -> bool { dbus_generated!() } } impl_dbus_arg_enum!(SocketType); Loading
system/gd/rust/linux/service/src/iface_bluetooth_media.rs +5 −4 Original line number Diff line number Diff line Loading @@ -3,7 +3,7 @@ use bt_topshim::profiles::a2dp::{ A2dpCodecSampleRate, PresentationPosition, }; use bt_topshim::profiles::avrcp::PlayerMetadata; use bt_topshim::profiles::hfp::HfpCodecCapability; use bt_topshim::profiles::hfp::{HfpCodecBitId, HfpCodecFormat}; use btstack::bluetooth_media::{BluetoothAudioDevice, IBluetoothMedia, IBluetoothMediaCallback}; use btstack::RPCProxy; Loading Loading @@ -43,11 +43,12 @@ pub struct BluetoothAudioDeviceDBus { address: String, name: String, a2dp_caps: Vec<A2dpCodecConfig>, hfp_cap: HfpCodecCapability, hfp_cap: HfpCodecFormat, absolute_volume: bool, } impl_dbus_arg_from_into!(HfpCodecCapability, i32); impl_dbus_arg_from_into!(HfpCodecBitId, i32); impl_dbus_arg_from_into!(HfpCodecFormat, i32); impl_dbus_arg_enum!(A2dpCodecIndex); impl_dbus_arg_from_into!(A2dpCodecSampleRate, i32); impl_dbus_arg_from_into!(A2dpCodecBitsPerSample, i32); Loading Loading @@ -254,7 +255,7 @@ impl IBluetoothMedia for IBluetoothMediaDBus { &mut self, address: String, sco_offload: bool, disabled_codecs: HfpCodecCapability, disabled_codecs: HfpCodecBitId, ) -> bool { dbus_generated!() } Loading
system/gd/rust/linux/stack/src/bluetooth.rs +8 −0 Original line number Diff line number Diff line Loading @@ -10,6 +10,7 @@ use bt_topshim::btif::{ use bt_topshim::{ controller, metrics, profiles::gatt::GattStatus, profiles::hfp::EscoCodingFormat, profiles::hid_host::{ BthhConnectionState, BthhHidInfo, BthhProtocolMode, BthhReportType, BthhStatus, HHCallbacks, HHCallbacksDispatcher, HidHost, Loading Loading @@ -251,6 +252,9 @@ pub trait IBluetooth { /// Returns a list of all the roles that are supported. fn get_supported_roles(&self) -> Vec<BtAdapterRole>; /// Returns whether the coding format is supported. fn is_coding_format_supported(&self, coding_format: EscoCodingFormat) -> bool; } /// Adapter API for Bluetooth qualification and verification. Loading Loading @@ -2797,6 +2801,10 @@ impl IBluetooth for Bluetooth { roles } fn is_coding_format_supported(&self, coding_format: EscoCodingFormat) -> bool { self.intf.lock().unwrap().is_coding_format_supported(coding_format as u8) } } impl BtifSdpCallbacks for Bluetooth { Loading