From patchwork Tue May 21 10:55:13 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Iulia Tanasescu X-Patchwork-Id: 798242 Received: from EUR03-AM7-obe.outbound.protection.outlook.com (mail-am7eur03on2059.outbound.protection.outlook.com [40.107.105.59]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1E52F5E22C for ; Tue, 21 May 2024 10:55:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.105.59 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716288949; cv=fail; b=FpT2uExPMAO5yjnGk4RvjK7ZBTSq5AeadSKeqT8Hl0l7eaRg/TE2b9hNJMNvGkSq0XD/lWT/fFFX8D+uj+YO1Bg7KTMaJGVjPoJ5k+GvZvTe4mnKgVi25n9q0DqSFdZkCe5R92Zii9isPRjltxltCC29LQ1cVoqQ+kbyntQvtDc= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716288949; c=relaxed/simple; bh=4JhdlFLf+3iAzh2TYXXe23k36c3Xz+nAoCYvn7kT31Y=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=dxjRL+pTZvlEzO6Vs68aKgzZDNqS791HTcRKIaXWq8z5cGurNYsC1B6TmRLGVTbmKpRtNAVXmEOIPn79TjGXwRl6PS8F6IAI5dAAZ9b96zQWOUzK9VrpIoFbO5mIRqz1AEb2O+QfzpsXnXr9Xp2caP5PDBb224+0KCijrcbspPI= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com; spf=pass smtp.mailfrom=nxp.com; dkim=pass (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b=fOm/AfCc; arc=fail smtp.client-ip=40.107.105.59 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nxp.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="fOm/AfCc" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=REaPLuYNtss3OUav+gaU1UCd7JC7MFw4AXgG1U88xfms8BcqB00lwDkqvK08bE3iRnvC4AWaHeJwG/HQRiNoSo7pFo6eBrqo3HOnK+x16Hep+Y0S/UNWrrSd4mWMsQ+xmg1P+/U0dANoetq2LTacYbBi1oo2QsrgycN6e3db1oTFqxHgR8ct4ZSsk0fJT1x2CR2duBOUdNzhm/eTJWQKfIDI6mBf7lRQ5r9S6n/a+0V8RcdcmmkVvpp2Yh8eMYPGfrhe5rLcJV1UjqxtXfTN3uWujXsVB4Egpw7CXCEUKAS9Xkkh7qatpE+hWAZ6IX85wEZiqFub7mU4aea77spWQg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=DaCfbVBS3OjhFF1QWFJ2IYD9ZrMKbaYtkMOz2ENsn0g=; b=Wd1c8TWqH0IITiiV32GS2lcIaL3uPD1ObPQWRE8O/KF7c4q474e57cM391xBsGCui8FvO+11XpXHWnzSgayh+qPOQIDpYgVzJ4q32nRAnKujVIO/ixn4qtPwwwtAfj5nT+saQRnKj1c2XdEV6rGSIhW3fzfnwPR+nDJVVT94SiQyY/Pemu3HBmrOK21IYwcpmd13u6VLvVVXHrb2aIDtzI43GVWMr53qvYPx97yIqSCcThcWa8pgmdHP3Ao8kwuebZDkOev+rz0kfM40m8a11PUG4Pf8WPnPjHT6OoCMJA7TbvwtFN+70s7f1HLMMPkssGRpBbCtT9o5o1+wGUWitw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=DaCfbVBS3OjhFF1QWFJ2IYD9ZrMKbaYtkMOz2ENsn0g=; b=fOm/AfCc0jSoWLDMwh3tF9G0yHvC+V5davSrCnjuCiQSCE7woDYdS2luarufJiqnkz3gHub2KGGa0lt5xxjnm45S73zIj7PZjjQue3gBvrn3M48x/y7PNuZzvTePhaP3N9Hc0GtiGZXVmH2AHmh6s4JIHx0O1wUdX7ZZBmC/ddw= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from AS8PR04MB8898.eurprd04.prod.outlook.com (2603:10a6:20b:42d::15) by GVXPR04MB10947.eurprd04.prod.outlook.com (2603:10a6:150:216::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7587.35; Tue, 21 May 2024 10:55:44 +0000 Received: from AS8PR04MB8898.eurprd04.prod.outlook.com ([fe80::5e22:869c:33c:9654]) by AS8PR04MB8898.eurprd04.prod.outlook.com ([fe80::5e22:869c:33c:9654%4]) with mapi id 15.20.7587.035; Tue, 21 May 2024 10:55:44 +0000 From: Iulia Tanasescu To: linux-bluetooth@vger.kernel.org Cc: claudia.rosu@nxp.com, mihai-octavian.urzica@nxp.com, silviu.barbulescu@nxp.com, vlad.pruteanu@nxp.com, andrei.istodorescu@nxp.com, luiz.dentz@gmail.com, Iulia Tanasescu Subject: [PATCH BlueZ 1/3] test-bap: Keep streams queue in test_data Date: Tue, 21 May 2024 13:55:13 +0300 Message-Id: <20240521105515.103972-2-iulia.tanasescu@nxp.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240521105515.103972-1-iulia.tanasescu@nxp.com> References: <20240521105515.103972-1-iulia.tanasescu@nxp.com> X-ClientProxiedBy: AM8P189CA0028.EURP189.PROD.OUTLOOK.COM (2603:10a6:20b:218::33) To AS8PR04MB8898.eurprd04.prod.outlook.com (2603:10a6:20b:42d::15) Precedence: bulk X-Mailing-List: linux-bluetooth@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8PR04MB8898:EE_|GVXPR04MB10947:EE_ X-MS-Office365-Filtering-Correlation-Id: b9263eb4-19df-495b-701d-08dc7984902e X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230031|366007|376005|1800799015; X-Microsoft-Antispam-Message-Info: HvFASmhiB1yQu73niQclfFy+FA/QLR2lLHMrPRiqUwtyugv2ScBeRpGWd9jzFbKHRo5OdMuAkVnb5KrJuk0wJEtXrJ169mymfeUh83LqYXi96L7nkoGVRWnGbTrs8ONH7ZLm+P/hhO+W7O4wJEUIBGjcRr6v0pW2lKTP+Kxqbf02bCyZUwlUq0rXPgzuXmgGUfs6V+EvDG6RheDt55hOIXVkMBAYV40eYavJrz/ZCuM1sa2h9+SSRXYXqsyz/uqToorXjp7kG0JSE0NOhh9BD1Dzvshm55njs73hdMCsutgHpeughFokrs0pS1Qkto/lmI/Stoj665VI7MCwk2mC4/eAER+O+TmlvauL3PSP8SavyaBladecL4QJ7dQWfMDpTkB9SYH/TgzC261jZchl2rIQXCZuhM2SDHuMvXgImls+ToM8Np/Luxt2JfDjGrnyai91RNOoSIlt8qaDZZGExq01KUj4hpbKbhoRf4wirwBNiMbrGx5VfNIFWZam4Ekn++NW8oL1Wb0VSvjAJ0G8727zYjlq64yjI3OCVAMjvAmNSXGNoskwjKx4t91otF5/x05TlQe6dtAfBu2hLtcN1VeVteaoJcGgKpaPHFuSX1XreiZFM4wrgM/aRl3tuxJRcqUVwmTOQJhNppvZzWzJITU/Yt262UZEmycgDguI06IukVULTdxIEPAuvs4Ns2I02v2mE28MnOHRQRmRdrz2my7Z4A7cILgIO/z1CQiBkLJI/7IFAXnFGI0BntARUMKDU+sydFI2Z4T6BQMglh3XfpddooqeaQE0arr7/0HIZs2WvyqwgWIUW5ttNxQYCnPFeMaD+FJtcPgAgWYDNEf1Or0RfYctL2slbAlC1tGzjq8FZ0KvOvxFaJU7vTer62GNnlYe1gvP6KR6tbDUg4hlZ6fCeXFIl9LWvRLdyCGgi/SqcDBPXigqZaqLPQPdSZrE4ey+jUH3tfSUCZ68w/1qmqlUJd58VPHq3sjtGz5t9YMEUhyVKN2vkwEn7YBW0tOhbANtXo7JB+X6XJQMjUTNnGfwogm0YNIrH3+EdPVZLJ4p0VNOQ4wEHnfb8Rz4LICxpNKM2rHHGriPSPv1QvHfR23bBSRjoh7Zq+mJht/1XPuQCbq1DjWDSUz28tbMHlVnpcRPNz2N9w1zSVuEe3aZ8x2VFsi3Cab1aDLloQL+5A/Ymtbb0X2aCIyNIuCAHN3cUlpefyUpthbFXUt0G4nmQ6B4swR4EBZsc4QOQRWuuJULguzOBicrl/v1FkbGZKgyVhL2ToHQdYt4OUCDTxZhyQ== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AS8PR04MB8898.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(366007)(376005)(1800799015); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: bh8aKqXszhvbTTsXY6GgTtMr7T0IzLn8xQ/UyRZ3DHrsyb/1Mp265ZuNm3/1F5GZ2Whet2R/KjhDhVRocbhFXSq7SAKEvXXNOp9JDE2fk3F6HB6bXWUvMgJu64id3Vf0R7YgKdlADx7gJF8QN2rLJfW5n/518NNM3rs0h7OVw8+xkUyLJyOYOYXLNj8zAX23aRAdGh9vOCAD7yLDXLlO0tZhmgtbjYgFp+3QjYsysA61g5D75/VTS3fmo8IupzpjjK2xFXLDqH7p9DPFMd6YJsHjzSGw/WNMvXx28dQJX31QEwMYKQPxCk8nj8F4CeTYdw25SvCviuvE63UKW5EDEKZa1m/S2hMfzwyoS5cGhd2riWBPuWZ1d2gvapuIxcBs5KXvFfgGVfuGJUY3qaLRCdPjbA1uBEv/XtcXKLYWlhn0U0MlitnrR1YvkIlvmKZ2+fcH5BIsQy+NmDzpVCthjbCdbkoxLE+5zz5rApR/tWqCUcMiu5BvcyBYIP8synvln0oy6QHtoj2fiJ/QRncoNK0Guy9nCnhUBWmjzi3Nj3W5f4iy1IALixfjH1tyCFCg5G474mMF5IrGMTLFcA7y6W9GqyOMr6k0078Hqzv4JLZ0cPYUrAdwBJ8w2/ZxOUPGwQMCdMitRgy0NmRZIj86LvdsP83xOoX2jm90fFDgV5/EVhXmbSfqiMHqfvX3Bw+A/jR4w5mCv5AtfxuK8CR1W9ch3cg6cGPKdQTb/BCAjHhY6bcb46jJptJWfuXrIbycPEp4WDqVCXtXLjTpnsJVjOLD2T9n5ScUfGAj4if2L1R77C37lXo300K/atSEJJ7CYJ+P3fmCxEUxjViBwSZDRgntcCwes7frVU/yVoMdKWx07oe2ZgLDc4ebngyXDGm8w6sOVuIoUF39+vfNRqKyJj+Oa3HZ8Rlr+Z+BBRJ9DRI1zNt9QYcBJUANpN7lLFHzeWGdWiyY1IHPg9nTozaKzg3YmIZZcEEgshQlLbFoynBSfRC3vUMNSZYN7accLaijlR9QyORMR3A6gU/PIXbV0kayz4r/BKyAuObm96+OLz/8sCenMdt39a/nphVY/ahavUvqnCqXnjvj01PAjPJEyh+y4ZTY1PskyD62gQowtZwNcwdWVKVwM7+katr5Rp9LzayqGjjjBOYg8lZ/xwKe0OJ42fF6o8KcjO4cST1i2APuZ5/03B9I+rU+aaJ6Z7uTd8/2kqTC+s3271uToUQYOHziv0qoNKopAQ4G2Sgkgd8CAD5tT2h3om64Y/0oerEkj8t63QuOBlOKmifYTTWuzGTCwNZ1AxMOBPRD9ePy+unSahGyaZq3XVTkyT1UgBacH1rEENcpoVBGS1c4DBgWrgN4kpvKBP1Hv+9T6k+gRM57n2BrALrl3gdQsa75L0bfwjmugHqEziAr3IPyhjjTDiL7Ssmaw+o+pzElaCB6nfD+VSqCQWxELKorLYaYEp1ebeJ6Az8rH8FVA0Kg+j4bPwci+Mtm/ipSWaYVRB8nWXHw1O/JFx2CpI9kM13sEcfvBmDWqTbqBiISEUmX6h1go2i36AU4iYOaewGip4gsGzbtSCx4zsZIYNcUXb3zvSAsEw0H4HLpbAjAXov/gxs9/Q== X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: b9263eb4-19df-495b-701d-08dc7984902e X-MS-Exchange-CrossTenant-AuthSource: AS8PR04MB8898.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 May 2024 10:55:44.2311 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: RYkO+Pvi30mXPEp3TvODpzFbkQ7ZhhXJgIq9OBmCwblKgeOQflWqP5jGVK0StzsjwFlvWxUmRW5ToaSC7nkqzw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: GVXPR04MB10947 Some BAP test configurations require multiple streams to be created (for example, 4.14.4 Broadcast Sink Receives Audio Data Over Multiple BISes). This replaces the stream pointer inside test_data with a queue of streams, where each created stream is pushed. Unicast callbacks where the created stream needs to be accessed already pass the stream reference as parameter, so there is no need to access it from test_data. --- unit/test-bap.c | 56 ++++++++++++++++++++++++++++++------------------- 1 file changed, 34 insertions(+), 22 deletions(-) diff --git a/unit/test-bap.c b/unit/test-bap.c index 20609694e..061c7a119 100644 --- a/unit/test-bap.c +++ b/unit/test-bap.c @@ -56,7 +56,7 @@ struct test_data { struct iovec *base; struct iovec *caps; struct test_config *cfg; - struct bt_bap_stream *stream; + struct queue *streams; size_t iovcnt; struct iovec *iov; }; @@ -80,6 +80,7 @@ static struct iovec lc3_caps = LC3_CAPABILITIES(LC3_FREQ_ANY, LC3_DURATION_ANY, data.cfg = _cfg; \ data.iovcnt = ARRAY_SIZE(iov_data(args)); \ data.iov = util_iov_dup(iov, ARRAY_SIZE(iov_data(args))); \ + data.streams = queue_new(); \ tester_add(name, &data, setup, function, \ test_teardown); \ } while (0) @@ -373,13 +374,13 @@ static void bap_enable(struct bt_bap_stream *stream, case BT_BAP_STREAM_STATE_ENABLING: return; case BT_BAP_STREAM_STATE_DISABLING: - id = bt_bap_stream_disable(data->stream, true, bap_disable, + id = bt_bap_stream_disable(stream, true, bap_disable, data); break; case BT_BAP_STREAM_STATE_STREAMING: if (data->cfg->snk) return; - id = bt_bap_stream_start(data->stream, bap_start, data); + id = bt_bap_stream_start(stream, bap_start, data); break; } @@ -400,7 +401,7 @@ static void bap_qos(struct bt_bap_stream *stream, if (data->cfg->state > BT_BAP_STREAM_STATE_QOS) { unsigned int qos_id; - qos_id = bt_bap_stream_enable(data->stream, true, NULL, + qos_id = bt_bap_stream_enable(stream, true, NULL, bap_enable, data); g_assert(qos_id); } @@ -420,7 +421,7 @@ static void bap_config(struct bt_bap_stream *stream, if (data->cfg->state > BT_BAP_STREAM_STATE_CONFIG) { unsigned int qos_id; - qos_id = bt_bap_stream_qos(data->stream, &data->cfg->qos, + qos_id = bt_bap_stream_qos(stream, &data->cfg->qos, bap_qos, data); g_assert(qos_id); } @@ -431,13 +432,16 @@ static bool pac_found(struct bt_bap_pac *lpac, struct bt_bap_pac *rpac, { struct test_data *data = user_data; unsigned int config_id; + struct bt_bap_stream *stream; - data->stream = bt_bap_stream_new(data->bap, lpac, rpac, + stream = bt_bap_stream_new(data->bap, lpac, rpac, &data->cfg->qos, &data->cfg->cc); - g_assert(data->stream); + g_assert(stream); - config_id = bt_bap_stream_config(data->stream, &data->cfg->qos, + queue_push_tail(data->streams, stream); + + config_id = bt_bap_stream_config(stream, &data->cfg->qos, &data->cfg->cc, bap_config, data); g_assert(config_id); @@ -529,15 +533,18 @@ static struct bt_bap_pac_ops bcast_pac_ops = { static void bsrc_pac_added(struct bt_bap_pac *pac, void *user_data) { struct test_data *data = user_data; + struct bt_bap_stream *stream; bt_bap_pac_set_ops(pac, &bcast_pac_ops, NULL); - data->stream = bt_bap_stream_new(data->bap, pac, NULL, + stream = bt_bap_stream_new(data->bap, pac, NULL, &data->cfg->qos, &data->cfg->cc); - g_assert(data->stream); + g_assert(stream); - bt_bap_stream_config(data->stream, &data->cfg->qos, + queue_push_tail(data->streams, stream); + + bt_bap_stream_config(stream, &data->cfg->qos, &data->cfg->cc, NULL, data); } @@ -572,6 +579,7 @@ static void bsnk_pac_added(struct bt_bap_pac *pac, void *user_data) struct bt_bap_pac *lpac; struct iovec *cc; struct bt_bap_codec codec = {0}; + struct bt_bap_stream *stream; if (data->cfg->vs) codec.id = 0xff; @@ -587,12 +595,14 @@ static void bsnk_pac_added(struct bt_bap_pac *pac, void *user_data) bt_bap_pac_set_ops(pac, &bcast_pac_ops, NULL); - data->stream = bt_bap_stream_new(data->bap, + stream = bt_bap_stream_new(data->bap, pac, NULL, &data->cfg->qos, cc); - g_assert(data->stream); + g_assert(stream); - bt_bap_stream_config(data->stream, &data->cfg->qos, + queue_push_tail(data->streams, stream); + + bt_bap_stream_config(stream, &data->cfg->qos, cc, NULL, NULL); util_iov_free(cc, 1); @@ -704,6 +714,8 @@ static void test_teardown(const void *user_data) bt_bap_remove_pac(data->bsnk); gatt_db_unref(data->db); + queue_destroy(data->streams, NULL); + tester_teardown_complete(); } @@ -2643,7 +2655,7 @@ static void state_start_disable(struct bt_bap_stream *stream, switch (new_state) { case BT_BAP_STREAM_STATE_STREAMING: - id = bt_bap_stream_disable(data->stream, true, bap_disable, + id = bt_bap_stream_disable(stream, true, bap_disable, data); g_assert(id); break; @@ -2719,7 +2731,7 @@ static void state_cc_release(struct bt_bap_stream *stream, switch (new_state) { case BT_BAP_STREAM_STATE_CONFIG: - id = bt_bap_stream_release(data->stream, bap_release, data); + id = bt_bap_stream_release(stream, bap_release, data); g_assert(id); break; } @@ -2788,7 +2800,7 @@ static void state_qos_release(struct bt_bap_stream *stream, switch (new_state) { case BT_BAP_STREAM_STATE_QOS: - id = bt_bap_stream_release(data->stream, bap_release, data); + id = bt_bap_stream_release(stream, bap_release, data); g_assert(id); break; } @@ -2827,7 +2839,7 @@ static void state_enable_release(struct bt_bap_stream *stream, switch (new_state) { case BT_BAP_STREAM_STATE_ENABLING: - id = bt_bap_stream_release(data->stream, bap_release, data); + id = bt_bap_stream_release(stream, bap_release, data); g_assert(id); break; } @@ -2866,7 +2878,7 @@ static void state_start_release(struct bt_bap_stream *stream, switch (new_state) { case BT_BAP_STREAM_STATE_STREAMING: - id = bt_bap_stream_release(data->stream, bap_release, data); + id = bt_bap_stream_release(stream, bap_release, data); g_assert(id); break; } @@ -2894,7 +2906,7 @@ static void state_disable_release(struct bt_bap_stream *stream, switch (new_state) { case BT_BAP_STREAM_STATE_DISABLING: - id = bt_bap_stream_release(data->stream, bap_release, data); + id = bt_bap_stream_release(stream, bap_release, data); g_assert(id); break; } @@ -2971,7 +2983,7 @@ static void state_enable_metadata(struct bt_bap_stream *stream, switch (new_state) { case BT_BAP_STREAM_STATE_ENABLING: - id = bt_bap_stream_metadata(data->stream, &iov, bap_metadata, + id = bt_bap_stream_metadata(stream, &iov, bap_metadata, data); g_assert(id); break; @@ -3047,7 +3059,7 @@ static void state_start_metadata(struct bt_bap_stream *stream, switch (new_state) { case BT_BAP_STREAM_STATE_STREAMING: - id = bt_bap_stream_metadata(data->stream, &iov, bap_metadata, + id = bt_bap_stream_metadata(stream, &iov, bap_metadata, data); g_assert(id); break; From patchwork Tue May 21 10:55:14 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Iulia Tanasescu X-Patchwork-Id: 798025 Received: from EUR03-AM7-obe.outbound.protection.outlook.com (mail-am7eur03on2059.outbound.protection.outlook.com [40.107.105.59]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 835997353F for ; Tue, 21 May 2024 10:55:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.105.59 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716288951; cv=fail; b=Pns6HyREoChuQNX4lp67FEZ9gyGWd0pd/9IV4qVd3x5Fq+HJ+ZPQmV41s710RN/xed6BJHrAdRAWoB0JkAkL0q3DSPCnaV6WDwQdRJT3SBgdRV9ZYjCK20FO2lwzVInPf3gPEhRBYfKOjp4QG9En8y3j8rhgqJft/GIObFVGijk= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716288951; c=relaxed/simple; bh=eillIdEFyw4KIJQFp/mTxpp0JAeHI4uWsIAHdCRJ8y4=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=QDi15vjTuZCySFGJ33ob7p1lc7WzoeROcd2h/cRd0cknrFm0q4MvyWThrQBiQNF/jXsj7qpzfGA8j+PhpM6kC0rR3yRJKu+luOM0n7hGrhI8BLDcYcmtR8fKvVqCMMSpNFzvSUTWANO4+RifrjGh3Et/irJTrTeiDKejtP02EL8= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com; spf=pass smtp.mailfrom=nxp.com; dkim=pass (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b=fR0d79ZV; arc=fail smtp.client-ip=40.107.105.59 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nxp.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="fR0d79ZV" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=glquDQ1jBzh3XyBGd2vshI2mC/W5/WbUkgBk+XU3hCORLTntW3vGwFLwy5g0IiJClV7M0Vvv5n1Zav73mRH7/TFpvYUbGXK1pZqQutazbhSrbAY0N8CdW/4OCg3e2juroMQoDwkagGf8QMSdbhEV3SFweU3XpuUrHbpApUU+di32K3uudkaj4J4nGGuP06w8211dvmKcTE1Z7t8QUZMdwOdMXispXdwoZk9m6g3pFjHOHVXrEKsKtZIOIjnsojwpV2tn+6uwTnSo9aix7KALoSIk6mQEdVooEcohjqW7qXLSwnAkLu4vW6jmxnuuBevai6w4kl2ROxd9A2OVNZRqsw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=nfdZkau3pUkjytA/Tt70DW5YI9CwOeD8BaaNsl55q7U=; b=c+v/WFb6WqJmBTqzrUVKyMBgdhiiW7qbcfn8oXQw6faD5dFPPuhYsbGVjEB0ubMWfyqocFJdAiU5k0vADWWVfruWAiTgepBZs+rs0t+FU0mewRxfHuyU3CJ7yCmMpBQlc5D7ObIsVJVAKoUzT1VbaI8ncKB0+PI+KtqfV+TDgK0paszyy187JOiK8ue621EceWLN+VfP/ObD5J24qluM5Txo474D4V5kEI2VFVUh/PEfTOmqWy3o4LmUUH63WM1HE/Qb73Y/IOH5xdGwwSSR1MSOFo59zln06QnAkmre9oiH9CTtnACu1RqeOKDB0lCJJiwCfuR4Vo8XEEF265Aw3g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=nfdZkau3pUkjytA/Tt70DW5YI9CwOeD8BaaNsl55q7U=; b=fR0d79ZVLbdQHiPnz2Dn2SDhryVeeD33/CSIcgsIdg3jgmZbITyvHmcx6iZwQ0Fk+DiK6EB2JdKUGfSmxX3dCZmeY+OMGCT55ZItMhCgsCtlpFkar1lGsKL22fts1xdEeIO/w3LtDPVf25sECtlDOjSko07ojMTKgP0ETwQQtgA= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from AS8PR04MB8898.eurprd04.prod.outlook.com (2603:10a6:20b:42d::15) by GVXPR04MB10947.eurprd04.prod.outlook.com (2603:10a6:150:216::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7587.35; Tue, 21 May 2024 10:55:47 +0000 Received: from AS8PR04MB8898.eurprd04.prod.outlook.com ([fe80::5e22:869c:33c:9654]) by AS8PR04MB8898.eurprd04.prod.outlook.com ([fe80::5e22:869c:33c:9654%4]) with mapi id 15.20.7587.035; Tue, 21 May 2024 10:55:47 +0000 From: Iulia Tanasescu To: linux-bluetooth@vger.kernel.org Cc: claudia.rosu@nxp.com, mihai-octavian.urzica@nxp.com, silviu.barbulescu@nxp.com, vlad.pruteanu@nxp.com, andrei.istodorescu@nxp.com, luiz.dentz@gmail.com, Iulia Tanasescu Subject: [PATCH BlueZ 2/3] test-bap: Add support for multiple bcast streams Date: Tue, 21 May 2024 13:55:14 +0300 Message-Id: <20240521105515.103972-3-iulia.tanasescu@nxp.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240521105515.103972-1-iulia.tanasescu@nxp.com> References: <20240521105515.103972-1-iulia.tanasescu@nxp.com> X-ClientProxiedBy: AS4P190CA0018.EURP190.PROD.OUTLOOK.COM (2603:10a6:20b:5d0::11) To AS8PR04MB8898.eurprd04.prod.outlook.com (2603:10a6:20b:42d::15) Precedence: bulk X-Mailing-List: linux-bluetooth@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8PR04MB8898:EE_|GVXPR04MB10947:EE_ X-MS-Office365-Filtering-Correlation-Id: 3d5d5dcf-e7b1-4e09-3cda-08dc798491e4 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230031|366007|376005|1800799015; X-Microsoft-Antispam-Message-Info: X99Kvy3HziN/c0K8lv4NAzxEREArpatGDPk7la86cCO/ZGcyj57cbfC3k1EASCfczNsvMiGJTWxS1rJ+gdpBjWx3Xae+hFM/becfICGc+QPGmahHwjuBL7gTRjgFvHKDKsXp/lfYrFmxRHxcnGzv87pTqnMBUFsOnEb7/XBZs6Wv8eysUutcGK1gFUT9Zgal6fIEnbJ/2rHYOnljze3weq1tUe0H7CtsWT84D5f60iKzBsHFbtxmnC+hQseSFBWKDaqmgxon0Q5PuO0h34F6EL9WwB6p1YuT6bbj/Idx/zjbddICvU0zQkjbP6aczxh3+fRoHRnaUzzHLjj7q8B+jvXBDA06pnruuqz0qkDYqjd61Cayep2M7l4WkSnW7QceA2MDpPLwV/l4tYOzeZ2WT1lRSWusikHh8ZIgAAOZOB/NiRy9AakZrbWT43EDGI8rmSUbi9/psQdGrE+4qoorqrYQoozzsb5qOOPk7sRtKNzYRzekoDwOk2Nmcg6gyqIRFhBwYeg0Ibx43WtvCt2a9KojCEqa3DN66ayPRqMOR7kkwq9FMrAw2Byr+g/AyE/vA7AS+NEfk1mWduW2X2obqIH9cDCxUNXzynw1dE0DoldRuDvvZqexEw04WQvVae5677VQYUwNZR2xYTzi8Wv+tG+H5tbt19MZaSBXuRIgkRDDIPqcNuuln2aH3TD3o+4QeWHCZINMceLTRpnRJEhSTdgC8kVi2cAQhaMLxGvmpvj4YPgjD+43SWXGR1yGeWcS+Laz7v5qrNFTvdgo7As50A6CC93qWminyPwhZEx6ZJnxApip8O+Ud1dmjDABtaKu0QMGP0heOvwnx/Nzs900UqBZ5al/1oyINV0otAycU4NX6VxK5AmQ6YrdhC+1xbdtu6l+rxPFydLrymI5j+OlPv8suP5YEpEAPyD0M2XXu8/bUduX5ZNdxSSHgQSahoxlci+vORg5qXgvRb/rYrS5G62oRi+2kwwqcW1+ELmc35Xom0U6bpTIpjUV2qnrpptpE5c/e7PTWgH8vMu3n4NPhJFywUxgBG9FfHhCaShcGz7floug/aD5i0gTWmQtkiK9ZAZmLyktI6yC9bE2hZWh8vwNS5c3Pf3Us11EeF7zIm+iiVdMs0+CWXAqrHAModNhEeIIAqekYasKnwHoFsvbye73NrrLa31Yqje+zEpwiQ4A+CKFjJpmXnK/tz9w/bnG4KNXFxv4woUwdcRyBAMzZIun6/rgrtvspKAnssV8de/U8/kvqm+ZwXr/ORpGzFcuxfRrwVrs4qaGYuluXnKHYQ== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AS8PR04MB8898.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(366007)(376005)(1800799015); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: hWEyBQPaRlhpvT0BU6vraUI+5HhaKjBKPuwu4P5cX8sEYTadB9uJSbrg2CAVkKXBIUdW4bnNByJZQ8O5GyWJelFqvZJ+T05iKvizUkwASqeAdxR011VOOzaas9XHsNd1AjCh+veHZ9wHlWwsrMfGEJ+kYRX9EYI5L8u38ImS5I6MnbxrR/DmD55eD+92lEqmvUoJyDBPxPBN/pPTIcKwO6BfAl/kg1J+arA8ckTk9hx3mSmQO+pUqCykvzIE+Z3mbDNfl9pBxyjvhLFeT4jyDFhVyuTMVVjy2SJHKiS2V9PRtMqZ3VD0zQNeBsLkIuE+4vJYw6d7plWSyHpyRSnaajPv3dw23Sq4O+fFOknNFI0V8YP8M2g0VL7i+3omx/GiZumZ0kopuzmVbEeWH0w5FhAXX2FhQTQnB0pItvWvMwolKhW9DAEbGM2cgpfFl01InIvOmRdhaXA5Sm6DnK9xJX1vvSZ8p74+9VyTHM8F7yP+jPBJW7/VQ4ppd0puzvg7Gcxb0LPn+ZQ13xkXQxDAddrTsal3q4HDOxlsbQ83MSUajrEavfkejArDbyGU07lGhEpHYTJaWaflyIYbdmO6cjNB8IxXORNTgcCo7kU+oNzLgJziB9FWtE5qyYXUFsnNzeg5M77aY+bJO11bhkhztqWoqbfmY0vwVTS5hvmoyEOOi7b89JGvns00cJoX1iYjbkxVMBF/f6p9ZGbH4NT5gGGE7kJf73QYux/8tj/2AB+Q/mAgJnXbtlHw/kc9Gl9a0dAmOk8/dmXGUjRv+PTj/YMb/+7i4uMEb+YMMZY0ac2HINYE8KnFsfP5Lv5+As3Azcf8svoiQipmiq1xP1vFHgZESb1c5+EYk8GxCtg4e5SNZEqnFUu1di0rCJhhaEil/BP/ucftm7zJ5zGVK1FfbV8IKfX4GianxigxB88pd7+1Bjq6qeqLQJHshg0avqn0hExI3qxFUk/LoURp4MK348bpxP1JDSBdpaSzOMFagz7k9DodKhlU4Vf5qGIj5AGI2wvdgkX+FlDAoBWv76kPIRBdntrmUmVU09oA+7OpRFHKXuNe2C52vXc0JFGBrTN4Qic32x1Fu8IFtAS+4JgTHJEGRZYFshZHX/lyaWf38CNQbzJlAA9Lw4M2LfN9EDaVXyd82gKkTBU4cLzrYkPCqttKoUKjnHQhpIn8RYxIZXrJYmbFATs7dMBQYcWND+8gzsfzJu3hcI7RCSdcR9vwEYv6BE7PxY2PkIpbQgr8gNXCWl5/THyn/eLTTIKiQfm9CzOCU0Xv91CXc/xx7EWM4Se79xh4Q8tLynyb/cALVBnO1Yk/82Rxn3dhOwj6UUEpurSekDg2Bc1m44vK7za4eX3CdeCYB8CJVpjNTnzbxsssMA5gOXmPNnxcWvqbOxyK0wPUr9BGzBMXVJYf4hgWG7IU42NlyabW468SeyhG+8J+FIU9/Z40Wkk0yxFUo50VJwzK+6ebv6rXN3mItpF6gfyQVnEgPw2HHyjDnUbJPS87BqnWpQaEHZ1bL61QXRRwTG+FwGmjk53FE8SzpCt4XTMermpUjq7FU+FsznmwkAiRdMQHUzaUuhto4KCN3fMuRGihCXyUyDmtykJ5vNeqlQ== X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3d5d5dcf-e7b1-4e09-3cda-08dc798491e4 X-MS-Exchange-CrossTenant-AuthSource: AS8PR04MB8898.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 May 2024 10:55:47.3177 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: m6U6fGzorxZcEIygy1nWljDVSKqISpJVSVABJHMEU6XXA+SpT4+WgG5MT8BpiJJR1uyEWVXO749WfD06Fx5u+A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: GVXPR04MB10947 This adds support for implementing Broadcast tests that require multiple streams to be configured (for example, 4.14.4 Broadcast Sink Receives Audio Data Over Multiple BISes). The number of required streams is added inside the test_config struct. The bsnk_pac_added and the bsnk_state_str callbacks have been updated to support multiple streams. --- unit/test-bap.c | 85 ++++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 70 insertions(+), 15 deletions(-) diff --git a/unit/test-bap.c b/unit/test-bap.c index 061c7a119..38a9f5c12 100644 --- a/unit/test-bap.c +++ b/unit/test-bap.c @@ -43,6 +43,7 @@ struct test_config { bool vs; uint8_t state; bt_bap_state_func_t state_func; + uint8_t num_str; }; struct test_data { @@ -580,32 +581,35 @@ static void bsnk_pac_added(struct bt_bap_pac *pac, void *user_data) struct iovec *cc; struct bt_bap_codec codec = {0}; struct bt_bap_stream *stream; + uint8_t bis_idx = 1; + + bt_bap_pac_set_ops(pac, &bcast_pac_ops, NULL); if (data->cfg->vs) codec.id = 0xff; else codec.id = LC3_ID; - bt_bap_verify_bis(data->bap, 1, &codec, - &data->cfg->cc, NULL, &lpac, &cc); + for (uint8_t i = 0; i < data->cfg->num_str; i++) { + bt_bap_verify_bis(data->bap, bis_idx++, &codec, + &data->cfg->cc, NULL, &lpac, &cc); - g_assert(lpac); - g_assert(pac == lpac); - g_assert(cc); - - bt_bap_pac_set_ops(pac, &bcast_pac_ops, NULL); + g_assert(lpac); + g_assert(pac == lpac); + g_assert(cc); - stream = bt_bap_stream_new(data->bap, - pac, NULL, &data->cfg->qos, cc); + stream = bt_bap_stream_new(data->bap, + pac, NULL, &data->cfg->qos, cc); - g_assert(stream); + g_assert(stream); - queue_push_tail(data->streams, stream); + queue_push_tail(data->streams, stream); - bt_bap_stream_config(stream, &data->cfg->qos, - cc, NULL, NULL); + bt_bap_stream_config(stream, &data->cfg->qos, + cc, NULL, NULL); - util_iov_free(cc, 1); + util_iov_free(cc, 1); + } } static void bsnk_state(struct bt_bap_stream *stream, uint8_t old_state, @@ -6138,6 +6142,7 @@ static struct test_config cfg_bsnk_8_1 = { .qos = QOS_BCAST, .snk = true, .state_func = bsnk_state, + .num_str = 1, }; static struct test_config cfg_bsnk_8_2 = { @@ -6145,6 +6150,7 @@ static struct test_config cfg_bsnk_8_2 = { .qos = QOS_BCAST, .snk = true, .state_func = bsnk_state, + .num_str = 1, }; static struct test_config cfg_bsnk_16_1 = { @@ -6152,6 +6158,7 @@ static struct test_config cfg_bsnk_16_1 = { .qos = QOS_BCAST, .snk = true, .state_func = bsnk_state, + .num_str = 1, }; static struct test_config cfg_bsnk_16_2 = { @@ -6159,6 +6166,7 @@ static struct test_config cfg_bsnk_16_2 = { .qos = QOS_BCAST, .snk = true, .state_func = bsnk_state, + .num_str = 1, }; static struct test_config cfg_bsnk_24_1 = { @@ -6166,6 +6174,7 @@ static struct test_config cfg_bsnk_24_1 = { .qos = QOS_BCAST, .snk = true, .state_func = bsnk_state, + .num_str = 1, }; static struct test_config cfg_bsnk_24_2 = { @@ -6173,6 +6182,7 @@ static struct test_config cfg_bsnk_24_2 = { .qos = QOS_BCAST, .snk = true, .state_func = bsnk_state, + .num_str = 1, }; static struct test_config cfg_bsnk_32_1 = { @@ -6180,6 +6190,7 @@ static struct test_config cfg_bsnk_32_1 = { .qos = QOS_BCAST, .snk = true, .state_func = bsnk_state, + .num_str = 1, }; static struct test_config cfg_bsnk_32_2 = { @@ -6187,6 +6198,7 @@ static struct test_config cfg_bsnk_32_2 = { .qos = QOS_BCAST, .snk = true, .state_func = bsnk_state, + .num_str = 1, }; static struct test_config cfg_bsnk_44_1 = { @@ -6194,6 +6206,7 @@ static struct test_config cfg_bsnk_44_1 = { .qos = QOS_BCAST, .snk = true, .state_func = bsnk_state, + .num_str = 1, }; static struct test_config cfg_bsnk_44_2 = { @@ -6201,6 +6214,7 @@ static struct test_config cfg_bsnk_44_2 = { .qos = QOS_BCAST, .snk = true, .state_func = bsnk_state, + .num_str = 1, }; static struct test_config cfg_bsnk_48_1 = { @@ -6208,6 +6222,7 @@ static struct test_config cfg_bsnk_48_1 = { .qos = QOS_BCAST, .snk = true, .state_func = bsnk_state, + .num_str = 1, }; static struct test_config cfg_bsnk_48_2 = { @@ -6215,6 +6230,7 @@ static struct test_config cfg_bsnk_48_2 = { .qos = QOS_BCAST, .snk = true, .state_func = bsnk_state, + .num_str = 1, }; static struct test_config cfg_bsnk_48_3 = { @@ -6222,6 +6238,7 @@ static struct test_config cfg_bsnk_48_3 = { .qos = QOS_BCAST, .snk = true, .state_func = bsnk_state, + .num_str = 1, }; static struct test_config cfg_bsnk_48_4 = { @@ -6229,6 +6246,7 @@ static struct test_config cfg_bsnk_48_4 = { .qos = QOS_BCAST, .snk = true, .state_func = bsnk_state, + .num_str = 1, }; static struct test_config cfg_bsnk_48_5 = { @@ -6236,6 +6254,7 @@ static struct test_config cfg_bsnk_48_5 = { .qos = QOS_BCAST, .snk = true, .state_func = bsnk_state, + .num_str = 1, }; static struct test_config cfg_bsnk_48_6 = { @@ -6243,6 +6262,7 @@ static struct test_config cfg_bsnk_48_6 = { .qos = QOS_BCAST, .snk = true, .state_func = bsnk_state, + .num_str = 1, }; static struct test_config cfg_bsnk_vs = { @@ -6251,6 +6271,7 @@ static struct test_config cfg_bsnk_vs = { .snk = true, .vs = true, .state_func = bsnk_state, + .num_str = 1, }; static void test_bsnk_scc(void) @@ -6355,11 +6376,21 @@ static void test_bsnk_scc(void) NULL, test_bcast, &cfg_bsnk_vs, IOV_NULL); } +static void stream_count_streaming(void *data, void *user_data) +{ + struct bt_bap_stream *stream = data; + uint8_t *num = user_data; + + if (bt_bap_stream_get_state(stream) == BT_BAP_STREAM_STATE_STREAMING) + (*num)++; +} + static void bsnk_state_str(struct bt_bap_stream *stream, uint8_t old_state, uint8_t new_state, void *user_data) { struct test_data *data = user_data; struct iovec *cc; + uint8_t num = 0; switch (new_state) { case BT_BAP_STREAM_STATE_CONFIG: @@ -6384,7 +6415,14 @@ static void bsnk_state_str(struct bt_bap_stream *stream, uint8_t old_state, break; case BT_BAP_STREAM_STATE_STREAMING: - tester_test_passed(); + queue_foreach(data->streams, stream_count_streaming, &num); + + if (num == data->cfg->num_str) + /* Test is completed after all streams have transitioned + * to STREAMING state. + */ + tester_test_passed(); + break; } } @@ -6394,6 +6432,7 @@ static struct test_config cfg_bsnk_str_8_1 = { .qos = QOS_BCAST, .snk = true, .state_func = bsnk_state_str, + .num_str = 1, }; static struct test_config cfg_bsnk_str_8_2 = { @@ -6401,6 +6440,7 @@ static struct test_config cfg_bsnk_str_8_2 = { .qos = QOS_BCAST, .snk = true, .state_func = bsnk_state_str, + .num_str = 1, }; static struct test_config cfg_bsnk_str_16_1 = { @@ -6408,6 +6448,7 @@ static struct test_config cfg_bsnk_str_16_1 = { .qos = QOS_BCAST, .snk = true, .state_func = bsnk_state_str, + .num_str = 1, }; static struct test_config cfg_bsnk_str_16_2 = { @@ -6415,6 +6456,7 @@ static struct test_config cfg_bsnk_str_16_2 = { .qos = QOS_BCAST, .snk = true, .state_func = bsnk_state_str, + .num_str = 1, }; static struct test_config cfg_bsnk_str_24_1 = { @@ -6422,6 +6464,7 @@ static struct test_config cfg_bsnk_str_24_1 = { .qos = QOS_BCAST, .snk = true, .state_func = bsnk_state_str, + .num_str = 1, }; static struct test_config cfg_bsnk_str_24_2 = { @@ -6429,6 +6472,7 @@ static struct test_config cfg_bsnk_str_24_2 = { .qos = QOS_BCAST, .snk = true, .state_func = bsnk_state_str, + .num_str = 1, }; static struct test_config cfg_bsnk_str_32_1 = { @@ -6436,6 +6480,7 @@ static struct test_config cfg_bsnk_str_32_1 = { .qos = QOS_BCAST, .snk = true, .state_func = bsnk_state_str, + .num_str = 1, }; static struct test_config cfg_bsnk_str_32_2 = { @@ -6443,6 +6488,7 @@ static struct test_config cfg_bsnk_str_32_2 = { .qos = QOS_BCAST, .snk = true, .state_func = bsnk_state_str, + .num_str = 1, }; static struct test_config cfg_bsnk_str_44_1 = { @@ -6450,6 +6496,7 @@ static struct test_config cfg_bsnk_str_44_1 = { .qos = QOS_BCAST, .snk = true, .state_func = bsnk_state_str, + .num_str = 1, }; static struct test_config cfg_bsnk_str_44_2 = { @@ -6457,6 +6504,7 @@ static struct test_config cfg_bsnk_str_44_2 = { .qos = QOS_BCAST, .snk = true, .state_func = bsnk_state_str, + .num_str = 1, }; static struct test_config cfg_bsnk_str_48_1 = { @@ -6464,6 +6512,7 @@ static struct test_config cfg_bsnk_str_48_1 = { .qos = QOS_BCAST, .snk = true, .state_func = bsnk_state_str, + .num_str = 1, }; static struct test_config cfg_bsnk_str_48_2 = { @@ -6471,6 +6520,7 @@ static struct test_config cfg_bsnk_str_48_2 = { .qos = QOS_BCAST, .snk = true, .state_func = bsnk_state_str, + .num_str = 1, }; static struct test_config cfg_bsnk_str_48_3 = { @@ -6478,6 +6528,7 @@ static struct test_config cfg_bsnk_str_48_3 = { .qos = QOS_BCAST, .snk = true, .state_func = bsnk_state_str, + .num_str = 1, }; static struct test_config cfg_bsnk_str_48_4 = { @@ -6485,6 +6536,7 @@ static struct test_config cfg_bsnk_str_48_4 = { .qos = QOS_BCAST, .snk = true, .state_func = bsnk_state_str, + .num_str = 1, }; static struct test_config cfg_bsnk_str_48_5 = { @@ -6492,6 +6544,7 @@ static struct test_config cfg_bsnk_str_48_5 = { .qos = QOS_BCAST, .snk = true, .state_func = bsnk_state_str, + .num_str = 1, }; static struct test_config cfg_bsnk_str_48_6 = { @@ -6499,6 +6552,7 @@ static struct test_config cfg_bsnk_str_48_6 = { .qos = QOS_BCAST, .snk = true, .state_func = bsnk_state_str, + .num_str = 1, }; static struct test_config cfg_bsnk_str_vs = { @@ -6507,6 +6561,7 @@ static struct test_config cfg_bsnk_str_vs = { .snk = true, .vs = true, .state_func = bsnk_state_str, + .num_str = 1, }; static void test_bsnk_str(void) From patchwork Tue May 21 10:55:15 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Iulia Tanasescu X-Patchwork-Id: 798241 Received: from EUR03-AM7-obe.outbound.protection.outlook.com (mail-am7eur03on2059.outbound.protection.outlook.com [40.107.105.59]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D22D8745E4 for ; Tue, 21 May 2024 10:55:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.105.59 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716288953; cv=fail; b=lGtrj79VBe4z2m4dh9ZInpZtO5NS/40EutLL279rPYH2fowp1OreSXq4LEm9/2f5eUvj3ILv+01PboY6rRCxjKRg4nHlh8sErhb3jQAK0juxLZKLHISxWOONwODjibxSdJuMZgzHZH/YYJACxQjMKiQmlQxVp/H+p6mRgSx3Yfc= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716288953; c=relaxed/simple; bh=LctpZPAOhW2LD5JA1j1axMpcHBQ7S3dm1RtKDg6NZpw=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=apX0kUvkvTwx27B01f7ks+f8FoICYo0HkZDnhW7SEj4hPqVNnxTDVwB1TT9rjdFYGNYUyJJhrrWDNH/mHBXX7bZIpHUIVtLua7KAMCdaihUZ6izi9znRpZWD2Rri1EWi+gwAYUYc7T8Ahc1oO7J36M7gqZyOCvrzUVYviykdUVw= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com; spf=pass smtp.mailfrom=nxp.com; dkim=pass (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b=EoX0O7lV; arc=fail smtp.client-ip=40.107.105.59 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nxp.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="EoX0O7lV" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=UZUV5s61LqhuSlPBApn/yTLG+5mgaixAxOCraisa937AmF9kWUKm5qmHlIbwBx6qe9ju8XIJXXE6hwABvGHtvLc+pIWYW7rALfFoclol3tK2NgXyHETtA9QdfrDRKHzCn9Sd2O3DKqED8NhHFq+qvQ0GGOJ0etn9zVI8tgeLGYQeldPzV9BgQrzfFcOiJNDRseGYsnxE6FlHaQEvcimTAfN4xFbuF0nNwEgzHTxcdcLm4mzz/6Asi5idHj6Kd24dm6ndy5oMTV4FmUnqcT3fassTob5Mgl7us0rvnU/bcfIcbhCf3uKbhgLW7l8njP0KAoZ+2fgdompMq71iB5vqyQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=c9rb3XzH/iWV0t2gmgwwBgt9c8UBfNFDKcATgvkCWhI=; b=QtG7FQ4KQagPTLaJh5/QsUkMElUHArpl+TrzAkszszIztxHbrAEFYvRPuyhev82J+idHpPC77wS0rp3kGXWY46RBObWY+iLrIfv3tqVHCSzqmjlMqb/XhG2Bdi7oup+pZCRjxOIhm4Q6zvjjrPN+0YldPebXd+X4nBgsehFocvC3Nq/Bp8zpk2qA85cVJOOnrW7l4G6nXUQ0fBJq9M4mJuAm5fdCxbGfiigVV3vQ6J7YTOYVWZd/4YHF2K+eGWgrhJkfnw2Uh/0nslTadgkc8lOLilDVLm0OwFSd6AGTq0AnMS9NUmUxuDIIKNNnQIObN8zJv/IigNwcyO0ZBs5fVg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=c9rb3XzH/iWV0t2gmgwwBgt9c8UBfNFDKcATgvkCWhI=; b=EoX0O7lVCW7XiSnKdzKQG9VuB1L2uUOY1Yqu1f8FaTTNSTLbdAdLIV+lhppLIAS31CnTJOeQhjdddogc+rdPDcMzocqB4PoNgbrjUbbrztte96c9XVXD4Ecz6amQ75QuVl2RmjrqL6mWENZRQnRoj1B6yoEjSJYxFFu9/jTX338= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from AS8PR04MB8898.eurprd04.prod.outlook.com (2603:10a6:20b:42d::15) by GVXPR04MB10947.eurprd04.prod.outlook.com (2603:10a6:150:216::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7587.35; Tue, 21 May 2024 10:55:50 +0000 Received: from AS8PR04MB8898.eurprd04.prod.outlook.com ([fe80::5e22:869c:33c:9654]) by AS8PR04MB8898.eurprd04.prod.outlook.com ([fe80::5e22:869c:33c:9654%4]) with mapi id 15.20.7587.035; Tue, 21 May 2024 10:55:50 +0000 From: Iulia Tanasescu To: linux-bluetooth@vger.kernel.org Cc: claudia.rosu@nxp.com, mihai-octavian.urzica@nxp.com, silviu.barbulescu@nxp.com, vlad.pruteanu@nxp.com, andrei.istodorescu@nxp.com, luiz.dentz@gmail.com, Iulia Tanasescu Subject: [PATCH BlueZ 3/3] test-bap: Add Broadcast Sink STR MBIS tests Date: Tue, 21 May 2024 13:55:15 +0300 Message-Id: <20240521105515.103972-4-iulia.tanasescu@nxp.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240521105515.103972-1-iulia.tanasescu@nxp.com> References: <20240521105515.103972-1-iulia.tanasescu@nxp.com> X-ClientProxiedBy: AM0PR04CA0072.eurprd04.prod.outlook.com (2603:10a6:208:1::49) To AS8PR04MB8898.eurprd04.prod.outlook.com (2603:10a6:20b:42d::15) Precedence: bulk X-Mailing-List: linux-bluetooth@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8PR04MB8898:EE_|GVXPR04MB10947:EE_ X-MS-Office365-Filtering-Correlation-Id: 9e495fcc-6cf9-4217-df16-08dc798493b8 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230031|366007|376005|1800799015; X-Microsoft-Antispam-Message-Info: IAvzMm+aLn6fSmYgCVtGx3SoNRElvOHoFdhG4fphAkO17bnl7a9qokewaDW5MlVGkHbTnCaI/+elHw/okastxte8Rr0GOP2olCNALjD7wgtQ1wAkTYsgYta+1pUi6WwmT2BU/STIVRfix/CF1gyLQ5TM7gELIpQYETPePqJsB2avyxC7d7/l9oEhaOoSd6kk5RvYuLpdLnzvRG91Y2mm5VhsBjKNSfBvAv0GngWVicSJ30p+ujXX/JOsDWrNvwNuQFydcbfV7aR240fJ1/+1149s5lmJLcLUhLQdYCTa6LCvqfou/LEQiJoFz8d0B5OtK7BI2+LrAkrrurpsRptv+5YELPXMp3XD9m8soYNtCApbIa8s2tLBVVRVYitnVtME9AYtFpEmTLxhy3HMadCa1lm7c7va4l5oNuqSk2dncXNnUp27TtXotZS7as5CW8OLLY9gLCKBWTygPBLDgDwvW0Y+oWBHa10nQ9CRUn+d7a5KTBbEIFNBnVHksByl2NtiSehTXdoUTSRrzT93e4yesJ5Qvu1L5jqnNnpTTKvRTMAGn2T8ZYGzwmykn+xVV7O6d3Mte3nm55I1Yb6fFQbs2pU3wQCphGGSxMQ4Wg3y2gARtJGkbne4hIy5/fjwsZ7Kwl9ISu6/J/B/px7MhMQiu0Bt0d8h8Z1d6wb3VOajmPAnFD60EXWkKy1ef6mb7XpxaChpOGgtexyD6og42s1ZJcertqZn7Ah0ja9WqpuqNs5UMHlgnibZAwvJy6JVjbWwxdwSxRS6kJDOK0+vz2WrNzg2y1KB79Ny6emUjQ/5bOP6w2zQOvqro7QaABY/PeLmoouZvI997pyEr+HpB76uju1gI7TQ4cL7cuoOe45A7XH3M52dMh0ZXMpnkzXP777I3AwsThOgF2b99JtkHxBLrojX9Yp3KrWfPZjZLI2nKG35PQJMCr98sH0nRcaGkmzLSx/6S2rvo2ndRBZtuvVy38CUmjLh/deNXxd4WcQzuvkI6yruWJjkS2fmPyXIhB3L2K3N3JTXSfIzqpdGiHR/0V5IJCaly5q68nx0wsPG6gQoAUtVDWfHrpeQ0MFJhoGWfAjDqX9d/eFdIKxcd3pmn01DrcYB42LkDRuKjbatRRXmGt3Zog1oCkONMpWwTSb1MrWx4ZZrj00Mx8hp8wxFI7qFVURVLS/vakEa4tP8PYZhrmCMYZEosnhRkCYyuLYeLprlUczRYyM0CfKO8Hfyb25Aw1PEckMKScLD5vpN++tV7Si/FYXB+IEe/9qxUTaycNGqmwYO2D3ryLzwZ9hm8Q== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AS8PR04MB8898.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(366007)(376005)(1800799015); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: sSPUujwfRyY/N9O+KvU/md0bv0EvYJABhj+DfcYHGBx/On0sDZMjx3FrvW3JsIVv2HJmMxAFrRFEKXouSmnDJkU4AaucocyU+RNHVP6/wqiBnpYl1WfeHQulcpBhCLgQP7AnLauIgOxPtlrfKnZg9V0rOEFrL8Et9BwX3bdWH2DI8vpsUveDFCQzYXAbdu9gBaXIu1jSpAHu3uRpMWgnmxfN6JoRnZPVdnSMa6v1V5xDKmJu5HlF/WUmN1lUjH1qjkmYSf46Cl/0MwA3+tPTB3ZRdxCdvA6GRnMDRFv/uzCw7HbJ/YlR71kivcPM3AqOoZ0459B2DGF2s0B86vjGLcfJDW7vKFW98Lmp7fXGAbONgKVaJThAXJ9i58OEQU6C1/1gG//0G8uUW8H6NfPi+cYVeL4sDLyc+IcDihGr1xYl70yb6VTBe08irkiN4iGyxt7fFRINGAE1oAeN585tikh8I9/SRAz37bjrzpUU/1E6rRMImEaLaqTZSaPpSUKbw/z/T6xnKRsacvkLW3GjzcxfHai15q9TrFJoxFmaaGfXvp6R85bGZUcNQnMzcckvKABayv3i7UpNjK9DZcOkJjDw001WzbCjtLMyl4dW5v09RQYIrZKppFm/FzvRj9VfsCtl19xnaVPYqQVXi9fDASUryOOQjLveNaYFXN/0wvu9+gK0MHO05z3tlKrWWZptN0jQnKB+sOKAJDzL7PUDPp4zNQmapZNspHPphCxJUmnwDtrrzy2cxFB1hRsqFEpAq+n9U9ph803dpa7Mlhbhz/xM390OkK2HSSEPx1YxTBeLLsfFpJFW/c0tMMFeuJB/8de7qMlAi+QkyE8Jx/W/CiRvmRu35/X1QPyUazV2iD6B3dtUaVTkiYHt7M1cPzJSgwr+Pt/m4P6mcWokCfxtO3NxvwoURbHl0Lf5OGK2wg7sbmRRgGtnImtxKeEinvXV8IRjgtbJQ2X6svZcsRUfmzfeec0ygMS65mzxdB6ao9qssqD6oahRyU7gEPtXrmLl6JzO8PvKfIXocJ5m02j39a4r61uemVB5OxJNMHbRKnzlFPyb5idTWf++diA3BTbSD27JEjYoT4dYeN32n4l8pGKvhs20nZzsUDf8B1fmD1BT6pTBL0kzzhwgdGcVzrnghLf6PdbZ6wzlJphXRv7X8L9s3Dk4yzfjCev+KnRW4+DWOZucZ79Syylog+QjUH1sXgSXJHZ8oxYTqSEbKyg0Gsx03Co/PnYnm0eaPk4cwQ9JfuALEhh8zj4lYCsjxXpnKq+htW2QFXitxMTpKFDBQJ/Kvy/cmGyy8oVsHqdPzyxvsDNkT5UXmVFFlGq8dgB89sqgjq8CaHkm2EyNhQmlR4BzuigpoDrLwDyA6tmCZZFcMlf4NWFYQsq4nPgpneajg3xmAqwNLJlnTE8NyvmsYZzUoa1H94xRxxsdvRsKDlhjsqV+TiatnRCMm0IPc3AmT6FkX9aU9Z9QCWgSy1NuvGo/3II8b8gm5hbbYpv81xhRJ5PatxfmKesktl4dKeJJhaZrGhrwDguuKii6BqlCgQj6tdmWePDyP7nb0vW3E6S8+EfX87AWzYwKEvDb0Ig3Z7UxvjsNfh5ZlqNJHkFVsg== X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9e495fcc-6cf9-4217-df16-08dc798493b8 X-MS-Exchange-CrossTenant-AuthSource: AS8PR04MB8898.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 May 2024 10:55:50.1749 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: Sp0S5ESx8FKg0ZhKoCXHg2wM/mkdd+2iPujwj6m+mZlXgZQQYtqz401vhFcou2/6WCW0b9QEWKwAU2pSJOLeUQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: GVXPR04MB10947 4.14.4 Broadcast Sink Receives Audio Data Over Multiple BISes (page 193): Test Purpose: Verify that a Broadcast Sink IUT can receive audio data over multiple BISes from a Broadcast Source. The verification is performed for each set of parameters in turn. Test Case Configuration: BAP/BSNK/STR/BV-18-C [BSNK, Multiple BISes, LC3 8_1] BAP/BSNK/STR/BV-19-C [BSNK, Multiple BISes, LC3 8_2] BAP/BSNK/STR/BV-20-C [BSNK, Multiple BISes, LC3 16_1] BAP/BSNK/STR/BV-21-C [BSNK, Multiple BISes, LC3 16_2] BAP/BSNK/STR/BV-22-C [BSNK, Multiple BISes, LC3 24_1] BAP/BSNK/STR/BV-23-C [BSNK, Multiple BISes, LC3 24_2] BAP/BSNK/STR/BV-24-C [BSNK, Multiple BISes, LC3 32_1] BAP/BSNK/STR/BV-25-C [BSNK, Multiple BISes, LC3 32_2] BAP/BSNK/STR/BV-26-C [BSNK, Multiple BISes, LC3 44.1_1] BAP/BSNK/STR/BV-27-C [BSNK, Multiple BISes, LC3 44.1_2] BAP/BSNK/STR/BV-28-C [BSNK, Multiple BISes, LC3 48_1] BAP/BSNK/STR/BV-29-C [BSNK, Multiple BISes, LC3 48_2] BAP/BSNK/STR/BV-30-C [BSNK, Multiple BISes, LC3 48_3] BAP/BSNK/STR/BV-31-C [BSNK, Multiple BISes, LC3 48_4] BAP/BSNK/STR/BV-32-C [BSNK, Multiple BISes, LC3 48_5] BAP/BSNK/STR/BV-33-C [BSNK, Multiple BISes, LC3 48_6] BAP/BSNK/STR/BV-34-C [BSNK, Multiple BISes, VS] Pass verdict: The IUT synchronizes to the Lower Tester (the Link Layer receives a BIS Data PDU). The host on the IUT receives an LE BIG Sync Established event. If the Codec ID is LC3, the IUT receives encoded LC3 audio data in BIS Data PDUs on each synchronized BIS. The audio data is formatted using the LC3 Media Packet format. If the Codec ID is a vendor-specific Codec ID, the IUT receives BIS Data PDUs on each synchronized BIS. The parameters included in the Codec_Specific_Configuration data are as defined in TSPX_VS_Codec_Specific_Configuration. If the Codec ID is LC3, each parameter included in Codec_Specific_Configuration data is formatted in an LTV structure with the length, type, and value specified in Table 4.85. Test Summary ------------ BAP/BSNK/STR/BV-18-C [BSNK, Multiple BISes, LC3 8_1] Passed BAP/BSNK/STR/BV-19-C [BSNK, Multiple BISes, LC3 8_2] Passed BAP/BSNK/STR/BV-20-C [BSNK, Multiple BISes, LC3 16_1] Passed BAP/BSNK/STR/BV-21-C [BSNK, Multiple BISes, LC3 16_2] Passed BAP/BSNK/STR/BV-22-C [BSNK, Multiple BISes, LC3 24_1] Passed BAP/BSNK/STR/BV-23-C [BSNK, Multiple BISes, LC3 24_2] Passed BAP/BSNK/STR/BV-24-C [BSNK, Multiple BISes, LC3 32_1] Passed BAP/BSNK/STR/BV-25-C [BSNK, Multiple BISes, LC3 32_2] Passed BAP/BSNK/STR/BV-26-C [BSNK, Multiple BISes, LC3 44.1_1] Passed BAP/BSNK/STR/BV-27-C [BSNK, Multiple BISes, LC3 44.1_2] Passed BAP/BSNK/STR/BV-28-C [BSNK, Multiple BISes, LC3 48_1] Passed BAP/BSNK/STR/BV-29-C [BSNK, Multiple BISes, LC3 48_2] Passed BAP/BSNK/STR/BV-30-C [BSNK, Multiple BISes, LC3 48_3] Passed BAP/BSNK/STR/BV-31-C [BSNK, Multiple BISes, LC3 48_4] Passed BAP/BSNK/STR/BV-32-C [BSNK, Multiple BISes, LC3 48_5] Passed BAP/BSNK/STR/BV-33-C [BSNK, Multiple BISes, LC3 48_6] Passed BAP/BSNK/STR/BV-34-C [BSNK, Multiple BISes, VS] Passed --- unit/test-bap.c | 188 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 188 insertions(+) diff --git a/unit/test-bap.c b/unit/test-bap.c index 38a9f5c12..5bbf375cd 100644 --- a/unit/test-bap.c +++ b/unit/test-bap.c @@ -6564,6 +6564,143 @@ static struct test_config cfg_bsnk_str_vs = { .num_str = 1, }; +static struct test_config cfg_bsnk_str_8_1_mbis = { + .cc = LC3_CONFIG_8_1, + .qos = QOS_BCAST, + .snk = true, + .state_func = bsnk_state_str, + .num_str = 2, +}; + +static struct test_config cfg_bsnk_str_8_2_mbis = { + .cc = LC3_CONFIG_8_2, + .qos = QOS_BCAST, + .snk = true, + .state_func = bsnk_state_str, + .num_str = 2, +}; + +static struct test_config cfg_bsnk_str_16_1_mbis = { + .cc = LC3_CONFIG_16_1, + .qos = QOS_BCAST, + .snk = true, + .state_func = bsnk_state_str, + .num_str = 2, +}; + +static struct test_config cfg_bsnk_str_16_2_mbis = { + .cc = LC3_CONFIG_16_2, + .qos = QOS_BCAST, + .snk = true, + .state_func = bsnk_state_str, + .num_str = 2, +}; + +static struct test_config cfg_bsnk_str_24_1_mbis = { + .cc = LC3_CONFIG_24_1, + .qos = QOS_BCAST, + .snk = true, + .state_func = bsnk_state_str, + .num_str = 2, +}; + +static struct test_config cfg_bsnk_str_24_2_mbis = { + .cc = LC3_CONFIG_24_2, + .qos = QOS_BCAST, + .snk = true, + .state_func = bsnk_state_str, + .num_str = 2, +}; + +static struct test_config cfg_bsnk_str_32_1_mbis = { + .cc = LC3_CONFIG_32_1, + .qos = QOS_BCAST, + .snk = true, + .state_func = bsnk_state_str, + .num_str = 2, +}; + +static struct test_config cfg_bsnk_str_32_2_mbis = { + .cc = LC3_CONFIG_32_2, + .qos = QOS_BCAST, + .snk = true, + .state_func = bsnk_state_str, + .num_str = 2, +}; + +static struct test_config cfg_bsnk_str_44_1_mbis = { + .cc = LC3_CONFIG_44_1, + .qos = QOS_BCAST, + .snk = true, + .state_func = bsnk_state_str, + .num_str = 2, +}; + +static struct test_config cfg_bsnk_str_44_2_mbis = { + .cc = LC3_CONFIG_44_2, + .qos = QOS_BCAST, + .snk = true, + .state_func = bsnk_state_str, + .num_str = 2, +}; + +static struct test_config cfg_bsnk_str_48_1_mbis = { + .cc = LC3_CONFIG_48_1, + .qos = QOS_BCAST, + .snk = true, + .state_func = bsnk_state_str, + .num_str = 2, +}; + +static struct test_config cfg_bsnk_str_48_2_mbis = { + .cc = LC3_CONFIG_48_2, + .qos = QOS_BCAST, + .snk = true, + .state_func = bsnk_state_str, + .num_str = 2, +}; + +static struct test_config cfg_bsnk_str_48_3_mbis = { + .cc = LC3_CONFIG_48_3, + .qos = QOS_BCAST, + .snk = true, + .state_func = bsnk_state_str, + .num_str = 2, +}; + +static struct test_config cfg_bsnk_str_48_4_mbis = { + .cc = LC3_CONFIG_48_4, + .qos = QOS_BCAST, + .snk = true, + .state_func = bsnk_state_str, + .num_str = 2, +}; + +static struct test_config cfg_bsnk_str_48_5_mbis = { + .cc = LC3_CONFIG_48_5, + .qos = QOS_BCAST, + .snk = true, + .state_func = bsnk_state_str, + .num_str = 2, +}; + +static struct test_config cfg_bsnk_str_48_6_mbis = { + .cc = LC3_CONFIG_48_6, + .qos = QOS_BCAST, + .snk = true, + .state_func = bsnk_state_str, + .num_str = 2, +}; + +static struct test_config cfg_bsnk_str_vs_mbis = { + .cc = UTIL_IOV_INIT(VS_CC), + .qos = QOS_BCAST, + .snk = true, + .vs = true, + .state_func = bsnk_state_str, + .num_str = 2, +}; + static void test_bsnk_str(void) { define_test("BAP/BSNK/STR/BV-01-C [BSNK, LC3 8_1]", @@ -6616,6 +6753,57 @@ static void test_bsnk_str(void) define_test("BAP/BSNK/STR/BV-17-C [BSNK, VS]", NULL, test_bcast, &cfg_bsnk_str_vs, IOV_NULL); + + define_test("BAP/BSNK/STR/BV-18-C [BSNK, Multiple BISes, LC3 8_1]", + NULL, test_bcast, &cfg_bsnk_str_8_1_mbis, IOV_NULL); + + define_test("BAP/BSNK/STR/BV-19-C [BSNK, Multiple BISes, LC3 8_2]", + NULL, test_bcast, &cfg_bsnk_str_8_2_mbis, IOV_NULL); + + define_test("BAP/BSNK/STR/BV-20-C [BSNK, Multiple BISes, LC3 16_1]", + NULL, test_bcast, &cfg_bsnk_str_16_1_mbis, IOV_NULL); + + define_test("BAP/BSNK/STR/BV-21-C [BSNK, Multiple BISes, LC3 16_2]", + NULL, test_bcast, &cfg_bsnk_str_16_2_mbis, IOV_NULL); + + define_test("BAP/BSNK/STR/BV-22-C [BSNK, Multiple BISes, LC3 24_1]", + NULL, test_bcast, &cfg_bsnk_str_24_1_mbis, IOV_NULL); + + define_test("BAP/BSNK/STR/BV-23-C [BSNK, Multiple BISes, LC3 24_2]", + NULL, test_bcast, &cfg_bsnk_str_24_2_mbis, IOV_NULL); + + define_test("BAP/BSNK/STR/BV-24-C [BSNK, Multiple BISes, LC3 32_1]", + NULL, test_bcast, &cfg_bsnk_str_32_1_mbis, IOV_NULL); + + define_test("BAP/BSNK/STR/BV-25-C [BSNK, Multiple BISes, LC3 32_2]", + NULL, test_bcast, &cfg_bsnk_str_32_2_mbis, IOV_NULL); + + define_test("BAP/BSNK/STR/BV-26-C [BSNK, Multiple BISes, LC3 44.1_1]", + NULL, test_bcast, &cfg_bsnk_str_44_1_mbis, IOV_NULL); + + define_test("BAP/BSNK/STR/BV-27-C [BSNK, Multiple BISes, LC3 44.1_2]", + NULL, test_bcast, &cfg_bsnk_str_44_2_mbis, IOV_NULL); + + define_test("BAP/BSNK/STR/BV-28-C [BSNK, Multiple BISes, LC3 48_1]", + NULL, test_bcast, &cfg_bsnk_str_48_1_mbis, IOV_NULL); + + define_test("BAP/BSNK/STR/BV-29-C [BSNK, Multiple BISes, LC3 48_2]", + NULL, test_bcast, &cfg_bsnk_str_48_2_mbis, IOV_NULL); + + define_test("BAP/BSNK/STR/BV-30-C [BSNK, Multiple BISes, LC3 48_3]", + NULL, test_bcast, &cfg_bsnk_str_48_3_mbis, IOV_NULL); + + define_test("BAP/BSNK/STR/BV-31-C [BSNK, Multiple BISes, LC3 48_4]", + NULL, test_bcast, &cfg_bsnk_str_48_4_mbis, IOV_NULL); + + define_test("BAP/BSNK/STR/BV-32-C [BSNK, Multiple BISes, LC3 48_5]", + NULL, test_bcast, &cfg_bsnk_str_48_5_mbis, IOV_NULL); + + define_test("BAP/BSNK/STR/BV-33-C [BSNK, Multiple BISes, LC3 48_6]", + NULL, test_bcast, &cfg_bsnk_str_48_6_mbis, IOV_NULL); + + define_test("BAP/BSNK/STR/BV-34-C [BSNK, Multiple BISes, VS]", + NULL, test_bcast, &cfg_bsnk_str_vs_mbis, IOV_NULL); } int main(int argc, char *argv[])