bass: Mark driver as experimental
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Mon, 15 May 2023 20:50:47 +0000 (13:50 -0700)
committerAyush Garg <ayush.garg@samsung.com>
Fri, 5 Jan 2024 10:41:35 +0000 (16:11 +0530)
This uses the btd_profile.experimental to mark the driver as
experimental.

profiles/audio/bass.c

index 9289552..d288090 100644 (file)
@@ -274,18 +274,19 @@ static struct btd_profile bass_service = {
        .device_remove  = bass_remove,
        .accept         = bass_accept,
        .disconnect     = bass_disconnect,
+       .experimental   = true,
 };
 
 static unsigned int bass_id;
 
 static int bass_init(void)
 {
-       if (!(g_dbus_get_flags() & G_DBUS_FLAG_ENABLE_EXPERIMENTAL)) {
-               warn("D-Bus experimental not enabled");
-               return -ENOTSUP;
-       }
+       int err;
+
+       err = btd_profile_register(&bass_service);
+       if (err)
+               return err;
 
-       btd_profile_register(&bass_service);
        bass_id = bt_bass_register(bass_attached, bass_detached, NULL);
 
        return 0;
@@ -293,10 +294,8 @@ static int bass_init(void)
 
 static void bass_exit(void)
 {
-       if (g_dbus_get_flags() & G_DBUS_FLAG_ENABLE_EXPERIMENTAL) {
-               btd_profile_unregister(&bass_service);
-               bt_bass_unregister(bass_id);
-       }
+       btd_profile_unregister(&bass_service);
+       bt_bass_unregister(bass_id);
 }
 
 BLUETOOTH_PLUGIN_DEFINE(bass, VERSION, BLUETOOTH_PLUGIN_PRIORITY_DEFAULT,