Received: by 2002:ab2:6816:0:b0:1f9:5764:f03e with SMTP id t22csp910156lqo; Fri, 17 May 2024 05:35:28 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVk6cH0nJ5h+JSjELI2c1nDjk8lQwSvV4eEa51X7wraMQF0tJP7n2j58r7hDvQ80+zura++FRLmF4UQp8fL2z0lFOhA6kyxk8U+ZlIWfQ== X-Google-Smtp-Source: AGHT+IGr7aavwhsmlRVGGYybBDubockjCC/zbxN6Pdb6bl6SvFyqcw6gCI55cHp3TU7wyeEEwQp8 X-Received: by 2002:ac2:52b2:0:b0:51d:44a3:6cc9 with SMTP id 2adb3069b0e04-52210275d4fmr12626012e87.58.1715949328816; Fri, 17 May 2024 05:35:28 -0700 (PDT) Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id a640c23a62f3a-a5cde77f2easi227395566b.828.2024.05.17.05.35.28 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 May 2024 05:35:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-bluetooth+bounces-4767-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=bzmyyeK6; arc=fail (signature failed); spf=pass (google.com: domain of linux-bluetooth+bounces-4767-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-bluetooth+bounces-4767-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 5CF4B1F231D4 for ; Fri, 17 May 2024 12:35:28 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 74D6C481C7; Fri, 17 May 2024 12:35:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="bzmyyeK6" X-Original-To: linux-bluetooth@vger.kernel.org Received: from EUR04-DB3-obe.outbound.protection.outlook.com (mail-db3eur04on2082.outbound.protection.outlook.com [40.107.6.82]) (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 A0EB94778E for ; Fri, 17 May 2024 12:35:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.6.82 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715949319; cv=fail; b=Dz7YK0JVWGjo9NDqLt6Q7NJhDWb5ONhwiRk67PEPE1PivnGf8IFDhkvROA91/3KgU8mCdHMRlQcFjZSryVzrrsz0YQfn44dU+di1RWmWwBDl1vTALWX4S1f9iegdl97RTrjzXilgE2k13dbyRIyYabJcdCHyEMmhMf1lOmKVDZc= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715949319; c=relaxed/simple; bh=qAvax0zB9j2L4+i/TgbnL//3KZDco5Yz+PYZIf7JBRI=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=JRpaOdFw0LzcUqqW9wC0DLEvsgQmvXdyBRdolCGed4GLRAgAowWSE7f2BopPiTiiGxfmb6Gao6hl8+VfV8QAEXlM8Dirusj3CxNntSx0cm34xtc3vWIPDnbkzAW+srhrfJ8SSESBHO9uQShzZkMIReTmd5apSQki4Y2ckRAwidw= 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=bzmyyeK6; arc=fail smtp.client-ip=40.107.6.82 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 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fRqknCrsTLVWQY/gX54Sd3uYNUVGLg6VcyY+JgME1RWFw/ic+9ZUr2Md6En4s8t56odih4JrDUmXW314tc/caa+xfTxV1IprRKIKdCpQAIZS8iwtZMNbdpZADBuP8LkmIBcpAk0F5rDlun3KXVK20QhqwG2fnh3RxGTaxeNc9jc7KQEWDmmcGIg5dhwaC6xnHli28exJF1jvxxOBjjd2BEhuEVJjKfJmfPjcdaA+dlThwRVfCGQoLpvhIZsXOqBF+J77zAg9k4mEzguV80Ue2eV7J2kZ/HioZIuI2NwZuVhlGSwoQiEUBk/SWKru+kz1iwia4nDPtYATRddYeeI4ZQ== 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=3IvHQ5wdcDziVYYnY2bELUDP4mnMsFwYmrWMcffc0yw=; b=SWaf7VGt7+kLuS75SJBF1OClez1xlhKR4xFntIqiyh0ZiX20YUyzG5EzzS7/eBh7EGItMpUpttKiHZWRlE2MjTU2D3JY+g4a2B53q132YCPaT6warhO6gyl3tdhqFolFNe1F+puj+9jnxiXSwWwXhMrJARXB6K1lDfjDiH3lEvpHLq5lB4vTFWPlzQCkLvDpwLAAQ1xkj8Owlmd8TGtTyh9MUVwFY9x6ZqBjGwCfgLBznkhsh2JhMkXH7C9M3+acdtIHPfnQfAFf2HDsjU4WaaX/b1SiLidRPmmz35J+bi9NJseGrPVWaSPrzXRWgvBy54CBInN6uJVVYLm+YWyk5g== 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=3IvHQ5wdcDziVYYnY2bELUDP4mnMsFwYmrWMcffc0yw=; b=bzmyyeK6dbZSoAPLr1+b+IJNnQb0zUV0WXZ8hLFeEf5CeDyYKAycI48FNKLt0yY8h6SscNCCr1L3ylBfkWAlntXOM2V9Qo2XkHVO7JQifEstCyUoDQeWkxiFNQiQFb1H3Y6QOQynZkqP1H34Ub0Zr38CMuOhF5CVuWPd41Z/XE4= 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 DU2PR04MB8934.eurprd04.prod.outlook.com (2603:10a6:10:2e1::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7587.27; Fri, 17 May 2024 12:35:15 +0000 Received: from AS8PR04MB8898.eurprd04.prod.outlook.com ([fe80::5e22:869c:33c:9654]) by AS8PR04MB8898.eurprd04.prod.outlook.com ([fe80::5e22:869c:33c:9654%4]) with mapi id 15.20.7587.028; Fri, 17 May 2024 12:35:15 +0000 From: Iulia Tanasescu To: linux-bluetooth@vger.kernel.org Cc: claudia.rosu@nxp.com, mihai-octavian.urzica@nxp.com, silviu.barbulescu@nxp.com, vlad.pruteanu@nxp.com, andrei.istodorescu@nxp.com, luiz.dentz@gmail.com, Iulia Tanasescu Subject: [PATCH BlueZ 2/5] shared/bap: Add detach stream op Date: Fri, 17 May 2024 15:34:33 +0300 Message-Id: <20240517123436.146332-3-iulia.tanasescu@nxp.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240517123436.146332-1-iulia.tanasescu@nxp.com> References: <20240517123436.146332-1-iulia.tanasescu@nxp.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: AS4P192CA0021.EURP192.PROD.OUTLOOK.COM (2603:10a6:20b:5e1::15) 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_|DU2PR04MB8934:EE_ X-MS-Office365-Filtering-Correlation-Id: d555f04f-dce0-4a26-51af-08dc766dcd9a X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230031|1800799015|376005|366007; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?is5iQuEg28L2PLGlo3DtYMV+3l4M2vTPAANZiXfTcIwx205VF9pSgvtGFg6x?= =?us-ascii?Q?u4ac910HuWseTByP+Rypz7uHE85mAQxJ+U0fJiA9M5pjzDPFc5LdipZ3B/v0?= =?us-ascii?Q?LJ8+ecNyw/l6M+JPiHPulJmzxEVlF3kUcRnnZI4xziyiZHhcsaTMkEvvWf7B?= =?us-ascii?Q?DkzJJWJBG08kYELoBn17Sbrcnm3qFh6r2IyRs+ySDi1W9x1vBRZlM4QOdqAQ?= =?us-ascii?Q?O3j4OKOj4Ikkc50z+4a1vO+mudp14mw3+eC8czR9zjrBq6aqT+ivisURdirO?= =?us-ascii?Q?u7RWIkO7dztn9SKOoc9gxdUay/e57RT88d+Huxx6K8pGn2ZkOslUX7Nrs4pS?= =?us-ascii?Q?9cNTUEmwuO7Qj85TfWGOeTTKEjxEpKdxYh7UMR5KhVBVtny94nF1vvEVZCYN?= =?us-ascii?Q?5j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forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AS8PR04MB8898.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(1800799015)(376005)(366007);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?9G/arBaZr/jJA8lgG0UWwQUOkMOS2eEI8we6e8DPkrVegI3PW8nxbngvlBzy?= =?us-ascii?Q?GdQ8M/ZXSlMNm6VMNVkUVbEh6MUyR5jCRUbEBCZEt9A1042G/qjVyOcrxCPX?= =?us-ascii?Q?WWLNOGROdCvgjqsJM+RDGfxsGHgeQf+xnrpnRIFJcMytCxvPcwksiP7d6JaB?= =?us-ascii?Q?TPl482c54b8PyBQXCDay5YKDoxIl6vcvp3PUVMkFKL5ELx3Jcqr8Ciu1/azC?= =?us-ascii?Q?odwy8sgAx+NTLmoCZA/RtuFfExWfYnQ/Ar/tJsFSo3jn0mnjRUMf/PtG0MbZ?= =?us-ascii?Q?hyDR3OweUyDhgYLWua0OnHitmliNPrMq8TWUaChxridvalQHq2/RI5Y01DnP?= =?us-ascii?Q?sDEEr+xqqZ1CS+Wtvcu1PYF7PJQSymcpsEO4mYNrNwDyvNVi/KJMwUjKNbpV?= =?us-ascii?Q?YrA3K14tQg9tewTmkFZiLNF3d9RYB/02zYy08zD0GVakeo+gxRF2SxMYJ12W?= =?us-ascii?Q?kbYKz1Us9GL9OgjWwYK+IheP39vq7nXKZeb7X18smLP1Zm+ThBQPKSCZxUkg?= =?us-ascii?Q?yondjVCj37cF/AmZwRIwVgAo1XHRDu2V4FO+T6ZV4vo5XD3dieoyuWJNRg7g?= =?us-ascii?Q?QV11FUR0SmlK+B/qVjMBS6Lc5/IoqV30b2h3z/yZtP5eROmfUzvjkIIiHiFs?= =?us-ascii?Q?oomnu4dhOV4j5fr9Wq01SHZ1hfvw9asI4rd7aWsu6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r2iWpIyfhN/ZzUlSJAcW+UWAbJu/zFz2vCetayFyBh7/?= =?us-ascii?Q?Uw=3D=3D?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: d555f04f-dce0-4a26-51af-08dc766dcd9a X-MS-Exchange-CrossTenant-AuthSource: AS8PR04MB8898.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 May 2024 12:35:15.4391 (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: hMmKUw3YxZDmFyHyt6AtzaZndkbO0GvN3whbt2lSkX6mSW8/ZWrUcWSdYw882qPTDXlBRvSKeBl+1NdXYJORNw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU2PR04MB8934 Since a Broadcast Sink stream is not attached to an endpoint, bap_stream_detach must be adapted accordingly. This splits bap_stream_detach into dedicated stream op functions for ucast, bcast source and bcast sink. --- src/shared/bap.c | 55 ++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 46 insertions(+), 9 deletions(-) diff --git a/src/shared/bap.c b/src/shared/bap.c index 40ce16d75..6572ef1d1 100644 --- a/src/shared/bap.c +++ b/src/shared/bap.c @@ -250,6 +250,7 @@ struct bt_bap_stream_ops { unsigned int (*get_loc)(struct bt_bap_stream *stream); unsigned int (*release)(struct bt_bap_stream *stream, bt_bap_stream_func_t func, void *user_data); + void (*detach)(struct bt_bap_stream *stream); }; struct bt_bap_stream { @@ -1171,7 +1172,7 @@ static void bap_abort_stream_req(struct bt_bap *bap, queue_remove_all(bap->reqs, match_req_stream, stream, bap_req_abort); } -static void bap_stream_detach(struct bt_bap_stream *stream) +static void bap_ucast_detach(struct bt_bap_stream *stream) { struct bt_bap_endpoint *ep = stream->ep; @@ -1190,6 +1191,34 @@ static void bap_stream_detach(struct bt_bap_stream *stream) bap_stream_free(stream); } +static void bap_bcast_src_detach(struct bt_bap_stream *stream) +{ + struct bt_bap_endpoint *ep = stream->ep; + + if (!ep) + return; + + DBG(stream->bap, "stream %p ep %p", stream, ep); + + queue_remove(stream->bap->streams, stream); + bap_stream_clear_cfm(stream); + + stream->ep = NULL; + ep->stream = NULL; + + bap_stream_free(stream); +} + +static void bap_bcast_sink_detach(struct bt_bap_stream *stream) +{ + DBG(stream->bap, "stream %p", stream); + + queue_remove(stream->bap->streams, stream); + bap_stream_clear_cfm(stream); + + bap_stream_free(stream); +} + static bool bap_stream_io_link(const void *data, const void *user_data) { struct bt_bap_stream *stream = (void *)data; @@ -1285,7 +1314,10 @@ static void bap_stream_state_changed(struct bt_bap_stream *stream) bap_req_complete(bap->req, NULL); bap->req = NULL; } - bap_stream_detach(stream); + + if (stream->ops && stream->ops->detach) + stream->ops->detach(stream); + break; case BT_ASCS_ASE_STATE_QOS: break; @@ -1311,7 +1343,9 @@ static bool stream_set_state(struct bt_bap_stream *stream, uint8_t state) */ bap = bt_bap_ref_safe(bap); if (!bap) { - bap_stream_detach(stream); + if (stream->ops && stream->ops->detach) + stream->ops->detach(stream); + return false; } @@ -2018,7 +2052,8 @@ static void bap_bcast_set_state(struct bt_bap_stream *stream, uint8_t state) /* Post notification updates */ switch (stream->state) { case BT_ASCS_ASE_STATE_IDLE: - bap_stream_detach(stream); + if (stream->ops && stream->ops->detach) + stream->ops->detach(stream); break; case BT_ASCS_ASE_STATE_DISABLING: bap_stream_io_detach(stream); @@ -2134,7 +2169,8 @@ static unsigned int bap_bcast_release(struct bt_bap_stream *stream, } #define STREAM_OPS(_type, _set_state, _get_state, _config, _qos, _enable, \ - _start, _disable, _stop, _metadata, _get_dir, _get_loc, _release) \ + _start, _disable, _stop, _metadata, _get_dir, _get_loc, _release, \ + _detach) \ { \ .type = _type, \ .set_state = _set_state, \ @@ -2149,6 +2185,7 @@ static unsigned int bap_bcast_release(struct bt_bap_stream *stream, .get_dir = _get_dir,\ .get_loc = _get_loc, \ .release = _release, \ + .detach = _detach, \ } static const struct bt_bap_stream_ops stream_ops[] = { @@ -2158,28 +2195,28 @@ static const struct bt_bap_stream_ops stream_ops[] = { bap_ucast_start, bap_ucast_disable, bap_ucast_stop, bap_ucast_metadata, bap_ucast_get_dir, bap_ucast_get_location, - bap_ucast_release), + bap_ucast_release, bap_ucast_detach), STREAM_OPS(BT_BAP_SOURCE, bap_ucast_set_state, bap_ucast_get_state, bap_ucast_config, bap_ucast_qos, bap_ucast_enable, bap_ucast_start, bap_ucast_disable, bap_ucast_stop, bap_ucast_metadata, bap_ucast_get_dir, bap_ucast_get_location, - bap_ucast_release), + bap_ucast_release, bap_ucast_detach), STREAM_OPS(BT_BAP_BCAST_SINK, bap_bcast_set_state, bap_bcast_get_state, bap_bcast_config, NULL, bap_bcast_enable, bap_bcast_start, bap_bcast_sink_disable, NULL, bap_bcast_metadata, bap_bcast_sink_get_dir, bap_bcast_get_location, - bap_bcast_release), + bap_bcast_release, bap_bcast_sink_detach), STREAM_OPS(BT_BAP_BCAST_SOURCE, bap_bcast_set_state, bap_bcast_get_state, bap_bcast_config, NULL, bap_bcast_enable, bap_bcast_start, bap_bcast_disable, NULL, bap_bcast_metadata, bap_bcast_src_get_dir, bap_bcast_get_location, - bap_bcast_release), + bap_bcast_release, bap_bcast_src_detach), }; static const struct bt_bap_stream_ops * -- 2.39.2