summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBharat Panda <bharat.panda@samsung.com>2015-11-06 16:04:34 +0530
committerBharat Panda <bharat.panda@samsung.com>2015-11-06 16:09:21 +0530
commitd23030cea359cfc286e2c7fc0bcc7eb39a2a21e1 (patch)
treec5386e71823d8ee9b4e0775714b0830d94ce2c06
parent87f3cf01294e7790f92d642f594233e37abd3f91 (diff)
downloadbluez-d23030cea359cfc286e2c7fc0bcc7eb39a2a21e1.tar.gz
bluez-d23030cea359cfc286e2c7fc0bcc7eb39a2a21e1.tar.bz2
bluez-d23030cea359cfc286e2c7fc0bcc7eb39a2a21e1.zip
audio/avrcp: Fixes added for SetAbsoluteVolume
Added event support for SetAbsoluteVolume in TG supported_events. Fix rejecting SetAbsoluteVolume without a player. Repo link: http://git.kernel.org/cgit/bluetooth/bluez.git/commit/?id=d8da70674705a397f287217070f3659c794cf804 http://git.kernel.org/cgit/bluetooth/bluez.git/commit/?id=85b829bdf15be8180465d91b22bd376c3d339f62 Change-Id: I1a532724765480ad449088371bd9c531d7c035bb
-rw-r--r--profiles/audio/avrcp.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/profiles/audio/avrcp.c b/profiles/audio/avrcp.c
index 7ccd3dc4..991c56cb 100644
--- a/profiles/audio/avrcp.c
+++ b/profiles/audio/avrcp.c
@@ -1771,20 +1771,12 @@ static uint8_t avrcp_handle_set_absolute_volume(struct avrcp *session,
struct avrcp_header *pdu,
uint8_t transaction)
{
-#ifndef __TIZEN_PATCH__
- struct avrcp_player *player = session->controller->player;
-#else
- struct avrcp_player *player = target_get_player(session);
-#endif
uint16_t len = ntohs(pdu->params_len);
uint8_t volume;
if (len != 1)
goto err;
- if (!player)
- goto err;
-
volume = pdu->params[0] & 0x7F;
media_transport_update_device_volume(session->dev, volume);
@@ -3611,7 +3603,8 @@ static void target_init(struct avrcp *session)
return;
session->supported_events |=
- (1 << AVRCP_EVENT_AVAILABLE_PLAYERS_CHANGED);
+ (1 << AVRCP_EVENT_AVAILABLE_PLAYERS_CHANGED) |
+ (1 << AVRCP_EVENT_VOLUME_CHANGED);
#ifdef __TIZEN_PATCH__
if (adapter_avrcp_tg_ver < 0x0104)