diff --git a/Android.bp b/Android.bp
index 9c5a9cc..ebcc291 100644
--- a/Android.bp
+++ b/Android.bp
@@ -5,10 +5,12 @@
     header_libs: [
         "libaudio_system_headers",
         "libsystem_headers",
+        "libcutils_headers",
     ],
     export_header_lib_headers: [
         "libaudio_system_headers",
-        "libsystem_headers"
+        "libsystem_headers",
+        "libcutils_headers",
     ],
 
     export_include_dirs: ["include"],
diff --git a/OWNERS b/OWNERS
new file mode 100644
index 0000000..8d33584
--- /dev/null
+++ b/OWNERS
@@ -0,0 +1,5 @@
+eisenbach@google.com
+jpawlowski@google.com
+swillden@google.com
+malchev@google.com
+smoreland@google.com
diff --git a/include/hardware/ble_advertiser.h b/include/hardware/ble_advertiser.h
index 02d553f..5284800 100644
--- a/include/hardware/ble_advertiser.h
+++ b/include/hardware/ble_advertiser.h
@@ -57,7 +57,7 @@
   /** Registers an advertiser with the stack */
   virtual void RegisterAdvertiser(IdStatusCallback) = 0;
 
-  using GetAddressCallback = base::Callback<void(uint8_t /* address_type*/, bt_bdaddr_t /*address*/)>;
+  using GetAddressCallback = base::Callback<void(uint8_t /* address_type*/, RawAddress /*address*/)>;
   virtual void GetOwnAddress(uint8_t advertiser_id, GetAddressCallback cb) = 0;
 
   /* Set the parameters as per spec, user manual specified values */
diff --git a/include/hardware/ble_scanner.h b/include/hardware/ble_scanner.h
index c8f9ec2..2d3ec82 100644
--- a/include/hardware/ble_scanner.h
+++ b/include/hardware/ble_scanner.h
@@ -37,7 +37,7 @@
 
 /** Callback for scan results */
 typedef void (*scan_result_callback)(uint16_t event_type, uint8_t addr_type,
-                                     bt_bdaddr_t *bda, uint8_t primary_phy,
+                                     RawAddress *bda, uint8_t primary_phy,
                                      uint8_t secondary_phy,
                                      uint8_t advertising_sid, int8_t tx_power,
                                      int8_t rssi, uint16_t periodic_adv_int,
@@ -90,7 +90,7 @@
                                    int company_id, int company_id_mask,
                                    const bt_uuid_t *p_uuid,
                                    const bt_uuid_t *p_uuid_mask,
-                                   const bt_bdaddr_t *bd_addr, char addr_type,
+                                   const RawAddress *bd_addr, char addr_type,
                                    std::vector<uint8_t> data,
                                    std::vector<uint8_t> p_mask,
                                    FilterConfigCallback cb) = 0;
@@ -125,12 +125,12 @@
   using StartSyncCb =
       base::Callback<void(uint8_t status, uint16_t sync_handle,
                           uint8_t advertising_sid, uint8_t address_type,
-                          bt_bdaddr_t address, uint8_t phy, uint16_t interval)>;
+                          RawAddress address, uint8_t phy, uint16_t interval)>;
   using SyncReportCb =
       base::Callback<void(uint16_t sync_handle, int8_t tx_power, int8_t rssi,
                           uint8_t status, std::vector<uint8_t> data)>;
   using SyncLostCb = base::Callback<void(uint16_t sync_handle)>;
