From patchwork Wed Jun 28 15:07:03 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Iulia Tanasescu X-Patchwork-Id: 13295908 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 6B42DEB64D7 for ; Wed, 28 Jun 2023 15:07:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230428AbjF1PH3 (ORCPT ); Wed, 28 Jun 2023 11:07:29 -0400 Received: from mail-dbaeur03on2042.outbound.protection.outlook.com ([40.107.104.42]:61344 "EHLO EUR03-DBA-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S230196AbjF1PH2 (ORCPT ); Wed, 28 Jun 2023 11:07:28 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XPelIljsyH7aKsx7JlrB7q+afo6Cvbrcpjh6XSGSpd4C29QABk/++qYP3U886GYIN/XzlowuFAHZWE/2iCKt1xx2MFalj+PcEdUQ976TvNOJCXFgjqHT73gp31m0il1BgKtXMFbW45Upotk5Kx0Ij2dSTAvYxYGuPvtKiPP6onEL9NU8/G1+/A1TkTZk3Hq8ISv/1kXLcu0QbZuana0SVKSGPGKnDe5YvHShXqgYEyG75X7mbhqzEmBPYZHZmRUdvrF7khC5q5qXTNzMhb4B4Zsst9xqdfY21hZlz8mZHHENsGuVT02qcRghqUP+/qYl0e0FbH+389Fegpz1L8T4Zg== 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=USaAfLY3ESzWNbAsFSe6VyuZoaO2IGXDrO85zzUd/Pw=; b=CkBMFPZIDLu9DeVlKzsNQn4NliDmeNwfo6XKogQW1ubfyjjaNCozvC0TAkhzX8JGyei708upz0uppSZ8Ob7IvHfvk8+rq6TngMASHQ4+Okym0UKN8J/cEDfJCNMCjL9cdOjWaOolSoLe2YlKUUk47uT6rOwuhrIkeTfpLvnz8W+YHwGQs+AuBhEtSfR0/V4tQpYgil34zuDXnid/WB58D/VK0HJ5zfHw8bwbVx8aX1sh5hO/CTkDv02YSgREzcw8NLunLSOFD8YkWWFWHtZXBR8T1da12kaf9JmRScvUksVwf6kEpjuIIK9UQGFfjJIxFV+C968URzY6wlX3awgXhw== 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=USaAfLY3ESzWNbAsFSe6VyuZoaO2IGXDrO85zzUd/Pw=; b=ln4bC1lNtiN/dRG7wiQlXdO8NbIgDBn6ds5cV2nYN+/mfW19VmCQZkud8ZvMGOZdPVa8sq1KRfM9AU+jZhaP6+FkMT6/bo4QqP3Kt/tkFZ+6pXDi+50a/8G0JA85lxP8iCaFAFU5Plpb681lhYqbfCUlDKTnScFyo2aNVbnAP6c= 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 DB8PR04MB6953.eurprd04.prod.outlook.com (2603:10a6:10:111::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6521.26; Wed, 28 Jun 2023 15:07:26 +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; Wed, 28 Jun 2023 15:07:26 +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 v2 0/2] shared/bass: Introduce Add Source opcode handler Date: Wed, 28 Jun 2023 18:07:03 +0300 Message-Id: <20230628150705.248285-1-iulia.tanasescu@nxp.com> X-Mailer: git-send-email 2.34.1 X-ClientProxiedBy: AM4PR07CA0034.eurprd07.prod.outlook.com (2603:10a6:205:1::47) To AS8PR04MB8898.eurprd04.prod.outlook.com (2603:10a6:20b:42d::15) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8PR04MB8898:EE_|DB8PR04MB6953:EE_ X-MS-Office365-Filtering-Correlation-Id: 4bd09350-09a7-463f-cf83-08db77e96216 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: T4kUlZ5IxnC55+J+qkFXv3LPU3JDVjzsPqcA33fgYj84sgwocJJiZkxigt+fOjqvuCdeZR4fMdMIi9WMCqjavelilozT9qo0pw/CKjOBsrL/vvmwph7KOISk5psiH7V2RvqEIS2n0nEtf7jBsxUPRmIl8wDqUpMOCJBd8BU9fD1S4l91peO6YvFVlw1IVgU6RU7JbsdLanOC+LZ+uei6qNwt2TZ8xQeuPKw+92QyF13kmCrEMvk4bf3OYlEqt49+prbG11349kBaPw8Hhfe2my0KpxrDjfciVEg9FPFHvJx4raorXrvIflXdjhds7HWg8Ole1dG9+wX1zs6LmRTUnPrqsXzijqlN/jqsi6fA52l7WRxq7EKRQ5fNp8MCiTuVrgAmPllZir3s7ZqxDmqndRxW39JuylDVS4cf199FQROANCdVi8WhNj4vOwH2uVoPwYoof9CGMDlrvc6+NJeHwUCXTsBZqDRRWzRKTFE9GAizDuY/pHGbod5rOzRufcd+8e3Aj2HOxtqNU1I6lHQhzO2SLCvbnjmvDjyy2Xmd6pivmTkPI636ZO+xXC2o1POucAJ7hlNNhPkkCYjwWgEOt/TlQxVr262OzwW55FnbvFsSeJdSZXn3UnflJGfbhCTA 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)(136003)(366004)(346002)(39860400002)(396003)(376002)(451199021)(186003)(2906002)(26005)(66476007)(5660300002)(41300700001)(8676002)(6666004)(6916009)(36756003)(52116002)(316002)(2616005)(478600001)(6486002)(86362001)(4326008)(38100700002)(38350700002)(1076003)(8936002)(83380400001)(44832011)(66946007)(66556008)(6506007)(6512007);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 3DTWV3A18kO4N470kweknVb+IHEkB2geRupItfuP5yKpWhHN3dBR7aWr22HviUwoka1EbRAI/XZyBZDPJWwUv5m6+eBJ9g9YcjF9TXUZDnjA86aqgzk0Rp6NQ0dXhf5f/QjpcxAMT4r45t7FvpOQk8pye7agFi53zyNZDHX0ZghYZKxVhIY0LjU+EV5synYUDlL1KLJhnChZaSMWL5vwQSg5uUsvqYAOklQESs4F5ENjnuKcqKTUFB2KSXYtjgyDACBAjIPxzI9ti5VfsSKMWDOBMyebftJPoKPJ8BzJgrI28JTL8bWwLPRUEqS2SuMh3HDqEXyatSOYyYwfqC+caKp5CuNsg82EcV4MYxEOznba5QX067EVS/kDT2EonWaiYN6ISOHB2rCqNNX7dkuu4Y8UEDk7buR6zLa/JHppf61Cz9dVNDwSbgcfaxVLAjfq5Q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WW59+3yJfugH4iHsvWqurl/KGrInGu30pQ6o2/7VZWHXf3a2azThBVXELUJ9xuR+0ShOBW2I+j2ARvBOW3ATsL9RGYX+p5UnQQ== X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4bd09350-09a7-463f-cf83-08db77e96216 X-MS-Exchange-CrossTenant-AuthSource: AS8PR04MB8898.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Jun 2023 15:07:26.0853 (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: 1814navtv8iT6DJFhQUgBAnB+hXibjYFqX5cE9ivzaqiYEu3oBiNfKx9WXaqSNLSpjddodvG1STIOlMfZWisTQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB8PR04MB6953 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. Some additional btio options have 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 | 76 +++++++- btio/btio.h | 5 +- profiles/audio/bass.c | 26 ++- src/shared/bass.c | 430 ++++++++++++++++++++++++++++++++++++++++-- src/shared/bass.h | 14 +- unit/test-bass.c | 2 +- 7 files changed, 526 insertions(+), 29 deletions(-) base-commit: d6bfbd28420edf91382635b229b9f8b2f94dc060