From patchwork Wed Jul 10 08:13:35 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vlad Pruteanu X-Patchwork-Id: 13728984 Received: from DU2PR03CU002.outbound.protection.outlook.com (mail-northeuropeazon11012049.outbound.protection.outlook.com [52.101.66.49]) (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 E18F025757 for ; Wed, 10 Jul 2024 08:13:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.101.66.49 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1720599240; cv=fail; b=H/bWR87GM9QgteWg9do9E4KWAP16g6gBUQSsUQO4CFV8eW4lUSAchGJtCRuiNw6YQZvPJAehgNGHj9kY8TQPr0Edq2GkTbq96fU9IfKz4zuSvXK6mxjCbq4YK0NY+KRGmCSi2W4gPLHF0ejay7ubQ8ZmwQcctdDuotmBpPEYg2I= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1720599240; c=relaxed/simple; bh=DSHs+NcBt3wXZi19ZDNBV2eIwHafT5jB+XGXNXQWbMc=; h=From:To:Cc:Subject:Date:Message-Id:Content-Type:MIME-Version; b=Pk2DHJd/S18ipmieInmI3zeCWcVjNEkmgL1aUpWSlVxs4cnHiQD7uHbPHLTAfF6Ez/dYf9vC1C7ip2XO6xqU4JTYR9NOeTHXeQV2lrvO0xK3u4GgSk0nBfHzaoEdGVdO8ymlnosUkybysXw/mAqxrUEZy7aUCPPbCLiOBbJYl1w= 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=gEqcJerH; arc=fail smtp.client-ip=52.101.66.49 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="gEqcJerH" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CZiOsN2Dj9xq+cqMQz82heRwru5W5zv+TU9wdPlfKzi8Flt2z5DihCKO36m++1wvJ0WmMbFrlNQJmGxo8FV6w0shHL61IJMwcZzxFJAeTaQFicSeM9CLG6tUSdKwkWD+vIB3Ks+SWJGQaIymAauteB2rXuzUbbISTjZ77z+SOdkWZz3+en1whGBwu+TUBlmslE36MvdJ3LZAEtDHA6focwZw8JlENsU6+++xysBLQTZI4u6/j8CXPrqkGmPDdKcNDQSaKYU1qG6TRjvR0WFbePGxjd5uSOQeaeTYNXqSv9mIBeQ1m4/28TCwPWosdZBdyycD6OJxpqJ3vQBUe22vcg== 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=9/w1C9TSM7ScPdKwSQZNej3wrKzruBSvU1/6cK/45+s=; b=X+eYmGVeu7rCUQ7dlpu3xojtMrjyH0E822EXFYosnEfZhWgbr4WUPT72U1itWp8Ei4eSsoLnWbT3qkpaiXqcKboC4w3jF1uH84bf0EBpmKkqytLNCGDnx80Ca6//0sQb3yhLHcEQtAW9rmkI0INzIIIRILqzW++yAhmM7RIAgig0bHJ5uWA9ICwtQMypO+Lo/44zE6C9S/FNIr446O4Vq53/k9xQ6l5zgNGirdRkWooRUp01/oYOd5grYUcaWGzfF1Kh/0/mAsEe5332D08vLL9Q/g5wEjC/LPD+3a492P3J+mHHI90FF8ScTMCw9qIbdD6eSwJf88HVrJoNStJezA== 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=9/w1C9TSM7ScPdKwSQZNej3wrKzruBSvU1/6cK/45+s=; b=gEqcJerHFXs0ouho7noZD9o+xNladRdPQw4tpmDIq5EhynvNHNjisi/y3o1fDa2jG3f1lb+/AcBAS1XsKKW2BD18lgX6Y1RTIL2OwWphq3GW1qLBH9p4pypp8QAPXD3OUca9zB0PgNOSJS7lJbFeXEhc8jYU3brni0vT1yT6B/w= 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:13:55 +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:13:55 +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 0/3] Add transport.select method Date: Wed, 10 Jul 2024 11:13:35 +0300 Message-Id: <20240710081338.17262-1-vlad.pruteanu@nxp.com> X-Mailer: git-send-email 2.40.1 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: e10bd63e-e95a-4a2f-eb96-08dca0b83da4 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: ahcAEkdS0vah2xLgaFIBWjKxE+N6iTFqPFow9nfCOlAPeeU9RYK/HPEukQdlsormHl98U5UU0/dBW3H7p1qmRNNK8TChywjAAPg16EF90To2FaVXobdj4SvaZKlxZmSCCKGQ3VCglKaE74DVCLsKE0mYnI6j0kwUu2DQF04yGwa6NHMvq3uP2B+88/gP/q5EznuoGeE+SMGG9AL+WlFDeFZlIXOt6MPxNhYz/4D+uZEwkkDTAhtwkW+TLHKYAzWCGXtBghqeRWveIfBhTYmtbO6nefSPnMITvT/dgmiEh3yh/MVpinzs68x0+fzPYj3HYp8MNttVL+EIcK3XCFdJeML92Z6r6jHtMGwMyQODkgNMU+RorL4SWSMu+aehJWz9C4W1CjEI1H9qh+q41glgTU33qhnF6NC13djYVv3YbD4PJQ8egi2Mhe63Lf92TILAg+BQi2gsmkRGuCQzMmqLmHr0TWOQiCv1n9mY/OFHUg/9iAUpb9IKfeHqT38+9yw9A+S0QKwxEM+SLQiQ1j93VMViy1wbzipF+FGDGNXjvtHoXn03TYUpdKCaxU92TsZJKUfsGOckNIB9+QtdudjzSAnE53uokgc8CwADe5KKv9hn9OV+jR+m6rf2Ib8FKS7gTkQXdGRdnAovqOHBAIOEnr7dYzUBbW8iMY0TfB1jsJoi2QgKNSJFsbYPBzX0NZKjxB+B3smE8nVrXMq+Q97cBtrWa5nY/pWZJHc5LQFNlqwoiftzIXQMzHLVd+kjXkHrEIxkLLvSr9JZwBwtYfMdxas929eH6Gr5mygDWHLoCCeai3bp9XiiVoqFbMuxLtlQ850hev3cto8/4IDKpaRy8fzxtTX141Tu+PWvAwSjVx2Q45ybeEilGjwajoL8mZ8uNflQZh/UlWxCyGpVjCEG+JjSjACmI+0+B8PiZyMlyTnY6wLf3LA7gyf2saIhIFd7SyNoQ4IISFG3ZFixhJo7TMiuuYbTcD0C7UdeTiWKIGZu9Z85AMgZIGlgD3y0QPcAzcYz5ACrTWphgTdaywztEz7cu9W7jzwvIbgro77PTOe5Gu+cpx2XS22akpNCeQU0ESXDlYk5oRiSr/7XnRPbZNoZCZgEDphu1S29RGiccEN+CSBzwqGVStHJ2rmrVRL71+DPiFnjzAjRWc/iOrs5yLkYlaxDxki1oF1pkW6kH3hk/4dFbRgoA8xj5XdRYvCScEu2BsFEwJ+axTFkQ4+7oH2U19JG6LoESEAJvKfuVjXeIW8XYsdkGf2uMiByWTCuGvP3HDgOyf211yO/N/4mvUVuRXKgS2TJ6j1bPajMJJ5AnzQ6ywx8aya2d7uLYcogt0g9gEMiRFtdqAXKVAZqv77KpNN5E356G1N5rzdSx039fGJFDxvnJNLY00nBUoF9ClcVqPRqU/PeRQ73expF+Q== 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: +uBqv5+HAUUwWLG3b5An+McWm8HDYzVmJCDsJI6ywXsFJJX5D44Qlpa6CpmJLxF9vwq6KTXYEXkX9um6AT2yIG+dmx/ntpQnkj3ghQoYQlhdfMQyDofeFvGdyG8tPS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beNroZz/DYPC7cRQjhGsPQY8Gf3tHP8G6+Wo1vmi9tycWV679SshyI0gTHkqSPco3guOShf/TnX74VO/b2y2U7IPdSyWV6R7Lxt7ZvsFWHiygUf4gqTQsINoj70eM2PTFJKUPTCtZDQzbdKK4Mj6KvNR5H4LBCDsCEtOwi+vJeglRKHNQjYD3fZPGAKtcuVxQZRdANCd7IdqWHngFKNx8dw2elfTOOOQmX3ZpRlTL9hQZNr70jYMOPflyV3EYyaMLLIPyoz7SXIIHAM+GLxhGKWl/F0hbj0potyXtt2Qs2kNc7LkdN1hBkQT1rFYSceoyIEhUbxvuiMUpt3nRCzcr0PIxcDMDbCsLmo2j638amtf/yu0oCj+o8rI9COG5LDel92wg4K X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: e10bd63e-e95a-4a2f-eb96-08dca0b83da4 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:13:55.3192 (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: LavMUMUip6j+OJuiIg9MBZH/9DH41AGOhD8m+xdkZmd0zY69SBKy9Fw1VA27BOF0PJFTX7LYRn1XRr2EkF7qKw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAXPR04MB8864 This series adds a new "select" method that can be called by the user on the broadcast sink side, to select the stream for which synchronization is desired. This is achieved by changing the states flow so that transport are not set to pending automatically anymore. Instead, the transport must first be selected by the user, which will update it's state from idle to pending. Any pending transport will be acquired by PipeWire. Furthermore, this method will be used for setting the broadcast code of a stream on the sink side. If the encryption flag is set, the transport.select call in bluetoothctl will prompt the user to enter the code Vlad Pruteanu (3): transport: Add "select" method client/player: Expose transport "select" method to the user transport: Broadcast sink: wait for user to select transport client/player.c | 52 ++++++++++++++++++++++++++++++++++++++ profiles/audio/transport.c | 29 ++++++++++++++++++--- 2 files changed, 77 insertions(+), 4 deletions(-)