Linux bluetooth development
 help / color / mirror / Atom feed
From: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
To: linux-bluetooth@vger.kernel.org
Subject: [PATCH BlueZ 4/8] unit/test-avrcp: Add /TP/MPS/BV-05-C test
Date: Wed,  8 Oct 2014 15:31:45 +0300	[thread overview]
Message-ID: <1412771509-7996-4-git-send-email-luiz.dentz@gmail.com> (raw)
In-Reply-To: <1412771509-7996-1-git-send-email-luiz.dentz@gmail.com>

From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

Verify the AddressedPlayerChanged Notification issued by the TG and the
procedure associated to this.
---
 unit/test-avrcp.c | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)

diff --git a/unit/test-avrcp.c b/unit/test-avrcp.c
index 146858b..7998976 100644
--- a/unit/test-avrcp.c
+++ b/unit/test-avrcp.c
@@ -526,6 +526,7 @@ static int register_notification(struct avrcp *session, uint8_t transaction,
 	struct context *context = user_data;
 	uint64_t track;
 	uint8_t settings[3];
+	uint16_t player[2];
 	void *data;
 	size_t len;
 
@@ -551,6 +552,13 @@ static int register_notification(struct avrcp *session, uint8_t transaction,
 		data = settings;
 		len = sizeof(settings);
 		break;
+	case AVRCP_EVENT_ADDRESSED_PLAYER_CHANGED:
+		player[0] = 0x0001;
+		player[1] = 0xabcd;
+
+		data = player;
+		len = sizeof(player);
+		break;
 	default:
 		return -EINVAL;
 	}
@@ -885,6 +893,21 @@ int main(int argc, char *argv[])
 				0x46, 0x69, 0x6c, 0x65, 0x73, 0x79,
 				0x73, 0x74, 0x65, 0x6d));
 
+	/* AddressedPlayerChanged notification – TG */
+	define_test("/TP/MPS/BV-05-C", test_server,
+			raw_pdu(0x00, 0x11, 0x0e, 0x03, 0x48, 0x00,
+				0x00, 0x19, 0x58, AVRCP_REGISTER_NOTIFICATION,
+				0x00, 0x00, 0x05, 0x0b,
+				0x00, 0x00, 0x00, 0x00),
+			frg_pdu(0x02, 0x11, 0x0e, AVC_CTYPE_INTERIM, 0x48, 0x00,
+				0x00, 0x19, 0x58, AVRCP_REGISTER_NOTIFICATION,
+				0x00, 0x00, 0x05, 0x0b,
+				0x00, 0x01, 0xab, 0xcd),
+			raw_pdu(0x02, 0x11, 0x0e, AVC_CTYPE_CHANGED, 0x48, 0x00,
+				0x00, 0x19, 0x58, AVRCP_REGISTER_NOTIFICATION,
+				0x00, 0x00, 0x05, 0x0b,
+				0x01, 0x00, 0xcd, 0xab));
+
 	/* GetFolderItems - CT */
 	define_test("/TP/MPS/BV-08-C", test_client,
 			brs_pdu(0x00, 0x11, 0x0e, AVRCP_GET_FOLDER_ITEMS,
-- 
1.9.3


  parent reply	other threads:[~2014-10-08 12:31 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-08 12:31 [PATCH BlueZ 1/8] android/avrcp-lib: Add support for SetBrowsedPlayer PDU Luiz Augusto von Dentz
2014-10-08 12:31 ` [PATCH BlueZ 2/8] android/avrcp-lib: Fix AddressedPlayerChanged Luiz Augusto von Dentz
2014-10-08 12:31 ` [PATCH BlueZ 3/8] unit/test-avrcp: Add /TP/MPS/BV-04-C test Luiz Augusto von Dentz
2014-10-08 12:31 ` Luiz Augusto von Dentz [this message]
2014-10-08 12:31 ` [PATCH BlueZ 5/8] unit/test-avrcp: Add /TP/MPS/BV-06-C test Luiz Augusto von Dentz
2014-10-08 12:31 ` [PATCH BlueZ 6/8] unit/test-avrcp: Add /TP/MPS/BV-07-C test Luiz Augusto von Dentz
2014-10-08 12:31 ` [PATCH BlueZ 7/8] unit/test-avrcp: Add /TP/MPS/BI-01-C test Luiz Augusto von Dentz
2014-10-08 12:31 ` [PATCH BlueZ 8/8] unit/test-avrcp: Add /TP/MPS/BI-02-C test Luiz Augusto von Dentz
2014-10-10 14:15 ` [PATCH BlueZ 1/8] android/avrcp-lib: Add support for SetBrowsedPlayer PDU Luiz Augusto von Dentz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1412771509-7996-4-git-send-email-luiz.dentz@gmail.com \
    --to=luiz.dentz@gmail.com \
    --cc=linux-bluetooth@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox