diff --git a/android/Android.mk b/android/Android.mk
index aefe41c..bfdf03f 100644
--- a/android/Android.mk
+++ b/android/Android.mk
include $(CLEAR_VARS)
-LOCAL_SRC_FILES := bluez/android/hal-sco.c
+LOCAL_SRC_FILES := bluez/android/hal-sco.c \
+ bluez/android/hal-utils.c
LOCAL_C_INCLUDES = \
$(call include-path-for, system-core) \
diff --git a/android/hal-sco.c b/android/hal-sco.c
index c5b86b0..e84dae0 100644
--- a/android/hal-sco.c
+++ b/android/hal-sco.c
struct resampler_itfe *resampler;
int16_t *resample_buf;
uint32_t resample_frame_num;
+
+ bt_bdaddr_t bd_addr;
};
static void sco_close_socket(void)
out->stream.write = out_write;
out->stream.get_render_position = out_get_render_position;
+#if ANDROID_VERSION >= PLATFORM_VER(5, 0, 0)
+ if (address) {
+ DBG("address %s", address);
+
+ str2bt_bdaddr_t(address, &out->bd_addr);
+ }
+#endif
+
if (config) {
DBG("config: rate %u chan mask %x format %d offload %p",
config->sample_rate, config->channel_mask,