From patchwork Tue Jul 30 10:53:06 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vlad Pruteanu X-Patchwork-Id: 13747248 Received: from DB3PR0202CU003.outbound.protection.outlook.com (mail-northeuropeazon11011011.outbound.protection.outlook.com [52.101.65.11]) (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 65A1B195F1A for ; Tue, 30 Jul 2024 10:53:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.101.65.11 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722336837; cv=fail; b=fIpd1pF3oQ2xbk7uVDqhEJo241kIwKpi0vgyUZq0zTI2fOqHH2cnFNWXOQ8kyWadJDswstlYD38HjUAR2o1PKPjeOIyR0sho98zMXZynAOm1eUqccWYrdcCtczXYgD+Wp6/TvVaw/e353Js7kGZSdUAj0ZccQVfpBQXWLNbsfe0= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722336837; c=relaxed/simple; bh=aVmowX1NEhg5dR+IH+Xzm1eNAI+KbAsjyQitcneknuc=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=YoUyVTWe0hMznd7VuDgq4EhPo8NbzAB79ShS8xbbG5x43oPlL4jQ19dQiBrlyGQF8WS1NS64oexojWbwMIJfsZ+p3kYSBUWVYTGsczKnmTKyv+mJoY0T5a1CzD0/5d6d9vGKd59CkCbq78lslgQABsL3P8g+3oaUgV/7mArjWj0= 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=nO9bWIVu; arc=fail smtp.client-ip=52.101.65.11 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="nO9bWIVu" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=jb5VOyJEjMH0r0JPq1Mr1zEeRsUN7m+8jUm38P/O7HDDuwigdDA2DUS5HgPgs4t128w1Y4gAr+/gPaWf9lYdPC4cMKSMTI8TobBvGJc7cahDCtenVv7TooMql6P+X4sC8O++kC8jic/zPrw77cnLfv3y5h5zWSfKqQH1m0G0QuHaKSr2efpS1fq0M6ghQlGfar0MeqZMWOcV9n4IP9hV0DPhlGDI0uw5yQm54EzFSc7C3xRxMUKFZFl5piSnLulfFXSyzs0weUKUSXzr8nk+Src+mxAyCfjGr9/hum/21e5AMfmVpmSeBbd+9hXTfzWLQ2PP/uWG2JUIHAcRjsaJGw== 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=1ibspa8MfsaDoUvawYmeKFht3/zKIG8PQkARdRNkorI=; b=yW4IQUOZA/Yvln+2XgQvPG0wQ/RDxnsniZ/JQEj+Vsn78cbA5+9nRaHrRdvc/GLZhDf92+UP8tZxjsgteipdAWIO9m0DoKmCIpnSC35bJMXQ8u/6Id8xjQ1Zs/u2u5vwDiRCgimABUNe2HCZsRZHPjpsqvJbETKf9PTWrH6Xuc0axbhVlQHubMK026B7jVBCwCoE/3WyIainC2Db/INv3UyvWPFF4a0Nqf+CUatQsGULBGymTgambrUP9fLDuL4L09IgkcPKjxjSiyAWdjIj7tTP7VCjVM2e58cp85z3m4tgCSdppP8kJJV5m2bp9RpZAYh8itPI2bFWEq5r7TO/Bg== 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=1ibspa8MfsaDoUvawYmeKFht3/zKIG8PQkARdRNkorI=; b=nO9bWIVuHbgX0TzXYHEYNCVCrDe1Y3Ao6QbGuZFCz/NVVRYQkA9OxfDFrdPSC2+la0vSg4nnOoAn3qCwDBKOhJpjzUwMyi2zj8e+l6UIfTJ0ypAR1LOIt5r+79cLz21hia5RGpQ4q/vy4okE8u8kV4kSxoKduM7CWWORHk117g04dmZOwDT7yC9kXuVnDplKSQ0B17Ov02eXIbLnqbRNTB0etrhwNX1YUrkx56R/YwfsDZe56ONdS3ZFzDL02JfwVG+qJGgJM45iCcOFeUpgNBQijKkIjhJMSQDtY5Dw5PlJ7NNxs3Nd0G9VpopvrLoIzJ+/FZenZzENm2NGQb5neg== 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 PAWPR04MB10007.eurprd04.prod.outlook.com (2603:10a6:102:387::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7807.28; Tue, 30 Jul 2024 10:53:50 +0000 Received: from GV1PR04MB9088.eurprd04.prod.outlook.com ([fe80::8775:dba3:39ac:3277]) by GV1PR04MB9088.eurprd04.prod.outlook.com ([fe80::8775:dba3:39ac:3277%5]) with mapi id 15.20.7807.026; Tue, 30 Jul 2024 10:53:50 +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, pav@iki.fi, Vlad Pruteanu Subject: [PATCH BlueZ v3 1/8] doc/media: Add 'broadcasting' state and 'select' method Date: Tue, 30 Jul 2024 13:53:06 +0300 Message-Id: <20240730105313.403238-2-vlad.pruteanu@nxp.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20240730105313.403238-1-vlad.pruteanu@nxp.com> References: <20240730105313.403238-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_|PAWPR04MB10007:EE_ X-MS-Office365-Filtering-Correlation-Id: 6f5c5162-cc38-4823-a66a-08dcb085daab X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|52116014|1800799024|366016|38350700014; X-Microsoft-Antispam-Message-Info: a1xXPQ+tysqP/Pde6/MGGojKl8a/DwY6zAR0PB2mghe2E3qc2Dc/8oo9q5BivNI8TSqQ9NHVcn6wzucPxZ+EBXEGVL6pVVwWoaNVz5m3XiCoTmSFeWL5Gm1xRqVOVoeIrLmZRKvKQL8rELzMzxFX6v+JiN4kvdqBzYGSVA0RT4f3QEBmZshEFWGfS3FNRTjHKsUnrqQA++jPYAligqm4Dsee8nd395/63dLIInGJsAa3kvG8fB+0dRUR5p1qZ4udqM7i9ooLBtEp0Qlak7RkeA5f8zMxxNBUQkqn77c6/9SOm7H6810QjicPx93TE1niEiKJnOigE8+EobyXyU9Aco4yNbO+FSaV2pDJkA90aAVdZLCqjUFt7O5HC8Oad3szv5IEAUfdWkRCwZepLGxN/+GQbBmI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:NSPM;H:GV1PR04MB9088.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(376014)(52116014)(1800799024)(366016)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 4CeybePYtqODwYT3uwsOdY6FV6IwwOasezBi+HUiKniVBy4jgP0OzMLFhKX4zrCpEfNbiaoCQpea33SoRZDt58uVzs2LtZBS2luMQT/vh44AoJ1tsbAsmyNWOKgabcFu1aVQ+9uRkftVtv98/4iIHFYV9UulhvhiASOoC6iQV52by2lAEmWhiLvmN48V4e5FqvzQqc2hihkcFZdv3EWJ+hyGX5iUeAor3082Fv0A1/cmiIwu6/PBzRs90l4nm/2ZfGdHdtO1vsUoWbNgiDS9wpFcAKHYIAPipCz4mvbqKxWHB5Kj7yB66yjT4TS/pgygCk1P5c8BYjEyvwvBSIf5syapRuZ9ASVuCHKQUQRlY2zkL9dynxRU426wVre7SjXtIktlQtJK0O+xf1JyiBGniZz2+rjL//22W2ARc36oDeivpd4asgaLL+LtNebHHNg8HXOmI7MJnBQIIhXRiPKYXNlqC/6cJC/EPgby8psi+YUzYQtyvQ5YhM46v6XLe9eNwCMe4yp12LrjU6JAVONYUFACBmN8XDhaeJeZAunZBQkOTC1A/HmhqkqOk1IeArIY4Ipu9p6P7EXRLbIPuPs1UtNFmizCtYmxi7GWu5p5DngD941D2+v2C24770OlFjtdZ7Yv4WFbTl9PeFHC8DHwKnK/1Ip2V0c+dW93vN8A29DFz6+2fU99DYY0BV++9hjCVe7urhhnHQkO5Ipk1uE0tsnQivzuE0yKf88mznvxuyLee6p7+FU1/OEY+c+2+E8FVmj5elSp4ucpbAJvgcCB7FENtH0WxvdNv6iMLT+K2uVIgBRb2yxiJWOMx9EtXZ/zHogKS1E542aFveyGS/BAhwWcsne+8m6wpYlQN3e25sphDuQbFiSuteI9aNqX9KePW8WBZPEh+uA8KMj+jPPY2LROjNdshwtAGnehYomSXuPoHmUbXIEg4rMPzhwoiE/Glx8dl30AJ+CVOYDKV7laiPAMJpfrxEbSM6LazeyA44Pkz2MyBxhQRjeI78FTuBwD/AiMmmXd5YCxTCs5p0xofcA7+uc8TlIi7tEEW1riHs+xbYTqpLjBDH1tzRjAsjKUCOEatlXLm3MIUQ7o9uetkKs1kJhPWQcF+n5p2MLPWiXAOBi6yPt3JgjzMOd9BZle/i1MlOKS3eCgE1wRJ09NZqyvboCzt3EnQB9MTKAFy4c+B7i4KHm+6q4xg5basB7An47XxirJ/TJ7lNeIezdpvHM9RZQ4X+l6HGe5whGnFS5zG9ZJ5/DjzPMaAu+RV6n/p0zkdAGb07G1/Nq7oFO6nvulVxPDDwzB5RhMwkHsCFNfE9gqwtfiYkU+JDB+kOmKlchkAiKPljmTTbTvmPr3K3raPQ31pf+z05TnppmflBwp/JuPWpu9m46JsXSBrx9Yb/IXFviGjd+TkoOPy2iGi9IZfj8AqoiWrX1RpnuRqQKncRil1k48HPZ/L2A1oEKNL21Tg/bt5krOXh7RwksGVPviESjyMaZ+pcp5uQ73XJ+jNFQNyUA2uWpklzWUVoAowrSYD+X/G2Su/SYA/J+G+jAsQ0jfGyVOBRxh8NOmJXn6bQP+QFphosfDa4mjj+UU X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6f5c5162-cc38-4823-a66a-08dcb085daab X-MS-Exchange-CrossTenant-AuthSource: GV1PR04MB9088.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Jul 2024 10:53:32.7590 (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: kpiknrqv2ndzyZNM8EIXrsqHFXk1xZdIwbQkypkFZRdCo9QTdDLpbm+TfSPeSaOImahIVp7WU7uwi024VUjJIA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAWPR04MB10007 This adds a new state for transports created by the Broadcast Sink. Such transports will remain in the 'idle' state until the user calls 'select' on them, at which point they will be moved to 'broadcasting'. This allows the user to select the desired BIS as the audio server automatically acquires transports that are in this state. --- doc/org.bluez.MediaTransport.rst | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/doc/org.bluez.MediaTransport.rst b/doc/org.bluez.MediaTransport.rst index 6e95df8f2..2a3fc6411 100644 --- a/doc/org.bluez.MediaTransport.rst +++ b/doc/org.bluez.MediaTransport.rst @@ -7,7 +7,7 @@ BlueZ D-Bus MediaTransport API documentation -------------------------------------------- :Version: BlueZ -:Date: September 2023 +:Date: July 2024 :Manual section: 5 :Manual group: Linux System Administration @@ -51,6 +51,20 @@ void Release() Releases file descriptor. +void Select_transport() +````````````` + + Applicable only for transports created by a broadcast sink. This moves + the transport from 'idle' to 'broadcasting'. This allows the user to + select which BISes he wishes to sync to via a 2 step process: + 1) the user calls this method, changing the transport's state to idle + 2) the audio server detects that the transport is in the 'broadcasting' + state and automatically acquires it + + Possible Errors: + + :org.bluez.Error.NotAuthorized: + Properties ---------- @@ -84,6 +98,8 @@ string State [readonly] :"idle": not streaming :"pending": streaming but not acquired + :"broadcasting": streaming but not acquired, applicable only for transports + created by a broadcast sink :"active": streaming and acquired uint16 Delay [readwrite, optional] From patchwork Tue Jul 30 10:53:07 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vlad Pruteanu X-Patchwork-Id: 13747247 Received: from DU2PR03CU002.outbound.protection.outlook.com (mail-northeuropeazon11012018.outbound.protection.outlook.com [52.101.66.18]) (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 20937194A73 for ; Tue, 30 Jul 2024 10:53:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.101.66.18 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722336837; cv=fail; b=kE4whcPLGCzgEgDuutid/YaKQDunZ4ejTP83COlcgD2TyS4w430S+Hs+9g9kbRNLPtrYDE8pxf5sRF/KXb7e9XNDmH1K1loiUPdrMm7qE7ZiGPvTx52yHdHuf7gtXu9w4sWrx9AWrrMtSUgViw9NcCP9xYPS0mSAxMDa2oomg7A= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722336837; c=relaxed/simple; bh=czaSDfnJVKCrrkGXMQAvEltIA7s3kIsEDsFBSbxx2B0=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=mhwgm5Quh6H2TrZsLiMysVdVBsfvW/Un/n5QkNG1y+zaNGpDcilK/ro1MoKZVDYahBro8cPb7xHqujZsjen5bgd/szyBErL1m2J7YwrEvacTZf/GtutavxphDn+H6ze2l2/wS+WSCqIdlgqNZYq4j64iodQmQa8UMshOdHICtLg= 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=i/irDez4; arc=fail smtp.client-ip=52.101.66.18 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="i/irDez4" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=v0bjNJgbN+bp94Ub2ljEK0R9+Rrz2JvMniVpqS09Faz0LlQtpsKK+1ZiX2OCsbmne+hPKSow9UbK4DF9fEeBtEbP7Z/cEZytXfA2Cc8wV3rqkiGGp1L1cqkYsxv63RsVzugGBGeLsDi/e/NVTAOKlMgXJaG5fP+NgIymjevd0s70nhEyWDGBWPU8Wij4AaQ9sOfKIe2aCr0HKBtOTJaWb2F00OxgiAVEezwIxcJVQBHTwQ3Cv5lZZAYWnw1FW5scyOX6mkCVqLtnAkkw2V8Rp+yJe/aXyKHsXR2yfl+uZ9Neqn8Iynq5rAtcGpAfQLwCf1T1gGJqVo+bjlp8gtRmEQ== 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=FzzAhPYXwU0UJNjZ/EMvu71JfpR/pRsC1GViYxA2wdI=; b=lBiqzTyDnR+Xdd2d3uy9AY624EKw1mF/h88akmfbLo1rDGLN0kbG174yWa5/vNjNG6FLvfmYYocFR4GMrW9S4nQcDWsyPwUkpK5HBPCO0LKTcdmwtF+3wxG3RNfNjLS+zqkc5WnjtYMQqO4ulwgakRSuTvJvA00r6GeP/jW6Mn0GcylTWwBzBdVmwyrq7tULWFODEN2QsQluCLAsxM016UVg5YTKkSqBZ4hJhz29D6XIgAdUGvNr05ZW1e4M5L6kp3u24SN4/nE9j73HDvKUGzj1yIDxRfRRS1g3TTMSCa2+NAG85ux7Chg8cG3zjWPVpuJE0tsGugG/YuBWAY/uEA== 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=FzzAhPYXwU0UJNjZ/EMvu71JfpR/pRsC1GViYxA2wdI=; b=i/irDez4YW81CwP2jSVNrmGsHko9EdPGWbOzlJOBLB37AbOiiyFkHOEYC+u2gKM9TTwwkw9EHI9dHqkbSOBwoMkP9MIZ8NQeSTzT79SMHUrwW4PcC47swYb82XgnJQn4+zri0Ka0PmL5TDz/VTlmBlBbyKxTl9T6b5wHMm1rSubRmrTNnk5CzmLyMmucvQ/jH9HMpYNqeW7QOZiUW4vtT3NW+Z8H6OyzqOOjfyOqAvFZnp0J2K/jV2MXjhkQcBLZ6W8pU9TWmQl5TP8qytxj4aRZ2vL+5PKF30RSQyXgGRKw3dpDx7/7Pz1rA7INT2Tscyjwz2SUiF8gQ37usEup4g== 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 PAWPR04MB10007.eurprd04.prod.outlook.com (2603:10a6:102:387::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7807.28; Tue, 30 Jul 2024 10:53:50 +0000 Received: from GV1PR04MB9088.eurprd04.prod.outlook.com ([fe80::8775:dba3:39ac:3277]) by GV1PR04MB9088.eurprd04.prod.outlook.com ([fe80::8775:dba3:39ac:3277%5]) with mapi id 15.20.7807.026; Tue, 30 Jul 2024 10:53:50 +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, pav@iki.fi, Vlad Pruteanu Subject: [PATCH BlueZ v3 2/8] transport: Add 'broadcasting' state Date: Tue, 30 Jul 2024 13:53:07 +0300 Message-Id: <20240730105313.403238-3-vlad.pruteanu@nxp.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20240730105313.403238-1-vlad.pruteanu@nxp.com> References: <20240730105313.403238-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_|PAWPR04MB10007:EE_ X-MS-Office365-Filtering-Correlation-Id: a0e8268a-3508-496b-2323-08dcb085dbb5 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|52116014|1800799024|366016|38350700014; X-Microsoft-Antispam-Message-Info: wjxYgQM2Z2zwGHVitaN1nkn0pdNIuDzPDZ+MZp6VlmrBndMNoKBgACQFazcpc1RoqXx3Zb/JC2S5xefifwIaZQ2Su9PTnX9KcHVcuoaKNdOPutaVbpx7SxwAWwi1C25QrLFTBfrrPc85l1byO4wnv8+VLkl1ZWwdggtSbl5RYka+qDT52ykSFIX7ske/3VXfEvx6SF589HRYe+0ODKAG8qcnm4eaGbubY8J+LctteCZgfkTuXGen1TYPpBw7poQ5sB/5hi7cDHhhvdTgpcu96c1hCZ4UDAnsz1f/1Z254VGG6cyAY53n9mWQ1YtwCPYC4a635GIOD9I+c96WGPDPIm2dBPA56+EcJBqKJzMPtVTzMMH9V6vel/Y8nAOS3WqA4Zk1jEdZ2xxleR+6U5lWfGUzzhRWft3wOGJxt9o6hJsZGzipLqzKjy3Wwi6V6g9SruCo2X96QYolMspbLCd2mApZRXu5mA4Q74IXvqPDOR/kEGhefzmHluzqCfnFmuNhKHyVzuzw/A8/qHY1at+nOUnpjHCMHKlMwZFzgUQGaZSB9cNL394gRhAiib0EoiWLoKi7aIEm1NL2OLMOpKrr5X84/M1j66gVO0eFg4UqaDmmBWmdgOVyUnvh+fgCtmOPdzoSfAgIIPJnmM8xBWTlesK/nhybHFrLMg4zAqyUtawHJcz5/szEOgcl5PoeJJhKCjHbKfUjo8yAX9pgpQYhs1KjTVc6NOa/o6YqYpRwazcfV2EZ7ZTXS3/MWYKmp9BvDUx5RQEDLyc6EXkOu1+XuY4Kj5ATSQ+vilehUnyONOEjvUiM7DQ8JNSBFXlnZbfF0mA9MhG9cWi10nTdrAao0JxWSfU1bQAL0nyuqqqbXUy3vaw2zvsLObX2SCLZzBMOFNorlePY/OzzwugfitWIg2/RBwjtL4IYTrDS7tT3twont3BQ2VzTv5Nnvu3fK7JMnc8i5esTuvEa56SigTNw3TXtsEb3cCfh9b3yUt6MBXBUtZaZwAR/WoNx+137K7zUOfdSER0QmkNWyqZb4A5MO0nE0PHekK1+8OTLj/6mkKW0ccwHHLjl59sfqwt7vgmAaPFSH08wTRxf/rcP/U/fZANKmfeg3JiDR6FA51RDGDq+MKkpB6vux45Loyh9yaoXgzGiuJzFqLp+lhgzZlk3QAlKoM6l3JnSzsxlqUWioKaatMywdGo9uUO/Zof07fPESXHAHHOCxqa42hpYXv1wgCB0FxDsOacIFOsE4x7Ecb0v7pyyfivMVD0N50fpTuVHu98nlxbewjwDZqisvMEuxiKEpJ4Q7R+CMlYZNocmTXeXuRAcY7VByg+VZEUI2xSS8weZuKRtGLG1dZbPRQugYzvJ7RBP3PVgTEjodHSdy9iCwC32QADuZ3WD9fZ69GClORHoMh6M1bCcweSyRKl7CQ== 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)(376014)(52116014)(1800799024)(366016)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 3dKKeO6kKgvwaeRmWhZHm4HTCeKBGYhLWDnkMDpnbiJ2i64TJ8aksWDGrLyBuXWikKeQgvQDoCBs44wp6JkE8pHzTgg5sb56XMjIeFq/Zp6by9Pg5NuZtyUn2PMGr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t5hb4D4K4NsYHR/md/40ymADoS5UME61Pg2FG1xOQR4VHxAKaLvfNcbz1FJZU7XYB4yBovxZs+Ay3vEwPImaSVQQOg6dD8Z4myle38KV43GmVkDoRe75apKkuDv8J0ThW1o58+jhvlE0B8B+CI9hF+jgbkqAaUU8BHqX4jx9md+Qqp7wBHmKdAGZR1xcODIftisCTylv42byvy5yEbns1ZNMxkPC22sHZp31Yh9fvhlmPDvDmuqRkimmdDTIRYY/QOhPmln34ltaOSm+PtZjq8HRPulcAqK38o4GMSOkiOdHWH2vaRIwEr0TvduZMpQGYhMOzAliwT3ecaoF6pKzbaTz03xnjaIbMO5J6ZWrKob/fvyR3QfdIpwm2EYLt2hSHq2N5QUSIM9drJpEkFc X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: a0e8268a-3508-496b-2323-08dcb085dbb5 X-MS-Exchange-CrossTenant-AuthSource: GV1PR04MB9088.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Jul 2024 10:53:34.4468 (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: MkLw0buC2YfLJxLrEUijY10UBJPe4TbLRc5Bcj5n+JTjqcUcAMZvqcgSTSXzOD3nQPPnvCus7JRdaNddaAOYiw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAWPR04MB10007 This adds a new state for transports created by the Broadcast Sink device as a result of scanning a Broadcast Source. Such transports will remain in the 'idle' state until the user selects them using 'transport.select', at which point they will be moved to 'broadcasting'. --- profiles/audio/transport.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/profiles/audio/transport.c b/profiles/audio/transport.c index 922911cf3..0a890c0ac 100644 --- a/profiles/audio/transport.c +++ b/profiles/audio/transport.c @@ -51,6 +51,10 @@ typedef enum { TRANSPORT_STATE_IDLE, /* Not acquired and suspended */ TRANSPORT_STATE_PENDING, /* Playing but not acquired */ + /* Playing but not acquired, applicable only for transports + * created by a broadcast sink + */ + TRANSPORT_STATE_BROADCASTING, TRANSPORT_STATE_REQUESTING, /* Acquire in progress */ TRANSPORT_STATE_ACTIVE, /* Acquired and playing */ TRANSPORT_STATE_SUSPENDING, /* Release in progress */ @@ -59,6 +63,7 @@ typedef enum { static const char *str_state[] = { "TRANSPORT_STATE_IDLE", "TRANSPORT_STATE_PENDING", + "TRANSPORT_STATE_BROADCASTING", "TRANSPORT_STATE_REQUESTING", "TRANSPORT_STATE_ACTIVE", "TRANSPORT_STATE_SUSPENDING", @@ -139,6 +144,8 @@ static const char *state2str(transport_state_t state) return "idle"; case TRANSPORT_STATE_PENDING: return "pending"; + case TRANSPORT_STATE_BROADCASTING: + return "broadcasting"; case TRANSPORT_STATE_ACTIVE: case TRANSPORT_STATE_SUSPENDING: return "active"; @@ -152,6 +159,7 @@ static gboolean state_in_use(transport_state_t state) switch (state) { case TRANSPORT_STATE_IDLE: case TRANSPORT_STATE_PENDING: + case TRANSPORT_STATE_BROADCASTING: return FALSE; case TRANSPORT_STATE_REQUESTING: case TRANSPORT_STATE_ACTIVE: @@ -679,7 +687,8 @@ static DBusMessage *try_acquire(DBusConnection *conn, DBusMessage *msg, if (transport->state >= TRANSPORT_STATE_REQUESTING) return btd_error_not_authorized(msg); - if (transport->state != TRANSPORT_STATE_PENDING) + if ((transport->state != TRANSPORT_STATE_PENDING) && + (transport->state != TRANSPORT_STATE_BROADCASTING)) return btd_error_not_available(msg); owner = media_owner_create(msg); @@ -1281,7 +1290,8 @@ static void transport_update_playing(struct media_transport *transport, str_state[transport->state], playing); if (playing == FALSE) { - if (transport->state == TRANSPORT_STATE_PENDING) + if ((transport->state == TRANSPORT_STATE_PENDING) || + (transport->state == TRANSPORT_STATE_BROADCASTING)) transport_set_state(transport, TRANSPORT_STATE_IDLE); else if (transport->state == TRANSPORT_STATE_ACTIVE) { /* Remove owner */ From patchwork Tue Jul 30 10:53:08 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vlad Pruteanu X-Patchwork-Id: 13747250 Received: from DU2PR03CU002.outbound.protection.outlook.com (mail-northeuropeazon11012018.outbound.protection.outlook.com [52.101.66.18]) (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 5CC41197A9D for ; Tue, 30 Jul 2024 10:53:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.101.66.18 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722336839; cv=fail; b=ZmTLLRcpjf4kqGnNo0PGNOX/fYpOCEpmAyPxbmFnsN19z0ejL5N0WR59OqvzDMrTdGNIDmF/qKJ5Em0mZgFO9oO6Pgm3R8rUMMwT+GKruqLoWF+3zMeBeQ6AwTig5SgUciByuJgd6FxlnUiEIhDcmzXOwoRhkjFK79epBffW2oI= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722336839; c=relaxed/simple; bh=ScA4UPNj3WGmvMkJvYFNz9vuwePqO/1d7vp86uw3AAA=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=mzFB4QAGTFG9NeWwhg9KLNTBzYPrmHsDB7EOMAXl9SZcZaEVj/XXSe2sJtT7GnhBnKumCBaGIUDgk+bZaYszPdS7JkxDYDE7ZHoHnYTJt5ZLX30VLAjtRtdZME/Uf6qCnVwzyuPbgCSjDaGPFybhd3MXPT5L7W5LSWC6C6Z8+Bw= 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=My0PWdAN; arc=fail smtp.client-ip=52.101.66.18 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="My0PWdAN" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=vX1WG1uYbFXRo5oXpTIFknSCGwSi6zwQ6OCx185GpOlCYc3j1QKeGkOkQ8f8vvVJYfuyIs8+tZ6YIzhHWh1Recjir1wXTytxhEIHJZJkhf5t41lqO3EusERTAoPAw/ql1Qs0Q8QI09+sba5X1QTOCI7gXsutimd4P0W9geE4xZclA0W7ZyaMu2qUQhD2lvAGB9ZGPZgJ3JY7qqpwASDMqiOPq56tD+zvcfPc+0vAx2tpJJbczz0X9L4mV4UNp8JUutshaAGTaDyWTaYhY7sYyCFQ+dMsoqeYh7graMNUEu+6lZgZoewp23bYPIA9fW+bDxSnN3sdV1mhC7VKVxOH3Q== 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=8UTYtrHGcPISsbUfQTgBM7QWrrsGXrIK7EhT5vVwByM=; b=GndPjgdHrTuZb4fn+KhvNPCvL1JHtvug0zoLunrS+GPZBPDwafko+0+C+wMzqXTlEiYPE/tjpAf/XrUSarh8zCf8ZybQdGbAFxMnllaU4cayfr6nHi5ugQt3HuHgjbKtbHXD2b8dZMVr93xvfIStYY+3B3BbXDn94toA6EW260LevR0FbO8gROdFc615sLZ1/xEbvCU79ruzYTpXa6WVfDaFeQB8i3mAy9tOhP0WiKfkoXs8btcm14vgdzO6q9YmEyxle9/nZ9H+jXevMahbZ5IYcZXxneOz+ILGPAaN7xydCISgAQpg1vf667Ka0AfYdWacCjkmbixjO9YwuiT57A== 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=8UTYtrHGcPISsbUfQTgBM7QWrrsGXrIK7EhT5vVwByM=; b=My0PWdANAWE2n++nEqQlIc8k34O1b0hAHDP9tOYaIk1zd1U6sobYDZF8vQr0uZhJ595VR2JG9pOzbwNGYijkPPcDVO3Xm1xF+Czbpz5kMPRf9+hgn8KCCtGPZctiDcf7GxFV5YToTFjf0/HaaRik8Uw2+QH9ya6JVjGpSiEOAm1RjFcCre+LI1qrq+OC86zMTsaV6OjCZtLIbJLX8eSDRBS9RRzSpFRxcx+T6zWTelZhR609NdZdW//4fmVkvtFVEQ3JALdbj5R4jsxzvPByVuAsD9TmHyuoOcfgwIphuqIqTNpRjCMvsJdhRulCX3tYLUV3ULDpYEENYSArA3vAfA== 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 PAWPR04MB10007.eurprd04.prod.outlook.com (2603:10a6:102:387::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7807.28; Tue, 30 Jul 2024 10:53:51 +0000 Received: from GV1PR04MB9088.eurprd04.prod.outlook.com ([fe80::8775:dba3:39ac:3277]) by GV1PR04MB9088.eurprd04.prod.outlook.com ([fe80::8775:dba3:39ac:3277%5]) with mapi id 15.20.7807.026; Tue, 30 Jul 2024 10:53:51 +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, pav@iki.fi, Vlad Pruteanu Subject: [PATCH BlueZ v3 3/8] transport: Add "select" method Date: Tue, 30 Jul 2024 13:53:08 +0300 Message-Id: <20240730105313.403238-4-vlad.pruteanu@nxp.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20240730105313.403238-1-vlad.pruteanu@nxp.com> References: <20240730105313.403238-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_|PAWPR04MB10007:EE_ X-MS-Office365-Filtering-Correlation-Id: d50a84ca-0e35-4b9a-9c34-08dcb085dca5 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|52116014|1800799024|366016|38350700014; X-Microsoft-Antispam-Message-Info: bYKpiRBUqMKVC1OOPXWXBU0559RbkZ32WbMZ7KZcl1iOcA10Aw1OphxiROAnYzjIMc/hbl+dorNrFm7cTGCCley3IToslnTpcPMLRWJFa1vvIgL0jjQI9HcnmZ5o4xYmoOVhmLiUof+xJVmeOD6t3dDS3hljftwi8fOdn91NKexzNxcECt74MZKIoQ9AZeskwO6PgEEClPYRvY1lnP5EYCbqhthlFPe3XhIfcfpIpnSJippgd8hICIe4Nlikl+Fr/pWNTm5TRg4NVm1TnwJGOcxXCzzwARiUASEoJXYYT/0XKkIFcut/IZKeK+/XhtcRJBSAV6QKJukEEhmzhuBpPhXU4dUHS+fn5cXjdcY0R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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)(376014)(52116014)(1800799024)(366016)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: LZDzYxAvlDrondDDUk7X8g/HNo0Wlujuw2TL6y0Fg91bAR7BnSPKDdqaQV1CGi9C9tqiYjYf1KqIsbsRj4PruywbRuscfdSKU68gvDHOBbz9wTA3X/AtCs65N+T3v4Ypr53HitzlyP6MeLyWDBZhY1LLidT7fJb8ewAUePJqDVFcJxZ55QNjQvZ+fexvO2zUzwxRBq6DMff+3MAlsdF/TZ7KlnK1p7f6nh6i6s6YbrzYyz/7bjGlPvWFeg6XOw+Ri7BxQyknn+huYYGXo0fXj0P6C8YDAZqdFRS/0xh7fFcm7MvMO+AKyIGmOoDv4TQdqQDzYWgnunyIYom30l1fgLq8w0u0JP8FZt1xkbJHw+xARHpTUGiHKSEImGbRJXlSjQcKKc27j7Y4hcgvFNRRmHkVYH4kSkIbLU0j+RSXc/1WEpP5ssuDhrarBTVKPVYyJadQs5CsVWMlNBVYDHR62IL9U71BMGfsCudjttkKuygcJUUmENN4UybK/uf5MO8v/X5WVn9WoUgGyDod9jFELS+q4UDIO7eTXUgOm79NgQNM1n6r+io7LrA6CgRwipZykBjBXvrZSzI9VM95qaekMHS7SsyLBixL0QchD95MIGdct41S9btmBQAh0jnrBIjsiOEeFG2htdG2P+h6cP/mFzocSmzJ4FELyypXGBbS83jcoQzgcjVRNymJsmA8pbFUuB51xnU0wIulqcJ2qcjUALn5X6u5yVYkGikVRuWsTaDcM+fnn7/d/ysDVvDf93kDsLMYEwP51c64zpcjtGso8wg2PFugkollGdU0d519us/nDl4bl/NG4TUgwQ9tdTntCEHhYGTbnfLYAKtaAg3Dz5I+gbXqKs/4J7QONqfbMqsCDtjESHwYrK5VhRg6e/PAuIC81PVZYqDNzJEIVtECXrNt+rSF3NvZDMdvCZikrBLc5lBAZQVXIsNx9433UsP09PZR1UOcEfzL3bSySG6PElkPKlLvYYMqYyS5ofj8W6FBVmVpUKd109s05965BoiVMn+iK1vpLFH0YH31qDhMDmowlI+K4+xXRODQXU1i+2qiJ+B2Hs53D8X7qKM1AmIVggalWT636DpcqQDWgeLl+lnz2xJBHhcLCketCfo+2vzNT1jdktA7FjGjZ/3Mz5/R3hoqqLBk60ectQhhmr8dY7UmCsQaUPhj7AxdU7gBPLO6RcGd/3Ek04wscAJAnBlu62cs2qxeiWQ6zGAiug/7gK6WnfMNeiDB916NWnuabvEg8kVcbPx2w6dnhY2b+xz3yd1xHSNgU5LPD3liQ9BQl58pBYcrW/VS7cczgJ3G3/9KK5oZxXus5Hf/xPPb8iS4e1Nt0d9TDcAXZrPaujv5mWgGzXb6vbRT5bpraKK+dDqWnch8+R2PvGxjzaRScMPN4DCOKhzFEDAq6YAOl3tBHoDivAhxy7hPS+uNTHVOXcVlAjVP3QVw1yTx9U0eLa7mUyoWIuazS3qgEeA9SiKYRdp++nr35SlCdUc5HVx9dLGUo16yLSB8fh4s0nLNkd9xyJgaPRoVXW5lMpco7/6/GtUPtaBE1HWdYM591gD6EPUEyQugehTjmdd414pUfDso X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: d50a84ca-0e35-4b9a-9c34-08dcb085dca5 X-MS-Exchange-CrossTenant-AuthSource: GV1PR04MB9088.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Jul 2024 10:53:36.0263 (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: ApSZCN7dom/XdKn06y6TkTPY+lPYCsyQKjW+JMu9EqkG+euZ7edJNAihZMehqg2pX7i3HT+0QiNdr0XJCmr+rg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAWPR04MB10007 This adds the "select" method for Broadcast transports. It's role is to change the transport's state from idle to broadcasting. This allows the user to select the desired stream when running the setup with PipeWire since it acquires any transport that is broadcasting. --- profiles/audio/transport.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/profiles/audio/transport.c b/profiles/audio/transport.c index 0a890c0ac..bf2215a0f 100644 --- a/profiles/audio/transport.c +++ b/profiles/audio/transport.c @@ -972,6 +972,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, @@ -984,6 +987,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) }, { }, }; @@ -1302,6 +1307,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 Tue Jul 30 10:53:09 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vlad Pruteanu X-Patchwork-Id: 13747251 Received: from DB3PR0202CU003.outbound.protection.outlook.com (mail-northeuropeazon11011011.outbound.protection.outlook.com [52.101.65.11]) (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 AB3ED198E70 for ; Tue, 30 Jul 2024 10:53:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.101.65.11 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722336839; cv=fail; b=VyLtX2C5syH+0F4nPgrPx99MM5cFSCaFEVClZi9YRj0IIH7iv64dAVZjPYm8roKmg8sUASNri35nH31qk4UO3nlAAhbVsyP1AsAEXIHinlKl+L4Jgf/enZnZNA+9/pVeV+lJMBgW24dBAZ918ZLR037DPdVSJW5OQts97eO1mn0= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722336839; c=relaxed/simple; bh=KA4PKf58In4My50Y6lFWBf7aSxOxuJDAPxnvw+pVrZI=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=WjBo4yZz0at3I8a2TUdT/x3ImwoaJC0eFkBaMDleZz2656A2APRZXDD3nPjcKIBwu0wFjYuEsfTIaozCwXt6iWKLA3TOLM+117Cr8EpMfEspG34ubgxCMZw8j9/cGWdwLe/eAIHNVkB+p4oVzElF1jN/YzDEjoJ3lLSoMU+HoOI= 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=iCLQ71jK; arc=fail smtp.client-ip=52.101.65.11 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="iCLQ71jK" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=xnc25fL6gN34w5Kcq2GCJ967gLMNZQvxTDRhMtSN/0JwE7+enQaCHGZgBeVZzcm/lkJBRS3rNWgSXc5y63aVijFWWssc8jWyzMDwgU58QaAibjRVNvSu+GV/wI/rA0BUDtZ1HsU3U2Spq/V17V464awyMwDtdrjQ5zM4ed0RpctOe1dOazprwfHnggMweiHU9WlMA65eEPvwu3IC8QmsIvb2nAtozSCWZfycCsIhMOHuHdDYVFMrxXB1YC56rBEC+ybMNJLLMWkIf2ZzZ87BroKLRe40BPRxiydA37q6lH39qUeYGMLbkoRQmMcCCB45FSEDyvCbBXcx4imcP+ddSw== 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=F2+0NRk3ITjvOslV6uWlnE/OODjnlBDSVl8Kn/XDU/E=; b=DenfZcFo4PXUTfBOlzMp+bQj6UAQayWnDNA2/fywF9E3EXFyaENkwvjiq3pOEEsRzG/VAGTHUVSMbRlFWD1tfCip2W0s6Qa7kh/OIdERW5bOLtYsDCTBOuZaNINwK51HYDHmVwQJ98cPD/g7P9Se8p0K+w1ErzvVGoBzTQHvTs063QpeACWe+/b7anb5hNH6F9Wnv8Wz6Gh/cjaQk5/0jGRQnQdJxH5IlTwcYH8jawUnPnmrHTwhWhAF1sp94FO7vTX0On19ue0Hr1gxYaS82E5ywQroabI4lvCEQ6hvt0P1fj7smMz7yegryxKECxzwjn1e6EsbQ7S379230JB29g== 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=F2+0NRk3ITjvOslV6uWlnE/OODjnlBDSVl8Kn/XDU/E=; b=iCLQ71jKkjWzHRTFRbfuD0apUgWO91apTp5jQiWNX9OO/yh0cfATsHeV9/On5TEg4HzUDWlJhPNP8QCwL11gz9gEyjSNFM7SimRIofX5GUxmKEM475xdYwpyrX5QbnOakHthoFxs56xiB7aQ70um85rzGv6XylFaUBUXg+SZmm4qY7eS44QgbGLGTbeQiQZ0ZjFQeqOTDCH0vQxFzTPgabMHAPEYWMchvRG/bwxclht58AzrGOrzaV+g1NKKvC5FgNp108GeVtS1AN5i8rxee3nYA+CWj6it4CREIPSPrvxe4qswAcs3FAfwy3j0tutbRnSa0MRWMInIladPK6qs9w== 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 PAWPR04MB10007.eurprd04.prod.outlook.com (2603:10a6:102:387::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7807.28; Tue, 30 Jul 2024 10:53:52 +0000 Received: from GV1PR04MB9088.eurprd04.prod.outlook.com ([fe80::8775:dba3:39ac:3277]) by GV1PR04MB9088.eurprd04.prod.outlook.com ([fe80::8775:dba3:39ac:3277%5]) with mapi id 15.20.7807.026; Tue, 30 Jul 2024 10:53:51 +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, pav@iki.fi, Vlad Pruteanu Subject: [PATCH BlueZ v3 4/8] client/player: Expose transport "select" method to the user Date: Tue, 30 Jul 2024 13:53:09 +0300 Message-Id: <20240730105313.403238-5-vlad.pruteanu@nxp.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20240730105313.403238-1-vlad.pruteanu@nxp.com> References: <20240730105313.403238-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_|PAWPR04MB10007:EE_ X-MS-Office365-Filtering-Correlation-Id: d2c9953d-365c-4aca-610f-08dcb085dd98 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|52116014|1800799024|366016|38350700014; X-Microsoft-Antispam-Message-Info: IBqho5h8613yCJyKbRe/nvT6hOS1xJt6qxWMnxf7rZcfKUMNKtHge1OqW458WidafeJ8uGgI6APSnSr33Ssz1cPRjut5KGCML5A1Oww0rndYq5RQykCbDOPYCpTQ36CnioFZyLyqurQeUz2WGWU1okDG3lIA6bqLBwk14ElRcIvclZevXACL9Ieg0l5CusqIQ7kp5tHl4XYJvD5aK955i/xpIA9+BSukKFtT/QWsDHcQa7K5f7OcJbBr2iZ7XonoSDvIHJOqbmtZLIcyGYpBA2xHYmGiY75ANiJKMRWegZlAruVlEQPPjCCW7iRRRiC1wysoLXZbaWJ3iPHgNgeRU+JLu4IX0/fZSKoPlcYdHplslgEjPA9zthj0NfbEiXXgEOkI5GSd6Tr1T09wnU6z7bpYKZzt0BjQDWAjBQh9nQJJYtgO9SG+5Kher4pyw+XlhreVWN9J0eyZABvCV7a1mFSfC0tHbRYSy4vCB7+lI6/zqdjoM3ntyPD6EliDwE7ttVtiFp0AqYLCjp52iRevlB1goQBsl/MFIikgNTYwxbYmRwnqk6RWsbrpBgmK8jghnRkcKKd9Ek5gXgUPl3GWWCTKLAf0jGGrxQHz62w7gocHygaFOu7nexUcALXRz+BfVNdL0ZeXENb+uLF5lYlvXgqQgYYdsrNgB99BhC3UaliP5gRAlJjbjn1ADe65KEV4Lx2gKNpDeeJdhHB/tj4ReTJDpRv4qYeqBeOTwvJSt00B393Tdx2JI6+8aqQ22Uu8h89mVP2Gtf7RE1AaGBPCwkRIzPRKkxdWM7tNbyYfFNDH31EKi+TzxRu3itve7ig2G/vieLiFW1R1jX6zIawAZ9qJYUtZuL7nJ5LOt3afA/76krdaGW8pREPEnBfFd8IF44yCSHsjfXBd/YORfBNgjKQ8ZHwpN6qfEZ+AY3rJvUmBjXUYJi4tvfkRAGs5GvSJCiSSAa+1swL0D4tU8m2MF9LqstuULm3LK2kQcjzZ6x/syH2djp79L+zxCssMc7PqgC4tTTBXjuPQ8sQpHORa/JGV/acHASp1mwgQQ2LM2e8RZ4z8oQOdBJftcJAJu8dtnW+VahN5wgfOtSpDZ44Er+NI6r0GoV9U3ebqSRnNx5ejMOD2dKwm28VU9VKbIDGYk9/9zVlSXMHSW7VLgpxwQU4eCvMyXvxpIhk6SVKuYqnLMRgtol9Hw837SznNZhlrNbFUEs+Ep8M2Ni6pxVwOo5GsBcXxYk0JOs7+3axJdIbkKvGBx0Oln9AhOiBWbFhmE8yyXk44P4zMiPf6IdaQ0TLNNtSUW0RUikFvJLfFt8Mr6t7G/S1URw6vDpgPVH9dudYBF+RfSgk8mLk5MFjOxzdwMLcutUyOxVKrpp4BccI4uWHzCR05A8T13gZ9Fh/tJ9wmzsKZ9a6flU1/Ciyqyw== 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)(376014)(52116014)(1800799024)(366016)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-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k3O9NVcrhE5TInuJ+TuY9fWv4Xfo6ybVlMkdtEjFDzduyMJx+hbSw3gUUCorDUG4WjaExWAxRPTqF/I8NBSku66ZOYl/UR6kTZKk0oRXnVyjixtg9PM0neYj9Al26H3BkoqbEA5ShxiGw0N633ruf74cazkfYSkQla6yg9+4+q6W8b7PnLd/4+6DjzW2UTt1vJT/CGxh+Mck/Oi6tSnDlnihu6vSYDxCurYvEJwqniB9pQ7jikVH7E3DOMrpxrnMy4WLzzAeOe14lIG7LgOZc5xLIVC5WuiOme+vfYaLnlRvvf7Mxb8inN5vKD3JGs9qgzvDqphmYNPXUxJa3wR4Fb+8eJ4Uh/fYUuwbw7SQ0F/U6itk6C58zNyqn7q3gHlO0y9iLoWswflUe6BUb6XBfD32jWWnnWqpJHEsHzxn7MrOODBDQBpWTv5l6e750+zNic5S5jkOiMk4MxwM/AITMFgNweL/2ETshSapZyU3kWgqeJL0aKCo+nk2/4OqXGYCTc5n7alVp+15jv1Me+HjhK334gdVl6FlY4tAk X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: d2c9953d-365c-4aca-610f-08dcb085dd98 X-MS-Exchange-CrossTenant-AuthSource: GV1PR04MB9088.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Jul 2024 10:53:37.6225 (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: 15KS0ItlzS0Wp1tkZk5esXTRNnfQU1kc3mMSszmrH+w9EBxapYQsuPcvL4tn+oefYBtfY+K0vpOyg0rdANyCoQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAWPR04MB10007 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 broadcasting. --- client/player.c | 52 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) diff --git a/client/player.c b/client/player.c index 2480ed64b..cc30022e1 100644 --- a/client/player.c +++ b/client/player.c @@ -4634,6 +4634,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; @@ -4855,6 +4872,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; @@ -5283,6 +5332,9 @@ static const struct bt_shell_menu transport_menu = { { "volume", " [value]", cmd_volume_transport, "Get/Set transport volume", transport_generator }, + { "select", " [transport1...]", cmd_select_transport, + "Select Transport", + transport_generator }, {} }, }; From patchwork Tue Jul 30 10:53:10 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vlad Pruteanu X-Patchwork-Id: 13747253 Received: from DU2PR03CU002.outbound.protection.outlook.com (mail-northeuropeazon11012018.outbound.protection.outlook.com [52.101.66.18]) (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 9F0F71991DB for ; Tue, 30 Jul 2024 10:53:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.101.66.18 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722336841; cv=fail; b=JfHMUoZJtJdKjrkhyklV9JbeFmFQHdwZIaGeicxteHxm0740Awo9Wdv2AGbAsCHiSSp2k73PRIVI0Uh3JVmvn4tpWAZsGt1a42ObSwhbcKbaV5mJFOS+sDbKCkjIkXtmEvrk53eqEgfY/TrvSPXscT5rGfFDDvZdWDkXMtPSlT0= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722336841; c=relaxed/simple; bh=Z7LX9XM2Amtl+uR4HYCOgsS/xgxyJD7PiV9dN5s3XWc=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=jUp4qxd+9uRwEzNLwGOeeD/0mgXK8e9vdAE5xQJgif2zscBrkqC8JUZlrR8bGgw2LAJ+BsiD7ctRdb4CDMmdikZemCoY68mUqQjym3GMTX6LQWRktwixUtXQGirDNvFbiQfpdrx7DPySsJLzFnwzIg/mByl0VkfhOnKEA4i4y9o= 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=aBxH7apE; arc=fail smtp.client-ip=52.101.66.18 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="aBxH7apE" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=H+vs2fyj3+oMkb1KwdvSHj8LgyRIeTjZRpg1VmyBh7tuw7v/XwptpfjxyV4lWW9Q61jdUbnR3rvufR0Oj5YJ9ZIyCzNg1s2RVG59WbhTxvi8obnLbsA1ZWH1ah72aJJALB4eS8EaW8b2WLnICH+5lEaibbw8FeQ7SBmeDRY6ohs/NsYcTa7Am/nlxX464upTzyuFvk/ywcAKB0Tjy82OG8aGg9BwzSLy/nWmFkmlISViS/2ckicLoUZXO28rMLgQsbs+5JO/RdEBu/1PV5aWf3thYosgzibzTgCXlyswop2NOuRBWOrDsZf9s5/WfCsRoK1l+520f2ygaRF0ybA8tQ== 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=0nnU9cuP1EYfbYCP2gx3b1ZGbqSXP4oI4fOsHemwom0=; b=sGRy4U+JCzLi92bWJ7sahaEMf8Gz4X/MFDgxLia+Byy+R4zHECVtgF5mQxT23hE6rZygaMzjxiUzehiI0io2dRQJ7cJ9N77lyVlDLmIC9UQ9yEEcjybD2Xh8q5+Toh/ZM5/inqzPP+sTOkSl/COirTzqnqW7wjRUl6uuKC4Cfyv0S0KEH+uD4OdIKs7ltb+EwNyjjgXJK3WmJ1EajppjOJplM2FZkIKkn8B3nI8fw88fngfKmG10pNfUmykavRLr7O9fgy76B2q8rJPTJXFAFhhVn64558pqDLvOP8ZFckoog4yGlg6NAsHHw8W9jhTNmJaY6dcg36MSVUMC7FQwQA== 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=0nnU9cuP1EYfbYCP2gx3b1ZGbqSXP4oI4fOsHemwom0=; b=aBxH7apEpjI8ZUX20FMIlJzlhNy+AXA2iyC4TDo+16MpovA95ScrPGn6GQ9rH9jEoyz/uObDOp+GUHSydPgSC6ntMeuTPaAN+228F7odQ7wfDl1QoqoFp1QsOKm+I2qu8KrPN66yDwK5N0zT2oKAK9vQx3x0KoMLL4t99H9/ac0+dMOIaYlOTbQmZNpGiy1OatJfw/1mL+KL3CT1c0RwxhlHH77UdDfSw0OB/Zo53BvwTsPb/dbKMTMph4rWTIAIIctad8eB2n54jvqzNl/+RNYiX4EzXlCNdf01c/peBz/bSel3+VuD8SbzVeUR27hIJBr/sJHzgEwmTzTegYDLyg== 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 PAWPR04MB10007.eurprd04.prod.outlook.com (2603:10a6:102:387::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7807.28; Tue, 30 Jul 2024 10:53:52 +0000 Received: from GV1PR04MB9088.eurprd04.prod.outlook.com ([fe80::8775:dba3:39ac:3277]) by GV1PR04MB9088.eurprd04.prod.outlook.com ([fe80::8775:dba3:39ac:3277%5]) with mapi id 15.20.7807.026; Tue, 30 Jul 2024 10:53:52 +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, pav@iki.fi, Vlad Pruteanu Subject: [PATCH BlueZ v3 5/8] transport: Broadcast sink: wait for user to select transport Date: Tue, 30 Jul 2024 13:53:10 +0300 Message-Id: <20240730105313.403238-6-vlad.pruteanu@nxp.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20240730105313.403238-1-vlad.pruteanu@nxp.com> References: <20240730105313.403238-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_|PAWPR04MB10007:EE_ X-MS-Office365-Filtering-Correlation-Id: c80669ac-c628-4b47-a51f-08dcb085de8e X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|52116014|1800799024|366016|38350700014; X-Microsoft-Antispam-Message-Info: RPc5C+CvXTA6jGthoXW1vIUI/dh0kp+PE7wH9cJEuVU2q77hmdNgWAuqHWZDM65fxQd9Z/iv1j2g5fLK6mUZ1rpz85da/Q9AjT8pQvyE/HuVMZsCE3R2K2SeXspFjuLf0tWs6x33k8oQsu9RYd7iOylqnxZmzL54uLLUM/GsRTDu2AHP8gqlLfc0QOILJqjb9dst47X9WPt9HKeXyv0HBmrYED7A6kpURnm7AGntp72hQHSQbFVyqvz4NMBAZ5dvBc1/ySuuQ9TWL5OM0q5dQXhxknId7S3FZpCP1vlJPPzbK4SfKjNKeBrC5KBg7Zi+TZ4nqy/BXBYrVe3J+rFQNv804MnLZ9JVO1CVYv8pNJPoTU/q1uHwcXuMKOReLfV+3iyTgHDt57sDTFcCwybmItN5kgOT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V:NLI;SFV:NSPM;H:GV1PR04MB9088.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(376014)(52116014)(1800799024)(366016)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: G/LJ4p4P8Ykj36VXkJg1UlkKbWOKYVeP+rnav4KwtAPDMLqFSAM4t5QrLhSstFfUT/czRavluUbX21WYP4X/+UWylvKKRmSEypHsYrIvXF9l5lcKfVZfL2iFhOVdeZ40LNVsWRz/sYtJqi5/WEZ5yTUI4fO8ljyQiaxplUGl1Z68rwd24FEh0yZnBSfot5ELtfejqHCS9vFocoww8lIQ450rTpgNztndY5/TFc3UDL001bzpwOMfUKyseQ9jSI0QIkuoDZGlRvIr/fFNgpwR6H1wxisIR24+xcagTxdACHsPShX3XoFRMOpzMLodSO8nUqaBHN2ZY+B++XsJZWvLTvkyDLITGcgkCX8blaOW9OXK9WzXwLXK7rTUlflvpVGoYEdawzCyZ9g98dgSWvdc8mRQe6lztx+30xZEIgwv5iPVUH/LFppQQ41G0ou/dcvc91WiACnVDs5ir9ymN+3ltJtlPFslop3oxiWd4tfndLgrzYarm1lzRYOI9ySgaa4UeCpK3igyXattfry3BQOd6+wLxe+urdEv/EGlRDhxceKQTZW1OqxURHnm8gOSLc6iDUepX0yNegEhDnq1mO2ZnGb97ksTYIvX5ngjVyOCzb4z8HGDNkQCLPmJpODmqP1BpzyFnUikTZpP+Jn7nYg9y3qjXIrXCUllv790PQVA9vuT5cvynJkoXEA875Q22EDIM8cR5Rxf83ZZFj3/sORG1MD+RORwHTnk6ftxvGFuH+nLUhcc1eZvhOSXsGkc2in8y8u7o8inTrdswhHQ/8DEUeJCs4XRQBQe59N7aAME2yDPXMV5BLQ8IeI75ojW+tNYqzCR/+K1ywH9U+89TUrkpT6syBzsmu3n+Y2Sno1LLp89SHS5A3PaWv91Dz0Uwu5XItapWhH22vS0YOkX9sqcFjkhjfZ+vM+cQtBzR7QDkNjYh6plzk5P61hei5uveFp32juDny5hcZHyo+f3A6tcQ3aNFGcLXQhr1wecxeHQG2yybORNWXke+TPvjuUuDAIYbJKpQ5apS3jTeq1DpEfqNH3L768dOvN6D4XqECwTwqhgvok1gkcRr269HeVfrVM64g+oHdyNhbEWKFeD/gmu1VUzYj52639fvQVtQ9sU7pFNWnEiI4JNJwJiFUebb4ITLWrQPrW6dNlwwnQeSgYH5KY6FEPBgAeRapKKPZ/BLFYAN07vkhZtjNty6vEwqRAa3QMby52TZnEPGF7CV03yu5wtQfCaipSQ1sflT2jftzP4edlEvvBG6Nc2bDBrlbO4zBoPGh+jbZ+1Rf5OVpcgnHD07UVS3eW3l0K3zUzAMuVA+u6nu7yOUi01sfuJdfvLhbjk1roFHUHk+OVfZG2ra7FU6tAbfJwERLesHsgiOajFIcKsMQweTfNtS/NWsoL/cGrttjFe1SeTnTaEjSd+AHQUjv0b/3tT5hAH7Ipe7Vd4lXYvi/3snXCgrYDFK55XYrJEPV5q3rgcZyxX6at9esvAy+vRZJRt31zDJhQuxwsru6YauLf3XzuYF+XeryvV9+pKDD1VvPr4/Jo5IqyIlLV2Y+659r0pLybd319f7hezw056mImvta7KIIOKVUGu X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: c80669ac-c628-4b47-a51f-08dcb085de8e X-MS-Exchange-CrossTenant-AuthSource: GV1PR04MB9088.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Jul 2024 10:53:39.2355 (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: IvcF/BWjavZaBuJk5HaPhpPI2A9t51ok1IjnHU8DPixWahKpU2KPObNTl01IoBVA1bxf+grwGQQ5gLUTDjOAtw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAWPR04MB10007 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 which updates the state to 'broadcasting'. This allows for the selection of the desired stream when running the setup with PipeWire, which acquires any transport that is broadcasting. --- profiles/audio/transport.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/profiles/audio/transport.c b/profiles/audio/transport.c index bf2215a0f..80e4f564c 100644 --- a/profiles/audio/transport.c +++ b/profiles/audio/transport.c @@ -1303,8 +1303,14 @@ static void transport_update_playing(struct media_transport *transport, if (transport->owner != NULL) media_transport_remove_owner(transport); } - } else if (transport->state == TRANSPORT_STATE_IDLE) - transport_set_state(transport, TRANSPORT_STATE_PENDING); + } else if (transport->state == TRANSPORT_STATE_IDLE) { + if (!strcmp(media_endpoint_get_uuid(transport->endpoint), + BAA_SERVICE_UUID)) + transport_set_state(transport, + TRANSPORT_STATE_BROADCASTING); + else + transport_set_state(transport, TRANSPORT_STATE_PENDING); + } } static DBusMessage *select_transport(DBusConnection *conn, DBusMessage *msg, @@ -1686,10 +1692,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; From patchwork Tue Jul 30 10:53:11 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vlad Pruteanu X-Patchwork-Id: 13747254 Received: from DB3PR0202CU003.outbound.protection.outlook.com (mail-northeuropeazon11011011.outbound.protection.outlook.com [52.101.65.11]) (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 27CBA199E80 for ; Tue, 30 Jul 2024 10:54:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.101.65.11 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722336842; cv=fail; b=orH/jjZqCvA/T0nF9GaxTJZDXsjMKAaW7MTP5MtxulP47ydr3ChMlO+qtyeVclfR16YdDLWB7AHMR1qxB/6PJJ9Xd7r734nZA94jNeR/9GZ5cdUu/DzsxpckcPZZuPEFfeaxpGZR4Hqc/YMWrr56nDrgQLTfZystSBikxOkFgJM= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722336842; c=relaxed/simple; bh=GGUzoKwepzzYOs67VvmSFww144aRNxXpeSk9OFxDv58=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=dQgzK22vG9/6qBcFxCe++N1Eri58xm2zHMcvLM/FhAKr7hSDUD9T1JKeyotiXIzFbmEoE80S0nu4m2+4Z0dsCncnQhUHZ/l8FUfSIwRsfg6GE+YX/L2PjYBS2ptB6CGrJ+vEx027PAkaA4Gdf6H8rrHyouZG2LUcG/mwe7I5+8w= 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=mgRrSHZv; arc=fail smtp.client-ip=52.101.65.11 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="mgRrSHZv" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=PnXMg3VWKlYU3m6gcI3zKnX8YGsj40CJEibi9R5Gjqp3WMTFqkc/DNEE6eBj2lvnI0EIF9kD+udNlcVF485GFjoxNzJbHHzBmS5qHqwtpfixsivS325MlhCeGr+9E1oZ5iP5LZ0VTSatlvdFwkwAGljVXHBvMiLgLS9Aq9axvOmbi1DN2Q5ZbtXiOKUWp/crUMRlHCaAq5t+5ThusI1GElTXG+x6sE7JWnEUTDFrYldbnae2xacmecH803VbvLHTBbKohAA5kMxdL1tKSQDfu8YD36Uva93jaB4sOU4eVx/bCon/4aTH9jJTzzIdnAfy4pVIl7qECgNsppUwMvR5Dg== 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=a+b1/6wCj/VG+A58Xkz3ufjLh2cdiy+bvd2TTSHja78=; b=Shta71LuasUSmh9kE5jciwPtKfU03G9VtK9LggGsI+oWMujrtePQ7e9GKsqa9ltyt8A7mQwjqS2DNnJzDLhLsqPM/BTRR7vf8D8V4+EIe9wYW/ACSLu3dUVj2who/SqG1Pb3GuFb3gjiX2vFdTMZfk4XatQpc6v3fGgdohZIDTzTJEmo7ztv3Sues5Ppw72O0uBf2Xk1Kjft0ZkNnNR7turvcc4TetiveSqX21W6dYKbckeqqqfv3JbBSaPycRb4QMMh/l8tIKTFhOGjYtL785F+VzcnkF1TCkXfBBHQnmAGlpufkuZ0Tr2dubX8r1HSweUWyUhEYq5xBULBQbqhOA== 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=a+b1/6wCj/VG+A58Xkz3ufjLh2cdiy+bvd2TTSHja78=; b=mgRrSHZv2+Pal8Et77PIqQWlPY0qJpOzAWyGrs0hs2moWxMht+mQdeRQQHwmy5iyeRI+QIwYakR0fSfsq/UzFc5HfahHHsXqTdeMUfPGHxBEsGqCj+tfOpzVwv/zilFv+nl6Olz8i7LYH3xfqXDl2qiyKIq4/XEr+QcP/b9kC9X62QXrv3sLyDHeDEJsYl1Z4sqerpI0AuJVoCFS/W94LjCYyj5zZIFcELyqkXR0kJx0yhRus/HF4o2hdtATmmDfcyQupsvLPmedKS2xTAhQen+kmPRYjWwNFeVVo4k3ApnT77B4UJf5ZYfGGiAnRQEt37z4Jr4yion+IGRkL756uQ== 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 PAWPR04MB10007.eurprd04.prod.outlook.com (2603:10a6:102:387::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7807.28; Tue, 30 Jul 2024 10:53:52 +0000 Received: from GV1PR04MB9088.eurprd04.prod.outlook.com ([fe80::8775:dba3:39ac:3277]) by GV1PR04MB9088.eurprd04.prod.outlook.com ([fe80::8775:dba3:39ac:3277%5]) with mapi id 15.20.7807.026; Tue, 30 Jul 2024 10:53:52 +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, pav@iki.fi, Vlad Pruteanu Subject: [PATCH BlueZ v3 6/8] doc/media: Add 'unselect' method Date: Tue, 30 Jul 2024 13:53:11 +0300 Message-Id: <20240730105313.403238-7-vlad.pruteanu@nxp.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20240730105313.403238-1-vlad.pruteanu@nxp.com> References: <20240730105313.403238-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_|PAWPR04MB10007:EE_ X-MS-Office365-Filtering-Correlation-Id: efeb712d-2899-49d1-bbf7-08dcb085df6c X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|52116014|1800799024|366016|38350700014; X-Microsoft-Antispam-Message-Info: h3EHChhkHHVUtRgkVel5S4l/r4E53AKTLi62UrzbKdT1sceJIIzKpO8fDSbYUA7b1mkGK2EVlO7WaoGJTG5EM5h+DmyGByLB0hEk+SkO2MY5VguRs9Os5jp3egyyDmWNp4c8ExU8wblz9IFiGXEIbP0UTIf/pBYhWdbhkOnP4LpVbGoWq4kvA3idnRhsLuA7fUrFOjKgtk/lSptc+5NReAB1vin9FkoKQ849ZHATioqfCMX3pQwwKnVx2OYo4D5Sa79GM77kOXZN4VWSN5HUYYFtDC0FBgel9+624FyzwGrEG8jQsbNDrY14xTsZ/3EGYQ8LevV0sxVe3aAAYLCR5lCMqhoNGSdCsA9WM08pd+9wnXu5xSPvebZLT2QUV5glfUreA0OS+oHx63KEMSCHNy9PHO1ijkgJkw682SZ6eF8dUhksSpEW2P24r7oEG2gVzrprKJCtZvINk8nWrn/2VjRJvLjh27lg6RVFllPvoNCAPzxIoRiWf/yuMyxFJ7iDX9e1XvL1lqEP8sMmA9Dudjaid1S7Kx++oeYQL/ch7Gq49CCo6SCE4Wym9jqxRpQsd6i8pZZ2CZidSCmLc3wiFwcMK56Pk8aHq4PRxSlIOjGnqyxPsbwqoZmXdVEWUgr9CWtlsPj5VL5pWltGM5fxBZ/nghV/5tCJP1/5mwSIVyk2kxoSCO0Yl9HviS4tWXw6RZ7tLq3SFs51USylEM5/1OAbzQfRnFp7hv/+SK6OsK9k/0h+30NjU9CeBn80XDUZNSVYq1no+uXuN2SmZdJgw9uQ10qzKL5q7zZGajrXsgctK3UGPEBuLWGitql1/00TDabLGQgM+mHsae0gNJwRoHewfSL/k1GRK/bQR+/L741QmYxboQM0f5uLm7vyTXfPIA61w4h5jEFnMa8Q3HhAZQfMozhe7cGnw79cXfZpnEx03ErVOYOYHIRcGK4BYfSgqcDDpJafeeLPFwauWXXaA+2ZolbD8SeSj3mpdyKmEDICAZ/LktU2FJCXF21/xm/Ho5+Aq7q8haBXuX8tdMOGerKxYLWXol0vviypJB9S5j88QY5rzkRsXPpMLhUiyEh+Qjojx7HZGzPfol94O3dMudubaoBRlib9oOIksuvHO228k3b8/RlxspYng0MugXfkESLZ83ZvRjIW10aPsqRURt9mSd6oLUJbhgW801Wk6JWLJfH6fL7iQmWAiM9EKJT6t5QC9NuLA+U+gYxfW2iN+q61BBAz6p//onyP+IHKYgEZZWJL8WrWnsRk9uWtgwNNsnzWUGmq/7OEpfWerL4C3R+RHvU+p8bqHzVcOGqbaQX1ESchP46apEl8CzvsnJCPcfSOgDVKU8FVIJZDSWYBMY3tokFxHFVS2X6mCdmnMQjStdZrt9k12InEl/7nJYHnG4PaOyBQqDxbK0nFxc8RdA== 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)(376014)(52116014)(1800799024)(366016)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: c+uzR9U2tRXbs4kd3HfglAquEyge1WY489d4a01CPQ98Xr4x//UAlhdsSG3oWPqupMo3ZnY5RjpXFa0W0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XFSurRxWC9lbT1jVOslIK+45zZ1rsnEo2gl5gmEaPE9ckzmugXO5hEKuJ182drmH6nanILKuNLux13COQYRzZFg1vwYv2xFEqCB5owSPTZx3LMgPvtPtWiEu7/KDI9IX27sHpMoAC1UNRXB11lPoDXQxexKKP/e+yS5CzCcjMUdb25Xn6qNurCxYHR+Bv23D/82RY5L0ecamhK/zGQgs6t9wkB2aWpJnOUlCzRfF5VyfM3mKnQOBGkLXd+PZzwLgEMcWiaWdxA7Vk06kR8VjubsiJXGN6we5BhDy4L393VYC9QIp6A1bZezEcg/Q2K4UgUmY67mbetUjw1yklQ0qygjL618AbbgVTIrdeVj7RM96pmMuD2r28bhpk4sMi7fpJMiZy4SCAlph3HMd8rOwgh41pumELSQCMpddcGj5O9MOVKych X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: efeb712d-2899-49d1-bbf7-08dcb085df6c X-MS-Exchange-CrossTenant-AuthSource: GV1PR04MB9088.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Jul 2024 10:53:40.6958 (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: jINqLPBylCfrvDgAAMqhr+UeTIxzU1IzItSt1XzFqP1XzTeu0ITx6029+c5VG1cQzE0v2SR2sjCBizbNOYflOA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAWPR04MB10007 This adds the documentation for a new method, exclusive to transports created by the Broadcast Sink. It would allow the user to terminate the sync to a BIS, via a 2 step process. The first step is the call to this method, which changes the transport's state to idle, with the second step being done by the audio server which detects this change and releases the transport. --- doc/org.bluez.MediaTransport.rst | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/doc/org.bluez.MediaTransport.rst b/doc/org.bluez.MediaTransport.rst index 2a3fc6411..f7faba969 100644 --- a/doc/org.bluez.MediaTransport.rst +++ b/doc/org.bluez.MediaTransport.rst @@ -57,7 +57,7 @@ void Select_transport() Applicable only for transports created by a broadcast sink. This moves the transport from 'idle' to 'broadcasting'. This allows the user to select which BISes he wishes to sync to via a 2 step process: - 1) the user calls this method, changing the transport's state to idle + 1) the user calls the method, changing the transport's state to broadcasting 2) the audio server detects that the transport is in the 'broadcasting' state and automatically acquires it @@ -65,6 +65,19 @@ void Select_transport() :org.bluez.Error.NotAuthorized: +void Unselect_transport() +``````````````` + + Applicable only for transports created by a broadcast sink. This moves + the transport from 'broadcasting' or 'active' to 'idle'. This allows the + user to terminate the sync to a BIS to via a 2 step process: + 1) the user calls this method, changing the transport's state to idle + 2) the audio server detects this event and releases the transport + + Possible Errors: + + :org.bluez.Error.NotAuthorized: + Properties ---------- From patchwork Tue Jul 30 10:53:12 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vlad Pruteanu X-Patchwork-Id: 13747249 Received: from DUZPR83CU001.outbound.protection.outlook.com (mail-northeuropeazon11013056.outbound.protection.outlook.com [52.101.67.56]) (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 3B9F5197555 for ; Tue, 30 Jul 2024 10:53:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.101.67.56 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722336839; cv=fail; b=dM578i30fwjX6Nf79Xd0dOTjBkpc3tNJFewvKPLsLQeytf0RqH1q4vzvQ7jGw46BjjOJzcmbjC7puoS7hefLy+T4vbeV7LwDZthUDZdU/5ISrvKJNGaxowx0L/cz5UyExtNVvPY15Nl9qeNjQqv30NDz9SEbWU9kJsuu9UMne0c= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722336839; c=relaxed/simple; bh=8T8yI4uS81JTh8OojwU3eX7+Fi4f8/nPHQCU/zEVqU0=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=h56zStd3+4/zQ4OJRoFTzQD1wotremgEMPrGfvvEotmc4h6OfU4wktutB2LrqFUX34dw2GBQkFlygxg3egG5X4Oc+/PadUPUzh0h8mZ63yNL7D2L8OqUx3NBDyOEDL3gKTbaHdTlLYdD5YTO1KQ0JegkxywDTwcKoVvo1EbTBKM= 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=f9VtFSzm; arc=fail smtp.client-ip=52.101.67.56 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="f9VtFSzm" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=BrampbiIAAjBWPQCFKH3q41G5OpexWruCy0Qv3WAYfEmT8agOrdAhxwh00ITghx97kzQIzJU2tCN7QXqhW9mIJPoOOnNVKeJnP4KWeat6iEQmxJXjeNmWIGWFHQ3REo42NNAptnXqcT9nqtN8aT6ws/055vlBPObuVA5/zoCWGm+JF6BL43rDw7KW8WHSdNY6XPbI4nNkaeDUCv4vxSl3SvpRYBafQzyNGso0BrU3k6nCOd8UrcQ0DEuPNE2YzJDcs3SQn3gDpir2ti6J9qd17HzDS6m06EUAeFA3uFnksyxfIfh+osQaVuPScFlYctz/1G+gUNkp4Q4tXH0PPhPdA== 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=UcjMaOO6euH+vV2m5AvNknGUhOfxSXyCI+D/4nN4jsc=; b=YzjRbwOBpYQYqTh9E/6JogxMup4gHhe0lJVJ3lld5s+o1Cy3X1VLTo1jW2b0aNftr/dEgk7yHRn8+rG6QjEX8QR2Krn/YugwMxTEAEDlm7nooCGXIAd0tuZ1MsKf62fpRtKb4/L60guOV8oyQ0L9fo5+L1eFfLl8HveWt+Vf4l6PK7Zr3e18OWW9LzSTU1EOBee4VyJyr3fVHLnprHZEOC9KQyfHzSM12PjrHsy5GPTXl9J0Mx7E+HycLSIr6+0rJDwP+NWPigUKKOjF7jG9N8ck63OGa8Uu80CGC2Q51qBc69TbbT3ebAVl9vMe85hyw/8xyxtOjobgk5yG1hAXIg== 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=UcjMaOO6euH+vV2m5AvNknGUhOfxSXyCI+D/4nN4jsc=; b=f9VtFSzmL4amMUr8475ySFK/3lK7wpVfsOe7ve4h8LBs4zp/NgaFDvqV7mxCiLbsca4jU4gigfZ6A1YritZfRZN2RJnLAJqeKyBgB7F9dWuguIBp/ka3gbKKQu5zC+bmbTOcEN/2MgsekSSXJFlwkFhuencDn+4uTJXBHekY+KIzAlza5duM3rJZtNPaneWCmPKhRJiMENKqFHp+esvO35joFEzRkdayVfVDnPHQgGO5vElqmkVyVKEOFvkdh7sR8nn40PY0S9q5SnGEpTrpxf4uEKsfS0c7NwdNXojaDzoc/Lv1BAQqcX3GNTICDu6a9GE3EAoi9guyXui0Z8oWzA== 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 DB9PR04MB8447.eurprd04.prod.outlook.com (2603:10a6:10:2be::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7784.29; Tue, 30 Jul 2024 10:53:53 +0000 Received: from GV1PR04MB9088.eurprd04.prod.outlook.com ([fe80::8775:dba3:39ac:3277]) by GV1PR04MB9088.eurprd04.prod.outlook.com ([fe80::8775:dba3:39ac:3277%5]) with mapi id 15.20.7807.026; Tue, 30 Jul 2024 10:53:53 +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, pav@iki.fi, Vlad Pruteanu Subject: [PATCH BlueZ v3 7/8] transport: Add "unselect" method Date: Tue, 30 Jul 2024 13:53:12 +0300 Message-Id: <20240730105313.403238-8-vlad.pruteanu@nxp.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20240730105313.403238-1-vlad.pruteanu@nxp.com> References: <20240730105313.403238-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_|DB9PR04MB8447:EE_ X-MS-Office365-Filtering-Correlation-Id: 316bd00f-65aa-48e1-ebe4-08dcb085e056 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|52116014|366016|1800799024|38350700014; X-Microsoft-Antispam-Message-Info: VJFpleXXk43A/cWL1AXziTrY+ulkUQQEWBZqeXvRK56npZQRuWaqXqBHJ2I3X7P7EpIIJsdEdtuwCoMdaDHFUy5y3tdiSXQSzhSLuHDNf/HLk70M6YZIL0FuDZBf/6IcMBEreEMOTKPLJzYe72ixNjrh2tmA6hLwGsuXEnJt9frlTvhXFE7hqdeoYs4hm7KZNjz0uye3QDHklHR3f0TyyeH4cSuH35Spw+SJfpCcDjLHaN/RwyT+bV3XGVQbG5Hwh67vX9oaZBYAkR/KvXfizunQRDOpt0Un+uDHl6NCOTVFGkisUq8tRYTUosj1jUG/WO+LCh8dw1oF39WeIJznqQOBVxMLUyt8C/qrWvE6b6jdiY/WgAWSKtkgNu5NnhMa2ZZMl02jCmilv+DVa1iKLMZuw678wp6Y9zDJHe0LY8p883q+O6exM9BkCQETEtFtRsu09oBUlUkim+NmT3YY+/teVhaJcoW1WpLrZugqHIOHXcGF4ARXGiR+VmM5PtIfVQNb5fvLAiop4Lnltv6NHCVILBixqZPzLuYpNZsUZ862Xj1jb5vBEmc5Hv5Cas/f4opKxDc43grKeSEoP7oEhFwjwrK6LR9uRHHSn6N3t1bqS2gcCb7xBaYch5fSubWTn6r0MJP2K2zEkpJH3evzGgVDqjkmVsocf97ZJIwYHjfgZqup8C3JpuyeyNkL5g0fHhrRDdgx64de7puSlXnRYDUFMShV+Sn9JWCVInsNbvUe4BjvTLSGy/22/ieONGWnBahX77A9ey7EUN0tufUuNzDZtJSOwFFlNw7KiOI7GVpS7qYdaBAY7wD6NniHAaQ8A5Vmq6sU1WTGZ6Pcq0Tl6bURdmvVdv4T8r4LIOjAHnuXhpSr1xvCb9TMF/gUeI+ocHZhRgPJGotNy+mXdmeQ+u204QzhAGfse+MSBWYYFUVd1ZR0hbW/NVGtDmfOr6bjCs91WgV12mHY3EtSb2TjumRs3DRzP7xwI/21tUir09QxF9TAveAawk1PvdPaV3xwzRBVg9lBlT5jGvoWHPWcQo2ZTRd0tB2gpnV7MtASSUQ6iAKAWkBI1mT6a6EijOkNoKzw+PlUWJ3wqUbK/b9aCQ98dD3wMMLhlAA7huNl3U0R8SH2vgrIvh+Y29wYyX54O2aT9bd99F3yvpKBbLQXgqAz2YkiglRRXVj4to29QrLH4DMEgbSYWOG2b9xwxxcCutPwzVjnMFhve7eqEpqqiQgTPUIil7fv0Cecz1migbmDEAqgvP334pzB7Cxqb6pS1SNsgDRCjkbmlH2ilqxta1CzaK8bphNno/+Ujv4RDa6WpoCVLAFbOnED+R8ynxbBgh809KvHhuIouQKywLD7LqJZiRRRhEjPtRucAPT4chzguysTOCP/6QWcgXy6RdFtujb93EeohEcwTOkZQ4htCQ== 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)(376014)(52116014)(366016)(1800799024)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: aYEQlw0sI3HbbUNLxRB4pO1+a0ZPuiKuCm+4nPD4ghN1NYAcGFbF9LWsQN0mMD2drQvVPp0CWmEdO/eippEH7b3SIhkH8s6zv8balGoEZVTRpSf0EWTb090L52XgmkDsqx0io6NByU8NYHdoZbR6/XWXUAehLcU7JzXPp3demVflGgTk7jlY7a0gElRs2KbH6r08JhrLuuqjDGlxlsJb1dKrT97in9GkCzrjSE1TgjICxsPO9TTp1P5M4o2aGyX2dgIeFdcW+/7qfdisqOgcwxmG1vu/SlDIXoN8exeMzg/PJmO3CyRojkE4Ul18iwc70T0ZzasQlihrQXkbRXbrJ16Tng3Rt9Zfez1rChxfsGOUtH72drq94JPXCNuPeNY3OL5/ztOmUygLvo44k3uzRrjpiRei67vTZclslhLfD2DYwMWJG78Qj6b4+oWNRUv2dC2C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rydjOOSAfZjZXJ5A97JG/WQpJlL+Df19e8BXWylke+fY5rsvlysRmoIwKfO1r1ZFhW X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 316bd00f-65aa-48e1-ebe4-08dcb085e056 X-MS-Exchange-CrossTenant-AuthSource: GV1PR04MB9088.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Jul 2024 10:53:42.2218 (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: 7IMeDVY5FwtUeepe6yRafl5KFr7w/QsJf86yC25dbXSxWHwouQs7DOb08QbwZ0VK9W84+C+u8jS7QuB+F2VcDg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9PR04MB8447 This adds a new method, exclusive to transports created by the Broadcast Sink. It allows the user to terminate the sync to a BIS, via a 2 step process. The first step is the call to this method, which changes the transport's state to idle, with the second step being done by the audio server which detects this change and releases the transport. --- profiles/audio/transport.c | 41 +++++++++++++++++++++++++++++++------- 1 file changed, 34 insertions(+), 7 deletions(-) diff --git a/profiles/audio/transport.c b/profiles/audio/transport.c index 80e4f564c..300145794 100644 --- a/profiles/audio/transport.c +++ b/profiles/audio/transport.c @@ -975,6 +975,9 @@ static gboolean get_endpoint(const GDBusPropertyTable *property, static DBusMessage *select_transport(DBusConnection *conn, DBusMessage *msg, void *data); +static DBusMessage *unselect_transport(DBusConnection *conn, DBusMessage *msg, + void *data); + static const GDBusMethodTable transport_methods[] = { { GDBUS_ASYNC_METHOD("Acquire", NULL, @@ -989,6 +992,8 @@ static const GDBusMethodTable transport_methods[] = { { GDBUS_ASYNC_METHOD("Release", NULL, NULL, release) }, { GDBUS_ASYNC_METHOD("Select", NULL, NULL, select_transport) }, + { GDBUS_ASYNC_METHOD("Unselect", + NULL, NULL, unselect_transport) }, { }, }; @@ -1295,13 +1300,22 @@ static void transport_update_playing(struct media_transport *transport, str_state[transport->state], playing); if (playing == FALSE) { - if ((transport->state == TRANSPORT_STATE_PENDING) || - (transport->state == TRANSPORT_STATE_BROADCASTING)) - transport_set_state(transport, TRANSPORT_STATE_IDLE); - else if (transport->state == TRANSPORT_STATE_ACTIVE) { - /* Remove owner */ - if (transport->owner != NULL) - media_transport_remove_owner(transport); + if (!strcmp(media_endpoint_get_uuid(transport->endpoint), + BCAA_SERVICE_UUID)) { + if ((transport->state == + TRANSPORT_STATE_BROADCASTING) || + (transport->state == TRANSPORT_STATE_ACTIVE)) + transport_set_state(transport, + TRANSPORT_STATE_IDLE); + } else { + if (transport->state == TRANSPORT_STATE_PENDING) + transport_set_state(transport, + TRANSPORT_STATE_IDLE); + else if (transport->state == TRANSPORT_STATE_ACTIVE) { + /* Remove owner */ + if (transport->owner != NULL) + media_transport_remove_owner(transport); + } } } else if (transport->state == TRANSPORT_STATE_IDLE) { if (!strcmp(media_endpoint_get_uuid(transport->endpoint), @@ -1332,6 +1346,19 @@ static DBusMessage *select_transport(DBusConnection *conn, DBusMessage *msg, return NULL; } +static DBusMessage *unselect_transport(DBusConnection *conn, DBusMessage *msg, + void *data) +{ + struct media_transport *transport = data; + + if (!strcmp(media_endpoint_get_uuid(transport->endpoint), + BAA_SERVICE_UUID)) { + transport_update_playing(transport, FALSE); + } + + return NULL; +} + static void sink_state_changed(struct btd_service *service, sink_state_t old_state, sink_state_t new_state, From patchwork Tue Jul 30 10:53:13 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vlad Pruteanu X-Patchwork-Id: 13747252 Received: from DUZPR83CU001.outbound.protection.outlook.com (mail-northeuropeazon11013056.outbound.protection.outlook.com [52.101.67.56]) (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 7C4551991A7 for ; Tue, 30 Jul 2024 10:53:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.101.67.56 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722336841; cv=fail; b=vGnViSX0GvJtjcH8XAA33vb5oHWRdpbP+Za5md++v7cgPLmbS4I2uXr3Cz510wSit+S/pv+VSSh7r/DJlCReyzb+ek2/lLKSyFG+AqqIP+/yoFGe4E7tIcLK9taC5VN4P7fMMkL/E9apoifSWTu3PTEvRJtSbBaKSNBJ5REyo6U= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722336841; c=relaxed/simple; bh=C6ScDrkMAD83Y76MxJYyAX5K6fhgAjv7nDHs0eFRnVU=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=cXTFCrGuxVwvbFV3SSCB5mZCc/NkS79kfyqCOoNT4Kem5s6JN+FHn1+hyLQdKfg3VZkfWHLmlE/rIjv6MnVhGndwERDY6X0B8OUilYly6J0m+PPSo4CK4SYwvXPJyZ+Ubw+l0hWmtyZjIsoVGL3gDuaP+K1SCHaPS+6rVSLTpOQ= 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=Dn3o6dNp; arc=fail smtp.client-ip=52.101.67.56 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="Dn3o6dNp" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=E+piwITjKH+3t3+W6MxSfUhaPMT79YEf+i0kh6//Mw26bThGYg8BAOLMuz9oWXDo6EF+L82K3QV0kIRYQqtF60ySJOGJcB9iG4YR/uOYzqjwxtQHKU7dAVf7cx3VxR0SYPBykRTWKGR+sk7McColGLNW3xos4nhsK9g6f+PqrlhPL8KLedrCVaXZSgbn9alroIwpLaR2b5lTuRbXq4zx+iEtgdQ9PNwHsrTyN7KI/MdUTWYNXiBDIsarPqmGEYykEV40/4jtMW/MpfgmZne5U6FAELFEukrvsGnu9kgk/Wqt9dp7yHRpB/uv6/Obvgv6NZff781r6g8HIRB1ZRRBcg== 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=2El+uiBpaNbjvMOYHfoSPjMvWIA7FEKk1YdW8f53aLA=; b=FnB6J1yZhOTC8dDSkHKe5iNDkZB3OTPTBC9oB/J/Nn/UyOhEeU5NKmcoQ+sIubwR5A56Sbu+JPKXxFT8S2qV2bLwykTy8TMUvVrVcToR9/fleUEAbk0wYzDg1i/S1GMZ0yEP2/I3G3vWFAvkbBncWrmBEf1mTQ2v7Z+r+y1ECkVNkq0s5l4wRJ39dl1AO8eAtg0gVcn43J7UBQgzuCR58F34ZnlG583kbGcT1HUXVagod1ykOIqmZLEk1XS7dajBonh3Gyxmql22OXYQn/Ph4VWihFmOaEd8CHgK99BkCAIQUFssEqndZxo22Lni35A3NqfAZUncZXVtwyjzCQT2Kg== 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=2El+uiBpaNbjvMOYHfoSPjMvWIA7FEKk1YdW8f53aLA=; b=Dn3o6dNpFnCbDzT1raGRM+l0uZ3bMbkzuOS4931fUwEwCdMMXxm0EghAKvg/duiRrgc1gEJomMJQFK7of9FH+jJc9m0WxBtWjGG0Da0RZJHrO1HRJ2HxmJhQ8SL0kkNBw05e9K9Cn8YIZMs/nNl7BtB0ZycwYYtF8Ab3rzLtWdkPUhb0AuRXoalOnErBvMxirN4CHHcyGj1v41rKGELZ7XZWnW61PyoVrZ589uzIfeDfesSrxIID0LNQ7bVAXQWsc0Q57sKAsv9Y+mZEGP3Eyt5TugZI8LwfGcxT0LhkmoD4+mJ30C5esmm6XnWbcMv4buTHYRo4qrXaSI2JJrr2wQ== 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 DB9PR04MB8447.eurprd04.prod.outlook.com (2603:10a6:10:2be::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7784.29; Tue, 30 Jul 2024 10:53:54 +0000 Received: from GV1PR04MB9088.eurprd04.prod.outlook.com ([fe80::8775:dba3:39ac:3277]) by GV1PR04MB9088.eurprd04.prod.outlook.com ([fe80::8775:dba3:39ac:3277%5]) with mapi id 15.20.7807.026; Tue, 30 Jul 2024 10:53:54 +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, pav@iki.fi, Vlad Pruteanu Subject: [PATCH BlueZ v3 8/8] client/player: Expose transport "unselect" method to the user Date: Tue, 30 Jul 2024 13:53:13 +0300 Message-Id: <20240730105313.403238-9-vlad.pruteanu@nxp.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20240730105313.403238-1-vlad.pruteanu@nxp.com> References: <20240730105313.403238-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_|DB9PR04MB8447:EE_ X-MS-Office365-Filtering-Correlation-Id: 289958d2-c0b7-4a0a-4f33-08dcb085e171 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|52116014|366016|1800799024|38350700014; X-Microsoft-Antispam-Message-Info: PLIB6rzc2obQijQ6mY7DmAHL1HeVZSNYzXWi4PUOPmAB1VxH2ToC7CpgQsIC+NNSFeT/iCVKiMcCt5vACVMOti4cQO/rjGp/hbRpxw8Tu4bpm6h0zGb435QjyWB4pi7u2yDanf8dORjaCqtBnJJoAXoGKaut2PUtLy+z6pM3ldK3heRw6SCWJtrmy9SgtQA2NOYJfm5RqtGp+yYws6dwngB+vtt7j1mTuVbf/4ZFsk0Ufa9cJvI7ppEpVScDKAC8T8dBkl/vKGfNYZzmfa0DCTPE3kiZsRAfyIZtMXsDqliTjDe2pcWrNXMPPwIhqVnGsizONEkblQ0d6XZx7j2kxfeXh6UXhMDVDoJ7qZ4eyl8nv1MpZdNtED9bmDmei2E/TEJ4tG9ZfycqwAAbHbCQ4w7kDAMPgmsfHLQhRgCfAh9iEZ5JYKZ4W5zbgH4ZGivpm0AZT7mrlDULXAraLNd9Wl7+HaC5U6WDNsNiAYcFdTPqCwfW1gyfmbvGJ9siiZ+vXKq+xFEZa7fAkpMrWE2NPh6jZxcOjBCkNm/pYGj2W3JMephvj24mTjUEICJ5vtub9NeQdcwRzDHqyHUYrFV1lBteIH7vF8iSS2IpOCCe6BB2qsMkeSLVNDGxlEwSQeJ+4lTLs9SknEi01vSUbtwdz6r06TrYQZXVmf/FWpKe10a6f4LgNi71cq2UcRuZtcs1JYEY44xtV1/AJc0T6z0eJISbfF+Idur5mj0hLZW4lVGalpD++LDpvX7QEKLyp663wO6NMnRFomsdgn0PBFj22wl0lW0OI8LHBdDCqcS3IqcqEQNKTU1zF5lEytqsFXIAa52rABeWdpT2VlJzrAzj6u5ZqfamRmysmoaTGs8cwGLGktBQm6NK2s3of9IXZRg9H/Ali0fX8tVqgxPLTxUboPKkmrbWxQYerjyRCrHoOnXWuOQLfHf18HbCWpheF/LKOn+6/QgxycNCm2PP6VcuzScGwxUmRqAU7ooOzmgUnYTxD2oGwPUHATv5sGZKOGUizca62ujWIUChDkwbqL7eMaJrpEDwf4DB6v4h4cxEgeOlbopClnPVwp1nt0Kjl2pRXIQUU0kQ5xD29fRE95p5QCEISjkQ/ROoNySwhT5/ASe1YzwPlBHDEZftVK08C87Ih5vggCi65k8InHRikfRKJyTU0enUk+Hp2nmjGtNiMVeKJhjtBAnRwO5l9IJ6ZOW1XDSVt8Il5K+Jg+1Ofpjp4rljxR+NcK084yPfZcudDhk68+WmWsFp85xGYrewCp4zMCABrRRB28jTQzvadZ9m2eyQVYOfAD3gyLR5/Zx2FRBT7zd6Ow0wsrsbi35f11ZRYDmalDcT/syOGhgYWBpJx7MvYehIEj+4PQkx9qrtiP2emmDu6iVvjBZ4u8YmEi0XDu/xcJL9G7fStDq7xS1gCQ== 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)(376014)(52116014)(366016)(1800799024)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: DLSWp7qeYQw1hTCXZ/z6qtpPSq7zW9s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Wa5BGFm2TWfu+yqYwYImpbP1gIcJDvzJydFJazySIOSvzNAX6MAPzR7PXbFwKIASQDnycY4YUtXTeTbBo9k3aYW/q8c6o2LShvXWixFY81hYTsTHwwe7iWMtq6FzmivogjJS+xZ2FZ3pt3dPk1VvjK4skTmjJlWpjvmr33w0wF+MNK8QsarZe5T9KWL7xkT0D0aoqFFsEOp6CIcqHeANQffFHY0pDcb+Ol1AwyHP6mPan7fmOtrgplVidYwGTjD/gQeAJqEqY4jDSvchFoF3k0sB0krES3BLdMVp3h4ccxZRJrNpG/3Fk4wgHOGRDy9IQDJudCxs5yQ+U7s6QXCGut8Madev7UfJp7HKdimMFnsTzUXYx+4Nd5D2Hryf8M0vDnxbDAogE2ZkIoyjgwXKXOpiPPfO21gx5joSuSa7mEoIe7asZA+aSLXz6rQ1LChHFfq0BDfb5GblXEGslpavwsae1E3S9297loyBg+S1wMp6jWU58hQk17Ajkq+q0IKt X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 289958d2-c0b7-4a0a-4f33-08dcb085e171 X-MS-Exchange-CrossTenant-AuthSource: GV1PR04MB9088.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Jul 2024 10:53:44.0903 (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: eqSeHAQJeMFMdIdnhgjktJY/2qDdJ8F0lEh+B2De7N7vk1mqYONJ94h8cOKSLrc+ndaaMjrmEAx8d+QrRvue0A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9PR04MB8447 This exposes the "unselect" method for Broadcast transports. This allows the user to terminate the sync to a specific BIS, via a 2 step process. The first step is the call to this method, which changes the transport's state to idle, with the second step being done by the audio server which detects this change and releases the transport. --- client/player.c | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/client/player.c b/client/player.c index cc30022e1..51b9eeea5 100644 --- a/client/player.c +++ b/client/player.c @@ -4651,6 +4651,24 @@ static void select_reply(DBusMessage *message, void *user_data) return bt_shell_noninteractive_quit(EXIT_SUCCESS); } +static void unselect_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 unselect: %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; @@ -4881,6 +4899,16 @@ static void transport_select(GDBusProxy *proxy, bool prompt) } } +static void transport_unselect(GDBusProxy *proxy, bool prompt) +{ + if (!g_dbus_proxy_method_call(proxy, "Unselect", NULL, + unselect_reply, proxy, NULL)) { + bt_shell_printf("Failed unselect transport\n"); + return; + } +} + + static void cmd_select_transport(int argc, char *argv[]) { GDBusProxy *proxy; @@ -4904,6 +4932,23 @@ static void cmd_select_transport(int argc, char *argv[]) } } +static void cmd_unselect_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); + } + + transport_unselect(proxy, false); + } +} + static void release_reply(DBusMessage *message, void *user_data) { struct transport *transport = user_data; @@ -5335,6 +5380,9 @@ static const struct bt_shell_menu transport_menu = { { "select", " [transport1...]", cmd_select_transport, "Select Transport", transport_generator }, + { "unselect", " [transport1...]", cmd_unselect_transport, + "Unselect Transport", + transport_generator }, {} }, };