public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
* [Bluez-devel] UNITINFO and SUBUNITINFO in avrcp
@ 2008-01-16 14:25 Frédéric Dalleau
  2008-01-16 19:18 ` Marcel Holtmann
  0 siblings, 1 reply; 2+ messages in thread
From: Frédéric Dalleau @ 2008-01-16 14:25 UTC (permalink / raw)
  To: BlueZ development

[-- Attachment #1: Type: text/plain, Size: 241 bytes --]

This little patch enables support of UNITINFO and SUBUNITINFO commands 
in audio service.
The implementation is not very useful itself but it is mandatory in AVRCP.

PTS has some test cases to check for it.

Comments are welcome!

Frédéric.

[-- Attachment #2: unitinfo.patch --]
[-- Type: text/x-patch, Size: 756 bytes --]

diff --git a/audio/control.c b/audio/control.c
index bb3f2bf..5eb1053 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:

[-- Attachment #3: Type: text/plain, Size: 228 bytes --]

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/

[-- Attachment #4: Type: text/plain, Size: 164 bytes --]

_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [Bluez-devel] UNITINFO and SUBUNITINFO in avrcp
  2008-01-16 14:25 [Bluez-devel] UNITINFO and SUBUNITINFO in avrcp Frédéric Dalleau
@ 2008-01-16 19:18 ` Marcel Holtmann
  0 siblings, 0 replies; 2+ messages in thread
From: Marcel Holtmann @ 2008-01-16 19:18 UTC (permalink / raw)
  To: BlueZ development

Hi Frederic,

> This little patch enables support of UNITINFO and SUBUNITINFO commands 
> in audio service.
> The implementation is not very useful itself but it is mandatory in AVRCP.
> 
> PTS has some test cases to check for it.

patch seems to be in the CVS. Thanks.

Regards

Marcel



-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-01-16 19:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-16 14:25 [Bluez-devel] UNITINFO and SUBUNITINFO in avrcp Frédéric Dalleau
2008-01-16 19:18 ` Marcel Holtmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox