From patchwork Thu Sep 19 08:20:46 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Iulia Tanasescu X-Patchwork-Id: 13807492 Received: from AM0PR83CU005.outbound.protection.outlook.com (mail-westeuropeazon11010059.outbound.protection.outlook.com [52.101.69.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 E3499198A2C for ; Thu, 19 Sep 2024 08:21:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.101.69.59 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1726734065; cv=fail; b=fvzYd7aEOF4c91QCswTuiMTkpXGfaFKEwRwtk9qVfL4gj0y2OV+mLhnHrhEbb/uByu7upxr909OIR1SQ96G7PfnDOCkNGjXQZhchsjAXqnX5SHdlbztxo+/5PPDLgnpfyfGnijrTwBU81LqA6LmIo1KpQ8OWGUXetIdrFTi0yxs= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1726734065; c=relaxed/simple; bh=NDktjNorpWZ/XIKamoaLr8t4CV2qeBe7LaLHR1YPtGg=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=gJKlAchj3CIUi5mFjODalu2n1TtInbml0UknAFsDBQ3Bu9vDU+mlMF8bT9HuuioPS4/dHCqPGtrQpERsfl3jZLTsclHuO/3AqdqH9NbVd5Ye43dTP/+uE1sMaKK1lHEAhRRkiOt7HZLeQS0n7sGWhayQHj+AHb9yergroa4hrQ4= 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 (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b=JlEr9zk9; arc=fail smtp.client-ip=52.101.69.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 (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b="JlEr9zk9" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=xhY9lhxc1VJI7KkTzoAhvDGJb3e6SIdr8MhQ/UYa6lvS1/sq8EXc9ELrtjoaMW9NtM3KHg6mdsXtWtBJ/gNmSaCvy1OrQ09yrCKTldiU9O3BMvx2x/nEfSx5moWwVDGdcvsoJvqZtTGGF2TMkOAD9fkm3TBXskVSs8hSaWCcnD4BQPC00e7ExAh7TbNVPAbfKZPrEsV+hPz6CeHpAiKZRENK1De8Qrs4RpZI6xtjHvkZiMlka/GzyleE7D67YsMOE2uqH6ruMffSGVM+SlzwFNIQMrg1KEsDIHi+Ev0v7MdiZ4M2kxqOgGkGn0PLVwtydC+6qsBNg/K1czvsrD1/xg== 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=yh3gPkg+7jlnZ/pLXESRzXAUJQ1mcH03IkEJiG4EbuI=; b=DdYn7iw+KhqpB9Nfa+/3KtK9tY/YI5SwCF7tE8nllEdU+VyAyqdE0a+iVfbnhR5q/k6kC9N7mfUiuqLKbYYGhsq5np2Z+PfQMnBEmcMnrZMfTiOrT0szQIqEXHzZOuSBYfDrvoTB6lmuMs3CKBVGeRZM0QbHMx8PczRO8vrB11yZqOQiatetEYeNENAmDGPlMwado3nnhXKx+uj4R7MR26QjfFJSvxZBgOFXpLhz/strG+WK39jqbtYFLxulFJ/ggD83QrHaO+5ONG34VvCTETt0pkOUB1RsAWu1VxaJtT85Sp7ZkdHlAe8uiMNkSPyVs9KTkh/7kuZfnl85FBEFmg== 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=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=yh3gPkg+7jlnZ/pLXESRzXAUJQ1mcH03IkEJiG4EbuI=; b=JlEr9zk9LTJRJNCucQMY8v1vMF9Yjbi8EzKFzbeZm1D6E9JvBuDMA/KsorBLGD0dkCU0O7PPbYopUIoo7PEVOF+XMZIdCOtHraxWhuJTXgoGlAMAB0CQfdsZwToGjXSS6mAJijW4dHXMf6n4O76SzjCuiSZnoTb9D+lYWmr6c0m9GSz/OgSEZzNwLVPg+2mpng6rtxrYoQ9STw0DSsbFq1tzWmRs17Y0HenCHHNYWWER8LxLYdDBIdq1LhxVs6VNB3xo/UU9F7PNFaUm/5XG4S5XrdP/LUHqtUM49EILGphj53ekgvuejetSVm+ctYj5lkttyIEUYve90zGBhD4WSQ== 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 DB9PR04MB9842.eurprd04.prod.outlook.com (2603:10a6:10:4ee::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7982.16; Thu, 19 Sep 2024 08:20: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.7918.024; Thu, 19 Sep 2024 08:20: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 1/1] bap: Set bap debug func at broadcast probe Date: Thu, 19 Sep 2024 11:20:46 +0300 Message-Id: <20240919082046.7208-2-iulia.tanasescu@nxp.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240919082046.7208-1-iulia.tanasescu@nxp.com> References: <20240919082046.7208-1-iulia.tanasescu@nxp.com> X-ClientProxiedBy: AS4P189CA0008.EURP189.PROD.OUTLOOK.COM (2603:10a6:20b:5d7::9) 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_|DB9PR04MB9842:EE_ X-MS-Office365-Filtering-Correlation-Id: 10464c70-0192-4cef-3d92-08dcd883fe01 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|376014|366016; X-Microsoft-Antispam-Message-Info: EivMEi77KJysYWBAuk8FsP6g/7HBpZXnEb3FqqHfz4vDrv0tibYIHGS7z26MIwdENL02va2HLpY4K+y7O0gEp53RhyN4nWTDF60ubXRX2SSM+Rb3QDKq6f1HmKldoaR+ddHP0No0+MJJh16PXoaD4DLpN8w1NcTdyI+nbAZVfXGur64A/cOP8S1KJF7Udi3t6mbrxmuhSkAqf19lR2oOuBcU6heBWSpdvdyGkxtUGKD1xEiqX8O2h89couHhSMfG7nvjunlXi3wwYAH18ejPDV1zf81MIPRCv2o+WdqJTuQ7Lo0F1Rrgx63gC6F283meUJHnfxz5vhwe9qbeckgSCwtJZ04Wi5b9d2nsH3y7XdpNHrk9W+9SCTO04n8lFJA5U4GAiScJNYbZ+5Gh//xaQh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RTuqAtJ++lmIRryTN9FiPZuuDa2cZKMz0WMEoQUbjlmY7WJkdgst8LFGpTeVN9hJ4dbFPro2E/rC1JmX+E6vCQ957jeGy1aunDddLjdmNUFKMjQiv4fDHApyukz+vsSYNojvYiuQXLJTOyHYB+cnm0ueNMiK4+xXkGL/JHtJgK+T7NQPgimUIPkl0OV3rhfVQM9ILLlgNYZvydBb9KIMQhY7STb0Yn+LSNu7LzOPTQOfRvuzjvkcvzq0bJ1jKCXLcL1WXWXZ3J2dU2674v8+Zba2GVrVYoL0zsZzvaOFkGZTInbZp5I8FRW3eh5G8cJH2IgAW/6TTp8Ez2XXzSCzKCweGr4efn2lb5rKLR9GR6xs7c6GxmfFSOU2wBwN/NoEAIKZAbmtq8TizLqfx5FT9hJswUdEiCmDiCZxuHNusFcWoVYDqFqmWeOKEnGeUHgoIRkj+D2E9wKw5GtZbTE7dwPdTlQtZXZ5kLEIkoXEgmU7vKP30JwDLDuLAnwm21Jyx18Xz109PNz+CfaM8jiAVE2iJkHgxMcSbjWcNgvZPX4UQCqL2NGBdFV9lQNVu4BTY2zox0eKkndBb5dXX/+sPMy/yaJSaMcZHEYCzJc+B2yW72AuBajWu7CtDZ8fCQ3Q== X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 10464c70-0192-4cef-3d92-08dcd883fe01 X-MS-Exchange-CrossTenant-AuthSource: AS8PR04MB8898.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Sep 2024 08:20:59.4340 (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: QYM7Mv+TbuwbPbvICnekJ7I4LuZdVkvwFEN3JWGY44qdYmjxVgoLXufMVUmUG5tHMPSImYAZOjuDMGuJmVm8oQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9PR04MB9842 When a Broadcast Sink acting as a Scan Delegator probes a Broadcaster with the help of a Broadcast Assistant, a new BAP session is added for the Broadcaster device before additional session information is initialized (like the bt_bap session). This causes the bap debug func to not be set in bap_data_add. This commit adds an explicit call to set the function after the bt_bap session is created. --- profiles/audio/bap.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/profiles/audio/bap.c b/profiles/audio/bap.c index 100acca57..c45717ef2 100644 --- a/profiles/audio/bap.c +++ b/profiles/audio/bap.c @@ -3243,6 +3243,9 @@ static int bap_bcast_probe(struct btd_service *service) free(data); return -EINVAL; } + + bt_bap_set_debug(data->bap, bap_debug, NULL, NULL); + data->bcast_snks = queue_new(); if (!bt_bap_attach(data->bap, NULL)) {