diff --git a/android/tester-main.c b/android/tester-main.c
index a9ccfcd..7d17470 100644
--- a/android/tester-main.c
+++ b/android/tester-main.c
close(signal_fd[0]);
+ err = hw_get_module_by_class(AUDIO_HARDWARE_MODULE_ID,
+ AUDIO_HARDWARE_MODULE_ID_A2DP, &module);
+ if (err)
+ return false;
+
+ err = audio_hw_device_open(module, &data->audio);
+ if (err)
+ return false;
+
err = hw_get_module(BT_HARDWARE_MODULE_ID, &module);
if (err)
return false;
if (!(data->steps = queue_new()))
return false;
-
return true;
}
}
data->device->close(data->device);
+ audio_hw_device_close(data->audio);
if (!data->bluetoothd_pid)
tester_teardown_complete();
diff --git a/android/tester-main.h b/android/tester-main.h
index bdf54b2..ddca69c 100644
--- a/android/tester-main.h
+++ b/android/tester-main.h
#include "src/shared/queue.h"
#include <hardware/hardware.h>
+#include <hardware/audio.h>
#include <hardware/bluetooth.h>
#include <hardware/bt_sock.h>
#include <hardware/bt_hh.h>
struct test_data {
struct mgmt *mgmt;
+ audio_hw_device_t *audio;
struct hw_device_t *device;
struct hciemu *hciemu;
enum hciemu_type hciemu_type;