summaryrefslogtreecommitdiff
path: root/profiles/audio/avrcp.c
diff options
context:
space:
mode:
Diffstat (limited to 'profiles/audio/avrcp.c')
-rw-r--r--profiles/audio/avrcp.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/profiles/audio/avrcp.c b/profiles/audio/avrcp.c
index f9980b37e..136f4a463 100644
--- a/profiles/audio/avrcp.c
+++ b/profiles/audio/avrcp.c
@@ -2790,6 +2790,23 @@ static void avrcp_set_player_value(struct avrcp *session, uint8_t attr,
avrcp_player_value_rsp, session);
}
+static bool ct_get_position(struct media_player *mp, void *user_data)
+{
+ struct avrcp_player *player = user_data;
+ struct avrcp *session;
+
+ session = player->sessions->data;
+ if (session == NULL)
+ return false;
+
+ if (session->controller->version < 0x0103)
+ return false;
+
+ avrcp_get_play_status(session);
+
+ return true;
+}
+
static bool ct_set_setting(struct media_player *mp, const char *key,
const char *value, void *user_data)
{
@@ -3175,6 +3192,7 @@ static int ct_get_total_numberofitems(struct media_player *mp, const char *name,
}
static const struct media_player_callback ct_cbs = {
+ .get_position = ct_get_position,
.set_setting = ct_set_setting,
.play = ct_play,
.pause = ct_pause,