-  virtual void StartSync(uint8_t sid, bt_bdaddr_t address, uint16_t skip,
+  virtual void StartSync(uint8_t sid, RawAddress address, uint16_t skip,
                          uint16_t timeout, StartSyncCb start_cb,
                          SyncReportCb report_cb, SyncLostCb lost_cb) = 0;
   virtual void StopSync(uint16_t handle) = 0;
diff --git a/include/hardware/bluetooth.h b/include/hardware/bluetooth.h
index 6e287e6..9fd91cb 100644
--- a/include/hardware/bluetooth.h
+++ b/include/hardware/bluetooth.h
@@ -24,6 +24,8 @@
 
 #include <hardware/hardware.h>
 
+#include <raw_address.h>
+
 __BEGIN_DECLS
 
 /**
@@ -55,11 +57,6 @@
 /** Bluetooth test interface IDs */
 #define BT_TEST_INTERFACE_MCAP_ID "mcap_test"
 
-/** Bluetooth Address */
-typedef struct {
-    uint8_t address[6];
-} __attribute__((packed))bt_bdaddr_t;
-
 /** Bluetooth Device Name */
 typedef struct {
     uint8_t name[249];
@@ -185,7 +182,7 @@
     /**
      * Description - Bluetooth Device Address
      * Access mode - Only GET.
-     * Data type   - bt_bdaddr_t
+     * Data type   - RawAddress
      */
     BT_PROPERTY_BDADDR,
     /**
@@ -223,7 +220,7 @@
     /**
      * Description - List of bonded devices
      * Access mode - Only GET.
-     * Data type   - Array of bt_bdaddr_t of the bonded remote devices
+     * Data type   - Array of RawAddress of the bonded remote devices
      *               (Array size inferred from property length).
      */
     BT_PROPERTY_ADAPTER_BONDED_DEVICES,
@@ -334,7 +331,7 @@
  * multiple properties - num_properties shall be 1
  */
 typedef void (*remote_device_properties_callback)(bt_status_t status,
-                                                       bt_bdaddr_t *bd_addr,
+                                                       RawAddress *bd_addr,
                                                        int num_properties,
                                                        bt_property_t *properties);
 
@@ -348,7 +345,7 @@
 typedef void (*discovery_state_changed_callback)(bt_discovery_state_t state);
 
 /** Bluetooth Legacy PinKey Request callback */
-typedef void (*pin_request_callback)(bt_bdaddr_t *remote_bd_addr,
+typedef void (*pin_request_callback)(RawAddress *remote_bd_addr,
                                         bt_bdname_t *bd_name, uint32_t cod, bool min_16_digit);
 
 /** Bluetooth SSP Request callback - Just Works & Numeric Comparison*/
@@ -356,7 +353,7 @@
  *  BT_SSP_PAIRING_PASSKEY_ENTRY */
 /* TODO: Passkey request callback shall not be needed for devices with display
  * capability. We still need support this in the stack for completeness */
-typedef void (*ssp_request_callback)(bt_bdaddr_t *remote_bd_addr,
+typedef void (*ssp_request_callback)(RawAddress *remote_bd_addr,
                                         bt_bdname_t *bd_name,
                                         uint32_t cod,
                                         bt_ssp_variant_t pairing_variant,
@@ -365,11 +362,11 @@
 /** Bluetooth Bond state changed callback */
 /* Invoked in response to create_bond, cancel_bond or remove_bond */
 typedef void (*bond_state_changed_callback)(bt_status_t status,
-                                               bt_bdaddr_t *remote_bd_addr,
+                                               RawAddress *remote_bd_addr,
                                                bt_bond_state_t state);
 
 /** Bluetooth ACL connection state changed callback */
-typedef void (*acl_state_changed_callback)(bt_status_t status, bt_bdaddr_t *remote_bd_addr,
+typedef void (*acl_state_changed_callback)(bt_status_t status, RawAddress *remote_bd_addr,
                                             bt_acl_state_t state);
 
 typedef enum {
@@ -489,27 +486,27 @@
 
     /** Set Bluetooth Adapter property of 'type' */
     /* Based on the type, val shall be one of
-     * bt_bdaddr_t or bt_bdname_t or bt_scanmode_t etc
+     * RawAddress or bt_bdname_t or bt_scanmode_t etc
      */
     int (*set_adapter_property)(const bt_property_t *property);
 
     /** Get all Remote Device properties */
-    int (*get_remote_device_properties)(bt_bdaddr_t *remote_addr);
+    int (*get_remote_device_properties)(RawAddress *remote_addr);
 
     /** Get Remote Device property of 'type' */
-    int (*get_remote_device_property)(bt_bdaddr_t *remote_addr,
+    int (*get_remote_device_property)(RawAddress *remote_addr,
                                       bt_property_type_t type);
 
     /** Set Remote Device property of 'type' */
-    int (*set_remote_device_property)(bt_bdaddr_t *remote_addr,
+    int (*set_remote_device_property)(RawAddress *remote_addr,
                                       const bt_property_t *property);
 
     /** Get Remote Device's service record  for the given UUID */
-    int (*get_remote_service_record)(bt_bdaddr_t *remote_addr,
+    int (*get_remote_service_record)(RawAddress *remote_addr,
                                      bt_uuid_t *uuid);
 
     /** Start SDP to get remote services */
-    int (*get_remote_services)(bt_bdaddr_t *remote_addr);
+    int (*get_remote_services)(RawAddress *remote_addr);
 
     /** Start Discovery */
     int (*start_discovery)(void);
@@ -518,28 +515,28 @@
     int (*cancel_discovery)(void);
 
     /** Create Bluetooth Bonding */
-    int (*create_bond)(const bt_bdaddr_t *bd_addr, int transport);
+    int (*create_bond)(const RawAddress *bd_addr, int transport);
 
     /** Create Bluetooth Bond using out of band data */
-    int (*create_bond_out_of_band)(const bt_bdaddr_t *bd_addr, int transport,
+    int (*create_bond_out_of_band)(const RawAddress *bd_addr, int transport,
                                    const bt_out_of_band_data_t *oob_data);
 
     /** Remove Bond */
-    int (*remove_bond)(const bt_bdaddr_t *bd_addr);
+    int (*remove_bond)(const RawAddress *bd_addr);
 
     /** Cancel Bond */
-    int (*cancel_bond)(const bt_bdaddr_t *bd_addr);
+    int (*cancel_bond)(const RawAddress *bd_addr);
 
     /**
      * Get the connection status for a given remote device.
      * return value of 0 means the device is not connected,
      * non-zero return status indicates an active connection.
      */
-    int (*get_connection_state)(const bt_bdaddr_t *bd_addr);
+    int (*get_connection_state)(const RawAddress *bd_addr);
 
     /** BT Legacy PinKey Reply */
     /** If accept==FALSE, then pin_len and pin_code shall be 0x0 */
-    int (*pin_reply)(const bt_bdaddr_t *bd_addr, uint8_t accept,
+    int (*pin_reply)(const RawAddress *bd_addr, uint8_t accept,
                      uint8_t pin_len, bt_pin_code_t *pin_code);
 
     /** BT SSP Reply - Just Works, Numeric Comparison and Passkey
@@ -547,7 +544,7 @@
      * BT_SSP_VARIANT_CONSENT
      * For BT_SSP_VARIANT_PASSKEY_ENTRY, if accept==FALSE, then passkey
      * shall be zero */
-    int (*ssp_reply)(const bt_bdaddr_t *bd_addr, bt_ssp_variant_t variant,
+    int (*ssp_reply)(const RawAddress *bd_addr, bt_ssp_variant_t variant,
                      uint8_t accept, uint32_t passkey);
 
     /** Get Bluetooth profile interface */
@@ -596,7 +593,7 @@
      * first |len| bytes of the its device address match |addr|.
      * NOTE: |feature| has to match an item defined in interop_feature_t (interop.h).
      */
-    void (*interop_database_add)(uint16_t feature, const bt_bdaddr_t *addr, size_t len);
+    void (*interop_database_add)(uint16_t feature, const RawAddress *addr, size_t len);
 } bt_interface_t;
 
 /** TODO: Need to add APIs for Service Discovery, Service authorization and
diff --git a/include/hardware/bt_av.h b/include/hardware/bt_av.h
index 91ae2ac..36722d4 100644
--- a/include/hardware/bt_av.h
+++ b/include/hardware/bt_av.h
@@ -130,13 +130,13 @@
  *  state will have one of the values from btav_connection_state_t
  */
 typedef void (* btav_connection_state_callback)(btav_connection_state_t state,
-                                                    bt_bdaddr_t *bd_addr);
+                                                    RawAddress *bd_addr);
 
 /** Callback for audiopath state change.
  *  state will have one of the values from btav_audio_state_t
  */
 typedef void (* btav_audio_state_callback)(btav_audio_state_t state,
-                                               bt_bdaddr_t *bd_addr);
+                                               RawAddress *bd_addr);
 
 /** Callback for audio configuration change.
  *  Used only for the A2DP Source interface.
@@ -151,7 +151,7 @@
  *  sample_rate: sample rate in Hz
  *  channel_count: number of channels (1 for mono, 2 for stereo)
  */
-typedef void (* btav_audio_sink_config_callback)(bt_bdaddr_t *bd_addr,
+typedef void (* btav_audio_sink_config_callback)(RawAddress *bd_addr,
                                                  uint32_t sample_rate,
                                                  uint8_t channel_count);
 
@@ -197,10 +197,10 @@
                 std::vector<btav_a2dp_codec_config_t> codec_priorities);
 
     /** connect to headset */
-    bt_status_t (*connect)( bt_bdaddr_t *bd_addr );
+    bt_status_t (*connect)( RawAddress *bd_addr );
 
     /** dis-connect from headset */
-    bt_status_t (*disconnect)( bt_bdaddr_t *bd_addr );
+    bt_status_t (*disconnect)( RawAddress *bd_addr );
 
     /** configure the codecs settings preferences */
     bt_status_t (*config_codec)(std::vector<btav_a2dp_codec_config_t> codec_preferences);
@@ -222,10 +222,10 @@
     bt_status_t (*init)( btav_sink_callbacks_t* callbacks );
 
     /** connect to headset */
-    bt_status_t (*connect)( bt_bdaddr_t *bd_addr );
+    bt_status_t (*connect)( RawAddress *bd_addr );
 
     /** dis-connect from headset */
-    bt_status_t (*disconnect)( bt_bdaddr_t *bd_addr );
+    bt_status_t (*disconnect)( RawAddress *bd_addr );
 
     /** Closes the interface. */
     void  (*cleanup)( void );
diff --git a/include/hardware/bt_common_types.h b/include/hardware/bt_common_types.h
index cff3072..8d13ed4 100644
--- a/include/hardware/bt_common_types.h
+++ b/include/hardware/bt_common_types.h
@@ -34,7 +34,7 @@
     uint8_t  tx_power;
     int8_t  rssi_value;
     uint16_t time_stamp;
-    bt_bdaddr_t bd_addr;
+    RawAddress bd_addr;
     uint8_t  adv_pkt_len;
     uint8_t  *p_adv_pkt_data;
     uint8_t  scan_rsp_len;
diff --git a/include/hardware/bt_gatt_client.h b/include/hardware/bt_gatt_client.h
index c40fa6b..cafc2da 100644
--- a/include/hardware/bt_gatt_client.h
+++ b/include/hardware/bt_gatt_client.h
@@ -60,7 +60,7 @@
 typedef struct
 {
     uint8_t             value[BTGATT_MAX_ATTR_LEN];
-    bt_bdaddr_t         bda;
+    RawAddress         bda;
     uint16_t            handle;
     uint16_t            len;
     uint8_t             is_notify;
@@ -68,7 +68,7 @@
 
 typedef struct
 {
-    bt_bdaddr_t        *bda1;
+    RawAddress        *bda1;
     bt_uuid_t          *uuid1;
     uint16_t            u1;
     uint16_t            u2;
@@ -99,15 +99,14 @@
 /** BT-GATT Client callback structure. */
 
 /** Callback invoked in response to register_client */
-typedef void (*register_client_callback)(int status, int client_if,
-                bt_uuid_t *app_uuid);
+typedef void (*register_client_callback)(int status, int client_if, const bt_uuid_t& app_uuid);
 
 /** GATT open callback invoked in response to open */
-typedef void (*connect_callback)(int conn_id, int status, int client_if, bt_bdaddr_t* bda);
+typedef void (*connect_callback)(int conn_id, int status, int client_if, const RawAddress& bda);
 
 /** Callback invoked in response to close */
 typedef void (*disconnect_callback)(int conn_id, int status,
-                int client_if, bt_bdaddr_t* bda);
+                int client_if, const RawAddress& bda);
 
 /**
  * Invoked in response to search_service when the GATT service search
@@ -123,7 +122,7 @@
  * Remote device notification callback, invoked when a remote device sends
  * a notification or indication that a client has registered for.
  */
-typedef void (*notify_callback)(int conn_id, btgatt_notify_params_t *p_data);
+typedef void (*notify_callback)(int conn_id, const btgatt_notify_params_t& p_data);
 
 /** Reports result of a GATT read operation */
 typedef void (*read_characteristic_callback)(int conn_id, int status,
@@ -137,13 +136,13 @@
 
 /** Callback invoked in response to read_descriptor */
 typedef void (*read_descriptor_callback)(int conn_id, int status,
-                btgatt_read_params_t *p_data);
+                const btgatt_read_params_t& p_data);
 
 /** Callback invoked in response to write_descriptor */
 typedef void (*write_descriptor_callback)(int conn_id, int status, uint16_t handle);
 
 /** Callback triggered in response to read_remote_rssi */
-typedef void (*read_remote_rssi_callback)(int client_if, bt_bdaddr_t* bda,
+typedef void (*read_remote_rssi_callback)(int client_if, const RawAddress& bda,
                                           int rssi, int status);
 
 /** Callback invoked when the MTU for a given connection changes */
@@ -158,13 +157,13 @@
 typedef void (*congestion_callback)(int conn_id, bool congested);
 
 /** GATT get database callback */
-typedef void (*get_gatt_db_callback)(int conn_id, btgatt_db_element_t *db, int count);
+typedef void (*get_gatt_db_callback)(int conn_id, const btgatt_db_element_t* db, int count);
 
 /** GATT services between start_handle and end_handle were removed */
 typedef void (*services_removed_callback)(int conn_id, uint16_t start_handle, uint16_t end_handle);
 
 /** GATT services were added */
-typedef void (*services_added_callback)(int conn_id, btgatt_db_element_t *added, int added_count);
+typedef void (*services_added_callback)(int conn_id, const btgatt_db_element_t& added, int added_count);
 
 /** Callback invoked when the PHY for a given connection changes */
 typedef void (*phy_updated_callback)(int conn_id, uint8_t tx_phy,
@@ -201,33 +200,33 @@
 
 typedef struct {
     /** Registers a GATT client application with the stack */
-    bt_status_t (*register_client)( bt_uuid_t *uuid );
+    bt_status_t (*register_client)(const bt_uuid_t& uuid);
 
     /** Unregister a client application from the stack */
-    bt_status_t (*unregister_client)(int client_if );
+    bt_status_t (*unregister_client)(int client_if);
 
     /** Create a connection to a remote LE or dual-mode device */
-    bt_status_t (*connect)(int client_if, const bt_bdaddr_t *bd_addr,
+    bt_status_t (*connect)(int client_if, const RawAddress& bd_addr,
                            bool is_direct, int transport, bool opportunistic,
                            int initiating_phys);
 
     /** Disconnect a remote device or cancel a pending connection */
-    bt_status_t (*disconnect)( int client_if, const bt_bdaddr_t *bd_addr,
+    bt_status_t (*disconnect)( int client_if, const RawAddress& bd_addr,
                     int conn_id);
 
     /** Clear the attribute cache for a given device */
-    bt_status_t (*refresh)( int client_if, const bt_bdaddr_t *bd_addr );
+    bt_status_t (*refresh)( int client_if, const RawAddress& bd_addr);
 
     /**
      * Enumerate all GATT services on a connected device.
      * Optionally, the results can be filtered for a given UUID.
      */
-    bt_status_t (*search_service)(int conn_id, bt_uuid_t *filter_uuid );
+    bt_status_t (*search_service)(int conn_id, const bt_uuid_t *filter_uuid);
 
     /**
      * Sead "Find service by UUID" request. Used only for PTS tests.
      */
-    void (*btif_gattc_discover_service_by_uuid)(int conn_id, bt_uuid_t *uuid);
+    void (*btif_gattc_discover_service_by_uuid)(int conn_id, const bt_uuid_t& uuid);
 
     /** Read a characteristic on a remote device */
     bt_status_t (*read_characteristic)(int conn_id, uint16_t handle,
@@ -235,7 +234,7 @@
 
     /** Read a characteristic on a remote device */
     bt_status_t (*read_using_characteristic_uuid)(
-        int conn_id, bt_uuid_t *uuid, uint16_t s_handle,
+        int conn_id, const bt_uuid_t& uuid, uint16_t s_handle,
         uint16_t e_handle, int auth_req);
 
     /** Write a remote characteristic */
@@ -258,35 +257,35 @@
      * characteristic
      */
     bt_status_t (*register_for_notification)( int client_if,
-                    const bt_bdaddr_t *bd_addr, uint16_t handle);
+                    const RawAddress& bd_addr, uint16_t handle);
 
     /** Deregister a previous request for notifications/indications */
     bt_status_t (*deregister_for_notification)( int client_if,
-                    const bt_bdaddr_t *bd_addr, uint16_t handle);
+                    const RawAddress& bd_addr, uint16_t handle);
 
     /** Request RSSI for a given remote device */
-    bt_status_t (*read_remote_rssi)( int client_if, const bt_bdaddr_t *bd_addr);
+    bt_status_t (*read_remote_rssi)(int client_if, const RawAddress& bd_addr);
 
     /** Determine the type of the remote device (LE, BR/EDR, Dual-mode) */
-    int (*get_device_type)( const bt_bdaddr_t *bd_addr );
+    int (*get_device_type)(const RawAddress &bd_addr);
 
     /** Configure the MTU for a given connection */
     bt_status_t (*configure_mtu)(int conn_id, int mtu);
 
     /** Request a connection parameter update */
-    bt_status_t (*conn_parameter_update)(const bt_bdaddr_t *bd_addr, int min_interval,
+    bt_status_t (*conn_parameter_update)(const RawAddress& bd_addr, int min_interval,
                     int max_interval, int latency, int timeout);
 
-    bt_status_t (*set_preferred_phy)(int conn_id, uint8_t tx_phy,
+    bt_status_t (*set_preferred_phy)(const RawAddress& bd_addr, uint8_t tx_phy,
                                      uint8_t rx_phy, uint16_t phy_options);
 
     bt_status_t (*read_phy)(
-        int conn_id,
+        const RawAddress& bd_addr,
         base::Callback<void(uint8_t tx_phy, uint8_t rx_phy, uint8_t status)>
             cb);
 
     /** Test mode interface */
-    bt_status_t (*test_command)( int command, btgatt_test_params_t* params);
+    bt_status_t (*test_command)( int command, const btgatt_test_params_t& params);
 
     /** Get gatt db content */
     bt_status_t (*get_gatt_db)( int conn_id);
diff --git a/include/hardware/bt_gatt_server.h b/include/hardware/bt_gatt_server.h
index 36259a1..93ecc02 100644
--- a/include/hardware/bt_gatt_server.h
+++ b/include/hardware/bt_gatt_server.h
@@ -46,11 +46,11 @@
 
 /** Callback invoked in response to register_server */
 typedef void (*register_server_callback)(int status, int server_if,
-                bt_uuid_t *app_uuid);
+                const bt_uuid_t& app_uuid);
 
 /** Callback indicating that a remote device has connected or been disconnected */
 typedef void (*connection_callback)(int conn_id, int server_if, int connected,
-                                    bt_bdaddr_t *bda);
+                                    const RawAddress& bda);
 
 /** Callback invoked in response to create_service */
 typedef void (*service_added_callback)(int status, int server_if,
@@ -68,20 +68,20 @@
  * Callback invoked when a remote device has requested to read a characteristic
  * or descriptor. The application must respond by calling send_response
  */
-typedef void (*request_read_callback)(int conn_id, int trans_id, bt_bdaddr_t *bda,
+typedef void (*request_read_callback)(int conn_id, int trans_id, const RawAddress& bda,
                                       int attr_handle, int offset, bool is_long);
 
 /**
  * Callback invoked when a remote device has requested to write to a
  * characteristic or descriptor.
  */
-typedef void (*request_write_callback)(int conn_id, int trans_id, bt_bdaddr_t *bda,
+typedef void (*request_write_callback)(int conn_id, int trans_id, const RawAddress& bda,
                                        int attr_handle, int offset, bool need_rsp,
                                        bool is_prep, std::vector<uint8_t> value);
 
 /** Callback invoked when a previously prepared write is to be executed */
 typedef void (*request_exec_write_callback)(int conn_id, int trans_id,
-                                            bt_bdaddr_t *bda, int exec_write);
+                                            const RawAddress& bda, int exec_write);
 
 /**
  * Callback triggered in response to send_response if the remote device
@@ -135,17 +135,17 @@
 /** Represents the standard BT-GATT server interface. */
 typedef struct {
     /** Registers a GATT server application with the stack */
-    bt_status_t (*register_server)( bt_uuid_t *uuid );
+    bt_status_t (*register_server)(const bt_uuid_t& uuid);
 
     /** Unregister a server application from the stack */
     bt_status_t (*unregister_server)(int server_if );
 
     /** Create a connection to a remote peripheral */
-    bt_status_t (*connect)(int server_if, const bt_bdaddr_t *bd_addr,
+    bt_status_t (*connect)(int server_if, const RawAddress& bd_addr,
                             bool is_direct, int transport);
 
     /** Disconnect an established connection or cancel a pending one */
-    bt_status_t (*disconnect)(int server_if, const bt_bdaddr_t *bd_addr,
+    bt_status_t (*disconnect)(int server_if, const RawAddress& bd_addr,
                     int conn_id );
 
     /** Create a new service */
@@ -164,13 +164,13 @@
 
     /** Send a response to a read/write operation */
     bt_status_t (*send_response)(int conn_id, int trans_id,
-                                 int status, btgatt_response_t *response);
+                                 int status, const btgatt_response_t& response);
 
-    bt_status_t (*set_preferred_phy)(int conn_id, uint8_t tx_phy,
+    bt_status_t (*set_preferred_phy)(const RawAddress& bd_addr, uint8_t tx_phy,
                                      uint8_t rx_phy, uint16_t phy_options);
 
     bt_status_t (*read_phy)(
-        int conn_id,
+        const RawAddress& bd_addr,
         base::Callback<void(uint8_t tx_phy, uint8_t rx_phy, uint8_t status)>
             cb);
 
diff --git a/include/hardware/bt_hd.h b/include/hardware/bt_hd.h
index 263f29f..c99ab24 100644
--- a/include/hardware/bt_hd.h
+++ b/include/hardware/bt_hd.h
@@ -65,8 +65,8 @@
     uint32_t delay_variation;
 } bthd_qos_param_t;
 
-typedef void (* bthd_application_state_callback)(bt_bdaddr_t *bd_addr, bthd_application_state_t state);
-typedef void (* bthd_connection_state_callback)(bt_bdaddr_t *bd_addr, bthd_connection_state_t state);
+typedef void (* bthd_application_state_callback)(RawAddress *bd_addr, bthd_application_state_t state);
+typedef void (* bthd_connection_state_callback)(RawAddress *bd_addr, bthd_connection_state_t state);
 typedef void (* bthd_get_report_callback)(uint8_t type, uint8_t id, uint16_t buffer_size);
 typedef void (* bthd_set_report_callback)(uint8_t type, uint8_t id, uint16_t len, uint8_t *p_data);
 typedef void (* bthd_set_protocol_callback)(uint8_t protocol);
@@ -105,7 +105,7 @@
     bt_status_t (*unregister_app)(void);
 
     /** connects to host with virtual cable */
-    bt_status_t (*connect)(bt_bdaddr_t *bd_addr);
+    bt_status_t (*connect)(RawAddress *bd_addr);
 
     /** disconnects from currently connected host */
     bt_status_t (*disconnect)(void);
diff --git a/include/hardware/bt_hf.h b/include/hardware/bt_hf.h
index 892fbdb..1f6f6eb 100644
--- a/include/hardware/bt_hf.h
+++ b/include/hardware/bt_hf.h
@@ -91,89 +91,89 @@
 /** Callback for connection state change.
  *  state will have one of the values from BtHfConnectionState
  */
-typedef void (* bthf_connection_state_callback)(bthf_connection_state_t state, bt_bdaddr_t *bd_addr);
+typedef void (* bthf_connection_state_callback)(bthf_connection_state_t state, RawAddress *bd_addr);
 
 /** Callback for audio connection state change.
  *  state will have one of the values from BtHfAudioState
  */
-typedef void (* bthf_audio_state_callback)(bthf_audio_state_t state, bt_bdaddr_t *bd_addr);
+typedef void (* bthf_audio_state_callback)(bthf_audio_state_t state, RawAddress *bd_addr);
 
 /** Callback for VR connection state change.
  *  state will have one of the values from BtHfVRState
  */
-typedef void (* bthf_vr_cmd_callback)(bthf_vr_state_t state, bt_bdaddr_t *bd_addr);
+typedef void (* bthf_vr_cmd_callback)(bthf_vr_state_t state, RawAddress *bd_addr);
 
 /** Callback for answer incoming call (ATA)
  */
-typedef void (* bthf_answer_call_cmd_callback)(bt_bdaddr_t *bd_addr);
+typedef void (* bthf_answer_call_cmd_callback)(RawAddress *bd_addr);
 
 /** Callback for disconnect call (AT+CHUP)
  */
-typedef void (* bthf_hangup_call_cmd_callback)(bt_bdaddr_t *bd_addr);
+typedef void (* bthf_hangup_call_cmd_callback)(RawAddress *bd_addr);
 
 /** Callback for disconnect call (AT+CHUP)
  *  type will denote Speaker/Mic gain (BtHfVolumeControl).
  */
-typedef void (* bthf_volume_cmd_callback)(bthf_volume_type_t type, int volume, bt_bdaddr_t *bd_addr);
+typedef void (* bthf_volume_cmd_callback)(bthf_volume_type_t type, int volume, RawAddress *bd_addr);
 
 /** Callback for dialing an outgoing call
  *  If number is NULL, redial
  */
-typedef void (* bthf_dial_call_cmd_callback)(char *number, bt_bdaddr_t *bd_addr);
+typedef void (* bthf_dial_call_cmd_callback)(char *number, RawAddress *bd_addr);
 
 /** Callback for sending DTMF tones
  *  tone contains the dtmf character to be sent
  */
-typedef void (* bthf_dtmf_cmd_callback)(char tone, bt_bdaddr_t *bd_addr);
+typedef void (* bthf_dtmf_cmd_callback)(char tone, RawAddress *bd_addr);
 
 /** Callback for enabling/disabling noise reduction/echo cancellation
  *  value will be 1 to enable, 0 to disable
  */
-typedef void (* bthf_nrec_cmd_callback)(bthf_nrec_t nrec, bt_bdaddr_t *bd_addr);
+typedef void (* bthf_nrec_cmd_callback)(bthf_nrec_t nrec, RawAddress *bd_addr);
 
 /** Callback for AT+BCS and event from BAC
  *  WBS enable, WBS disable
  */
-typedef void (* bthf_wbs_callback)(bthf_wbs_config_t wbs, bt_bdaddr_t *bd_addr);
+typedef void (* bthf_wbs_callback)(bthf_wbs_config_t wbs, RawAddress *bd_addr);
 
 /** Callback for call hold handling (AT+CHLD)
  *  value will contain the call hold command (0, 1, 2, 3)
  */
-typedef void (* bthf_chld_cmd_callback)(bthf_chld_type_t chld, bt_bdaddr_t *bd_addr);
+typedef void (* bthf_chld_cmd_callback)(bthf_chld_type_t chld, RawAddress *bd_addr);
 
 /** Callback for CNUM (subscriber number)
  */
-typedef void (* bthf_cnum_cmd_callback)(bt_bdaddr_t *bd_addr);
+typedef void (* bthf_cnum_cmd_callback)(RawAddress *bd_addr);
 
 /** Callback for indicators (CIND)
  */
-typedef void (* bthf_cind_cmd_callback)(bt_bdaddr_t *bd_addr);
+typedef void (* bthf_cind_cmd_callback)(RawAddress *bd_addr);
 
 /** Callback for operator selection (COPS)
  */
-typedef void (* bthf_cops_cmd_callback)(bt_bdaddr_t *bd_addr);
+typedef void (* bthf_cops_cmd_callback)(RawAddress *bd_addr);
 
 /** Callback for call list (AT+CLCC)
  */
-typedef void (* bthf_clcc_cmd_callback) (bt_bdaddr_t *bd_addr);
+typedef void (* bthf_clcc_cmd_callback) (RawAddress *bd_addr);
 
 /** Callback for unknown AT command recd from HF
  *  at_string will contain the unparsed AT string
  */
-typedef void (* bthf_unknown_at_cmd_callback)(char *at_string, bt_bdaddr_t *bd_addr);
+typedef void (* bthf_unknown_at_cmd_callback)(char *at_string, RawAddress *bd_addr);
 
 /** Callback for keypressed (HSP) event.
  */
-typedef void (* bthf_key_pressed_cmd_callback)(bt_bdaddr_t *bd_addr);
+typedef void (* bthf_key_pressed_cmd_callback)(RawAddress *bd_addr);
 
 /** Callback for BIND. Pass the remote HF Indicators supported.
  */
-typedef void (* bthf_bind_cmd_callback)(char *at_string, bt_bdaddr_t *bd_addr);
+typedef void (* bthf_bind_cmd_callback)(char *at_string, RawAddress *bd_addr);
 
 /** Callback for BIEV. Pass the change in the Remote HF indicator values
  */
 typedef void (* bthf_biev_cmd_callback)(bthf_hf_ind_type_t ind_id, int ind_value,
-                                        bt_bdaddr_t *bd_addr);
+                                        RawAddress *bd_addr);
 
 /** BT-HF callback structure. */
 typedef struct {
@@ -255,45 +255,45 @@
     bt_status_t (*init)( bthf_callbacks_t* callbacks, int max_hf_clients, bool inband_ringing_supported);
 
     /** connect to headset */
-    bt_status_t (*connect)( bt_bdaddr_t *bd_addr );
+    bt_status_t (*connect)( RawAddress *bd_addr );
 
     /** dis-connect from headset */
-    bt_status_t (*disconnect)( bt_bdaddr_t *bd_addr );
+    bt_status_t (*disconnect)( RawAddress *bd_addr );
 
     /** create an audio connection */
-    bt_status_t (*connect_audio)( bt_bdaddr_t *bd_addr );
+    bt_status_t (*connect_audio)( RawAddress *bd_addr );
 
     /** close the audio connection */
-    bt_status_t (*disconnect_audio)( bt_bdaddr_t *bd_addr );
+    bt_status_t (*disconnect_audio)( RawAddress *bd_addr );
 
     /** start voice recognition */
-    bt_status_t (*start_voice_recognition)( bt_bdaddr_t *bd_addr );
+    bt_status_t (*start_voice_recognition)( RawAddress *bd_addr );
 
     /** stop voice recognition */
-    bt_status_t (*stop_voice_recognition)( bt_bdaddr_t *bd_addr );
+    bt_status_t (*stop_voice_recognition)( RawAddress *bd_addr );
 
     /** volume control */
-    bt_status_t (*volume_control) (bthf_volume_type_t type, int volume, bt_bdaddr_t *bd_addr );
+    bt_status_t (*volume_control) (bthf_volume_type_t type, int volume, RawAddress *bd_addr );
 
     /** Combined device status change notification */
     bt_status_t (*device_status_notification)(bthf_network_state_t ntk_state, bthf_service_type_t svc_type, int signal,
                            int batt_chg);
 
     /** Response for COPS command */
-    bt_status_t (*cops_response)(const char *cops, bt_bdaddr_t *bd_addr );
+    bt_status_t (*cops_response)(const char *cops, RawAddress *bd_addr );
 
     /** Response for CIND command */
     bt_status_t (*cind_response)(int svc, int num_active, int num_held, bthf_call_state_t call_setup_state,
-                                 int signal, int roam, int batt_chg, bt_bdaddr_t *bd_addr );
+                                 int signal, int roam, int batt_chg, RawAddress *bd_addr );
 
     /** Pre-formatted AT response, typically in response to unknown AT cmd */
-    bt_status_t (*formatted_at_response)(const char *rsp, bt_bdaddr_t *bd_addr );
+    bt_status_t (*formatted_at_response)(const char *rsp, RawAddress *bd_addr );
 
     /** ok/error response
      *  ERROR (0)
      *  OK    (1)
      */
-    bt_status_t (*at_response) (bthf_at_response_t response_code, int error_code, bt_bdaddr_t *bd_addr );
+    bt_status_t (*at_response) (bthf_at_response_t response_code, int error_code, RawAddress *bd_addr );
 
     /** response for CLCC command
      *  Can be iteratively called for each call index
@@ -302,7 +302,7 @@
     bt_status_t (*clcc_response) (int index, bthf_call_direction_t dir,
                                 bthf_call_state_t state, bthf_call_mode_t mode,
                                 bthf_call_mpty_type_t mpty, const char *number,
-                                bthf_call_addrtype_t type, bt_bdaddr_t *bd_addr );
+                                bthf_call_addrtype_t type, RawAddress *bd_addr );
 
     /** notify of a call state change
      *  Each update notifies
@@ -318,11 +318,14 @@
     void  (*cleanup)( void );
 
     /** configuration for the SCO codec */
-    bt_status_t (*configure_wbs)( bt_bdaddr_t *bd_addr ,bthf_wbs_config_t config );
+    bt_status_t (*configure_wbs)( RawAddress *bd_addr ,bthf_wbs_config_t config );
 
     /** Response for HF Indicator change (+BIND) */
     bt_status_t (*bind_response)(bthf_hf_ind_type_t ind_id, bthf_hf_ind_status_t ind_status,
-                                 bt_bdaddr_t *bd_addr);
+                                 RawAddress *bd_addr);
+
+    /** Whether we will initiate SCO or not **/
+    bt_status_t (*set_sco_allowed)(bool value);
 } bthf_interface_t;
 
 __END_DECLS
diff --git a/include/hardware/bt_hf_client.h b/include/hardware/bt_hf_client.h
index b728be3..5207296 100644
--- a/include/hardware/bt_hf_client.h
+++ b/include/hardware/bt_hf_client.h
@@ -167,7 +167,7 @@
  *  state will have one of the values from BtHfConnectionState
  *  peer/chld_features are valid only for BTHF_CLIENT_CONNECTION_STATE_SLC_CONNECTED state
  */
-typedef void (* bthf_client_connection_state_callback)(const bt_bdaddr_t *bd_addr,
+typedef void (* bthf_client_connection_state_callback)(const RawAddress *bd_addr,
                                                        bthf_client_connection_state_t state,
                                                        unsigned int peer_feat,
                                                        unsigned int chld_feat);
@@ -175,73 +175,73 @@
 /** Callback for audio connection state change.
  *  state will have one of the values from BtHfAudioState
  */
-typedef void (* bthf_client_audio_state_callback)(const bt_bdaddr_t *bd_addr,
+typedef void (* bthf_client_audio_state_callback)(const RawAddress *bd_addr,
                                                   bthf_client_audio_state_t state);
 
 /** Callback for VR connection state change.
  *  state will have one of the values from BtHfVRState
  */
-typedef void (* bthf_client_vr_cmd_callback)(const bt_bdaddr_t *bd_addr, bthf_client_vr_state_t state);
+typedef void (* bthf_client_vr_cmd_callback)(const RawAddress *bd_addr, bthf_client_vr_state_t state);
 
 /** Callback for network state change
  */
-typedef void (* bthf_client_network_state_callback) (const bt_bdaddr_t *bd_addr,
+typedef void (* bthf_client_network_state_callback) (const RawAddress *bd_addr,
                                                      bthf_client_network_state_t state);
 
 /** Callback for network roaming status change
  */
-typedef void (* bthf_client_network_roaming_callback) (const bt_bdaddr_t *bd_addr,
+typedef void (* bthf_client_network_roaming_callback) (const RawAddress *bd_addr,
                                                        bthf_client_service_type_t type);
 
 /** Callback for signal strength indication
  */
-typedef void (* bthf_client_network_signal_callback) (const bt_bdaddr_t *bd_addr,
+typedef void (* bthf_client_network_signal_callback) (const RawAddress *bd_addr,
                                                       int signal_strength);
 
 /** Callback for battery level indication
  */
-typedef void (* bthf_client_battery_level_callback) (const bt_bdaddr_t *bd_addr,
+typedef void (* bthf_client_battery_level_callback) (const RawAddress *bd_addr,
                                                      int battery_level);
 
 /** Callback for current operator name
  */
-typedef void (* bthf_client_current_operator_callback) (const bt_bdaddr_t *bd_addr,
+typedef void (* bthf_client_current_operator_callback) (const RawAddress *bd_addr,
                                                         const char *name);
 
 /** Callback for call indicator
  */
-typedef void (* bthf_client_call_callback) (const bt_bdaddr_t *bd_addr, bthf_client_call_t call);
+typedef void (* bthf_client_call_callback) (const RawAddress *bd_addr, bthf_client_call_t call);
 
 /** Callback for callsetup indicator
  */
-typedef void (* bthf_client_callsetup_callback) (const bt_bdaddr_t *bd_addr,
+typedef void (* bthf_client_callsetup_callback) (const RawAddress *bd_addr,
                                                  bthf_client_callsetup_t callsetup);
 
 /** Callback for callheld indicator
  */
-typedef void (* bthf_client_callheld_callback) (const bt_bdaddr_t *bd_addr,
+typedef void (* bthf_client_callheld_callback) (const RawAddress *bd_addr,
                                                 bthf_client_callheld_t callheld);
 
 /** Callback for response and hold
  */
-typedef void (* bthf_client_resp_and_hold_callback) (const bt_bdaddr_t *bd_addr,
+typedef void (* bthf_client_resp_and_hold_callback) (const RawAddress *bd_addr,
                                                      bthf_client_resp_and_hold_t resp_and_hold);
 
 /** Callback for Calling Line Identification notification
  *  Will be called only when there is an incoming call and number is provided.
  */
-typedef void (* bthf_client_clip_callback) (const bt_bdaddr_t *bd_addr, const char *number);
+typedef void (* bthf_client_clip_callback) (const RawAddress *bd_addr, const char *number);
 
 /**
  * Callback for Call Waiting notification
  */
-typedef void (* bthf_client_call_waiting_callback) (const bt_bdaddr_t *bd_addr, const char *number);
+typedef void (* bthf_client_call_waiting_callback) (const RawAddress *bd_addr, const char *number);
 
 /**
  *  Callback for listing current calls. Can be called multiple time.
  *  If number is unknown NULL is passed.
  */
-typedef void (*bthf_client_current_calls) (const bt_bdaddr_t *bd_addr, int index,
+typedef void (*bthf_client_current_calls) (const RawAddress *bd_addr, int index,
                                            bthf_client_call_direction_t dir,
                                            bthf_client_call_state_t state,
                                            bthf_client_call_mpty_type_t mpty,
@@ -249,38 +249,38 @@
 
 /** Callback for audio volume change
  */
-typedef void (*bthf_client_volume_change_callback) (const bt_bdaddr_t *bd_addr,
+typedef void (*bthf_client_volume_change_callback) (const RawAddress *bd_addr,
                                                     bthf_client_volume_type_t type,
                                                     int volume);
 
 /** Callback for command complete event
  *  cme is valid only for BTHF_CLIENT_CMD_COMPLETE_ERROR_CME type
  */
-typedef void (*bthf_client_cmd_complete_callback) (const bt_bdaddr_t *bd_addr,
+typedef void (*bthf_client_cmd_complete_callback) (const RawAddress *bd_addr,
                                                    bthf_client_cmd_complete_t type,
                                                    int cme);
 
 /** Callback for subscriber information
  */
-typedef void (* bthf_client_subscriber_info_callback) (const bt_bdaddr_t *bd_addr,
+typedef void (* bthf_client_subscriber_info_callback) (const RawAddress *bd_addr,
                                                        const char *name,
                                                        bthf_client_subscriber_service_type_t type);
 
 /** Callback for in-band ring tone settings
  */
-typedef void (* bthf_client_in_band_ring_tone_callback) (const bt_bdaddr_t *bd_addr,
+typedef void (* bthf_client_in_band_ring_tone_callback) (const RawAddress *bd_addr,
                                                          bthf_client_in_band_ring_state_t state);
 
 /**
  * Callback for requested number from AG
  */
-typedef void (* bthf_client_last_voice_tag_number_callback) (const bt_bdaddr_t *bd_addr,
+typedef void (* bthf_client_last_voice_tag_number_callback) (const RawAddress *bd_addr,
                                                              const char *number);
 
 /**
  * Callback for sending ring indication to app
  */
-typedef void (* bthf_client_ring_indication_callback) (const bt_bdaddr_t *bd_addr);
+typedef void (* bthf_client_ring_indication_callback) (const RawAddress *bd_addr);
 
 /** BT-HF callback structure. */
 typedef struct {
@@ -320,62 +320,62 @@
     bt_status_t (*init)(bthf_client_callbacks_t* callbacks);
 
     /** connect to audio gateway */
-    bt_status_t (*connect)(bt_bdaddr_t *bd_addr);
+    bt_status_t (*connect)(RawAddress *bd_addr);
 
     /** disconnect from audio gateway */
-    bt_status_t (*disconnect)(const bt_bdaddr_t *bd_addr);
+    bt_status_t (*disconnect)(const RawAddress *bd_addr);
 
     /** create an audio connection */
-    bt_status_t (*connect_audio)(const bt_bdaddr_t *bd_addr);
+    bt_status_t (*connect_audio)(const RawAddress *bd_addr);
 
     /** close the audio connection */
-    bt_status_t (*disconnect_audio)(const bt_bdaddr_t *bd_addr);
+    bt_status_t (*disconnect_audio)(const RawAddress *bd_addr);
 
     /** start voice recognition */
-    bt_status_t (*start_voice_recognition)(const bt_bdaddr_t *bd_addr);
+    bt_status_t (*start_voice_recognition)(const RawAddress *bd_addr);
 
     /** stop voice recognition */
-    bt_status_t (*stop_voice_recognition)(const bt_bdaddr_t *bd_addr);
+    bt_status_t (*stop_voice_recognition)(const RawAddress *bd_addr);
 
     /** volume control */
-    bt_status_t (*volume_control) (const bt_bdaddr_t *bd_addr,
+    bt_status_t (*volume_control) (const RawAddress *bd_addr,
                                    bthf_client_volume_type_t type,
                                    int volume);
 
     /** place a call with number a number
      * if number is NULL last called number is called (aka re-dial)*/
-    bt_status_t (*dial) (const bt_bdaddr_t *bd_addr, const char *number);
+    bt_status_t (*dial) (const RawAddress *bd_addr, const char *number);
 
     /** place a call with number specified by location (speed dial) */
-    bt_status_t (*dial_memory) (const bt_bdaddr_t *bd_addr, int location);
+    bt_status_t (*dial_memory) (const RawAddress *bd_addr, int location);
 
     /** perform specified call related action
      * idx is limited only for enhanced call control related action
      */
-    bt_status_t (*handle_call_action) (const bt_bdaddr_t *bd_addr,
+    bt_status_t (*handle_call_action) (const RawAddress *bd_addr,
                                        bthf_client_call_action_t action,
                                        int idx);
 
     /** query list of current calls */
-    bt_status_t (*query_current_calls) (const bt_bdaddr_t *bd_addr);
+    bt_status_t (*query_current_calls) (const RawAddress *bd_addr);
 
     /** query name of current selected operator */
-    bt_status_t (*query_current_operator_name) (const bt_bdaddr_t *bd_addr);
+    bt_status_t (*query_current_operator_name) (const RawAddress *bd_addr);
 
     /** Retrieve subscriber information */
-    bt_status_t (*retrieve_subscriber_info) (const bt_bdaddr_t *bd_addr);
+    bt_status_t (*retrieve_subscriber_info) (const RawAddress *bd_addr);
 
     /** Send DTMF code*/
-    bt_status_t (*send_dtmf) (const bt_bdaddr_t *bd_addr, char code);
+    bt_status_t (*send_dtmf) (const RawAddress *bd_addr, char code);
 
     /** Request a phone number from AG corresponding to last voice tag recorded */
-    bt_status_t (*request_last_voice_tag_number) (const bt_bdaddr_t *bd_addr);
+    bt_status_t (*request_last_voice_tag_number) (const RawAddress *bd_addr);
 
     /** Closes the interface. */
     void (*cleanup)(void);
 
     /** Send AT Command. */
-    bt_status_t (*send_at_cmd) (const bt_bdaddr_t *bd_addr, int cmd, int val1, int val2, const char *arg);
+    bt_status_t (*send_at_cmd) (const RawAddress *bd_addr, int cmd, int val1, int val2, const char *arg);
 } bthf_client_interface_t;
 
 __END_DECLS
diff --git a/include/hardware/bt_hh.h b/include/hardware/bt_hh.h
index ece3c11..c39e3e5 100644
--- a/include/hardware/bt_hh.h
+++ b/include/hardware/bt_hh.h
@@ -87,37 +87,37 @@
 /** Callback for connection state change.
  *  state will have one of the values from bthh_connection_state_t
  */
-typedef void (* bthh_connection_state_callback)(bt_bdaddr_t *bd_addr, bthh_connection_state_t state);
+typedef void (* bthh_connection_state_callback)(RawAddress *bd_addr, bthh_connection_state_t state);
 
 /** Callback for vitual unplug api.
  *  the status of the vitual unplug
  */
-typedef void (* bthh_virtual_unplug_callback)(bt_bdaddr_t *bd_addr, bthh_status_t hh_status);
+typedef void (* bthh_virtual_unplug_callback)(RawAddress *bd_addr, bthh_status_t hh_status);
 
 /** Callback for get hid info
  *  hid_info will contain attr_mask, sub_class, app_id, vendor_id, product_id, version, ctry_code, len
  */
-typedef void (* bthh_hid_info_callback)(bt_bdaddr_t *bd_addr, bthh_hid_info_t hid_info);
+typedef void (* bthh_hid_info_callback)(RawAddress *bd_addr, bthh_hid_info_t hid_info);
 
 /** Callback for get protocol api.
  *  the protocol mode is one of the value from bthh_protocol_mode_t
  */
-typedef void (* bthh_protocol_mode_callback)(bt_bdaddr_t *bd_addr, bthh_status_t hh_status, bthh_protocol_mode_t mode);
+typedef void (* bthh_protocol_mode_callback)(RawAddress *bd_addr, bthh_status_t hh_status, bthh_protocol_mode_t mode);
 
 /** Callback for get/set_idle_time api.
  */
-typedef void (* bthh_idle_time_callback)(bt_bdaddr_t *bd_addr, bthh_status_t hh_status, int idle_rate);
+typedef void (* bthh_idle_time_callback)(RawAddress *bd_addr, bthh_status_t hh_status, int idle_rate);
 
 
 /** Callback for get report api.
  *  if staus is ok rpt_data contains the report data
  */
-typedef void (* bthh_get_report_callback)(bt_bdaddr_t *bd_addr, bthh_status_t hh_status, uint8_t* rpt_data, int rpt_size);
+typedef void (* bthh_get_report_callback)(RawAddress *bd_addr, bthh_status_t hh_status, uint8_t* rpt_data, int rpt_size);
 
 /** Callback for set_report/set_protocol api and if error
  *  occurs for get_report/get_protocol api.
  */
-typedef void (* bthh_handshake_callback)(bt_bdaddr_t *bd_addr, bthh_status_t hh_status);
+typedef void (* bthh_handshake_callback)(RawAddress *bd_addr, bthh_status_t hh_status);
 
 
 /** BT-HH callback structure. */
@@ -148,37 +148,37 @@
     bt_status_t (*init)( bthh_callbacks_t* callbacks );
 
     /** connect to hid device */
-    bt_status_t (*connect)( bt_bdaddr_t *bd_addr);
+    bt_status_t (*connect)( RawAddress *bd_addr);
 
     /** dis-connect from hid device */
-    bt_status_t (*disconnect)( bt_bdaddr_t *bd_addr );
+    bt_status_t (*disconnect)( RawAddress *bd_addr );
 
     /** Virtual UnPlug (VUP) the specified HID device */
-    bt_status_t (*virtual_unplug)(bt_bdaddr_t *bd_addr);
+    bt_status_t (*virtual_unplug)(RawAddress *bd_addr);
 
     /** Set the HID device descriptor for the specified HID device. */
-    bt_status_t (*set_info)(bt_bdaddr_t *bd_addr, bthh_hid_info_t hid_info );
+    bt_status_t (*set_info)(RawAddress *bd_addr, bthh_hid_info_t hid_info );
 
     /** Get the HID proto mode. */
-    bt_status_t (*get_protocol) (bt_bdaddr_t *bd_addr, bthh_protocol_mode_t protocolMode);
+    bt_status_t (*get_protocol) (RawAddress *bd_addr, bthh_protocol_mode_t protocolMode);
 
     /** Set the HID proto mode. */
-    bt_status_t (*set_protocol)(bt_bdaddr_t *bd_addr, bthh_protocol_mode_t protocolMode);
+    bt_status_t (*set_protocol)(RawAddress *bd_addr, bthh_protocol_mode_t protocolMode);
 
     /** Get the HID Idle Time */
-    bt_status_t (*get_idle_time)(bt_bdaddr_t *bd_addr);
+    bt_status_t (*get_idle_time)(RawAddress *bd_addr);
 
     /** Set the HID Idle Time */
-    bt_status_t (*set_idle_time)(bt_bdaddr_t *bd_addr, uint8_t idleTime);
+    bt_status_t (*set_idle_time)(RawAddress *bd_addr, uint8_t idleTime);
 
     /** Send a GET_REPORT to HID device. */
-    bt_status_t (*get_report)(bt_bdaddr_t *bd_addr, bthh_report_type_t reportType, uint8_t reportId, int bufferSize);
+    bt_status_t (*get_report)(RawAddress *bd_addr, bthh_report_type_t reportType, uint8_t reportId, int bufferSize);
 
     /** Send a SET_REPORT to HID device. */
-    bt_status_t (*set_report)(bt_bdaddr_t *bd_addr, bthh_report_type_t reportType, char* report);
+    bt_status_t (*set_report)(RawAddress *bd_addr, bthh_report_type_t reportType, char* report);
 
     /** Send data to HID device. */
-    bt_status_t (*send_data)(bt_bdaddr_t *bd_addr, char* data);
+    bt_status_t (*send_data)(RawAddress *bd_addr, char* data);
 
     /** Closes the interface. */
     void  (*cleanup)( void );
diff --git a/include/hardware/bt_hl.h b/include/hardware/bt_hl.h
index bd29e3a..6d909fb 100644
--- a/include/hardware/bt_hl.h
+++ b/include/hardware/bt_hl.h
@@ -78,7 +78,7 @@
  *  state will have one of the values from
  *  bthl_connection_state_t and fd (file descriptor)
  */
-typedef void (* bthl_channel_state_callback)(int app_id, bt_bdaddr_t *bd_addr, int mdep_cfg_index, int channel_id, bthl_channel_state_t state, int fd);
+typedef void (* bthl_channel_state_callback)(int app_id, RawAddress *bd_addr, int mdep_cfg_index, int channel_id, bthl_channel_state_t state, int fd);
 
 /** BT-HL callback structure. */
 typedef struct {
@@ -107,7 +107,7 @@
     bt_status_t (*unregister_application) (int app_id);
 
     /** connect channel */
-    bt_status_t (*connect_channel)(int app_id, bt_bdaddr_t *bd_addr, int mdep_cfg_index, int *channel_id);
+    bt_status_t (*connect_channel)(int app_id, RawAddress *bd_addr, int mdep_cfg_index, int *channel_id);
 
     /** destroy channel */
     bt_status_t (*destroy_channel)(int channel_id);
diff --git a/include/hardware/bt_mce.h b/include/hardware/bt_mce.h
index 5d159b3..406a26a 100644
--- a/include/hardware/bt_mce.h
+++ b/include/hardware/bt_mce.h
@@ -29,7 +29,7 @@
 } btmce_mas_instance_t;
 
 /** callback for get_remote_mas_instances */
-typedef void (*btmce_remote_mas_instances_callback)(bt_status_t status, bt_bdaddr_t *bd_addr,
+typedef void (*btmce_remote_mas_instances_callback)(bt_status_t status, RawAddress *bd_addr,
                                                     int num_instances, btmce_mas_instance_t *instances);
 
 typedef struct {
@@ -46,7 +46,7 @@
     bt_status_t (*init)(btmce_callbacks_t *callbacks);
 
     /** search for MAS instances on remote device */
-    bt_status_t (*get_remote_mas_instances)(bt_bdaddr_t *bd_addr);
+    bt_status_t (*get_remote_mas_instances)(RawAddress *bd_addr);
 } btmce_interface_t;
 
 __END_DECLS
diff --git a/include/hardware/bt_pan.h b/include/hardware/bt_pan.h
index 83e7949..2f2e2e5 100644
--- a/include/hardware/bt_pan.h
+++ b/include/hardware/bt_pan.h
@@ -39,7 +39,7 @@
 * Callback for pan connection state
 */
 typedef void (*btpan_connection_state_callback)(btpan_connection_state_t state, bt_status_t error,
-                                                const bt_bdaddr_t *bd_addr, int local_role, int remote_role);
+                                                const RawAddress *bd_addr, int local_role, int remote_role);
 typedef void (*btpan_control_state_callback)(btpan_control_state_t state, int local_role,
                                             bt_status_t error, const char* ifname);
 
@@ -69,11 +69,11 @@
      * start bluetooth pan connection to the remote device by specified pan role. The result state will be
      * returned by btpan_connection_state_callback
      */
-    bt_status_t (*connect)(const bt_bdaddr_t *bd_addr, int local_role, int remote_role);
+    bt_status_t (*connect)(const RawAddress *bd_addr, int local_role, int remote_role);
     /**
      * stop bluetooth pan connection. The result state will be returned by btpan_connection_state_callback
      */
-    bt_status_t (*disconnect)(const bt_bdaddr_t *bd_addr);
+    bt_status_t (*disconnect)(const RawAddress *bd_addr);
 
     /**
      * Cleanup the pan interface
diff --git a/include/hardware/bt_rc.h b/include/hardware/bt_rc.h
index ee99d91..93fb32f 100644
--- a/include/hardware/bt_rc.h
+++ b/include/hardware/bt_rc.h
@@ -287,98 +287,98 @@
 } btrc_br_folder_name_t;
 
 /** Callback for the controller's supported feautres */
-typedef void (* btrc_remote_features_callback)(bt_bdaddr_t *bd_addr,
+typedef void (* btrc_remote_features_callback)(RawAddress *bd_addr,
                                                       btrc_remote_features_t features);
 
 /** Callback for play status request */
-typedef void (* btrc_get_play_status_callback)(bt_bdaddr_t *bd_addr);
+typedef void (* btrc_get_play_status_callback)(RawAddress *bd_addr);
 
 /** Callback for list player application attributes (Shuffle, Repeat,...) */
-typedef void (* btrc_list_player_app_attr_callback)(bt_bdaddr_t *bd_addr);
+typedef void (* btrc_list_player_app_attr_callback)(RawAddress *bd_addr);
 
 /** Callback for list player application attributes (Shuffle, Repeat,...) */
 typedef void (* btrc_list_player_app_values_callback)(btrc_player_attr_t attr_id,
-    bt_bdaddr_t *bd_addr);
+    RawAddress *bd_addr);
 
 /** Callback for getting the current player application settings value
 **  num_attr: specifies the number of attribute ids contained in p_attrs
 */
 typedef void (* btrc_get_player_app_value_callback) (uint8_t num_attr,
-    btrc_player_attr_t *p_attrs, bt_bdaddr_t *bd_addr);
+    btrc_player_attr_t *p_attrs, RawAddress *bd_addr);
 
 /** Callback for getting the player application settings attributes' text
 **  num_attr: specifies the number of attribute ids contained in p_attrs
 */
 typedef void (* btrc_get_player_app_attrs_text_callback) (uint8_t num_attr,
-    btrc_player_attr_t *p_attrs, bt_bdaddr_t *bd_addr);
+    btrc_player_attr_t *p_attrs, RawAddress *bd_addr);
 
 /** Callback for getting the player application settings values' text
 **  num_attr: specifies the number of value ids contained in p_vals
 */
 typedef void (* btrc_get_player_app_values_text_callback) (uint8_t attr_id, uint8_t num_val,
-    uint8_t *p_vals, bt_bdaddr_t *bd_addr);
+    uint8_t *p_vals, RawAddress *bd_addr);
 
 /** Callback for setting the player application settings values */
 typedef void (* btrc_set_player_app_value_callback) (btrc_player_settings_t *p_vals,
-    bt_bdaddr_t *bd_addr);
+    RawAddress *bd_addr);
 
 /** Callback to fetch the get element attributes of the current song
 **  num_attr: specifies the number of attributes requested in p_attrs
 */
 typedef void (* btrc_get_element_attr_callback) (uint8_t num_attr, btrc_media_attr_t *p_attrs,
-    bt_bdaddr_t *bd_addr);
+    RawAddress *bd_addr);
 
 /** Callback for register notification (Play state change/track change/...)
 **  param: Is only valid if event_id is BTRC_EVT_PLAY_POS_CHANGED
 */
 typedef void (* btrc_register_notification_callback) (btrc_event_id_t event_id, uint32_t param,
-    bt_bdaddr_t *bd_addr);
+    RawAddress *bd_addr);
 
 /* AVRCP 1.4 Enhancements */
 /** Callback for volume change on CT
 **  volume: Current volume setting on the CT (0-127)
 */
-typedef void (* btrc_volume_change_callback) (uint8_t volume, uint8_t ctype, bt_bdaddr_t *bd_addr);
+typedef void (* btrc_volume_change_callback) (uint8_t volume, uint8_t ctype, RawAddress *bd_addr);
 
 /** Callback for passthrough commands */
-typedef void (* btrc_passthrough_cmd_callback) (int id, int key_state, bt_bdaddr_t *bd_addr);
+typedef void (* btrc_passthrough_cmd_callback) (int id, int key_state, RawAddress *bd_addr);
 
 /** Callback for set addressed player response on TG **/
-typedef void (* btrc_set_addressed_player_callback) (uint16_t player_id, bt_bdaddr_t *bd_addr);
+typedef void (* btrc_set_addressed_player_callback) (uint16_t player_id, RawAddress *bd_addr);
 
 /** Callback for set browsed player response on TG **/
-typedef void (* btrc_set_browsed_player_callback) (uint16_t player_id, bt_bdaddr_t *bd_addr);
+typedef void (* btrc_set_browsed_player_callback) (uint16_t player_id, RawAddress *bd_addr);
 
 /** Callback for get folder items on TG
 **  num_attr: specifies the number of attributes requested in p_attr_ids
 */
 typedef void (* btrc_get_folder_items_callback) (uint8_t scope, uint32_t start_item,
-              uint32_t end_item, uint8_t num_attr, uint32_t *p_attr_ids, bt_bdaddr_t *bd_addr);
+              uint32_t end_item, uint8_t num_attr, uint32_t *p_attr_ids, RawAddress *bd_addr);
 
 /** Callback for changing browsed path on TG **/
 typedef void (* btrc_change_path_callback) (uint8_t direction,
-                uint8_t* folder_uid, bt_bdaddr_t *bd_addr);
+                uint8_t* folder_uid, RawAddress *bd_addr);
 
 /** Callback to fetch the get item attributes of the media item
 **  num_attr: specifies the number of attributes requested in p_attrs
 */
 typedef void (* btrc_get_item_attr_callback) (uint8_t scope, uint8_t* uid, uint16_t uid_counter,
-                uint8_t num_attr, btrc_media_attr_t *p_attrs, bt_bdaddr_t *bd_addr);
+                uint8_t num_attr, btrc_media_attr_t *p_attrs, RawAddress *bd_addr);
 
 /** Callback for play request for the media item indicated by an identifier */
 typedef void (* btrc_play_item_callback) (uint8_t scope,
-                uint16_t uid_counter, uint8_t* uid, bt_bdaddr_t *bd_addr);
+                uint16_t uid_counter, uint8_t* uid, RawAddress *bd_addr);
 
 /** Callback to fetch total number of items from a folder **/
-typedef void (* btrc_get_total_num_of_items_callback) (uint8_t scope, bt_bdaddr_t *bd_addr);
+typedef void (* btrc_get_total_num_of_items_callback) (uint8_t scope, RawAddress *bd_addr);
 
 /** Callback for conducting recursive search on a current browsed path for a specified string */
 typedef void (* btrc_search_callback) (uint16_t charset_id,
-                uint16_t str_len, uint8_t* p_str, bt_bdaddr_t *bd_addr);
+                uint16_t str_len, uint8_t* p_str, RawAddress *bd_addr);
 
 /** Callback to add a specified media item indicated by an identifier to now playing queue. */
 typedef void (* btrc_add_to_now_playing_callback) (uint8_t scope,
-                uint8_t* uid, uint16_t  uid_counter, bt_bdaddr_t *bd_addr);
+                uint8_t* uid, uint16_t  uid_counter, RawAddress *bd_addr);
 
 /** BT-RC Target callback structure. */
 typedef struct {
@@ -422,45 +422,45 @@
     **  2. Song duration/length
     **  3. Song position
     */
-    bt_status_t (*get_play_status_rsp)( bt_bdaddr_t *bd_addr, btrc_play_status_t play_status,
+    bt_status_t (*get_play_status_rsp)( RawAddress *bd_addr, btrc_play_status_t play_status,
         uint32_t song_len, uint32_t song_pos);
 
     /** Lists the support player application attributes (Shuffle/Repeat/...)
     **  num_attr: Specifies the number of attributes contained in the pointer p_attrs
     */
-    bt_status_t (*list_player_app_attr_rsp)( bt_bdaddr_t *bd_addr, int num_attr,
+    bt_status_t (*list_player_app_attr_rsp)( RawAddress *bd_addr, int num_attr,
         btrc_player_attr_t *p_attrs);
 
     /** Lists the support player application attributes (Shuffle Off/On/Group)
     **  num_val: Specifies the number of values contained in the pointer p_vals
     */
-    bt_status_t (*list_player_app_value_rsp)( bt_bdaddr_t *bd_addr, int num_val, uint8_t *p_vals);
+    bt_status_t (*list_player_app_value_rsp)( RawAddress *bd_addr, int num_val, uint8_t *p_vals);
 
     /** Returns the current application attribute values for each of the specified attr_id */
-    bt_status_t (*get_player_app_value_rsp)( bt_bdaddr_t *bd_addr, btrc_player_settings_t *p_vals);
+    bt_status_t (*get_player_app_value_rsp)( RawAddress *bd_addr, btrc_player_settings_t *p_vals);
 
     /** Returns the application attributes text ("Shuffle"/"Repeat"/...)
     **  num_attr: Specifies the number of attributes' text contained in the pointer p_attrs
     */
-    bt_status_t (*get_player_app_attr_text_rsp)( bt_bdaddr_t *bd_addr, int num_attr,
+    bt_status_t (*get_player_app_attr_text_rsp)( RawAddress *bd_addr, int num_attr,
         btrc_player_setting_text_t *p_attrs);
 
     /** Returns the application attributes text ("Shuffle"/"Repeat"/...)
     **  num_attr: Specifies the number of attribute values' text contained in the pointer p_vals
     */
-    bt_status_t (*get_player_app_value_text_rsp)( bt_bdaddr_t *bd_addr, int num_val,
+    bt_status_t (*get_player_app_value_text_rsp)( RawAddress *bd_addr, int num_val,
         btrc_player_setting_text_t *p_vals);
 
     /** Returns the current songs' element attributes text ("Title"/"Album"/"Artist")
     **  num_attr: Specifies the number of attributes' text contained in the pointer p_attrs
     */
-    bt_status_t (*get_element_attr_rsp)( bt_bdaddr_t *bd_addr, uint8_t num_attr,
+    bt_status_t (*get_element_attr_rsp)( RawAddress *bd_addr, uint8_t num_attr,
         btrc_element_attr_val_t *p_attrs);
 
     /** Response to set player attribute request ("Shuffle"/"Repeat")
     **  rsp_status: Status of setting the player attributes for the current media player
     */
-    bt_status_t (*set_player_app_value_rsp)(bt_bdaddr_t *bd_addr, btrc_status_t rsp_status);
+    bt_status_t (*set_player_app_value_rsp)(RawAddress *bd_addr, btrc_status_t rsp_status);
 
     /* Response to the register notification request (Play state change/track change/...).
     ** event_id: Refers to the event_id this notification change corresponds too
@@ -481,89 +481,89 @@
     bt_status_t (*set_volume)(uint8_t volume);
 
     /* Set addressed player response from TG to CT */
-    bt_status_t (*set_addressed_player_rsp)(bt_bdaddr_t *bd_addr, btrc_status_t rsp_status);
+    bt_status_t (*set_addressed_player_rsp)(RawAddress *bd_addr, btrc_status_t rsp_status);
 
     /* Set browsed player response from TG to CT */
-    bt_status_t (*set_browsed_player_rsp)(bt_bdaddr_t *bd_addr, btrc_status_t rsp_status,
+    bt_status_t (*set_browsed_player_rsp)(RawAddress *bd_addr, btrc_status_t rsp_status,
         uint32_t num_items, uint16_t charset_id, uint8_t folder_depth,
         btrc_br_folder_name_t *p_folders);
 
     /* Get folder item list response from TG to CT */
-     bt_status_t (*get_folder_items_list_rsp)(bt_bdaddr_t *bd_addr, btrc_status_t rsp_status,
+     bt_status_t (*get_folder_items_list_rsp)(RawAddress *bd_addr, btrc_status_t rsp_status,
         uint16_t uid_counter, uint8_t num_items, btrc_folder_items_t *p_items);
 
     /* Change path response from TG to CT */
-    bt_status_t (*change_path_rsp)(bt_bdaddr_t *bd_addr, btrc_status_t rsp_status,
+    bt_status_t (*change_path_rsp)(RawAddress *bd_addr, btrc_status_t rsp_status,
         uint32_t num_items);
 
     /** Returns the element's attributes num_attr: Specifies the number of attributes' text
      * contained in the pointer p_attrs
      */
-    bt_status_t (*get_item_attr_rsp)(bt_bdaddr_t *bd_addr, btrc_status_t rsp_status,
+    bt_status_t (*get_item_attr_rsp)(RawAddress *bd_addr, btrc_status_t rsp_status,
         uint8_t num_attr, btrc_element_attr_val_t *p_attrs);
 
     /* play media item response from TG to CT */
-    bt_status_t (*play_item_rsp)(bt_bdaddr_t *bd_addr, btrc_status_t rsp_status);
+    bt_status_t (*play_item_rsp)(RawAddress *bd_addr, btrc_status_t rsp_status);
 
     /* get total number of items response from TG to CT*/
-    bt_status_t (*get_total_num_of_items_rsp)(bt_bdaddr_t *bd_addr, btrc_status_t rsp_status,
+    bt_status_t (*get_total_num_of_items_rsp)(RawAddress *bd_addr, btrc_status_t rsp_status,
         uint32_t uid_counter, uint32_t num_items);
 
     /* Search VFS response from TG to CT */
-    bt_status_t (*search_rsp)(bt_bdaddr_t *bd_addr, btrc_status_t rsp_status, uint32_t uid_counter,
+    bt_status_t (*search_rsp)(RawAddress *bd_addr, btrc_status_t rsp_status, uint32_t uid_counter,
         uint32_t num_items);
 
     /* add_to_now playing list response from TG to CT */
-    bt_status_t (*add_to_now_playing_rsp)(bt_bdaddr_t *bd_addr, btrc_status_t rsp_status);
+    bt_status_t (*add_to_now_playing_rsp)(RawAddress *bd_addr, btrc_status_t rsp_status);
 
     /** Closes the interface. */
     void  (*cleanup)( void );
 } btrc_interface_t;
 
-typedef void (* btrc_passthrough_rsp_callback) (bt_bdaddr_t *bd_addr, int id, int key_state);
+typedef void (* btrc_passthrough_rsp_callback) (RawAddress *bd_addr, int id, int key_state);
 
 typedef void (* btrc_groupnavigation_rsp_callback) (int id, int key_state);
 
 typedef void (* btrc_connection_state_callback) (
-    bool rc_connect, bool bt_connect, bt_bdaddr_t *bd_addr);
+    bool rc_connect, bool bt_connect, RawAddress *bd_addr);
 
-typedef void (* btrc_ctrl_getrcfeatures_callback) (bt_bdaddr_t *bd_addr, int features);
+typedef void (* btrc_ctrl_getrcfeatures_callback) (RawAddress *bd_addr, int features);
 
-typedef void (* btrc_ctrl_setabsvol_cmd_callback) (bt_bdaddr_t *bd_addr, uint8_t abs_vol, uint8_t label);
+typedef void (* btrc_ctrl_setabsvol_cmd_callback) (RawAddress *bd_addr, uint8_t abs_vol, uint8_t label);
 
-typedef void (* btrc_ctrl_registernotification_abs_vol_callback) (bt_bdaddr_t *bd_addr, uint8_t label);
+typedef void (* btrc_ctrl_registernotification_abs_vol_callback) (RawAddress *bd_addr, uint8_t label);
 
-typedef void (* btrc_ctrl_setplayerapplicationsetting_rsp_callback) (bt_bdaddr_t *bd_addr,
+typedef void (* btrc_ctrl_setplayerapplicationsetting_rsp_callback) (RawAddress *bd_addr,
                                                                           uint8_t accepted);
 
-typedef void (* btrc_ctrl_playerapplicationsetting_callback)(bt_bdaddr_t *bd_addr,
+typedef void (* btrc_ctrl_playerapplicationsetting_callback)(RawAddress *bd_addr,
                                                                  uint8_t num_attr,
                                                                  btrc_player_app_attr_t *app_attrs,
                                                                  uint8_t num_ext_attr,
                                                                  btrc_player_app_ext_attr_t *ext_attrs);
 
-typedef void (* btrc_ctrl_playerapplicationsetting_changed_callback)(bt_bdaddr_t *bd_addr,
+typedef void (* btrc_ctrl_playerapplicationsetting_changed_callback)(RawAddress *bd_addr,
                                                                           btrc_player_settings_t *p_vals);
 
-typedef void (* btrc_ctrl_track_changed_callback)(bt_bdaddr_t *bd_addr, uint8_t num_attr,
+typedef void (* btrc_ctrl_track_changed_callback)(RawAddress *bd_addr, uint8_t num_attr,
                                                      btrc_element_attr_val_t *p_attrs);
 
-typedef void (* btrc_ctrl_play_position_changed_callback)(bt_bdaddr_t *bd_addr,
+typedef void (* btrc_ctrl_play_position_changed_callback)(RawAddress *bd_addr,
                                                               uint32_t song_len, uint32_t song_pos);
 
-typedef void (* btrc_ctrl_play_status_changed_callback)(bt_bdaddr_t *bd_addr,
+typedef void (* btrc_ctrl_play_status_changed_callback)(RawAddress *bd_addr,
                                                             btrc_play_status_t play_status);
 
-typedef void (* btrc_ctrl_get_folder_items_callback )(bt_bdaddr_t *bd_addr,
+typedef void (* btrc_ctrl_get_folder_items_callback )(RawAddress *bd_addr,
                                                             btrc_status_t status,
                                                             const btrc_folder_items_t *folder_items,
                                                             uint8_t count);
 
-typedef void (* btrc_ctrl_change_path_callback)(bt_bdaddr_t *bd_addr, uint8_t count);
+typedef void (* btrc_ctrl_change_path_callback)(RawAddress *bd_addr, uint8_t count);
 
 typedef void (* btrc_ctrl_set_browsed_player_callback )(
-    bt_bdaddr_t *bd_addr, uint8_t num_items, uint8_t depth);
-typedef void (* btrc_ctrl_set_addressed_player_callback)(bt_bdaddr_t *bd_addr, uint8_t status);
+    RawAddress *bd_addr, uint8_t num_items, uint8_t depth);
+typedef void (* btrc_ctrl_set_addressed_player_callback)(RawAddress *bd_addr, uint8_t status);
 /** BT-RC Controller callback structure. */
 typedef struct {
     /** set to sizeof(BtRcCallbacks) */
@@ -597,47 +597,47 @@
     bt_status_t (*init)( btrc_ctrl_callbacks_t* callbacks );
 
     /** send pass through command to target */
-    bt_status_t (*send_pass_through_cmd) (bt_bdaddr_t *bd_addr, uint8_t key_code,
+    bt_status_t (*send_pass_through_cmd) (RawAddress *bd_addr, uint8_t key_code,
             uint8_t key_state );
 
     /** send group navigation command to target */
-    bt_status_t (*send_group_navigation_cmd) (bt_bdaddr_t *bd_addr, uint8_t key_code,
+    bt_status_t (*send_group_navigation_cmd) (RawAddress *bd_addr, uint8_t key_code,
             uint8_t key_state );
 
     /** send command to set player applicaiton setting attributes to target */
-    bt_status_t (*set_player_app_setting_cmd) (bt_bdaddr_t *bd_addr, uint8_t num_attrib,
+    bt_status_t (*set_player_app_setting_cmd) (RawAddress *bd_addr, uint8_t num_attrib,
             uint8_t* attrib_ids, uint8_t* attrib_vals);
 
     /** send command to play a particular item */
     bt_status_t (*play_item_cmd) (
-        bt_bdaddr_t *bd_addr, uint8_t scope, uint8_t *uid, uint16_t uid_counter);
+        RawAddress *bd_addr, uint8_t scope, uint8_t *uid, uint16_t uid_counter);
 
     /** get the playback state */
-    bt_status_t (*get_playback_state_cmd) (bt_bdaddr_t *bd_addr);
+    bt_status_t (*get_playback_state_cmd) (RawAddress *bd_addr);
 
     /** get the now playing list */
-    bt_status_t (*get_now_playing_list_cmd) (bt_bdaddr_t *bd_addr, uint8_t start, uint8_t items);
+    bt_status_t (*get_now_playing_list_cmd) (RawAddress *bd_addr, uint8_t start, uint8_t items);
 
     /** get the folder list */
-    bt_status_t (*get_folder_list_cmd) (bt_bdaddr_t *bd_addr, uint8_t start, uint8_t items);
+    bt_status_t (*get_folder_list_cmd) (RawAddress *bd_addr, uint8_t start, uint8_t items);
 
     /** get the folder list */
-    bt_status_t (*get_player_list_cmd) (bt_bdaddr_t *bd_addr, uint8_t start, uint8_t items);
+    bt_status_t (*get_player_list_cmd) (RawAddress *bd_addr, uint8_t start, uint8_t items);
 
     /** get the folder list */
-    bt_status_t (*change_folder_path_cmd) (bt_bdaddr_t *bd_addr, uint8_t direction, uint8_t * uid);
+    bt_status_t (*change_folder_path_cmd) (RawAddress *bd_addr, uint8_t direction, uint8_t * uid);
 
     /** set browsed player */
-    bt_status_t (*set_browsed_player_cmd) (bt_bdaddr_t *bd_addr, uint16_t player_id);
+    bt_status_t (*set_browsed_player_cmd) (RawAddress *bd_addr, uint16_t player_id);
 
     /** set addressed player */
-    bt_status_t (*set_addressed_player_cmd) (bt_bdaddr_t *bd_addr, uint16_t player_id);
+    bt_status_t (*set_addressed_player_cmd) (RawAddress *bd_addr, uint16_t player_id);
 
     /** send rsp to set_abs_vol received from target */
-    bt_status_t (*set_volume_rsp) (bt_bdaddr_t *bd_addr, uint8_t abs_vol, uint8_t label);
+    bt_status_t (*set_volume_rsp) (RawAddress *bd_addr, uint8_t abs_vol, uint8_t label);
 
     /** send notificaiton rsp for abs vol to target */
-    bt_status_t (*register_abs_vol_rsp) (bt_bdaddr_t *bd_addr, btrc_notification_type_t rsp_type,
+    bt_status_t (*register_abs_vol_rsp) (RawAddress *bd_addr, btrc_notification_type_t rsp_type,
             uint8_t abs_vol, uint8_t label);
 
     /** Closes the interface. */
diff --git a/include/hardware/bt_sdp.h b/include/hardware/bt_sdp.h
index 8f39bc5..76cb579 100644
--- a/include/hardware/bt_sdp.h
+++ b/include/hardware/bt_sdp.h
@@ -109,7 +109,7 @@
 
 
 /** Callback for SDP search */
-typedef void (*btsdp_search_callback)(bt_status_t status, bt_bdaddr_t *bd_addr, uint8_t* uuid, int num_records, bluetooth_sdp_record *records);
+typedef void (*btsdp_search_callback)(bt_status_t status, RawAddress *bd_addr, uint8_t* uuid, int num_records, bluetooth_sdp_record *records);
 
 typedef struct {
     /** Set to sizeof(btsdp_callbacks_t) */
@@ -128,7 +128,7 @@
     bt_status_t (*deinit)();
 
     /** Search for SDP records with specific uuid on remote device */
-    bt_status_t (*sdp_search)(bt_bdaddr_t *bd_addr,  const uint8_t* uuid);
+    bt_status_t (*sdp_search)(RawAddress *bd_addr,  const uint8_t* uuid);
 
     /**
      * Use listen in the socket interface to create rfcomm and/or l2cap PSM channels,
diff --git a/include/hardware/bt_sock.h b/include/hardware/bt_sock.h
index 8d1a9e0..4c098f1 100644
--- a/include/hardware/bt_sock.h
+++ b/include/hardware/bt_sock.h
@@ -33,7 +33,7 @@
 /** Represents the standard BT SOCKET interface. */
 typedef struct {
     short size;
-    bt_bdaddr_t bd_addr;
+    RawAddress bd_addr;
     int channel;
     int status;
 
@@ -68,7 +68,7 @@
      * The callingUid is the UID of the application which is requesting the socket. This is
      * used for traffic accounting purposes.
      */
-    bt_status_t (*connect)(const bt_bdaddr_t *bd_addr, btsock_type_t type, const uint8_t* uuid,
+    bt_status_t (*connect)(const RawAddress *bd_addr, btsock_type_t type, const uint8_t* uuid,
             int channel, int* sock_fd, int flags, int callingUid);
 } btsock_interface_t;
 
diff --git a/modules/radio/radio_hw.c b/modules/radio/radio_hw.c
index 29204df..93b8c88 100644
--- a/modules/radio/radio_hw.c
+++ b/modules/radio/radio_hw.c
@@ -114,8 +114,19 @@
     CMD_CANCEL,
     CMD_METADATA,
     CMD_ANNOUNCEMENTS,
+    CMD_NUM
 } thread_cmd_type_t;
 
+uint32_t thread_cmd_delay_ms[CMD_NUM] = {
+    [CMD_EXIT]          = 0,
+    [CMD_CONFIG]        = 50,
+    [CMD_STEP]          = 100,
+    [CMD_SCAN]          = 200,
+    [CMD_TUNE]          = 150,
+    [CMD_CANCEL]        = 0,
+    [CMD_METADATA]      = 1000,
+    [CMD_ANNOUNCEMENTS] = 1000
+};
 struct thread_command {
     struct listnode node;
     thread_cmd_type_t type;
@@ -401,7 +412,7 @@
                                                 (tuner->config.spacings[0] * 5)) % 2;
 
                     if (tuner->program.tuned) {
-                        send_command_l(tuner, CMD_ANNOUNCEMENTS, 1000, NULL);
+                        send_command_l(tuner, CMD_ANNOUNCEMENTS, thread_cmd_delay_ms[CMD_ANNOUNCEMENTS], NULL);
                     }
                     tuner->program.signal_strength = 100;
                     if (tuner->config.type == RADIO_BAND_FM)
@@ -481,7 +492,7 @@
                     free(cmd);
                 }
             }
-            send_command_l(tuner, CMD_METADATA, 1000, NULL);
+            send_command_l(tuner, CMD_METADATA, thread_cmd_delay_ms[CMD_METADATA], NULL);
         }
     }
 
@@ -510,8 +521,8 @@
         status = -EINVAL;
         goto exit;
     }
-    send_command_l(stub_tuner, CMD_CANCEL, 0, NULL);
-    send_command_l(stub_tuner, CMD_CONFIG, 500, (void *)config);
+    send_command_l(stub_tuner, CMD_CANCEL, thread_cmd_delay_ms[CMD_CANCEL], NULL);
+    send_command_l(stub_tuner, CMD_CONFIG, thread_cmd_delay_ms[CMD_CONFIG], (void *)config);
 
 exit:
     pthread_mutex_unlock(&stub_tuner->lock);
@@ -556,7 +567,7 @@
           __func__, stub_tuner, direction, skip_sub_channel);
 
     pthread_mutex_lock(&stub_tuner->lock);
-    send_command_l(stub_tuner, CMD_STEP, 20, &direction);
+    send_command_l(stub_tuner, CMD_STEP, thread_cmd_delay_ms[CMD_STEP], &direction);
     pthread_mutex_unlock(&stub_tuner->lock);
     return 0;
 }
@@ -570,7 +581,7 @@
           __func__, stub_tuner, direction, skip_sub_channel);
 
     pthread_mutex_lock(&stub_tuner->lock);
-    send_command_l(stub_tuner, CMD_SCAN, 200, &direction);
+    send_command_l(stub_tuner, CMD_SCAN, thread_cmd_delay_ms[CMD_SCAN], &direction);
     pthread_mutex_unlock(&stub_tuner->lock);
     return 0;
 }
@@ -589,7 +600,7 @@
         ALOGI("%s channel out of range", __func__);
         return -EINVAL;
     }
-    send_command_l(stub_tuner, CMD_TUNE, 100, &channel);
+    send_command_l(stub_tuner, CMD_TUNE, thread_cmd_delay_ms[CMD_TUNE], &channel);
     pthread_mutex_unlock(&stub_tuner->lock);
     return 0;
 }
@@ -601,7 +612,7 @@
     ALOGI("%s stub_tuner %p", __func__, stub_tuner);
 
     pthread_mutex_lock(&stub_tuner->lock);
-    send_command_l(stub_tuner, CMD_CANCEL, 0, NULL);
+    send_command_l(stub_tuner, CMD_CANCEL, thread_cmd_delay_ms[CMD_CANCEL], NULL);
     pthread_mutex_unlock(&stub_tuner->lock);
     return 0;
 }
@@ -696,7 +707,7 @@
     list_init(&rdev->tuner->command_list);
 
     pthread_mutex_lock(&rdev->tuner->lock);
-    send_command_l(rdev->tuner, CMD_CONFIG, 500, (void *)config);
+    send_command_l(rdev->tuner, CMD_CONFIG, thread_cmd_delay_ms[CMD_CONFIG], (void *)config);
     pthread_mutex_unlock(&rdev->tuner->lock);
 
     *tuner = &rdev->tuner->interface;
@@ -724,7 +735,7 @@
 
     pthread_mutex_lock(&stub_tuner->lock);
     stub_tuner->callback = NULL;
-    send_command_l(stub_tuner, CMD_EXIT, 0, NULL);
+    send_command_l(stub_tuner, CMD_EXIT, thread_cmd_delay_ms[CMD_EXIT], NULL);
     pthread_mutex_unlock(&stub_tuner->lock);
     pthread_join(stub_tuner->callback_thread, (void **) NULL);
 
