From 68fdcb7d84d0d700f10ca3be42f9c7e51cfca932 Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Wed, 16 Jan 2008 14:44:20 +0000 Subject: Add basic support for UNITINFO and SUBUNITINFO --- audio/control.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'audio/control.c') 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: -- cgit