From patchwork Mon Aug 7 11:02:23 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Silviu Florian Barbulescu X-Patchwork-Id: 13343311 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D1E24EB64DD for ; Mon, 7 Aug 2023 11:03:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231713AbjHGLDz (ORCPT ); Mon, 7 Aug 2023 07:03:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40358 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230467AbjHGLDk (ORCPT ); Mon, 7 Aug 2023 07:03:40 -0400 Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on2041.outbound.protection.outlook.com [40.107.22.41]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DF1881BE4 for ; Mon, 7 Aug 2023 04:03:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=K8oAsaSYkuUNiZvVXC/dW0pj2BifNLWgaiL33iINuQRxIT4BMcjKX/NUo5sbioQNkx2fKwt0xcP0niHyz7kGhy2Pam9w3q03eGHaQNR1w4WCBS9lsWJMpaQKbZeu7SYF+65ipztKu4bJH5fkGxnu6UAmAkL69FpbgwdlKPE5e4NYYoBbg12FoNMmydVgUGP1ebgsO39tDo6E3Pp7m4dGYcIj6p8XdpDqoQbjY1iiDNIUVQYTsIsw4eyqAj3Pa/sAKp1BMOzI0/pA5qnxqORSTqcISWB/ZbSscqKmgaiMVaKT77cdSLOG0l/8ZPYOxJp0VGP0l7GztWjFEX9f6ytXzQ== 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=Tkx05TdJrX/V8R/3Swf+kScbEF7MBI13XnxQ/WRAe+4=; b=lVcjNCtXvTFY6MolCINUize7JOkg2ApvUA5kySaK/FIRnL2MXefl5wAPe0MXOf+S97SGsqJtfe/O44RONsyn66fArhsE4yKtqe33m+8Mekir5+t5niQyYpe5WBGQBNMl3RzxLkK+Id0JnrSCyHUqOOsVKH5CrGOuSXBSS1T7+u3xsxu8UFOMyGvUr8DStADlzbuxLxMAdb4r8HAUBTBT/aGyE/7581WZnikJqLiJOZHmVQivcnt5A7hh658/ho2/BpokDguS9Yi6PO4mAHNZoMowHHYHFSjksiHWmnIrneETFFqC++/dTE+E5cnkm1Nm4xIMneX7GIC1vGILhRP+Rg== 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=Tkx05TdJrX/V8R/3Swf+kScbEF7MBI13XnxQ/WRAe+4=; b=RoAVFWXzAIxLJ5aufbLlnu320bSKf8+NrgeVfOFbXAo7yuSqVU6ySLckZHvicxwiciVWfNtPxJV6KKZIprCTSzRrZ298UPd5bjyAdGuACOQTGR63qrhxuKTiqjY6WgdecYqttVN281fqXdMNLCudpnTmcOl2eQ02mqgXn99J3Zw= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from VI1PR04MB5344.eurprd04.prod.outlook.com (2603:10a6:803:4b::31) by DBBPR04MB8028.eurprd04.prod.outlook.com (2603:10a6:10:1e0::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6652.26; Mon, 7 Aug 2023 11:02:48 +0000 Received: from VI1PR04MB5344.eurprd04.prod.outlook.com ([fe80::cf28:7578:cc46:bc2c]) by VI1PR04MB5344.eurprd04.prod.outlook.com ([fe80::cf28:7578:cc46:bc2c%5]) with mapi id 15.20.6652.026; Mon, 7 Aug 2023 11:02:48 +0000 From: Silviu Florian Barbulescu 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, iulia.tanasescu@nxp.com Subject: [PATCH v2 1/2] client/player: Configure BASE using separate structure Date: Mon, 7 Aug 2023 14:02:23 +0300 Message-Id: <20230807110224.6024-2-silviu.barbulescu@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230807110224.6024-1-silviu.barbulescu@nxp.com> References: <20230807110224.6024-1-silviu.barbulescu@nxp.com> X-ClientProxiedBy: AM0PR07CA0001.eurprd07.prod.outlook.com (2603:10a6:208:ac::14) To VI1PR04MB5344.eurprd04.prod.outlook.com (2603:10a6:803:4b::31) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: VI1PR04MB5344:EE_|DBBPR04MB8028:EE_ X-MS-Office365-Filtering-Correlation-Id: aebe540d-fe5d-4395-9be2-08db9735d5c2 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 34sy0yWs+eIcawElmGKR6AeHvXZEUTfcIf+Tcgyo4ve3vH6D39dqMBWeuy4Mn4e3Xis7c/XejfzOQRX4beHcGdqmG+kVw1hcQoosZF3huE6sJp3VzLMXKdDBcRsKK85quaa18ajjryl7tzOX62pVCHPHokwtnZlNriJ1ziH7/tM5Bjz2JN3bt0WeS76QvZlvNxpVVNlwgoHuSOrZQ5y8Q6wL5ofa4kA9eGLK6S/feuEjABg3vRRpvwhgqmaIuXAC/tY70uL9u9aWOYqkm2/xQwELBGFN4+WCUdi93tvKdtPL/L3+Ef4X/+DGtTlvq5i+VDB5AhA1X6S8eS9ojfAeaPW2S7jeoY23M6cNPA/7FqY+1pmaxAYJdOMrpg9shDSEMo/JTwBA355Rp3b92YRTIgfhIArAGOyf1kjajGyh29uaO8fUVaBPeWwsSJOZDQfZ5oLsnPbQlGu14uTm3zNFPlCD4bgTigdkf89Jqw/DIRZtKn8GLPt68WKICCvvrV2Vp8ya+THkdAFEMAhHlwc3LiA/4copJhLKNPICmFzlKnUO7haHoNaaU4oUqoh/R+0QneLcUyuAuHvyz2gTkSF7BA+Vbw+bbFjqjust4ebFKRgbTLViHkqpsQaNDx21DkC4 X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:VI1PR04MB5344.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(366004)(376002)(346002)(136003)(396003)(39860400002)(1800799003)(186006)(451199021)(1076003)(41300700001)(26005)(2906002)(5660300002)(83380400001)(8676002)(8936002)(2616005)(6916009)(86362001)(316002)(6506007)(38350700002)(38100700002)(6486002)(66556008)(66476007)(52116002)(66946007)(6666004)(478600001)(6512007)(4326008)(36756003);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: SlVU7O4+CJudJAK9Oj1dTCIpnOzbFM4WvAosrF508CmBnarBmLEAapOStUZNNZTFoeSLonkWeUwHhlhodi1X6/eo8yi3A4SxnoRKuEV7z6m9a9hz+HgGWICBEv3A4GzsesWfNkL9h+DXsq7dVFzjPwT10o7tQKl1SMhJAsJCJk6MevDMZrd+KQdiTdInfdlYeHYU8trFdnCjsjAtPe0hVFn7zwrgf7bUjFqGMv+ab4pCsVT1rsIr/R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2Klk8NAk9y9c33PrDxIqcxFawMFDGWfE953plDy0hOE9FVT0bx8wwEjmfU/qsFOF/Zos4E4haekLCOU0rgqwuv1kFRGdz9ARPB0VecettJ1u527Q6sArz6XPWNo12MXzVkyzXiMYIvK0laH9a//lvyMTnlD77sJzmJstEgyfBj7DH/R4RciPh35+V0M41lL/chVduHPtBk1fwTsI1F/hAo6ivAAkSGAq79UEmeN6kFGzosIt5BU9tlt5Uzxl7+zkWi7gkFTbMGNQFl9gbPUPkGHesioFzOnVlnqMpvG2A== X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: aebe540d-fe5d-4395-9be2-08db9735d5c2 X-MS-Exchange-CrossTenant-AuthSource: VI1PR04MB5344.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Aug 2023 11:02:47.9784 (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: Xq4x2S30zOXfUahpOpsH8Jw+wboSOtuhyfEj3PxFCz5lWDoClZn4YCyCXfvJEh1lEveTxZw666my6lyNt5PjIKrFDS847uA+AHa/hRb+vhw= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBBPR04MB8028 Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org From: Claudia Draghicescu Use preset configuration in capabilities. Configure BASE using separate structure. --- client/player.c | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/client/player.c b/client/player.c index 9bc5f2a36..00ab33084 100644 --- a/client/player.c +++ b/client/player.c @@ -1735,6 +1735,7 @@ struct endpoint_config { struct iovec *meta; uint8_t target_latency; const struct codec_qos *qos; + struct iovec *base; }; #define BCODE {0x01, 0x02, 0x68, 0x05, 0x53, 0xf1, 0x41, 0x5a, \ @@ -1766,6 +1767,7 @@ static void append_properties(DBusMessageIter *iter, const char *key = "Capabilities"; const char *meta = "Metadata"; const char *keyBCode = "BroadcastCode"; + const char *base = "BASE"; dbus_message_iter_open_container(iter, DBUS_TYPE_ARRAY, "{sv}", &dict); @@ -1902,6 +1904,14 @@ static void append_properties(DBusMessageIter *iter, g_dbus_dict_append_entry(&dict, "Timeout", DBUS_TYPE_UINT16, &bcast_qos.bcast.timeout); + bt_shell_printf("BASE:\n"); + bt_shell_hexdump(cfg->base->iov_base, cfg->base->iov_len); + + g_dbus_dict_append_basic_array(&dict, DBUS_TYPE_STRING, &base, + DBUS_TYPE_BYTE, + &cfg->base->iov_base, + cfg->base->iov_len); + bt_shell_printf("BroadcastCode:\n"); bt_shell_hexdump(cfg->ep->bcode->iov_base, cfg->ep->bcode->iov_len); @@ -2758,15 +2768,15 @@ static void cmd_config_endpoint(int argc, char *argv[]) if (cfg->ep->broadcast) { iov_append(&cfg->ep->bcode, bcast_qos.bcast.bcode, sizeof(bcast_qos.bcast.bcode)); - /* Copy capabilities for broadcast*/ - iov_append(&cfg->caps, base_lc3_16_2_1, - sizeof(base_lc3_16_2_1)); - } else { - /* Copy capabilities */ - iov_append(&cfg->caps, preset->data.iov_base, - preset->data.iov_len); + /* Copy BASE for broadcast*/ + iov_append(&cfg->base, base_lc3_16_2_1, + sizeof(base_lc3_16_2_1)); } + /* Copy capabilities */ + iov_append(&cfg->caps, preset->data.iov_base, + preset->data.iov_len); + /* Set QoS parameters */ cfg->qos = &preset->qos; From patchwork Mon Aug 7 11:02:24 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Silviu Florian Barbulescu X-Patchwork-Id: 13343312 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C6807C001DB for ; Mon, 7 Aug 2023 11:03:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231767AbjHGLD6 (ORCPT ); Mon, 7 Aug 2023 07:03:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40730 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231817AbjHGLDn (ORCPT ); Mon, 7 Aug 2023 07:03:43 -0400 Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on2079.outbound.protection.outlook.com [40.107.22.79]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6D3381993 for ; Mon, 7 Aug 2023 04:03:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=eYFDObwsfTIUX5JpbOULNCqq5YITRFVAEcV29/4Gnx4Eq7WopnBiHjT8GWJaPiilnqjEI/jDykeFVhDd3a7Yn0C3XmSM9XfImmwK3sgxYX/Nml7IpDR3zS0nDP9DOvuYuCyX7fjaWr7O00SW1BBj4AtpWqTmr5NrchYW2vrTTHrYjELlxl5VPSzCUwMr7EwRwd25lFcBrdAkSy56d4Hs7wr3sAzW5AmDXecKd0h+HDUqlMbeo3vTBLKt3tb3Ejks+gw/SVdlhYc3hDzn6/vEH1RC6wepLin2/utf7ff36Jnri5wy3VPBLEq3YfpCka4HXGW1lRYmvPCl41+LcQrOgQ== 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=8VjQziBAdm18KBh1onKTXcfYV04bncbVpIWqcIhzjf8=; b=UWK41ebsP7usLk2YWI9FyJFvHw6KsryBxN/tkflgoYeWQncrwXcbMdqzapggwXL3nC5+Ao4Ms4f9TdPdtU8Ln5EWewCVrYEIGHqXDn0k7qbmgJQUGNWTDtFHTgCgdMcp9sRJ6w4CYYKT7dbcMJj2yNH/eG8lbbh0C7/HBxRSCdxjbqO9qmZJrSkGLuUy/fCPPVhiABywGmysqaQQxkmy8ZYZtq1bL6AHqdFc9Dzlb1/Q81JgjILIwRfWSnllt1XYJIkSBLz+dcgDH3JxJROlxJcMssRp33gYy83gsSs6mwMVWCPI9TMR9bTwXRx4BN1pRU7IWnHffhTH6RaJK1Bn9Q== 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=8VjQziBAdm18KBh1onKTXcfYV04bncbVpIWqcIhzjf8=; b=JFYt7F1NsS88MbDVwKfQ7j2sVRDtRONCcMQIxO93fJMKvD471qJXW+XzmOaXinihHwfLnxzlBGswiyFzrgngKbuek46FmygyZW+X6x6y58uHyB019Kt6N33bbD6njMTVoAFBCAXdFW3UoO06BmUi0d7zi6+R476iHtjhSCPIx18= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from VI1PR04MB5344.eurprd04.prod.outlook.com (2603:10a6:803:4b::31) by DBBPR04MB8028.eurprd04.prod.outlook.com (2603:10a6:10:1e0::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6652.26; Mon, 7 Aug 2023 11:02:51 +0000 Received: from VI1PR04MB5344.eurprd04.prod.outlook.com ([fe80::cf28:7578:cc46:bc2c]) by VI1PR04MB5344.eurprd04.prod.outlook.com ([fe80::cf28:7578:cc46:bc2c%5]) with mapi id 15.20.6652.026; Mon, 7 Aug 2023 11:02:51 +0000 From: Silviu Florian Barbulescu 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, iulia.tanasescu@nxp.com Subject: [PATCH v2 2/2] bap: Use the BASE structure received from upper layer Date: Mon, 7 Aug 2023 14:02:24 +0300 Message-Id: <20230807110224.6024-3-silviu.barbulescu@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230807110224.6024-1-silviu.barbulescu@nxp.com> References: <20230807110224.6024-1-silviu.barbulescu@nxp.com> X-ClientProxiedBy: AM0PR07CA0001.eurprd07.prod.outlook.com (2603:10a6:208:ac::14) To VI1PR04MB5344.eurprd04.prod.outlook.com (2603:10a6:803:4b::31) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: VI1PR04MB5344:EE_|DBBPR04MB8028:EE_ X-MS-Office365-Filtering-Correlation-Id: 016055b2-469f-4d15-165f-08db9735d7ee X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: kwoHUkGQmG8lEldADoMfofT8QwPHRMYTM+NewnGLN8R7Gs5FKn/umcUYM0Hyw6Wf/9g6qZjpOQX4Gc/IIN6QkF1WmlQTB6M//GL23q5o9lqMOzT7kWHKssNTcbfshxEeYcpbEvpuXiJAmhvMjamGvVr7EXxSY1azpTmBcYAqSwTQ+6WiOtbHBteBs3zDc6M+X8JOi4Fu0wRNE7gUAJ1y7ruE/Y/mUfl57Au7hanu7cdSKlsPr4hPp4fRZ6GhdimltrH2V2ZLY8WANGJzrRB+wPjmdJ0MszHo3RKH57aHJ7fvdytTqMWIVudbgdLIrtRArWLj9ELtmPMmMnjD4AqkAUVRs+O6+lQwlSZlU8RmKo0GoKAQpGak27wUNAK7gO0rjdfAhUBMk92sOA+BTsALAlIs5RTu8BvfxhF/QAwjDa8KNHYpcJWLkda8lGPeV8ecyccXR78ol3IuZtsIzmTTr2oCOO+MpcT4NsLu/L4EXObtDwPZ9TwqwXpvxmYQLZX9VskvZVj/ExQuuvGWN4FCuFbvXH1jk8aBiKcXATh6otMNMCogl0t3XWgJbK684TFwF12MXCLDMUdsTWpp0ku41d6C0HExsCJzNy32OGN7yhy9Y8KV6u5vj4RSWud/DdmS X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:VI1PR04MB5344.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(366004)(376002)(346002)(136003)(396003)(39860400002)(1800799003)(186006)(451199021)(1076003)(41300700001)(26005)(2906002)(5660300002)(83380400001)(8676002)(8936002)(2616005)(6916009)(86362001)(316002)(6506007)(38350700002)(38100700002)(6486002)(66556008)(66476007)(52116002)(66946007)(6666004)(478600001)(6512007)(4326008)(36756003);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: esXHpsZALhVR8GksN4vd4Gk4l6Zq3YqNaSrZX75Jno4HrjUwwW+EeOyAG9qAmOOV0zCyxhGBK0Mz3j1kawqP3ihvzpYBltFk6lWC61QMIiML+AE2/OhYLk/hRGpY+8vx5xF5bWqBqlfEEh3WG4UncgQeHw7iqXKMTv3UtEIW8p9Jatdy3tsIchcKHf9vAzb/PwV8Zo061J9ZEKCKMXRwawGiW6n5jf/rWSfoBYYHzjTzn8qaju0j79lnp0XMRgNXRJasyLyf/vwTa6A5jBkhvalpbX4G4JGraflp6ihKuWyYbWWi6KxIurs25asDmAb1KevFMZpXo3fVfrLyD4U5xunXqJ1Y0EX83rYUxgBRvD1FkZwlQPSlCTGkgguPEtXO7M6AAMTgblimzICxcRrHNO6dN9EeRwg3vBmnfopQgqrsLjpCXj9O6P0kqoKj5GnXWKQF6OYt3pXTaC+hCeFLHk/GEMw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K9O6UL/KZKFaCQqg8FD65OtZ4MSjGyvwS2SlYjMXHxvb9J4jX91aAHwirPf/FKint4g== X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 016055b2-469f-4d15-165f-08db9735d7ee X-MS-Exchange-CrossTenant-AuthSource: VI1PR04MB5344.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Aug 2023 11:02:51.6049 (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: YaprZxMTluHIGbEBuRfBh7Nv+jL7Vyz3qj+k3l5ZXpueZBPgis7qvG0p/vGQGN1q/jyK4Wq+4tdVNiWrRxe7lIs+dLwIFzv/fZ9RlchSSfk= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBBPR04MB8028 Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org From: Claudia Draghicescu Use the BASE structure received from upper layer --- profiles/audio/bap.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/profiles/audio/bap.c b/profiles/audio/bap.c index 8cbb238ef..5dad748b4 100644 --- a/profiles/audio/bap.c +++ b/profiles/audio/bap.c @@ -74,6 +74,7 @@ struct bap_ep { struct bt_bap_qos qos; unsigned int id; DBusMessage *msg; + struct iovec *base; }; struct bap_data { @@ -272,7 +273,8 @@ static int parse_array(DBusMessageIter *iter, struct iovec **iov) } static int parse_properties(DBusMessageIter *props, struct iovec **caps, - struct iovec **metadata, struct bt_bap_qos *qos) + struct iovec **metadata, struct iovec **base, + struct bt_bap_qos *qos) { const char *key; struct bt_bap_io_qos io_qos; @@ -432,6 +434,10 @@ static int parse_properties(DBusMessageIter *props, struct iovec **caps, if (var != DBUS_TYPE_ARRAY) goto fail; parse_array(&value, &qos->bcast.bcode); + } else if (!strcasecmp(key, "BASE")) { + if (var != DBUS_TYPE_ARRAY) + goto fail; + parse_array(&value, base); } dbus_message_iter_next(props); @@ -565,7 +571,8 @@ static DBusMessage *set_configuration(DBusConnection *conn, DBusMessage *msg, ep->qos.ucast.cis_id = BT_ISO_QOS_CIS_UNSET; } - if (parse_properties(&props, &ep->caps, &ep->metadata, &ep->qos) < 0) { + if (parse_properties(&props, &ep->caps, &ep->metadata, + &ep->base, &ep->qos) < 0) { DBG("Unable to parse properties"); return btd_error_invalid_args(msg); } @@ -1247,7 +1254,7 @@ static void bap_connect_io_broadcast(struct bap_data *data, struct bap_ep *ep, base.base_len = ep->caps->iov_len; memset(base.base, 0, 248); - memcpy(base.base, ep->caps->iov_base, base.base_len); + memcpy(base.base, ep->base->iov_base, ep->base->iov_len); DBG("ep %p stream %p ", ep, stream); ba2str(btd_adapter_get_address(adapter), addr);