[PATCH 3/4] android/client: Add AVRCP_CTRL interface to haltest init

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Adding AVRCP_CTRL interface to haltest interfaces initialization.
if-rc.c has init() for avrcp target, so defined ctrl_init for avrcp
controller target (Reason behind comparing interface name(rc-ctrl)
to get_interface_method).
---
 android/client/haltest.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/android/client/haltest.c b/android/client/haltest.c
index c8cfdc4..2c71124 100644
--- a/android/client/haltest.c
+++ b/android/client/haltest.c
@@ -51,6 +51,7 @@ const struct interface *interfaces[] = {
 #if ANDROID_VERSION >= PLATFORM_VER(5, 0, 0)
 	&hf_client_if,
 	&mce_if,
+	&ctrl_rc_if,
 #endif
 	NULL
 };
@@ -399,6 +400,7 @@ static void init(void)
 #if ANDROID_VERSION >= PLATFORM_VER(5, 0, 0)
 		BT_PROFILE_HANDSFREE_CLIENT_ID,
 		BT_PROFILE_MAP_CLIENT_ID,
+		BT_PROFILE_AV_RC_CTRL_ID,
 #endif
 	};
 	const struct method *m;
@@ -421,7 +423,12 @@ static void init(void)
 
 	/* Init what is available to init */
 	for (i = 2; i < NELEM(interfaces) - 1; ++i) {
-		m = get_interface_method(interfaces[i]->name, "init");
+		if (!strcmp(interfaces[i]->name, "rc-ctrl"))
+			m = get_interface_method(interfaces[i]->name,
+								"ctrl_init");
+		else
+			m = get_interface_method(interfaces[i]->name, "init");
+
 		if (m != NULL)
 			m->func(2, argv);
 	}
-- 
2.1.0

--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux