From patchwork Tue Jul 30 14:09:40 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vlad Pruteanu X-Patchwork-Id: 815419 Received: from DB3PR0202CU003.outbound.protection.outlook.com (mail-northeuropeazon11011016.outbound.protection.outlook.com [52.101.65.16]) (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 29FBF1A2569 for ; Tue, 30 Jul 2024 14:10:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.101.65.16 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722348612; cv=fail; b=KB+M5XLB7AgRQJgIXkWBT1itmlMG3Wn9cS5CsA+YuQAsXjQV+ww7wEJW6q2prwECk/+7CZynoEonGn9QVsmiM4z4g+RcXfeBqUaomJ2fwUuwmiolx8wYzmGUPQyrIWT9lQvmwHyKS7HILYOapDsZ1cHck4jadKlekDxBOyJRcig= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722348612; c=relaxed/simple; bh=tq2W0vbZmYoCtaWgRPoBXEPV2G/qM+rxWoRoLePHE44=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=PVMYSV+psk2ElyUo52uNL1hEen1lrg0S4M3SVha23jhNXbIEjn/19sAqWyg8+ifWyHykT4TrRfHSGUCAZ/R7n7Fk+GcREUawriyXwGkDCjHP4rbQMma1EN8cMk7OHirpOZWVIXp+N2KiAZpCTm78AF8/MoReuVk7v9Cb5xPEnw4= 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=UKjDX152; arc=fail smtp.client-ip=52.101.65.16 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="UKjDX152" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=IBW5Moc960R24bUjDToSquQFCNVChN8wUxRZ75EjO+naLUywQNS/UItEO/6PmlV4XxTxSE0HEeLCZI4zICTLrBXRPSb4u8Xcj9aJtKP2Rg8oovkhUfRpPLt3h6J38wBdI0zSY02qi/TYUrAN7sWcdunNO+KKOGzXAq8GkaO+t5wiG1/ECpjkVz4b+Q4kLm+j6QWT1CGuGtGqGiLpAA56u8h5mL4dZMKz4snrF7luA25nEWXdteCT4icQVHqHFP96lsUvHJPFqlbjbvOfjn4lqqjZMWw1I1qNAUiQo9hmszzFabj8GqKifRSnnReDcNSE0hph3x5fBFyEt0LQAiEDgw== 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=Cg12HxRnf8JDjChYVEgDKd0Z7feZ0QdrdOpbXDE9QFs=; b=fuTLYzvrycaipkXw67c6PjHNw+lkJM9KmL+QQxUvWjTMtBzkt4ZyIcEdj5fkovNTtH2naa9fU9KtNA5qAhlj7rCPpjXSjK4lqSLqurysU3NUUgBm8BUFK3HKQ2N0lQwEfSFJhkzmuqbx9YGsKEo8iHpd/QNToXB4iA2H7Ku5E7ljeFgk0ne9bI+lEMgpl52lpowQL2L3g7+eGaJ6MygjmscTBRFSFQvoFQ51jlEjZug/J1cGu6oSHlA4ko2CXQPtA+c8MzySXuDDcEEGqUwGhroqllaq8f0s/MqsfUbMW6M7cz8dW/YQUcqFRZWi8rLLVKB/IhG4aextWYzyR/6YDg== 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=Cg12HxRnf8JDjChYVEgDKd0Z7feZ0QdrdOpbXDE9QFs=; b=UKjDX152VDCJrlj22Up5qNViPKVZSdGkXhH74AuWUQJgU2hstys2gFrLsvybVMAV/WclcSugdACqfKJ18UCHpxawUP076EJnnDod25/Huz1vUKwy5v/O8dzWyw3jjgQW9jzEhwkhusYkkXvFbMSUjMi9vX54/kILst9RtMdrOquAJsNuQbyP5Duxdw9v/fb3jqY5a5GyKaf1AO3/uAbuGyJVVxBD0zmF1R97ufKjCUIUymELylEqyc6RHJrOx90C0+X/5NOQhMtxpQCrN2qzw6Uq99B2HUfJmzWKON/T/iyeLJIeTfmP72cIYY1nr27n4E8BaVpkaTiQCDcMuIi2BQ== 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 DBBPR04MB8026.eurprd04.prod.outlook.com (2603:10a6:10:1ed::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7828.19; Tue, 30 Jul 2024 14:10:06 +0000 Received: from GV1PR04MB9088.eurprd04.prod.outlook.com ([fe80::8775:dba3:39ac:3277]) by GV1PR04MB9088.eurprd04.prod.outlook.com ([fe80::8775:dba3:39ac:3277%5]) with mapi id 15.20.7807.026; Tue, 30 Jul 2024 14:10:05 +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 v4 1/8] doc/media: Add 'broadcasting' state and 'select' method Date: Tue, 30 Jul 2024 17:09:40 +0300 Message-Id: <20240730140947.411655-2-vlad.pruteanu@nxp.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20240730140947.411655-1-vlad.pruteanu@nxp.com> References: <20240730140947.411655-1-vlad.pruteanu@nxp.com> X-ClientProxiedBy: MI0P293CA0014.ITAP293.PROD.OUTLOOK.COM (2603:10a6:290:44::14) 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_|DBBPR04MB8026:EE_ X-MS-Office365-Filtering-Correlation-Id: bc14fe01-9273-4b17-f45e-08dcb0a14ff5 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|376014|366016|1800799024|52116014|38350700014; X-Microsoft-Antispam-Message-Info: UxVJOfszP9ALRA0rPWx1LCKNqd9PCwtrk6vq89rtoaZ43EcGGhA/KN9Eg9L/jVk6hJVNXnVfB5ZBV2rcUjTg5XdHQS5lnXPlJtter34xe5Lhi1fC9DWr/NCFIHFLsZ2F7v9/qhcKA2pO1obWT8/kxiPO8QJZ++bkJZ1Jq9I3NiNjoU3ODod2ubYhuiIWFCWthtKk0iNfKqhfZzwdjvjwc5E2DeC6zbV7dUik8vRQ9mGHZmRE6ykfsS6TGJBddWxpTrvsZssFNR9R/gwWpj7wBqOprjBlX9LjE0zRZRIusJeok499LuSqpx23t07ODlWnXW6TNHXLpD4zDi/+Byzvmyn5mGQz0qB1jJDxQuQxu9PxonSsBAViAnXjz6ubSRQDiwqOYHZKvsU6uJ6GQQyGnl0LDXbeP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:; IPV:NLI; SFV:NSPM; H:GV1PR04MB9088.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(376014)(366016)(1800799024)(52116014)(38350700014); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: MJrR90doHlTEHdDEPRZ2JCfvaEELpJ6fTEab5yfUUe1hJ/cetcElxyttb8e9/z0yfxkVnhx0Dlec9RY9VM8IFqzZaCQISfFTjbK3Qz3ZGKdPRWpXEad+Y7JMERwswoWUm/jQcKq+5EPHY+ouHcHxBGAE8H3PzPS6ckm5MNe7RAIoAhuTKSvelbdHqo4voP3YSrwBfU86GBUkMbZk0nBl+D1YPa4K/Fms6R0yRSiOWDllSvBq75micrcvNYMXCU86M5VxOOs9YspJ+arBIuG9z/wes3yAeqF/LLE7XO8nt2R7cTeAhwwfzyK0JhWOZItq3IlRsYB3eyDTZ4Y3DaCmnzFAAFrQ3uzwq8t+iEzfLTenE6BYsOq4d4I4xVhNRr/81Y5K7doCNnHzFbgy/vvstXMjZ7csyBN3c4ybpXEZJH/dc+pOmdh251AlxmboBt1SwqT7ygO20ZfnkfCFKv0nI5Q+5xcVYbvtWry8TDOY0R8otuckUROcO9AlBn9laR6aCSLvNIqgDDGntLn10pO6dGKRI/OgJW9X1vJiSOo/OXibT4q3eNuUBMHtquDmvQf0/eA+vf3ruRzweehsGAALzIDTT31U38PRGqJtZlqDLsB4OXyFN9EnJs2EqnD3Kyvn8q08LbXOoxRHf37cNKLCe67r6xVp5K2W6QkSWDOBDbEQm0SWigCfalsNlDmBsEINe/ZMBZbRsNfkc/8Ao9zah54iQmIjF0uYS/9Zg9F4dWRGgMeJJyYxsgSbQWwkHz49PH75DMSD8BPnIkP1RO2+3s/C1YZXHf13X1uydtE/E+7eAOAwrw4mnc8YDtztgOP3lTVWTVynBLGw+jTVaMbKhrEDOCbMOMs+SR8oA7Uu7EG4ju4KH+UrOgLF5tPsLgrOwdi7Bl0N2BtSFeGZWd1L/FWqCtLDJkcG3flxUG6VA9LEk6WBR2TwN13iqF+oiacZTjtKgUYk76G0cZKtTfctfpYvTwWEyVZK6lDmH48zc7PBPUTYcEHWCHhZhRw7hmezmKtxB+QIOwqFbvdvY/gF3OoBk2roUjveK0JZSRxg0C6/wQZVA0FxknyPz460lYffmd3TKaZyc2WMJQZJryW/648oTTFDcMUT39Pa5gQhE4HPRXbcmsai5J9Do5nLiNF4DdAqCjEWKYYM5iQasVjJcq0I7mOaWqC/FZ9t7aVOVYFJ5Ot1whYB7WDC8DXbl0QfVNBt/KjcIpCUxB5hUYO1ccop6KHYTGaWSDQ2WcchndRWMJCZIk7wHPfi88PExPs6JABHz+8e1HbXxpr9RAVGutAy0J7SHHy04BeGjNQmtadlOG7MbZWTFMS7e5hzIbCqArx28/Y2UFffTETcNk2Fpq1XhSR6LW76yqpzUZI63kn9d6glHeJHcXoytVJtpEuDYs84s2qzmj5eE4/Qocz5x/Cs2gluH8HOiA9eAOZWgASnEJCy3h5xGuTiaRe5gDzhU6B6e5fuWfvttJ+8zPMk0phe1nkmggsKG9CPJ6bcauC3r51sHQdPBjKXLp0dkRSQCzZ/awWPt58+xpM+dM18AMJjSATm3Q0XvCLka1H9+SCNtDZWw4y+tTEMCbTSwNAn X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: bc14fe01-9273-4b17-f45e-08dcb0a14ff5 X-MS-Exchange-CrossTenant-AuthSource: GV1PR04MB9088.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Jul 2024 14:10:05.9207 (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: iPwJKalM6Q23J5aYltvwHu54oF43bmSN0tRXf9rTa7FTkPtVHuWshgH/04HiUy77NOA+6ak8/Wxa1vB84/THvA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBBPR04MB8026 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..c23d1f59f 100644 --- a/doc/org.bluez.MediaTransport.rst +++ b/doc/org.bluez.MediaTransport.rst @@ -7,7 +7,7 @@ BlueZ D-Bus MediaTransport API documentation -------------------------------------------- :Version: BlueZ -:Date: September 2023 +:Date: July 2024 :Manual section: 5 :Manual group: Linux System Administration @@ -51,6 +51,20 @@ void Release() Releases file descriptor. +void Select_transport() +``````````````````````` + + Applicable only for transports created by a broadcast sink. This moves + the transport from 'idle' to 'broadcasting'. This allows the user to + select which BISes he wishes to sync to via a 2 step process: + 1) the user calls this method, changing the transport's state to idle + 2) the audio server detects that the transport is in the 'broadcasting' + state and automatically acquires it + + Possible Errors: + + :org.bluez.Error.NotAuthorized: + Properties ---------- @@ -84,6 +98,8 @@ string State [readonly] :"idle": not streaming :"pending": streaming but not acquired + :"broadcasting": streaming but not acquired, applicable only for transports + created by a broadcast sink :"active": streaming and acquired uint16 Delay [readwrite, optional] From patchwork Tue Jul 30 14:09:41 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vlad Pruteanu X-Patchwork-Id: 815762 Received: from DB3PR0202CU003.outbound.protection.outlook.com (mail-northeuropeazon11011016.outbound.protection.outlook.com [52.101.65.16]) (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 C7D531A2C28 for ; Tue, 30 Jul 2024 14:10:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.101.65.16 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722348614; cv=fail; b=dK8mVcMSFwCc49oQmkU2f4LcMvy1If5coOKNxOO0+3EJ3f2JkKkB7v2Z7pBlBSe4rk9umr/3s7MQR8jExl5A88Ed+FBdKNVkd3LCVdK5N+lLVAR9ALFvZ4sUQ9H4M61nL9kcv+R3sfvOLpFHHkyu5bivIVRNlGk5iPFrmYnDaSA= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722348614; c=relaxed/simple; bh=czaSDfnJVKCrrkGXMQAvEltIA7s3kIsEDsFBSbxx2B0=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=KpDQ0NCToTfXDPVWZp9KXIyaDk25nJK6Z4mSo78/2qw23BLgjum7OcM19yYRqBc7p/OGdikqYUNoxPChslIezGslbiWnCaxWvpg1aF5lMSQPYFir/Oeg7IkotKdy/9oio1nISohEXuUfUAyjhmqwoPUszuRMDC9Myn1jXLdB05U= 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=GndSF2dE; arc=fail smtp.client-ip=52.101.65.16 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="GndSF2dE" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=Nrwj+spFX39xHbkwMHnJvOZnoPRmUd0RAK2UfTOSTqgVrqkpLjj0Tw7xBjKM6Q3ReBA9W9OXTKz7flW0DMkA5K56iMb1zEd/lLUWEjHQ9f2bX4mmR1w0okmjhnEUDc2mZ946k0xetVw6Ydzw5Ts+CncBJ4pDqCCuoAXvRNuJ+K/gz4lSsGL0aqwoiO+fU62u9KdSCowARkH8ZPRGET789WfUBCERiiOUiPEAG9sGM7a6xqiXlrbA0dGApJRoPRdyWtiqgc7gmKcce+SpPHgE3HW0jr6BeX+91CyXsCIVzP0QNwIrW4kf54wmGyQ1Scd6o+X8YN1SX4W1Gc7okxeOMw== 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=bpUQSSuVd34C5wZlIAUG+75CVh/4JUZaw6l/S5uiS/Qzf1dbCBtZSjD0jxhMQn120n/vgn0DVupoedyoWnHAj5+8RZ7M2tuf3/nuo/UZy4GyM8nOaQqFFB0Jbj0TymtNmE0TNvRYM/qkOCrRue+oydnhmbBSc6NIagIs54FC3oiATKeFhdl9aLXvaKxeVYNGSlaAsY7/XvgCEK8Y+N+N7cjc50OGJVtAbZgr6VWWwtYzbKRiuEjV3Pf1brs9gxd3pQXN+kQZL3RoJY2urB3psZvY3CVCoCDfQhXCGqtWDxnC1mAVDpWp0gHgChWlISXBOVogVSQCaZ2BaISK+BeNLQ== 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=GndSF2dEmdipHyIzxN1Y5JI1ix/IiKkR6ngmQKZOqA+o3U1Rp/thQLYOKoJ13odjniVw7s4WIww7NFMagNcEi/8a28z1WawyagfM/hBLEOVEjPuOO7O1ObkT+h4bfBNFDAC74apR2sFkbZmmee+OvBFXalulgBG0V0U/oOExezkAnkOpLfX0fPlXG8rXZ+BUyJ8MpziZmE9hEUVzUPm3PBrsEPdbPlundiHHLmJgjpmyMC502Yv3+mqnQBLwqjR0kT+w3pxqXpA2LV7ozu0x7H+5VmBFTmm5irFPDziuZmQcRKYiAWPesTQRK2lk0ACELJ+mHwU2FrxrXTg8aDmlmw== 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 DBBPR04MB8026.eurprd04.prod.outlook.com (2603:10a6:10:1ed::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7828.19; Tue, 30 Jul 2024 14:10:07 +0000 Received: from GV1PR04MB9088.eurprd04.prod.outlook.com ([fe80::8775:dba3:39ac:3277]) by GV1PR04MB9088.eurprd04.prod.outlook.com ([fe80::8775:dba3:39ac:3277%5]) with mapi id 15.20.7807.026; Tue, 30 Jul 2024 14:10:07 +0000 From: Vlad Pruteanu To: linux-bluetooth@vger.kernel.org Cc: mihai-octavian.urzica@nxp.com, iulia.tanasescu@nxp.com, andrei.istodorescu@nxp.com, luiz.dentz@gmail.com, pav@iki.fi, Vlad Pruteanu Subject: [PATCH BlueZ v4 2/8] transport: Add 'broadcasting' state Date: Tue, 30 Jul 2024 17:09:41 +0300 Message-Id: <20240730140947.411655-3-vlad.pruteanu@nxp.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20240730140947.411655-1-vlad.pruteanu@nxp.com> References: <20240730140947.411655-1-vlad.pruteanu@nxp.com> X-ClientProxiedBy: MI0P293CA0014.ITAP293.PROD.OUTLOOK.COM (2603:10a6:290:44::14) 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_|DBBPR04MB8026:EE_ X-MS-Office365-Filtering-Correlation-Id: a7c3e390-5a4b-4df6-0fb6-08dcb0a1510a X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|376014|366016|1800799024|52116014|38350700014; X-Microsoft-Antispam-Message-Info: x7lkZ1hwvn6WYaKhaB7X7Qy1aifFENxYSNx6GP/DkKbwYPmwdhYfsSboVFcWdws7sKgCoWjzFHjs7PpjSooMDB5UFL9cru3Ao9H7tnAxfgdYboZBhO7cDvvQmIHUtCQMQwQNcPEGeLIRV1FRVk+CCJfZp05CEYKCUDFjtIbsGUavDmXqlaxrDwoBIzNtDiKZFe0y5O58sX4FGoiG5OXzlPZIoZqjmpehM0x5EAwCld5zRvfjA3Dgzb7rxU+gfdy9cLdkSuneQ1G7fmznvLbjs5ftb2OsEOhOf6PTIdJhnIfdSVj0AtxgvxoVu245ADyAtNWX1nCpgEacvgDVKkTAeyPlXDbEqNWK/v3FtEhzurAl9iV60w+Fk1ZxvZMa6p8Z/Vqy8BDv9er7BehC/czJbBmr7Iz4VhSoGWYwtw1AmcAngBgvy7z84ZmqFoj5/KumkDElE4QMTdlaZfDNWk85uJuaRVPacPalhEJAucDdJAQikjGr8zSXUVQc11Q/7qiFgLepiiRED5T24wJht45Zq+VeFQOipm+qzXBjeToRx3zdWlMqDncj5empMjkJULgtbrywjhdZ6EqTm65HVwGTiNhjgo4sN0fftrGS9z+5VD6YVJNRzzKJGoBIDqQIivmF9xMUE0Vsl+q+dabzQCjklDzHAAmbsuwOnwyPWCSLJZjC5UsUEuGhooRqPYQsi0q7ZE3AZxWAP2jLT61dkBxOvIsw8wSgG9JbsI7DyAs+tGQ3q0zorQAr1od8+wMU3rL7heXQyK1q0YOk54T1yPBUzLqgTZL+Y1RFqDCFqTELeDmLab61Ie1WjUvXRXrs2arfk0bO8yFSg4KffrX+Wg8avFPBu1vhxZddNcRz1FOYnn0UZWOlLuLbqg7FvNvvvGI+g5e5F41HanxXXaOfiUcVbBikVv/zj33u9XNT4I+BYSJZIbAX5vAlg1aCooLSBAheGaRfUECiKGxySLc02nZ0lbDsq40CXQFI5EI3tx5c2ewuekQ52HxtfccH6qJOeziAEeT/qmZiAc2KRUULUTi5jbu/9f8zTzNP05OtVA/F+9CiBMLKQsvdakV0Eyissp4BBgnkvZQBw8+5Pqq+DFTzb++wjp29YQACs7yPAgymFDSNyyxlzI9hzalzx20/dyamYnApZDAe4NR3MBMSb2wIlRlXlwjdsCcrJY9B9mRd27KUl5csOqk6WrapHjhnP8IYutepgsrDNUYaqKQWU8EMSsBkHAiDIuB0ScWEyAZZ6ToaUErADuUqOvTDPm+FjjIPMOowFVwUZ//6A0EwTD/LMcM4knjCnrbBnAGL/SsH5R3RaxHk9uLkGEXV+S0/L25/SgJsSsr2ytcycsMZ1EvPIKgW+u3N+4FdLeXZFy3sK4IF8IrfrX867zgLuST7j4hPZtfNm67FdPYTEJrtUcPnWA== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:GV1PR04MB9088.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(376014)(366016)(1800799024)(52116014)(38350700014); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: Y0s8kUZl0IzNcO8p8AtvJSML/TmOtia0xhY1Hwjp1s6Hkd3Gqsf8fdBFX+pMefyvnRkjD4co0hE/s7ip3f0R56yVpOv9ZeKke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ps7h2moHoFVFhg/tVbmT2I5yh1F/b2xABb4z7NN1hDoZ/U/c8kxhzcJzG6QF8HdmIjDFuSc4BqbKMaIFyMIsfCtdOUrBcc17gp0O3dnJ/81mRlQOcXx+gCCCQmzod+WWzx6KtuCsv7B1itvuJP2rTt4YfNn3yhaAWJfJ7DqmFcZRzggsg3ba8OJ7BZOBlcUUIDiqh2r86RCuUwbwHuWkxPmvKhnEXyMf1+n/7Ql5hhNthSKEbmYi47cpGDj7oKDa2/v5G5EP2tCrxIN4CBUD448rF9PjA2B7nHZYlAwWblSCw8m0O91aO0tqvDES/5qnqdXt29B1MM5Fkj8l6evrh1M6Cq4D0WM42TJHN9gmM4gdy7zRhH8we3LYrBinSrsBityFtuj7inoNINNUYHQxWMTW47ZRJW+OkIHgBDBRQ9c X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: a7c3e390-5a4b-4df6-0fb6-08dcb0a1510a X-MS-Exchange-CrossTenant-AuthSource: GV1PR04MB9088.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Jul 2024 14:10:07.7386 (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: SvQqG6+2LY53tikufnvUJiZrsmUvs0uSHROWYDVvg75eSJWwaNJyejCWhFyMAjPXE6EmVoolu2gzZvok/X9+EA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBBPR04MB8026 This adds a new state for transports created by the Broadcast Sink device as a result of scanning a Broadcast Source. Such transports will remain in the 'idle' state until the user selects them using 'transport.select', at which point they will be moved to 'broadcasting'. --- profiles/audio/transport.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/profiles/audio/transport.c b/profiles/audio/transport.c index 922911cf3..0a890c0ac 100644 --- a/profiles/audio/transport.c +++ b/profiles/audio/transport.c @@ -51,6 +51,10 @@ typedef enum { TRANSPORT_STATE_IDLE, /* Not acquired and suspended */ TRANSPORT_STATE_PENDING, /* Playing but not acquired */ + /* Playing but not acquired, applicable only for transports + * created by a broadcast sink + */ + TRANSPORT_STATE_BROADCASTING, TRANSPORT_STATE_REQUESTING, /* Acquire in progress */ TRANSPORT_STATE_ACTIVE, /* Acquired and playing */ TRANSPORT_STATE_SUSPENDING, /* Release in progress */ @@ -59,6 +63,7 @@ typedef enum { static const char *str_state[] = { "TRANSPORT_STATE_IDLE", "TRANSPORT_STATE_PENDING", + "TRANSPORT_STATE_BROADCASTING", "TRANSPORT_STATE_REQUESTING", "TRANSPORT_STATE_ACTIVE", "TRANSPORT_STATE_SUSPENDING", @@ -139,6 +144,8 @@ static const char *state2str(transport_state_t state) return "idle"; case TRANSPORT_STATE_PENDING: return "pending"; + case TRANSPORT_STATE_BROADCASTING: + return "broadcasting"; case TRANSPORT_STATE_ACTIVE: case TRANSPORT_STATE_SUSPENDING: return "active"; @@ -152,6 +159,7 @@ static gboolean state_in_use(transport_state_t state) switch (state) { case TRANSPORT_STATE_IDLE: case TRANSPORT_STATE_PENDING: + case TRANSPORT_STATE_BROADCASTING: return FALSE; case TRANSPORT_STATE_REQUESTING: case TRANSPORT_STATE_ACTIVE: @@ -679,7 +687,8 @@ static DBusMessage *try_acquire(DBusConnection *conn, DBusMessage *msg, if (transport->state >= TRANSPORT_STATE_REQUESTING) return btd_error_not_authorized(msg); - if (transport->state != TRANSPORT_STATE_PENDING) + if ((transport->state != TRANSPORT_STATE_PENDING) && + (transport->state != TRANSPORT_STATE_BROADCASTING)) return btd_error_not_available(msg); owner = media_owner_create(msg); @@ -1281,7 +1290,8 @@ static void transport_update_playing(struct media_transport *transport, str_state[transport->state], playing); if (playing == FALSE) { - if (transport->state == TRANSPORT_STATE_PENDING) + if ((transport->state == TRANSPORT_STATE_PENDING) || + (transport->state == TRANSPORT_STATE_BROADCASTING)) transport_set_state(transport, TRANSPORT_STATE_IDLE); else if (transport->state == TRANSPORT_STATE_ACTIVE) { /* Remove owner */ From patchwork Tue Jul 30 14:09:42 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vlad Pruteanu X-Patchwork-Id: 815418 Received: from DB3PR0202CU003.outbound.protection.outlook.com (mail-northeuropeazon11011016.outbound.protection.outlook.com [52.101.65.16]) (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 2BECC19F499 for ; Tue, 30 Jul 2024 14:10:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.101.65.16 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722348617; cv=fail; b=YTEBexeGlmH0bOsZ0mnIbVEzbkP+ebwgZM/aDvkWAsOPgtKOyhiM2HIcLaWy+2q6N0GQ5iiwzFs6v+7uzzym6w8Nf6KpUyl9csNkgET6o2NQajrpHhVqXhDljyAntoTt7MLajE9Bm29Cok3kG/dlBSeMVI16opfZS7MAbPJzaWo= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722348617; c=relaxed/simple; bh=ScA4UPNj3WGmvMkJvYFNz9vuwePqO/1d7vp86uw3AAA=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=cgrbpLs/mr37LuTWc2Y44yP78cW7b6irORDUfPlNdmpmr06eW8zZWZst/7q903ict0VOvhW0kFn7Y1L8iaT6WyqFVJbX+S7+3nYwI0Z4TXvhq1fXjyq7KnhCBnf6L+ZO0KTpz+uYSGvl9OR+Npbq9z6/MDiAJhs19zt/xNAVPX8= 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=oItWwIFS; arc=fail smtp.client-ip=52.101.65.16 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="oItWwIFS" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=BW/r5e0ypvqUQa1j/R8E+Y49PTlV65AquOLVzR3/M+vIy8LrMUFEM5U93s8XbyYDGUsupZgT5D/ciTYpgy+Aofo5O/8lTi6iAvVe3Q5EOHPRYSQ7Q7vSQk8cM/wee1gHQsSYm03i3hvmLchatp5WWtHUgs2BNLy33Cb5QX6UVr+9ymtFuUANPP35GpV3MDbT8q+62o6B1w4fSIsAguaHRSo4F0rHkLdO1FExS8GlZFJeuYnPpL9k45qqccm1ugZzZcPkriFQgwxfefb8zt1IRPp1xdA0VwwmiZ4F7Qx5SfBd4F+D6r8KTfZ9KrWfWpCJXBjIyAO5cYdjGmsguktwXA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=8UTYtrHGcPISsbUfQTgBM7QWrrsGXrIK7EhT5vVwByM=; b=zPzDBn/ty2NjsyqmrjWaymWSApCPMcR1pMCCFzNG9GeMFqfZM+p/Kl8HduVhswVobwHH8O3POTgNxi+jRp/1gkBzycHJRuPZntMEufAgTaNpbh4HJxxIVyC0lz+YC/94E1UKoqS3bmXcuazAFtYQIG8xz7iwhio8OgR2fZCpOgCvtpkawdDJErko4HpYBpkne40Y6u+ddP7fagwDE2+gBChRLI+sH3scojw5/nUWRikkpLZKNK4VZLMrXohY54E/DxEe+denf7Bkpf9KutxnDN9im52Rz1Gk0pmj/WreUjtTr3F60T95KWxn7JwE00BLp922MnY1l9yZk/trQsO8Mw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=8UTYtrHGcPISsbUfQTgBM7QWrrsGXrIK7EhT5vVwByM=; b=oItWwIFSQ5fa7MBmrnS+Z0uIENJmI+JY7fJIqgZdKr0t97CiHb/pvsKQvb2O8QK33UpFErs9Vojnoz8Rl1cCDKeD9sz96BWOY0eVPDE1i0hxHEItP4orh/dxZns8+KVFO+1tRznw1kDrIIy3l9zf/D2nzG4mrYPV53isX3oSWIC8Kmlu4vU+mv9/+B1dZEloYNCgzgrasRvJqcVmHQf4u5ShUAEy63uQC41LNYJWKY6u4hPetOZWWCaXaAv5sT5pI/pXrRI2V5WbxaqlRa6Gmbf24qk/M0tonEkB/FYVUZBRR7YVQtrlbRxjqBuVX9DIoS+CvxcIy4s5vura3Hs8bg== 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 DBBPR04MB8026.eurprd04.prod.outlook.com (2603:10a6:10:1ed::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7828.19; Tue, 30 Jul 2024 14:10:09 +0000 Received: from GV1PR04MB9088.eurprd04.prod.outlook.com ([fe80::8775:dba3:39ac:3277]) by GV1PR04MB9088.eurprd04.prod.outlook.com ([fe80::8775:dba3:39ac:3277%5]) with mapi id 15.20.7807.026; Tue, 30 Jul 2024 14:10:09 +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 v4 3/8] transport: Add "select" method Date: Tue, 30 Jul 2024 17:09:42 +0300 Message-Id: <20240730140947.411655-4-vlad.pruteanu@nxp.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20240730140947.411655-1-vlad.pruteanu@nxp.com> References: <20240730140947.411655-1-vlad.pruteanu@nxp.com> X-ClientProxiedBy: MI0P293CA0014.ITAP293.PROD.OUTLOOK.COM (2603:10a6:290:44::14) 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_|DBBPR04MB8026:EE_ X-MS-Office365-Filtering-Correlation-Id: 1694f6c6-babc-453b-2cf8-08dcb0a1520f X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|376014|366016|1800799024|52116014|38350700014; X-Microsoft-Antispam-Message-Info: qMSqYzqf8w1sWjOVMmpt8OM/F0vWOwJRQkFYXTkymDuzkWzTERrf0ykAj92d67mBUz43mi0i3sJB3/zzW7lYV/3f4VmTGeuBC3LO3GQ4hjBci6rWhDMYCFGcCShpFE7ZLxmTd5X5MAeiDW3FUqFf8LYLjyol+lCOAFGqPiBQGloBm8tpqVfsHcb6CqFc64Q8YyQZrhpVxcG0aNZfSMAF3quYQ4KVUdNDmGsiz1jE+qYwl5qbt4KWHsxGxwYtgpr9AvpA3z73QGaXhrvZxmLSdAQ2VCBfJdi1iOdYLGqJ9n0HR86choXakKsJSZPxon5xn7U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N/zySORpUFTLmzdA== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:GV1PR04MB9088.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(376014)(366016)(1800799024)(52116014)(38350700014); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: efwHfqYwlwAxc7x+ve3+4P3W2nggQNgjfsWLPF7vfvJVTob1vmlnsPzAGGf1wUK3Gd/vPGRoIegw7D2zQ9PBHg9JwbzCRMsTSz2ZPgYPXXu+AcN5TxAbzKY1sbFWGqg72imx3stG5CDwQ2I1eyX43y2y1V/hl0NGSZNO3hVb2a5Er7CRuGjYuZVRkzZ8ezuNHbkAHD6Wulfs8Ct+2DZ6bk49EnrTqTU4tBdqOIgsCU+abz52U6MoxKpTYEbXdwYbQmo6YuculQUz+PJ34nBFT2At3zYQ0FdheopHM3B73EWDM9gr84bs4UX/U33kz5vpFUFozDsg+qSsTgSczx30HKZ7ohBeIJh7phY1CPlQVRZVU+vYR+Z8w2bSxo9S6Qb2lSIm1II7YOBbsXES54lLbBcqX/JXK6EjDT9n7Kml+kdKFTWOkyn14uZXsBcxS3zEQhattlZtWRR+b5mqu70+W5ASYcP9wvPLKQvmKuKxYCbuPYHylq/3vRChQq8/cvp+8JIZ69TRVTdn9l78MvrtQx1kVo/tHlPCUHEuxSOfw7oaatQws1Y2WY+ZPhCQ6/y5GRF2BCK15hm9wRjBhc8SVTC19y1PEPUqrzxuYzYu5TyQjnFYzPhQYp0S02xhxEGGMrQ/FAwCHzURPM88kbphOMOwyFiGPpn3h8qyJKXBV5FG9cnYOiQwYIKu8KzSR7hcYV5dSan4jo/eMZvfWSH5CUPJpkJAe0byFb8aUBm/p1O6r2WE5NH+s9/sLnH+0iSIcCd8XtODNgiLRRYKnnMjU5jvkob7nTwCBzJQKeXd2AhbBFNaDplznMnj+bWRUieZqzj1VrRVzpqTe3Vn2/szd5P/2cQdEayPhNHZsW0KiBYr0SJT+tf9r8h9zus8vtKc+2Zz7Qa4p+r2XcRMwOzFzNZ3AEl24F2sVVKlbxGqOVAUA06VKFrcniqqVmRDVmvOV0BgPjZlsYmPXLtpT3YOsAvnNPP90J7/BtJuAOxdb0OGNpXHizxaCFPzNz+1hR1eIjYG9c/zlnZ12tOJLzLabxGRjBS5TjbWlyHDnM53ic/y5xp/Ygj8ravuehJ+aVVHCdD4I5eZyiVGjJk8Bxgd4WxZC54kE40IpUp7lYbhA0e7KMTxdKnJEtNplFIZteansFai7FUz7sqDWb5OE6WHsVhBqGu1WSFB/vuVLaHx8RPOdyfkBnyX8nf/r+PLnRDApR0sjopEF/4ASqvhBPyAOvi4wT0I43sJbkr5FrUATRQ2xgiYhK9hqFWIiyxFpQXcP01fA6LzLp5MDUASygFs78pQNBL3Ik+XCY3D2M6q2mCEMjMtpHZUKCNlzuCuQ6RKNQ2C5G2fDrcsA8BWe7AJ5LNpwek3DVtfYtVAqJFCxwpV7VVfcXNeHcu0M4naQzmbxQgyS2LO1DAkbtKJA7muZj/255lp2vjwzuEj0IC15spYqxL5Sts1liy9URl3tEXigybeu/liPvFDE9UmuJT/69rK+62qh28S1zfKuZ9xNnV99xvt5XeRxWsWRSuSuo+njONytLN4dwPTf3L09uodAbdxcgS/FjvvcNWgtHSQ9RV6ap6OOwY6YIoJVbCWN1zf X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1694f6c6-babc-453b-2cf8-08dcb0a1520f X-MS-Exchange-CrossTenant-AuthSource: GV1PR04MB9088.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Jul 2024 14:10:09.4600 (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: sJ4JtfdPcEOFF3qsrsy1+KanKbP1l78tyrP4KXjnXl1wloxE8evkz+5XK6H6lDA54e8HufNeHjSq/KDBKEo/ZQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBBPR04MB8026 This adds the "select" method for Broadcast transports. It's role is to change the transport's state from idle to broadcasting. This allows the user to select the desired stream when running the setup with PipeWire since it acquires any transport that is broadcasting. --- profiles/audio/transport.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/profiles/audio/transport.c b/profiles/audio/transport.c index 0a890c0ac..bf2215a0f 100644 --- a/profiles/audio/transport.c +++ b/profiles/audio/transport.c @@ -972,6 +972,9 @@ static gboolean get_endpoint(const GDBusPropertyTable *property, return TRUE; } +static DBusMessage *select_transport(DBusConnection *conn, DBusMessage *msg, + void *data); + static const GDBusMethodTable transport_methods[] = { { GDBUS_ASYNC_METHOD("Acquire", NULL, @@ -984,6 +987,8 @@ static const GDBusMethodTable transport_methods[] = { { "mtu_w", "q" }), try_acquire) }, { GDBUS_ASYNC_METHOD("Release", NULL, NULL, release) }, + { GDBUS_ASYNC_METHOD("Select", + NULL, NULL, select_transport) }, { }, }; @@ -1302,6 +1307,25 @@ static void transport_update_playing(struct media_transport *transport, transport_set_state(transport, TRANSPORT_STATE_PENDING); } +static DBusMessage *select_transport(DBusConnection *conn, DBusMessage *msg, + void *data) +{ + struct media_transport *transport = data; + + if (transport->owner != NULL) + return btd_error_not_authorized(msg); + + if (transport->state >= TRANSPORT_STATE_REQUESTING) + return btd_error_not_authorized(msg); + + if (!strcmp(media_endpoint_get_uuid(transport->endpoint), + BAA_SERVICE_UUID)) { + transport_update_playing(transport, TRUE); + } + + return NULL; +} + static void sink_state_changed(struct btd_service *service, sink_state_t old_state, sink_state_t new_state, From patchwork Tue Jul 30 14:09:43 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vlad Pruteanu X-Patchwork-Id: 815761 Received: from DB3PR0202CU003.outbound.protection.outlook.com (mail-northeuropeazon11011016.outbound.protection.outlook.com [52.101.65.16]) (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 3C1DF1A2C34 for ; Tue, 30 Jul 2024 14:10:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.101.65.16 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722348619; cv=fail; b=iCiCn5ZqRe6Pga1RXB9RYKkDCN2P4hL6vxcDey3h0MzVzYeue4JR4zMwd/Z4kYvGOEZ5uRpSzDBv+ywbuZu5HT/INGocV9S2VGEzph8VUHWzd4o22YRoMfsfDjFoECPKFFCU1H41DBS4nLdsUPfUNvTb1JlkDW5JW6GcPMZvWWU= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722348619; c=relaxed/simple; bh=KA4PKf58In4My50Y6lFWBf7aSxOxuJDAPxnvw+pVrZI=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=r+mZyytGwxVWRGsgquv+gVySU7i6PLH5EISuGuNvmaQLlOIPN0013To6gmisp88rbO/27ZBf3srlelBAU3ylBWhIt39RhEYsMT35jsftpaJuG1uAIEccdQx3aD07tXz6tDkmu4k5PAMhhHJ/qF4ajFAtka7y/S1RCYlhic+6PrI= 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=nkxAJXRL; arc=fail smtp.client-ip=52.101.65.16 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="nkxAJXRL" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=ahTClseZXYxW36MugCbIJ+gHY+rqTLy6VHj00i2ilY/Lp4MEBgL7MKG/yC1i1tYJ1pMZ8w/d7dWmsjMLAqdyvECmQISizd6T+suyZ82Hv090rC8TAtlG7xw/5nc8uUFMZZVKKBSGMfAqoJ7UqE4g8Xk8GHIPFnBDYzQYGVLtFh8bAufkZ8Y3vKPlfrhinVNjopeJjmmqVv1vi4EwfN/laebAZSoEpCd7KYO+5LjSjCzgDyE+44u0KwDV8LqdXTdbnFqzxwjcvuRtZmMzaZL7TkPMoCC+NVcO/EMea9KL3m/QUQLSMzdQf14x5caW7CdxMoV8N4Ev0o1TtwqbsQn87g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=F2+0NRk3ITjvOslV6uWlnE/OODjnlBDSVl8Kn/XDU/E=; b=cznUcmRTpajMjUk1gAlqDxO17+HZSvWc/1xqxFvoXryUu55vikE500xF9opDysDO0UvKPDmjJHaM1s/Uv82up41X/Dxm09iERkkwi9f1FtNBSzhklYB2SWp9jdACNSnshvA30RIT0SNsj3RCGAa/xIs7/NfBdU2nN5LYzsvwS5c6ehLt40xWnSawSs5ULXbVIcCxz6fYjGXAV5MM2Kr8bACi1ZBUPeIOWj9MqrBNJ/FS5ZL2/fUoVev0cSXfRKmWwiyj5aPdp8ACFK0KjOYEcKo56QTpSoRKP1C005C13TZfSr+MV/oqmeqF+CYZ7al+eGmKGt/PIqPZDTMamKryFg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=F2+0NRk3ITjvOslV6uWlnE/OODjnlBDSVl8Kn/XDU/E=; b=nkxAJXRLCmhRqTm+GlrXU9DrZHanUaZElGKk+grcwjFrZxTI3QFC/tl18wV8auzpBRsw0szsHdBPEB6PqczZTOLSSLjWEHP2vUnBhzC71PXw9roAj4g1Hv7tA8CJh5GlMEXpHIE73LDUkDHxtSnJ1PL3c6b5l9OTZ9N4lS/feY5P447OuAnXnAv1mnXqZ3woaE2KvHEtkeoH5JvhZl7e0cHYfix6i6YtGE7pY8s/fWGknnA26UHVL5zw8tm1JjOkxYCvzAtpcE/qm1e0P51+nWI3/670b1lWikj6wAzHkRE4U09R0cz21KAjKvN1YbOHdoqXjH3Kt8iDpYRDRJeTDw== 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 DBBPR04MB8026.eurprd04.prod.outlook.com (2603:10a6:10:1ed::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7828.19; Tue, 30 Jul 2024 14:10:11 +0000 Received: from GV1PR04MB9088.eurprd04.prod.outlook.com ([fe80::8775:dba3:39ac:3277]) by GV1PR04MB9088.eurprd04.prod.outlook.com ([fe80::8775:dba3:39ac:3277%5]) with mapi id 15.20.7807.026; Tue, 30 Jul 2024 14:10:11 +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 v4 4/8] client/player: Expose transport "select" method to the user Date: Tue, 30 Jul 2024 17:09:43 +0300 Message-Id: <20240730140947.411655-5-vlad.pruteanu@nxp.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20240730140947.411655-1-vlad.pruteanu@nxp.com> References: <20240730140947.411655-1-vlad.pruteanu@nxp.com> X-ClientProxiedBy: MI0P293CA0014.ITAP293.PROD.OUTLOOK.COM (2603:10a6:290:44::14) 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_|DBBPR04MB8026:EE_ X-MS-Office365-Filtering-Correlation-Id: 9d479d45-3584-403a-f1d5-08dcb0a1530a X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|376014|366016|1800799024|52116014|38350700014; X-Microsoft-Antispam-Message-Info: ZXLHr4zUzXunImfaGL67C9wwwBAg5vNQ1hKYqEDYQQb9CMmZQokgcO0doVV87bMnCSH3bFlc4IXjrfIbfZ+bhfmSKj3ygGnI2jRrjqMrY1Lqk/hYzyNlIfhO8rs1aGpdGoS0BafNKrXpl+W8gtwJYy24xDIx9Etgygxc2p0vFh/yKwsxbLo65NkRFEHqB4BfBmngfmcI8RbA9GrBkzn9jMLkaBtPV9D3x9L9n3Ejm9qu69WV6a132XoT6gYVx4QKeoGujX8/I2S7+yaeptlpqmSQbdHCODY7n+qskTRwq5/KLVwIcvPVpLTZc5okORBlLjejVaCaEcw68byDY3TGSqwaS2Hg+iQkMi6P0WBi0R8I24LH5naVsD2efuijr2XDOhMap+GdsiGHDFfTstC/sKT0AEaUOX4Sm7DLalMnUQqBod7OWiuSwAZDiBpilzNFDpgjNB4Z23ZZUwSHNA86RrbB/+5RxBBix8cNepZiNl72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E9h7NqWmkGkTlrnLvFNI36afJSHZ4BQbdhlo/9MM0Dub5Q4/6r/9c4StLbSlvsijh3QmNoQdXU+s0WgWmYo7t87zL7AH4C42PTKqJbvkzhMQmEC9YzCFWuO++7xtI1onBUlrC2R0dvSpT5D6fdiMH0B8LplqJ2UWdOYFHngphyjn3ZyPPg27aYmoVj2sfIiNg/m1muAybJMkQ4c6UlQv01f+NkyoaCrUq3FGaDkBXxLHAU6/V4Sgt7JDyrwRmeu/4GodfFMBK9E+yrnd4GqDjWOuhufS/qPI3YcnpeRvT0zdwczVlhNnkTLBaKGWjKyLE5MwBLslcm2l17IRrmuiNpa8ZIdaLIT0s7i5fisc6UE7ybsLQYGscX/jsS2m6rSdNg5QWr89nAebF13aAGXbw6DvoBv0Tm3gcELOddIEfKBS3WkU7Nq/Ztww+McmrcSIiJbCzB28y5hKOs7qdtgGbpRYYYfgc7WAXqEMb36T+2n7f2jl/1VsS0Tc2oueggVstGaphlfpPSWAy7gkxhZZiPh3wnIbU9E2NXr/pxRLD6Xa1UrDy7eMLcTWlLnahQ3ppsH/vqRxcRmCKV4KqHePnYrI8yluo2SwiJaYo8lRUnfDUf4N4YBSge63SK0R5bIvzAbvi6g X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9d479d45-3584-403a-f1d5-08dcb0a1530a X-MS-Exchange-CrossTenant-AuthSource: GV1PR04MB9088.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Jul 2024 14:10:11.1542 (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: 4DnWIWYDWJlenPbDPBAhbTk8qmPKHBJnO7V7OXYI64T8/qRB39iPopQplfPnT/flVKrpmW+gF8EbnDlnAC2PYQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBBPR04MB8026 This exposes the "select" method for Broadcast transports. This allows the user to select the desired stream when running the setup with PipeWire since it acquires any transport that is broadcasting. --- client/player.c | 52 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) diff --git a/client/player.c b/client/player.c index 2480ed64b..cc30022e1 100644 --- a/client/player.c +++ b/client/player.c @@ -4634,6 +4634,23 @@ static void acquire_reply(DBusMessage *message, void *user_data) return bt_shell_noninteractive_quit(EXIT_FAILURE); } +static void select_reply(DBusMessage *message, void *user_data) +{ + DBusError error; + + dbus_error_init(&error); + + if (dbus_set_error_from_message(&error, message) == TRUE) { + bt_shell_printf("Failed to select: %s\n", error.name); + dbus_error_free(&error); + return bt_shell_noninteractive_quit(EXIT_FAILURE); + } + + bt_shell_printf("Select successful"); + + return bt_shell_noninteractive_quit(EXIT_SUCCESS); +} + static void prompt_acquire(const char *input, void *user_data) { GDBusProxy *proxy = user_data; @@ -4855,6 +4872,38 @@ static void cmd_acquire_transport(int argc, char *argv[]) return bt_shell_noninteractive_quit(EXIT_SUCCESS); } +static void transport_select(GDBusProxy *proxy, bool prompt) +{ + if (!g_dbus_proxy_method_call(proxy, "Select", NULL, + select_reply, proxy, NULL)) { + bt_shell_printf("Failed select transport\n"); + return; + } +} + +static void cmd_select_transport(int argc, char *argv[]) +{ + GDBusProxy *proxy; + int i; + + for (i = 1; i < argc; i++) { + proxy = g_dbus_proxy_lookup(transports, NULL, argv[i], + BLUEZ_MEDIA_TRANSPORT_INTERFACE); + if (!proxy) { + bt_shell_printf("Transport %s not found\n", argv[i]); + return bt_shell_noninteractive_quit(EXIT_FAILURE); + } + + if (find_transport(proxy)) { + bt_shell_printf("Transport %s already acquired\n", + argv[i]); + return bt_shell_noninteractive_quit(EXIT_FAILURE); + } + + transport_select(proxy, false); + } +} + static void release_reply(DBusMessage *message, void *user_data) { struct transport *transport = user_data; @@ -5283,6 +5332,9 @@ static const struct bt_shell_menu transport_menu = { { "volume", " [value]", cmd_volume_transport, "Get/Set transport volume", transport_generator }, + { "select", " [transport1...]", cmd_select_transport, + "Select Transport", + transport_generator }, {} }, }; From patchwork Tue Jul 30 14:09:44 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vlad Pruteanu X-Patchwork-Id: 815417 Received: from DB3PR0202CU003.outbound.protection.outlook.com (mail-northeuropeazon11011016.outbound.protection.outlook.com [52.101.65.16]) (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 5271C1A38D0 for ; Tue, 30 Jul 2024 14:10:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.101.65.16 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722348621; cv=fail; b=kRYyYGo4J5e4Y5Pm60/G59hvhWpY4qHQbcR8dxKQYbZXYx5jH5sW8mu4969uCpy2tjWiWAKUa8NQoHk/u+WrtkfZ6PIYY0Gtvs3GGfbBXLlk18JgqmzC2lR0ihvH2UU2GtkgWeo4kHFaFFmIsYsjSbG8a2AFi6B0+K8driZOLQI= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722348621; c=relaxed/simple; bh=Z7LX9XM2Amtl+uR4HYCOgsS/xgxyJD7PiV9dN5s3XWc=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=HFLYtbIx9FMKn83DWA9UrK2JkizdWwNrqfjUD2sUqMUITKvlAmG/LLeB/uV+COMC0vaOjqbCAC7jK5qtif7HvKOjqNZyWilm5qUpgKwpOLwrLS7uwUzU6/iQ0iZgUAFG7UwDqLr6pAplbdZbvgyzfyxeci98HjMyU/vyw2JzNso= 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=c04/xoGw; arc=fail smtp.client-ip=52.101.65.16 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="c04/xoGw" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=NVPfUdxElp5LMUQeWceA6nle7QSzi3l5xOmSU4ZeQydtM/kgD9H9fNewmKFpAelx7KXsW+BT9tbuXq4tv9Ub6HAb6r9dNuQDOwv95gwrmQnjax4Cb/xSzvZyt/vLO7zBLerf0LQ+IpXw8gB6yc/5debgtW3EPRuc8CKMWzOE6E2+zyE8hC86/XEKjYwh61vhFUb1PytxJXvQcrkHo1AS1SBZNc5eENuHLzsBNBzHAWvZiUIC2iRGzn3soo44SDwbMT1IUZDM7v6IzEX/bSgOEuBH/t2vrQ/rkACZsFy0kOABR3r6B3EZqJRJ+J7WUQZJI+sSApLlbVm+SuoASee7eQ== 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=STUPqppJ+xHLHSURNAg1wF647l1UKL4OD5s323iEZee7pthN9pLoSV1xRBMylMm/ATD1Kmrq7mArbVM5xxGki+sVfIZ3bvo5ZBeMCQTSkbM49I7KMR8vwKhEa2U3AY7e+yppbKoPonoxCxCa9VlLQzlulIFlqKJdRTxlVliNdyeJr7sFfZ0dM930Hoj6CQDXmUUxlzYJGK/iE2UT49E/RKheTUpZCvPQ5UgdI5BNuvFyFvS+mWWOVbCX4D35CIhxS3KdiCvNoU9ivuoK0nBnssOVte8paEBy7PkqZDinfKqgOfhBVU5719dctitGbm2NxDU0kgwouRHWs77GCdQJ0Q== 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=c04/xoGwpffsGpA1LkhxClUCDCrQjVYri1+DV39P08G17AqkE2BxAt8o9B5AxcOVEAn+XnEwvPBoC1NJ5DFVqiFRs63KyTSV30ZDZaIzW9WEU1oq6sbJ2qtswNrGWIaN5EnLC9Y5b/e4kA2oYAGqm2AxZqaCVpFY1E0+dX2SyqeQM5N8tixtUt4KCmlReLBE3mmk73NX42hw3SS1ppDYsti7272ZkwcXi0c3RbBO1o1jYbJchfq1Kzd9lugH0xt8rU4ohDt2HpbBgaOjLhXq1PLCW+qZv5kmSdTa3CmcVNiOnX0DvJvZjAmmZRZqwCCCshQSyY7i4bU3vwqhwxDmpQ== 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 DBBPR04MB8026.eurprd04.prod.outlook.com (2603:10a6:10:1ed::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7828.19; Tue, 30 Jul 2024 14:10:13 +0000 Received: from GV1PR04MB9088.eurprd04.prod.outlook.com ([fe80::8775:dba3:39ac:3277]) by GV1PR04MB9088.eurprd04.prod.outlook.com ([fe80::8775:dba3:39ac:3277%5]) with mapi id 15.20.7807.026; Tue, 30 Jul 2024 14:10:13 +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 v4 5/8] transport: Broadcast sink: wait for user to select transport Date: Tue, 30 Jul 2024 17:09:44 +0300 Message-Id: <20240730140947.411655-6-vlad.pruteanu@nxp.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20240730140947.411655-1-vlad.pruteanu@nxp.com> References: <20240730140947.411655-1-vlad.pruteanu@nxp.com> X-ClientProxiedBy: MI0P293CA0014.ITAP293.PROD.OUTLOOK.COM (2603:10a6:290:44::14) 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_|DBBPR04MB8026:EE_ X-MS-Office365-Filtering-Correlation-Id: f58ba29b-2382-45ed-574e-08dcb0a15417 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|376014|366016|1800799024|52116014|38350700014; X-Microsoft-Antispam-Message-Info: sq5gOmxWER+7Yblrwf7CtcDE3v/8frtR5+0BdySooX1WclsG/8Wr757zjsa2AbGaHL2qFCKmpcG4TbKFUmuXLJY9Ku3fZbHMi3LFJki5k0eMpBxpOJ3XECZSG/kSKHcRchXd3Pcn99B3z/UckO46ozArqWyBp4C4BiNWN4RFq8KVmnIbzkDX3hQVeghVPRmFgv3CLuuZhhEI2t5QOj0AWI9n/OlfciQIfvsiF63qfZZO3xQxm9n2PXF+dLtHksu5+lOCV2VHxbUjzQ0vfKoknSzTkwz7bXomDV/oQvJhO9WcP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v1f//P9W7izGYS+KI41bprRLXyV5vPRx32Vorxa10Sj9Q== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:GV1PR04MB9088.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(376014)(366016)(1800799024)(52116014)(38350700014); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 5Zz4jl8B1/k6NKFhzF4UNaR3nd6trHqz/FiIxUmvzAzlOTbGe/Aoz+Rl84T0woxm+MmZ5O/uhOThX38mP3r8gry+8GBLe5DydN4v0smOhlenD5VgBXUamLHbPmH9yctQrWX+Hr1mt7XXxdyAFNSqNyxm8xJ4hQ8PgnojSsS8ADjHOibi3hrO61vDEBCuG3a4qkxslYVvdzyBp5xE2M6shx8jyq8q0o2MFc7QTjJkIfTNMGyLsMqEVPKEsch02egnoBxi3tzrPcOAgd355SwyvvdTy3btGV39NvYr6tJx+fBryPBw+XHi9UgpO7irC+M/yOBfyq129ay8DEdWbeKejCSx/DH/VAiGIyN9leVBgs6q1aeX7zznZH1ena7vjXkQKSZPPV0pHvpXqwVwuIMl0dDO+VZ6Vy1+YFL3dw6m8FajlycfQ/2Pkr8Qh3M/vlmOG9ewNmCFlim6qBliEoYi9a6QPrn7dMSI+Mu8mgApWqrW9yMNrq0xZlt0U4N4GwioWfDGCZ31ToKHgFDEWRhHg5EoC3yzETzUw3LS73CctbgDttwiEr9s5JMrY4e9C7S4F1KCttavMowEABJQTFOenRrCBZmvITG4glFuMuiC/h9XAr+dGiiTIoe1x6OzXOCMO9az9po0mIavfyK61gdJVaGiqCc0G3o9JbcfHjyn5lJEI6mFHKN/kC5LYgcTVMPW9Lf5kv/lSCT8E/2b3YesiPoZBAMc5rchDekMrzaHB3XwQ8df0ufFsqYep4t9tu2iFdviN7+EyNYld2AzkRmaO+XMErGdMJeWb9iSllfNDrfmcO5GAOwARRgjBzn1kGiKEP0mQl5/p8vNrjzfRqENFnzmDwPOd6e5+MGolHT/aPPRLb1NXttfQ7mCOZYgkKgaUC5qwyebcVF1Jss9p8PmOEE1rdNL0ZY3tM7BeqckiDl3/GAsYiRVUvfU0LV2NQq6NcBhKawWa3gWoSUiRTKnKSS3FwZaMrOsuvuv0qTeFvU9aoeiSESTfyUv03TmO0rkVaTAnaKqBHmXCBpLqToNfHLcmDAwckZxlPONdpCy48d4o2J9kGL4Ys2liRLdjCLB3uaTuIm5+wPZk9z0MHkf7NQaPcG3uJhw12q7WZ3W7nEzvHZsxwWPHaELlQ7BZDuvcEvZR6I8cXosEtuYbyJUFadGPIhTDvfcadmrnsOzO+zbihyRniOR5GJyIq++kVISKZzVT0Fhxy8gdLrd51n3owB68CsuSCTpVK/M1NQMPfpiUGWdeNNzg4+0C1r9JWw3KInXquWxx9Nk8wCrcOyyrRZGh89PRuGKV8jK1/fJ6R7AWgnlBaKvYR+Dquw2Yls51WCSTeHFGezNnutyozX0hWNKhlgAprzsV3YHcV5sPuSouK5n+x0k1UL5oWLdF+PxFIXPmRmt7EqNoqe4ZsTk4/ABzPOTr2VUUnm16YuBDeiPWiNhGClLYgE4G8xu/prQFqOzEoYu5fDxIBLdYk3KmR+4uoS6yxFQbSsCZOFGNf3eLDKyYzfhqoQwlTN1VjguOQcrC5OPYoOkaHWznIycYH6D3EBeElWeuJvJjqXdizQp05AFpEJRLPU/9WXzsgsk X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: f58ba29b-2382-45ed-574e-08dcb0a15417 X-MS-Exchange-CrossTenant-AuthSource: GV1PR04MB9088.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Jul 2024 14:10:12.9614 (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: Y1nPCooG+J+DSXd/pKGDMODoSh7YSheBUNeloA83qhOadPGrCixi0TNJqfU0HvNyDqTxn6+/UnmqS0zK5ud5cQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBBPR04MB8026 This changes the flow for transports created on broadcast sink side. Transports are not automatically changed to pending anymore, instead the user must first run transport.select on them which updates the state to 'broadcasting'. This allows for the selection of the desired stream when running the setup with PipeWire, which acquires any transport that is broadcasting. --- profiles/audio/transport.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/profiles/audio/transport.c b/profiles/audio/transport.c index bf2215a0f..80e4f564c 100644 --- a/profiles/audio/transport.c +++ b/profiles/audio/transport.c @@ -1303,8 +1303,14 @@ static void transport_update_playing(struct media_transport *transport, if (transport->owner != NULL) media_transport_remove_owner(transport); } - } else if (transport->state == TRANSPORT_STATE_IDLE) - transport_set_state(transport, TRANSPORT_STATE_PENDING); + } else if (transport->state == TRANSPORT_STATE_IDLE) { + if (!strcmp(media_endpoint_get_uuid(transport->endpoint), + BAA_SERVICE_UUID)) + transport_set_state(transport, + TRANSPORT_STATE_BROADCASTING); + else + transport_set_state(transport, TRANSPORT_STATE_PENDING); + } } static DBusMessage *select_transport(DBusConnection *conn, DBusMessage *msg, @@ -1686,10 +1692,7 @@ static void bap_state_changed(struct bt_bap_stream *stream, uint8_t old_state, bap_update_qos(transport); else if (bt_bap_stream_io_dir(stream) != BT_BAP_BCAST_SOURCE) bap_update_bcast_qos(transport); - if (bt_bap_stream_io_dir(stream) == BT_BAP_BCAST_SOURCE) - transport_update_playing(transport, TRUE); - else - transport_update_playing(transport, FALSE); + transport_update_playing(transport, FALSE); return; case BT_BAP_STREAM_STATE_DISABLING: return; From patchwork Tue Jul 30 14:09:45 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vlad Pruteanu X-Patchwork-Id: 815760 Received: from DB3PR0202CU003.outbound.protection.outlook.com (mail-northeuropeazon11011016.outbound.protection.outlook.com [52.101.65.16]) (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 62FD61A0B02 for ; Tue, 30 Jul 2024 14:10:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.101.65.16 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722348623; cv=fail; b=Xu1ASrWXxozW+IDi7KUVMt9QssuGspHwbg6hNQvM0c8K11bVMVVXhGUpcnuxqfzAin9e2FrIllkBDB8TSSKL9SqdKofoGXa443ERP7jJ2VYpP2BgkTaBf/z+21CoAOplLsqHU7+Qht8EU8P7iVeRgGafazUyV3gwQtJHlfAR4Bg= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722348623; c=relaxed/simple; bh=a7v17usoPq9VVb+5xJWANTG0ehA9FJq9FbXOMbWh10Y=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=CoetpOmpa09+SfgmDI26B7asvsP+Vb8mrmh1d0CrZV01REP3E6fZTDFr6vkM1pv7vjAE7txl6IidAr3HyhJcBhLDMOBazcdIBIJg7bYRqCs87ln6AmglUPgNyjuf7pC+yMRQ5E6kxGEvCwJxevl/9Ux4ASDHKbgFR+rWndYSXJ8= 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=Ilvlw/eX; arc=fail smtp.client-ip=52.101.65.16 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="Ilvlw/eX" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=lHIyxPKgpDHB91Z5Cc/fSjene7O+UCyuqBPoAvRGJWPTBX9d/43mg12GYSBMKq+IaEPl/oO+Uv47gd1Ng6oCC8ZZ0zMUDG8ULPPHJyh3RZqEG9je/Tv6+yJCDl3OXdBalvXYDllUA8crPnz/KBUiAFxAlBnc+3PqeUppHHax4QX6tbA7OrT9MX25Wz62JMTCRVMWw600vR4vmjXOSisyKbjJL29ItC1yaYlpxMemBZ1Y2e1a8X8TLJ8s//uioqLbjnPtNRHp/2kYD8RWhQ1jPLVJFvb61HnBkG7kvwIMboYjTgFdVuI56fnpStocUpy6HjcucjuLbtxB/JcVn6qxvA== 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=ZOi6tdBSdibvtosJmhZAaAG9oKHYY0XX6KrK3uJcebY=; b=dOIAND5BzWdhpHtl8VuGrz72f2ufwt8L1wX5P+8Nbpy9vVXUdvb8Y/5W23Wo6tTKcOFaUVOmWJgr/a2tLDRWjphMqOb3S23VLzoGaTX17SKeDhinS3s345KPta2eYatW5La0jzC9yXAE8yWj5j4DPZOyaEI04XYUGdu8X2BKgjx5j1kQKKCy/1reaw18r8KD26dNmL2cpo8zFYlxmScQrfA1EsN3fyhtc/6eg1od+TsMpX41JjafYgDInSUamYSd2LSsBTZ2ytwrg3KttyQ8VyXyBZ8KElfJzM+N5URkA9gzexNtg/C6o2b5NUG/4m/XMLdQq+hZr4P8H82XxQKZPQ== 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=ZOi6tdBSdibvtosJmhZAaAG9oKHYY0XX6KrK3uJcebY=; b=Ilvlw/eXZDsK+Kq0NEcjWP5h3kglpynMhz0algY2Mb++vRhrC4SbxeZJy+0ZgmSnEerYUOsjcAavsjUcfUA3U0PLQ0oQkPqY+mZ9VBDtbV42CKMlUL4uE4ITLjPIkJtWgJjdXAOeiz18RieUrcHpJ6jsbqkvL7FpwfJUdTOat+YqRRyscSFEXpnup39qbokzC9LwZXw2Rc0S4qy01NNPoG+NoxbHo0ftrpq/fMzwpq/liudHxd7pqFNtcmfpwUx+FSejgGshMIvwMRYhyG/Knivc8vSJyN0GnA6+cMtFlOSmWZ47cC4W6Rkl6wkAgTiPJ7iUnRoyfqZupEM4+enKcQ== 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 DBBPR04MB8026.eurprd04.prod.outlook.com (2603:10a6:10:1ed::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7828.19; Tue, 30 Jul 2024 14:10:14 +0000 Received: from GV1PR04MB9088.eurprd04.prod.outlook.com ([fe80::8775:dba3:39ac:3277]) by GV1PR04MB9088.eurprd04.prod.outlook.com ([fe80::8775:dba3:39ac:3277%5]) with mapi id 15.20.7807.026; Tue, 30 Jul 2024 14:10:14 +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 v4 6/8] doc/media: Add 'unselect' method Date: Tue, 30 Jul 2024 17:09:45 +0300 Message-Id: <20240730140947.411655-7-vlad.pruteanu@nxp.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20240730140947.411655-1-vlad.pruteanu@nxp.com> References: <20240730140947.411655-1-vlad.pruteanu@nxp.com> X-ClientProxiedBy: MI0P293CA0014.ITAP293.PROD.OUTLOOK.COM (2603:10a6:290:44::14) 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_|DBBPR04MB8026:EE_ X-MS-Office365-Filtering-Correlation-Id: e38c76dd-4846-4025-43e2-08dcb0a1551f X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|376014|366016|1800799024|52116014|38350700014; X-Microsoft-Antispam-Message-Info: 89CDgfKs+5vx+vli5Vh4qtDhkmIwlfLuhiSpTlzAQ5zh1um44/fbe8rAty0+pXyS5IyDnVL9ytkv+wu8E0fpPER2Wd5BikKxBySdMFcPbCDH3W6ABLHLz1E9WZjLR/wzQ6uEVE4lL6d7A9iq0deirNNt8DagqkwhEwJfeoslpl0LR2/ya6a81rnZQe7Fc5G26I31MQKnd+OUv/RwubAgEbcOKzyEZsTvbd+ObvTI7S+a0k70RbziCQmxmMLNz/yZy4fxWCM3IFdkb05A8iHsj3oFl/3mUS7LMi7yqM2IngvTUvUeNHzJjRs6Ah7Z5xMj6TOgoe7MogYb0Fam5RzuffeNL46nlXikTdP1CzJeqP8Fx3Kh7ciwALF5ChCqmIVdn2oOzo8ct4r0jKUkcObKpG5rw311sJGnsuVSw+Yb6JIjCyF2pgY6qLqoJX4weWrvcumybMOd1xHSUrTHgpIchXeh+IESqgSozSdTKFyxseR7pfM9KTiI1H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(1800799024)(52116014)(38350700014); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: kqVEiwZTFSrGQ38BunfeKMktKi2yZfa3tEl2s3cei/fzEOmYUWnX+KE5SQMNFJvc2/hu/8aYAZcU5T+IlGpmqzf9zLmUdIXzUjhhS+78FeA2jCGDdbn0RMeZZzDzXMe6z7MvoJ4yN2c8w54rUFWx/z+BRUPCIiKlQbv3tIld27iiQjOPOLDqX/6aAv5FQRmGDytJDTvV57xm8ytHDWcKdq54BUReODdV/t9hUd5gTCXDVve9mHcbkbT5bVt5BBzWiLr9T5uCfjlVDMbxcmOBNdUE8/8j4KVM1A95OuABx/5B5OBwWBLkEi6aVV7CSnx3iomPtZ0/wiiQob7Yl8Dw9gji4PhJ474ZQszUA/nN37xaAqjqS3tEpTPOwR2Nm2o1x1jUwgcWSSXudwy9jhlJ8oe4MWhw8SJUyuBsVcArg5XBojpGkmrth3QP7OxHigkPVq0o293+ZgxSDhgh6FL5m6s6+5f8N9wVRPIxTP26hdSo8aq4OUJILEuIkOWMKacepPNUnDSAkgwUxd4wNYakikPNTWBSW7WT9Qf0fgOZqXOZKU22yh2zIk5Va3jtBCyYjoQC+Esq8bQ7IWGqwQz4OI7M4YvxbdppPXVvWtcJvPe48+V2uo5nE0mxej82lTMrSkc5/XJkHC/tt8noEP3e4Fwb6uxv4fzTTCedkSs2WdOnmYPGkFCJqHm6I+gzNvZTvCf08bCMUP1a3QpawO6si1ZDXHkydgbE49Qm71atz3B1tkFJj1KDKR3NuqKDv3iQZq144PD5wyI2SLkAVfm+t7tdO/dUiquJgGaEipu2IYNw5+lOXzKXLl1tQJHCWuPGDqW6CGx8QqRjoP9ctc92QwrIczFsQhOgqu/yOGXhfudbreyBdWZqi919fBw35pNzJ7nEywaZsOyF5zQn2hdyy8QJylci46ui02NUb9zK2xf3R18Vg+QFMLNCQGWdk+lyXvf1iFGZ5kZOq0ASqK8RuDgY/nBJcKTlI5aaWirD6VVY4UrHxD+qRf41AOD9Nw6BV2X+Z5i5KpD7E0abCYHo0oy/iA+vTB5R0frW/VS3Wm3CeHQ86cIVOjrGVVTvyrvsTIcI5A5ADxRxQzlrXBdRPKXU0JyRn77qkA8WoCqmvRTrPlaBgaJ1a6Z3rt4LziSSSUqEQh1gQ4ajwZjTnu93lTt1K2oRkKW50SpkEpWoqoAB4uM3P3sSun+Y86157RSbOuURLpKxa4qTqiFKqWbaQXBqzWbqijeqtUzdyveJHaYmxTp9MFziU+zp41C++S8iwDnZ9rvBKzkEDHjJsdouO6PSUg47YNVbDZvgO+4oWziNOUnbII3joFcCp07KUsZLlHi42VYeH+yPbmbHlFw7J9hL9+4KZ5HlspxChsqCJUrDgxjjJOXjski6199v1i9F1KbU2HdmFW7IJ8t6Kz4Dzy2XDos2UOwjvKW1pDNiUV5jAw4XBxlNVqWD/nD92FvxSFM0w7dELfl5hU5Yyn0jcXNkn9Uu0INCS59LX5B5DXZAuk9rKVlAXBXDiIYWUMz3yQha1oui3sOgAf1QMXAz3JYP7VVHlQdwZGEnC1AZS3oLG5uBL6o0dBEE4Lhwmo1X X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: e38c76dd-4846-4025-43e2-08dcb0a1551f X-MS-Exchange-CrossTenant-AuthSource: GV1PR04MB9088.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Jul 2024 14:10:14.6204 (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: 8egB5bGpmqkGrBZbnu7Ifucc4xhMs5SuFHksS1hivwu96XUvlUWUX4oZJQiqIebkyGld+J546r18FRUPR/kCrA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBBPR04MB8026 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 c23d1f59f..b33c3bcf4 100644 --- a/doc/org.bluez.MediaTransport.rst +++ b/doc/org.bluez.MediaTransport.rst @@ -57,7 +57,7 @@ void Select_transport() Applicable only for transports created by a broadcast sink. This moves the transport from 'idle' to 'broadcasting'. This allows the user to select which BISes he wishes to sync to via a 2 step process: - 1) the user calls this method, changing the transport's state to idle + 1) the user calls the method, changing the transport's state to broadcasting 2) the audio server detects that the transport is in the 'broadcasting' state and automatically acquires it @@ -65,6 +65,19 @@ void Select_transport() :org.bluez.Error.NotAuthorized: +void Unselect_transport() +````````````````````````` + + Applicable only for transports created by a broadcast sink. This moves + the transport from 'broadcasting' or 'active' to 'idle'. This allows the + user to terminate the sync to a BIS to via a 2 step process: + 1) the user calls this method, changing the transport's state to idle + 2) the audio server detects this event and releases the transport + + Possible Errors: + + :org.bluez.Error.NotAuthorized: + Properties ---------- From patchwork Tue Jul 30 14:09:46 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vlad Pruteanu X-Patchwork-Id: 815416 Received: from DB3PR0202CU003.outbound.protection.outlook.com (mail-northeuropeazon11011016.outbound.protection.outlook.com [52.101.65.16]) (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 8B1711A38D8 for ; Tue, 30 Jul 2024 14:10:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.101.65.16 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722348625; cv=fail; b=eJgITXiZmC1dOY+JY3JM+l1DkCkUAFRakMuXCH7nOBWVpem9qU4If9pxA001achYbFzQ/aKGSIYZnbEL0gXXMXDrDQtgnrv9vtkfSV2VjiQVl5h425vSt/iRNJFkG7lG1GfvqUY8k+89FjutXAbwVETRZRiiOY6XIFktt7DdGbE= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722348625; 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=tNrVLyhCSn95dZ3T4fiAM7t2VGU0vOfJzoxJsiCqWK1Lt9ANqj9qTMdIFVzzszbywMLkKsZ4sQJ18C9RlEOdpNljikdBpj3qjiMHfCyaC4lv1mgz+YAVhI1woloQLTgqaXTkxorUjefZz9fT/lHHxG0/jMlmmiCm6c6ocfwRtcQ= 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=IFuGEf58; arc=fail smtp.client-ip=52.101.65.16 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="IFuGEf58" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=l3T+IR+2aGMCH5rcRjGFIfS2mYJutrFiJ56zVoN1M783qsHa7zdJPBEZqh4DFH2NlqFV/jxgwMCqnvZ24vNtAWLlrwXkyvU9HfIOLMRxYgUt532vKRMLXkFy5biAA+gbhMPmUE1vVNEQQP8CNuNIutIJzQShb89uTaRZqzFxXQnr9M+LrWkiN43NyokTozfHW7T8pLC+pqxRI6T2zV6R1RXFaL67VUIM/Z2DBU2gUdTxVo/U3kfKu3+2eJQOT4x5QdsxoSOVwp0PBE4S3lsMCowY2aDfeyoXgfQHVRxnT+PNsMsMOkQShRDJ6ocY9dfDN0W3Br75H+G4tKHtU3cplg== 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=WRShpypmbsAnXYRfnMJy8OofeHM7ouYv4Uj8uYhWlpeRLm+r+M5vtIa7UlFy5XWqXWSAVDWpSbQz/AcXedsc9DC6B3xY/llHt7ZntvDPhxNWDh83EDpBYyKVmmkZVT17yB5ynFzA8Db0ZYa6UFlpboPXndPFIF2Qtl6UcUCF0QSsMMiLa9SL4k1Cg8yc+hPf8mgDu1+9fO/Q8BPH9iZHKja1b1qyCIVVJJGLYh2AnvtCDBpDEQyBnPNgbMScURDI9sOvRXQB7yHNyKVecuv+gvn4yiEfFrkQkTnpjibeq5N5uCJI/Sx9rRUMhd9pmey8U1eUpR+UKshJijmRZYjoiA== 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=IFuGEf58dHT1mIOS6G9eC1hoX+NxYjavhTsaaDaxJE/BTsSPR+xH8uwK5XF3/7nmaXEg4DhP+Y+OqevBMrr7WmoydqW0hxbpC/M5Lkiiduft/JIuPz2L/nG14FFjJYvRVgjNvZTiqa0r5V+CBPkVYNwPkx7GvCbeSWITxhkX3h19PyOgs7kh2Fj7mHpg1735NxJyTecbs5MVulvS5hfpufTWBiRHRQygobxcBmnLET/OHB/uBl55S9WuwAuOChpK8Mek+f6R8XMDa3SzSDm2ikMeMjtv0inUiM+Mh8ZsZgJwfZnSg4FmIt2utRIghSJG6fK96bwx9yANwg3fmZBpwA== 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 DBBPR04MB8026.eurprd04.prod.outlook.com (2603:10a6:10:1ed::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7828.19; Tue, 30 Jul 2024 14:10:16 +0000 Received: from GV1PR04MB9088.eurprd04.prod.outlook.com ([fe80::8775:dba3:39ac:3277]) by GV1PR04MB9088.eurprd04.prod.outlook.com ([fe80::8775:dba3:39ac:3277%5]) with mapi id 15.20.7807.026; Tue, 30 Jul 2024 14:10:16 +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 v4 7/8] transport: Add "unselect" method Date: Tue, 30 Jul 2024 17:09:46 +0300 Message-Id: <20240730140947.411655-8-vlad.pruteanu@nxp.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20240730140947.411655-1-vlad.pruteanu@nxp.com> References: <20240730140947.411655-1-vlad.pruteanu@nxp.com> X-ClientProxiedBy: MI0P293CA0014.ITAP293.PROD.OUTLOOK.COM (2603:10a6:290:44::14) 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_|DBBPR04MB8026:EE_ X-MS-Office365-Filtering-Correlation-Id: 6e8773c8-df1f-4851-b07c-08dcb0a15620 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|376014|366016|1800799024|52116014|38350700014; X-Microsoft-Antispam-Message-Info: 9PGpkxYYZMrGy/ajNWa3b42yzAxZP60xGtVvnkR2sQsvRGYmaHlQ9G+EYXHZRIFSAmaUegXVJOrwEq6L/LrfGIl/koDDmknLhi59EHgLvBipNGWeYuGoiuSTnpIPdidWyxaNkj+cmgUoHwt/+I2b4nt6oeeBFTQsOwb1SFMtYXGSRXNiQHunmP+twOB264XcObc/d2NCx82EEt88zwIKreEVY63pE8Pdqw65cit9/0JKqEtm5tdcNT+z9Qu0n36hjt+WRz2MeFWl2k3QdgmW+wuFklVxrPuiwe/JdoWtX4V/79Oit2jqpgdx29wMKMtspxi4oLxBnxRE7fXbep+tL2iWFVZZNdAAUxNybPVJ2kZ0OiW0YavglcsEN/a8UQtTt8zIzXNxyJCL/n0ATx5Gndhw71kmGPHMJhD4bd0x21IEo7YAZdS0XO315lQWOrCy7/I8OA9bNs2Tog3ZjsbAWbz1yauHDXkU6qQViXi5NCHAVwe57leNyB8DLyjZRR6n8jPJ6PXM6Bneakwh0e9APOPE/wcn/4ekGx6JApzOGF8Pl06RJuYxHz8yvU9833zac74+K/dh4tU8D3cYggti8ocFaOYg1F4vzNwU/stOnq3f5mi3QFm7eZIyg5ymWFnfIZ3psPXbWVYBbQNaVv/YYq8f0UQVeAmcFwaTNVkJYIBkhdZPqnsKsDUSD7wmjivEA0eLZdnSYg+uRn3nKUAWDzDUokHejbAmocjjJdn/ANOPTKZ6a78+292EiRnzafnPlsmKVEAAi1GZ4FTW1vg4ii1YZu2cswh65DaSAynmxsiiYeWynA7z4/Gela8pzh9KQIqtaQtVUtIKj+rGWrgdDqWo9XS7b801R0T8suIXAWHL8drgsWJB4d1FgtnDWxX/QeC4znxkLS+GVOktQebmI2UUstfRiZ9paAh0qq5ow05Es50dlNz/trGO5ff0X/Xk0io9ArkvSY2yLideIFHFjCHlpZ+CPeN6ugNyM72SfY9qfzAS/3WAAL/q5klU4mJf2CD7OD4tavWxzLEzU1sX1Kek23JLDn2y1QjCVehTOWH17on/C5V+7EY1ms+O+YboaAQvs3qS7PUXGnFltxSHta5nqrNETV6KX8P/AHT6ZwHvxlZL0kX02PjoO4oZL3ohbqERKE0Qg0B3fY1BBjTePjABse27mmI2IiWRxYav6J6H3mxz5Hi4FzX1EgADyEdQ1AIpdWeS/dwSm/B5/oeG6on66bw2u4ku9YFtphkGiwltnRGqynxdn0tEcamhXbBkiy8IeEbkpJ3RHv3zyUBAC3Ul582yNGJs1jOkBw5ZeQ+Wes2UGyKTR/TaXdccZBjsDGAFJhpl5JIXHdaxnzFvyLQSMV4o5/FBWyKgR//alakEZvkWaIvs/llVafpd/Wawcffibr7Cjul4G7ZHhofjmA== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:GV1PR04MB9088.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(376014)(366016)(1800799024)(52116014)(38350700014); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: nBkT7seIA/bWU5WYkzoHDNOskg95uUecDDXVkkTRiy1W4q6ey+dkQzUMElz5l2JLwENoBBAghLZNPnAHnMjIyTVpUetEOG5SbcZT/WJHAHhL1JJbZjL06IL3Ll34XLEftk6xedJ+CgKDEix82dz+qcK9gNPo7771UHbMjEJXj+fCMcLMF3QtcGtacv4umnHzw6C0hITsBqaBGGYpqtkRhH5h0UpXclGo1Or3M0GThzRhST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HemJCeaFwsxenpWNF/w2ZLfhp5Y5RH2b2FSwaKteBeat6tTXxwXsjxbv1//3sPC/xrMsefNTuSZkSzzwTaf7l6jgkHrbkVw9YwFCtkSNACqMWWBJ9HsLeFCOAP9IEtfe/oRVC/lmtIZHdbtymbV/0uVG3yS0wsw90cNahyHLtAN0j7ji1GX1gjhDZBQyjuC/0hifZYC3IONSumY6bCa7xbqd8t15aqeKiNa3urng1uRxoMJEToCW1PGhIj0tLH2IbQhc5dxNK0kbPbI2FiRFLq5uc+Gxg5YvGTiQ3Kv0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6e8773c8-df1f-4851-b07c-08dcb0a15620 X-MS-Exchange-CrossTenant-AuthSource: GV1PR04MB9088.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Jul 2024 14:10:16.2722 (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: tVoci60VjEh4xewE0MsJsxZTuOpQojb3ngr1GAgGdi1OE5zmkE6Kk0YWBLmiiXT4kft7hTSTMS7jMuJfG2nBBg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBBPR04MB8026 This adds a new method, exclusive to transports created by the Broadcast Sink. It allows the user to terminate the sync to a BIS, via a 2 step process. The first step is the call to this method, which changes the transport's state to idle, with the second step being done by the audio server which detects this change and releases the transport. --- profiles/audio/transport.c | 41 +++++++++++++++++++++++++++++++------- 1 file changed, 34 insertions(+), 7 deletions(-) diff --git a/profiles/audio/transport.c b/profiles/audio/transport.c index 80e4f564c..300145794 100644 --- a/profiles/audio/transport.c +++ b/profiles/audio/transport.c @@ -975,6 +975,9 @@ static gboolean get_endpoint(const GDBusPropertyTable *property, static DBusMessage *select_transport(DBusConnection *conn, DBusMessage *msg, void *data); +static DBusMessage *unselect_transport(DBusConnection *conn, DBusMessage *msg, + void *data); + static const GDBusMethodTable transport_methods[] = { { GDBUS_ASYNC_METHOD("Acquire", NULL, @@ -989,6 +992,8 @@ static const GDBusMethodTable transport_methods[] = { { GDBUS_ASYNC_METHOD("Release", NULL, NULL, release) }, { GDBUS_ASYNC_METHOD("Select", NULL, NULL, select_transport) }, + { GDBUS_ASYNC_METHOD("Unselect", + NULL, NULL, unselect_transport) }, { }, }; @@ -1295,13 +1300,22 @@ static void transport_update_playing(struct media_transport *transport, str_state[transport->state], playing); if (playing == FALSE) { - if ((transport->state == TRANSPORT_STATE_PENDING) || - (transport->state == TRANSPORT_STATE_BROADCASTING)) - transport_set_state(transport, TRANSPORT_STATE_IDLE); - else if (transport->state == TRANSPORT_STATE_ACTIVE) { - /* Remove owner */ - if (transport->owner != NULL) - media_transport_remove_owner(transport); + if (!strcmp(media_endpoint_get_uuid(transport->endpoint), + BCAA_SERVICE_UUID)) { + if ((transport->state == + TRANSPORT_STATE_BROADCASTING) || + (transport->state == TRANSPORT_STATE_ACTIVE)) + transport_set_state(transport, + TRANSPORT_STATE_IDLE); + } else { + if (transport->state == TRANSPORT_STATE_PENDING) + transport_set_state(transport, + TRANSPORT_STATE_IDLE); + else if (transport->state == TRANSPORT_STATE_ACTIVE) { + /* Remove owner */ + if (transport->owner != NULL) + media_transport_remove_owner(transport); + } } } else if (transport->state == TRANSPORT_STATE_IDLE) { if (!strcmp(media_endpoint_get_uuid(transport->endpoint), @@ -1332,6 +1346,19 @@ static DBusMessage *select_transport(DBusConnection *conn, DBusMessage *msg, return NULL; } +static DBusMessage *unselect_transport(DBusConnection *conn, DBusMessage *msg, + void *data) +{ + struct media_transport *transport = data; + + if (!strcmp(media_endpoint_get_uuid(transport->endpoint), + BAA_SERVICE_UUID)) { + transport_update_playing(transport, FALSE); + } + + return NULL; +} + static void sink_state_changed(struct btd_service *service, sink_state_t old_state, sink_state_t new_state, From patchwork Tue Jul 30 14:09:47 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vlad Pruteanu X-Patchwork-Id: 815759 Received: from DB3PR0202CU003.outbound.protection.outlook.com (mail-northeuropeazon11011016.outbound.protection.outlook.com [52.101.65.16]) (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 B5B251A0B07 for ; Tue, 30 Jul 2024 14:10:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.101.65.16 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722348627; cv=fail; b=ry3rlwl6RwERSObEfh6iZabIb6EAfC365r4pojyiHk6altP68ti2TjnuKrzmJXS8BmdL64TuntBz8OrAMtQbYULJpuECXuybXPtP6sjYso3RgoDGOpHH0WC7E23QQUmPd1dpxSOh/7583y3itahPNe9i0WNgv9pXoY76I1LmxAU= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722348627; c=relaxed/simple; bh=C6ScDrkMAD83Y76MxJYyAX5K6fhgAjv7nDHs0eFRnVU=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=S3pZnjoiAgHOfEI+Io8miZCY5aQdaWnn+WjuZXwZXiFt//s6t4+NvYnXsmDE7HCWhYhyxwMdcect29IHxpQ/5vRzhqXAdmQCYygWPSZh4pd8IL8a4/63eJI+3BNNMXEwkvwiCGZ7HflDhJYb9sj7w1O52OjfkWG7j42OgZ8dXXQ= 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=YAfJt6N3; arc=fail smtp.client-ip=52.101.65.16 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="YAfJt6N3" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=sj9zEmVn8YK7nl7wI1sek3dIqcSF87E1dQbshvcEnLgr4MRneKSSMgYCLSUqRIw4XgknpLvlbua3VcQek0mkxdn9VEWwCteSXNEhIS0rDUKtYMkaceRFtUgBn0dTWohdk5ENXeIDBvLkwFSQarUVpDq2Wlo3FjG/3k2mnXRD9NWc07L+dl2yKckN7WnVcTnm3njJR27CC55ihj7S41iErEiyY35nTugYVL12Rc2K8FfzYjU8fHOkVLjDhYNbScMqsXH3Y/PYydCTzVmMcvsa4NcFdUIX5yn9R0is4gTxrQUAi0PaXM10mPrV9Y4vqY+YkJAWx5E0Z4csxw2eU/79/A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=2El+uiBpaNbjvMOYHfoSPjMvWIA7FEKk1YdW8f53aLA=; b=S5ajFOaE/B2xc16Iy3zR8KiLQUgPL1cgfq1LzFBZyDH43IcKO94AP/qpPYpBmj016pyDf/Kj8jNJMF+wcXqXIuQFrQ0rwGzwEQvhSQ2tTvAAbPKo8JV2sJwAXSZnSecEz5gld4T45H2/hhCZU9RHUbq5F+VkdSuWPZo+JiDlK7V5nWatduWKMUzE/LHIdXO/IWat+oSkdO6bb5kBjsv8OTrjnnycFozi8f6v7EUUnP+1ZefDErtMoZ6Oe5XfvP35iSYRLcjbERlvk5Q4TvejBt/oYt/F0MApRSkCg3eJy16oYg7C74o8+yp7zqiOv5ZRRl5kJamFoSf/qhQvS9LefA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=2El+uiBpaNbjvMOYHfoSPjMvWIA7FEKk1YdW8f53aLA=; b=YAfJt6N32o1xvs5byuL4WWdi1sHjYTP1kb44vEsG0dyxK0Vhm+F8ZGVaYerzdXEUr1hhoL6VmYayBFbysu5f6y025tBS/Vzy4jSd3QaOESFp+00HfZf03/BA9H19OI0Ob0kh4zx9oys3XYoh7HJ0Sn2fkPErimwrfZXexO3gLN22dMPez7gSybNFctbYdoAOghb+8sceBsJh0GUcufIkg7/FjDPg4vK7AmjTkMQNAtx5rQ0sz/55dkS/V92ghbRWk3Of1eoggU8nXqGQ3oWyZwOJgpkrs+aiNUg3RGNGGznqBY8GgJhU4XMzoXrG0tKkJTsI1iwonIedj+um3b0/Uw== 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 DBBPR04MB8026.eurprd04.prod.outlook.com (2603:10a6:10:1ed::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7828.19; Tue, 30 Jul 2024 14:10:18 +0000 Received: from GV1PR04MB9088.eurprd04.prod.outlook.com ([fe80::8775:dba3:39ac:3277]) by GV1PR04MB9088.eurprd04.prod.outlook.com ([fe80::8775:dba3:39ac:3277%5]) with mapi id 15.20.7807.026; Tue, 30 Jul 2024 14:10:18 +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 v4 8/8] client/player: Expose transport "unselect" method to the user Date: Tue, 30 Jul 2024 17:09:47 +0300 Message-Id: <20240730140947.411655-9-vlad.pruteanu@nxp.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20240730140947.411655-1-vlad.pruteanu@nxp.com> References: <20240730140947.411655-1-vlad.pruteanu@nxp.com> X-ClientProxiedBy: MI0P293CA0014.ITAP293.PROD.OUTLOOK.COM (2603:10a6:290:44::14) 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_|DBBPR04MB8026:EE_ X-MS-Office365-Filtering-Correlation-Id: d8f9881c-f36e-4ec7-b8d6-08dcb0a15721 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|376014|366016|1800799024|52116014|38350700014; X-Microsoft-Antispam-Message-Info: ZeQ4JYmIfU3AYw3s1F71F0/R44rldWtgQGWrkcoecE7fZE4OIz9mju8JPxOlVCPrGn1ZpVwwnplA/83/JmVTc+DPkrw2DggTGN10C8XXFEKMHVf6tV43aCDMVG0a4CJMH6OVZiOctb9VWs8cW0lNOik44IBnz7k03RkSgA5V6hooFB7RczrsBLu7+9aL4NQewCJRkMHKi1CLOCBiq6LwaWbuwmHv2AujJRoMAC+KzBzCk0vQ3a734WkjXJEan6GyKyuXcH50FjGZ0C6T+mVObjlDRb9oAog0guFeOIIyQLbjVsZEjsojeWvQ9fHuwasvgiC3CHC+caJXmcJPKUCI58S6j2St/RMDi0yeA/lM9s2m7+wLy8uFuaBrjnAgCepLVpdyUoPfj32Sf83P0NnqKERC9Zyu0ChjyDJa6qAL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NLI; SFV:NSPM; H:GV1PR04MB9088.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(376014)(366016)(1800799024)(52116014)(38350700014); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: WNE6lRXH5WvhgyI592RGd2EJ5j8vHWZJp8zrCRlRASeLfDTgxxkqIIEOwC6QZGvfbogyyf17gy1A+gkk+3KE4ya2KElEHZzS8/AlgrN7QPXEAIFhR2pfHhl9pRqY9i4j62lJac35KxULuLrSCBhYr+osIi4bQ2qTycN/cD3Ci3HIkTGbTw0SXz4Sv0JGVoGi0o6ALD6RPvLg+1g0uFP/XY4xZU3hLDaly83aRg3lnn2b4nmnjnTNtXQyvZWKtEpUzWd7rpn/ROx+DwKsrI2iGrPn6uK7db+Ppj8M3EmvElXywTNAihv1HmGELesvSLC7hLnGfk6j3jEE10QdWscqUe+xVI3C9RA05wUqbxxKKVBRy2RsGfMmKtGY6uKuTbSvpOBvPFqxINqwrwulrxNBxmPATkAdwwHKCruk7uB7DN7o+vNcLAXxw9CDS4MU20w/HJSE1ozYB/k40utuanCiqVQ/vSUUnpdQ0Yu4ML+qtkgsxkuBze9W/tlmVggNWXOZrXW7IQjUbBJWXYhv5XBZj/Ux1ApAOOHCNeZriUxrVa0e2ava51YY98L20wCJowSLcvDBzaCbep0qCurH/M2fTakqOCjy03j0J4KAcZMYxEzYwbiMBHAL+ae3B+7ogP551joMMBGkF6pbkY8XsWRY7830sULI/BJfcyAXUqhwjKmBZ1GLIpRmOg1o+A8OKzbv6PGgbQehw5SBd45f5Ln3YOOk3eiNUYA1j4/KjreAhqEP7vVulYfIcjYs0sU4t02ipJuT8OOQVInYv26+hr0THScOP2GbkxQrWtlrHEsyFaK8wG4edY20wMAhnifIfMzwJGLxCjIj1gMbZySNqnpQFBuEQn+h92BlBXot7Xu8PdskwGBLCelj+Fn64VNN3OGsROVRpkJTLZ5kwErHzG2tPM6xnlCb87aF6ShP3iiz4CiHDIU7jw8LypNhsorHJiCiQntQrxly06W2uZ2cGLp3WC2YvrDL1LXFGjhETYvBIHpFaVjGSy8iNAtILnluUVlpWmX+08Odbv2ZrOKW1z7Dc/7ZDmgs3BXMhQcCwOLdiyppzxz9lrGiyMTCuMpufZPSCusBMOAczdz789AGPpPadS14X7TR6m5/MTZlcQOksMB0qkPBueegxYrFpRN/Fy4MGu1YADVcXye16V/bMWDaa/eGJmw/pDvN6s+91H849AIz0Mawv7CT/bRXzWmgJmPrv1gf6phB1ExI45BqqaXR0kObQusN1+jnpX//q2gEtHZYrYMqcWO1mLLbjoGNSlA7U4c5a03WTsnlYdFV/QqrV2McBA89Et6ddM8rj88CCIpoUbcXXsR8whypkqIQqav/LnF0LIA2AfiR8T3uT1v6IMAWXddq+cPyJkW8kD5wKseijcfLtnTSdVKinfJDntISSbHLlouIaReoqLagubjvYDWioVVhKqVYJh6r9XsWjzVzrJJBRuVs6mY9RuM+l+gFd1xlD/dv/k77f9XOW2Gya7IIzrRPCpp0gAG11aWLHhY/19hhdY5bym9rdMY8ENVR2z7baaO2h74bbi3d0Jde0epUWqlh3fB5QAKjoy4eg5m3+9YuFDrzpwAjm6gc8FQC X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: d8f9881c-f36e-4ec7-b8d6-08dcb0a15721 X-MS-Exchange-CrossTenant-AuthSource: GV1PR04MB9088.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Jul 2024 14:10:17.9509 (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: UbMIq+epwFa0l6cWEy3SkctKX78npZqREjUReIR0vqS83FACnR0fRV2ZldALjBcUoAsPN0TPs3ckrOpvZFwckw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBBPR04MB8026 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 }, {} }, };