From patchwork Wed Jul 10 08:13:36 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vlad Pruteanu X-Patchwork-Id: 811907 Received: from DU2PR03CU002.outbound.protection.outlook.com (mail-northeuropeazon11012059.outbound.protection.outlook.com [52.101.66.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 010E925757 for ; Wed, 10 Jul 2024 08:14:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.101.66.59 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1720599245; cv=fail; b=Jf0ggidkY+Q8FUX6EhJFqUw08ywzpVGEUxF7f/+6leCJAv5/CDZJAYtvQI0Dpse2kgd9Jz8L7fXk0Q0/MYawodpJdtdq5+7QeUZ/tufUOBgPYdySRI7PnlzWPpKFy9suDsWWwT7kFGtznIeXxEL3Q67td3hucr3JP2d0e9Y9vSQ= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1720599245; c=relaxed/simple; bh=P3v0BULcqErakIKoDkcgEOp0oRvuT9p5cnqnYWX7tfY=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=YFuWlrADcuNpld2LPQYDN5wi8sI9flmIe2nUY+B0Z/Dok7GMiTEH3+yX1qKEOoukGUQMrHecY1hEc2UCdmzasLVrvaDyOItudTNex8z6dCqVfaT3PRNMuFFxdakj9/rcBPMyuX8qgHSZz+e78iUs5p5LtrE57qQyHYY5oZovdwU= 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=Ipks7SrW; arc=fail smtp.client-ip=52.101.66.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="Ipks7SrW" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Z7jPFZmX3N7OvJXnDE0W8PvkkiFD0rkePN9X74PQorPQyJsheqYfCAnJtI3B1Gpdwm4BC5PR5XLbloKO+EBG9ygHDbWorsP3/GiaIoqUwKr/LNmfI8L+W/StJE/ySO2BWu5xtZJPpf1BVB5zWJASpbTW14EUQeN4ge0V7Fu/8Omt7F1dkbhRbUSOvB7jh9GAsf/UI/r/+NQl5t9FW6cvW7EDYY8cdgUy69XGXT2qjaj/KKBDVKWvAYDNMa+FOyfLpw8d1MftRUoVlDtS6rtCFZZCDHRgRc9dAtxBw8ctDBFylWPpbustHs60NP0deSFuT1y+PNm6tlH7SbP8LMmpsA== 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=mo2tnhFxcT8iWq8ce1IyrTHHQtHjVjq7J7adQYvuc6U=; b=XiDk7G0aYewsWWgRzbu8ylQY4EwyikDTUVSN9yv8557QKMbXXJiSe4Td27pay8fGyMgssUqVQd4BBREXQ9NQYnoSbs89D0pyU+f047YqBMExU+A5EbITkh8zGfSm31PB8CkP11vUlw8H5iW6DN3f3Fyo0+6myj+CBeouWY8q6nLcHGH/TomfJJUMq0vnJY8mysC0sIdM1MyYe/b9GGay6ZYxnyXoxX2xVaV5Mbclp0V060Xz+AZJoH4oDeRIL805W5GrlcoYqdWfwuxyAPFLJ/o9tgI8sX5T6ZB1fu8WNMynV/Xz3sEVh9bu4Cv/eW8Elq5w92dRZnrj+uc/8vrXkg== 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=mo2tnhFxcT8iWq8ce1IyrTHHQtHjVjq7J7adQYvuc6U=; b=Ipks7SrWM3aTtLX3xggD5bXyCdsOb1h/VjR/cZI/KVlfPIVS1t1sb08kMnbxGJD4rBr3Hs/6Uo9w55O2d3z7uEvBp0dGSKtOGP6k20N+7GKiKFf2/m90bFUg8C8u4sQh2U+3YTAFrx2AXVmUhqiHUa5SeOaMOg6Qv6JyiMKTIRE= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from GV1PR04MB9088.eurprd04.prod.outlook.com (2603:10a6:150:23::20) by PAXPR04MB8864.eurprd04.prod.outlook.com (2603:10a6:102:20f::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7762.20; Wed, 10 Jul 2024 08:14:00 +0000 Received: from GV1PR04MB9088.eurprd04.prod.outlook.com ([fe80::8775:dba3:39ac:3277]) by GV1PR04MB9088.eurprd04.prod.outlook.com ([fe80::8775:dba3:39ac:3277%4]) with mapi id 15.20.7741.033; Wed, 10 Jul 2024 08:14:00 +0000 From: Vlad Pruteanu To: linux-bluetooth@vger.kernel.org Cc: mihai-octavian.urzica@nxp.com, iulia.tanasescu@nxp.com, andrei.istodorescu@nxp.com, luiz.dentz@gmail.com, Vlad Pruteanu Subject: [PATCH BlueZ 1/3] transport: Add "select" method Date: Wed, 10 Jul 2024 11:13:36 +0300 Message-Id: <20240710081338.17262-2-vlad.pruteanu@nxp.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20240710081338.17262-1-vlad.pruteanu@nxp.com> References: <20240710081338.17262-1-vlad.pruteanu@nxp.com> X-ClientProxiedBy: ZR0P278CA0212.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:6a::27) To GV1PR04MB9088.eurprd04.prod.outlook.com (2603:10a6:150:23::20) 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: GV1PR04MB9088:EE_|PAXPR04MB8864:EE_ X-MS-Office365-Filtering-Correlation-Id: 1f14e9b1-e120-4132-7b54-08dca0b840f0 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|366016|1800799024|376014|52116014|38350700014; X-Microsoft-Antispam-Message-Info: uTGPP59CSwhLiif+ye/2pXfXaAUNzvYQhOoNNZhYfjeTTqe+6OEm9ERnqOpPUkoMo2FUNOPS9J/LldxMOpGjVXETDmpPjQ12IdtMHzxLlWOpn2+ggrqjjdFYUZE+5jqZbGhLihCQtLHSgsT1VumxhPxUL0EoBP/w4eVRQgcZYtAlu6Etg/vpubaZgNCzVgZrW3z3INlAD0A+ighwd+Z6N7lkYVNTE4BUdBpDmvJU6vUvJiCQfDm/Qz6yVltvSYgGGYcjdgQ94PS2KNvCeUxVxf0/i0jO4GyD1h45xpoW/AHNkSxkHvps6vVdPUyNMFSR79j4Imf331BcJlqEYu4YR47x/HRDdJGOyfOgVSoYF2yv6/ioXekceyKsjbIrutXJZw8GvXwF3iZg1cjtwfzEQUCTvYZAlpKAinPzFgbnBJQ8KBMAlrK1AjQT/mKjJjI0MG21SkxFqgzre3/otQe2DYdQ0JWp2y/Akcbuhii4r6ZBRgzEbmmc3rc1nhMjvGubIvvy0qoGPJ20q3XEJqL0C05cSI8xAqGAJSlqhq7PXpPFCPIwMT16Hl3Fg/y3pWyzkEdpF1kixaWGSdIJv05/32Rsdpqc3QpH/NjjV7xNpsBypzx/jtsV9f1C4zDI89APm3CDS5yZSQqhYSgus8uZbOqefr/es0ePezxiricLSSYsqJ33x94tvTG+Qjy+7GidMr2GtauC4TcCWoSko/hYtRLBEqUXJBExQ0S+IznnAFywZu6ryO7A5bSdzSRQLsw5gyINiVq3Te65QvEdoGGrGCFlPUdhyYVKIMMkajIrgtYenJwGmGm/KNK+D82Ar1dG+gFfEbA723MXTSDYDFXDZLA47c+/0kgiQ6CIwzrysEmZv8TwBVuzbm6GIutZeEKepFGwsCU1fiM4S+GRVYpCZDaJOfSXYX+i8c1pk6BMHfTS7WRbva/cx3+J23I5kljYXIge5Vsc2hkea//fh5T5ZmAjBNhCzqbwNnRk8wsV/xeYa7066roMdxdW8Oz+z+2k5oqydWGj3VyX8L7gLXuehB+l6bVaNQFOOa7rX5cVfFrvoGxn3OIJ2tM8SMucuVdbX0QH2A6sAHKkW5y6OIwjYK7FcTF2TjP3z04sXJxValFUEoQxyCmevOUN84+RPWcST1jjEn1n25Pqd9FwI3ksqEeayKlnaCdGU+7edJkP24scz9I57rj423qNuD4bzXw0n0KcBijaiGmmk+P2n4cycXq+E7AkoOzbh1eC0gyBzlTKEUHu0zsx/WZ6ZhKJW6CustpOAhK8MSBNwX9atwCrDSwq3fhsKz/2O2HlQLNYoPBlJZXAcbOPFVcwM3jVQ2W56CsEwjqq6JTp1P6iba2Eq4C8IhQVR48G8MMDIerGGBlUatcidK1Ws8FWQnnTlPCPZuiwz5qGWKxl/nbY9ed1TQ== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:GV1PR04MB9088.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(366016)(1800799024)(376014)(52116014)(38350700014); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 7dzTFsbhgo/g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hKfwiqFzEZBlK4jRzx6kid+ZWbLQENll1b0XUd13i+5XjYUZsOfQEY6Wpn1Txiqfqbbv3FJ/b+VDi9laHi7WrcALRuUbfQS2bvLgrpHdPaTPOclXkTwb12WrOlAMke5oQpWIuxWabQLNWSSu0ao3KvlYZryA3YnYodoUm/mislJBm4xNFqKysWOB7DTZ/KimC9Fi9q+WkLsvrukzUKAiA20J4ieuON80/EV53xvroXFIm94fwZmOf9II+K6xxb2cFJgIICMCB2rCy/PKgY4KvTDp1T6cB8cSgqLKjZBIJq3h+Ds2yD4hVfhJbyZsaaXfjCsxjANL8zCXsvDNjdqB9z1CN5hrVXzWOQ+KdNxpCUHGzkRPkdxgYXPtcCa3uLiSe/kutw6EtalBozb2CuBrzViDjWavT18GFP+d/8erXACulQupjrrI35M9jHumtkBwXjX0CYbV5dwXGSmA0QG6Hdp0DYlw/EeMiCbOycpZb0C5o9cqXLCoQEeg+Qyz7s45 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1f14e9b1-e120-4132-7b54-08dca0b840f0 X-MS-Exchange-CrossTenant-AuthSource: GV1PR04MB9088.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Jul 2024 08:14:00.5186 (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: hSK124ebz2l6PLFhgqtFjPWDxZ0/kNsXSdxNCXpGK0xLNL/7HvFOjmvH7dZSfkvXgMwxSqge7zzjK3W0zeI7Hw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAXPR04MB8864 This adds the "select" method for Broadcast transports. It's role is to change the transport's state from idle to pending. This allows the user to select the desired stream when running the setup with PipeWire since it acquires any transport that is pending. --- profiles/audio/transport.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/profiles/audio/transport.c b/profiles/audio/transport.c index 922911cf3..d6493edd0 100644 --- a/profiles/audio/transport.c +++ b/profiles/audio/transport.c @@ -963,6 +963,9 @@ static gboolean get_endpoint(const GDBusPropertyTable *property, return TRUE; } +static DBusMessage *select_transport(DBusConnection *conn, DBusMessage *msg, + void *data); + static const GDBusMethodTable transport_methods[] = { { GDBUS_ASYNC_METHOD("Acquire", NULL, @@ -975,6 +978,8 @@ static const GDBusMethodTable transport_methods[] = { { "mtu_w", "q" }), try_acquire) }, { GDBUS_ASYNC_METHOD("Release", NULL, NULL, release) }, + { GDBUS_ASYNC_METHOD("Select", + NULL, NULL, select_transport) }, { }, }; @@ -1292,6 +1297,25 @@ static void transport_update_playing(struct media_transport *transport, transport_set_state(transport, TRANSPORT_STATE_PENDING); } +static DBusMessage *select_transport(DBusConnection *conn, DBusMessage *msg, + void *data) +{ + struct media_transport *transport = data; + + if (transport->owner != NULL) + return btd_error_not_authorized(msg); + + if (transport->state >= TRANSPORT_STATE_REQUESTING) + return btd_error_not_authorized(msg); + + if (!strcmp(media_endpoint_get_uuid(transport->endpoint), + BAA_SERVICE_UUID)) { + transport_update_playing(transport, TRUE); + } + + return NULL; +} + static void sink_state_changed(struct btd_service *service, sink_state_t old_state, sink_state_t new_state, From patchwork Wed Jul 10 08:13:37 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vlad Pruteanu X-Patchwork-Id: 812496 Received: from DU2PR03CU002.outbound.protection.outlook.com (mail-northeuropeazon11012059.outbound.protection.outlook.com [52.101.66.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 65D9884D0F for ; Wed, 10 Jul 2024 08:14:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.101.66.59 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1720599247; cv=fail; b=cbYAuwjiTgY5n3FtnFeYfnQWohN9rHOnZE9Z5wyy/jQfPSnbff5bhuqabWNK1tqg2rV5jfYLCLjVU6LaCW3dAYbUdflzNM2nctTUb9wZ5VxJT5acmSZY90+rEL7bc8QO+PlC1T5Yl8j5Coo3CIG3YySRdZoAbGaybJWRplJYf34= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1720599247; c=relaxed/simple; bh=YjvdzgaXzpBlUl2V4rpuOI5M8l0HgE/+uLbtDLJwpvs=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=X9n4ZWhYHRzLskkX00WwAaKVy/hvoSivQ/fbAI5z3ekh7t9PtPsSd+p+nPlHIFGO0SiRxrshyPu+O6kLuHkYNRaZ6VCnGH0QmSetzbm97rJK49Gp0fnE24EbS6tPddslLhjlZCIBzv/99SMxRWsPrJ8u+THjF+C+nZoem6tvnH4= 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=oiZJZycI; arc=fail smtp.client-ip=52.101.66.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="oiZJZycI" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=DXxDyMBQ4oj4DxKEdF5TAxX+MCyjVbbxJ5Ox4yPrUL0A/dQvAxn3yAc/xD1UyoP03e8tg7rGLnrlE+/ZuwohblSeTUpQomKu3JVFZL6NRcg6/vpATnhII4YI3J71JlH41K9MrJBlP7N0lkBT8Z+xvN/4bZXutZyFIytIe6N5n6ObrnoQNkZVVb0nbo8q9TAeu0wRV99KdFTtQj6N9Bkbdcbzk/YifVJNkAPoD3WUJJWlwpppIxai9jx4v2SJdF12ZcfbHkqJ8VRWF+zCc/L/J4/zcuUx6fXJws2MD7TzXb0YmGzHC9xUuKFRFmnHZcAN/G3gbcdp7hrObjkFYes/pA== 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=33LM9qldiF0tWdBO559Y+C1iVarkxZwsDkQ76HAThJ8=; b=Ph43weH9RoazTfKqnUBRmnhtcnZEimMVt4gQBI5bprj+9MpM5mkBZmfDgzI3xMs21IRARa+GFWOWjYdmMurqrllubQpeYaS31KFTcCBcnqPTX3JAl3rq+VQ1jQeCtkIfAED10+YolOTRiRQkR53GyvIr4I7UwykWadJc6rXvwuPDr+QuBd6p4elRqXYu0MTkMJF4kKWlKAebB2aqTuk5vVQFhDMA6+lId/whOvS/SxaIu2ntNS8/K+Plu8oQdletrWjBpTecphSjUf6VnBUrISHu+SxSBQjlitUBifej7CHWd2UuLNTp0b8wpbU51gWV3JL51T+U1kbP0QAHJ1lQ+A== 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=33LM9qldiF0tWdBO559Y+C1iVarkxZwsDkQ76HAThJ8=; b=oiZJZycI8cCrrDD5yWO2V8FnuQBQrQV6HOTx962P8UF9zev9lJ/u19F5yV9/asuV9411kVkhM14H98ayulpe9yjGC3wNwzSfIi9Hf4ZL+AZ1xa7g6yqgQVaumwVUffIbZYKi32MRPTxYG/4h4MbqGjTf+S+MnHVsFkejgBaP1mM= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from GV1PR04MB9088.eurprd04.prod.outlook.com (2603:10a6:150:23::20) by PAXPR04MB8864.eurprd04.prod.outlook.com (2603:10a6:102:20f::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7762.20; Wed, 10 Jul 2024 08:14:03 +0000 Received: from GV1PR04MB9088.eurprd04.prod.outlook.com ([fe80::8775:dba3:39ac:3277]) by GV1PR04MB9088.eurprd04.prod.outlook.com ([fe80::8775:dba3:39ac:3277%4]) with mapi id 15.20.7741.033; Wed, 10 Jul 2024 08:14:03 +0000 From: Vlad Pruteanu To: linux-bluetooth@vger.kernel.org Cc: mihai-octavian.urzica@nxp.com, iulia.tanasescu@nxp.com, andrei.istodorescu@nxp.com, luiz.dentz@gmail.com, Vlad Pruteanu Subject: [PATCH BlueZ 2/3] client/player: Expose transport "select" method to the user Date: Wed, 10 Jul 2024 11:13:37 +0300 Message-Id: <20240710081338.17262-3-vlad.pruteanu@nxp.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20240710081338.17262-1-vlad.pruteanu@nxp.com> References: <20240710081338.17262-1-vlad.pruteanu@nxp.com> X-ClientProxiedBy: ZR0P278CA0212.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:6a::27) To GV1PR04MB9088.eurprd04.prod.outlook.com (2603:10a6:150:23::20) 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: GV1PR04MB9088:EE_|PAXPR04MB8864:EE_ X-MS-Office365-Filtering-Correlation-Id: fce11c67-12e6-4364-9585-08dca0b842dd X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|366016|1800799024|376014|52116014|38350700014; X-Microsoft-Antispam-Message-Info: HtZ9r/S5GfFu5SCp8GuIwmmXqsw+fBlE7SETYRi1oJ15qNlu9fLEptPxOU8QDX+G1zN2GvycDMUESc2c+h18ILbDgqPX5UFoxaZMmypYfEc5EyzfOyHSg/e4LHKMneEy8RLErDgOQ2P3tAxIX0603WR30//EViJcpHKyGdFFXcGSmKO3UHhHTs02lWlK1se3Cvl/ExV0XGE2DAhQbm7E3fywnoo4y0+6h/JGkQ7bhJiya5kteuVtWCOWM2Mzcu6HUQfLXj2EciaSMYy9NyEW/bevHGTlW2HoeWGI/WWkLejRuEb7oSqdVSof4odi46r72UyY3VYFi8sYDTMtTT4OhqMFZ+jbGIEW7dzOygClm0KQZ6dTDQmfaYZ+Wz+sZJ/LqVo1hDLsgTW4tO7uVDfpq5Ay3KxI7SBORm+locO0B4lhBb/XcPnO0Hew6XszcC1xrvCONdrjFLD3xLfe/Cs3FUuzkypOB58BeuDsp9IfK0d/ySqdf6PDCk+H/L/DSy8R2kDRNqWY+95+nZUUE7+wjwZC3LkE9QZTA67eAW5vCtwcVtzX4D2PIPTewF6MBq1ge/at5RelXo+PXyDLQw//Oe8eiXuAhnadG7j2aji/tz6+27M/gH7Xg66gbk3SOqFjssw0/Pmndk3Le7LUlBivnqeubuGy4KgP8l3Kgh6l6KiTgdSS6mCxNR63EuAePFopdMmxGx0bohQLwGHvBMib9jfwUya8CLFqR6RQMAdlE1VGjxITb97xD/kBlKVmWso7LchXTlglYelDN4rJg2h8bAlHe9pCDrEtZJCV5L6uLAQzZnxD10vVPzrbAxflkCyvnSGYnnN4dwYFCsBhDh6Mke2OB3HtxUDQyQUjO8p5JCHIW+heCdZNebOSpRrzpml2YVD7pIiFCjFTbbBZi8I45lfU6IMnaoh4gn9LrfJaCikwH4Si3jgwsw6DHAidm360sYJfQ4VI5RP9uUTS4NnxZHjAdd81Z6vMX0Kk0zZ9alCh5d4JCRl+moM5VFYNlMXFVddymSh0amEUoT5tPBoQs+pVRwzwzQUqPg6FM+A+pNnfXRIHTMMDg5+Y/D2yf164C72TyUOE3RgRYNK0Fds3RWjmX/bNIcLWQxQ6e1nMIrrdYz7WDBj4fZuNyXlneZb675teuGMV+GI4K3ckZ5gfJUccz23juUQZk+a+EnZtfvd52zMXD7BkiHOax8vtzBWnS9VNUe7kF21LgrqEPb3awSMbne+Lv4px1/GQf9v1/je08QBdxw0XrlXZraEVhBhizeqol66WBztHuSVcSE990399ttLwVhdWUzZ1iFMKQ0Egh3RpOIzESP8YMLJAz/Sm0zdWxHSaHAWQqrFnvlnSLfpJlohF7iMMxH75j7UwsslHXj8OFnS0sgckCh+uE/EIgT4R0n8dt84fbFCTPNj2qg== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:GV1PR04MB9088.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(366016)(1800799024)(376014)(52116014)(38350700014); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: CrLWmtwPsNSQQbyQEn2HT5P5BIRqzISprPLIMFnZI3E8qs35ZqFy0JhKL/1qZ5dxW8LJvt50Ih/6jHLdKzOeuF2MjydklmxbU52iIbzyUJaWSbV+nFzd5H62lNY5MN6+sBuoknWNGiffgCC7+y8q7y46I7hFxHnGqUcWgPLmMPAYhUsNyBVG8v0GbbV3zhVD7kKVRiDF+thmxLq6o+UIbdh9sav+B0OX8+3mujK7DdW9a45iKR6A1vW28AAUxSZcbt/1TuiT5qtUkcyfGRSK1BX/8gKcLdWx21EaBzhdCobdmJIsbpRyGfeAz9xLLzUbAbqnqNUpnesSEJOHPKhqRYAQQoViEkiBxGNlU0xN6dNdsKaxsF2H/rH1rQ3rhrbDAtEJ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P6szzMMw0m5QnNa5NLbpih6gbzfx+Bov0PNnRN8B0as7nkvBFrv2W9xKm4zMSXR9c8zwJ1W0BF0sSsAU1cce4G1faAa9cbJ4MyZoMA5S6hl6fk5ZUGE2+cJrHO8NRlW X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: fce11c67-12e6-4364-9585-08dca0b842dd X-MS-Exchange-CrossTenant-AuthSource: GV1PR04MB9088.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Jul 2024 08:14:03.8186 (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: gCsYMd2POs+z+5J6WVI4Qp0tZzOxTjqnV03zDvz7jOPpiVuT1tXG1/inG20XXqZJKcFfuUWYwdYsUulHKp7bCw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAXPR04MB8864 This exposes the "select" method for Broadcast transports. This allows the user to select the desired stream when running the setup with PipeWire since it acquires any transport that is pending. --- client/player.c | 52 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) diff --git a/client/player.c b/client/player.c index 0d031e4b0..58805c26a 100644 --- a/client/player.c +++ b/client/player.c @@ -4628,6 +4628,23 @@ static void acquire_reply(DBusMessage *message, void *user_data) return bt_shell_noninteractive_quit(EXIT_FAILURE); } +static void select_reply(DBusMessage *message, void *user_data) +{ + DBusError error; + + dbus_error_init(&error); + + if (dbus_set_error_from_message(&error, message) == TRUE) { + bt_shell_printf("Failed to select: %s\n", error.name); + dbus_error_free(&error); + return bt_shell_noninteractive_quit(EXIT_FAILURE); + } + + bt_shell_printf("Select successful"); + + return bt_shell_noninteractive_quit(EXIT_SUCCESS); +} + static void prompt_acquire(const char *input, void *user_data) { GDBusProxy *proxy = user_data; @@ -4849,6 +4866,38 @@ static void cmd_acquire_transport(int argc, char *argv[]) return bt_shell_noninteractive_quit(EXIT_SUCCESS); } +static void transport_select(GDBusProxy *proxy, bool prompt) +{ + if (!g_dbus_proxy_method_call(proxy, "Select", NULL, + select_reply, proxy, NULL)) { + bt_shell_printf("Failed select transport\n"); + return; + } +} + +static void cmd_select_transport(int argc, char *argv[]) +{ + GDBusProxy *proxy; + int i; + + for (i = 1; i < argc; i++) { + proxy = g_dbus_proxy_lookup(transports, NULL, argv[i], + BLUEZ_MEDIA_TRANSPORT_INTERFACE); + if (!proxy) { + bt_shell_printf("Transport %s not found\n", argv[i]); + return bt_shell_noninteractive_quit(EXIT_FAILURE); + } + + if (find_transport(proxy)) { + bt_shell_printf("Transport %s already acquired\n", + argv[i]); + return bt_shell_noninteractive_quit(EXIT_FAILURE); + } + + transport_select(proxy, false); + } +} + static void release_reply(DBusMessage *message, void *user_data) { struct transport *transport = user_data; @@ -5276,6 +5325,9 @@ static const struct bt_shell_menu transport_menu = { { "volume", " [value]", cmd_volume_transport, "Get/Set transport volume", transport_generator }, + { "select", "", cmd_select_transport, + "Select Transport", + transport_generator }, {} }, }; From patchwork Wed Jul 10 08:13:38 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vlad Pruteanu X-Patchwork-Id: 811906 Received: from DB3PR0202CU003.outbound.protection.outlook.com (mail-northeuropeazon11011060.outbound.protection.outlook.com [52.101.65.60]) (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 2123584E14 for ; Wed, 10 Jul 2024 08:14:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.101.65.60 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1720599251; cv=fail; b=S1V3eZWTf4XxVSEuZ+xeX2QfOrze4KgVvWGMh0qFf3a9M0tfzD513NXqMuoazlbzheiDdGWItDeswQ8M1tPf5TbFa81eoAufkgAycBapQbpalmhCifnhbhFgV4sCMLlatunVmWVRwBU5sQRgEd01/tCK53OznYdBP4FMvoiU+xs= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1720599251; c=relaxed/simple; bh=eBtmy9j3dGHeijz7Y8XkaQtZ0cN3gMvL47bhW0MGN9E=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=ihVXjZOI+goIepA8UWHkDOCph14ubIbsi4DVkVhBi5HKdJSti+oud0s9NBmnEXFZqS33ZlnR2i7VMUSzJiWFj02S6Cxpw4WDcWmI8VvWa2JW+jqNLgKVI2S6P8i/OrrTokFIgdh0HhKh1CbCGjPhnY/pKU9gmgiejDYIl79x32U= 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=RG3N4dN1; arc=fail smtp.client-ip=52.101.65.60 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="RG3N4dN1" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=eik5XlrzGfjKJoTD3yyYPjgZ+Za1oB2in6njNCS5kqoDlL9k84ppS6r1PezNVDVfhD/YuUo3rN/DPKPOOpb0Ir9uNoqY3F4R9uK2RhAetZmmo3IGPnVmYvuNGQeD5LGGD5qmVlf7zDSr5qZHrIcJbTIEB3QvbiW5/XvdX6aOct7FR1ajj+TRIPfRdS7MsEkG8Y7HeeHOubxqBucIK2qHaC3BTGNz5YAhxEsFtXP5NvGKP3iIffE3GdRKR2qPzxSZ+LjiXtlUlvM6d1gszNxTyuSQUWXPZIksJUYaCS6jcFgkgEbAdFZ1TCgBzVFDz24ej7s7XnxRMbBPZun+TfLyUw== 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=89hWNjLddTjxcFqVJAIg1kRWESB2OGZtFWk9D9m3/gM=; b=H1jjPv+7xsQ7z0aUSA84NBlgl74AHGr6Iv2dtvD3amfOv1RMQxjFphUwCE1DceM/JiR0YDH/AxckLDSckR1tlGXDtWsR5h2jGe1CoZbujX8Ww0UO9+2QKB6kMgiZ7DWjKBP2lcSAPlfYGVyP+IERompY37G4t9CWDl0q6fPJBQqr6DWNMPJrMfPMer6w76FlIajTNSfqf2sM0iL1pJUTiEXVleTEvzT1w/LP5ITzgt6aeZktaqpbTY7ilTrsfosmAx69JwSnCfALAhf60EZR/ofj/8ujhmeRgw6oM1umiZQbhSSsBC4rjCghSh5UI+6m1YS8qiqcM2/lLjENNA3NHg== 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=89hWNjLddTjxcFqVJAIg1kRWESB2OGZtFWk9D9m3/gM=; b=RG3N4dN1N9WbrSvkat3Sm+P64WhoZK20KsJntp2b3Gt3wzAzXqCJAH2O0XAMAPXXk4zDudvvPcVbnRVcAOh6GsuZq1SUYUUmYVkHyMx18s3OVDWXXAIHn5wzpQ0WqQcX7np2s/TVnezye3Ybbn9W/r46Q17aEj4vDpGxBb8wkc8= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from GV1PR04MB9088.eurprd04.prod.outlook.com (2603:10a6:150:23::20) by DBBPR04MB7817.eurprd04.prod.outlook.com (2603:10a6:10:1ef::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7762.20; Wed, 10 Jul 2024 08:14:07 +0000 Received: from GV1PR04MB9088.eurprd04.prod.outlook.com ([fe80::8775:dba3:39ac:3277]) by GV1PR04MB9088.eurprd04.prod.outlook.com ([fe80::8775:dba3:39ac:3277%4]) with mapi id 15.20.7741.033; Wed, 10 Jul 2024 08:14:07 +0000 From: Vlad Pruteanu To: linux-bluetooth@vger.kernel.org Cc: mihai-octavian.urzica@nxp.com, iulia.tanasescu@nxp.com, andrei.istodorescu@nxp.com, luiz.dentz@gmail.com, Vlad Pruteanu Subject: [PATCH BlueZ 3/3] transport: Broadcast sink: wait for user to select transport Date: Wed, 10 Jul 2024 11:13:38 +0300 Message-Id: <20240710081338.17262-4-vlad.pruteanu@nxp.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20240710081338.17262-1-vlad.pruteanu@nxp.com> References: <20240710081338.17262-1-vlad.pruteanu@nxp.com> X-ClientProxiedBy: ZR0P278CA0212.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:6a::27) To GV1PR04MB9088.eurprd04.prod.outlook.com (2603:10a6:150:23::20) 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: GV1PR04MB9088:EE_|DBBPR04MB7817:EE_ X-MS-Office365-Filtering-Correlation-Id: 66b8438f-8cfe-4add-c359-08dca0b844e0 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|1800799024|52116014|376014|366016|38350700014; X-Microsoft-Antispam-Message-Info: cFT2xZT5tr0jRA3xb1WqXEIYPqzpRde8sDpsatU0S9Ep77UW3GouhHZo1rcOTSWCSYXV6lvldRETbBOW0En25BwlXM+9r+2qWH/yzE3M/1Jz7oIzTsia1wG8Zw/xJbpK4fqAguupAXreH1NyamkB3SnnqdXmItmtJzWlzYy+EfgaFOeonCGWrOmoJQYwhRnmsJH7mryQ5fDXzIE0GWy4CwkdKChxfACIWAd0ETRtoMm/yCMKlORwuo3pJNimtpLHr2aDvjU8wMGvxB1W44KV7i+4PZy2x/quY39kGOJPVT5653gGwvpq8fG6EoZ/JuNM5StSKQqq12K+gTQGwMjLuIE6W3bRLcSyI1EZv6aWCWfeYYlQbeQGKB8EEWh2cOclkvPfnM0PLpq4Ym02KQNNriDraAFzhH0gsfctXYSohu749fAf1HLPD4VHKA+TXNZhJTFqi7+QsUcZh8oW+AL5nrWiwWhJV/WIDDsK8bGJcPtBTCHdA0L8ovPLfwXxZ1b/vOHQ21VWAO2Rn1lDpRVzNBdNTyGqma4HKPMsWBT5yniFutxEpPuG+82lMqUw49r4smkjNa2xFZQJ8Udw7W2bItQrUYUb/kGTA0zKPQRgOEn/5rvf4QTjw/q6XHoZJf4pp995+HMcvfdYKLsnLhvdfaBTGYWfRHoGX+tuNApbxuSSegYuIEF7g7Bp8tGXY1pb4sXxBZJThVtQ038Vg6bjpAH40oG7+LpI37DDXYDgKsjy5fa3L0GINmafT+zOl+RKFqgab8Pki/f9aZIHcelDP/WLGcpJphFnmIAGX1TKY3iTMac5r8LQTEONFPJzuChFMcKX3lHfGTFd1Lq0pfF75Kj43kdJtekktDvUMmXH/maCyd0Ef2s1C5SV06fBS4b5iDgJlD6bROq4nbGa4oH5tGc/icyBZCe/N3cuiEikFfkg+dhZK+64L5pBsum0EOqoE+f8pGWiYbXIjlJ9M0TvSF//wLKf5JzwemymkKOquJmPvFV5mbnpPfdus3IFC8sZ/2yAfttpjIAGq/toVJBxTUZHpzRWOEKgSHXSJZzG0y4+YPDQOx2M5AVr2Wki4hrN3WekAN9d0J7XqUhbRhe7c1kAL68F4P/s9ZMKquqc2Ju2bSuP7BiJvBJGyz5h2plJRVphLQZyCFxYkvQux0N+lDlhVx+43v/+jxJnbyZszk0q2wedKxw0GC+UD8AyhAX978gApf0eaxbMCEgK7p3vwhfGG4Knfk/E86sqM8fBE+5oeO/U5CvZagCYLAZkEo97TWgnlCUGHjR7vO78/wpaSUbm2f8q8RLOsKp7siJEprNN5vCV2aDm/EmgkysrzOwGIeL/LYyCtSSnns9y4GxzYDK0/Rmj69g7zLd0UiZrTzgLyndT4YbicsB7lfKqOzjSETDfUzU3BzydKA73otAoTw== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:GV1PR04MB9088.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(1800799024)(52116014)(376014)(366016)(38350700014); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 50BbuNxshQ/f+64ULoorb8zBoMlzafRYmsuVU0CCs/6vQGhkUxlNvFQkeiGiHia+3w58ZEVjv/idgT53AOvPo9l9IpAKqo5pR6OZte/gUZszsRBArOWxFdo7imDdM5zwcU6EEbxSmOZDIiP9EQ5/zoDXYTOQeIcNBKI/Z7JJUpHefGPVkT0lQKBV/DZAwx52oWKxHLHUgD6NH5KzMMxxuEyI471q/F7QcrMT9KR++reTwPuXAVJFVfMKiFDktjqIa0qtrVo/6w5VNZgl2xT9DqlmV9Z5o8ixU0faeEcPEMUZTa3GoUlOV3haTS9BCe3Vlcb7//bUW/nZeYmBx5TEnr4tIqJdYicmvoi3zVNR3aKbV5H94CDFtmybNJ+3wxlhRzCI/YsZg6yeX3c4iRVZvu9tKuIshrRrAHh2IOhPCtUvw50Th2bSZ8imGGMUAUF/07tlkvsVgG4Pk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6KnhmfibG2Ihe4hSfh79tBNU1efLAuyhdsHNYyI51iIH X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 66b8438f-8cfe-4add-c359-08dca0b844e0 X-MS-Exchange-CrossTenant-AuthSource: GV1PR04MB9088.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Jul 2024 08:14:07.1774 (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: e+zQCa154bPwuzYizVJitwArCcvvmow5c/YIgWX+33U9ziIupmJHDCu2FswXRZr9uToU0gbJkVyjfnvYoEyYuw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBBPR04MB7817 This changes the flow for transports created on broadcast sink side. Transports are not automatically changed to pending anymore, instead the user must first run transport.select on them. This allows for the selection of the desired stream when running the setup with PipeWire, which acquires any transport that is pending. --- profiles/audio/transport.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/profiles/audio/transport.c b/profiles/audio/transport.c index d6493edd0..5ad1499b9 100644 --- a/profiles/audio/transport.c +++ b/profiles/audio/transport.c @@ -1676,10 +1676,7 @@ static void bap_state_changed(struct bt_bap_stream *stream, uint8_t old_state, bap_update_qos(transport); else if (bt_bap_stream_io_dir(stream) != BT_BAP_BCAST_SOURCE) bap_update_bcast_qos(transport); - if (bt_bap_stream_io_dir(stream) == BT_BAP_BCAST_SOURCE) - transport_update_playing(transport, TRUE); - else - transport_update_playing(transport, FALSE); + transport_update_playing(transport, FALSE); return; case BT_BAP_STREAM_STATE_DISABLING: return;