From patchwork Tue Jun 25 07:27:07 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Iulia Tanasescu X-Patchwork-Id: 13710732 Received: from EUR03-DBA-obe.outbound.protection.outlook.com (mail-dbaeur03on2059.outbound.protection.outlook.com [40.107.104.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 07E43146D6C for ; Tue, 25 Jun 2024 07:27:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.104.59 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719300444; cv=fail; b=oVWf/yFQBPyaNZIKyRhS90+5YFNM/wSUcjCXaG8G2t2KHB6m5AUd4G0Eq1mcaJ+re3Z+tMZpun+yuJAzl927mU2P6AGpBwqeOE+D5+GES5OxO/T21hCETyiuVz3B4CN0YZDkz1Y6LZfQX/Su2GesfuA6qTrcZ5HYtGcZaB0Akfs= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719300444; c=relaxed/simple; bh=cNkm6LpCNWpoB7AL5WYUR7eDLH7lGIMFabnAEApklAU=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=FVzx84Bfdg1nRTbT0BGjzPSzYh9YosYQM+DjNR9350cTSGdHa3DwgGPCuFQkB1kMPezFCniCxwz5MRjQsNLAs/PEQtrdX8GFWYQpi4HFjPIR3lY0y4A9gnckJeUB8/CBf75PZBOwX+J8RwDU0DMA6L6e9Z1hmfPlOy1o+KiJjWQ= 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=gJ1Nz2U0; arc=fail smtp.client-ip=40.107.104.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="gJ1Nz2U0" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=OQtQUwnRFIQzSsXtq3Xb7LZ72+4X0DYmf5pIciJOXSUvboDzqx86omfeSlFRFlkQSXU/1YWHdYCuMyiRaOOZu7Nr6qCCd7fgugg5+GD2OMIAtP9MpT/OEtnyzPqrWvBJnJwLV97C/6sG1vbmewr59Hb7ei8wGCPVAE1g5Ikep0M+fsUDGOnE1AlQJ/LmERIPWKvGsuJpMQ10qMAtUNiEQ1GlfkouudMjmFrae3Gtc3ZBReAeqRJFhvGOE4GBSvGVwe4guf2r4tegpy14hM7Prki6r8/FvzNOLEI0VfAqSTPKr4fjnQeb4A1FHCHE6kOXy08NAUWeS0o2G1LRsCKs2A== 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=ZCPG37JCTkmJlAobAu7KlHEpb8p4OOz6/81rbpshf5g=; b=NLIO6Ai14Gz4Pq7voihJFd4RhcRL//QePCwPM1lBhXSPHBGqGR/l/2HSas9ONdKms0Jakr5gr7DXvSZLN1LUZ45Zxjsi6o2+UQEInTlrDKKbLMZDBKJhD+hvPSilv9R3GBO2Sf6qa+CreiA4QzKyP5GHlmC1cJgx7gCaT3oeNulnMBijqiDlU9mTL+tanoZRuqflKuMcH6nDJ/pNVtn389g//yZZYz19Pp1WTjFXTI4qlIFFsXtf6nlxv7aCDLViaoa+LE4SPM3WKF/Qn0LkXHlPIdCodpLnJr++ShUR0+tnqTyZFqhOOfOG8ZnOceyBm8vdWgHKO+dQVgIFQtn6yg== 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=ZCPG37JCTkmJlAobAu7KlHEpb8p4OOz6/81rbpshf5g=; b=gJ1Nz2U074BQteRdrxAbXjik4UcsHICx7EbXAbVsCuAl6cCo/awy0LE4WNHLha7iGR+RUFYGmRJ9yg2uC0x0okTE1EGiIa1STPSyfbRpgmbSWACL8GSroo85nFsXamQcsX7TDY0bZESFjsA4mLZLvbrxd3k37GI3dhoYe+D0hdE= 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 GVXPR04MB10431.eurprd04.prod.outlook.com (2603:10a6:150:1eb::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7698.30; Tue, 25 Jun 2024 07:27:20 +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.7698.025; Tue, 25 Jun 2024 07:27:20 +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 v2 1/5] shared/lc3: Rename LC3_BASE Date: Tue, 25 Jun 2024 10:27:07 +0300 Message-Id: <20240625072711.7011-2-iulia.tanasescu@nxp.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240625072711.7011-1-iulia.tanasescu@nxp.com> References: <20240625072711.7011-1-iulia.tanasescu@nxp.com> X-ClientProxiedBy: VI1P195CA0031.EURP195.PROD.OUTLOOK.COM (2603:10a6:802:5a::20) 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_|GVXPR04MB10431:EE_ X-MS-Office365-Filtering-Correlation-Id: 00f78739-738c-4c15-becf-08dc94e83fc4 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230037|1800799021|366013|376011; X-Microsoft-Antispam-Message-Info: 3sjRkGIypU9gVq4IcY7ZGdvabZUrqkVGy6WqStnOM9u+2isG5GIxdbextICyXJ+OEEx6GxcD8wxb7K3ZhhBGj0rdfVCNMGHknFL/edLbP+jZWCVKfxn+M4gSLUVLvtMOOefeb+c1Z7MavzkqchAXTJF04uUEnP5ryKZIVaPTJJsY/c+c9Z+Rty6mKyk2Q45kJX45YNo3zJGOBOuTD47RK81hZXsul28XLxU/6qU8n0QOYZso8fLA9y1P1zr0vA+YnwQfbpkX/jnsiVvw2RDlHt1K8/lKYl7molNBHIBYkkfLCIGcgCahmjSR99KhiNjlZNF2abYU13K+dmYn496YnJuJoylug+FVTglhC5SOWKAJqmUIpwg7LQwkijqUdYURVswrIbH1mudojNZ5OlnhsgvixuVtqbb6qbZkC6/HWfN1ssRTJBj5M+V8xTTcVBryWp2NdfXyWRiWNIxt7+SGxYKZPIPUtzECTUPkjVbjOmeyuN3mvHdSPuOqn080iqWbPlHmyqbq9OkspOUt4UeHcKzlFelNMU3i9qvygPb1VDS9ZWxFKeH3rEQw1WZwINBL3Cphrbnjg7KtYVkcoq2Ogi2W4apXB/OjjrxHxzDXrYyEk8hq5rR5OMImn/2cslVbk5ccGV4Batz8n/kRHMb6nk2JOSY9CTzXZRj0Fc7eIFuQV2TwU1XFQnaFt7Az+jzE4CBwNLo0cniYZDycQacJAldBMIMYL3C8E1KS43EeqMiAor0fWYXzY7L67sthNRB9ORcONTJQJrqU3UoDBb2EzhicDVmFlFLNcrhd8FGEKgSpkYMLngM5fB6IVoGQtHBwou+7uwfg7RlUg7v0B4fkTR9WXZYU4fDeM1+g3jy421iteZwgeBppNNW1wlufljHv7vxcFlzzSVO33nT0R6XP6VruEnWxbGGLsITNozDoc1apDhigYkyX65QRqpYPDt/dnBX64wK+J2sxLmmJcg/AyCu3SVvTWFRtjbJ9qVL/tv0ePcFVrRRh2As/hTXPnVfIedd+J1Dl8Ttgr86/XsLXSUrW+dqSUPWkYFHKMmZ86v0j3b1xZq1fOtKo7nyTtJxzRMYPOubkau/9PCVI+IoBDZ53pMK2q0OO4U6I4uBmo6stPIH4SK/zpZ+4ZpXoCVBYf95kLgNtOQqZ2XPb1sibbKUX74rbW1JCC8gsaJkwDPDSJH/Svi8NrP4SthNyc6yxd+sxlrZpyQH4FJzV9Qwh+bfcjFvH2veezDPyw+LIwvdfzg8nYSz8WLbtZzrE48tHF1GaFqd8K8V1Wh042NOHfTad/B4CqU7KeCfn1Y1VkirdpZSNduK3xoMwJ7xqkEZlXhWQusYxT+frHaLXHNDdsw== 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:(13230037)(1800799021)(366013)(376011);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: qm24MSclHZcdNeIs2qfq5lnpkLv5imiic/aonqcUg7UGsu8dij2J+vHoymhXL90Xw6/8if0+AEaDNfspLUThjz8gMSV3Q9X9lc06EJW3bKkNjDSqn7hj3njMoiGQJAq8Ag1BzVL7pOcRcoIXLHBCE+fhKPi5d42KjF2XFxNU/JA7RglOk2KqbBB8kn+f03edCHptfdXhO+Wk/yTyzkEry3zDfb+OKJgmC2faAPNdUXVu80MJy4ItyPkkr3dSgecl52mdVBFHkvcteOk+WKMpTwAXftAMPniCx0arwX9kTgpq85pfHIEp54oKPR+bNWw2+OuRTP0zW7M3uVKmUzQX7NLAwKpsfK9N2BiUqqsNbn1/9fllOT1crKuyo/Wx7Fa1BFgQAeyC36jgGfC/gOrRCzIYc38tZt2XXubf2o4yyQt9Oo6UBU5frcCeXUkQZNlkkDF6p4JoHjWj/IBjDXN5Tu4odne8lFxXKENfwJqys1lHiwG9h+D3+pNs5HY0pXCCpBwtDCLMrsgIaSy3o3NSSgltdTBHUjs4nHj9a6W2pU1sHGug37CD73gHTEgbO+1CpSxBnNfKvAy7ywQJWtyiBbLFmmdIkpv2iwOeJILKOPq21SOf0QKVRbLzVzM6V16zbUylNAPi4pFa5FMQa3rNqw9pQzOrgG4bMPrVXrYhm9LImZEnAkSqt7MvEETEfFSfA+XGitR8wE6nyMMRKlAnHwZbUBkNaBBTd3ADFunagqkHUe5Y/mAfokjk15ZjCJBQJq+QioQ2gqAXXQ/5gs+bmmHGeEtgXDpFLHLmKmC8h0XKE6eOTEubK2uG4WsWbcLklXzH9I3itbRzocQIbeO4Y25Px9CxPSI8u7IbkZCJ3nBKK5Tjpxjks620UNCTwUKNZluhstnlMkWj9/FB9bzy12bKh9+XoTZRBp4YV9nTb7zNuecWo/aZr4UY97Nj6N8qHjadsDpG9S97A//fQ9Qjv1MR6YwANM61rmq2/Q9yXw1a9w4dKELTc2D2kO2OZbAC/O/SBV56hyi/vnVDTXldmlH9WCqASCYIUJa0lBd0NhkoIrxgFAt1bwUlx00ZLde8FPqXC22uJyloF2OhnaswSHSAT/JD2DC04CYvw5Cr/tzNMkMVni1tv4xE0AXDiGzM945VrAEouqXo3gO8Qh71ZoWWF15Lp/Iok+b2NpaQ16fdodMbsUqO05Un7k/Ng597uuKtOYZ1+LS6QRhahN4zxDWZCcaUMG2moZS7os0UdipiU8Jd06oO6//K9zraeYQnvr7YRDjJ5CXR35fL19aKpv4OXDan6lRDb+nHwGoPjWYzsrPm/rIuN33ZBeC2TSjIfgdRfb/6jmjCe6/IhFUy8yaNeCwSPjCqwGE1SO5dgfrYnqzHuG7t+xe1ib2+2YBeYjbXgHeKSxGnTGUxkQvpvZ6C5ysSB5N8w+NmKvE/2tzTn6PJ0AwZaixXcrPxl5afAR9E60F3YBDf3aokutb+1etex4LKlBUPWOCqF1YVBypNfO34imDzKpba6CEsVmYrgr5mkG35Ux7Yjb97MOJL85Xt9yQHxDuAXk9i8dbnTwEC4gexHsgo4ozXLdWSK+8w9EnlxskeqJqj9s2ygGYspQ== X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 00f78739-738c-4c15-becf-08dc94e83fc4 X-MS-Exchange-CrossTenant-AuthSource: AS8PR04MB8898.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Jun 2024 07:27:20.4116 (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: QDYK3kHs+ECmkdVpt0x9jJALpTA/pAgmk67GtBEOTkQkxd+ywLgW7dO9kpF6b12cI6fwlTDVp43KuZWQCspSbA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: GVXPR04MB10431 This renames LC3_BASE to LC3_TYPE_BASE, so the meaning of the define is more clear. --- src/shared/lc3.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/shared/lc3.h b/src/shared/lc3.h index 95aa21702..abd9b29a3 100644 --- a/src/shared/lc3.h +++ b/src/shared/lc3.h @@ -12,9 +12,9 @@ #define LC3_ID 0x06 -#define LC3_BASE 0x01 +#define LC3_TYPE_BASE 0x01 -#define LC3_FREQ (LC3_BASE) +#define LC3_FREQ LC3_TYPE_BASE #define LC3_FREQ_8KHZ BIT(0) #define LC3_FREQ_11KHZ BIT(1) #define LC3_FREQ_16KHZ BIT(2) @@ -32,7 +32,7 @@ LC3_FREQ_44KHZ | \ LC3_FREQ_48KHZ) -#define LC3_DURATION (LC3_BASE + 1) +#define LC3_DURATION (LC3_TYPE_BASE + 1) #define LC3_DURATION_7_5 BIT(0) #define LC3_DURATION_10 BIT(1) #define LC3_DURATION_ANY (LC3_DURATION_7_5 | LC3_DURATION_10) @@ -40,12 +40,12 @@ #define LC3_DURATION_PREFER_10 BIT(5) -#define LC3_CHAN_COUNT (LC3_BASE + 2) +#define LC3_CHAN_COUNT (LC3_TYPE_BASE + 2) #define LC3_CHAN_COUNT_SUPPORT BIT(0) -#define LC3_FRAME_LEN (LC3_BASE + 3) +#define LC3_FRAME_LEN (LC3_TYPE_BASE + 3) -#define LC3_FRAME_COUNT (LC3_BASE + 4) +#define LC3_FRAME_COUNT (LC3_TYPE_BASE + 4) #define LC3_CAPABILITIES(_freq, _duration, _chan_count, _len_min, _len_max) \ UTIL_IOV_INIT(0x02, LC3_FREQ, _freq, _freq >> 8, \ From patchwork Tue Jun 25 07:27:08 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Iulia Tanasescu X-Patchwork-Id: 13710733 Received: from EUR03-DBA-obe.outbound.protection.outlook.com (mail-dbaeur03on2086.outbound.protection.outlook.com [40.107.104.86]) (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 396D8146A83 for ; Tue, 25 Jun 2024 07:27:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.104.86 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719300450; cv=fail; b=oC9XKRtM6n/bQNFXyaJkJqkaggRslBIB3UI3LR548ucbG/0ys1y9kP4zwYBJyq0H7qsFosURlIBvLpPe2WvXKxWUTTVk0PwOlAiFvQN3zir9Sa6VCus1rtYYKHriTJicTkmFi5YTpNZZ+Sxde74cZ6lJF6Bc6EyHzFL9QlygGuw= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719300450; c=relaxed/simple; bh=FzztdB77/ZU+tMHHRUsfBk6KmmTncWZAiVVN2Omw3YQ=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=QElF7LPqzc4RLMMk7dpEVMscyK9c5jGVUgdLsBoV4ioUR7OO1l/4BJ5LuCCpJ/6eC/1AKencVGgp92LX6sAed/x+lnbCF3Bf2zGbisJVsFuTQNtgtgXh4EOpdiL3P9HjInu74Vfs72jUXtzYKJCOP9G30kIOPn4sVoBurBa6tig= 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=GKcW/XVQ; arc=fail smtp.client-ip=40.107.104.86 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="GKcW/XVQ" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=a4CYYXdRcMnDQlY8QrXm4WK3/9ppY5IKm/Khgcrsuf6J+h3m2oibC8CiF2KBPyStcI2SqP+CJmI3oJ8TVo2f1896gMq3IJgEi68vReSokihknu8mPLcTMKloA7XiWs5QCf6wfZt4Av5lX/YN/V1BT1yPoCMwayN4Whuzb8+LodC8UxAXdcyJe2KKwEad9otfWjUOjW7MDN3KPf+yTvkQeCNqQipIqfa2Q+cMYUa3BxN1PA/MXfHjyDHC7xdUbiiIYdH9segKusTRao3sVu/x34ygKnFI7J+C8EhrrvvkOOHWmTqHaUUj/gWcy9g+bbvGbfCwvovJgRLJ6dPOCSHIrA== 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=90/imfpZJ4uOz+NgUbg0112kCf6BjA/SHmuwWTRFf5o=; b=dDq2leVFG5gHWzOXDI/KKEdVnqRwFBDs9cUjBfSOtzktSUZ+mGaEokRNukLz8P+ekDn79OO+hGYPw8w8PbuB0b0o+6xB2hmZZFNHWN9P2xteNdAWXX2Ca1+lSudYC2dHTFI7L/5tLkEjwfDrHFzuV+2hUTrOmoyNgoemqor2DNHGY/9rhuKIpLm5C2DPrtI8mmnw9zBmiOGvLgzIySTKZur/WGvodzuI+EKWA0ljwDwpXtbG4B917xFPsixdy/slfDFpcd/VLMbUnQLzYKC8RH13H1B/x+aLDu8Y3MFobzRH8Fvrr+eDD0hD/8jLw6+Srk1bqmGchut/A6lCfmQ7jg== 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=90/imfpZJ4uOz+NgUbg0112kCf6BjA/SHmuwWTRFf5o=; b=GKcW/XVQq89intLjjCWl4xhL0ljW0y3y7hduCSC14SeYFDQZSx1iqYtpSuS18q/c+t4N0Qi5ORIsMzlSwizFFKkKciqvi11PlbSafQtbiYYfeOfPZH4DvReMdERYvf5ndBOhZnONJlEsOPtvleBMIqNafvEqIHGKfqGAJvE1iL4= 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 GVXPR04MB10431.eurprd04.prod.outlook.com (2603:10a6:150:1eb::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7698.30; Tue, 25 Jun 2024 07:27:24 +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.7698.025; Tue, 25 Jun 2024 07:27:24 +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 v2 2/5] test-bap: Move BASE defines to lc3.h Date: Tue, 25 Jun 2024 10:27:08 +0300 Message-Id: <20240625072711.7011-3-iulia.tanasescu@nxp.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240625072711.7011-1-iulia.tanasescu@nxp.com> References: <20240625072711.7011-1-iulia.tanasescu@nxp.com> X-ClientProxiedBy: VI1P195CA0082.EURP195.PROD.OUTLOOK.COM (2603:10a6:802:59::35) 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_|GVXPR04MB10431:EE_ X-MS-Office365-Filtering-Correlation-Id: b90a1d2c-8e08-446e-4582-08dc94e841f2 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230037|1800799021|366013|376011; X-Microsoft-Antispam-Message-Info: GFUEIJOdY162L+DTX0dHha7WseqNhm+14wi/OsBAX1DDWuIo31t2+4jrPkywrAZwReilEoKXzbA+rP6+IF/aB0xOfFQ174czxHlii0JapWK9veS1Wz1sPA1lCpE9tO2DIIMOUQIiQjZGCTTHaJvMuz4qCbYyZ0EWjyi9ksEm0CIJ6nx13hdInd/xkKIiGuyDO2aCxyFY58mJrlcOPN/hh9Vr7UH+0HPp3rOheEXTmcTwu/E+b7soOuGbTEKIQYPJh05af1GileZjZmz96DRVkGRHCmNBICZNLFhpKdKuFMCaHALjp7dtagj3JvNJJ2lxcJ6BGP6T9L9moLaT/VYVSWD9zelBOzIGpik9o2F3dKdji9pX63MNu3Cqpdh0rGm8kRmJVUQodYUu3blH+J+nVz6e/MYvNGMSzGtjyN6J1oXAeFDTShZ9St6UC4/jf9m8jiGRP51f2MSNJJW1SLeRr0tg+oDwlAZiUVWscw6K56vefONNZFaJ8B0zZai4YyiSKZcjVOj/gwrMrRlyHD9eTYLb+GdEzKXasZZLsMXMi3ZETVtZKijCXY/zMRe6FUbowJzoCDeJQMlSVyZAeab3FASoxCac8fbSnDrGMxZXtPtOviW4ryC097VRFfyYqxslmUgAk6ZJ3GZ9YKzGIbgxtWuuxKGRU1uRCQF+2CDdxF+95qp4ktNWpAF/WS/HTK72sZ8CkCwIVtq7qRmHXGqpEu3jgAYmCeq4ZUGIBE9bhu5JLhANBrdUehy8AV5ANlaer/cSAJnMJQJd8S2s/64cSYx/pQKKu4RgcYSvAnwOiq7yiTKF1Pyye9+z5ZP1YfyvggGfSYzlnccHfV0oSxbTaHy1Yo9046vgk63ecRBAWZGZzD2B+sqs9+ce2qDPN0WutEJ++zDT7HrcZcvEFmco7bvL+RGT9T5B/p592zmAHdX0hIOybd3T9NdKqOTR0PfC9ISyQnGkmremGv+Il3tc17VXnclpZ06+G3rq313b455Wn1kwyRQm05uwdq6bSq6oPdPQGwQROheT3YUvTrSTj2qnF2h/GYxsLI9gSnXUm1qt77nNu1FSXH3lL8fo7CXP28Q0n54bTPA75sJvii6swG2PnozPgy/Q8ZGIJY/L6FSWhklUnypwLH7jTlw5p0LVg6u3eQ7cGSdhicBbXAdpkT3dK8fOyHu2DXpLLFk2ByKacM5bVhbzqvlLVMCX0sAhwK+ToSbj3IwNxkrrcv2KUx3M/dw1viOK8OM/HD3iDsXn0lJHdKkcnKb5ADZTNfWeAWwxi9HFXXIAzaoVJx5+Wve+MOJDx2mF6UFwdNJ+P/Ri4AbOyteIwZML0I3Ye2jmkWFLgMg+IJveor25SRrBwA== 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:(13230037)(1800799021)(366013)(376011);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: wAx5UO2jefb9hjo9V+PRe7vox62QnEoc4NSOqs6bqXqqbgN0Z65tZ5CQqKXvBws5swu/lSWTMN9LpLkol6kouxO6jAJScm0fW9qsy7fOsjqhTISfPCZep3GlzcQAldeid8IF/1pOGMjZeG+GsvlyNRDjVmiLndICOzwrqZL90kQiIqOw6cLRpslq6UJYlHnfpkT6wqLrZOBwN+Y5CuRrgTcu+XF+GXMuCi47C/4dgpaaSx6e8GUAIQrH3m4NvkvDqa4+j4z4mLRIPUv5JHcBpLMN6CCmeB0wDCM3HhKQwwXA9rte/Fs82Jw0iEAhxItcLnqQiyk6dS+IVhNbZxgwNjUkOHu2xwY2hAgFDYheAAO3Pzl57uHXUCFDWOsoW8qJSnMm8jc+SrRGxY+Zd7Jy/ZJTm2U57KWVz2Kkf/WT4P6N5Gk8gxw+OWmJZJNfAZ7nQt7P9jTE+A822kSj/0xb4B1aH/ZMDIy2O9VCA8DhNPiIlmTC0ca+1rEj4grLDSYwlV17tjoVmShp8Mfr1rOrxhiUj8SkWEOx33bT6zYBHAgzBrscBxvnHQh/eMlEnaVvFlz0YkJhIPQHo6Rvvcb8ldis1Ua1UKSDElF5jvS3nUwVHzizT54s0Ci6JsDru2QqF0kaxc5OcfdR3UKosRWGAdieFkTcNRrwusnZFmMGJK32pyprYAUu6ynNg86wJkXIeRDa7eo9oKzD4DFlUX7BrlNgo3xmoy/8vsVMjAOrJmD6ULRthHrIFCXZ3xMdLRdnGTgKMHqVPnwx4SeM3wVV3Ng/fjxZLWXdw2vKC4sH629B1o6PWyLQ17vb2PhnWNKRV8c3G4Dc+ynoWZkj1Zf00y1eMihU3hjpdDSSDrI80T9cIs4l75CfF0h41wVSoFLSniUXP3P/R6+Ud0Qp1w0O/0AKm6RdNCG6Nm5zOH6nPdNXejyZf8euCFIbUlDtjS4Zz03Sgqiape1Su8PrERsT7Qe3UnLE240NQuPBc0C+hKyAvUbse8I5nVpuwyobeSBKLk6brP4HG4I8DQOpax1g2K4pg20EU9S//aksKf3qUtJkm4I1iJKaa+w77+E+MHFls8+HfvZyieZAVwA247ArPDyN1YBdKtecLRs3ZAxiC7vhhK+gfGHOoZi2yE4Ke1ayT4gIoyCwI2M7BUI1bGkDI0EXUGPisjtEpZdk2oAeSf4DLqBbrbrcNwIWG85KidlkHjTSdgLeyZ4Jb989d7TFdi66TlXgF0x/pXibZsuOZrBTO47rZnFvmF39YF95f56SkBF2qpUmeNagoHuayEbRljh91Tj96Hl8Jv16kdbn3Dn41YgPCyDkdyMbY8fC0+rWfr7z81vKhr2/2AOiv3pDoe7a8RZZtAeJtSkf+dmvssN6y5jmIupO0tl08xG9HnhVzNiJpeR1xgQMKHO8Bqb2V8V0WJdoc0n44b+22805LkACLQl0PCa7xoxKj+WUXRLuhkR6DgiSCR/0ZpTrmtdd4TQsh26pfesmCK2wqrtMZCROANNnvGl7HgJYG4IRTCbyhhYwv2SyVexAyiy+ima0npXVGhAjEpsNqBG6BpNonZG56d3tiSgJBIP4+kWTVP8wjUNHKBtRnP1AgMbrq2qsjA== X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: b90a1d2c-8e08-446e-4582-08dc94e841f2 X-MS-Exchange-CrossTenant-AuthSource: AS8PR04MB8898.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Jun 2024 07:27:24.1334 (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: J1Cqv6HQiRLHEZQ7/4HpIHCJ74MKGaxyeIHnjHPFbNJFEHOuac9EmvzriXgMg6qrkNO+XVHtW0U4Mvo6pGqWIQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: GVXPR04MB10431 This moves the BASE related defines introduced in test-bap to lc3.h. --- src/shared/lc3.h | 150 ++++++++++++++++++++++++++++++++++++++++++++++ unit/test-bap.c | 151 +---------------------------------------------- 2 files changed, 152 insertions(+), 149 deletions(-) diff --git a/src/shared/lc3.h b/src/shared/lc3.h index abd9b29a3..944f574b0 100644 --- a/src/shared/lc3.h +++ b/src/shared/lc3.h @@ -275,6 +275,156 @@ LC3_CONFIG_48_AC(LC3_CONFIG_DURATION_10, LC3_CONFIG_FRAME_LEN_48_6, \ _ac) +#define BASE(_pd, _sgrp, _nbis, _cfg...) \ + _pd & 0xff, _pd >> 8, _pd >> 16, \ + _sgrp, \ + _nbis, \ + _cfg + +#define BASE_LC3(_pd, _sgrp, _nbis, _cc...) \ + BASE(_pd, _sgrp, _nbis, \ + 0x06, 0x00, 0x00, 0x00, 0x00, \ + _cc) + +#define LC3_CFG(_freq, _dur, _len) \ + 0x0a, \ + 0x02, LC3_CONFIG_FREQ, _freq, \ + 0x02, LC3_CONFIG_DURATION, _dur, \ + 0x03, LC3_CONFIG_FRAME_LEN, _len, _len >> 8 + +#define LC3_CFG_8_1 \ + LC3_CFG(LC3_CONFIG_FREQ_8KHZ, \ + LC3_CONFIG_DURATION_7_5, \ + LC3_CONFIG_FRAME_LEN_8_1) + +#define BASE_LC3_8_1 \ + BASE_LC3(40000, 1, 1, LC3_CFG_8_1, 0x00, 0x01, 0x00) + +#define LC3_CFG_8_2 \ + LC3_CFG(LC3_CONFIG_FREQ_8KHZ, \ + LC3_CONFIG_DURATION_10, \ + LC3_CONFIG_FRAME_LEN_8_2) + +#define BASE_LC3_8_2 \ + BASE_LC3(40000, 1, 1, LC3_CFG_8_2, 0x00, 0x01, 0x00) + +#define LC3_CFG_16_1 \ + LC3_CFG(LC3_CONFIG_FREQ_16KHZ, \ + LC3_CONFIG_DURATION_7_5, \ + LC3_CONFIG_FRAME_LEN_16_1) + +#define BASE_LC3_16_1 \ + BASE_LC3(40000, 1, 1, LC3_CFG_16_1, 0x00, 0x01, 0x00) + +#define LC3_CFG_16_2 \ + LC3_CFG(LC3_CONFIG_FREQ_16KHZ, \ + LC3_CONFIG_DURATION_10, \ + LC3_CONFIG_FRAME_LEN_16_2) + +#define BASE_LC3_16_2 \ + BASE_LC3(40000, 1, 1, LC3_CFG_16_2, 0x00, 0x01, 0x00) + +#define LC3_CFG_24_1 \ + LC3_CFG(LC3_CONFIG_FREQ_24KHZ, \ + LC3_CONFIG_DURATION_7_5, \ + LC3_CONFIG_FRAME_LEN_24_1) + +#define BASE_LC3_24_1 \ + BASE_LC3(40000, 1, 1, LC3_CFG_24_1, 0x00, 0x01, 0x00) + +#define LC3_CFG_24_2 \ + LC3_CFG(LC3_CONFIG_FREQ_24KHZ, \ + LC3_CONFIG_DURATION_10, \ + LC3_CONFIG_FRAME_LEN_24_2) + +#define BASE_LC3_24_2 \ + BASE_LC3(40000, 1, 1, LC3_CFG_24_2, 0x00, 0x01, 0x00) + +#define LC3_CFG_32_1 \ + LC3_CFG(LC3_CONFIG_FREQ_32KHZ, \ + LC3_CONFIG_DURATION_7_5, \ + LC3_CONFIG_FRAME_LEN_32_1) + +#define BASE_LC3_32_1 \ + BASE_LC3(40000, 1, 1, LC3_CFG_32_1, 0x00, 0x01, 0x00) + +#define LC3_CFG_32_2 \ + LC3_CFG(LC3_CONFIG_FREQ_32KHZ, \ + LC3_CONFIG_DURATION_10, \ + LC3_CONFIG_FRAME_LEN_32_2) + +#define BASE_LC3_32_2 \ + BASE_LC3(40000, 1, 1, LC3_CFG_32_2, 0x00, 0x01, 0x00) + +#define LC3_CFG_44_1 \ + LC3_CFG(LC3_CONFIG_FREQ_44KHZ, \ + LC3_CONFIG_DURATION_7_5, \ + LC3_CONFIG_FRAME_LEN_44_1) + +#define BASE_LC3_44_1 \ + BASE_LC3(40000, 1, 1, LC3_CFG_44_1, 0x00, 0x01, 0x00) + +#define LC3_CFG_44_2 \ + LC3_CFG(LC3_CONFIG_FREQ_44KHZ, \ + LC3_CONFIG_DURATION_10, \ + LC3_CONFIG_FRAME_LEN_44_2) + +#define BASE_LC3_44_2 \ + BASE_LC3(40000, 1, 1, LC3_CFG_44_2, 0x00, 0x01, 0x00) + +#define LC3_CFG_48_1 \ + LC3_CFG(LC3_CONFIG_FREQ_48KHZ, \ + LC3_CONFIG_DURATION_7_5, \ + LC3_CONFIG_FRAME_LEN_48_1) + +#define BASE_LC3_48_1 \ + BASE_LC3(40000, 1, 1, LC3_CFG_48_1, 0x00, 0x01, 0x00) + +#define LC3_CFG_48_2 \ + LC3_CFG(LC3_CONFIG_FREQ_48KHZ, \ + LC3_CONFIG_DURATION_10, \ + LC3_CONFIG_FRAME_LEN_48_2) + +#define BASE_LC3_48_2 \ + BASE_LC3(40000, 1, 1, LC3_CFG_48_2, 0x00, 0x01, 0x00) + +#define LC3_CFG_48_3 \ + LC3_CFG(LC3_CONFIG_FREQ_48KHZ, \ + LC3_CONFIG_DURATION_7_5, \ + LC3_CONFIG_FRAME_LEN_48_3) + +#define BASE_LC3_48_3 \ + BASE_LC3(40000, 1, 1, LC3_CFG_48_3, 0x00, 0x01, 0x00) + +#define LC3_CFG_48_4 \ + LC3_CFG(LC3_CONFIG_FREQ_48KHZ, \ + LC3_CONFIG_DURATION_10, \ + LC3_CONFIG_FRAME_LEN_48_4) + +#define BASE_LC3_48_4 \ + BASE_LC3(40000, 1, 1, LC3_CFG_48_4, 0x00, 0x01, 0x00) + +#define LC3_CFG_48_5 \ + LC3_CFG(LC3_CONFIG_FREQ_48KHZ, \ + LC3_CONFIG_DURATION_7_5, \ + LC3_CONFIG_FRAME_LEN_48_5) + +#define BASE_LC3_48_5 \ + BASE_LC3(40000, 1, 1, LC3_CFG_48_5, 0x00, 0x01, 0x00) + +#define LC3_CFG_48_6 \ + LC3_CFG(LC3_CONFIG_FREQ_48KHZ, \ + LC3_CONFIG_DURATION_10, \ + LC3_CONFIG_FRAME_LEN_48_6) + +#define BASE_LC3_48_6 \ + BASE_LC3(40000, 1, 1, LC3_CFG_48_6, 0x00, 0x01, 0x00) + +#define BASE_VS(_cc) \ + BASE(40000, 1, 1, \ + 0xFF, 0x00, 0x00, 0x00, 0x00, \ + _cc, 0x00, 0x01, 0x00) + #define LC3_QOS_UNFRAMED 0x00 #define LC3_QOS_FRAMED 0x01 diff --git a/unit/test-bap.c b/unit/test-bap.c index 638717afc..c92c4f671 100644 --- a/unit/test-bap.c +++ b/unit/test-bap.c @@ -5574,29 +5574,6 @@ static void test_scc(void) test_str_1_1_1_lc3(); } -#define LC3_CFG(_freq, _dur, _len) \ - 0x0a, \ - 0x02, 0x01, _freq, \ - 0x02, 0x02, _dur, \ - 0x03, 0x04, _len, _len >> 8 - -#define BASE(_pd, _sgrp, _nbis, _cfg...) \ - _pd & 0xff, _pd >> 8, _pd >> 16, \ - _sgrp, \ - _nbis, \ - _cfg - -#define BASE_LC3(_pd, _sgrp, _nbis, _cc...) \ - BASE(_pd, _sgrp, _nbis, 0x06, 0x00, 0x00, 0x00, 0x00, _cc) - -#define LC3_CFG_8_1 \ - LC3_CFG(LC3_CONFIG_FREQ_8KHZ, \ - LC3_CONFIG_DURATION_7_5, \ - LC3_CONFIG_FRAME_LEN_8_1) - -#define BASE_LC3_8_1 \ - BASE_LC3(40000, 1, 1, LC3_CFG_8_1, 0x00, 0x01, 0x00) - static struct test_config cfg_bsrc_8_1_1 = { .cc = LC3_CONFIG_8_1, .qos = LC3_QOS_8_1_1_B, @@ -5613,14 +5590,6 @@ static struct test_config cfg_bsrc_8_1_2 = { .state_func = bsrc_state_cfg, }; -#define LC3_CFG_8_2 \ - LC3_CFG(LC3_CONFIG_FREQ_8KHZ, \ - LC3_CONFIG_DURATION_10, \ - LC3_CONFIG_FRAME_LEN_8_2) - -#define BASE_LC3_8_2 \ - BASE_LC3(40000, 1, 1, LC3_CFG_8_2, 0x00, 0x01, 0x00) - static struct test_config cfg_bsrc_8_2_1 = { .cc = LC3_CONFIG_8_2, .qos = LC3_QOS_8_2_1_B, @@ -5637,14 +5606,6 @@ static struct test_config cfg_bsrc_8_2_2 = { .state_func = bsrc_state_cfg, }; -#define LC3_CFG_16_1 \ - LC3_CFG(LC3_CONFIG_FREQ_16KHZ, \ - LC3_CONFIG_DURATION_7_5, \ - LC3_CONFIG_FRAME_LEN_16_1) - -#define BASE_LC3_16_1 \ - BASE_LC3(40000, 1, 1, LC3_CFG_16_1, 0x00, 0x01, 0x00) - static struct test_config cfg_bsrc_16_1_1 = { .cc = LC3_CONFIG_16_1, .qos = LC3_QOS_16_1_1_B, @@ -5661,14 +5622,6 @@ static struct test_config cfg_bsrc_16_1_2 = { .state_func = bsrc_state_cfg, }; -#define LC3_CFG_16_2 \ - LC3_CFG(LC3_CONFIG_FREQ_16KHZ, \ - LC3_CONFIG_DURATION_10, \ - LC3_CONFIG_FRAME_LEN_16_2) - -#define BASE_LC3_16_2 \ - BASE_LC3(40000, 1, 1, LC3_CFG_16_2, 0x00, 0x01, 0x00) - static struct test_config cfg_bsrc_16_2_1 = { .cc = LC3_CONFIG_16_2, .qos = LC3_QOS_16_2_1_B, @@ -5685,14 +5638,6 @@ static struct test_config cfg_bsrc_16_2_2 = { .state_func = bsrc_state_cfg, }; -#define LC3_CFG_24_1 \ - LC3_CFG(LC3_CONFIG_FREQ_24KHZ, \ - LC3_CONFIG_DURATION_7_5, \ - LC3_CONFIG_FRAME_LEN_24_1) - -#define BASE_LC3_24_1 \ - BASE_LC3(40000, 1, 1, LC3_CFG_24_1, 0x00, 0x01, 0x00) - static struct test_config cfg_bsrc_24_1_1 = { .cc = LC3_CONFIG_24_1, .qos = LC3_QOS_24_1_1_B, @@ -5709,14 +5654,6 @@ static struct test_config cfg_bsrc_24_1_2 = { .state_func = bsrc_state_cfg, }; -#define LC3_CFG_24_2 \ - LC3_CFG(LC3_CONFIG_FREQ_24KHZ, \ - LC3_CONFIG_DURATION_10, \ - LC3_CONFIG_FRAME_LEN_24_2) - -#define BASE_LC3_24_2 \ - BASE_LC3(40000, 1, 1, LC3_CFG_24_2, 0x00, 0x01, 0x00) - static struct test_config cfg_bsrc_24_2_1 = { .cc = LC3_CONFIG_24_2, .qos = LC3_QOS_24_2_1_B, @@ -5733,14 +5670,6 @@ static struct test_config cfg_bsrc_24_2_2 = { .state_func = bsrc_state_cfg, }; -#define LC3_CFG_32_1 \ - LC3_CFG(LC3_CONFIG_FREQ_32KHZ, \ - LC3_CONFIG_DURATION_7_5, \ - LC3_CONFIG_FRAME_LEN_32_1) - -#define BASE_LC3_32_1 \ - BASE_LC3(40000, 1, 1, LC3_CFG_32_1, 0x00, 0x01, 0x00) - static struct test_config cfg_bsrc_32_1_1 = { .cc = LC3_CONFIG_32_1, .qos = LC3_QOS_32_1_1_B, @@ -5757,14 +5686,6 @@ static struct test_config cfg_bsrc_32_1_2 = { .state_func = bsrc_state_cfg, }; -#define LC3_CFG_32_2 \ - LC3_CFG(LC3_CONFIG_FREQ_32KHZ, \ - LC3_CONFIG_DURATION_10, \ - LC3_CONFIG_FRAME_LEN_32_2) - -#define BASE_LC3_32_2 \ - BASE_LC3(40000, 1, 1, LC3_CFG_32_2, 0x00, 0x01, 0x00) - static struct test_config cfg_bsrc_32_2_1 = { .cc = LC3_CONFIG_32_2, .qos = LC3_QOS_32_2_1_B, @@ -5781,14 +5702,6 @@ static struct test_config cfg_bsrc_32_2_2 = { .state_func = bsrc_state_cfg, }; -#define LC3_CFG_44_1 \ - LC3_CFG(LC3_CONFIG_FREQ_44KHZ, \ - LC3_CONFIG_DURATION_7_5, \ - LC3_CONFIG_FRAME_LEN_44_1) - -#define BASE_LC3_44_1 \ - BASE_LC3(40000, 1, 1, LC3_CFG_44_1, 0x00, 0x01, 0x00) - static struct test_config cfg_bsrc_44_1_1 = { .cc = LC3_CONFIG_44_1, .qos = LC3_QOS_44_1_1_B, @@ -5805,14 +5718,6 @@ static struct test_config cfg_bsrc_44_1_2 = { .state_func = bsrc_state_cfg, }; -#define LC3_CFG_44_2 \ - LC3_CFG(LC3_CONFIG_FREQ_44KHZ, \ - LC3_CONFIG_DURATION_10, \ - LC3_CONFIG_FRAME_LEN_44_2) - -#define BASE_LC3_44_2 \ - BASE_LC3(40000, 1, 1, LC3_CFG_44_2, 0x00, 0x01, 0x00) - static struct test_config cfg_bsrc_44_2_1 = { .cc = LC3_CONFIG_44_2, .qos = LC3_QOS_44_2_1_B, @@ -5829,14 +5734,6 @@ static struct test_config cfg_bsrc_44_2_2 = { .state_func = bsrc_state_cfg, }; -#define LC3_CFG_48_1 \ - LC3_CFG(LC3_CONFIG_FREQ_48KHZ, \ - LC3_CONFIG_DURATION_7_5, \ - LC3_CONFIG_FRAME_LEN_48_1) - -#define BASE_LC3_48_1 \ - BASE_LC3(40000, 1, 1, LC3_CFG_48_1, 0x00, 0x01, 0x00) - static struct test_config cfg_bsrc_48_1_1 = { .cc = LC3_CONFIG_48_1, .qos = LC3_QOS_48_1_1_B, @@ -5853,14 +5750,6 @@ static struct test_config cfg_bsrc_48_1_2 = { .state_func = bsrc_state_cfg, }; -#define LC3_CFG_48_2 \ - LC3_CFG(LC3_CONFIG_FREQ_48KHZ, \ - LC3_CONFIG_DURATION_10, \ - LC3_CONFIG_FRAME_LEN_48_2) - -#define BASE_LC3_48_2 \ - BASE_LC3(40000, 1, 1, LC3_CFG_48_2, 0x00, 0x01, 0x00) - static struct test_config cfg_bsrc_48_2_1 = { .cc = LC3_CONFIG_48_2, .qos = LC3_QOS_48_2_1_B, @@ -5877,14 +5766,6 @@ static struct test_config cfg_bsrc_48_2_2 = { .state_func = bsrc_state_cfg, }; -#define LC3_CFG_48_3 \ - LC3_CFG(LC3_CONFIG_FREQ_48KHZ, \ - LC3_CONFIG_DURATION_7_5, \ - LC3_CONFIG_FRAME_LEN_48_3) - -#define BASE_LC3_48_3 \ - BASE_LC3(40000, 1, 1, LC3_CFG_48_3, 0x00, 0x01, 0x00) - static struct test_config cfg_bsrc_48_3_1 = { .cc = LC3_CONFIG_48_3, .qos = LC3_QOS_48_3_1_B, @@ -5901,14 +5782,6 @@ static struct test_config cfg_bsrc_48_3_2 = { .state_func = bsrc_state_cfg, }; -#define LC3_CFG_48_4 \ - LC3_CFG(LC3_CONFIG_FREQ_48KHZ, \ - LC3_CONFIG_DURATION_10, \ - LC3_CONFIG_FRAME_LEN_48_4) - -#define BASE_LC3_48_4 \ - BASE_LC3(40000, 1, 1, LC3_CFG_48_4, 0x00, 0x01, 0x00) - static struct test_config cfg_bsrc_48_4_1 = { .cc = LC3_CONFIG_48_4, .qos = LC3_QOS_48_4_1_B, @@ -5925,14 +5798,6 @@ static struct test_config cfg_bsrc_48_4_2 = { .state_func = bsrc_state_cfg, }; -#define LC3_CFG_48_5 \ - LC3_CFG(LC3_CONFIG_FREQ_48KHZ, \ - LC3_CONFIG_DURATION_7_5, \ - LC3_CONFIG_FRAME_LEN_48_5) - -#define BASE_LC3_48_5 \ - BASE_LC3(40000, 1, 1, LC3_CFG_48_5, 0x00, 0x01, 0x00) - static struct test_config cfg_bsrc_48_5_1 = { .cc = LC3_CONFIG_48_5, .qos = LC3_QOS_48_5_1_B, @@ -5949,14 +5814,6 @@ static struct test_config cfg_bsrc_48_5_2 = { .state_func = bsrc_state_cfg, }; -#define LC3_CFG_48_6 \ - LC3_CFG(LC3_CONFIG_FREQ_48KHZ, \ - LC3_CONFIG_DURATION_10, \ - LC3_CONFIG_FRAME_LEN_48_6) - -#define BASE_LC3_48_6 \ - BASE_LC3(40000, 1, 1, LC3_CFG_48_6, 0x00, 0x01, 0x00) - static struct test_config cfg_bsrc_48_6_1 = { .cc = LC3_CONFIG_48_6, .qos = LC3_QOS_48_6_1_B, @@ -5983,10 +5840,6 @@ static struct test_config cfg_bsrc_48_6_2 = { 0x10, \ VS_CC -#define BASE_VS \ - BASE(40000, 1, 1, 0xFF, 0x00, 0x00, 0x00, 0x00, \ - VS_CFG, 0x00, 0x01, 0x00) - #define QOS_BCAST \ { \ .bcast.big = 0x00, \ @@ -6003,7 +5856,7 @@ static struct test_config cfg_bsrc_48_6_2 = { static struct test_config cfg_bsrc_vs = { .cc = UTIL_IOV_INIT(VS_CC), .qos = QOS_BCAST, - .base = UTIL_IOV_INIT(BASE_VS), + .base = UTIL_IOV_INIT(BASE_VS(VS_CFG)), .vs = true, .src = true, .state_func = bsrc_state_cfg, @@ -7106,7 +6959,7 @@ static struct test_config cfg_bsrc_str_48_6 = { static struct test_config cfg_bsrc_str_vs = { .cc = UTIL_IOV_INIT(VS_CC), .qos = QOS_BCAST, - .base = UTIL_IOV_INIT(BASE_VS), + .base = UTIL_IOV_INIT(BASE_VS(VS_CFG)), .src = true, .state_func = bsrc_state_str, .streams = 1, From patchwork Tue Jun 25 07:27:09 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Iulia Tanasescu X-Patchwork-Id: 13710734 Received: from EUR03-VI1-obe.outbound.protection.outlook.com (mail-vi1eur03on2046.outbound.protection.outlook.com [40.107.103.46]) (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 6762B146A86 for ; Tue, 25 Jun 2024 07:27:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.103.46 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719300452; cv=fail; b=PfwzfPSjOsijt1oaJE6rfGPcwxGSyzwaAHkABu7qVqXldTb/sRNdGQ4W1GmtNZey723QtyUizUUGcyop/6lplwLna0qZhLwGOX5T1bsOjRX0041PYP5mOEcE6zfanknIB0O/QCAnKWceZRkw8G5ZuZj4Q3gOPHdNykLmoE77x2s= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719300452; c=relaxed/simple; bh=gfrwksnIGcl2eWFIVwL89ySAoZp3j9qOMSiAnk9K63k=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=cihCKUHjAgn8kViNcG4Gagbgu4WlS7XUQioqTymAl3jlJErPgxgAqCqMw1vmu5U69x6el5c173m01IqNzXyULbTDFGwjM1QGGKKqyX2tccOswh3/d1gZU2CVYdmljl04LJDn8eaw65BE8skqjqo5PdthfCzGVPt4veNieAiS5JQ= 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=iFLRzatr; arc=fail smtp.client-ip=40.107.103.46 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="iFLRzatr" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=VVi9DTYozuZ5zKJNrk/6d41n1V8ltupsUq3wl0fpcOWOgh9plYJ8osjHW9bZm/YBMUT+Bth7cX6Zf4N5Mp320lZDKqsDHcqA0z95NfazJIM14QDJIpXXZ54JsiimJdTSRTB2u5wAWrwYIxMZe7cPrQJeqcvctSuD1pi+shyXmgfbpaioWud720tuiwI9meiG0hOEwwV5bQxfBFEdLqpuqAfxG0rvnmqauVnSwx2zxffDh0BEwjE6ENH7NUSdKJd+KwHokcDXqEMEtwnuoj9VOLPKeKSKlZBm45ma2Uw+/5KYDGB/psBj1J2xlMWB88tm1DbRMGUijQbsu9iWC//nAQ== 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=DVN6rp5jmSMdIasCpRdsxWRTNOD9HMiaw3Q1+b9OvFc=; b=bZA4gwVfxaOQaFErw2xOZfsL1E1XxDtUdEoOILGswmO3QH44PvrcsB44xyxWiSAEjSGz8874wGq9GsP2j0f8Cv8QEl/qddGDMkZ3uDaqgWd8rTzB/UBXIYlE1PHzPYisW5IbnHp7QV9Sh2h3OWtThJX+6flc/zmRjwcsXGoplUDOTliH+hefz/wxHDzrvo6GVrrtB129hb9dX689EKpiEoeCnJeaIVJglzQ231Oe31nzyfbobuwWxsqFAvyo6zWspqbfLfNpETTb7RlhbkCD0/iiFcpP874rO9pcN6oulcCGDpolUuq7VYPmXr/VinaeoJNIl7Zz7wCRDJu2XB7LJw== 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=DVN6rp5jmSMdIasCpRdsxWRTNOD9HMiaw3Q1+b9OvFc=; b=iFLRzatrl+dkaksYtyhfZBVe+l8a2SaJQ18/hz7GyFXfwwjTsf5Sv44GmudwbUXT/OkTPk+LYnTyx6WK5sXrMeshXU+Pd/L7ho3MkB4dKXurvBciGBYcMQbq+eLthNWhYI3wcQVafBsf1m5HIoyh0LP9Z4XEdkkE+i2EcNrBH7c= 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 DU4PR04MB10362.eurprd04.prod.outlook.com (2603:10a6:10:563::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7698.30; Tue, 25 Jun 2024 07:27:27 +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.7698.025; Tue, 25 Jun 2024 07:27:27 +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 v2 3/5] test-bap: Add support to config multiple bsrc streams Date: Tue, 25 Jun 2024 10:27:09 +0300 Message-Id: <20240625072711.7011-4-iulia.tanasescu@nxp.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240625072711.7011-1-iulia.tanasescu@nxp.com> References: <20240625072711.7011-1-iulia.tanasescu@nxp.com> X-ClientProxiedBy: AM9P192CA0027.EURP192.PROD.OUTLOOK.COM (2603:10a6:20b:21d::32) 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_|DU4PR04MB10362:EE_ X-MS-Office365-Filtering-Correlation-Id: c444cc06-1a3b-4cfa-959c-08dc94e843b3 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230037|1800799021|376011|366013; X-Microsoft-Antispam-Message-Info: 42aP1xB2Q03VwZkP9mzNy4KmBbReNltBglLb7kQD++aY+eI3iatVyA6J1ZvBG6RRpjCgaR4Fy5PVabzTW8rv7gk6hoowRKZw0rQjEeZpPYcKFhj8dlcLIxZWYrfnPjudSyz8AszjRLIHigrYjx5MXndiMPoeGWPBPMNUFgWq03JGz6ZaocyTIA5v5CLggVIMuEdYO3Viaw7zbuA0UFv72PPDbKdXVRv2sjcWkoNdqEhKk4YmBAN8S9WyF3rNFVGbeUJ0WVJn9DgpETQyntrU/IgNkySBMAfTjPLgNRthpSk1Lcqq69ILheuu3QPGbXY9lV5WmyudlxiAzw+sBWw/Hm/09bvtv/gJhTyVMtcEaaNnK5WabLcniB4cXlTeC6pw7BGGIUU0UKIeHnaGNDXCKpNfhfJw2NCczEn3TXGJrtO1F297pSA2W2MuZ6AVCbnnXv+SS45tHgler+RjxRn5LOgj9KpSa7xoH/dW8Op/4ybFIXzIqcZToIqs7zFniK1TemtFawgVkgLrOy/HeUsUkGWmdb+TGAKNlF8dOXVxSofjxssbqxjIJn4GZZFsO6gXlsBz1vE01Fxm/FWfG/Cnb1UN8Y+8f92ctBJjzFuo86W4lmPUIQdBh+i+V1LJgB7g4CXKnAf9IXd3CiVOCgMHp5DYqVqIRb5GO0Y+vdZJ6kf0uDptFR2gtQ+rmGKmN2uFdcwTmiuHalEeAv8gSVPXcGspizClVVxDTi1q/K5l7JiaOm7t5DlttFTRrS2UGYN1cdZTChjzI4AEaEMzfFr1rHUmP22RLEmTLDPE//0XDP95iIgc3/ZGm9vhopzFs5vvSWOq79i4ysUOQAf0Hf8mNxeC5hMkWQ2S/FxyLjVIPpZqoL5c2syphX/24kA3iYG8RQRLObGjuvEoUIvjJV7aO3w2bWAZqLZ+SWuwyC6FClnNZdxmSO/G8i5MkvoJfpbqh9Qsnjq4z7QwIEVyLxodrj+wrCLxncXGs3J5CCwSkp8Ke0U7VRTwbnS0T5tz5BbrwrMfDYB7IvZvm//f+FLkLsV0oqOqYRe+XDWltW5CeFMQ27Y1gDU01MPIVgtu2WkJJIydEpW0RHDpBOr4RjD+Pd0VjDUNLD1HmoEUB6f15HJSaCxK89Cy+ryLEvQkNIy4hv9j2q4u8/PzXPEYSafNfAtcu1NghrZL/QVdWXHifZpTrw6+xNeTUuLX5GIFjjodZ/+ZqAo/7Yr3RIGuai0WWanj99E1sILRM3c/oI9H0arjOsAncT+DAd27ZFFLECLs510gvS4lg/Kx50LppXDr9rrf3fwnEidBEAUEUr/AjH6FKkxuHXujhWcO6Ylr9KFU 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:(13230037)(1800799021)(376011)(366013);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: dWsdMSEhEGsKrYsqeikpZI+OI7v5Ye8rTEzXXqiTGlfP5rLmBb/L5kbTvgXBzRUBZ2o6rGTQDH5ZHKxPJCu8HulAUwpWlsmzFb5ush7OLy4E36bVmQyleRHGzgXoHMSePbGtMY7qecuPFbaBinxK44lLaR+QwFq3RCSmsMNEZTgvJOZugBoi7ZOTOnT9f3jxScm+tswdY2cj7NlkajHXSstPZS2lvlv8OiNzgGHZn1uZAOEGnqH+vPx11S8V6nj2wGhsKWiYxsdblIZXfcVprQye73jlkeIhayGRILgomKbLJyMSYnLsWnf5tPsr2F9+5erlRClP+GyCXViYyoJbhD0Wg85zu2HwNah9LXuPauByr59KmbyvLOsEx/0TMZRIpmV/gbPTmeMYcy0aU8CIr78N8hz8hcmWaBaYOTtO0k590Wabngu4eSqA8igMTqglUS4w1Wm0aFl9vcPGU7xdaOa0q52RpqoWAf5RaPJD9g/WWMxSoLBRAgHWuNggNrCf65pS/a3pflZB9ZrndIJnFcQlehUMO7y8ljTPXyGCBCJKNc2H42jRVY0OI7PZic5BTL0WB4gRkUSj8xLz5scaSm7Z3s1gpjEb8RtwBS5ZOeoYUCZYarVxjwGeMHFQtfJgj+jBAfDGAipSGNH+59YvlStPt5y9a2VuEWEWnPG/QkTPXFyEPlKsBKiBN00Cq1v5KAtzDNpFG5upTGtsP/na/wNsIo4IXwf8r/8CID3V+1fwQDH41vlujePe8ovYdr0L30qWzedEP0Tby9miqapo1zn9rSTV8cOIRj/83z3tAw/kERjVHxURzOlG15A8QNfyG/GO/3HUKJGHUmgAYhpPyyDhgy973P4Z6dC6uUarUd4lZ76yGoAi6lNxxtXtT9OtvGHqtMORcOqEiSXVHEmcJcihFSlIKFLMHkz8iMQlMBvzSdcdBmaJ17ukPK3UNhHCy4qJBBb7mQwNdzLQF6bmeQ+qfcyrS8k13S6lQVt/vQndJyXS3sjuTL2zoGv6V0iZNwZqvfcLsZjhnnLm2TiPkONYD7FLkgu/GSHTL6/uBniy7zfZ/mJLeUnyxUcUfic1IWN5Fiy3a0MC4Ejbu5PEiI9IujhKQl2egkXR2jic4v6i0l0VhCb3zluRRH4ZOFDBhjb5Pn7eCyZjYMCH2otIcYdDSZlMQX1894A9GYa/ezkeFeN3gXdFN/WgAev8BS0y16KXxvDTzoYSHZ7YWkeBWYaC70xOEdCHoGye70uHnSd0oZjSfk9fgqj3e1NHiQR6rsAc4Ji8fyA+A7WcMO6ug/7zlQPyZdf0oBKGZY4ZzNn/O29/xHLtAO+CkQQ3gJvMixVCd/o36aSQna5Yi/BD7gzoQoLmMlAQq6lQ8Kru8Cqvbe0X6lmjKjIlXajHdnQi8pD7elKzotv2qnXUEzIjvB2L3xCAzUrm1EA5tPAfaFIVpJuMbkAbdxs5/QTm55xaR3lTLhj/yuQCJoMzijqv8KhD5CMN0ee2WKuZMKDhIkHIYMfhw71sdOF2f2IaTVMLt4lS8r18ysJqEECf0nply5LE1cNn5C8xV41CI6KTNRC5KIdPF7YLXqSA8C6dEcq9bICMutxM3xEdXH6cpee4SQ== X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: c444cc06-1a3b-4cfa-959c-08dc94e843b3 X-MS-Exchange-CrossTenant-AuthSource: AS8PR04MB8898.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Jun 2024 07:27:27.0049 (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: +PweS35lJueqKDM3PkdxGRYKsZE3Q59c4hg2mJfPInqyw4S8lGGeQ6jICX/xxmlgn2pjPMjrwergMMjUOrs+yg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU4PR04MB10362 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 c92c4f671..9b75cfc80 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, @@ -5580,6 +5582,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 = { @@ -5588,6 +5591,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, }; static struct test_config cfg_bsrc_8_2_1 = { @@ -5596,6 +5600,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 = { @@ -5604,6 +5609,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, }; static struct test_config cfg_bsrc_16_1_1 = { @@ -5612,6 +5618,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 = { @@ -5620,6 +5627,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, }; static struct test_config cfg_bsrc_16_2_1 = { @@ -5628,6 +5636,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 = { @@ -5636,6 +5645,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, }; static struct test_config cfg_bsrc_24_1_1 = { @@ -5644,6 +5654,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 = { @@ -5652,6 +5663,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, }; static struct test_config cfg_bsrc_24_2_1 = { @@ -5660,6 +5672,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 = { @@ -5668,6 +5681,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, }; static struct test_config cfg_bsrc_32_1_1 = { @@ -5676,6 +5690,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 = { @@ -5684,6 +5699,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, }; static struct test_config cfg_bsrc_32_2_1 = { @@ -5692,6 +5708,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 = { @@ -5700,6 +5717,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, }; static struct test_config cfg_bsrc_44_1_1 = { @@ -5708,6 +5726,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 = { @@ -5716,6 +5735,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, }; static struct test_config cfg_bsrc_44_2_1 = { @@ -5724,6 +5744,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 = { @@ -5732,6 +5753,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, }; static struct test_config cfg_bsrc_48_1_1 = { @@ -5740,6 +5762,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 = { @@ -5748,6 +5771,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, }; static struct test_config cfg_bsrc_48_2_1 = { @@ -5756,6 +5780,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 = { @@ -5764,6 +5789,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, }; static struct test_config cfg_bsrc_48_3_1 = { @@ -5772,6 +5798,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 = { @@ -5780,6 +5807,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, }; static struct test_config cfg_bsrc_48_4_1 = { @@ -5788,6 +5816,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 = { @@ -5796,6 +5825,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, }; static struct test_config cfg_bsrc_48_5_1 = { @@ -5804,6 +5834,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 = { @@ -5812,6 +5843,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, }; static struct test_config cfg_bsrc_48_6_1 = { @@ -5820,6 +5852,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 = { @@ -5828,6 +5861,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 \ @@ -5860,6 +5894,7 @@ static struct test_config cfg_bsrc_vs = { .vs = true, .src = true, .state_func = bsrc_state_cfg, + .streams = 1, }; /* Test Purpose: @@ -6005,6 +6040,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: @@ -6049,6 +6085,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: @@ -6094,6 +6131,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 Tue Jun 25 07:27:10 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Iulia Tanasescu X-Patchwork-Id: 13710735 Received: from EUR03-VI1-obe.outbound.protection.outlook.com (mail-vi1eur03on2046.outbound.protection.outlook.com [40.107.103.46]) (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 2E4CE146A9D for ; Tue, 25 Jun 2024 07:27:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.103.46 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719300455; cv=fail; b=SRSC/eMfa/UbL+4vS1/X+54mQ4EZPVcWd1dGVEcW2oT8Rw8lR60CyHdkzHJXMZd/GI6+gSHaz//kEQJvNVLsUepmfjR/Ou+Jj62EmEnaQABpNMWKHTpvQT8v8q1q+hGqYgWNFBRYQZ1LOywEMNo4WYN0dNrJhuM5hzJDgcivsMs= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719300455; c=relaxed/simple; bh=gwfpp9sxHDiUvLKmL9FVbsAhzovsKhIwr8Hj24Y9icg=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=dAh9LDlkCcZz9LwhrIorpH6+5q2DwxtejGZkYxLVHRvcz9K9JCbq+T641dRFEp4O0DVpXXr6q0VSdV1w1lNwR9MojODwDB4rmbQc3ENWMTXHvbuMY6p+HxyK4gEztBCEXCaE1L2TSAwa/aBuy3v38JNU90ToOckITkqE/1dqkc4= 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=mak5tfpI; arc=fail smtp.client-ip=40.107.103.46 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="mak5tfpI" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=MiQjqCbSyBeXtXhDzc0+3bB2wSSTxNsUGnp0/qjgNOQypBCr3lPQBqzeFLtMT3bNWBZlMuWSM2jw2aVYklP8wja8bWAGJRrsp5ZflH9jcv2fFcGYFlrCWz8gtT9yy3ETbpIpkBJuXrc8xIh5BWwjfQepIWV3Bu9p8fR3e29AT8Uip1xSMNhtpTEHe8ypbhvv5ych8XLEB0Cld5wpksS+L9ByPztYUtXH4mpnW+asLktAHy720OvN9wDemD+A9sEOLcFTQTNJkm+M+5ziPqWHpnf+31vua0AGPjzScjKvOOH3QYrbpr1bZnGcpLBN5Cgx5YrD0b3sCnvbxq6akzoIPg== 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=LYJH4tc9GlenC8hERXSm58H0qSTkORS5W0Nvet+JFd4=; b=gfU/bNxfUANHGWJVh+L6L7fWsQgJA3Krf1gmT3kA1AbwbmZDsXjGic7rD78MxyH3QJa8Jv8oMkMKoxCuOqWh+TNBdq+QU3vuINpGL0bTwc6SfA7TfJZf0sEgnNO8OVTFc8SviRzxaRmNTI6ZzWFrdcbANxQfM0GDcIP2fpZq4h2IhV7a/ncyp1MlLUlXNbznE09JqEWQShWkgRgLNfLkZ+PzQBbPpRyQs9PCW/dRhESLePY9Z8e//iMdtBK3u/Rsq5mEWa95voSfXJtp+HnEw2qoFLgC4jBSARPLOphY1hXLIH7RsYbVDETRS7oVbV3WUVfGviYekQdTcVqWVRg5gA== 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=LYJH4tc9GlenC8hERXSm58H0qSTkORS5W0Nvet+JFd4=; b=mak5tfpIN2W1zU4IP7uIRDX/ZoaFIKDesMM4nQcVmpi2hNqE+pbm6ZisTt6a3JT6RMD8IXSn4TBX+P4lwPP/Ncnue+6fwub+9CekEXD9yXb8ESbGtjd2CaY0eoIh0RPNEG/jZ+/aZPNVjMpQEcYkbZfVhNIJhARzzpbMfpnjtX0= 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 DU4PR04MB10362.eurprd04.prod.outlook.com (2603:10a6:10:563::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7698.30; Tue, 25 Jun 2024 07:27:30 +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.7698.025; Tue, 25 Jun 2024 07:27:30 +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 v2 4/5] shared/lc3: Add defines for BASE with multiple BISes Date: Tue, 25 Jun 2024 10:27:10 +0300 Message-Id: <20240625072711.7011-5-iulia.tanasescu@nxp.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240625072711.7011-1-iulia.tanasescu@nxp.com> References: <20240625072711.7011-1-iulia.tanasescu@nxp.com> X-ClientProxiedBy: AS4P190CA0026.EURP190.PROD.OUTLOOK.COM (2603:10a6:20b:5d0::13) 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_|DU4PR04MB10362:EE_ X-MS-Office365-Filtering-Correlation-Id: ab2e3459-9f01-4ced-d9d9-08dc94e84575 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230037|1800799021|376011|366013; X-Microsoft-Antispam-Message-Info: P97M2li+3LfSbAkmWx/zHkRq3hi98+UA42npM1N8JAGMHphL8lpR6NNk0TyuriGFXgW96E9OsYuzWFq2+yJOoHKGb6vhKOrklJTTaxfnxyOwL9qwFojy+cHjwib8qdIlN1bnS0Bmc75iRhcR5PysH976dhIBctMeept6Ft3n2L8KurxdsyQLtCiCzfLuZ3YDh/gPcUVd8Hrd84ff/hNlV8at34+hpM7ZoCcn1mJaCZrf4DEgSxxaO6yfdhjMcKbkM6X5Hlr+CL8TbsXtDnerrAsVrdvpvXBZ/Ltsjz9noPFOdPNU4FTxxcrMlv+iCsUuTHmzt2KhHoqLYnb9JU0AHK2GspY8ItnQtDUFNtL74IFJXGolgjbBayA5dzpTMea91+BpuaV+j3N3Lu6vfyVJFBmks3nrn7oY3gcDkrPUzi38kiHbN0meRJK60yJxeKBQskOTFDyN8Cg0XWUaNjxvR7a/Wohtn6cw6Z31g8Fv87k4LC+geLCzfmI31VelIp5Qcp6SF6Hb5PKWOAq6GCyccnAKA6ytv1ZZ5p0LUo4wYlBzBhIoyMgRNiYRFJP8mnLtT3P6AriZEMbR7hOFTmIB/gr1BqODqCbCFmhAOUY5r+rEh7Q7DSSXuNfuRSbe7GNn5pxyxMCL85ziBWvmvSt52ztppU+p9LlOnOYyUyr8hmCMfOa7r6BuAREUZjnDalTCufvo/Zk7VA2IyzNggGK27T6Lu+1P5UJs/hbN2d2B/U1UmSovbDi7jbpZM5EiFXtFVLSDJwjN7BG8wRyNR0QMcqFvCaDNDy6vujpgLptm3Qg+dKjSM9PAAUmnYl7AOKWXLv2RHBXjUHYyF9Jfne3Gr4oT2O/K3FwgkQ8oEw55kv+zheFHSsMtkltgKnybJP3qemb5+BdelvFfEvZzWlaWt2eB54Rel74UjPGaeKSh5+p6QN9EM+NkAkSC6hZOjHrGkswFokZij/tR+rbgWaMpH7yRH4Qa7srZv8tiPEsdfGCbjsfeL6Di97xy8SJ6cD/wC0ddHN5HoZWTu0jWK9tObuyi0b3dqjN2/Z1fq8xoDf0Cev6wuBJz3rmwflQooKtD5I7F04qXn2MKBQYv1TFdDLMMnSpAleP7ghHT0OtO1V1pKix3qapBUaRP3l+naQBzml2OXzTg85xIXpX5YSiKPUn9l2tGB4CXbW6h0WC/Kq1ZeNEgMPCvbRxLlpp4BhMaDF1AbrkxsqTY9eiT5ETEDTWsvk3hhVrKQzhOfBssz6fDgwV+C+qrId1D5IKbheyenTTW5FneWrKYEAJZ+9N+HnfSu7xrOQm14Bo+SLi1Df+3UbxUML3M2Eqs+SX7EfFk 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:(13230037)(1800799021)(376011)(366013);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: NOS8iA8Z7MXGHSpkWjewEiNKGXnSwx7PWj7Z1myAN2kB9IkmCxloVpnKWgQxFmefjlCwWcTpqokosKhGOcp1dbV90IYAgTIoj9y4lEbZEOLJW8k69fIrd3Ts66/wtIVXa7SiOmREmb3TZtgzjVOzA+YGqnayYHe4MYoXVy7acUjD/lBrcCbdA2L1wDAN2zlKt39fbBoHOpyGA/ZDJkG6N8lN33F0/MHe20lwoWssNSx33BNruqk/Y6p1qNGm2YEj7rr9OU/Lgd2SfGnimqgSmTSWWoQT4Owl3DxCNRWpxYxm8B5J86ed/xmzVGuu7/dpB0M63NCgLgm9pkVlLqdOkvg+JmnM6jyPnu4fDsuBhk/PY8ZWfLXwam6jb8T17fJNHwuZC2G28cluo2XWOx0UfLW/wOC/tZGZKJJfsqVDJwwaO10MwU+bRz79Cn+0CZFMLEoI+hofEDBUNsw+acIOG/E+7wT1XInfUJqf0uK6JjU4dueMjbWplFPOidoLSfp2YzaruL6cEcr5HlCrdDQgcb5FjSwSZzjVIKIsT/8jksXWb5S5MIKJmfdV5DstVS3syoASncfb7xrrTwMGnF0gJcD72v2w/fCaCGz6myNXcbmYroOE6r1xBv4WztZO+bvhjRtz7RHh4lzgjHdM0QFEbtabFMLxlRl2hv63E9T6MRd6hudYzVkEep/AAhiEcBVFfZRFE+QtRwFi2BVwSG53rBrz88tTvRHBsUTgKZsVC8bY9TBkPcJY5qcqtnQl6F9/+6VXK0qup4jXMuCX5kOUVraLQHIxKW88TCjfS95PvK1k+HCql7VYfcN6RbzePYtGRhg/OYWJOWStwYYj9GimLfP6lYDZ0sgVDDbMl9iKsi6Mw9uU/MRF7NtiV/jYbsG4NBSfOX8hwN35HSCWsWN5IuSh+KOL0+t+U/X23fW+ARwGs0TF4v0Sb7tEFelLoUF0z2ZV36aoFB7xi4+QP66aF7hJBvUrj1Ye09zIjYjOeVtlFDvcXnhuBfy6Fl8EoOAqyrXwWc7rEQe5wlXpPyfFrkMmn3nL4IYSatJI1czpoF6ifMqYkyOATYP6mN0y4SLA+xLS0e+2eQIEqIhC1uK9yhaft4bc0Vmhu8Bx725r/7YZR87SpgqRG+dzmutWTcMODXP/bzErGZMBtg8FbwjMMQB/ienZsPQwGVGhyV4UURP6BxQ952lU2A+TlCIk9hGhn+rIqf1lOVi/uxEXcX3YSZoJd+NqxQzmoS4h1wX9jWprQxcb/hsXLdki+O5zJmeeFTYHtiPquVtdXx0zQTi8SyAaktq+BsVy6awD7F1wdIunZPfzLNQqu8K+pA+OdWYTbgV3J9V5krWR641wnbh/S50gcAS+rhW7NttuywSD9nfYfDRSByM757VF0bIrIDobCccWOpbMRPcuHDQpNGf4ty7WUgzJjBcYnobMesW85wbU3nlu2cFtfXqzrrHUICiV4s0sfJoXTeGCKHXhUExhCegZ0haDK6WqGvVMnwvqTrQG0vvs1OA35+eWmSNVxc485JR+m5CBtzkgbZrOcpvDv6CTrmq/cI92TSh7YQuvkNrFmsb1hQPrQVUfzG6N2A4tCWW6V1vm/Ux4G9msQqUEoQ== X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: ab2e3459-9f01-4ced-d9d9-08dc94e84575 X-MS-Exchange-CrossTenant-AuthSource: AS8PR04MB8898.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Jun 2024 07:27:29.9541 (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: rHffy3FliBQxl7Bt4GVhyHFNjVsGmm9hGkWKa03QMM3VO3AH2j0peYr39LGrtfhGcYnpOPDPj7jzYUJMj5750Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU4PR04MB10362 This adds defines for BASE configurations with multiple BISes. --- src/shared/lc3.h | 53 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) diff --git a/src/shared/lc3.h b/src/shared/lc3.h index 944f574b0..e7a9277ec 100644 --- a/src/shared/lc3.h +++ b/src/shared/lc3.h @@ -425,6 +425,59 @@ 0xFF, 0x00, 0x00, 0x00, 0x00, \ _cc, 0x00, 0x01, 0x00) +#define BASE_LC3_8_1_MBIS \ + BASE_LC3(40000, 1, 2, LC3_CFG_8_1, 0x00, 0x01, 0x00, 0x02, 0x00) + +#define BASE_LC3_8_2_MBIS \ + BASE_LC3(40000, 1, 2, LC3_CFG_8_2, 0x00, 0x01, 0x00, 0x02, 0x00) + +#define BASE_LC3_16_1_MBIS \ + BASE_LC3(40000, 1, 2, LC3_CFG_16_1, 0x00, 0x01, 0x00, 0x02, 0x00) + +#define BASE_LC3_16_2_MBIS \ + BASE_LC3(40000, 1, 2, LC3_CFG_16_2, 0x00, 0x01, 0x00, 0x02, 0x00) + +#define BASE_LC3_24_1_MBIS \ + BASE_LC3(40000, 1, 2, LC3_CFG_24_1, 0x00, 0x01, 0x00, 0x02, 0x00) + +#define BASE_LC3_24_2_MBIS \ + BASE_LC3(40000, 1, 2, LC3_CFG_24_2, 0x00, 0x01, 0x00, 0x02, 0x00) + +#define BASE_LC3_32_1_MBIS \ + BASE_LC3(40000, 1, 2, LC3_CFG_32_1, 0x00, 0x01, 0x00, 0x02, 0x00) + +#define BASE_LC3_32_2_MBIS \ + BASE_LC3(40000, 1, 2, LC3_CFG_32_2, 0x00, 0x01, 0x00, 0x02, 0x00) + +#define BASE_LC3_44_1_MBIS \ + BASE_LC3(40000, 1, 2, LC3_CFG_44_1, 0x00, 0x01, 0x00, 0x02, 0x00) + +#define BASE_LC3_44_2_MBIS \ + BASE_LC3(40000, 1, 2, LC3_CFG_44_2, 0x00, 0x01, 0x00, 0x02, 0x00) + +#define BASE_LC3_48_1_MBIS \ + BASE_LC3(40000, 1, 2, LC3_CFG_48_1, 0x00, 0x01, 0x00, 0x02, 0x00) + +#define BASE_LC3_48_2_MBIS \ + BASE_LC3(40000, 1, 2, LC3_CFG_48_2, 0x00, 0x01, 0x00, 0x02, 0x00) + +#define BASE_LC3_48_3_MBIS \ + BASE_LC3(40000, 1, 2, LC3_CFG_48_3, 0x00, 0x01, 0x00, 0x02, 0x00) + +#define BASE_LC3_48_4_MBIS \ + BASE_LC3(40000, 1, 2, LC3_CFG_48_4, 0x00, 0x01, 0x00, 0x02, 0x00) + +#define BASE_LC3_48_5_MBIS \ + BASE_LC3(40000, 1, 2, LC3_CFG_48_5, 0x00, 0x01, 0x00, 0x02, 0x00) + +#define BASE_LC3_48_6_MBIS \ + BASE_LC3(40000, 1, 2, LC3_CFG_48_6, 0x00, 0x01, 0x00, 0x02, 0x00) + +#define BASE_VS_MBIS(_cc) \ + BASE(40000, 1, 2, \ + 0xFF, 0x00, 0x00, 0x00, 0x00, \ + _cc, 0x00, 0x01, 0x00, 0x02, 0x00) + #define LC3_QOS_UNFRAMED 0x00 #define LC3_QOS_FRAMED 0x01 From patchwork Tue Jun 25 07:27:11 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Iulia Tanasescu X-Patchwork-Id: 13710736 Received: from EUR03-VI1-obe.outbound.protection.outlook.com (mail-vi1eur03on2046.outbound.protection.outlook.com [40.107.103.46]) (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 79302146A9B for ; Tue, 25 Jun 2024 07:27:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.103.46 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719300457; cv=fail; b=M8kaavmOU6ECsz9/gwXkdtFwRQPFaYn1Ve4xU0t0Ie15nTNJ7Boq9FPtjM22miULl9GB+6f0yK3aeKriakv5v5qv4TtpwGoCGzKVqVYi19VdvM4Eql/sAVgUvdycfxx/PHRo9D5/2xjzp+5cnhgEsMnHT0ky0ViSyjRdNw/ehT4= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719300457; c=relaxed/simple; bh=R03emi2npQ/n9BN4+32VMWAZCDN+jSnpaVTL4vHGu7w=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=Nb9CTinlwFK5Sbr/WF3eZvxwd7pJK+5PoD0WpMekeIjqnhZCQ3McmVnHViKwlvtknN1OLcleEd6JDebEPo6093rhKTutp78HoVKI5qTq0cR6wYgAsLVx8hGW3RhoqYtBzFlqzC29ezfJ50PuXHS+wgWjnbmTOrj0MBT8WbOLB68= 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=BFRoJNsw; arc=fail smtp.client-ip=40.107.103.46 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="BFRoJNsw" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=NfLgqUkw6cNiVURWrHaRBc3zmzdYH5nmpM2H2Z6KX8lrbbGtEysPpgRfTGSTWKqJIvLRQ08V2eVYYC5Ph4NHWCD9d9QwUwbjR0lIlAZRFsyBbCBtdEmGGdEiECXDRyPoBLHjoSZiYKrhD5fopjn09/O6Uq08e+aptH47lIorLbazSy3vPB1yzcb7jOYyeTfdwn5v/qUk4aW3TMWurQLScbLNIEd0RlA43W8g/B3DnWMqIQbwKLb4NLFdZciJWOSqKPcw9sUfJiAyRIorkLcfZDzFxNZyw9gxcRP/IvS7QMbLgW7/m2qK8g1xIz1Rf1U2wVLwpXmZCw4WuVJ55Qh5TA== 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=pYgMK2At+kR0dnCGqhhs5xIw7Z29uvGARpQ65kqeC2g=; b=mFDrOFpAYoXes6kL/Hx7HNBei1KL176ZU7LSABfi2+y/qr5PuSXUbD7JHPQCGUH2bbXy61M1Cl1Z56yAmQPX/6aJtv8tr+J8bc4t7B1v5bvguFeqPfuAxzd/Hz99YrGzNoMK2p/mTHq03ppL52jbRcOQniuWXcQcIEK/FwFsn7TExHC+DCmD6c+0NrukDkf3HSFfE+mDJDMu0GMOtDj/B95ZDrcT+Uxxck6NkofZ8zFS9aSQpxHrhy8B9NY1XWT8CMjUgFRzXrYDMRjvruwOEsnFpf1tmQ1ozWRFg24sXoIX/+TkSQQ+ND2HDgz32pbTfM4xD6PxOKQNUQikqPNI4A== 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=pYgMK2At+kR0dnCGqhhs5xIw7Z29uvGARpQ65kqeC2g=; b=BFRoJNswnXbD56F2mcy4yD+bN52r5L+cLRvknR0o5KA/ysfoqEuI7YQz7uo41gXjbNu5qp57CTD/hvGCmy2Us4+OHIBh6oZyhIjUNsbiUtfPs0eWhkqSNl5s1SAVSAMJNMIy3AN0N7xF70/2guFRHFR0euZctkuXoQoCrTs0SzU= 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 DU4PR04MB10362.eurprd04.prod.outlook.com (2603:10a6:10:563::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7698.30; Tue, 25 Jun 2024 07:27:32 +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.7698.025; Tue, 25 Jun 2024 07:27:32 +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 v2 5/5] test-bap: Add Broadcast Source STR MBIS tests Date: Tue, 25 Jun 2024 10:27:11 +0300 Message-Id: <20240625072711.7011-6-iulia.tanasescu@nxp.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240625072711.7011-1-iulia.tanasescu@nxp.com> References: <20240625072711.7011-1-iulia.tanasescu@nxp.com> X-ClientProxiedBy: AS4P190CA0030.EURP190.PROD.OUTLOOK.COM (2603:10a6:20b:5d0::20) 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_|DU4PR04MB10362:EE_ X-MS-Office365-Filtering-Correlation-Id: f8ab12d0-54f0-4e8e-809c-08dc94e84722 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230037|1800799021|376011|366013; X-Microsoft-Antispam-Message-Info: lTvaS8cOVKpy59a0Sh/LAREdQbpXgqfPWtYRTRMqlhTVZDO5x0VZS8DO7hMYWvYvifPnn6vGmx4j/2/oEJg5ExrlDDcFHpHfV/bj3PRL2KDZj2UeRUOkXGV60eJlJfp3bIDk6KuoUq0ooNHgVdv1L19yj2zwBqcDSNGDjAB7MACN2U/5vWKfqMIAR66WmAthY+mO66k9CAurx8Yglak7oXarelB9wo/pzyP+Pvl8NR33QgBgMfYeXR2zUA0MrMqmNpS2moKb7B+m6EtETziwDECPRBXE4O7N3wyH99TvUwH1PjxzWGm4ObV0XU1Dsx/bbI1TVbHyoMBpl2vQngY7/7eG00rxM9iqIJuf9sCah8qTiZRK+ujpes7MSkuAH99fvdAGAauLajKZmI/VgB8GlBixN8PfPl3hnqYTWomGPfpqzS+tSAkP7YW62rxPuMxuCnwpUicoqgzwlV90+OsYgk59YvbiowChdBN/34Fhhl2V3pz79Xm0D3SazjYoqcLHyzRLetWHTcN7hSL2e4Sho30fuYmSmEcFHVOGYtvnYsFciepFs2bGf9DRC176os1685c9oiahyRFsVrvmOWjMvA5QQN+qylFQ/owwHgQWr1VzOosq27n4wvrV7umwKLHLLobbmIbOClM4RRPLToZNy3H8O84YZoIZr724IDOtMEWqpFUzucBaGonLQQnROtS/GJgV/BSY+Ee/PRyQLVT5xcFbmO4D+h8ZRu83PfB4VKtxMaNVXwNO5JLw1XTZgpHJvCqowA3Q5D0jt9ZcCMTH/5NjE11Te5v/wG0VjhEBdrdGg3bNCqrWddhAtwL0ROtjP+pOmDukcI3HuC3psWjYwSlaqtVzqKpaxqb9VeqGspykgUMLBaOLne0Km32yQCtLCQP/9ivLTvcrW41Dwuds/1XwU4eL394Bq1WJYAaV174y5pHzZMQwWn9gXlpCQ1oiTY8Lb1QDT/2q67WWHP7dBEAI35cZX4pIoHvJy30NQX2xaki9+N9cGCWDUKBs436d1JgO0806MFVN4Pdic5WT585vJPljjbH0PDYFOm3934tZOsMrZ0nwFjk4W5PmkBZtA7LTXkJ+cCylWrP5JQpdXlvtHcdwdDUA0S9EVpMhqXFMEQOq1RNcGGEheRSQUA1o2swpKTgL3XklIni+BvsBeSnTB7r3RNXhbcP4w1DOrO8FrtIuX26ndgAue0hvsy0zH5CvPh8LaSnLeYRsLCeee70OyfwQb91wyMw7B51xpKWcp318ALUz2QexduvYI5FRRPqbGDINSaniMzr340FWoGw7ErJPokbOY3SRss3Z9lMWzrp9CsNJi+nn5EmW2Rc2 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:(13230037)(1800799021)(376011)(366013);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: rmxtBGObFJ/t+R9/a8CvD2xLuiojxUQg0/NeJBfQomEP2A8yaKCnmT+XxtbyyIgplR44Tyjm+M1cud+N1qrHyKbCBe3wHseks+Bo7mdALJmczE0ZWcEOUKvAjsYLXjkkTr3lKvL7ADsLmtXybJcHgq53RndxE6PE/dC+W6py8eKcjemkaAbXRYneW+fHayI0uw3qphkIPTVm1Sj5hC6bQdb+/hHL5O2TRUGJ7ahu31pF531OWwu6G/f9dUKjfNDMg9RU0585Nzq4acSc0WyLfRcqAnFBe/gdIiWjdoEiAEq7mMUYjUsYWFZuQ7A2/07nMdc7cL/iWVpmUOJvIReUwDLYBLSip+mKu/W28uMgRWAWJ+2a9536bCRhCLfnSdLULdoNv9gQch2rdy6241gXloOpFHwZ8F2G1MCg2GnzkDZX/PpX4sG62fX8tiaGR/jq/t91Ern9g4UlCDUKVJj84JQ8BYzz+LAtbx/PFchFjj/TGlW3Ai9uTJk3yrIovygO8tjVvqTTCJcsfxYVeNHOnXnzVIaeI4zRbqTcLxQ0OQ127z940AZ2PZyq890T7+Q558/kq+9p9TM/TMR4cP4czLgFwfDEzqDkziAGKOFymhL9R2EyA6WvBNJM9bqN+3D7lmJyunf3xAB8mSp8OEHfEyfMqn+MM/3fbLHbkaCcvh3uR+oIO3rnkhcY/u7lMHXjhKu+nnGGQ58OJMJ5w+CnV8KnA+6NfMbnS55bV8VCZSxxq/r4s/rIEqxbD3/CUJhZhf3QpY2GhZaDOWhepIIeIwpM3jcEHZH8F1p9IAq9Kad+wBvGCBArYGTOsY6uzFR8pi093/eUiILPXCHOFXD1YYvMzGdD4y57n7sWbgafRXXScaY25op8n+xSQVVtnqF7/Thhh/eLSdWh0ap2s9hFzNH0dOHlrQhB/UrvFmtyL1EiQsn249cT7LkZZCxhUgINKSPg9Qu9duNl8zLdfsm7QnPpK5tKvagFn2YBTm8jlyUADznZCOJz8JYI39yg1z8nBCpSb6rgzDxv3rfs4pEmdOSo+K5YLl0uOFr7NceTEGcAS2/E+rNiMAW+vBUJsnxqf5sHa+MxKToChbaT7MaIN57X767xLLKbcfC7l/wJG87JyP6EgE/dfoV95HbpTrhKkxBraiE6kC5Y0N/cOOqlxE//q1YWZgTcmJ1jsUGiv6FikTZDgWcxJTMZ88T2BzMWsKSIRKEr5VquOVz9jV7gtfC6oyZA+ttoZaS9RORqRdBD5lMrfrY5RX0CvrR7dhX3Lu+V+cTzgN+Va3DrSA8M7BDZ3cNgFB9PYIflFBtg6gL+MJ1N3M9L4OAHczxBEm7h80leQxYCUcBy54yBnMqZQkN2Uzk5zPkMxvoCdor5T+RGY6sCY9B/5eiL43NN1cZ1hT6bF/7S5Ph2R6YAVlqRefkpJ5xIPWRvAUcxDvRwAx/d5eeT4zWeTL80Sxn5FDFjU6JewUA84sHyzgHzRwuveqaI1K6i6CKa9/m7w0lY45toa7eZyNzoxcvVaE8CzaDiFIIzKXj37HeLnxoWtU+46Rnw5P2UtIZcBEnhVaJnJga8NpvHjH9Kn6oaw0d7wE1dVNxKCgadrrwjegi0X09OcA== X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: f8ab12d0-54f0-4e8e-809c-08dc94e84722 X-MS-Exchange-CrossTenant-AuthSource: AS8PR04MB8898.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Jun 2024 07:27:32.8189 (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: hO1LutAL1m6r0PHj3VeRG8x4XeVAr81zBzbe9uwqyHw1ZJyWU+1DnJx79+v741XGUwAX3GuszR3rirQ5zJCh1g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU4PR04MB10362 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 | 302 ++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 294 insertions(+), 8 deletions(-) diff --git a/unit/test-bap.c b/unit/test-bap.c index 9b75cfc80..9dd7a45e8 100644 --- a/unit/test-bap.c +++ b/unit/test-bap.c @@ -6825,27 +6825,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; } } @@ -7078,9 +7137,236 @@ static void test_bsrc_str_1b(void) NULL, test_bcast, &cfg_bsrc_str_vs, IOV_NULL); } +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, +}; + +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, +}; + +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, +}; + +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, +}; + +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, +}; + +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, +}; + +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, +}; + +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, +}; + +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, +}; + +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, +}; + +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, +}; + +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, +}; + +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, +}; + +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, +}; + +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, +}; + +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, +}; + +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(VS_CFG)), + .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[])