Received: by 2002:ab2:6816:0:b0:1f9:5764:f03e with SMTP id t22csp2566357lqo; Mon, 20 May 2024 09:28:42 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXHRoVMhaf7hEm6n83LixaJfdtWTD1HolHeCutxJlPaT+iYwpxrDSqngemhY9MudcyQhgeQjfyf6BKxK4x18KJTmBaMSf5Jj9tqF36fyw== X-Google-Smtp-Source: AGHT+IFjjLmrh/0rMh9rrSBzCzHcVWgV+j2npeEImNqNtEqP3SWnquKqcJrLTs2Vo4fsoqXLAfUe X-Received: by 2002:a17:90a:bb0d:b0:2b3:390c:e3f0 with SMTP id 98e67ed59e1d1-2bd603daa87mr8431483a91.16.1716222522301; Mon, 20 May 2024 09:28:42 -0700 (PDT) Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id 98e67ed59e1d1-2b670f59302si2563234a91.72.2024.05.20.09.28.41 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 May 2024 09:28:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-bluetooth+bounces-4810-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=cPBZcMlW; arc=fail (signature failed); spf=pass (google.com: domain of linux-bluetooth+bounces-4810-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-bluetooth+bounces-4810-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 295F9B20CBE for ; Mon, 20 May 2024 16:28:28 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 055CF137932; Mon, 20 May 2024 16:28:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="cPBZcMlW" X-Original-To: linux-bluetooth@vger.kernel.org Received: from EUR03-DBA-obe.outbound.protection.outlook.com (mail-dbaeur03on2045.outbound.protection.outlook.com [40.107.104.45]) (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 B4F1613776D for ; Mon, 20 May 2024 16:28:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.104.45 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716222492; cv=fail; b=suVhyS7raHqMVPlW1Plmj8Zf6vJeWAvQKjK8ja1W9GDCWj5c/yPJUEafIKvDNlDrmJOtouhra3xXl1PFwwpsTtKR+vENdulTn92pjogf6AgFH+vBne/FMvb7ZT2i7n8koIqmB9mmxmZ3jy4pTeIdW0CzEOnuTPsFDvKeGf1XrOo= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716222492; c=relaxed/simple; bh=ToP/O856QOj6gcvoMgFGX5N1I5bvOWQGRvGlq9Fx8+s=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=m0drKKsHJJwrb0JsmJvalysDPvy4S4cfKKDrUJJbI3a0LlEc9ZPBeX0OmfNz6VrewFmSSf+ohxEa/FkHRzCzg3fX5+ZmPo9DLqYXQf/UfGHkuU9dRywmYleixU/Pu2LAdsgRBQ1e66lvCMQIu+/fTWCvsuVHr2CQ38ezLA5TR60= ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com; spf=pass smtp.mailfrom=nxp.com; dkim=pass (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b=cPBZcMlW; arc=fail smtp.client-ip=40.107.104.45 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 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=D4U9NUH84Go5aVDsKoG+UiqxxRWhRs+DmAnNbN+BN0QujddQR39CJ+0YTKHEji6rZFpH7dqEHzlXhTfWp5RhKvUa5joX3p2aKsbAMqGWGgaLFR4LlOxhXA2rAORwMKUJSGjr5dVBxVMonKWhBV/bwAZ2d6donvUbcOwTim1hiK+Y0b2G+4Lk5+WxQ72NDTyCB0ajo9fD40l4z5FuUGp2e6mWRbBBo3lvGywfuN0zGSQwWzG804zOfLFOPVU44HCaE+GE6hNvTryp0OUtbOf7+Q1HluKi+oPT24Mgtb3/7WJrJhmZF1BoObhs7yRnzdH9K3B3Etf2zMGpddzfbpa0Tg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=dOiuB0RXLR6NGYM+hO8ZJeXrMvzNZaU0T35sjPoztRk=; b=SF393t3yjHjGUUohC8YOvh5icYNcsIIfK8TXcpKaMvsTnCst0uC1hwWmv9eUsoT9NKmkPiYeYe44YQsTfkxr6ql8XAo9DgPagOgNvd3Av50KQQhG5lGmFBys+a+CE+XLc36XnMIMk6RGnssafYWHYtHujlW2xP9QhAex0EsJscYG5lNMcvjQhGHtv6ZSrmRp8WkyR2OQC92gXth3jZynMntTNatLb+n1iQGgNY1SfUWRb830ugi4kks6SkyLea0i4rUSXLFKNPOjqEKGxTGtrQPbwR8JTDn8IEJzQb+VthCXVp4BMaMOVzV9YGbWPmT266SmIlz6LxI2MZgJVkGl3Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=dOiuB0RXLR6NGYM+hO8ZJeXrMvzNZaU0T35sjPoztRk=; b=cPBZcMlWI2fAjzYhBH5R+V1ZpoX5FOzIxFNiLCFxiuRffKd3IsalY4Uc9RK0heGm0acpBpEVS9XChwWk/VWdvpu0rEyHfxG1iTi+/1Jh/uET28YUEc/ehq0ku0BqQSc6H84Tf0KldSe4IXOGybh7xmF1F1zhMQ/TCd1KcGAbxgE= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from VI1PR04MB10073.eurprd04.prod.outlook.com (2603:10a6:800:1dd::8) by AS4PR04MB9436.eurprd04.prod.outlook.com (2603:10a6:20b:4ec::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7587.35; Mon, 20 May 2024 16:28:08 +0000 Received: from VI1PR04MB10073.eurprd04.prod.outlook.com ([fe80::81ed:c7d0:c2f6:8ce4]) by VI1PR04MB10073.eurprd04.prod.outlook.com ([fe80::81ed:c7d0:c2f6:8ce4%7]) with mapi id 15.20.7587.030; Mon, 20 May 2024 16:28:08 +0000 From: Silviu Florian Barbulescu To: linux-bluetooth@vger.kernel.org Cc: mihai-octavian.urzica@nxp.com, silviu.barbulescu@nxp.com, vlad.pruteanu@nxp.com, andrei.istodorescu@nxp.com, luiz.dentz@gmail.com, iulia.tanasescu@nxp.com Subject: [PATCH BlueZ 2/2] bap: Update BAP Broadcast Source state machine states Date: Mon, 20 May 2024 19:27:57 +0300 Message-Id: <20240520162757.78187-3-silviu.barbulescu@nxp.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20240520162757.78187-1-silviu.barbulescu@nxp.com> References: <20240520162757.78187-1-silviu.barbulescu@nxp.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: AS4P189CA0054.EURP189.PROD.OUTLOOK.COM (2603:10a6:20b:659::18) To VI1PR04MB10073.eurprd04.prod.outlook.com (2603:10a6:800:1dd::8) 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: VI1PR04MB10073:EE_|AS4PR04MB9436:EE_ X-MS-Office365-Filtering-Correlation-Id: b34256f0-cfa9-47c3-9a6a-08dc78e9d553 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230031|366007|1800799015|376005; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?p7VbS+KyY94XezsFvsccxq5aef2PSYfqNoz9Qos32Tj+MBHKzg0Iia68rXyi?= =?us-ascii?Q?e/Vk5qkdL2gAL0HKsImSFC+KoekiNuOedm6VsP8SrJpLs0Vg7xXXLa8cEM2S?= =?us-ascii?Q?WuHwUSjM411JLhD6fumKQbTeyECU4P/gkVt2U6//H+qIKTdq7SdNynjDJirh?= =?us-ascii?Q?WD8IVGLMQHW7FnMklJeHePA0pQqCF2hzuDq69vs1L1mjILJhuGZHEfMqtjCO?= =?us-ascii?Q?OdpuDnqWNfa/4bqATFmstGHALTFph8V2GZbnlz07twCRK7XL4/fIaoZPl6iN?= =?us-ascii?Q?wgMaPWZEOVdPGfskolrttidhe74sKjX1pFQ/JJ6iNb3iKFGPj1T6q7fJGFls?= =?us-ascii?Q?Je3Fj2nEA7sBB+gTICCNkTkcyviLtJjcyzR9v/RnD2FAs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6CCO3bkgQQqp88urSWQ=3D=3D?= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:VI1PR04MB10073.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(366007)(1800799015)(376005);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?LQBP+9vZLdC+sFZ3iWigI3KCGBiwuIYLS8RQ8y+G3y8Qi6tDK5w+Vs5p+Xn7?= =?us-ascii?Q?I2iiWlWVw80FcpPAp0hma6N0Ja0q7OuXn8SnwaLfjDi3Pyq6slOCaMdxbDZ1?= =?us-ascii?Q?LPn6tM7Sv6JjoxSXHXhVSkkfJxY6rKlOtjX/9gzkMpPAHIeNaYiuVmkPUQGf?= =?us-ascii?Q?7FJRZ9ZYem7B2UFMnTWzzXMBJHK6qfnVfAaxgiCShgp1O0lyH4VU5NdAD2fL?= =?us-ascii?Q?+hvZ4QTToYLh+bksaZ9viY6iGVEklO+30Rj9abds69GXGgBXQ8Lu/DG3Cegl?= =?us-ascii?Q?1nxXAJgWqvj5xRnvqxtF5c+9D4/+sg4FryMphKbQO1U1/MVd5hRX1tEvqcts?= =?us-ascii?Q?0Zri/KVAAlakLklmhwUnvcQ9y8lJUbAKwvJh7fqDt2h3xV5ZLSoQXsux1RVN?= =?us-ascii?Q?T2xBFxDPCJdhhUgRCV+DbQwTxFV9XFjVFQwd7fgfeQZbSzxAc+MeeRG+Uzij?= =?us-ascii?Q?/hNCLyDBdNiDi7lcIJa967L7cpDCViOD/lvufVNCgMy/QUEpAZiJypXCWryP?= =?us-ascii?Q?UvGUMO4nt7dGtgxFxY2HXm47iSOvxQIFPeBCWwVuXQIMvQMxWp3Vxkf1s8QD?= =?us-ascii?Q?gx9fIozFEek6568p7lDxCMC+95scxQX8xh2mXEVZZeaGHrXhBPS1BAnYIfSt?= =?us-ascii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8SvXYURjNMJkMtDcRLb5brqBWohuK?= =?us-ascii?Q?w5ZoDfZUR0iEgaiHWy0bIOq74fHzd6nY7yjEebxEjkvPpCAbb98ISaDnHb6y?= =?us-ascii?Q?Ag=3D=3D?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: b34256f0-cfa9-47c3-9a6a-08dc78e9d553 X-MS-Exchange-CrossTenant-AuthSource: VI1PR04MB10073.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 May 2024 16:28:08.2586 (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: dlcosqTSlL3a5KSPuQj94gEb+wDwbO5HiypbRpLGvKN+QnCzfIrbOEblj0jNxyf3WDuvSKvTrhwMEDwbB9WvqVZIJvpOL+kpqXFODax4lII= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS4PR04MB9436 Update BAP Broadcast Source state machine states --- profiles/audio/bap.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/profiles/audio/bap.c b/profiles/audio/bap.c index 06dc4e254..65684cac4 100644 --- a/profiles/audio/bap.c +++ b/profiles/audio/bap.c @@ -2474,7 +2474,7 @@ static uint8_t get_streams_nb_by_state(struct bap_setup *setup) */ return 1; else if (bt_bap_stream_get_state(ent_setup->stream) != - BT_BAP_STREAM_STATE_CONFIG) + BT_BAP_STREAM_STATE_ENABLING) /* Not all streams form a BIG have received transport * acquire, so wait for the other streams to. */ @@ -2516,8 +2516,12 @@ static void bap_state_bcast_src(struct bt_bap_stream *stream, uint8_t old_state, queue_remove(data->streams, stream); break; case BT_BAP_STREAM_STATE_CONFIG: - if (!setup || setup->id) - break; + // TO DO Reconfiguration + break; + /* On transport acquire use BT_BAP_STREAM_STATE_ENABLING + * as a substate of BT_BAP_STREAM_STATE_CONFIG + */ + case BT_BAP_STREAM_STATE_ENABLING: /* If the stream attached to a broadcast * source endpoint generate the base. */ @@ -2855,8 +2859,7 @@ static void bap_connecting_bcast(struct bt_bap_stream *stream, bool state, setup->qos.bcast.big = iso_qos.bcast.big; setup->qos.bcast.bis = iso_qos.bcast.bis; - bt_bap_stream_config(setup->stream, &setup->qos, setup->caps, - NULL, NULL); + bt_bap_stream_qos(setup->stream, &setup->qos, NULL, NULL); } DBG("stream %p fd %d: BIG 0x%02x BIS 0x%02x", stream, fd, -- 2.40.1