Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp12085969rwd; Fri, 23 Jun 2023 00:51:49 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6hnBBQEdEZNy0nXuZHc0v3tFIcnFV5szUiO31eYkdax+nPmQHq4KgfsV/hjypwf1xQX2iE X-Received: by 2002:a05:6830:1d72:b0:6b5:ec66:1cab with SMTP id l18-20020a0568301d7200b006b5ec661cabmr5180367oti.30.1687506709362; Fri, 23 Jun 2023 00:51:49 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1687506709; cv=pass; d=google.com; s=arc-20160816; b=sQhSWUmKH16StoxnERjSgtvd8U4GfHjLd35NyS3P35yTjx2vwHMVFYSDMzNCE8UZqV xis0XkPtdFpesAPvk5QNZt81BmLF5ryiLASAcA1rE34P2X3FhFGSLnX+5NChVvM2S/6Z 0sAUyJb4sSs7Vx8pKjVFLYQ5/I/GfSfRl+GmXDMJMBc9NGCewKUF9VLhFopdTkTjmzQO /oqSpE4Gj2x6fdOL41uG9n3T+RVnZvZIG+ERv8rZfT+XXO6plE6m1eoRVFzaAgHBdV2D dAG9COOOly6PBrc5J2D1zzxaoPilBewRtrsFtmejfq4z7gZvV/Ly9ZqU0QK8fOMl/gUT TWXw== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=6pffRSiXZC4cEJZisEr+bYSuhnN4C5yXHs9bc9+/kq8=; b=XmEc7XScvV7IXNyrgwwm+6t0QMY1W21iwKwkSQBtzco5o/uWn7Htwk0moE4AF0YlOT 2MDMgTFxNyrv2vh+PPeAtqErbnbrstF9/vYJHqa/LwqyffX33FDm560fXpGdaXbx/8UA 2P8uGfkDiQyI5UUMCIdfV8yl7fvQzJJFw3soMZh/9zYtzIOlQSGqT6j/nBi/OM1ihz1p CkWAeiU/ZEbp/RVEmhQqADtiuyOxEJozUykjDjCwDY/WZgp9FOObI72uxYC3zezZCz9U t77ZMBYyuUIfGNm2DN5SpP9SNpZlHERT56yTIIHBo85PZjOAmpSoNfLdVzzNFTz+VGF4 49fQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=HUN5p7RR; 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::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x184-20020a6386c1000000b0053416d0b54dsi8091551pgd.518.2023.06.23.00.51.36; Fri, 23 Jun 2023 00:51:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=HUN5p7RR; 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::1:20 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231518AbjFWHrY (ORCPT + 99 others); Fri, 23 Jun 2023 03:47:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42066 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231586AbjFWHrW (ORCPT ); Fri, 23 Jun 2023 03:47:22 -0400 Received: from EUR01-DB5-obe.outbound.protection.outlook.com (mail-db5eur01on2054.outbound.protection.outlook.com [40.107.15.54]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D1591170E for ; Fri, 23 Jun 2023 00:47:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ZFMPPoTOs91yfM/KDO3HUAPZ0dhrEI3Nu5XghtyNSBBZ9qC8YvthRBJXjhfY7/I3ZcQ0tvI9FPcU67dcmVwB3GchZttl1ce8uoqQXW1PBW7mbQI5zA4AH27XoAU9B8nrlp0KIqYPJUor+nFGnGkJwbtLGtWw+D9avj+FC7D+1YpaSUZNsyQlJsxBm3X5UaIxqCzzVi229gCKgABmZB1Xdrafabay5fY1ZsLLRJVF2NpQ0ZGstAPV2TXeUMhoaYE4ceK1+ymVuqdpaD7LeDFtxV4Ck2VhhBPLBQBD9JDrM5I+WE+7A0KH/oqJNf+T56kiCl+S/Xwmher2KLFXp+TYYQ== 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=6pffRSiXZC4cEJZisEr+bYSuhnN4C5yXHs9bc9+/kq8=; b=K9MRJod9YDkaKqHaTXeMUqTdrz2QAIP0PNcJNyDM9b8ZXZaTXVGtS8Jq/TG5PLiSSSGO4MTb+DepBj6mKPlC4r7/ffPN86NFk0PSL72H6ffy3Frco0fl87vL+VSX0ptnzjBSBmhKWhAwScw5kTRwtW70SIwWhfGDO7UVpwoEjVnwFIT0pSTVzOggk7Zak86TYB2VBj9c4csw1Vd8AjYht+E/iOqed0TzdT+be5cnmTAugnK7mL9P6N/SeAIN3aWVumMIZXASDZTqNtNSbY9QwgjBT9cPxQHo9VgcrpFv9kSaQHI8tIlXMOYEDpuGPLrbKPbTPnCHUErBhhEXLnk2TA== 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=6pffRSiXZC4cEJZisEr+bYSuhnN4C5yXHs9bc9+/kq8=; b=HUN5p7RReuoLQCftxTDqUbSK47AeTXKOlpFVClQ3Zqs/iJRH6wTHUI4nk9fGxe93WjrPb+ejioX9pC6ymWCnxYv5pswaxlGHBEefAxlkNaL9hA9RbbpSjyNP9L3FnkIdGTtpx3/dul2Tggvhu8XvTazoNyClamtv+/Bkz6GXXP0= 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 AM7PR04MB6918.eurprd04.prod.outlook.com (2603:10a6:20b:10c::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6521.26; Fri, 23 Jun 2023 07:47:14 +0000 Received: from AS8PR04MB8898.eurprd04.prod.outlook.com ([fe80::7526:7510:9b32:e1fe]) by AS8PR04MB8898.eurprd04.prod.outlook.com ([fe80::7526:7510:9b32:e1fe%7]) with mapi id 15.20.6521.026; Fri, 23 Jun 2023 07:47:14 +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, Iulia Tanasescu Subject: [PATCH BlueZ 0/2] shared/bass: Introduce Add Source opcode handler Date: Fri, 23 Jun 2023 10:46:55 +0300 Message-Id: <20230623074657.16618-1-iulia.tanasescu@nxp.com> X-Mailer: git-send-email 2.34.1 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: AM0PR02CA0228.eurprd02.prod.outlook.com (2603:10a6:20b:28f::35) To AS8PR04MB8898.eurprd04.prod.outlook.com (2603:10a6:20b:42d::15) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8PR04MB8898:EE_|AM7PR04MB6918:EE_ X-MS-Office365-Filtering-Correlation-Id: 6f784d52-52a4-47f5-334a-08db73be0f68 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 1iuf8tovA+p8YZeYKfCXiY/YxxWKN9Jh0B9rZpr7ptjsbntr7x7nbTSf6ZOXbgoRz/V0cHd+QOcje3igfiXKdM2UGNSFUR4TAe7zUQr4zJJt7QIbdn7D4omz4yGUUxkVQWFYYZ3MKPXLYS6Zi71mpPCn2Tm0uDtxiaR65SqhkkS9VRzugdCUDzWYVFNOdka69vmB1exdZYIzRsoGFoxFn/Punmfn+aNMKW87YNUoYaf+a8QxEx89lW/1cY6PVcNFCkzNXlVnlNOJXt8OB5IL6LgprojwEwG74K7ZIvIX0nt308dA7zQc3pbNtVrkj3koedWI7sGRIlLyvKNRODRzy+TPw2bslaCVCQnHLDNlklFwRNu1OYCQ50GjFRaIeCe7FNsUVl3m7xHXaIM/EBVMvmNeLjTnh+K83pwi5qowBFhK9GNBCEMINypGCjpK5pOg2fiyfqy9I/KHT+OQJGJtiHkhiUyCOrP0q9zPqwNfzxE6eddYbNI4pVE24mtUBL85o8Zzx/s9wNOQZsX9w5nqa6FTmBK10QYPmpz08ryxyOIqIBw3P5etst+He9AaTo0O3h8owgXZY6gKJ21dkfrt9hM4DZDhFyfB6zdCju4cznEOms6Hrs8As3hhbg85YDq4 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:(13230028)(4636009)(376002)(136003)(366004)(346002)(39860400002)(396003)(451199021)(83380400001)(41300700001)(8676002)(8936002)(316002)(2616005)(186003)(38350700002)(38100700002)(6506007)(6512007)(26005)(1076003)(6486002)(52116002)(6666004)(478600001)(36756003)(86362001)(4326008)(66946007)(66556008)(66476007)(6916009)(44832011)(2906002)(5660300002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?xGtnnRsfsYW9QXDnz5In0vXjM8WbawaoVeuK660IL0fSHs0QPpjVmPymffIs?= =?us-ascii?Q?EtKFebssnfdGpOBrId7RFA3ywniv+/WVXn2vFjVubJt0cVWk0wvXdixDQ5Jh?= =?us-ascii?Q?uWISy9Ib2/rlkRXnmm1c/EzlcoOvg14sWdlJDKVBZ3aPEeJ/qc1C2a09H/d5?= =?us-ascii?Q?8fotihfCrpu9QIPb4MuATEcpSAojmWcOD4uCs7Ff+3cGoa0aBcdvytyj8lET?= =?us-ascii?Q?odt2DzWyDN+6hkAVFVp/nw+3x3P4W9TXOklGfUQWRK3INjQKIgUOLvkdfFsi?= =?us-ascii?Q?B9b/Ef8+f6Sz05UssNI2nztbiGimEl0ZXry86euGND6NY0nRMZsGKwlP/Uw9?= =?us-ascii?Q?xc8QMWYxmQMsp5GTNFNqiOzgYRSZk8Brc8GtYdK6Kz3PZml4GFcA5aS+/BPa?= =?us-ascii?Q?pD/29tduX/OT7zEyQlTwW8Tahdewj5QZ4fzQyuLdMBygj0OEFSEy81VrgHB4?= =?us-ascii?Q?N2eSWmhzXr0ro0N+X0L58U7QBEZPHzv6WSEPlasrmQd7KsuAhjnL7+2bVNRA?= =?us-ascii?Q?6+5v4LtMN6WJwuots1ersFmRX9MdDXiU6HrcMXsQpcWpR4Ew8fgYapGlEsb2?= =?us-ascii?Q?2oc8CNJvF2KdbNbFYHK4A3twvDj3gK7ntt4s4MBdJigxN8P0Dry3EosP1dFj?= =?us-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ODEX2PiSlbXfDFQ7imvLsxoCgM?= =?us-ascii?Q?FG2J3cjzCJoaqKzWCAAfxLzKAUp9wAeTLf+uDXNfNRkF+2slGFe70MlIy2+V?= =?us-ascii?Q?JA=3D=3D?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6f784d52-52a4-47f5-334a-08db73be0f68 X-MS-Exchange-CrossTenant-AuthSource: AS8PR04MB8898.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Jun 2023 07:47:14.4260 (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: utxw9bqdA+YMvaim7JGJiC7WMmSK0UVPjd70ejvm/Q+ukUM8L+PJXbnC3kHwjPf3OxgKwv/S4YzJxohRDiQlJQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM7PR04MB6918 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org This patch series adds the BASS control point handler for the Add Source operation. If instructed by a Client through the Add Source opcode, the BASS Server attempts to synchronize to a Broadcast Source, by opening a btio channel. The BT_IO_OPT_ISO_BC_ADDR btio option has been added, to allow binding a socket to a broadcast address. The BASS adapter_probe callback has been implemented, in order to automatically configure BASS into the adapter database. The adapter bdaddr is also stored along with the BASS database configuration, and this address will be used as the source address when binding the btio channel. Iulia Tanasescu (2): btio: Add option for binding iso broadcast address shared/bass: Introduce Add Source opcode handler Makefile.am | 2 +- btio/btio.c | 56 +++++- btio/btio.h | 3 +- profiles/audio/bass.c | 26 ++- src/shared/bass.c | 424 ++++++++++++++++++++++++++++++++++++++++-- src/shared/bass.h | 14 +- unit/test-bass.c | 2 +- 7 files changed, 498 insertions(+), 29 deletions(-) base-commit: 37042ca9c6ddcdbbb0899b3d62238935cd53f443 -- 2.34.1