diff options
author | Johan Hedberg <johan.hedberg@nokia.com> | 2008-01-16 14:44:20 +0000 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@nokia.com> | 2008-01-16 14:44:20 +0000 |
commit | 68fdcb7d84d0d700f10ca3be42f9c7e51cfca932 (patch) | |
tree | 4daf69c86fd3f9e65d56856b152695000a4d11b8 /audio | |
parent | 3eb854122f31b55fc4ba56b5ce555c380947f710 (diff) |
Add basic support for UNITINFO and SUBUNITINFO
Diffstat (limited to 'audio')
-rw-r--r-- | audio/control.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/audio/control.c b/audio/control.c index bb3f2bf1..3c14c230 100644 --- a/audio/control.c +++ b/audio/control.c @@ -643,6 +643,19 @@ static gboolean session_cb(GIOChannel *chan, GIOCondition cond, ret = write(session->sock, buf, packet_size); } + if (avctp->packet_type == AVCTP_PACKET_SINGLE && + avctp->cr == AVCTP_COMMAND && + avctp->pid == htons(AV_REMOTE_SVCLASS_ID) && + avrcp->code == CTYPE_STATUS && + (avrcp->opcode == OP_UNITINFO + || avrcp->opcode == OP_SUBUNITINFO)) { + avctp->cr = AVCTP_RESPONSE; + avrcp->code = CTYPE_STABLE; + debug("reply to %s", avrcp->opcode == OP_UNITINFO ? + "OP_UNITINFO" : "OP_SUBUNITINFO"); + ret = write(session->sock, buf, packet_size); + } + return TRUE; failed: |