From patchwork Wed Jul 31 06:17: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: 815755 Received: from AM0PR83CU005.outbound.protection.outlook.com (mail-westeuropeazon11010028.outbound.protection.outlook.com [52.101.69.28]) (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 44E6D16630A for ; Wed, 31 Jul 2024 06:17:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.101.69.28 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722406657; cv=fail; b=Bp/Vn8ATg0odvnTbksCdRbOyWl4e9rKk/0vJWPrLGhFre0VC3jWM1YTWp0EHccq//PNYHFA2igSDbsf0CTpaYrUR8ALxyhUg9ChOazZD5ZMqnXQtizucWTS25+l7huv+VabmENiKm4S9cQTKwlb+bFEUq5xivEvSPRwB1UUn4QE= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722406657; c=relaxed/simple; bh=bcVsmIhRhhMUXeH98UHdauTkucKfIAZrMp37FLycd7c=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=rnVOLLbb9aPhMAJIv+suKxwN9HRqO/aMqhBiYj0xG+UDcAHUmNu6w81bFycHHgA3sQZzSXk8nTsu7UZkxBGjGWajuFYM5HqPrr93GfoAqaq88GxYTVOsFI5XtSDl395cjtgwS/fk+iMMIuLK2Q/umgzuW1zgZTnQeZ1S5EiJfF8= 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=XMf5MxYc; arc=fail smtp.client-ip=52.101.69.28 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="XMf5MxYc" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=xSbrkKTaSYgKEqLhHx7jdVapbSvb7umO+FNBSOK4+jIEoVHanGBOP7HQezSiXHGg9H573ZvDoZ4GFo9rMzSvAqbLF1pY1a6gdN6xW2ZsCHzQnCyEH5od/EO/9aa0LgAuRTOoOABad5f0DGfZtmgvHrrDkisZKBB78bNM/lTMSOoTISOoUgsU9me1Tq1pfl+9L5MJqTEoKgqCI2k0BzcIQWvo+lvilanU8hF1tcXDmzAayYlJR/5xXHKhGCzwdrELrvKur/cGN0iYPHCZKIFsgjzF6a8Nc9aaxiDkVUwourRzNoHloOKkPNsRTUon6M3q0EEvmgbvIIPrfW+o3gGsjg== 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=ZEieOMjDKfhF9GpI/FDCHIHIW4hX45LdQuq/JJU4m9Y=; b=YbU7w8MoDaQZtrgXOqqVy2Z+NtTb2UmB6CQOKnVjqFwe6N0mnXyk6zuLmsA9VEu4tkCfZGyhoWf0ZnzrX7PbwTSJNbaecWpG6ccXgPuAsyTuTF5hbc+DsBniowOKmWdIaDKb6gUSUCoSgVTvmvrhtZwSuqc27sjOsD9/ynBLKTeFSMdTq/wzQ94/d7piO5ErvJ/qtPcpw+g+qd9yF6EF8aM1OVQCJgyj0Rtv9Wckxr1mcH0RTnKo4fZZ7fNnIJl4E5phhxn/7f7PQuufH5JJ1yS8r1fWD/nay2PhZWRbep/+W6ylyZGX205C/KLeFBcPtuyd/HMnu5e2gLpKpN+iiw== 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=ZEieOMjDKfhF9GpI/FDCHIHIW4hX45LdQuq/JJU4m9Y=; b=XMf5MxYcWeDqk6C2U0Ow4uP3K7gh9nnpvNjNClnPsM1Wo6M6KzBgMakaEDwCFRj1BmOIEmV3VKV3oVoBb1tpABp9IHevunYPFyfjKEN83STk0PWuXiq6FIgt9MMzdCIvyROtIdpekZ7k02dQmsXE11ZJcL7TIqdprytvoed6Jj0MF9/4OFyYCi33cvBqLFEKqin10xbnVQ+q7i+KcLkFxW/G1tYPzWP6ADVY5MB0+y7b3e0e+SXR1cZO1bhHWeN7+kM4XwbjM5bt/DFRPhFet7T6lD6TiBASByUPFWPdqAYq+FAJPp7SVoKRySUMthN0YLxonxSYYh22+c4a6sR6hA== 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 DB8PR04MB6924.eurprd04.prod.outlook.com (2603:10a6:10:11e::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7807.32; Wed, 31 Jul 2024 06:17:32 +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.7828.016; Wed, 31 Jul 2024 06:17:32 +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 v5 1/8] doc/media: Add 'broadcasting' state and 'Select' method Date: Wed, 31 Jul 2024 09:17:06 +0300 Message-Id: <20240731061713.435586-2-vlad.pruteanu@nxp.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20240731061713.435586-1-vlad.pruteanu@nxp.com> References: <20240731061713.435586-1-vlad.pruteanu@nxp.com> X-ClientProxiedBy: MI0P293CA0006.ITAP293.PROD.OUTLOOK.COM (2603:10a6:290:44::17) 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_|DB8PR04MB6924:EE_ X-MS-Office365-Filtering-Correlation-Id: c4ee4317-0aa1-4d07-13ed-08dcb1287642 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|52116014|1800799024|366016|376014|38350700014; X-Microsoft-Antispam-Message-Info: haqBfgkFoSWQq9gD3nVY0d79i+J/CY3rzbbLjmANfIdHqhaZSPPe+D/KA4hxMTiYf8N2U/axNze+deBh3nDDAsZKUL3iSn2r/dz9zfQt1Z6B0gKVwA3b47KqbSTBeCeZXWBph1RqXlFYk64bqLKcDIkIG/rsguPQdPl2jpaHnjgvWtPam4IjZ4tryBH+h4WJsf88SVpHhpNcALVq9xUd9eLLu6zr3UJM8ZdZRsj+yZS4/OeJotaeA2z4F4BBpPwaQnMG5pI967Sf3eqztRZ/CXweYl4Ch2G+SgFKNYiRkWGIGd0z1uAZuphjZ6wSfI4JYllHAw7Ewhwg+RDS4Rjd3DRzbe0rsmUPWNTOpBdKs1CACdYsC7JFkbmYsjEeGaEmkHMy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LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:GV1PR04MB9088.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(52116014)(1800799024)(366016)(376014)(38350700014); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: +JkFrD2aZMPrhNzNJCim3GGWdI87+Xx6F2BJ1xNj24pN678rMIuwc/C3YYZWlggEGugDU1FtKxjM/LfFP5UnGUdVG4aS7BViIiEjO7MUufGS6ERMMTo/xeMdTYE/BNQF701KiiVL1PyrAGqFY+pnF5Z61Hu8ZixznhJDL6BbyqxPkMld1J67M/f0zlvpnDfH38UnYv9Q/Lw47tRBjo3K8XPCr5Jn5lqReRpBBJ7D+kOakfvrxQmT1vOE8qGXhE6Bg5UD7q63XNBTXaGvPrqyDZZuoeWfdlSHwr76II21QPoQsPECX07ajBfeBJJgTFZmEcJ7nH0zZUIxn1Xu88Z+gYHo+zd9lRWUiX3Jbj6HIMhf1KdsuJmsx7qXzT0rQQvJb7OvdBlsjYVS2JiSRO4GbGGThYJbZDrUCy4UflKCdrYgKepd9GG0w3y3gxhDe/pMJO6Ryfad2xgv4EC8mRLLx4PQrlUkrK6SIHsN7ZYiDVmis6wNwQYJ2g1PdsyQuYDCu/WDe+jJFwdpEvGPWZZDxKRlzw4uz0VHbFX+FZGFzsdW8Mn3hm360hmyLEcZqKF+3ffTPyvZOPIUbvteW4akB4XrX9DyGSiw+amqUHxKMqzrLPB+r2tNH7sBPhJiV2lDNPezNCFh4kG/KCSHD72VI5naCWidsnpLeIB/nmNh/yumxUiJYW/MObeBi4DO2gbn0Rf5AymiELx1JB3hNlefgr0he0GNhezow+NjAsVkTLDGjVFwsqffQwt2YHc+NYvneZY/MA/RThwS8aZFTnNVHk6KcPydfpzEkg/7Li32mzQjc6nXQKNjxzD5TbH1mLqrosNPNHUhzwTlfGSLrLlxYOq3SAC1F5OLOsuh33pT0lSCLIwdSA+/l5KjBlo9GztWvYb3nYlQMsJGxMDuUm56P8EcXMTFKzz7hWacNy0W17hnkTTCvnvFMhfdIM5rfGeTc3x90EOqEk89jXTR8OU+NH3eEclfrp8emvlzJG9DW+0TWl3AgyjrNrU1ApU0R7+0HVaktZYS7BjiB8uFix0W1nnQE+o12lBJnIaKbgUcffJiiEh4P47YJec/+P5M9YQU2j9i8LTpn7L3dgGyLkFlBYCNOXkhdaTeOwdfha9xI+QnOFkbtzuN1T8kNPK4eFZogA7YaA1MREMts9uVMstR69MTSUt9RtW18jQawBnQnt2Pc8Ur2nGKC974+p0ds2RZgHMHYPBiUVNMUX4r/QI4HX6b09mXRbYm5SFneCqAo4eXIWZiVQBeQbwR9LCz+f7AkZH4e4NJpeVzyhZjq+7DguyPueSxwJS3yC8DjDaAsdN74oKWdMilrZipFUBm7TQAPuxKMJljTPLY7zEAA6fZNh1HZ5mf4x72B8V1iAXCjOmsq3XwqCr1mn6SE+pfLXQNEeQdRVStjQZ+FiWCpo8fVBidcxTKlJ3pUJ/rWx6gB/zr1Y2Jq4cYfzaVCBkQn1JNESGS27aRwng3adXtiGcAa3orstxM5DEvMa0o1KkzOqn557rQS/8K1s+qtmoBvnQWYYRDH5hYZZYveXAkFFVVNY9dVZRePSO8Rn0utsBdLMeal6tRVsq178aL4CAT1+Bc X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: c4ee4317-0aa1-4d07-13ed-08dcb1287642 X-MS-Exchange-CrossTenant-AuthSource: GV1PR04MB9088.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Jul 2024 06:17:32.2166 (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: HJaLpvIumHx5w910THRjqHtXhHCGbYuBmIgF1CpL5uA9SHFEfigZhl7JjGh+Jwyz/PjxyAPNVKSjJYsSPyEuAw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB8PR04MB6924 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..c8aca0223 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() +````````````` + + 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 Wed Jul 31 06:17: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: 816136 Received: from AM0PR83CU005.outbound.protection.outlook.com (mail-westeuropeazon11010028.outbound.protection.outlook.com [52.101.69.28]) (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 6C33B16CD3C for ; Wed, 31 Jul 2024 06:17:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.101.69.28 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722406659; cv=fail; b=J3gj49dXDUUe8FzZc1Fhugao6S9ncDrfyPHQ7lzGHLb5C1Y2n21BeqHF8gQqUNbOesS67uQiVajuEgamj2eRjL4Bhkyb1vvLTfFbcPQMe+f+2/924St4BeLGWRRnoQxGeyoarUh/EZLW7VhsEjm/HwBdvp62g2JYanEwZsPcjiA= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722406659; c=relaxed/simple; bh=czaSDfnJVKCrrkGXMQAvEltIA7s3kIsEDsFBSbxx2B0=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=rQmsg9Qm41YJklpOvoaUFPiZzIx8TRRqWgmDSYyS6L1S7jM8ywuXHWqCuk6vYDkb6iyJ4uBJxyk2hc5G4NdiGRYT7uGLikpEBpVNnxRg4JMSqy1IB7SpPbW8wgpHodUtILEAcQz7Jeze5J3dvKJJGf2yYf+Hs7xpnH7APIdIkGs= 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=ZafCGcOj; arc=fail smtp.client-ip=52.101.69.28 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="ZafCGcOj" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=X6xoP9lywF0F4U7gv8alSGzSOly1gKglWPmJHy4kx8TSRk9NmFDxLLz4ms/l4DGdqhvHv/Jqut/iA6pzkUJV+9rBuY1fb7Ig+Oyf6tfxBswW/QIXrUBTMKpLvUuwe1bS8A3NgEI/oeRtroycrwt9TY7lKpMnTJjamAfArTcs++eXoeF2OAY90Ph4EIiDWLtVnsR/f1iHf2U1TQerkJnUPyH4gizzadqjTLr8zQ0k5Tc3XEsK/oXRs3k+Q2+1CM3Gl6+878Mw6RUQZRSumKdIrgLCkDnHJ5Z+de3vsu5X8L1SpGeSkI1BJLljP17qrh3vsNxgpV11xBIrUsshhcohtg== 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=cevWUHCuoaoeG0WKbFX6vQ8o/sRSspP2ryubt4qkiWRhT2gOiCaatsFaS4naAl9MkBBwriu1lSolH7d9HNZl3oc0hYiAEZWlTNXE/HK4B0U2oBPG7TbEtSx5kZ/d5ayuq/3ubZZCY9vGN7h+zHB99HK5zc90T9gbNnZofEvhaAINqsXqB3+79ZMTGNM/WsjkwNIPQjYZNUWLsgvG/Hh+0t4e6HK1Ln4VuoCo2ukiBk1jYgmqU42hGC3v+m+SakWMUY+SU8LhiJ9CeIwJayM1bpNpD4MaiDY+qHWaVci7e1Lsq/2fWHEWp1Fnja/7UNcjf7v2QqIsZjtRtErLQnUT5w== 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=ZafCGcOjjJeNOL4JLnwqYBcExX+Ng80PFfAlxtPwxbLdEt8ypeO6UcI1xSw019BfHpUfghAwVPvotbTOXODbhVOfxykDY7bVcZSs+gtUP/fR24E/mJzJEiN1Xi1H0EY+0iIkI5Kxn85nuMaEp+HTdOQKZpImfPG2rTamJFLZcxmaofnSSqkwVwLGKZ7WIFIo/GAlWwMwxmrZn+pibmb7VtozautWT8tRCWuVinlIy8HbZOM718X8cQPKyrf8GjjhVv4ljOh3hv48bqHnO0YZafCJMfhpZl37kYydv5cA3KsxF86gDr+at5csk98egx2bzTD8Bc8LVedzjdu+eW6fRA== 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 DB8PR04MB6924.eurprd04.prod.outlook.com (2603:10a6:10:11e::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7807.32; Wed, 31 Jul 2024 06:17:34 +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.7828.016; Wed, 31 Jul 2024 06:17:34 +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 v5 2/8] transport: Add 'broadcasting' state Date: Wed, 31 Jul 2024 09:17:07 +0300 Message-Id: <20240731061713.435586-3-vlad.pruteanu@nxp.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20240731061713.435586-1-vlad.pruteanu@nxp.com> References: <20240731061713.435586-1-vlad.pruteanu@nxp.com> X-ClientProxiedBy: MI0P293CA0006.ITAP293.PROD.OUTLOOK.COM (2603:10a6:290:44::17) 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_|DB8PR04MB6924:EE_ X-MS-Office365-Filtering-Correlation-Id: e3a93669-0f03-4f7d-fbc8-08dcb1287767 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|52116014|1800799024|366016|376014|38350700014; X-Microsoft-Antispam-Message-Info: yzf6HPWc+AZ0NUeNYFbOv2gg5OcQaWB3p/IzjgxKRrywFYfUKOVNF7nfIlIpY2F9X44TIbULqZh+Fs9bT423GeofzlrW/CJxBGEHe9D4IPCo15+vbZUR5wh772EdhyfpYHrx8YQxUMXgiDKiwi/2uX8crqSdVe/Frj3AEfbSS4lU5wZaNDE5K2cm0Yw8mkn9NuekeMuuhzRiEr3iKr+xMsFJ8r7mdguTmP2vXhCTcHxHWbAA2st8qq1euUddCOug+9SYHGzH785KBU8YwGigvkVrKia67uTF6Nfv6X3lCulJUG+otz2dpl4E5jsMM+5E9w+mMtfiOiDQbJO6u0XjGXa6/9ieJpYpTMaL7jaBv2qpxElpHFqF8qYzX8cy/rTuUAVkdITtfFINSr0ZfVVz42JsnCvQw7JQe84b8yDD4uITyS6hCk5TVnm/rClzE/8XUEJ8dYgaFxHuKzR3nMF3rIUE4e9SuumKZPxZ+LB8Hw5DbrQdM7Smsf6kj4Sdo9YpPRIu3/Grq2rdZaL1KGygRxchNWR5IqZYjaTFgPGH8bsLj5eiq96kaw0U3WArbEQk6yTGyYzbMkpoPRyNihINBYGgQbXajn5tKD3CH+rXeSNPNywqeD5H9VUcCXnemy0n/KYKwS/LxYK8M+EiIxLV1lgWmSxwYfReecc4QoQntEmTOXPzvo1U9GgREbMP9pK8KN4IkQCsnYpCEklHpTNMlAyzViF0/CtpO/srgVWee0ckxhppr4/rNiFIMUztYACi327WbnnC/mOkff9SoC13bY9jj6n8rgZtvjqHLDJT+6JL1gn75BxP0kE+zZ5oWBDIIoLph10RJwIxzYngnQY6rwF0KZ0hXW9mjPTP6Wghos37cQRaJkQYbZzrOk+hZlbNxasT+305TaLT+mxwUrskJZZ/4mbawOgz0YSlhkd4Do6Y4ocbxLFakpPSrQ+XgzfdIqF+esJLynXPICrVm6XHbne/mFPTdcouExKzg1/fjM+huhSOuLr40m9MmNmgsf8Ouf0COzpB60iVEFWQaIYYsmjEuEjmz85mrpj4ig4QBXKOyks7pMA5lZclyboJo93w67W/gMNXhd8zZdMvk/kk8zKDQIpDSEpbQmwwgGfaea3Pfq4lbzoJpdX/sE6RSw2vqhtuTtKGFPFFk7nxiCT4gEsSWb6PkC9xqWmPp51tElTz0uu7OQ2fb9nH2MV8qnePmJPFit5S0bToY4ryf+VZSo9gtXWO8gbiKOsyD2mVz+5xN1Mp/Fs9d+Lp0+3ZzuOZda8EqGmmwl3lWhZnMRKkPaGGoKBSy8/e7GslJFfjTB3bbp4+la8QOM8sZhG/7H+Zayw1ud0SECuTPOa2XTwva15PNksSxuR+GeMC70e+ELaiNAW1l9NwQxBbh+9LhmTwrfpMjQCKwJilza/TTfXORA== 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)(52116014)(1800799024)(366016)(376014)(38350700014); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: T4SeowVCYpB2wH+NN6E8uaAWd2nx5lFJLdW5CZW838+2hmn6u2uWGVjeS7VI4285kUPQ1TPqDPbAP+K5dGfK2uwP8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xvk1bamvGZM9syLW6Iyci7Qd+JdRY/mjpsPTHwnt+DxclZayTlMCSfiJTjZuXURlQ8wQisaDkK+ricadKRLH+OyNHammGdTP18Ykjf7eYfhjRFrXuOo1jFQ8PCAE/6yFmVPpfbYdCK8BJnb9vkcmc2EyKI1UJlCso898JUdUflYpsBQte0TSNmGIhhR9BEUuH5++dF1G+FTeBadFYqePFv/LuNTnSz1Y5FOODOmLZ8rLR3ZR71I6CnQLW5MptLcEuwEOqxDUSeSb+Xo/IIx4SSahUV926e9HuLGlegP8hpXansFEvQvefIr6CT7wYjua88u22J7lVyiySb1ITq7gvFNDuHcpT2cWGFzpY4mjzt2mV7ZpKKqfHrVlY0vEaAAQhs4Ff5xyMT9T1lBB8uDCv4tBbxwsOPEhLins3xA X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: e3a93669-0f03-4f7d-fbc8-08dcb1287767 X-MS-Exchange-CrossTenant-AuthSource: GV1PR04MB9088.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Jul 2024 06:17:34.1371 (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: CZAA3Skv+SkPTn3UgrQTP7+1HGUr+3+JCzuhLGfKpkirMAT146clI6Hesah1hUsxw0nK7xLQA9BYywn78JiNpA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB8PR04MB6924 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 Wed Jul 31 06:17: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: 816135 Received: from DB3PR0202CU003.outbound.protection.outlook.com (mail-northeuropeazon11011023.outbound.protection.outlook.com [52.101.65.23]) (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 9165B16CD3C for ; Wed, 31 Jul 2024 06:17:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.101.65.23 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722406665; cv=fail; b=JirXrOfD9HYaUTjARVov51orkK4+1M7KInIAP1aNSgHkfQwFb2o0zwWjpBo6uPYQ5w0sR6E7Ml4XThPfOmKmoEF1zlRu2Sp0NpPxijTgYO3hqDLw/R0FgVdYLAHYaks6GpEE3t6Y5+JmZTGAYe9XwYwx+LtYfLxRqZQID3HPy6A= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722406665; c=relaxed/simple; bh=i2kfQu2WQ5PRBBveggzg3EcZH+RBAj+3dkOCROMyBF4=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=gWNyCSGxz+afb5+/8jcSbIdyKZYj5jMlTT3r/qofv3EqZJsJSpTgWXB3nNBDDmXtrwGuM3BH+5gQt2eJLzJBYD7Vp5XE0vx6vq8/tjbLTOeGuqrK5sH+a+Dz0ubG9JWNY5EpUm2UI+agBOcx8g55EbO0Rh9Fa2dE9ZQzSvABp4c= 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=klq678qA; arc=fail smtp.client-ip=52.101.65.23 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="klq678qA" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=O0rS0dCyHZUx2g1Nm4h+iO6liXuAKJmT2S0LVJri5Lj+Wh/5kPHNKoYYgZ6Re8uW53H0z+AuSutXsPGcOTceFIbz4/TkO9ExKs8ZVl/d5v+de+QRjRIk7T3LamK5xN4CyonQScbZqKsmEvwDfvf55KDL6l9sWOkKK0e9UvHSUc16oPSwjIT4jZFGBX5kM/uPCHUi7tCkz3gZTH2r7c7UPAsN72A0t+ww+y4vfwfl86Oq68lZXWzkxWtq2PxL/hWMP/TwB14Vjx5SagEOxFhztGZG0RgaQ8HNtQqzpws18ZiQDABSLq/GFWMcL0cWSkxUZwkE9YnjA8+0lO9nGTANwQ== 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=fHo47cYsqTfi/qxTNYbgk5ewcAuabXPbWlg8EUQbAtc=; b=kGbCKimeCqZY2VJLa3Ix76lKYdHHkEQShHTkQAyJXV/AUhMcWQT/+1ePtzm19r0JC6ppPbIRDXV/W12F+mfNDU7aXrHJJl8AvBuxTijn5JQpqiCdEegOt3wqWdnfUM7y25zuk5QNRdSuyUlBVSoRfziy5bgumnhkTuIQ/iivZbZDWjKZYnthFIgTIa5tCOvFmY7jBZzHyJVw3lJ6QLYlsH4NHtgrsbm3ltL0vjSjHHHVyc6LK2TdmHQ2ypx+NdTxp13qYixqdpMnVZOf1uml/XxCMgZ8n3wLcBaIt2VVG/P6PkxFe5bgQw+aBXoSAKJk9vJqIZk+PCy4PdcNQ7Z/UQ== 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=fHo47cYsqTfi/qxTNYbgk5ewcAuabXPbWlg8EUQbAtc=; b=klq678qA9i9bROER68U7ZE27Qow3OncdM2opI6NbpQsxjP224Z/vmMxvgyn11Yl4dM3ouxDGUYPhBpwO4L17P5JOhmIOBClG+gP+uZaeEAXRN1j/WS4dmn0az46dOsuA4XCmgXmci08jH3eY69Tnn41D6c/SxzTVucBn2JObeUCfSxnKaAdEkSoDuzpOXPhcl9WuZ7KfGJQAyQpM8QpQuuAFexT4k2FnFdcVf15pZ1lJqY10/Ud2yGyQpupL3lg7V057kas1XZPCpQDaujUELPKIKtl5OytQRdsqfmp9h3Xve3jW8SUNgVLwtK09X26EgcWJEWN2ymg8kcGj1uldpQ== 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 DB8PR04MB6924.eurprd04.prod.outlook.com (2603:10a6:10:11e::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7807.32; Wed, 31 Jul 2024 06:17:35 +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.7828.016; Wed, 31 Jul 2024 06:17:35 +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 v5 3/8] transport: Add 'Select' method Date: Wed, 31 Jul 2024 09:17:08 +0300 Message-Id: <20240731061713.435586-4-vlad.pruteanu@nxp.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20240731061713.435586-1-vlad.pruteanu@nxp.com> References: <20240731061713.435586-1-vlad.pruteanu@nxp.com> X-ClientProxiedBy: MI0P293CA0006.ITAP293.PROD.OUTLOOK.COM (2603:10a6:290:44::17) 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_|DB8PR04MB6924:EE_ X-MS-Office365-Filtering-Correlation-Id: 92fc453f-ffd3-4aed-f908-08dcb128785d X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|52116014|1800799024|366016|376014|38350700014; X-Microsoft-Antispam-Message-Info: eO7gLGiEE0oQ5ctaoLVPUEJBC6o/j63yEaOIloNpgUrrxxN2wyW3HUQ49HcxpL2O2WbLNKwkUie/4FuRi6sibaN2RgVbOWL2XgpsqPkwq9fUoPmdvQi6assyiSgMX5uITnHud/i44SGOgAZXCkgdWefRvz5+C0wKbkzqo9bPAc+VDzzn5ubBXUHMApys/IGPpigrh29b3aiGlW0egPe2Tywt8oThsVxyyt1yv08Xh9JCLktJhdrbiOsDtRlPUbWGZGKOVOWES7Boq2eIlm8wy7ZnSjM0CjPtWegfmk+FiwduQhxIYFXUeg8GOGW1zL45yEzfufMNf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8VG9w90ek/2RtbhHbmprrvFeMw6Gvg== 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)(52116014)(1800799024)(366016)(376014)(38350700014); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: kKRB2shXyFlH9cORajmSAxumvaP9LRkA1JL32moK+kWS4z068lXvtIj0VD82BA4yntH4B6H8Nm5usyli+ELOsN+DDQtkTz81CDkgipmKPHIF9ixuTq2/rHGv5rGONBQ7IVxoXXskOJjs/daU9aRS8Z82Ltoc4foG2fk8rXpVK0YMChsVxFDRq85vOYMLgf7wmhP7eauk05BAzegmIYWK9jotaMn8sYTjMYqGIZXGv9IJNgB6OhxPhDiuPevUUakXn57789Y59TftwNHb1FKKbsPtCd9OEk/9QhyCqJNkP05BCI5MvG4xa24t79S/f8yvsf7t94jArcXhkBcbfXJUun+VgTPYqV0EH0eFeCtnRuNG+GXSS9MewXy/wGxf4jAYQ4WHX7wRGbAgvmS3wqlrX3d+tyVksWk3SdX+jO+S97xOFDmELPLXghmrEAWCuzcgmL0OgtOOA+UpkpN71QTC6TECL0KF/+KMf9Tonc7vrGXPwtDXuCpc2P39Ze6z25q6KWt31cphwlF4hBsYcfJvYY5bY/pQhIvYh03eJIKV+siFqHaxz5AU6LNjY70LskyPvU9i/ThEPp7bII8nOOusLQ3xMVDOiDGr65nQmhh9nILThBfRfTL+RsoRvfDwiZLFl7EZwYuKVNemN3nWEP+bJgoNHrYoGmBMD3zAXfLJQv6HGvDAp5QOwjO6GrqWQel/uWB4kjkqVg7pIJ5QaSN1WRfPjTYxg51gLuholT9VsKfWxOuyxGk5cQmj6vfeFdMXjUwBxDK1xAjQJasVMI6lm+lK606taIfe8SIRhicgV4he3qf2QN1NRKJQgkBsIt0YSCwkouWrdeqT7ot5dx+386dXze5dpnBRyNvrv3HdzoiGyLW4papJjeN1CkhlGtCpBeTEaMsuckYKJQLX0XoQAir8StjJVCOqFeNAPtUP5yPxIEY3HPXW3EKFBJVGJBABi4No9UaJc61ej8HHcraq6u1D0IUVp3ADI5dLlDaR08fxHdD1dcNh+k+jXO3y/heYGzX38p1Dykj0W79V+ychOSKSvY3q39/wexvhoHV2+2L/Kwy5d5d18szNSXg29+0F+Hd8mQ0Pf/P+ROftlEoSNH/4lkhOmJeCK070S/x/+TNP2ej2rrV1mr2Z+4T688tZA8zDwjvcEKBT0Mj6abugaTq50BXDWQ1EbQJl0bA3lkaWAMAWuZSNsPgsseaaEXu/hXHEqqjR6VPKTQ+grEwmLaXnlDjEp8NbjqGZwcpWH4c+Aow/0CleXnXUifIP2nI13xFgR8jHrBXx9ZkQmoKOxFbN+MjjELPY/Q9ix9IkSUs6q2YgrC7jed5ZmMbE/czwXqOBeNZgqsoNSWQ//eXo23fEJAUCbg6EEAdTLqDtsnDP3A540D+kZEIq9AeD1OPM3jDfM6jg1fB8P14FdrXhmUBQE9pBIst4LIsl39V/Fh72s7b1uMfSTMYygptFKnqxNcJ+6cK0S+o+vL+2a1BGYKnCwL3z6+qXgIrZAfdrS83c8pXqTNrwDjYGYQwrDDQPB3KW7jbUf5MTx6uCqk/0WyUwj/LuTJOXEWM9OzTS6bJm3EqTF4Uwa15IVcmzRvtR X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 92fc453f-ffd3-4aed-f908-08dcb128785d X-MS-Exchange-CrossTenant-AuthSource: GV1PR04MB9088.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Jul 2024 06:17:35.7576 (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: piw+4FMIQqYeMdj9bxkXVURz5OZtpHSpUePSq5kwRJqNu+Pdh//H/srJLQFonLqfLrUATMQvUfHWBYTSWLfLjA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB8PR04MB6924 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 Wed Jul 31 06:17: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: 815754 Received: from DB3PR0202CU003.outbound.protection.outlook.com (mail-northeuropeazon11011023.outbound.protection.outlook.com [52.101.65.23]) (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 67AB761FDF for ; Wed, 31 Jul 2024 06:17:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.101.65.23 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722406663; cv=fail; b=l/QukEuvrehEwKYAQabpJztZZ29ddyO1xnqxBEuTmqlAjXMo5V041AgmuiNTE8QMzj+ViQRa740sFsv4asfBnbjURSGM8g0UaLRsx4ejWO3JuGLZxSteN2kO5c5DkgUclBbiTSZkoo6Nb3sCds/5IvxPxbX2g9D1K8qe8G9ZIfQ= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722406663; c=relaxed/simple; bh=rNIo5OWQs61PsCa3zLW8V+f7OfNHAt0kvpg5D+nabvc=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=RzaLbHQDACLk95apd/PamMDtXk7PpYovzW/ZqlA1GzYRkFCo+LqhiG4vW/ymGGsg89CSai5YZeVAQg252uTj3H0SyusXpsK7hXjfGgV4IsMwXI4xBSx98cJfU0WxNDIezB37q4yJlwxVy3p4pZO4K0FmBZbXeJ3lFUg8LyLmS6g= 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=hZV4DY7f; arc=fail smtp.client-ip=52.101.65.23 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="hZV4DY7f" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=OrPYmUDSZ5jFcVU07QRRHCmjnQ6jEvfTAE/dtoAYSDPGxEwgA1KhKZVUeSWObHEYLA3md2kflfvTXkaSLtH+gKzt0ebTpCN0tBTQ0hI3ZmzpfiGST8/51MFH2Ob/FUfZtk6JHEDWRmf6FtxQiYOiv7nUsQl9QC2gYmpPTS2ugqI24SOM3FCjPFOj2WAmJdy6OW+pwKlryoYCmZ9qPDlIrFMN4/9JsIKZDnMT6SwNSgVyCpOFw9bccZtrrVV7QelQ6cWYvSQVdpL1HsB1+/Rz6tf0bz3Z+NJhOaca8ZMPCxq6UGmaJyt0lyHH3sBimZCIhlJhP9qW9pH5yqds1IBrbw== 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=9+giHDWoikkt2JNGPn7WQM9DpPHTwYMiK7KmFjbxiQM=; b=Ku1uH9cjtjvsRJuDJNhti1t3QzgqtcwzI8x4LR4V0lNNzLnIzLzijUIjLQnryWeSAT/HFnIDGJUxw7kzGMlw6F2OnNtaQNU+KsyxlfIAIDLhC5AKbcogfTC6HKrw8c302Zh5YdKIZB3ouBFGxnro0RYrvq/hTfFCY3JLWmum1AN+Udv6kHbpYE3AyhXdX7rRgGuThgusl18OdDOOG/BadNMmaKK94c1lH5I2vYpDluf/SVl+UuWqwR6IdGlKhLlMbD6FTpWSLPCj9sr+3J6/OyeVMp0H4MsYBg/gO9Z4WVw29+5VBe+IPnhvkmy0foHGrzxgjdErQWSX/bQ1CcQIWg== 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=9+giHDWoikkt2JNGPn7WQM9DpPHTwYMiK7KmFjbxiQM=; b=hZV4DY7frcmWSbTcsHrU6rpqRV7cfOLgD3Y1miICcwzBmnnwe0lI52fOZuuW0EUzJVfdoyEl4ksRzJ0EB6HEvrIEAFN9Ee7A85PjyJuHWp0o860gNMwXxyCfbrtlLZirnZuO0CZByGYdj0Mi5LlSTJ8Ng1Eb7Y5SZLuj4WZVz1rDg0G3vyX3jXfhrLBab82Wa0PZT8UgRpf5BLgvmDrynjlmzGWsgu07SaRhAvu6i2b2HXk3SYTfUv/j7a2gVK4KNWogvsxwq1j/TBIufUMwxtKxuvhqaJgRGesX7TCt53f7E4gXMXh5XUH5P4IP7u9spSPWpgTmoqaTrvUFefZw9A== 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 DB8PR04MB6924.eurprd04.prod.outlook.com (2603:10a6:10:11e::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7807.32; Wed, 31 Jul 2024 06:17:37 +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.7828.016; Wed, 31 Jul 2024 06:17:37 +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 v5 4/8] client/player: Expose transport 'Select' method to the user Date: Wed, 31 Jul 2024 09:17:09 +0300 Message-Id: <20240731061713.435586-5-vlad.pruteanu@nxp.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20240731061713.435586-1-vlad.pruteanu@nxp.com> References: <20240731061713.435586-1-vlad.pruteanu@nxp.com> X-ClientProxiedBy: MI0P293CA0006.ITAP293.PROD.OUTLOOK.COM (2603:10a6:290:44::17) 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_|DB8PR04MB6924:EE_ X-MS-Office365-Filtering-Correlation-Id: 5cb3b976-c2af-4504-ef7d-08dcb128799b X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|52116014|1800799024|366016|376014|38350700014; X-Microsoft-Antispam-Message-Info: vTpvnRSVdSawUBXqebm55nwY0TaFbTsZpW9QTpvIMGRyzGHsS/alqEdgSYJIpCmElDlYeYWVD9qc4aELnsLpkJoEeqM/YnV20mskGPsFIOu7jda4RvI+dZGeFzpaGr83kk9X+DEsi73wG2qfbkNrvq6y3g5lnfzMsV47dIsNStpO0ehSadcb2qwyQkqzMTLhu3X3vGnWRm2fWP3eeT00NLhfEE2ZBEjDGUxqlktHJ4dlV1Tvm5wTPIUj8SsChEi/WVQ+zSB5UKGiSLa/yUWusYRKK4iXHW3uooGQRqzdvKJiHxkLERJlPCSIm/SMPt0euJAUwIsaO5bFHVQcsACR4ySj3nq+dRUk/K8wClhDPAhXUo0xsMUBQDauI/lG28/LBoJmSmhyqrf3cO1DL2o2Ll5jimuxCw4gp/pvXRGvh1ycE2MeKcwMvv35lyHdg8NgTX49qkDPnf50vmaKbYFJ6cs//u9WXpG9TM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040)(52116014)(1800799024)(366016)(376014)(38350700014); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: Yni0cdlbjCe2S0XH3dzzez8Ow23lREglaxRi0wQNsmubQk1EY6eIeLMNqu7kj0HKY0eAlbUfsd5R3h8Upix8ll0hDJT24QLtS/6dpxcIREymFw+sHYhbT9+E4cK4cu1NBI5mH/ZwowF4B37jLp4F5D9XaPKD4xTUlgZqIzorh0SvSErQN17Jn5GB3Go5lP1wGY7I3l+X4c06AGJQWwtZZYKZefXxqnVbifXHeSC6rzr8Ib3w6TtE9BfBJrOU8ibfgCxvd22KSb+nuMMlvrb28qO5EfZlgj7YhxQnVibBWuEyLgxIQlG+9yiwftkWfumIeb1kHv2P8YBFZrkcFlQxFHF3QWyVWOAehot0PeHmMb157plBIdtNPnv/apB368yyY3QCkJbSfpB+Dg1zMBIetkzXXy89yYiUp+UntmDuuygaEmKaBDsye1FEx5uyN+1A4mei/hVwkMmUjeHSeDWlO8C2yrH8LZw/QMS6YOVvoM4WKsLZlWO8z8w8w1hcvXGE6nxRXv0Tp0T0ZWr0TR6Xd70pHqftkRkxk26HKbdSOT5NrZVMfCF5+Stbm/bsAanpUyHQpBXv7A7GMQtF2ks3dkD8groSATRRERx3T6R+ChITze7Ws03Xo+r1Ps0HkRkMpQ3YnMy0lG0RoXK9uw7+DUTDh5oljz5kqpOvy9ogQtJD5S42sRqJphUb2X5Na+gWev0KjxKPgJx/eJcKTcApSMumv9Yw8RCBFafqR8tX5Egr8/SS4ctmZbuzsNIWrZXIhQ0QePUj8wOTQRUgVP8vhZsXbipMigqzoI6HQNkVHYciFpoDAXMhy2S3PnMImEZKJ4y9MAAYVYDT5M6UIZAtUB+epdGQ499bOQT0rcD9BFfMniv1PXqSn9Rfxtjv70leQ9JWgipfhssMRz4r1rrXAGRM2W5j2mYjTEEK0ueyOHw8guPOBsEHYqhMRk+xOlFmrnR5itRm/AuRLPl2iPf8i35Pnos8o/yUd8nn5mChsQCI3KQ1aXnhIwIETSpxszqyqSFPmJ0Uz3+/x6g8k1WHiMCzZAJItPh8gSLGXJQEFnOUyA1JvwZi/VktIvnN2bj1eXpJmBARLuh5nOcUEOqKjbz6v2mZU+YZMQVSPDVrUnQjB62YIAhtMfBPpBXoxf78QPK2bbrWDugFEbRML6Sa8vT/ulrIVVj8DWKGyHCA3OAKoSE4D1QcRy11069zHZ5AaPCCYHAWSUNWTJq5X/R6m3r76yQ4iWALxDFNSK1x3unyeN8WfLaAfpFxtG6N7W35Xgm8939uQyQHm+jNwh1Z69eoFgAS49mXGsRilrvad9Ea3TrJM2xQusqP+B3G8XOFbXr+rd8eLaYYJFT9hxaD86OoqBfISIm7RUkj3dg+WVyPNxoXJ/alMQAl/OD7imiOFAykzUKmKCck7mD159TQNOF1amzEkuR12A2qf7CJKbq8ERDknMOyYMqTwGwM7KJjMy/+UnJQcQcB7AsUBjrnuEM36wUA4v8FoDMHaNzyfJp66uqpUAWXCsKLt2DFeu0tJeb8o9rnERn2JoQcIDdS6ebfjshlazDqz0SOFoxjbvjHK5EU9r5VuUMmzt7q/j2N X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5cb3b976-c2af-4504-ef7d-08dcb128799b X-MS-Exchange-CrossTenant-AuthSource: GV1PR04MB9088.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Jul 2024 06:17:37.8373 (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: nEWAZywebOMMiCPXX6WdzRiXFwrh+Hxrrno7yK/DyPiOXqSOh0T8fDmMFxGy/IPAb3taZPb2DscEZlUPFWDbAQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB8PR04MB6924 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 Wed Jul 31 06:17: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: 815753 Received: from DB3PR0202CU003.outbound.protection.outlook.com (mail-northeuropeazon11011023.outbound.protection.outlook.com [52.101.65.23]) (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 AF48A61FDF for ; Wed, 31 Jul 2024 06:17:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.101.65.23 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722406667; cv=fail; b=hL1FqkqRIT36yF81LeQxYoqv3M3r7nvNAMqYwD7nxm+2Pt5nX2fhxfzv4O7kxyYpu3PWV2VvO6LL/jSL0QiCVnBFROK9nLgieEl0Msc8ZUZUPzBQTl9RTqBiEnO5uvcws7IPCJtJfJ7jH63wcDICbRhrwxsMbG3Rr2JmEMTYlGA= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722406667; c=relaxed/simple; bh=Z7LX9XM2Amtl+uR4HYCOgsS/xgxyJD7PiV9dN5s3XWc=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=p3DQatJqbNRJeoLzwYO8RhxkWcRlKdOxwTWqnv6gAO/YObmFdtyGLjjfkT3dZhFgDeAyERambxQIJ9LKD2TrekzHnwZm2x4HnaMV6dfNI4Ab58hZ5SDU9uhEBa6/svyIpioiOrozHbgIca/Zdd9DmngpiI9eeetYnpm271DIhuM= 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=XMEJVMkA; arc=fail smtp.client-ip=52.101.65.23 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="XMEJVMkA" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=KMOpe6bfNR0VetBXwq/xJcETClBCtTdCiKfAhiex6wdJ6UrINeeShtBYRVTAi5QuArQn8Yr7V+TOJrDGdPFn4zoerwZqMjX0BWZxOa8V2OMW6f1a+l5LCCOF5nIDrvD/HwIRhJiRPBjE/9elb/o2Jr7amWP8U74gtybxcodBg5woUZkdgLqx72qFcJjv2rfrD8i2DlbZeoCoWOl88TPVdZefhf8ypjzUV4JctpSHML9GApNP8zgWfTgMmwoU7ObRvXbUqGlqNpU8sKQmN9dyha/4m0xfaP2N2rD4wLNqhM0cARwj7xsruCHefMaN60xuZSZSRTr+GEtl/3W6z7Iofw== 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=nnSg9W1agzPG2lbIPB022QGOrjw+393VJocWPfYy7Zr11dprIb27/lAMJV7xUrOVBWwPiQYN622n47WeGB471zuzlTCLo1ynPHZ9YvIiRAufiN2H3jtV10qPWnec/pX2BBUB6GBq32ofiYYEuS75oaXsXP/0Ye2EFtxlcsGp62sG1K4p4mq1ZSvLVF6UnGdPJhe5gZUbmtcf4h83UFBPXaTG63xIJ+kdAF4aN4JAFFvB5SCpyPutsOW6/j1kn9s5YSE7f38fN+V3qwfDZ87QShHWNdtOJglyNNzeHftz4Ab/6LxrH8lRRuoFylYC1BWJVd9tCzSZ8pTgkYo9ufNp1Q== 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=XMEJVMkAtGkDtrA/qj8831YoIfGk8AqEqTG21/vuvsClgNztU2CqM+XH6tAXe5BJ0/2zey6DVS3RvQiU3DW0T1ozn34LYKGWngzP+TD4yQ0bdxIzG38ux/a/CokNv2vVbU+f4x9GhMtrgDyT4xnRYSZdMTOnZsxeH6kp27ZUhBVM3ur8ng/E0/ClSjI5BYXoZcmJJ3+dze4p5PbDJcHXXj95WwToj07aOZOtoF1SSHq9tB5+JDxjOGSfl8jQyHVIK6brDIdWxOBbDMbVoMUdCKA4FbyV5ivnkmcsMYUuRnp0h1reJ030NBB4n697NqEZ5Vsgd2as4+NKXacZLoe00w== 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 DB8PR04MB6924.eurprd04.prod.outlook.com (2603:10a6:10:11e::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7807.32; Wed, 31 Jul 2024 06:17:39 +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.7828.016; Wed, 31 Jul 2024 06:17:39 +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 v5 5/8] transport: Broadcast sink: wait for user to select transport Date: Wed, 31 Jul 2024 09:17:10 +0300 Message-Id: <20240731061713.435586-6-vlad.pruteanu@nxp.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20240731061713.435586-1-vlad.pruteanu@nxp.com> References: <20240731061713.435586-1-vlad.pruteanu@nxp.com> X-ClientProxiedBy: MI0P293CA0006.ITAP293.PROD.OUTLOOK.COM (2603:10a6:290:44::17) 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_|DB8PR04MB6924:EE_ X-MS-Office365-Filtering-Correlation-Id: bc8f97b7-ad44-4fa6-bf15-08dcb1287a91 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|52116014|1800799024|366016|376014|38350700014; X-Microsoft-Antispam-Message-Info: LtVtwuGr5+HPJD4GQC+MJKIcNhRm+eRFcaKIp+dY5+TU87hHN8IZNzygbMpUO4YCAXZzDxhdp2gCHzusuhgMcpj9gJVwPcZNcNEkkkCKESIKQ7doybGGcsxNyug5dSGD1UrYtlwEu/9j76nD+k0z6O77+GghYzquYDSvS8D7t9013Lw8vy96ASTWOoXPdECst/l/4JtCPXeiVg3x97dubKCx77iFSggtWJr6Sf8y9aCRRZ0j5yyXx0SNrl7237JQE3dCGppQ5mPJ+PgbYyqMsdwUJcWLhBpMa79SdymSJr1Afd980BWDPZhBCAKqrEvxNrXlDICTaotRqT0hbtcMk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ront-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)(52116014)(1800799024)(366016)(376014)(38350700014); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 4L/1NtLXcacO4Zkv7BYoFHSxcaXftsamjWq0vthCl0heMniqHijazlnyRFzLkWxgRQA5m4MyNp27n0slMJQys8s7/FgNYcRuPkQUnPKD+G75iBPaZ8oThgryT+AjNVmKwyxxB8cWjr35mOp9x51vMJXrGMe/VJIrM0UqUiq9Ypc/beGnp257K4xNTlMCl8BxUkdPVK0nNEh5arnCgWF/NIUaHxeCiUgp1WtlEjO/ZiDXPV2KVPyMCAkTQKkAbJHt1V9ctqGO8TeWDSET3olXNYPkO4rKkg9pVM0jxNNxwBz8PFfz7qA3uup6ebgYugDTfTwCEVUT1iZxB8wu9KWRFEdArdxr12uSV5l83pMfSEeVIZO7ZR3yaY/AGXaXlcwF0bQeDrfgIUhaJrcbv7uqC5jMrFxXkV7Zso28UOUI5/eDiMRUqzbUj83DeOnLty/EvzMbDjJeNbMkeWY1NVhnYkbYiBitD9cb2CrBxJH2/47w77uMq8wazKwHHy/kZOLt4YLfDfsX4AJ7tIhPw3F9uDO/9w5EQujUQynx3Vb4yKwFWl4cXkk4VASpSW12+QYc8AvReFImQ6HYP8pnb92CqTrYMyJ+12QQupD4FEzy0/obUYACheBZ/QeuBuPWUaT/jlFRoUG9iuNlwt6Rpu4OedKrx+9ID3MZbIzOwFgdYHHoDF9JeEQrZyn32WMYT1wAQ5mzVZ30odLG5MZJd4q0URHYxCf+tTaaRP2A12NOnI+u3QpXl6cgtQ/zwmTYYpguZ7S+bb5R6bFB4rZPofBcPc0vRnJcNPfYXv5C1eW3TG0ZRlua0QOjnpegCNcT2yIBUr/x3wbqaWp5BMdOnSQyikm1bTeaybRrzI0hhXlgB0Y6E52vNPg8JQdg7xiZgj85l2CGUSM9zrXq3ZNmvluHT4D+gwr5OAKt78tcr2uZ0qc5xyFjkxzzfHeZCfdhtRlsnjt523/zj3/SKbgE+OQTW+35ikYX2oXcunCYaBmH9FopsF0bqzPpf+SMtXHLl8Vg8DKo/4B1NR2pLB3OWlbJ0jtsZGZb/OChWV9dNOxWLmqHwI8eoK3FeERe55iipwpGl5WFRAcxi3ZoWlvTUdjQLy+j3S0R9WIVxH+jP18yczDW/AawjvQvGZkPUMlCMtlnhSW/Bv5wsDWu97x905jxuXUjRIpVX+iL0k68U0aOHTV+MYXIMehGvFs6tIl3S0IY/7FBHLhpC75LTbvBCjK8P/O9T85FACkgxz44U6nqaX/8cc2lAZAIHDJ1/e271MUgqxLhG3TCLZft2kyzypBal41HxJUNEgA/wjDh0bBtHGYkXxLhrRQdiNbZc6KyeSEgVAkKnE0PpBQsxve/3YKUmzb0fHZlP8LPB6RgyrQ/gANnrQFQrP0pfQjNNgmyWjJmeO8PC5YWelOajysE6tYATKvHcCS9+ZtvRrM5BwjxWY1tK+MgzJGlrVdkdfk9XSp7puGfschM/ghOo2mjIQwe+EdPgUkBfP7ymBLV40AMBEOFMxwVIB0culnrJPOoLr98zNcfXK2xCkNw4EeEbQEz82rSJJlz/F4vnLM+5QPNckNRXvzxr8h6htMS/SyeMLGq X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: bc8f97b7-ad44-4fa6-bf15-08dcb1287a91 X-MS-Exchange-CrossTenant-AuthSource: GV1PR04MB9088.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Jul 2024 06:17:39.4356 (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: gcuHM6lXIVJYCew7DwhkKPfmHC1OFa6JNPCdsTRWll9kM4NpZAo3G4RyBtugxe7NjSSrdkrC5MZCZWZ9IoZh/w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB8PR04MB6924 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 Wed Jul 31 06:17: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: 816134 Received: from DB3PR0202CU003.outbound.protection.outlook.com (mail-northeuropeazon11011023.outbound.protection.outlook.com [52.101.65.23]) (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 B7BB816B394 for ; Wed, 31 Jul 2024 06:17:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.101.65.23 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722406669; cv=fail; b=CDMISMSTHo00G8QSYZoSkniHJF0VZn8IDqFWQOsJpKdGu8pnhCucH7sD+vAeF1Vxlm9fR+dgcpIWi1YI2RUZG11BndXl44oC0kmIh6K2pFbW9H4aH1Cbd8mao4MyfjNG20UR1yJgalPIIErnLipSreUg0GN/A/owLlT2b5FTow8= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722406669; c=relaxed/simple; bh=0OtKg5DKlO7t3OWN1Wy3w9oYfi+PgVLMxuusAnfiK/Y=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=bYqTdBcsBbAPdrZoa13nHjvjlXLkTGKpehnvf/U/ukRqbj3xSr7ykiJpI8uGII9NG9JIO+BVNSUCPNU4TkSEznfZUlphyBYh8yJURcJ6t1CIne533+pSxPLrETTHa0pvKTJxRcKIAldR+iPo+LUGkQDhow77l9mrXPoP/kgsmXY= 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=e4b4AJyu; arc=fail smtp.client-ip=52.101.65.23 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="e4b4AJyu" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=bJmV27eMinuMmUxfbuVIowZ5RmIzojb4pCUG1AsU4adN3p/lHytuvLwlloPx7sNeyUldb5ShYE+Emv3PmwJrj8ki9QUzJ1ZRCBnpbLMMiEVHAmfdwcV7ZP1rcl+jHTCp+Zun3mUPbK0O0zZMsJAzli9+zQp0HA2tWMt50W4ahLaxAeVpC4DadErAl1jn7S67GbjBzcnB1YqDNUV8m/bk5x0jkDP8eDwkBnA206Rm9/bBrEonpKcM2HWKi1LOG5W0Dkxc5ju89y41+B3QCDKgc/PfOEGBoFGHQD2tZgE2Zti33orT1WZN/2/R3mLRd8/V6fJs2Zems+IGqgQbuwcSAA== 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=71Oc2hhYsm9KaBoSaO5F1WB5GtRf+S3tqkjaXkhnF4Y=; b=BJNEn8+VS+ddLXsIFWAa2C+pvc/3BDcHPxQWiOywZduAaKctXlTCEmatshvHDGD9EC2jUOST9vOI/A8Jxr5N2Cg4DMTqAXNzxGJy4nGjW4gtdxYfpEkeDRknRha9EHIHD4IcI+wwvB77Xf3bCPH4e4nAUgtf+TxyjqJLta/y46ZoODB6Fsco8CiRZlrFIzYCiQlFpjsugOt7o3anri7Mnj8XI/5OMNY4vrhAm4tnb719CxjKd6D974yzFaVexKp0kqE7FfHs8nIv4A4QSKPDSoZQ2HqSf66Qgz+xjZLUn1aS4MlK5jNvYIMgbRmwvsMeucX7fapvCLwL8oo3NA8h5g== 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=71Oc2hhYsm9KaBoSaO5F1WB5GtRf+S3tqkjaXkhnF4Y=; b=e4b4AJyuJUcHrYdDKkCPLAhLW7yCHmalg4gBbP8KymodhswOz78olgwyLWsJ+rx3Ib2nvpSrGakXhjKx0lC05b+b2GqUmtxSiQh29IUBZSwP6DFJ0ERwyEd8HUaVqKYSUvRZrAdhOLzEzccnwsjRh2H6DxbDeLmrsSfC2aBxWjcR3Qu90cubL/JYZ/B2M13/yWGkDuSGsJbtrAfd0DIctokYVveNkQrOh0A92XoNo7CC1dl4R6G6fDwQcLysssytqM61U8Xrv758P3xwF3TEug+wPGBppgsepVhUbmNXqpbamQrkaBWX0OuccidJiknzvlAD+iihvwOyteDDQqqMoA== 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 DB8PR04MB6924.eurprd04.prod.outlook.com (2603:10a6:10:11e::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7807.32; Wed, 31 Jul 2024 06:17:41 +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.7828.016; Wed, 31 Jul 2024 06:17:41 +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 v5 6/8] doc/media: Add 'Unselect' method Date: Wed, 31 Jul 2024 09:17:11 +0300 Message-Id: <20240731061713.435586-7-vlad.pruteanu@nxp.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20240731061713.435586-1-vlad.pruteanu@nxp.com> References: <20240731061713.435586-1-vlad.pruteanu@nxp.com> X-ClientProxiedBy: MI0P293CA0006.ITAP293.PROD.OUTLOOK.COM (2603:10a6:290:44::17) 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_|DB8PR04MB6924:EE_ X-MS-Office365-Filtering-Correlation-Id: f9f51bad-6263-4b20-31ef-08dcb1287b8d X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|52116014|1800799024|366016|376014|38350700014; X-Microsoft-Antispam-Message-Info: czMpa33haMD+kGfZFXfNUEd+bgizTHrSe4DfJnKKbreNVvhGJopfd7VD+JPuHd3YizX7IVrckQrbfwGMICNkxNsHJsRZ0GPnIyheDgeGOddXzTr9jER4e1fAWa6zK4AO+2iqX2lTJKVecEhfkLUcRBAS1yZwZLSeRLZ1bV5ZwP6ayaLUo2L01AUgVYL26b+Uu0yLNe3rfX9ytllD+SfwbG3tStpJFyTlrb5WWMgq28qJ20OSdkfeTuH7gNCJBjeBAdB3nINQxQJTu3XjIozLSiJn+HSswy//xj7WQpKFjVPFIN3bKpEpJfNhBKM11ZlNrAvrm62rzj4UNBqHTRHCHayZ2KF9SgIOqW3fxvJ8KcrppH5bfozXAX9oPGk8kSDrj+lrEnJppNyjbewz4lpL0zHihGL75VlkWDwbARTGkWhKMSryBV4d6nIayMcFUHkIBOR8jwBp1Eqe4GekTuZ4DbAQHUoj2Jd1qSnl07xzEkXL4Tav+4XEhAYPNpn/aHh5GhRqvj1kTteXfwXXszT15Kv/M8S9kUPiFh9s1kVTrzvCitx3x59vzFhCKGmu/1Zhl3+tDBR3pNWDP14FRbmMdNot/AvB70AVH0smvnYPrfsX+sjIPphKOG1Xn6tXQDr3mGGpLetBxjOghBdCGmaPXUNmy2HtXBvomJGpOgN6EWFF8k2B2nkPL0f0X/SI1XU/5RP9RJw3NlUx8ociz3cTP6ust8pLJkazxDVGySSN15XWrQaLz9j3jnXFarpB65WQp3efVEC7oZ6wi02Tp7VyxmjWsa2o7WJUDZiurMfF3PO5pSIPzNecaNZcHc8LIVPsUNCXgfGfgAtcjgp3qtleHBQBJnwm3aGt1nIqCRbEuuGBzcBHEmYN2fuW78FHBdOup/L42CknUwPDJoU466O2QmC3gVyMO6/6NH3lEUuDWovEZnmRMOTR7Mv55fsq37PWdmEnp4HRwz7tHWxnUakP5BLaBZshgXWUZ+nx1RbV0F5BmdXLC6fVF2Z2jW6OOiZMUgoPKxFSU10OTKIpFEst3tCkDpBDcBmJCf8x/44DS62H8PlobnQz+65UkSLPp+CK5YUN+2Xx2zb+KZixvLiUSKu/Oe5xxuhWlx/j8nciSd4SEmgORyuLFVmnTcKorFu33Q65ChQtXl6+xoxg/8SDyXXx8vC8OZ9fk7dXwxRSMLxK+RHvemZ4v+L3hm6WnvBrmJ/R1ieG6Adjna2MTwDLtVWZ56y2mRbmBr5IB72aVHlO33PzOMJGKj+H7fN8Yl6TvdcWi6eIWmL9Bpjo6++/M7e0zhEeF5tqELz9O3yKgWeMys6qN6sSTbsfLYPzXLNoI7mcAzLWU2IkFz0Ck6/XHojW+x01wM4ScUGbnnUnTw6LoYMS8E2AW+Zp/N2fIBDWYFUeHSGGMSoTdS5SHTmasw== 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)(52116014)(1800799024)(366016)(376014)(38350700014); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkC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QQ929mLW+OJZAI8SSReYg03FceHwYoDc2LvieCzhar+MwsQIAHnWi4kaOpR5EHoqnLWbMDESakNlE6N1xUjGFkfYUOrVPcspYWRFxZzl9C3qWiy57wnecBS+nUz45vzxtL3M+7n7pD9bbX86j+Tpc3grgIVuxKkrB8pr1NXo8pK11+9rycxRk3F1coO5trT9Yy2d+wph0YLh6ngKCMRaYW8eJgN1IjTIWXgFJdpcCbUfQCVIYE7ri/+V/0HkZPRuULkHTKdeQ8BHVQpNLcbUzB0l0GJE7N65a6FMgl19zVvMwjHRCfA1oC9IwKleNOOb/3pl/lUAQYbBbr6M2VxDkQ2kA5egmVnQXQpfQyCfZE6+5UZC3N4CnAct4xDqreFYUBbumcNygcUlhWB49It3JjOXky3dbriCtL++isbAU6F4JmGEhDBSrKskyfHxoEqvYWtEXKiGQ944d5rBrhxa3r6TXVztZs49Y+y8V+0Iui+yMXSmNsiCq+OX/8RPBKtucGg0ijN5L5Bx5q/QpGX1hphXj95yNsOdk7xlponkxrAGrb6dkP6dUMey X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: f9f51bad-6263-4b20-31ef-08dcb1287b8d X-MS-Exchange-CrossTenant-AuthSource: GV1PR04MB9088.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Jul 2024 06:17:41.1739 (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: XBjualMP531RbZanESM9NCCeR4g8aL9pIuQ3axNa/q0f4xO3jiNQbpDyhFotmR9/VYzM25ZcsWR77COgYP/zLA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB8PR04MB6924 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 c8aca0223..eb3e04ae2 100644 --- a/doc/org.bluez.MediaTransport.rst +++ b/doc/org.bluez.MediaTransport.rst @@ -57,7 +57,7 @@ void Select() 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() :org.bluez.Error.NotAuthorized: +void Unselect() +``````````````` + + 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 Wed Jul 31 06:17: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: 815752 Received: from DB3PR0202CU003.outbound.protection.outlook.com (mail-northeuropeazon11011023.outbound.protection.outlook.com [52.101.65.23]) (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 B482516D318 for ; Wed, 31 Jul 2024 06:17:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.101.65.23 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722406671; cv=fail; b=aXuZfuTyPr44iRlugwOM4ZOF77PcsvafkE1CZkqDagNALBI/ow7F8ULFf7YVJYDfXCyQjXTDmbgIInIp4KZC2niD6XIRnMAumOtuG475fSUVrXVJVk6vcXEII/9ntpV0kAKA5aFqZwGgRqMmpJ9rEief7UyM5AIJwIdqjklAIaQ= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722406671; 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=KMJ+56B/UjcaSkupbLqoPrukU+J7MCLrGkSqGeNXNrsLaAG/2Q9oF22qST6h1/SJ3/w65R6GW2m11lKEqk5Kta53aHCXh7XaRM3a8YZWHuIrzxx1TbuJEBFv/rI9FiHKy3DtdPjHHXWSzRG0dNTB3hOPOiXKNTUagbAsox4Sg30= 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=RA5ISShy; arc=fail smtp.client-ip=52.101.65.23 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="RA5ISShy" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=jT+SMiUOOOXNierYI102DWn6VfSqUtTBNNAK2BXDpMAJbA3RJpy4IdJx7JX1yU/FnR1Q95Kr9uMU2POyNR6rCprF7s59xpPjCNcpDIrrDXTBxqCpScMYjDNrOnc0cAtpsNyaReYkPOjWz910mOGxDHQJQlifeCZeCPCrZjIbqptYUEqEdTNMNcJnpMtJOy1jGokdy2wxfriNC4gfCam7w7ZrKogGpKpIFPhHl6x/aWTDyvDgwyesxDAPre7DujhKo6W6l3Uk17t70YUw445UPihoe/rDTq237IwyNIddDlyoozm/dYf0+LPk07gfXZLEdFCfgytWKqVqrVTpkQy1Aw== 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=GqhSbqDEGMdD9QKvBN2BIa5KRztnVUHR6SL0bMZcv95yifSHBwWl49JRP4u/DQ5GXTNBjrtlt5QTDLppQQN0qGEuij093jkJce/h19rEtL9oTncC5w58MJSEYIkxy7WWCyva/FZsFf7GypcZHOMF1RZxCA97Cd5OUl0awQk5dtB0hlGx2g9SU6y13aD1ZXlTqH3/Uv7O6cM1FEk+Lf9Pm+c7AIL1wEG7CkRPmyxO2NQZ1Wh0RJTc2pF3Ve9xka2Hnl4k0IstY0j+dQaebFKh2pzzDc9A6WI2nOCmDeLlqFjDvCwURk/8AOeUbDwv251P4KHJUm2y7WK0FrV6J1YrHw== 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=RA5ISShyY/72PvHDlFQAONLqpfQZIlR7PFqhG7FtFLS374mCBeAB1yJcyevX36iX4kyRotJRn3qwgj6R0KCnZlQcrdbiKNYCdTXVFe4qVHGNtXwhagWEKwNCA4GjDCaNuS80WDQPoOuD7aPgI/IiHXDeN0BIn6D0Alo2wjyRlU9RBwFq9cSEujBus7ivbpgd1W9L+d6OcdbnNXipravgNbZFeq4ajnEQgogomgx0XjUh9cw+YO/AOFOeRkfuz2hr0rTPwe+z1hbka40WD5JAp+mPcbZLJm/WYJozeYwGH4cYwazic44vAV/F+Xc0V1Wu2rGRgfeaKl55OSTurYwHYw== 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 DB8PR04MB6924.eurprd04.prod.outlook.com (2603:10a6:10:11e::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7807.32; Wed, 31 Jul 2024 06:17:42 +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.7828.016; Wed, 31 Jul 2024 06:17:42 +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 v5 7/8] transport: Add 'Unselect' method Date: Wed, 31 Jul 2024 09:17:12 +0300 Message-Id: <20240731061713.435586-8-vlad.pruteanu@nxp.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20240731061713.435586-1-vlad.pruteanu@nxp.com> References: <20240731061713.435586-1-vlad.pruteanu@nxp.com> X-ClientProxiedBy: MI0P293CA0006.ITAP293.PROD.OUTLOOK.COM (2603:10a6:290:44::17) 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_|DB8PR04MB6924:EE_ X-MS-Office365-Filtering-Correlation-Id: e8ac7454-2e93-4dd3-23e7-08dcb1287c9b X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|52116014|1800799024|366016|376014|38350700014; X-Microsoft-Antispam-Message-Info: 6MsLtQd1onEYDjXvV5UOFIMHXF8CCEbSb3xG6t6UIgmmLlyu8hysWhu8Z5xZxRgrmhH2zqoow5CsM0nRyaPmYcgR+mbgD1+jw3bcI2WKR/cSHaoof8VdxPVcbhcPUPQVviP07vmjar91CBg15/L371JtxZeT4YPZUvd4D+UZvijlQIdx8B07G2hVUWEMSyuZM4Kc3qgHCyhxBRMYnBj+KFEmOEx8i2QuO/wkfiKvRgWi0WYRIz08qxGjeKzN/8I90z+nlurXnP2wc3pT2WTFrhlvWbUHxDL/pHviVCBjFWhYMDxTyvrAdQc/6kf4A3KQPYYhESJTYl7Pg/TPSS//9xXwZBuXnIpsZ48S1tXyaD8ccWT5DNGFrgIAv+wqxi/BuGD80fpdmwriSMgGxTbv8sm7OQP3qsWWc0TGJlgxx/jq5oWRbalP/ptqbqA2OPWTRuVG2B9UrSjTSAu8sMxqaz+L2cM80aciipCowrOQx5LBtNveysFlQHufOYudzJG7h8XJQrULjdXGRJS7GYuBZ3jXFJQGoVHU6a2avrrMeVkC/Y4yRGKjx6jDhRxkw5P3w5umOjKUse8Z+y1ahZxlQmvGrMWWN3rQr34yttti1f7YvCT5W/Bt3z4wdUqKwR75zaUAOQbuhjG88XYrs7M9Fv1AhNMa3jHm3ACOBo4n4oOo3VK6fyA1MGp553ZQQ0rFgEzQe8TkkcbOfLltnzoHFgBiS0chayTIiIRYR8iFieoCUbvqh8UbNR/MXw8yfMSqJAmIRFJb83x9N+Bq+zshSaeDQbXawbegznKQYuq8fEAzj/3bWRegJJKEphMhopCJUAyftYT2uom206XHyNly6B/VwfVUkq3K37HeXcCq4aTDO4pzjCPyAbd/MT+6CBjc7jUNcTGYSnsbL59TMeoOwqa3nYSGUPAk4Df72Cq8HLFMoRDVl+108E9Ea8RUOBEpQY84ZBLZlpKXgYWuSMzPui1PUlGgn5RgD/IXOw/4tInN8T1j8JzgZcLXG+wepifTc6kIVKuMLyj0v7+8r8KgFifYB8gZp2eRJ//Qo6eu4hrPMorlvCE5r8SNSVM9Mow+8aVwsLFknv3ywF/FQr8dNdGDTafLqAj4GKwUQN+ygK8yTHol8GJmxJ1917XJykEk0UpK58jYlGRH7oIRqiUi57Epze4Wkcv/hTarTWw4lFtZlZi9L1FGIb0BIY8bMsf+uTjiOO2ZQKwCFSwVH2MgUWq9KXtaPwMnX50R4muf4vgTUsA8vupXzvtataeL0ov7zPWC+0dTLBKNyd4F0a4uGMUTeQeMp5y9qzBaHvFtl6Tl6pp5Hc+odzi9ICDujHau8khFqcPyuPP51GNZzShuBM7sCbsyB1u2AS8+2YLfvzoJ+30+NmfZJS/yZP728j4QQxag3MK7fzAW0qaVxvwi1w== 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)(52116014)(1800799024)(366016)(376014)(38350700014); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: EtovBqlYoMrXqMQb+wljNQ1WEc4RPq9l7nFEwTrhK2mll7KU3CwHFKsEVtcoQVkvWU477og79e9dQnylFKzPTkyWofKHKlKgQfelzFB2CCKDDVeYdw0dL7pXEOQQQVA+cJay8lu+9wilWGF1idqJcsZGKqyaRc4cv6Xdbb/y1cj8zsAu2RXcnoKcdD9hvX/MoOFXqYyo0ofL0buC9SU+uantlBklprdYm4O+E7UyYq3xZnseFpC/+Yv9ZXF0podeWgQ5zZYJMfSqVXga+PItkXBQ3OZpj2jsawLXICG0p99hPMNfwO6mA6Na08pv9LH9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QCcgFy0mHguOxd95L0zf0Np5mK8hY5d9pV9aab6cRwN2211Jo/IUGafue26cRl4mMbUbx9lAIvTKpjqyr3dU90xeFLYhGDqzaJCiD5jQc8hVwwpnzHXM1x5EvxZ+Z94MJEf5HDMjx3J4JqpUo6t0L33RDVKLjPfvGBQQjJViDoQlaV151Nbzv0rMWsdakj7gEG X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: e8ac7454-2e93-4dd3-23e7-08dcb1287c9b X-MS-Exchange-CrossTenant-AuthSource: GV1PR04MB9088.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Jul 2024 06:17:42.8630 (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: sNirFFcxTxOwdzrhVbDdg/O+i/KnqJfEVGyFnkgAj3jgOTPd0cZ2k+Hd3oRvjiN2L64DKECwi+KVsJjsOQd21Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB8PR04MB6924 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 Wed Jul 31 06:17: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: 816133 Received: from DB3PR0202CU003.outbound.protection.outlook.com (mail-northeuropeazon11011023.outbound.protection.outlook.com [52.101.65.23]) (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 D89D816B394 for ; Wed, 31 Jul 2024 06:17:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.101.65.23 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722406673; cv=fail; b=TAkrAQxjIcig5P8rXNy1S9KLMBVTBneA25Y34YXcZpCFnInMtm8WfwRcwx1XzWRFE2K5ZO9LBITjLwceeed1OhF9y/xzUEzSj7Cez7GQROWT4xo34T/f/vMVTneeda+2qwdOcFi28vDFurMPtZB5X9dHMvVpwwXaJ/5TZgYuTyc= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722406673; c=relaxed/simple; bh=wctYOOFByP1zBmtDbh/IAmK+R7qJU2gIXS0KnxGAFiY=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=YZWyYlAKApo2PrGRUwcnWCDGqQMEMMjPkQlsmg6dx9pvWTO04ZxYwNkoIzyR1tjawOqc8ZC4p2nYzwj3j2zJVVDlXZV2xiNpCKi3w7JSQQRGvGLRbnp+sBM8eLikdkKZJx37gKkanzoVJEjLgKW41Jq+Boc76nyg0EoFro6woBs= 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=ZgT32qj0; arc=fail smtp.client-ip=52.101.65.23 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="ZgT32qj0" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=EZ8e/wznFTEHBy6yebiSRfAyvHj/El63+TH1A2Rx1AniwgzFlHwfHdW8WCoMGXz3wM1r7bMEB/yBTjd/bBP6tsUPvsxbsbSs9W1HWlqRypFsmyypQWuwo//ZWf/UlXJQmigmNI+IegBzOX7fwkQ4WlvzITGC5qHKR+4snQSDe/dDF2fRszQ3E6oKIHy0FfaqAxc6rEiPNjrFL1krEsxzqjlFCWpFHtA0zbsVzryd9/nMq0Txo3+eVu8JQmtlIP7zmZgrYX/jT+a7ZeNw7y8QKzs5hxlrAE6pisXMb2fyL6JpfhixmIkqAHnqD34zZ4DdErSwEb5xFNNZsY7L6wJ/0g== 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=y2qaBaK7SAZl884s4a1hcIYXHJNSyVZ7fa2FBzFNFIc=; b=TMvz4Fre+XM9zUhTo4MrZyktuXBO6wbYveJZsHJK6pg1++S2t0DDAwMzbbCl6SY31exeGflQhPnX3GwSKKlV5QxV/bPIWvkmiL8x1T2GWBtjl0e6Ew3Mm32pZnwgGiEBNL6UIsKTgFyBUhXOMJPT1Gr7hfeHyK8sAz2Uh6IQAyd0XJAN4KIh58cLAezDYl8s3JSnY3hmkzL9ze3kZcF6Oje5E+YjQ9tNrE+thjyDe8zLtDFdEa2X6qfy3/pspL3wNSmR0lAQ+WOcsqZm2DFCgOwjgZx29iAizycDUmfhMYPhvqcoIf0xK3yRYhaOc4DnJae47J1BhgW0GJ51hKgp6A== 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=y2qaBaK7SAZl884s4a1hcIYXHJNSyVZ7fa2FBzFNFIc=; b=ZgT32qj0jVNEramxqsjVLYsNc7iwHnP93FElz0oPOyEZiYs8ZeqbBGqXnJAsrpNwkX2yHkH4jJdvf9jEwC8nu48MyZ5WBueWvbVyq5Xqj3NDcCAC2IdlmfFQgngegdVYKVO4/0BaM4GKchrIErS50b05B/LABDAmk0BWp59SvNAPhWzswjKyqroe0u5EaHwRkZNDmvQ3vXghAkMiUMFKuLSL+40ETulo4RCAY5PQFRf22ZHIkz9pwSpo6cAww44Tk26pBNWRisKJiypt1BbgewNCiVtk/WI19Xin58WYBMn4niw2A4j94kALdPJmeTWkMziu1x3i/+vKyzRljLPLbA== 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 DB8PR04MB6924.eurprd04.prod.outlook.com (2603:10a6:10:11e::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7807.32; Wed, 31 Jul 2024 06:17:44 +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.7828.016; Wed, 31 Jul 2024 06:17:44 +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 v5 8/8] client/player: Expose transport 'Unselect' method to the user Date: Wed, 31 Jul 2024 09:17:13 +0300 Message-Id: <20240731061713.435586-9-vlad.pruteanu@nxp.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20240731061713.435586-1-vlad.pruteanu@nxp.com> References: <20240731061713.435586-1-vlad.pruteanu@nxp.com> X-ClientProxiedBy: MI0P293CA0006.ITAP293.PROD.OUTLOOK.COM (2603:10a6:290:44::17) 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_|DB8PR04MB6924:EE_ X-MS-Office365-Filtering-Correlation-Id: adf9c9ca-35ba-48da-2433-08dcb1287dad X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|52116014|1800799024|366016|376014|38350700014; X-Microsoft-Antispam-Message-Info: iYbFSMybFK2RqOZl/tpzpdiM1KsOqAG/e243IV12kiVHUH/xwBIJ++Qa/oP83QoRqDJ3d0q7xiesiVUb3taafXdRPk10+RM1vbWsvTKF9b0vpz+/jo0fHvIEj2uWJRFbIkeRbw5h9CCPLQPwBgtSuxPwms43o5skGjnAjFPTNdtm9vdWIOJzqGmfv8oAmJnFtBZRZmi7l/lDblSCEp7SVEgRk1US0FXc5ZWabs/ScsLs5gII8AzUUgCalsOiXthAqNL0XasveEH/MoyuvkWSUCFEbwUyekQdGejRy4QTXSgKegy80Z5qOyH/bLHDsliXI2K3v428BkEneqOkfVKSNv7GS5E6GFsRSCAtbw9XhP0rZZ79nY26fN96almhdNzAUdWaf4cjwzpGfbOin3pqhgglhE+gKeYpEibI1TDDT2XfnHqMebpxkXq76tasLzvPg9AiSY06CYwbbITS1tyfquXQq4uImYICHP9JkI2MTJHTUNC9IMbL0iAAUJ/B8oCYo1Hpc99Ngp+Q3eTirP+f/xHYCTJwqJS57+C5V7BC+8SFEzx/aHpzTZpYE7+6NGuGMgvLtKpxj57oszQXiA9dbWV/3B7Y5HdXcd0ashQ2FgfyKNa8j/+lmypFpsBHXJmgw/eMhNvAx1k5N45xSWsrC2jLnbH4Z5dPhAi6qyin2VwxUQBQn7z0hNE2G5ZFmoYJvlXN4phyPU1S5d6FYw2xA9aVRObKcSnKVrFDExjdjr15zOwaxaRLPgS0k4/xbFOAEPB+UCtCP7UmBge7b8pUzR5ifuL+uJSFLzAWPGU1BPTCCs2q69ORVrRNPpQWx9PySVkGOYe0XtxYMqadoEGNa4O6fqI0PJGOYTCAGt5bfxnCnrklcQeMcUVYCcZEkfkC9t3gazPRZOBr4dT2ezE1QIzHfYJ0rezft7U5CnLbzEoHw6jv1YTm51Ne+9NCrJtZg3XbTKZPoBzr85j7cmDYKYAnCI4aOra8kfe3pYX/VmtmZYrAg3Mr/lUS7JYXrBALQW3zzaw0ZZVzJ3bcaTXQU2OsOavCtRILqmpWLB93kCN8rLvbHDgm8nK+QzuaqHyNWDKNVYifYODq7bF3GxuKiiIQW3Uij32CDYkliiNDd7627f5uR4Fn3f7ENqpXlQ0QW5pEC0WHqTaAD/EBF/I2NIjOw4CEjac2//bxBH9BhZBISBaUhGrXyCHOgTP7zzfBUPCPuUsmTvMIONt2aa4PMyPwGbuJrHTLkmbd1rN/119ErX7Nl2bFkF1MpofFR/fkSl+Sv11Mvefg2fHTAnBForp40MYs6uQA81pyICBJXX4VsvalikRaWNsZhLbXu0vB7jm05f8TxlOvgoP2iCDFOpxGVYy/Q6w00piBqnj1DHpXa/keqAJXWr89Tk8yRr5Ddv7xvvTMfQvlEQG0tyL6Xw== 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)(52116014)(1800799024)(366016)(376014)(38350700014); DIR:O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gXs6q2vlAnGR55QaqWeHuBWZL+D8bc19+3LPG57eY9Z6srrlc0hbXfiAb9hPixIfpO0Bh2QBNuF2w1kXdCv6VqAWvgEnwN+3/P3S1mwNCzyO5C25pbwxz7OFJRmhH7IKoTBJ0wQL8urV0ZR86b8BYs804pN5hXKCWFSAOzL9Fk4mJx2n7CK0DctlK0ZFtiW5xCqfsI2XcajhfgUVq9DSFGcWq2VYU1FLXETltOaP3r6Vin3bwT0FR/to98JWBfP1qq8ykNTRgKWNk2Yr4P36AynFPkSGVoMAaceRNQYxEYJdWLafMEdUKzpyZN8GGWPr+HG28h4dkRRZ/HtF3epXGX8SPsBMcJHRwvdccJQvxbhXZjYRhTMueiRazjaZnUB0g4SH5uhomryVgtXA+WQ6ycZ8anHA/J2QadQt94SLXtl8QkrM/mvP/UBp+5tdnGrPVnABts9rtKnnVXyRMgM/ep6U4xC+hPrrGMo7dS1cOXGXIIP8G9Q02GUP/7dy1aBKKV2Gw87ReedqoA6CZO66AQEh+2+q33vyLtLKbypl129weAxWwtRuvo00gte5YaajSu5vy2VBtRD X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: adf9c9ca-35ba-48da-2433-08dcb1287dad X-MS-Exchange-CrossTenant-AuthSource: GV1PR04MB9088.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Jul 2024 06:17:44.6649 (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: GfH94K0IPqTqEkkjLqorhGAuQkrLaCVZAIz3dDU2YeY+OpYkpsCJ/yqN2epBiO0NgUgIQDx76HyhqVYT2XYKCQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB8PR04MB6924 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 }, {} }, };