Received: by 2002:a05:7412:3784:b0:e2:908c:2ebd with SMTP id jk4csp1415934rdb; Mon, 2 Oct 2023 08:53:49 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFacOhqZRdnQteTQJlwqreI5MzdYeZSrSVOZmDvTbNZMGf7i4GH+9vFrknfi5c5js1e3tbq X-Received: by 2002:a05:6a00:330b:b0:68f:cdb8:ae33 with SMTP id cq11-20020a056a00330b00b0068fcdb8ae33mr9614pfb.10.1696262029508; Mon, 02 Oct 2023 08:53:49 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1696262029; cv=pass; d=google.com; s=arc-20160816; b=Oj3jthpcngMQr7S8af6oG3XWBOVq8+7CR6/LxsZPPDP0s0dzFI7+um0thXggNCy+qb yT3nWp2S3pZ2MYXfL1Hwu3KL8i16JZQLZfHKBa2vCm/3PgEbX2VdTtPD2XFhmI3N53FK svvjKp94rJ9wFclAczTCl1t8+1c/ZsvJq9jh4oMD2QxnEiPzHvkrhRsm71fEEExuNhI5 OYgyma9ils5+GW5nWcytpyM4XNyKN0vNUo9VvOFD83kxzVz1+3zeqtgrxWJaWF8kls8i 6+b4QnafAKw4LyU1harlOayrWCjhheB5OfEfCfCvfVq0t4kwLvsgSmZXypW1YXw+1TKv kVJQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=jiPDUswL6jCg5ollJgqjcCO4jzlrHvAH0G0HqFV3/QM=; fh=lDnEzIzpkpzgt/qzaRCbsI36kr1UI3tvEUiaUCM1Ycw=; b=ty1N8wdhPdm5Nln97Bbh+ygqs7aooi5trUbW8zxi6lTWIRtErpVrdoNpT0O5LjZYgA sG1arHEKmTTq1anDgxd/KMw7Wzo+DwJKxgiSjn2mhsUWBvPvFXC0G4FORmrPgdQkK7k8 rwbdJW5uF+xUe5Jw2qITp/ZauTkS55kJs1ppB2f6CPlJVL9NpRuxOKrMdlxRSiElq5oF yh95IkDf/3RSpRFwGPBY1yFXYxk6z1rKGHBlq2OAV/C43oWaC6775JRCP1g5w9+1MFYs Y45u23ZGF/zOgSH3Nm2+VT3xM5/rJVUaqTs7xQsDnc8siNy8QUmeTdNOtsua+nfrZFBF r1Lg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=rqTNlanD; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.com); spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id k139-20020a628491000000b0068e3f3c6250si27376528pfd.343.2023.10.02.08.53.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Oct 2023 08:53:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=rqTNlanD; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.com); spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id C7146807D3FA; Mon, 2 Oct 2023 08:34:17 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238125AbjJBPeP (ORCPT + 99 others); Mon, 2 Oct 2023 11:34:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53818 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238123AbjJBPeO (ORCPT ); Mon, 2 Oct 2023 11:34:14 -0400 Received: from EUR02-VI1-obe.outbound.protection.outlook.com (mail-vi1eur02on2041.outbound.protection.outlook.com [40.107.241.41]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C4DD9BD for ; Mon, 2 Oct 2023 08:34:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=DBSR3qBdyAozPoM5gSVUxhzxF5JzJmsDYoxus954yIgddZYT472U0sf5etJgO3sZF/MZDY4sjIFGyeTch+SzqtnJACfNw/D9knK0LW2RE6YwV1+YE010WqgbVXxcIK+yh8QrnO4QNcdmtMuLiFhl4CJS0uCZ1wUgYNWJjKAwHhr3vOZ9RR5Ksu6lTwabPahiBJG4QZa3DyqAFv3s3vFHc9EXeFki2W3fTM2qU4/Kum8wCVAR9QaNoirDJVhSW+H+IosHhessp9swmr8pJodFDTGnZwNvCobrejsvIr6UXaf+Ia3TgvCRR2RiiDQutx10IFJsv/nwnJyrvrXvF0SCsg== 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=jiPDUswL6jCg5ollJgqjcCO4jzlrHvAH0G0HqFV3/QM=; b=TnM3y7ipwCfS5L9jjdImjq5ahEcsc1eAU/UP/GRw1xRokjGJp6bo7QkfOCu+pi1+GXHuody7G0F1qJ/1VV62/eo24QTFNNej3HNhQ2X98HrXtRFInV4SSH0RT8bffabZt6wBsmSluJAYKfeyGqxiNqRKS1FekDDlnkJa8PsU1sfa6e7GRZ1Njeajei7Zm7/hRsu5IWq4wGZd3oeq1FPynnDfpf9+uI7cTp0GBXC9DjUC2ivS3WNLKEj95JXOlT/FDdX6JphySIAmGeRcqX9ZMkI5uq55TCfga+m8dM+HbpatLocJu8FFmECk/xNKG29vB0yBvMJL3r0xPRvBi5Jbuw== 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=jiPDUswL6jCg5ollJgqjcCO4jzlrHvAH0G0HqFV3/QM=; b=rqTNlanD15B8+zgCYwYqsGW73MJwD9jl1qYqUg7vrXPKVZTlKb/dxoqbSa2E9cPDFMKM/wT4m+KKniOLLj+vmDV6zFAJWiBA5uvgpSAYFqw5A+Wqykw11V7TRR8LHUz0yt3tSQyGDt4a+tHz6udhx3ZzFu35pUsgQdN8kVKZe9E= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from AS8PR04MB8898.eurprd04.prod.outlook.com (2603:10a6:20b:42d::15) by DU2PR04MB8839.eurprd04.prod.outlook.com (2603:10a6:10:2e2::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6838.29; Mon, 2 Oct 2023 15:34:07 +0000 Received: from AS8PR04MB8898.eurprd04.prod.outlook.com ([fe80::7763:779b:1a89:47da]) by AS8PR04MB8898.eurprd04.prod.outlook.com ([fe80::7763:779b:1a89:47da%3]) with mapi id 15.20.6838.024; Mon, 2 Oct 2023 15:34:07 +0000 From: Iulia Tanasescu To: linux-bluetooth@vger.kernel.org Cc: claudia.rosu@nxp.com, mihai-octavian.urzica@nxp.com, silviu.barbulescu@nxp.com, vlad.pruteanu@nxp.com, andrei.istodorescu@nxp.com, luiz.dentz@gmail.com Subject: [PATCH v2 3/3] bap:Update transport acquire/release flow for bcast src Date: Mon, 2 Oct 2023 18:33:52 +0300 Message-Id: <20231002153352.3163-4-iulia.tanasescu@nxp.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231002153352.3163-1-iulia.tanasescu@nxp.com> References: <20231002153352.3163-1-iulia.tanasescu@nxp.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: VI1P190CA0035.EURP190.PROD.OUTLOOK.COM (2603:10a6:802:2b::48) To AS8PR04MB8898.eurprd04.prod.outlook.com (2603:10a6:20b:42d::15) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8PR04MB8898:EE_|DU2PR04MB8839:EE_ X-MS-Office365-Filtering-Correlation-Id: 265e739f-012d-4da6-e20a-08dbc35d043c X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: D5gfJB11V8/LSEiRnGkW/MoVrcP76cQJrHtNxV/3mnpc9vWjYA8vWD/e1lGNfQ+XF/gsroqiEKYSVU4qb5WCaUQ4wNw1VmC2bALFtr2ac4mGoQ9ssFS36C2LElIvTY9Z8WtuEj76ZnG6e5UnE43sMYYwQc+bMgL6Tiu1pbNx8fbTS4xaE7joHNw80/0oGgXPo41fQQrMOyCZVjhJxE4fcZcDkGMJgAnN4tjwQGigngukQJ9odbQYz1Q2ildOClJSP1qLHI9RqmiZH1F71fNlY2OxXojj6TK0jIgfmVnL54jBr9qYveJ+bbFutwDsKHh9u1a5ZPVrG9iLKz9OsOdKpP3MZ+REFr18QD7f8hKOv7antovONfkC5LVsL0YqY5tmaH8D0YyuEWI9NVtWlSWQ9XKHYlk+ke5902ClX8xn7nrkbZko9Au3vHzP2Wg0S/4C+NQxHhF90P96xZNNEWF5uDLD6O47x/YbRZ9qadlqS+w/rVc7F109GxW8BOQlqNtgY3NvJvDIHG8x65BO9wFCgeb83nn/jgj+WIy3EQ9mvUihhWVYfdMFcEbqYwIuTlZ/ X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AS8PR04MB8898.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(136003)(39860400002)(366004)(396003)(346002)(376002)(230922051799003)(64100799003)(186009)(1800799009)(451199024)(36756003)(2906002)(41300700001)(6916009)(316002)(66476007)(86362001)(4326008)(8676002)(8936002)(44832011)(5660300002)(66556008)(66946007)(15650500001)(83380400001)(6486002)(2616005)(1076003)(478600001)(26005)(38100700002)(6666004)(6512007)(6506007);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?6FGkAbpSwyuj8FuMRj4ofliUyBh6v4wrfBcH/Vtp9Z7FlmEQ0T6TzRvl/tlG?= =?us-ascii?Q?noa4Ocylo1CVpgkdCxFKGtOlN6N8bLSfmNSGJtL3jAeuvqO6aHuK0cTfwk9k?= =?us-ascii?Q?n22mWGT2TVJ+W7UZVuyV0Ak1rRDZbBKmBKSwDgRDipiWE1tZqS8qrpG5z3Z9?= =?us-ascii?Q?t4qj39fDzs+nGeYzJ5/SGOMOdS7TqrZkRZQ5j/eldgbKn9sHuwdmG4wpfbWD?= =?us-ascii?Q?NJk8/LdJx8m4ClxtUf07lZQHkBwqLQnx+jRNciPIxaREU82tfk32zzbrjr2n?= =?us-ascii?Q?zSAqrov1a2gFR8nNbUC+44KF9Ham6YZPy3rPxMWEKzZYH7lSYGcnX7KBzZeI?= =?us-ascii?Q?blIGJ7cwjZZbQGPSU8kSqZeGB9wTzXApQPTHh7xs7T91C4zmKFNwf69uLUhm?= =?us-ascii?Q?VnE2N8MfDBJWgt8UR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1VfmExix?= =?us-ascii?Q?kPTittpXPvGhhjuDM5s9WVpNn6kxQeFiJ7njKztaau2DbI48p6GayNcRIdQ1?= =?us-ascii?Q?55uLqaaVNLaYxBMFTas41Gj3npGGUKVKNSPGm++sSDDThjMOeBhh3MFNm3ug?= =?us-ascii?Q?3CzVnbRCZRLJduUU90uD3fGyAzr8eY5a1sbTbbz1vQKfu3zdx3FlXvDGhDgV?= =?us-ascii?Q?WE1pm6MXjxFZ3MHAJ71Zya2S9lqlaa6eL44eRJA2QydJpJ/yI8aJsXqC52E8?= =?us-ascii?Q?EYbRV7iM/GJcLHZ+VLcN7ihyl0PZU9NB48ZDzdUQ/OvXNzxcYA5aHDkTAIXX?= =?us-ascii?Q?uQ=3D=3D?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 265e739f-012d-4da6-e20a-08dbc35d043c X-MS-Exchange-CrossTenant-AuthSource: AS8PR04MB8898.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Oct 2023 15:34:07.4493 (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: UC3+jFqzs60kPkplmrL47/c7tgFaYcmkGukiQkjtNyasaFjsrDXOmZSoSzAI866VTVie/Hp+Gp3zDDyeYwEF1g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU2PR04MB8839 X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Mon, 02 Oct 2023 08:34:18 -0700 (PDT) From: Silviu Florian Barbulescu Update transport acquire/release flow for BAP bcast source --- profiles/audio/bap.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/profiles/audio/bap.c b/profiles/audio/bap.c index 48a1a4f86..9a46b16ab 100644 --- a/profiles/audio/bap.c +++ b/profiles/audio/bap.c @@ -1328,6 +1328,10 @@ static void iso_connect_cb(GIOChannel *chan, GError *err, gpointer user_data) fd = g_io_channel_unix_get_fd(chan); if (bt_bap_stream_set_io(stream, fd)) { + if (bt_bap_stream_get_type(stream) == + BT_BAP_STREAM_TYPE_BCAST) { + bt_bap_stream_start(stream, NULL, NULL); + } g_io_channel_set_close_on_unref(chan, FALSE); return; } @@ -1887,18 +1891,16 @@ static void bap_state(struct bt_bap_stream *stream, uint8_t old_state, } break; case BT_BAP_STREAM_STATE_QOS: - bap_create_io(data, ep, stream, true); + if (bt_bap_stream_get_type(stream) == + BT_BAP_STREAM_TYPE_UCAST) { + bap_create_io(data, ep, stream, true); + } break; case BT_BAP_STREAM_STATE_ENABLING: if (ep) bap_create_io(data, ep, stream, false); break; case BT_BAP_STREAM_STATE_STREAMING: - if (bt_bap_stream_get_type(stream) == - BT_BAP_STREAM_TYPE_BCAST) { - if (ep) - bap_create_io(data, ep, stream, false); - } break; } } @@ -2116,6 +2118,8 @@ static void bap_connecting(struct bt_bap_stream *stream, bool state, int fd, ep->qos.bcast.big = qos.bcast.big; ep->qos.bcast.bis = qos.bcast.bis; + bt_bap_stream_config(ep->stream, &ep->qos, + ep->caps, NULL, NULL); } DBG("stream %p fd %d: BIG 0x%02x BIS 0x%02x", stream, fd, -- 2.39.2