From patchwork Tue Jul 16 14:22:06 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Iulia Tanasescu X-Patchwork-Id: 813245 Received: from AS8PR04CU009.outbound.protection.outlook.com (mail-westeuropeazon11011053.outbound.protection.outlook.com [52.101.70.53]) (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 7345B19D066 for ; Tue, 16 Jul 2024 14:22:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.101.70.53 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721139767; cv=fail; b=t7Yed10xNooq2oYmY8+gJB6bbkhBfB6aMF8baBa1u8zeAY/mD/2bf235DC1x53yeUaenPbGD1ywZ0gUhERTWEhy4nPUTulXqrBMPDxHJOa45ActMn3tUAVYNOQJGPKhE4rTOnkcDScfAWEEVnVY1GSytqVoxir4FaYH3DP/+HwY= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721139767; c=relaxed/simple; bh=ua6TblhuyBNkZjJRXDYS5Rgw3QcQoCZR93GLPanq/MY=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=aGQKxMlKFtQt3PpAw+0BIjnJfpBdAITWVRzt0UW5QPgRIboE2zRpNCCRlBDZcoQ3MHOSdWX209yjRzVnFZ6lsqX3NXQ9j1rxwrqft2WTJp1QMYia5O2zpHQ6HfDSkcBA1tMPjq6dVQPLUhK8k0zIIYrTlfpO8a0kpnTbT/SBBak= 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=A7WAJY6P; arc=fail smtp.client-ip=52.101.70.53 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="A7WAJY6P" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=TsRBCEnqbbLf/Mnc0+pWBuhKxMV9KHlqrI+S+vSNqfYeTgrx0Nh1nrAOQGtNzLehMzVLNl2vvREIcoh4gK8MbQyFDWrFkvjAfTqLwXehr1uhj6ZdQ77/uHYh+y+EW1ABcER0VZmadc2nLXhuPlgg+tlKxvRLXxFKfhty0C41QI3cMKthr7/QDoirlexdYVJ/+xbjcqrHQ8yTpLtb5Lxwz9xvlLUdE4DBRWWGrt5k0hAcnqRsi59GLIm7HpbMX2Hh5rcKfpkBJ4o4VoQsoBm/pXemkdi1lVp5+HCiNnWTJ+99orJzKqRCJRQjY3QB9RA/3HF/JoNjxS+kwlQzJPPYUQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=9XRJsCas1pQ3rbGAdecb7i7y3ClDA6SyRhcxHysd11s=; b=MnFNqXax3NHO0Y6uGhPMlgFjfl7QtCsGTXm0rMEUGVRL8qQUw8LMXTkI+GaZxzn0L4AwThtktGIDKEZBdN8EM2KyluAjjt8+GThkMle+/utsOHdlsdy72owc9qhFCfLOhY61tvZ53E63uIrkHmKq3/XsDj5PqgtFrj1RclfCdSvgxuUfF9KeRF2gvt3FBv0Mq9mF1z2YIVFdomtRdQQIgia2SEbItnijeCCHi16TRVtzRVHd5+qbIftbvemxw8uy224dFKMNkq7EXsi1EV0WKNZ3wvH36ow5rwZy0knRC8eukWMCjBXSAD1utUbk7OEZ0jGDvLRUDK8XhYzvmo05NA== 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=9XRJsCas1pQ3rbGAdecb7i7y3ClDA6SyRhcxHysd11s=; b=A7WAJY6PXHy9nSHlZAZ4tKUw9vGVV9XhBX2SYXHZojx6bSy72MnX/C9giowxbRQ0s7f30zGyNHOaAxBGqX2bJhYcv/GI7tJzJQ1VQqTvXCqgu2GyLKvQ4cMAmEo2wmrKhPxbzvr0fmlhoA+/bg6rBx/Nh/znEjkwAgqKISL/Dkk= 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 AM7PR04MB6789.eurprd04.prod.outlook.com (2603:10a6:20b:107::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7762.29; Tue, 16 Jul 2024 14:22:43 +0000 Received: from AS8PR04MB8898.eurprd04.prod.outlook.com ([fe80::5e22:869c:33c:9654]) by AS8PR04MB8898.eurprd04.prod.outlook.com ([fe80::5e22:869c:33c:9654%4]) with mapi id 15.20.7762.027; Tue, 16 Jul 2024 14:22:43 +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 09/10] bap: Notify scanned BISes to BASS Date: Tue, 16 Jul 2024 17:22:06 +0300 Message-Id: <20240716142207.4298-10-iulia.tanasescu@nxp.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240716142207.4298-1-iulia.tanasescu@nxp.com> References: <20240716142207.4298-1-iulia.tanasescu@nxp.com> X-ClientProxiedBy: AM0PR03CA0075.eurprd03.prod.outlook.com (2603:10a6:208:69::16) 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_|AM7PR04MB6789:EE_ X-MS-Office365-Filtering-Correlation-Id: 1aec88e0-f893-4f3b-85c2-08dca5a2c16c X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|1800799024|366016; X-Microsoft-Antispam-Message-Info: UELhyru3k2UFC4wrJnlav+hvCHwVK5JDGsiIW1tixrCSnd0WzrdoIiuIOS135wTOWJ6ikaTj+LGHnDI+YCTkN7y3KovnlOGt3sJp5TYxZQQTPu5lrmyPTkSbLz+BOfKBNIYy3B4V7i5eBBEgNL2tkHZ5RF3vtYTYCIGGBNL4pRXDlgtc7WvjlHK4n7J5Ij8BOzNXJV8eI3i1KjM3Hj6XluUJPJXfoz2PQOk/dDcTFv0VkKbe+klJjBxNTk7DpsFwsa4DszqXR2uwS4veVgGom0JJawtx39u0MrvgSNU6i8V7N9bUGI8Y5WIiChxmezr9ZCS0bFzIYJu0q62sfNJM17cVHZtwSH8awrMTuThWbYp7f9AdAuLsJLElDU8j9P0VczID790oxgqisGQWJFGTSLNWF6uczS8973yhXXv/6S4IgA9WRvPueQOOJHAOnwXHNKiWlyzGdd24vM19xL1W6eu9EArvWvAuwybQWRincVjiXjvZJVHQcb7RMGvtr5Jmd3mjVKcsDK7tiq2aijA1wsp+quvP9abTMFgOTRM36JWlVkyv9xWgg+rcMcW3zCCyMjcUnjkkN6EBK2D41V6Ubo+h4TyKrfsCwVKenNrQXnTIqASrGNIUMCCB0I30vDMRff+DE5/eDFuKmszpu3KCzS8mhU/Tl0SuR/UXmA60fx2rt1x8oUs0H9pd8VpspsdN/B2NtPh/VyxyqG8w8Q9E65cCeeK7i2k8cUXtKAPx/U8GYB0f7mLbLzOgpq21Quuufr3qL+3pT7Fq1MFR7SYtulihCwC6h+Pfcnxc5r+rupy4/8ePrBjaUwWNPmTWBKa2ARMrWKuPG8FiD3esleopBmal9qQeupME96bs6re/UxGhfrpFQOwOpgD8WpVJ2VcvUdOmadKRUKwAlR4Uj3A54OHGWOEiuR0AlquuM3FEfXBC9X1tIMA/X9cz1Lu2J8LxQg8wyPZygl7qUlqydQm5ox6pQBS9BDZ/tupC4lZdMiZkc/Pl86i2hUVcMZWZbnXtawfCudNH/pxd9i2OU2sSthBAGc4jsetBwPfSNMtqFrsxukHax6pyMsDpxMzn9sFM18esA0KTTJrtArTAPVvBOn5UVcMboK2kow7yOVm91jt1Qng89p9IPIEQ6jaWiyZxzbGf3g+v0KYTIipU1fEs9QPVE6weqBkrxICOABWqN5iVsxWFQA4hn4/UdJiZg5u3nZBcX9xyPHuJStNyqmCe5YRNJ6RayZlkUl/byoPtf0VX8NlkJIEW7R3l2ZEksHkMggsCvScuvsiZChr5ysmF0/r7W7xt4wO20mSPwC1brWcMfPLmUxXsJBe7uNM4GR7lXI5JR+ILBgid+We7/wBnow== 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:(13230040)(376014)(1800799024)(366016); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: wKLygoVH5QChw0dqJ8vbIIzXem9hrlACokUo+HG0tMoRxiquUcJKRqBdit0qs3lg5uZ3JKpcv6z4zYax0zLn3G0u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mXimA8NX8bPdYfFo73f8wgEQvhi+DmiwO05rlHLCPOWkI8c5JOlipLdHF2eKAWZ1HMXnPX3v+MXZ98i7g37PP6/VbJhkLor50Ez0shAGU2H8QkHX+1yh3NucJfJjeDQl3m5/1NhoCNFs+k/DX/w47es+onGYITEfbDOX1krYFKu5r/bOtwrR+sU36XYiQqP3XWQTqyHkiX955E+hXE8J3GZNl/yJbu5MWoTHmTe9PgTJpPFL2tb31D9MB6bsljqUu/U08JxBHbygZk7b+pOTrlPHRVABM7vAhRQuMxajbeEwWZ0pY0ewaTsvUDntg48cFa7sA8KjaaC8Soc+FcpZ54G9w9gjA1qRUvIXBcA72QhDsTNi2alsC5xasdm5T/+ULOKUOSxTFyICFQMPycIZl4H7Jswtx1MZuwU2oNwysnl6f2rBNopwgFx9yO5+YR9Ym3Hnanw== X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1aec88e0-f893-4f3b-85c2-08dca5a2c16c X-MS-Exchange-CrossTenant-AuthSource: AS8PR04MB8898.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Jul 2024 14:22:42.9967 (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: z4etfJ7V9rc60NiK3UpgWYo+QxHVCq5+U0ju+iWiLvayp4b9yHeVwKhcgzd2KkoEwZEwJJNSyOtCJv2OhoAn+A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM7PR04MB6789 This updates the BAP implementation to also notify the BASS plugin about scanned broadcast streams, or when a scanned broadcaster is removed. This is needed for the BAP Broadcast Assistant role - the BASS plugin registers MediaAssistant objects for each detected stream that matches the audio capabilities of peer Scan Delegator devices. --- profiles/audio/bap.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/profiles/audio/bap.c b/profiles/audio/bap.c index fe5390e6a..50a68f27a 100644 --- a/profiles/audio/bap.c +++ b/profiles/audio/bap.c @@ -57,6 +57,7 @@ #include "src/error.h" #include "bap.h" +#include "bass.h" #define ISO_SOCKET_UUID "6fbaf188-05e0-496a-9885-d6ddfdb4e03e" #define PACS_UUID_STR "00001850-0000-1000-8000-00805f9b34fb" @@ -1199,6 +1200,9 @@ static bool parse_base(struct bap_data *bap_data, struct bt_iso_base *base, continue; } + bass_add_stream(bap_data->device, meta, merged_caps, + qos, idx, bis_index); + /* Check if this BIS matches any local PAC */ bt_bap_verify_bis(bap_data->bap, bis_index, merged_caps, &matched_lpac); @@ -3227,6 +3231,8 @@ static void bap_bcast_remove(struct btd_service *service) free(req); bap_data_remove(data); + + bass_remove_stream(device); } static int bap_probe(struct btd_service *service)