From patchwork Fri Aug 4 14:10:58 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: 13341922 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 78629C001DB for ; Fri, 4 Aug 2023 14:11:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231616AbjHDOLq (ORCPT ); Fri, 4 Aug 2023 10:11:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43202 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229579AbjHDOLo (ORCPT ); Fri, 4 Aug 2023 10:11:44 -0400 Received: from EUR01-DB5-obe.outbound.protection.outlook.com (mail-db5eur01on2057.outbound.protection.outlook.com [40.107.15.57]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5569D19AA for ; Fri, 4 Aug 2023 07:11:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Pelz/UnhX3kKuw7hysf0y2jUdn9etnFJ8Iz0wVkqeupCABAyOdJDwM+OK1Xe3q8aEG8louwY2BBm2r+onqctwSKFLacR2QM2fZVKBRlTCeE+gSPk86dxnHnqLFXRTO+/IrNk/wu+xcfcKUcJekT9rJflZjTZwJsfEXM3hOpSSlVMFl0/uZAPIzKLtJvahqHWfllfM9UCMiwLKzxAmdT7gpaYTAIMmxmSKo8vWp9FlT2mK6Uc+AN+Axe1vw8ytsl6aDWEe1ZrGDfhPTrWQ7FXkchxefGrI/EgY5XiJStfyCUxwbi2ppuZi2+VGk9M7Gr1iV+/KBq+Tj6ZoHrq2K6gJQ== 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=WjFopY2WzwRszpuXQrpv1yBwF2gygOcaB6nugMSz/IZuuM85cWOLuH3C5dZepYilPwShflaNSazo7FslRPPlbYzpNbAMBAeK180hFZvqBaTnkrAcNs3k/XFsLNhiCJ68VQ5sJLeCRkcGhngf7Ktq2aBq11pv1A0moB4bQtJUhsyddcaYIw0f5UspK1UuC/EFMIsAqevE8AjpPM73BtE5LOmYvDtuTPojPO57AXfQ7SDw5DGtwiknqqeDB+6iYXzZKddRHRT99gintiE2PrkMY5OoqHGeGPZEiYOD8+l2rK2fP9VNnjEfqL4qFgQGEexPM98JWKpyZYJB3MX5m7snMw== 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=P1yhagUId+shvTTdlXqLxonB04OLqBTsz6qqvvFGXiyv6om1mbazpzqILBWVR0zywIEJg91HDxsaoireZmSNKP4lhIlk+lFXsqD3+TOo+SBDww+fakch0pxEELBKlnXs8mp4TztElhjNXkcDhREH2wxHwrGFs5U3Dqt1FTpCW+U= 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 AS1PR04MB9287.eurprd04.prod.outlook.com (2603:10a6:20b:4dd::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6652.21; Fri, 4 Aug 2023 14:11:40 +0000 Received: from VI1PR04MB5344.eurprd04.prod.outlook.com ([fe80::e67c:9548:36f2:ef3a]) by VI1PR04MB5344.eurprd04.prod.outlook.com ([fe80::e67c:9548:36f2:ef3a%6]) with mapi id 15.20.6631.046; Fri, 4 Aug 2023 14:11:40 +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 1/2] client/player: Configure BASE using separate structure. Date: Fri, 4 Aug 2023 17:10:58 +0300 Message-Id: <20230804141059.24352-2-silviu.barbulescu@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230804141059.24352-1-silviu.barbulescu@nxp.com> References: <20230804141059.24352-1-silviu.barbulescu@nxp.com> X-ClientProxiedBy: AM0PR03CA0092.eurprd03.prod.outlook.com (2603:10a6:208:69::33) To VI1PR04MB5344.eurprd04.prod.outlook.com (2603:10a6:803:4b::31) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: VI1PR04MB5344:EE_|AS1PR04MB9287:EE_ X-MS-Office365-Filtering-Correlation-Id: c22b29f0-96dc-42cf-6215-08db94f4b904 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: mxraCxUcgGCCNlCxZCwBHAOK6Ya7a0oprl1T4VjCRbkFEmnniQxJs412vWa5JsChC8toGgxOiASqfaBWhhPHtkKZ21Zd7mv/3dXSU9mVeX+cBFcXvK1dyfanS12xU3+ugpk4k0bfpD7Ks4zR3bIbBaSGfaOQFT8bJrux1cJ8cX0f2muDxXC+DCVS7maBqASfhyg2wO/Th+tK8bH5fd5MMsXmOXIo5iSknomveNdN/JN4lKnwV+MrOzrnZOEMHMqrqqSyLD0n1vggo8uw47YS6tO+DthiswEgCK01UHu4SzPL1rvWs1EwA893/E09Z7LD+Rzylyi0ek5Jki/CWycmyiYe25w0qr1/b9NwIWDeKZhQuYVbLOTpAqZwANSz3/yt0lN9No52deJfa240q/NeMi9ZVCW/1Mu1YBF48cj4C4pYjy4lVNjEUIZmMvsdZyYoIWiNzsyx61hIEvEMmsX1MRDaIs7ctivPUVby4vk+3AEUKiHlcy7Fcs3e6G9kO/nuI09+6uO2/MxxGdon7GECoM5lhE+cZcCqW0DTCAxbQ+3OM6DBkGvgzwN9ILVUTrELZ2GWYnEdyEQAWEC4BzbDhfW2rn45ezas87Jc/rcJb2t6GN0wqctOMjZIthwi6Hza 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)(396003)(136003)(366004)(39860400002)(376002)(346002)(451199021)(186006)(1800799003)(6486002)(52116002)(6666004)(6512007)(86362001)(26005)(1076003)(6506007)(36756003)(2616005)(83380400001)(38100700002)(38350700002)(66556008)(66476007)(66946007)(4326008)(6916009)(2906002)(316002)(5660300002)(41300700001)(8936002)(8676002)(478600001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: R4Wi+jWZWIF9ssUY6T9eR9i5Zl67D28Lueg6S4h82b7CkI622IZLckjPQDnbwgwEHq3Aw4c3Qei3ZJ1Lpqx8tdVkyki0yJHJSpK0xPvhnnPEwHjixEauEGr6kU1mYnZ/3080EDPgOISSfgL7mPOga/hMzek/9cFbIcuZqSEzTD0ulaX8qCHbKoHKYZU3SVdA9FOV4GaI64QzKJfBWwkjKA47pLYoAKG5rECn0sdroTKHdOipunNLoqlOXkWJ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iVuCan0rQkkCrKwPP2w3IVm284SC3tQc58CMNqwmwTLDw0GrqSF9vH3m/tKpfTSq8T4wGd1fZNMGUJfzCMrxr9+WIXChpqUb3Y+SJsZ57ybK6xi1KoPomNKplNnLQzikH0OrFY2C09/o5qx/SNFIh4D+yL3B5Re4CN64EkFdUZNKzzfYMdvWiErkcgVB0PH3HoBJ8SfZTI/YFNh0ufmCOf6gFrvbVhIdTpQ0Zkad8vKmzif8MlxJPqueN60t7flXBaZ2MY3IIxAjEU936UyZLa2qWxtvw== X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: c22b29f0-96dc-42cf-6215-08db94f4b904 X-MS-Exchange-CrossTenant-AuthSource: VI1PR04MB5344.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Aug 2023 14:11:40.2610 (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: kYrZV/oTxtfVkZcBGiq+8nue5e8sXjBoJUh/qkrsPg2Tbj5wF6NkVDv+tKXdXTg6/2kSle4wn6axia2tEwYmCIDLNw1iJLvHHNhBmgMvoEI= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS1PR04MB9287 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 Fri Aug 4 14:10:59 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: 13341923 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 98ABDC001DF for ; Fri, 4 Aug 2023 14:11:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231602AbjHDOLs (ORCPT ); Fri, 4 Aug 2023 10:11:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43202 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231617AbjHDOLq (ORCPT ); Fri, 4 Aug 2023 10:11:46 -0400 Received: from EUR01-DB5-obe.outbound.protection.outlook.com (mail-db5eur01on2057.outbound.protection.outlook.com [40.107.15.57]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5D2351BC3 for ; Fri, 4 Aug 2023 07:11:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Gj0sgnudVwAQhvpMoMSANFhMnV3eYeG4Fya+M6w/3x1qtBDXyugCJkrYl2v86l9oXBsn8l/wsiQV9xmK+1BzBF5yvFo/NOVTJjj/Gcup3Ud0Mc1ffnEpiNfHlTTf6MRY9rMfrnBphV62qh4Q6SKXZkff1EplC4zpqf7wUN6rBW77vt7OvOJJxtPyuRJoCbhejB14I6HPZywfeUWNXB4/KAo3TqEC9WXbq7ziSJ6ubv7+62gukT+ZUG/lGlgdgFWT9nUO12wJD/fQyLKIiVgJQRCIrjl6tLq/mSwaCm/snR77bY9Jkg5145vg74InviuXr2QvocJU5B1jfvXdtyme0Q== 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=CvrSMzfayU4xBQ/QKjvojLG4vIvMKdhmWs/kUBWWhzmA1itkBfrY41U+2GLRFpyRGK4rv488M070rHo5S6Q7jSDkUudREHJ7rXODN7z7Okwcw+zReNXv+iUuT98odhnNHH7q6m2Rtq7crlLAngB/UnRhhbDG+fSE56n/T3RPW0c0x2yTKwxuAVe1STBnFfp5XZe7D7LTOfXeAMZv1+lSKcnrjMd1E66GVhIfXHMGKo6E1MseMxWm0yRMyUsc0qmK+gEo9KEv6GLy5fjfoyKNg6fYpZl4XXsPi27bNjmJcOqT+vTn/JqJXaOa6qAqB6r+zvu75iVe3R4STmqZ3rT4nw== 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=NnmuBz7qql9AqNvWTcFqqBWpANNY7KqmBX5Q35BsL6Pf/Iwn1ntQGaJeYyEiFGmdrnoYVQHnVH8RFkfLX92nWMELLM9F0nSglOwfWiXuGpteM9GAhUmjc63RO5R/IjzSrUAk0RSn/vPjJ+gGDzjYaB3MWvaiDcb/Wso/56S3cEk= 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 AS1PR04MB9287.eurprd04.prod.outlook.com (2603:10a6:20b:4dd::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6652.21; Fri, 4 Aug 2023 14:11:42 +0000 Received: from VI1PR04MB5344.eurprd04.prod.outlook.com ([fe80::e67c:9548:36f2:ef3a]) by VI1PR04MB5344.eurprd04.prod.outlook.com ([fe80::e67c:9548:36f2:ef3a%6]) with mapi id 15.20.6631.046; Fri, 4 Aug 2023 14:11:42 +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 2/2] bap: Use the BASE structure received from upper layer Date: Fri, 4 Aug 2023 17:10:59 +0300 Message-Id: <20230804141059.24352-3-silviu.barbulescu@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230804141059.24352-1-silviu.barbulescu@nxp.com> References: <20230804141059.24352-1-silviu.barbulescu@nxp.com> X-ClientProxiedBy: AM0PR03CA0092.eurprd03.prod.outlook.com (2603:10a6:208:69::33) To VI1PR04MB5344.eurprd04.prod.outlook.com (2603:10a6:803:4b::31) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: VI1PR04MB5344:EE_|AS1PR04MB9287:EE_ X-MS-Office365-Filtering-Correlation-Id: 340be216-253e-4d65-9a6d-08db94f4ba67 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: HVE1eQDEJb9NmF/NccTh3UyPKf7ZenndSpycjCv8jeQFMRYRSwEar7yUYFcsrJDTWlPfyX5Hv9m8n/k28hYIQ5KD47BCuAxYBSQV+UgbI0AlFrQwSNHISihmwD1Hmsf+cCdKsyrgQrl7+7Yi1lnvrkuJCKpKblI701mx0TzRcXtZPc5ftr22Qb0wqGmF5IFUfsvTc73mgqq4vZUchEEd87YsNddJYHO52VcVW58dI+4zDPQlWh+VR53IB7wZrjMFa5d2kdqnXkRZWhpTuiskpWdEW3Tj7kR/zIcCsNqf+Su/aQoIt2Qa6PqeuECvUE7HleJk1QnDsz5qUFIR+l186kYocZYGSM6GOhLsqjFuoy0Ghw5XZBDi7f/4KNMiRoHglQGI/TiObwDXAT19laIOZKlB/Go8UqJXZwMpVmqSp7YvLqINn2tG9D3idEJ8E+VfcBVS17Lu7NBUjFXBJL17xBuvvVVuS5LrI3eup90bm71bDJF5Vf4DE08KitRdW/L5QlIZIkJn43JmXkAxsr/y1lcJMlBl2XxJE1DZ323HQtxUzI/4KVJ4ZKaL7aqrO5sXuHZbysHcu5R9MsM6OMQC8niVzPHvt2zzP/7AlW/EzEfmC+kTMqAGuzHXs5H4T5UJ 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)(396003)(136003)(366004)(39860400002)(376002)(346002)(451199021)(186006)(1800799003)(6486002)(52116002)(6666004)(6512007)(86362001)(26005)(1076003)(6506007)(36756003)(2616005)(83380400001)(38100700002)(38350700002)(66556008)(66476007)(66946007)(4326008)(6916009)(2906002)(316002)(5660300002)(41300700001)(8936002)(8676002)(478600001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: T9xLK0ndq1jCSnHKO5ieTUsQPEe8xNJlDY7+TBRkY52oCv7hLvFmKzERsAFlweadCCZo4CVblsq7zdF8LqZCpqd1Z0U3V7C8iGzkWopkQMOOtJ51qf5iDz4yeMuxsrmnIthvm1Tk48HGhlc9FupZjvqP3RRPuOegXXNPEG9vl0C52MH9drNEGeFc1RFEMxRC8h34iKxdAlaZW//Q/Goc8l6LvTaGxQo7+bKMBjFgBleoX4a8QEu9S2R49hKuXHi9HE80/Nwlk7zSioLb9LBwp4SnrdFD2JToNYlETaGBrxDvL0SA5tJDzwGNO/fQooJCTFnTzL3FemB3XYX9GNN4CK89U66o85ikIjY4ydKsgT4q3ugolPqJMzyDgvb/yKTcrKZSGSnrQMrx5UF/gJOylZKdKAn8+xHp4298I3CUsEwm2p68XNLjufaxWDRtJWmJWcOMX8xTa9tIAp3rgBk0O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eESNft4qryI+M4wwryKIy1zz3muQKyFVQ1lCSBWsSkgySaI7vlj82l/nHRq4D1buGlt6SwA== X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 340be216-253e-4d65-9a6d-08db94f4ba67 X-MS-Exchange-CrossTenant-AuthSource: VI1PR04MB5344.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Aug 2023 14:11:42.4683 (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: NH5twAMFxuz+/KnYto8ZChDKuHHIs7x+ICCJXiIZ3vnBSfHmiPhpvhEIC/jacDrwjXxHdvhWnFPg/UEdCxnrWIC72UwxSP/vryxE/V6T1tQ= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS1PR04MB9287 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);