From patchwork Thu Jun 6 10:25:40 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Iulia Tanasescu X-Patchwork-Id: 802711 Received: from EUR02-VI1-obe.outbound.protection.outlook.com (mail-vi1eur02on2075.outbound.protection.outlook.com [40.107.241.75]) (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 8B79A194AF4 for ; Thu, 6 Jun 2024 10:25:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.241.75 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717669561; cv=fail; b=pDWPxq8HGVGoa1b2qnKDaB7IbV4xeEK/T/iIcrdKF9PLsCSsFtHrnGjwV3eXt1FVYnbQAv/xzNgEyuNK1AM+UJ62d+MT5WrK1KJnYvmjAQZ19GyXiRtdoDb4W4jU7hDS8P0B3QIvu5OCiXalXyaXaIYIjHrNWx3cc6Fqwfs/u7c= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717669561; c=relaxed/simple; bh=o3E0CmzPtP2Y50WcmO6nXom6T/AGhwNn1LtRBNI5HWg=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=mN7s9I2gZhGwu5D0WetPGz5ZFeQrWRW0JZ+GQlAGIShLeLsIYXHACYCD7QbpfQPQFDi9vIdjoHrPQIjmOQL6EdbExULmjVvqfdDCYOypeUjpbKU3FYPd0mS2ZNIrnv9Tf+khukf43VQjdhilTHRXFk8gdMtbz2ctZpyDnBtPwm0= 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=OQrQIE2c; arc=fail smtp.client-ip=40.107.241.75 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="OQrQIE2c" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=P3vJ+DohapuqVNYjKbgnDpOBUF8tnFtdH8ufZ5NmnYaQ28PHYDIqOgWhVFfiYDk77LNWk/JzRuV6XOlG8UArTEcHRGja28VGTVeC+2YqnGRXiycPoKW2tx/OyNJwshnz5eiwJ7v5gtndgf0nHcLxaA+F4uX8i1m9P8ItenP1j4F0DxC4DrwacyVq5QY4Sg3Mef3lwKBkn6Rf1wjoWAmobsqn5b8gw7LtwmDsZimLoB/lYu4ISoU6hDMSWwK5JruBgdkfzruKTytRYQejBQM8S5JZWD8K96/gkLIq1KOO0SgFOqmUEWGHuzsJ2Actno63sq5fO+R7hCkMmmgtHsUUDQ== 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=kxo4uK6v4oDkAFv6/JRLWPbZHpdPSTbc0H6ALWFtEsI=; b=gX44jbwKJSiwbMRgIhXbZP8V/j3xCaOnkvB8U4+/Lt/5E0x2T+3WvPQ0XubHmwN2HCDTR2/bOUHWQhuZFmZSrWZ5GMoCBeRSgP7GmtjO/l+hljZv1nY8Zs4dnoapsDGBhAe3I3qGmeaWcUAbMN71Z9MV193hG+8/HSOb7C0/B0TUhhkbdzRNVZ2RGnL7lz+6uWw8oERXGcq6i++DHCrhz/fhE54fI2wQJD7a2R0ILgYHzS0ndekeYRzStqkpgk+CNta7AY4+qv6GnIpGXduoTkO29ArZQwhmiNjNnGCjYVk/cYPkaczmE0bFSv2legQYP6lLQGMAKfG/pXKqNQY3rQ== 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=kxo4uK6v4oDkAFv6/JRLWPbZHpdPSTbc0H6ALWFtEsI=; b=OQrQIE2c0K+TPeV1ZrLD8bucCkCE1wRd82vt26RKFoyZfbryohutX4om+Ho/V4LkiIjpEwqtshsmKJmCS31G8ODVHhM3cXHRLMfGwr/SkGGiYcxZg92TTkZMjDUEESssjlGRDEd172kQpDmPKle5R/+dh1JBgSp9v10T97fMWME= 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 AM0PR04MB7027.eurprd04.prod.outlook.com (2603:10a6:208:191::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7633.33; Thu, 6 Jun 2024 10:25:56 +0000 Received: from AS8PR04MB8898.eurprd04.prod.outlook.com ([fe80::5e22:869c:33c:9654]) by AS8PR04MB8898.eurprd04.prod.outlook.com ([fe80::5e22:869c:33c:9654%5]) with mapi id 15.20.7633.021; Thu, 6 Jun 2024 10:25:56 +0000 From: Iulia Tanasescu To: linux-bluetooth@vger.kernel.org Cc: claudia.rosu@nxp.com, mihai-octavian.urzica@nxp.com, vlad.pruteanu@nxp.com, andrei.istodorescu@nxp.com, luiz.dentz@gmail.com, Iulia Tanasescu Subject: [PATCH BlueZ 1/2] test-bap: Add support to config multiple bsrc streams Date: Thu, 6 Jun 2024 13:25:40 +0300 Message-Id: <20240606102541.5395-2-iulia.tanasescu@nxp.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240606102541.5395-1-iulia.tanasescu@nxp.com> References: <20240606102541.5395-1-iulia.tanasescu@nxp.com> X-ClientProxiedBy: AM0PR06CA0125.eurprd06.prod.outlook.com (2603:10a6:208:ab::30) 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_|AM0PR04MB7027:EE_ X-MS-Office365-Filtering-Correlation-Id: 70e6af8c-9cc4-4689-49a5-08dc86130d1d 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: 26Ox8J09MKKP8eI02G9yXVIpyEjH9K5PTi6olz3aLqXS+NLYAezd0KuuShki0+n1PQYQ0yeM+sHxen9zl0ASVg0lS08S3aiJZ+9URmmL70Q407cJFh2Wo+BVKM9W8jIUmgj13mpzZbv24Pp4ITHZmZrzAT5bg5L1m4SXY3WYQoNaK2fbIZzHQcKi6ZFrL5nserEIoxAsDF7cpKkcBvhYNqPAoiUjFCohG/NC7P201oSkfxUOAGNr2pNWgCU95qr49OLX1DwqBKoWhtdyq1EkXLRrNbgdNeEXP1UAJ8EmutS29FbXfvEK3gA4kZhrSSZy/3P/T9YT3DRjV63gD+TgjY/up7INc76Lcs+CdJeomI7h+xvTYbaBsKPgFDKLYINeG3G6RLSVu7sIe2J8aJ89vausAc/+M1qBkl2M/nbLg8UA9yFwHJSsagvsdpi9JLyGCXHB0Hx34qBcU1fuMD7SrsdxAyd0oDcg0sXmkhPFepUAaPLpRyWs0EifXoeIXVEOvBr4zfXp1CsuzjVYegoM5om+H4gnM5cz3iyQJVmJCRA3kQwoJYZ8vfYpgrnPAJ4rsh94H4GUDZQpco6qO7QTtWl/APpqy42bfPaLH45XKeAt0H2njuh8b4clRlavfaUMIsg6pg0WqNSBMCodyaivvy0WR33U0sgyVzAOPoF46YEgQo6o5MXGQDwcxbxyANSF5ART9ggbzCGj4gBC32UhFSxoRcTtBCZ8xrYlMZV4Dl0u2swCE6Kd6WFRqEzXJTAhOpdlF3SucONkgOlTNIJgl/bmcsAckHbydDMbOYfa3tGXnVnm7Q4kmbKSvNgDsJBgj59MrEiTY4r2UFqenuR/BsvbDwFy7p7IrnmyjSG2xqF/D7BkR1vu9X0PKgnCweGkWhmNaxbl2FtZyXj81Yy5ZG3Zl4wBn6w7cEZ+DjSJP2GTFQ4vyxxT6ZPTRICIsS7ZdiJ9kGbbj6evmkj3S5OMJu/Z24QT4B43bDZ+K5fIU1lvqg2oGKj0ELnPj+WpSfl2nESYfrdJnz42eIBQJLhMZ1XUiUKI3f7ca3VhIfqo82MhjPpTyNYu/JpWSynwZiPE1XnuEgqSI2PPSTfF/ubVQWwhCQrvlhWFXn24xFE1RDTQgHz8Qva9IN+ydvPtQW28wJW48Xkd7f6YpLQ5IFm4gMLcauU+snol5LoGDsa6I5OSWrHzzgNYvOZCyJ6rG/4/jpXtoZKkyHRsWUikcgMyqc/iahDsArwScZjd0jwcboAsAjd8xFKHGGcbUCju6MPDm+Fu5hSTnkIAeOXVqAeGr4EMyZ+Ykl6EQo9/YGLNWd09aGTJVY99c9KU2UIsuTiP 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: DWs3FzFNzAQW8hoDjkE4MX+wohRDGhB0Ll77jqITdt83E63otReHOOobLC5M35RQc5Nd7TwXsrKP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NBrS+SJ0SdYpG30y0dmk1jMGOdilfK5XqVToNOCS7l44lJMqpwkHz9rOcHJEumDjkH/ovsZw8chLmfqVXFS4EuD4Iv8Ax3A5pHfe+vCVRNFr4lp/yVndc3KVllFiegMHvOoinWS2ZyfB0Ko7wokXw1QJ3pMXfj6CY5ufz+hRNmtaRacOUhYywMYOqmFu1yo5C4QP46VBu0p6PjXnvE+1m0tIUcTIj+o9NaHOgV6+PnsHHFxXS+1pqk8Ue2cssvEe5nx0EV+mc5dQDFFMxxBb6Qt9jRcTL88MrKVNa80tZxwLhZX5cALQ3kQE5qfUl0LvYDaM2h1lwu5u7azwQF+lb5wcsFOZw7FRwFI/Lk20J4ZP6g0gg1fi0WmfQH1Rr4fXNtbScz38eFTiC4vBht/m3bnPRAeQbrPyZN9sdProjlRgohTKziPUIOvVBR2iVTieAhsRXBHlA1g1uZ4njvJmcKoajxQ== X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 70e6af8c-9cc4-4689-49a5-08dc86130d1d X-MS-Exchange-CrossTenant-AuthSource: AS8PR04MB8898.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Jun 2024 10:25:56.3210 (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: S6lDpgk8c9S/n2CKZwpLJ6NzA4b8aXlDSsGNkho8QBAfxaSiHqdgUrlbzB9kk1r/VBzHFqOhUZggBt1V1yrxSw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR04MB7027 This adds support to configure multiple bsrc streams. --- unit/test-bap.c | 52 ++++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 45 insertions(+), 7 deletions(-) diff --git a/unit/test-bap.c b/unit/test-bap.c index 638717afc..c37f7676f 100644 --- a/unit/test-bap.c +++ b/unit/test-bap.c @@ -538,15 +538,17 @@ static void bsrc_pac_added(struct bt_bap_pac *pac, void *user_data) bt_bap_pac_set_ops(pac, &bcast_pac_ops, NULL); - stream = bt_bap_stream_new(data->bap, pac, NULL, - &data->cfg->qos, - &data->cfg->cc); - g_assert(stream); + for (uint8_t i = 0; i < data->cfg->streams; i++) { + stream = bt_bap_stream_new(data->bap, pac, NULL, + &data->cfg->qos, + &data->cfg->cc); + g_assert(stream); - queue_push_tail(data->streams, stream); + queue_push_tail(data->streams, stream); - bt_bap_stream_config(stream, &data->cfg->qos, - &data->cfg->cc, NULL, data); + bt_bap_stream_config(stream, &data->cfg->qos, + &data->cfg->cc, NULL, data); + } } static void bsrc_state_cfg(struct bt_bap_stream *stream, uint8_t old_state, @@ -5603,6 +5605,7 @@ static struct test_config cfg_bsrc_8_1_1 = { .base = UTIL_IOV_INIT(BASE_LC3_8_1), .src = true, .state_func = bsrc_state_cfg, + .streams = 1, }; static struct test_config cfg_bsrc_8_1_2 = { @@ -5611,6 +5614,7 @@ static struct test_config cfg_bsrc_8_1_2 = { .base = UTIL_IOV_INIT(BASE_LC3_8_1), .src = true, .state_func = bsrc_state_cfg, + .streams = 1, }; #define LC3_CFG_8_2 \ @@ -5627,6 +5631,7 @@ static struct test_config cfg_bsrc_8_2_1 = { .base = UTIL_IOV_INIT(BASE_LC3_8_2), .src = true, .state_func = bsrc_state_cfg, + .streams = 1, }; static struct test_config cfg_bsrc_8_2_2 = { @@ -5635,6 +5640,7 @@ static struct test_config cfg_bsrc_8_2_2 = { .base = UTIL_IOV_INIT(BASE_LC3_8_2), .src = true, .state_func = bsrc_state_cfg, + .streams = 1, }; #define LC3_CFG_16_1 \ @@ -5651,6 +5657,7 @@ static struct test_config cfg_bsrc_16_1_1 = { .base = UTIL_IOV_INIT(BASE_LC3_16_1), .src = true, .state_func = bsrc_state_cfg, + .streams = 1, }; static struct test_config cfg_bsrc_16_1_2 = { @@ -5659,6 +5666,7 @@ static struct test_config cfg_bsrc_16_1_2 = { .base = UTIL_IOV_INIT(BASE_LC3_16_1), .src = true, .state_func = bsrc_state_cfg, + .streams = 1, }; #define LC3_CFG_16_2 \ @@ -5675,6 +5683,7 @@ static struct test_config cfg_bsrc_16_2_1 = { .base = UTIL_IOV_INIT(BASE_LC3_16_2), .src = true, .state_func = bsrc_state_cfg, + .streams = 1, }; static struct test_config cfg_bsrc_16_2_2 = { @@ -5683,6 +5692,7 @@ static struct test_config cfg_bsrc_16_2_2 = { .base = UTIL_IOV_INIT(BASE_LC3_16_2), .src = true, .state_func = bsrc_state_cfg, + .streams = 1, }; #define LC3_CFG_24_1 \ @@ -5699,6 +5709,7 @@ static struct test_config cfg_bsrc_24_1_1 = { .base = UTIL_IOV_INIT(BASE_LC3_24_1), .src = true, .state_func = bsrc_state_cfg, + .streams = 1, }; static struct test_config cfg_bsrc_24_1_2 = { @@ -5707,6 +5718,7 @@ static struct test_config cfg_bsrc_24_1_2 = { .base = UTIL_IOV_INIT(BASE_LC3_24_1), .src = true, .state_func = bsrc_state_cfg, + .streams = 1, }; #define LC3_CFG_24_2 \ @@ -5723,6 +5735,7 @@ static struct test_config cfg_bsrc_24_2_1 = { .base = UTIL_IOV_INIT(BASE_LC3_24_2), .src = true, .state_func = bsrc_state_cfg, + .streams = 1, }; static struct test_config cfg_bsrc_24_2_2 = { @@ -5731,6 +5744,7 @@ static struct test_config cfg_bsrc_24_2_2 = { .base = UTIL_IOV_INIT(BASE_LC3_24_2), .src = true, .state_func = bsrc_state_cfg, + .streams = 1, }; #define LC3_CFG_32_1 \ @@ -5747,6 +5761,7 @@ static struct test_config cfg_bsrc_32_1_1 = { .base = UTIL_IOV_INIT(BASE_LC3_32_1), .src = true, .state_func = bsrc_state_cfg, + .streams = 1, }; static struct test_config cfg_bsrc_32_1_2 = { @@ -5755,6 +5770,7 @@ static struct test_config cfg_bsrc_32_1_2 = { .base = UTIL_IOV_INIT(BASE_LC3_32_1), .src = true, .state_func = bsrc_state_cfg, + .streams = 1, }; #define LC3_CFG_32_2 \ @@ -5771,6 +5787,7 @@ static struct test_config cfg_bsrc_32_2_1 = { .base = UTIL_IOV_INIT(BASE_LC3_32_2), .src = true, .state_func = bsrc_state_cfg, + .streams = 1, }; static struct test_config cfg_bsrc_32_2_2 = { @@ -5779,6 +5796,7 @@ static struct test_config cfg_bsrc_32_2_2 = { .base = UTIL_IOV_INIT(BASE_LC3_32_2), .src = true, .state_func = bsrc_state_cfg, + .streams = 1, }; #define LC3_CFG_44_1 \ @@ -5795,6 +5813,7 @@ static struct test_config cfg_bsrc_44_1_1 = { .base = UTIL_IOV_INIT(BASE_LC3_44_1), .src = true, .state_func = bsrc_state_cfg, + .streams = 1, }; static struct test_config cfg_bsrc_44_1_2 = { @@ -5803,6 +5822,7 @@ static struct test_config cfg_bsrc_44_1_2 = { .base = UTIL_IOV_INIT(BASE_LC3_44_1), .src = true, .state_func = bsrc_state_cfg, + .streams = 1, }; #define LC3_CFG_44_2 \ @@ -5819,6 +5839,7 @@ static struct test_config cfg_bsrc_44_2_1 = { .base = UTIL_IOV_INIT(BASE_LC3_44_2), .src = true, .state_func = bsrc_state_cfg, + .streams = 1, }; static struct test_config cfg_bsrc_44_2_2 = { @@ -5827,6 +5848,7 @@ static struct test_config cfg_bsrc_44_2_2 = { .base = UTIL_IOV_INIT(BASE_LC3_44_2), .src = true, .state_func = bsrc_state_cfg, + .streams = 1, }; #define LC3_CFG_48_1 \ @@ -5843,6 +5865,7 @@ static struct test_config cfg_bsrc_48_1_1 = { .base = UTIL_IOV_INIT(BASE_LC3_48_1), .src = true, .state_func = bsrc_state_cfg, + .streams = 1, }; static struct test_config cfg_bsrc_48_1_2 = { @@ -5851,6 +5874,7 @@ static struct test_config cfg_bsrc_48_1_2 = { .base = UTIL_IOV_INIT(BASE_LC3_48_1), .src = true, .state_func = bsrc_state_cfg, + .streams = 1, }; #define LC3_CFG_48_2 \ @@ -5867,6 +5891,7 @@ static struct test_config cfg_bsrc_48_2_1 = { .base = UTIL_IOV_INIT(BASE_LC3_48_2), .src = true, .state_func = bsrc_state_cfg, + .streams = 1, }; static struct test_config cfg_bsrc_48_2_2 = { @@ -5875,6 +5900,7 @@ static struct test_config cfg_bsrc_48_2_2 = { .base = UTIL_IOV_INIT(BASE_LC3_48_2), .src = true, .state_func = bsrc_state_cfg, + .streams = 1, }; #define LC3_CFG_48_3 \ @@ -5891,6 +5917,7 @@ static struct test_config cfg_bsrc_48_3_1 = { .base = UTIL_IOV_INIT(BASE_LC3_48_3), .src = true, .state_func = bsrc_state_cfg, + .streams = 1, }; static struct test_config cfg_bsrc_48_3_2 = { @@ -5899,6 +5926,7 @@ static struct test_config cfg_bsrc_48_3_2 = { .base = UTIL_IOV_INIT(BASE_LC3_48_3), .src = true, .state_func = bsrc_state_cfg, + .streams = 1, }; #define LC3_CFG_48_4 \ @@ -5915,6 +5943,7 @@ static struct test_config cfg_bsrc_48_4_1 = { .base = UTIL_IOV_INIT(BASE_LC3_48_4), .src = true, .state_func = bsrc_state_cfg, + .streams = 1, }; static struct test_config cfg_bsrc_48_4_2 = { @@ -5923,6 +5952,7 @@ static struct test_config cfg_bsrc_48_4_2 = { .base = UTIL_IOV_INIT(BASE_LC3_48_4), .src = true, .state_func = bsrc_state_cfg, + .streams = 1, }; #define LC3_CFG_48_5 \ @@ -5939,6 +5969,7 @@ static struct test_config cfg_bsrc_48_5_1 = { .base = UTIL_IOV_INIT(BASE_LC3_48_5), .src = true, .state_func = bsrc_state_cfg, + .streams = 1, }; static struct test_config cfg_bsrc_48_5_2 = { @@ -5947,6 +5978,7 @@ static struct test_config cfg_bsrc_48_5_2 = { .base = UTIL_IOV_INIT(BASE_LC3_48_5), .src = true, .state_func = bsrc_state_cfg, + .streams = 1, }; #define LC3_CFG_48_6 \ @@ -5963,6 +5995,7 @@ static struct test_config cfg_bsrc_48_6_1 = { .base = UTIL_IOV_INIT(BASE_LC3_48_6), .src = true, .state_func = bsrc_state_cfg, + .streams = 1, }; static struct test_config cfg_bsrc_48_6_2 = { @@ -5971,6 +6004,7 @@ static struct test_config cfg_bsrc_48_6_2 = { .base = UTIL_IOV_INIT(BASE_LC3_48_6), .src = true, .state_func = bsrc_state_cfg, + .streams = 1, }; #define VS_CC \ @@ -6007,6 +6041,7 @@ static struct test_config cfg_bsrc_vs = { .vs = true, .src = true, .state_func = bsrc_state_cfg, + .streams = 1, }; /* Test Purpose: @@ -6152,6 +6187,7 @@ static struct test_config cfg_bsrc_8_1_1_estab = { .qos = LC3_QOS_8_1_1_B, .src = true, .state_func = bsrc_state_estab, + .streams = 1, }; /* Test Purpose: @@ -6196,6 +6232,7 @@ static struct test_config cfg_bsrc_8_1_1_disable = { .qos = LC3_QOS_8_1_1_B, .src = true, .state_func = bsrc_state_disable, + .streams = 1, }; /* Test Purpose: @@ -6241,6 +6278,7 @@ static struct test_config cfg_bsrc_8_1_1_release = { .qos = LC3_QOS_8_1_1_B, .src = true, .state_func = bsrc_state_release, + .streams = 1, }; /* Test Purpose: From patchwork Thu Jun 6 10:25:41 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Iulia Tanasescu X-Patchwork-Id: 802124 Received: from EUR02-VI1-obe.outbound.protection.outlook.com (mail-vi1eur02on2075.outbound.protection.outlook.com [40.107.241.75]) (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 73835195391 for ; Thu, 6 Jun 2024 10:26:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.241.75 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717669563; cv=fail; b=GTa8Xskl8jf+kO7k8egpvylrEgwG0eZvU297N9JLXdenouBUXOulWT1N7uVcY+PDw4x0xImT4gcVKgMruT84I+M5YfzLuNFOsQkLKdZdiWUKVtXi1bHpAkqg0bIid2L629IT5nCkWOjybCU0v1RU2TY/Q9mAI+t32cyn8HIVCBA= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717669563; c=relaxed/simple; bh=DZz2+fKtjV2mK0A3xBxVj6yy8WyC16Dd24CLMatOgio=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=Ygjzre7/maIRPdwDjcUiMo0vWPeSmMbBlxU5CbDFOAJJaJ+pjGAnDTzy4VgxNWAgKapf6il/FnE3L2N5M39uTb0Li1tXpBlGm8KlU3be7wK2g8XJ6IRKTl7hqorGzdKuZGU9OugLJpEQqBx1lfkHkWz0W9NRepNRw7arGAyRDwA= 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=cNAzy8Ze; arc=fail smtp.client-ip=40.107.241.75 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="cNAzy8Ze" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=VDqhqTLhNmL4/PhMaNYLNz4iboiLwukrWQey8IZGsDkDrOg/sYt2/ncBzh3OcNZLorZuzxjNJxEgs3Bb+4SR9B1ckRXYKOV5Xm5GXDyTHtQqfrevLQHcq1+VjdXNDSHAeL7klZE9++nipZwCO+N/IWT6jmZfI1HFD1IFxAxelKGt8N4rzA4H2/arYGc26uo4D6T9RxoECyd8Rk6eerPREnsKoqsAoXIo2Z7BcRssmsHMuxDkMP8v76NsDCgDij3thd/FC87OBplzqjM+dTVMSwY1R4gkntP/cepG217WhoCRHth4YNEkXSoJjLvmrtduY22hPNw3SxPQSYI/f7uxiA== 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=dmuvce2D46eFcsIEV9BiNshu/516pgVSogRgg82sMRs=; b=Rw57Inj+owZVbb6tZrPA42KtjnAsXLjaQnZ1d//WuWeF1UtdlDhdZ4AB1RhRwm8htP4KQEJULw/KXnGIAYmjpcBDSRvXlS62Gp9EQ1Lcl8cxKQktNwSLqCRr08WWXW8vY3GvNFnupKW++mblHwZ/G9oa/jYsbdD+8Wcy5xPP2ZdAfgJSVdKxgNsePiSsq7dYJBQL4Mkyj+zwB+SFlLe4R16Wm9LZZCS+ApJSZutj+uJ0SWNZ/U3lBIV4L6hKzTAVmIF1J6iAzzfSoeyGGJYUo+rUvfR2G1Qx3Ja1R7ZDZvS4S9jDuRVLI/m1o50Mv9L2QNrYt5P93yZPFf6B6tZBjg== 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=dmuvce2D46eFcsIEV9BiNshu/516pgVSogRgg82sMRs=; b=cNAzy8ZeJmFqZdDmQtg+xjK0VuGeT9k7o+R43sAyepdtFRIVZT28Gaef9er2ZD3v7FT276W+TGRMqarrBek4ty0o2nA3O1VAVAPNnfa/HX/iLJpTXUqNL95u/qIQnR+Daj1vf6niLiBY0uHun01bs7b3cyOGBHv+qSNI5lXoGrY= 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 AM0PR04MB7027.eurprd04.prod.outlook.com (2603:10a6:208:191::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7633.33; Thu, 6 Jun 2024 10:25:59 +0000 Received: from AS8PR04MB8898.eurprd04.prod.outlook.com ([fe80::5e22:869c:33c:9654]) by AS8PR04MB8898.eurprd04.prod.outlook.com ([fe80::5e22:869c:33c:9654%5]) with mapi id 15.20.7633.021; Thu, 6 Jun 2024 10:25:59 +0000 From: Iulia Tanasescu To: linux-bluetooth@vger.kernel.org Cc: claudia.rosu@nxp.com, mihai-octavian.urzica@nxp.com, vlad.pruteanu@nxp.com, andrei.istodorescu@nxp.com, luiz.dentz@gmail.com, Iulia Tanasescu Subject: [PATCH BlueZ 2/2] test-bap: Add Broadcast Source STR MBIS tests Date: Thu, 6 Jun 2024 13:25:41 +0300 Message-Id: <20240606102541.5395-3-iulia.tanasescu@nxp.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240606102541.5395-1-iulia.tanasescu@nxp.com> References: <20240606102541.5395-1-iulia.tanasescu@nxp.com> X-ClientProxiedBy: AM9P250CA0023.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:21c::28) 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_|AM0PR04MB7027:EE_ X-MS-Office365-Filtering-Correlation-Id: f40ab772-86e4-4aea-3c62-08dc86130eeb 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: +0/VezfuNivTH03/qmaYqE4w5sB4fqr0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dMjHx5M8MehQ0+HXIbDfxu/d9AM5gIW0qQt1KDkYn2qpdxzgzipLyfAAhWw8kXthP0VL3VYSpjVgyqG1bSDHRjmcYkojgb3R5pPRor3uHEcsXE9/QTljKjwH2JCYoLVJ+8U8QOs7l9xluIdfiQvye5EuvQsygisb1Z5Dn659/2vRTFohzmgeknOqDc2chjAlYqzBUz+uoZOq4QL3tfDXbdEE8r0OFd8MRKN8hzrR7YR 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: 1IYP0eRa8I+X1teUeKrQUAItCh3wO2q1zpJcNejqPDKstcm9T4kL8EfeqPH11CLEoyflFzK7vTi2KwJrBwSmC5m5SSYn8mITeBBTwACL0w7f5JOwBp/jbo15s8/VPgW3LoQLCm+oMwD3SsWC+Vl87I82qIHWmz5m0Fj5HhufqkEDIW7JT8QYRN8GuaRfCI/SWABz6SzCZZnFOiPObwtJ4SbiXudsl30hYzNincwknJ/xiwWBjiibY83X26nuFNEo0eaOio4PiHNcEiAKRmrBS8oOx6wSfyKETnax/aUtb7iEi7PRmQNE1nPHpvInEPkVR84mK1Yabj/ZxWCvlL1QrO78a8IOMcqNnt5j55ctccga9WsBEIQidMj27wVSuXYz2q6odv+EyUzlhqF/wjMBpsFyPBA6POXbhpvrFI9CVX2cQ+9qhxjwJZfz8Fbm1C4LAHRhxpz9FGT8CmCNxwbbzjjJQgyyYV2XpELA7s+Oxlz7o5yTVAha2dmgG4kqzMGzdjxtQDjBPqK5a+jg7t0GEm9Rwaxoso1Ffql6Pdaa3wO498/yd+zLvRFpWG/bGmvbQ/t4Zc4u5+SS2WDmcYddCBVseGBnCn5zTTXd6Gsg9gbtoHmAdS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ossTenant-AuthSource: AS8PR04MB8898.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Jun 2024 10:25:59.4249 (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: kMIZE6pW6EVlqUfM0zkSwIIeKplwRErrGAQ5WqTIa7Z4tW58N9OnGCCkF+tjJSvbc20EMBBij+B8AHx5pL9eqg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR04MB7027 4.14.3 Broadcast Audio Stream with Multiple BISes - Source Test Purpose: Verify that a Broadcast Source IUT can stream multiple BISes to a Broadcast Sink. Test Case Configuration: BAP/BSRC/STR/BV-18-C [BSRC, Multiple BISes, LC3 8_1] BAP/BSRC/STR/BV-19-C [BSRC, Multiple BISes, LC3 8_2] BAP/BSRC/STR/BV-20-C [BSRC, Multiple BISes, LC3 16_1] BAP/BSRC/STR/BV-21-C [BSRC, Multiple BISes, LC3 16_2] BAP/BSRC/STR/BV-22-C [BSRC, Multiple BISes, LC3 24_1] BAP/BSRC/STR/BV-23-C [BSRC, Multiple BISes, LC3 24_2] BAP/BSRC/STR/BV-24-C [BSRC, Multiple BISes, LC3 32_1] BAP/BSRC/STR/BV-25-C [BSRC, Multiple BISes, LC3 32_2] BAP/BSRC/STR/BV-26-C [BSRC, Multiple BISes, LC3 44.1_1] BAP/BSRC/STR/BV-27-C [BSRC, Multiple BISes, LC3 44.1_2] BAP/BSRC/STR/BV-28-C [BSRC, Multiple BISes, LC3 48_1] BAP/BSRC/STR/BV-29-C [BSRC, Multiple BISes, LC3 48_2] BAP/BSRC/STR/BV-30-C [BSRC, Multiple BISes, LC3 48_3] BAP/BSRC/STR/BV-31-C [BSRC, Multiple BISes, LC3 48_4] BAP/BSRC/STR/BV-32-C [BSRC, Multiple BISes, LC3 48_5] BAP/BSRC/STR/BV-33-C [BSRC, Multiple BISes, LC3 48_6] BAP/BSRC/STR/BV-34-C [BSRC, Multiple BISes, VS] Pass verdict: If the Codec ID is LC3, the IUT sends encoded LC3 audio data in BIS Data PDUs on each synchronized BIS. If the Codec ID is a vendor-specific Codec ID, the IUT sends 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.83. Test Summary ------------ BAP/BSRC/STR/BV-18-C [BSRC, Multiple BISes, LC3 8_1] Passed BAP/BSRC/STR/BV-19-C [BSRC, Multiple BISes, LC3 8_2] Passed BAP/BSRC/STR/BV-20-C [BSRC, Multiple BISes, LC3 16_1] Passed BAP/BSRC/STR/BV-21-C [BSRC, Multiple BISes, LC3 16_2] Passed BAP/BSRC/STR/BV-22-C [BSRC, Multiple BISes, LC3 24_1] Passed BAP/BSRC/STR/BV-23-C [BSRC, Multiple BISes, LC3 24_2] Passed BAP/BSRC/STR/BV-24-C [BSRC, Multiple BISes, LC3 32_1] Passed BAP/BSRC/STR/BV-25-C [BSRC, Multiple BISes, LC3 32_2] Passed BAP/BSRC/STR/BV-26-C [BSRC, Multiple BISes, LC3 44.1_1] Passed BAP/BSRC/STR/BV-27-C [BSRC, Multiple BISes, LC3 44.1_2] Passed BAP/BSRC/STR/BV-28-C [BSRC, Multiple BISes, LC3 48_1] Passed BAP/BSRC/STR/BV-29-C [BSRC, Multiple BISes, LC3 48_2] Passed BAP/BSRC/STR/BV-30-C [BSRC, Multiple BISes, LC3 48_3] Passed BAP/BSRC/STR/BV-31-C [BSRC, Multiple BISes, LC3 48_4] Passed BAP/BSRC/STR/BV-32-C [BSRC, Multiple BISes, LC3 48_5] Passed BAP/BSRC/STR/BV-33-C [BSRC, Multiple BISes, LC3 48_6] Passed BAP/BSRC/STR/BV-34-C [BSRC, Multiple BISes, VS] Passed --- unit/test-bap.c | 354 ++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 346 insertions(+), 8 deletions(-) diff --git a/unit/test-bap.c b/unit/test-bap.c index c37f7676f..30c223d16 100644 --- a/unit/test-bap.c +++ b/unit/test-bap.c @@ -6972,27 +6972,86 @@ static void test_bsnk_str(void) NULL, test_bcast, &cfg_bsnk_str_vs_mbis, IOV_NULL); } +static void stream_count_config(void *data, void *user_data) +{ + struct bt_bap_stream *stream = data; + uint8_t *streams = user_data; + + if (bt_bap_stream_get_state(stream) == BT_BAP_STREAM_STATE_CONFIG) + (*streams)++; +} + +static void stream_count_enabling(void *data, void *user_data) +{ + struct bt_bap_stream *stream = data; + uint8_t *streams = user_data; + + if (bt_bap_stream_get_state(stream) == BT_BAP_STREAM_STATE_ENABLING) + (*streams)++; +} + +static void stream_enable(void *data, void *user_data) +{ + struct bt_bap_stream *stream = data; + + bt_bap_stream_enable(stream, true, NULL, NULL, NULL); +} + +static void stream_start(void *data, void *user_data) +{ + struct bt_bap_stream *stream = data; + + bt_bap_stream_start(stream, NULL, NULL); +} + static void bsrc_state_str(struct bt_bap_stream *stream, uint8_t old_state, uint8_t new_state, void *user_data) { struct test_data *data = user_data; + uint8_t streams = 0; switch (new_state) { case BT_BAP_STREAM_STATE_CONFIG: - bt_bap_stream_enable(stream, true, NULL, NULL, NULL); + queue_foreach(data->streams, stream_count_config, &streams); + + if (streams == data->cfg->streams) + /* After all streams have transitioned to CONFIG + * state, enable each one. + */ + queue_foreach(data->streams, stream_enable, NULL); break; case BT_BAP_STREAM_STATE_ENABLING: - data->base = bt_bap_stream_get_base(stream); + queue_foreach(data->streams, stream_count_enabling, &streams); - g_assert(data->base); - g_assert(data->base->iov_len == data->cfg->base.iov_len); - g_assert(memcmp(data->base->iov_base, data->cfg->base.iov_base, - data->base->iov_len) == 0); + if (streams == 1) { + /* After the first stream has transitioned to ENABLING + * state, bt_bap_stream_get_base will generate the + * BASE from all previously configured streams. + */ + data->base = bt_bap_stream_get_base(stream); + + g_assert(data->base); + g_assert(data->base->iov_len == + data->cfg->base.iov_len); + g_assert(memcmp(data->base->iov_base, + data->cfg->base.iov_base, + data->base->iov_len) == 0); + } - bt_bap_stream_start(stream, NULL, NULL); + if (streams == data->cfg->streams) + /* After all streams have transitioned to ENABLING + * state, start each one. + */ + queue_foreach(data->streams, stream_start, NULL); break; case BT_BAP_STREAM_STATE_STREAMING: - tester_test_passed(); + queue_foreach(data->streams, stream_count_streaming, &streams); + + if (streams == data->cfg->streams) + /* Test is completed after all streams have transitioned + * to STREAMING state. + */ + tester_test_passed(); break; } } @@ -7225,9 +7284,288 @@ static void test_bsrc_str_1b(void) NULL, test_bcast, &cfg_bsrc_str_vs, IOV_NULL); } +#define BASE_LC3_8_1_MBIS \ + BASE_LC3(40000, 1, 2, LC3_CFG_8_1, 0x00, 0x01, 0x00, 0x02, 0x00) + +static struct test_config cfg_bsrc_str_8_1_mbis = { + .cc = LC3_CONFIG_8_1, + .qos = LC3_QOS_8_1_1_B, + .base = UTIL_IOV_INIT(BASE_LC3_8_1_MBIS), + .src = true, + .state_func = bsrc_state_str, + .streams = 2, +}; + +#define BASE_LC3_8_2_MBIS \ + BASE_LC3(40000, 1, 2, LC3_CFG_8_2, 0x00, 0x01, 0x00, 0x02, 0x00) + +static struct test_config cfg_bsrc_str_8_2_mbis = { + .cc = LC3_CONFIG_8_2, + .qos = LC3_QOS_8_2_1_B, + .base = UTIL_IOV_INIT(BASE_LC3_8_2_MBIS), + .src = true, + .state_func = bsrc_state_str, + .streams = 2, +}; + +#define BASE_LC3_16_1_MBIS \ + BASE_LC3(40000, 1, 2, LC3_CFG_16_1, 0x00, 0x01, 0x00, 0x02, 0x00) + +static struct test_config cfg_bsrc_str_16_1_mbis = { + .cc = LC3_CONFIG_16_1, + .qos = LC3_QOS_16_1_1_B, + .base = UTIL_IOV_INIT(BASE_LC3_16_1_MBIS), + .src = true, + .state_func = bsrc_state_str, + .streams = 2, +}; + +#define BASE_LC3_16_2_MBIS \ + BASE_LC3(40000, 1, 2, LC3_CFG_16_2, 0x00, 0x01, 0x00, 0x02, 0x00) + +static struct test_config cfg_bsrc_str_16_2_mbis = { + .cc = LC3_CONFIG_16_2, + .qos = LC3_QOS_16_2_1_B, + .base = UTIL_IOV_INIT(BASE_LC3_16_2_MBIS), + .src = true, + .state_func = bsrc_state_str, + .streams = 2, +}; + +#define BASE_LC3_24_1_MBIS \ + BASE_LC3(40000, 1, 2, LC3_CFG_24_1, 0x00, 0x01, 0x00, 0x02, 0x00) + +static struct test_config cfg_bsrc_str_24_1_mbis = { + .cc = LC3_CONFIG_24_1, + .qos = LC3_QOS_24_1_1_B, + .base = UTIL_IOV_INIT(BASE_LC3_24_1_MBIS), + .src = true, + .state_func = bsrc_state_str, + .streams = 2, +}; + +#define BASE_LC3_24_2_MBIS \ + BASE_LC3(40000, 1, 2, LC3_CFG_24_2, 0x00, 0x01, 0x00, 0x02, 0x00) + +static struct test_config cfg_bsrc_str_24_2_mbis = { + .cc = LC3_CONFIG_24_2, + .qos = LC3_QOS_24_2_1_B, + .base = UTIL_IOV_INIT(BASE_LC3_24_2_MBIS), + .src = true, + .state_func = bsrc_state_str, + .streams = 2, +}; + +#define BASE_LC3_32_1_MBIS \ + BASE_LC3(40000, 1, 2, LC3_CFG_32_1, 0x00, 0x01, 0x00, 0x02, 0x00) + +static struct test_config cfg_bsrc_str_32_1_mbis = { + .cc = LC3_CONFIG_32_1, + .qos = LC3_QOS_32_1_1_B, + .base = UTIL_IOV_INIT(BASE_LC3_32_1_MBIS), + .src = true, + .state_func = bsrc_state_str, + .streams = 2, +}; + +#define BASE_LC3_32_2_MBIS \ + BASE_LC3(40000, 1, 2, LC3_CFG_32_2, 0x00, 0x01, 0x00, 0x02, 0x00) + +static struct test_config cfg_bsrc_str_32_2_mbis = { + .cc = LC3_CONFIG_32_2, + .qos = LC3_QOS_32_2_1_B, + .base = UTIL_IOV_INIT(BASE_LC3_32_2_MBIS), + .src = true, + .state_func = bsrc_state_str, + .streams = 2, +}; + +#define BASE_LC3_44_1_MBIS \ + BASE_LC3(40000, 1, 2, LC3_CFG_44_1, 0x00, 0x01, 0x00, 0x02, 0x00) + +static struct test_config cfg_bsrc_str_44_1_mbis = { + .cc = LC3_CONFIG_44_1, + .qos = LC3_QOS_44_1_1_B, + .base = UTIL_IOV_INIT(BASE_LC3_44_1_MBIS), + .src = true, + .state_func = bsrc_state_str, + .streams = 2, +}; + +#define BASE_LC3_44_2_MBIS \ + BASE_LC3(40000, 1, 2, LC3_CFG_44_2, 0x00, 0x01, 0x00, 0x02, 0x00) + +static struct test_config cfg_bsrc_str_44_2_mbis = { + .cc = LC3_CONFIG_44_2, + .qos = LC3_QOS_44_2_1_B, + .base = UTIL_IOV_INIT(BASE_LC3_44_2_MBIS), + .src = true, + .state_func = bsrc_state_str, + .streams = 2, +}; + +#define BASE_LC3_48_1_MBIS \ + BASE_LC3(40000, 1, 2, LC3_CFG_48_1, 0x00, 0x01, 0x00, 0x02, 0x00) + +static struct test_config cfg_bsrc_str_48_1_mbis = { + .cc = LC3_CONFIG_48_1, + .qos = LC3_QOS_48_1_1_B, + .base = UTIL_IOV_INIT(BASE_LC3_48_1_MBIS), + .src = true, + .state_func = bsrc_state_str, + .streams = 2, +}; + +#define BASE_LC3_48_2_MBIS \ + BASE_LC3(40000, 1, 2, LC3_CFG_48_2, 0x00, 0x01, 0x00, 0x02, 0x00) + +static struct test_config cfg_bsrc_str_48_2_mbis = { + .cc = LC3_CONFIG_48_2, + .qos = LC3_QOS_48_2_1_B, + .base = UTIL_IOV_INIT(BASE_LC3_48_2_MBIS), + .src = true, + .state_func = bsrc_state_str, + .streams = 2, +}; + +#define BASE_LC3_48_3_MBIS \ + BASE_LC3(40000, 1, 2, LC3_CFG_48_3, 0x00, 0x01, 0x00, 0x02, 0x00) + +static struct test_config cfg_bsrc_str_48_3_mbis = { + .cc = LC3_CONFIG_48_3, + .qos = LC3_QOS_48_3_1_B, + .base = UTIL_IOV_INIT(BASE_LC3_48_3_MBIS), + .src = true, + .state_func = bsrc_state_str, + .streams = 2, +}; + +#define BASE_LC3_48_4_MBIS \ + BASE_LC3(40000, 1, 2, LC3_CFG_48_4, 0x00, 0x01, 0x00, 0x02, 0x00) + +static struct test_config cfg_bsrc_str_48_4_mbis = { + .cc = LC3_CONFIG_48_4, + .qos = LC3_QOS_48_4_1_B, + .base = UTIL_IOV_INIT(BASE_LC3_48_4_MBIS), + .src = true, + .state_func = bsrc_state_str, + .streams = 2, +}; + +#define BASE_LC3_48_5_MBIS \ + BASE_LC3(40000, 1, 2, LC3_CFG_48_5, 0x00, 0x01, 0x00, 0x02, 0x00) + +static struct test_config cfg_bsrc_str_48_5_mbis = { + .cc = LC3_CONFIG_48_5, + .qos = LC3_QOS_48_5_1_B, + .base = UTIL_IOV_INIT(BASE_LC3_48_5_MBIS), + .src = true, + .state_func = bsrc_state_str, + .streams = 2, +}; + +#define BASE_LC3_48_6_MBIS \ + BASE_LC3(40000, 1, 2, LC3_CFG_48_6, 0x00, 0x01, 0x00, 0x02, 0x00) + +static struct test_config cfg_bsrc_str_48_6_mbis = { + .cc = LC3_CONFIG_48_6, + .qos = LC3_QOS_48_6_1_B, + .base = UTIL_IOV_INIT(BASE_LC3_48_6_MBIS), + .src = true, + .state_func = bsrc_state_str, + .streams = 2, +}; + +#define BASE_VS_MBIS \ + BASE(40000, 1, 2, 0xFF, 0x00, 0x00, 0x00, 0x00, \ + VS_CFG, 0x00, 0x01, 0x00, 0x02, 0x00) + +static struct test_config cfg_bsrc_str_vs_mbis = { + .cc = UTIL_IOV_INIT(VS_CC), + .qos = QOS_BCAST, + .base = UTIL_IOV_INIT(BASE_VS_MBIS), + .src = true, + .state_func = bsrc_state_str, + .vs = true, + .streams = 2, +}; + +/* Test Purpose: + * Verify that a Broadcast Source IUT can stream multiple BISes to + * a Broadcast Sink. The verification is performed for each set of + * parameters in turn, as specified in Table 4.82. + * + * Pass verdict: + * If the Codec ID is LC3, the IUT sends encoded LC3 audio data in + * BIS Data PDUs on each synchronized BIS. + * + * If the Codec ID is a vendor-specific Codec ID, the IUT sends 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.83. + */ +static void test_bsrc_str_2b(void) +{ + define_test("BAP/BSRC/STR/BV-18-C [BSRC, Multiple BISes, LC3 8_1]", + NULL, test_bcast, &cfg_bsrc_str_8_1_mbis, IOV_NULL); + + define_test("BAP/BSRC/STR/BV-19-C [BSRC, Multiple BISes, LC3 8_2]", + NULL, test_bcast, &cfg_bsrc_str_8_2_mbis, IOV_NULL); + + define_test("BAP/BSRC/STR/BV-20-C [BSRC, Multiple BISes, LC3 16_1]", + NULL, test_bcast, &cfg_bsrc_str_16_1_mbis, IOV_NULL); + + define_test("BAP/BSRC/STR/BV-21-C [BSRC, Multiple BISes, LC3 16_2]", + NULL, test_bcast, &cfg_bsrc_str_16_2_mbis, IOV_NULL); + + define_test("BAP/BSRC/STR/BV-22-C [BSRC, Multiple BISes, LC3 24_1]", + NULL, test_bcast, &cfg_bsrc_str_24_1_mbis, IOV_NULL); + + define_test("BAP/BSRC/STR/BV-23-C [BSRC, Multiple BISes, LC3 24_2]", + NULL, test_bcast, &cfg_bsrc_str_24_2_mbis, IOV_NULL); + + define_test("BAP/BSRC/STR/BV-24-C [BSRC, Multiple BISes, LC3 32_1]", + NULL, test_bcast, &cfg_bsrc_str_32_1_mbis, IOV_NULL); + + define_test("BAP/BSRC/STR/BV-25-C [BSRC, Multiple BISes, LC3 32_2]", + NULL, test_bcast, &cfg_bsrc_str_32_2_mbis, IOV_NULL); + + define_test("BAP/BSRC/STR/BV-26-C [BSRC, Multiple BISes, LC3 44.1_1]", + NULL, test_bcast, &cfg_bsrc_str_44_1_mbis, IOV_NULL); + + define_test("BAP/BSRC/STR/BV-27-C [BSRC, Multiple BISes, LC3 44.1_2]", + NULL, test_bcast, &cfg_bsrc_str_44_2_mbis, IOV_NULL); + + define_test("BAP/BSRC/STR/BV-28-C [BSRC, Multiple BISes, LC3 48_1]", + NULL, test_bcast, &cfg_bsrc_str_48_1_mbis, IOV_NULL); + + define_test("BAP/BSRC/STR/BV-29-C [BSRC, Multiple BISes, LC3 48_2]", + NULL, test_bcast, &cfg_bsrc_str_48_2_mbis, IOV_NULL); + + define_test("BAP/BSRC/STR/BV-30-C [BSRC, Multiple BISes, LC3 48_3]", + NULL, test_bcast, &cfg_bsrc_str_48_3_mbis, IOV_NULL); + + define_test("BAP/BSRC/STR/BV-31-C [BSRC, Multiple BISes, LC3 48_4]", + NULL, test_bcast, &cfg_bsrc_str_48_4_mbis, IOV_NULL); + + define_test("BAP/BSRC/STR/BV-32-C [BSRC, Multiple BISes, LC3 48_5]", + NULL, test_bcast, &cfg_bsrc_str_48_5_mbis, IOV_NULL); + + define_test("BAP/BSRC/STR/BV-33-C [BSRC, Multiple BISes, LC3 48_6]", + NULL, test_bcast, &cfg_bsrc_str_48_6_mbis, IOV_NULL); + + define_test("BAP/BSRC/STR/BV-34-C [BSRC, Multiple BISes, VS]", + NULL, test_bcast, &cfg_bsrc_str_vs_mbis, IOV_NULL); +} + static void test_bsrc_str(void) { test_bsrc_str_1b(); + test_bsrc_str_2b(); } int main(int argc, char *argv[])