2016-01-21 11:51:34

by Hsin-Yu Chao

[permalink] [raw]
Subject: [PATCH] audio/avrcp: Create avrcp_player for feature category 2

There are bluetooth speaker support AVRCP feature category 2 but
not category 1, for example: UE mini boom. Create the avrcp_player
for these peripherals so that absolute volume command/event can
work with registered media player app.

Signed-off-by: Hsin-Yu Chao <[email protected]>
---
profiles/audio/avrcp.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/profiles/audio/avrcp.c b/profiles/audio/avrcp.c
index 9187692..d2570f3 100644
--- a/profiles/audio/avrcp.c
+++ b/profiles/audio/avrcp.c
@@ -3843,7 +3843,8 @@ static void controller_init(struct avrcp *session)
btd_service_connecting_complete(service, 0);

/* Only create player if category 1 is supported */
- if (!(controller->features & AVRCP_FEATURE_CATEGORY_1))
+ if (!(controller->features &
+ (AVRCP_FEATURE_CATEGORY_1 | AVRCP_FEATURE_CATEGORY_2)))
return;

player = create_ct_player(session, 0);
--
2.1.2