Driver should be probed when adding a reference so that can be released
when the device is temporary using .remove callback. In case of AVDTP as
it is not possible to verify if it is a source or sink it uses the same
uuid used for authorization request which is advance audio uuid.
goto drop;
}
- dev = manager_get_device(&src, &dst, TRUE);
+ dev = manager_get_device(&src, &dst, FALSE);
if (!dev) {
- error("Unable to get audio device object for %s", address);
- goto drop;
+ dev = manager_get_device(&src, &dst, TRUE);
+ if (!dev) {
+ error("Unable to get audio device object for %s",
+ address);
+ goto drop;
+ }
+ btd_device_add_uuid(dev->btd_dev, ADVANCED_AUDIO_UUID);
}
session->io = g_io_channel_ref(chan);
#include "error.h"
#include "uinput.h"
#include "adapter.h"
+#include "../src/device.h"
#include "device.h"
#include "manager.h"
#include "avdtp.h"
goto drop;
}
- if (!dev->control)
- dev->control = control_init(dev, AV_REMOTE_SVCLASS_ID);
+ if (!dev->control) {
+ btd_device_add_uuid(dev->btd_dev, AVRCP_REMOTE_UUID);
+ if (!dev->control)
+ goto drop;
+ }
control = dev->control;