@@ -3275,6 +3275,7 @@ static int a2dp_source_server_probe(struct btd_profile *p,
{
struct a2dp_server *server;
+ media_register(adapter);
DBG("path %s", adapter_get_path(adapter));
server = find_server(servers, adapter);
@@ -3315,6 +3316,7 @@ static void a2dp_source_server_remove(struct btd_profile *p,
return;
a2dp_server_unregister(server);
+ media_unregister(adapter);
}
static int a2dp_sink_server_probe(struct btd_profile *p,
@@ -4735,6 +4735,8 @@ static void avrcp_controller_server_remove(struct btd_profile *p,
if (server->tg_record_id == 0)
avrcp_server_unregister(server);
+
+ media_unregister(adapter);
}
static int avrcp_controller_server_probe(struct btd_profile *p,
@@ -4745,6 +4747,7 @@ static int avrcp_controller_server_probe(struct btd_profile *p,
DBG("path %s", adapter_get_path(adapter));
+ media_register(adapter);
server = find_server(servers, adapter);
if (server != NULL)
goto done;