Received: by 2002:ab2:710b:0:b0:1ef:a325:1205 with SMTP id z11csp1949185lql; Wed, 13 Mar 2024 12:46:08 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVzF1+JE+9u3Fc084kzLLhvIKC5qOdXdccDR1L0EKPNKju5WvvsrEVSmlLsEFptk4k2poH42O+2lxIsiNSm7eSdP91JwMGFySrZzxDruA== X-Google-Smtp-Source: AGHT+IHKN4Bs4VcObY3eLg4Up2pVf23IfSWaW27fAEZWGwdVdscAOzztNcd5TeGWhAwooNi4Izlf X-Received: by 2002:a17:90a:7e10:b0:29c:502c:42a4 with SMTP id i16-20020a17090a7e1000b0029c502c42a4mr4682952pjl.26.1710359168372; Wed, 13 Mar 2024 12:46:08 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710359168; cv=pass; d=google.com; s=arc-20160816; b=J6XIMov9I96sWse0IE5ktUrZqI4eTzKY7nvyoyB8bdizDXZvBGpvwX6DVzlBchiHaO FCJ2Y85NR7nXZMqcwysgJ5ITLMYAhj6OSW90e2dIQvBsEhJCL8oyOcSkGlR1iD0yP7p9 LCNv7a8LZiDaCS++C2pvnkLDdaniuJde4QZHybps5zefoCUmVobx4NJjEqy54EtfyrMP AzEM3KpJFCzU3m4DTZ2treqVz6KKvVhY08EY+sqp3zMA+zkeuaHO3EG22LvirljjSEVQ xP8JBrcgMXrCBBmp2Xbx0ayxq0JptvCVClIpxSvsX7kcD9mOtPaJVL7Su/vNazPxOgRx 8FJA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:to:from:dkim-signature; bh=zND5AGdO5FgvrcyAaXZw/th9OCUgQhoWphEUq6dFV0Q=; fh=4lGQI6056MBa4/oovMyIYaKLn+Wz/24RGvUivMmQP8E=; b=JD7PW0CA0+dY4b6oAZHX3tapKkMaz3Ft4h6zpqhIMbVfGoAwCyVHh0QJK/MOrWbNVb rOZbikB9OGDBP2TOZ4NGs/DoDdKExZyFFHphF2yMGnAQJh9DNxI/LAsFzHGmQfxQ6C5T 2bqhwQF74tOVlEFDvebpGMn5Xhq4FU01vQwRinacS0gmAp2Ox/q9qcS5Lr6wRxL4v2jS y/ohB74fUstOJu5eNzkP+y/31AwoDR197INX/27oHGa3kdCcLtgjV4wFQCm9ReLd0/Bz wsK8/XQd8Nlx0AwP0pvryL7IH9OQdPi3w5GbLVdY1B8Kzv0hFpoCzf4OQpzqlRA4CogN PfKQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=BPzIQftW; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-bluetooth+bounces-2501-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-bluetooth+bounces-2501-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id ml9-20020a17090b360900b0029bc3080881si30122pjb.54.2024.03.13.12.46.08 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Mar 2024 12:46:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-bluetooth+bounces-2501-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=BPzIQftW; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-bluetooth+bounces-2501-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-bluetooth+bounces-2501-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 8B7E328D024 for ; Wed, 13 Mar 2024 19:44:23 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 436734CB35; Wed, 13 Mar 2024 19:44:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="BPzIQftW" X-Original-To: linux-bluetooth@vger.kernel.org Received: from mail-ua1-f43.google.com (mail-ua1-f43.google.com [209.85.222.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2007746537 for ; Wed, 13 Mar 2024 19:44:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.222.43 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710359054; cv=none; b=bkXzeYVudF4hywJuVLyossOp5nizKplTqcsN/oR8S1GtNZRaF1CykblsuoWZztrG62uc/fggyY8yrWckSzEh7MrArtZH5ziD6nhLMZggADiT/O+HHVYulwhTH8go1GggsCAu+fdZT0YFLGI9mPjzyDDeqUTCr/eqZu/mFkPYYmM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710359054; c=relaxed/simple; bh=KkkYgXSYcPx3PZFYQwyFf1flBkRiAj4QvwNf7IT6Utw=; h=From:To:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=LKWm87PLKX+GJByfkSOiIxFBX29W1hZiAPoKvWOJEF+ESA4il+h+nD7PXRHQDqnBKNvbIo8LU+oBQw5xRhjL2uSXkVMLH/H//JVn53K0XjKZFUOAmPyg1V5ZLUO1JPalPoI2Dw5NTfu4JxAi9ZEKdQXuBWHk6cryHadAyfCCu2M= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=BPzIQftW; arc=none smtp.client-ip=209.85.222.43 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-ua1-f43.google.com with SMTP id a1e0cc1a2514c-7dae66def19so116917241.0 for ; Wed, 13 Mar 2024 12:44:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1710359051; x=1710963851; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=zND5AGdO5FgvrcyAaXZw/th9OCUgQhoWphEUq6dFV0Q=; b=BPzIQftWEat0IC7Gci6IQRxzRA3j3ssbgL+z7aye6v1DIQzcul1vaikc679W5mp5a4 UR8wi39iQdi9PDKIHrFDeCjtkG4XEWcJwRJmnWH2cWG0+q9rK21Gxo1DRNBIgC22LWLX cOd4rfsgUoInIRcs1E2sXnsxnhH+cG7xqFAxiF8Y94SmbXhQNeMJfPyW7eXNruQrd++J ElATvRNnQIHAcEKYhJ5L/YuSsulBTBp/G+xtIytKY0EZoDFoZRGkUwkV6D8EUPaIaCxv 6dPiA6qFbbOsvpIQElWSUdVvYIulsdPk/HEylyqy9dhsSwc/sslrVV1xJVYFfxamCZSh 1xyg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710359051; x=1710963851; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=zND5AGdO5FgvrcyAaXZw/th9OCUgQhoWphEUq6dFV0Q=; b=XcWckVmJNeh5DL2Zrqaxxzgzo2inU0KFWtqLtG5kCDZROhTtZl2thXaKKrVk/MAGrG uyahHb9GgR6y92Me6+RPRrd29yj3NXEF73ei/twDXCQsN3VMxhJW/TXDoFtqBFKgpk4w nN3QHxL5O7e46qvtJ6f3LuRKJ6CB6Vd7LyVD3oGkavUCuHSJr/896tlS9bVsO8BO3pFE a0DtKPFtoilwaOJh6/hcdZHdlgDypdnuZVqVWc0g1ZuDSVr6D+L4k9tvVjINa1hi+QhY +7+c+QcpAfWxeXhlBYRhPa620vVcaE/KmqWCu+j2ZI1vP2cayexrIxfig8ZMgkysQsxv o8/A== X-Gm-Message-State: AOJu0YxzxgF6u9gCxkeQU0AwFeZUnjMZ8x+qhgFWox6SK5/5UKn9+jz6 T6B4ev8RfLvBSpuT35H5FHenEt0qtVtMp7iMUgmmgJlCLc+eNX9QC1JMV5Ah X-Received: by 2002:a67:b60b:0:b0:472:6673:f8ce with SMTP id d11-20020a67b60b000000b004726673f8cemr932667vsm.34.1710359051138; Wed, 13 Mar 2024 12:44:11 -0700 (PDT) Received: from lvondent-mobl4.. (107-146-107-067.biz.spectrum.com. [107.146.107.67]) by smtp.gmail.com with ESMTPSA id gd6-20020a056102624600b004730db4e873sm1800259vsb.10.2024.03.13.12.44.10 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Mar 2024 12:44:10 -0700 (PDT) From: Luiz Augusto von Dentz To: linux-bluetooth@vger.kernel.org Subject: [PATCH BlueZ v4 5/6] client/player: Cleanup broadcast QoS Date: Wed, 13 Mar 2024 15:43:59 -0400 Message-ID: <20240313194400.1397477-5-luiz.dentz@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240313194400.1397477-1-luiz.dentz@gmail.com> References: <20240313194400.1397477-1-luiz.dentz@gmail.com> Precedence: bulk X-Mailing-List: linux-bluetooth@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Luiz Augusto von Dentz There is no need to setup broadcast QoS related to PA/BIG as the kernel already sets these settings. --- client/player.c | 89 +++++++++++++++++++------------------------------ 1 file changed, 35 insertions(+), 54 deletions(-) diff --git a/client/player.c b/client/player.c index 381c5d568103..d26ff9d3a9df 100644 --- a/client/player.c +++ b/client/player.c @@ -94,14 +94,6 @@ struct avdtp_media_codec_capability { #error "Unknown byte order" #endif -/* BAP Broadcast parameters */ -#define BCAST_SYNC_FACTOR 24 /* PA params */ -#define BCAST_OPTIONS 0x00 /* PA Create Sync */ -#define BCAST_SKIP 0x0000 /* PA Create Sync */ -#define BCAST_SYNC_TIMEOUT 0x4000 /* PA Create Sync */ -#define BCAST_SYNC_CTE_TYPE 0x00 /* PA Create Sync */ -#define BCAST_MSE 0x00 /* BIG Create Sync */ -#define BCAST_TIMEOUT 0x4000 /* BIG Create Sync */ #define BCAST_CODE {0x01, 0x02, 0x68, 0x05, 0x53, 0xf1, 0x41, 0x5a, \ 0xa2, 0x65, 0xbb, 0xaf, 0xc6, 0xea, 0x03, 0xb8} @@ -1745,13 +1737,6 @@ struct endpoint_config { struct iovec *meta; /* Metadata LTVs*/ uint8_t target_latency; struct bt_bap_qos qos; /* BAP QOS configuration parameters */ - uint8_t sync_factor; /* PA parameter */ - uint8_t options; /* PA create sync parameter */ - uint16_t skip; /* PA create sync parameter */ - uint16_t sync_timeout; /* PA create sync parameter */ - uint8_t sync_cte_type; /* PA create sync parameter */ - uint8_t mse; /* BIG create sync parameter */ - uint16_t timeout; /* BIG create sync parameter */ }; static void append_io_qos(DBusMessageIter *iter, struct bt_bap_io_qos *qos) @@ -1831,40 +1816,47 @@ static void append_bcast_qos(DBusMessageIter *iter, struct endpoint_config *cfg) &cfg->ep->iso_stream); } - bt_shell_printf("SyncFactor %u\n", cfg->sync_factor); + if (qos->sync_factor) { + bt_shell_printf("SyncFactor %u\n", qos->sync_factor); + g_dbus_dict_append_entry(iter, "SyncFactor", DBUS_TYPE_BYTE, + &qos->sync_factor); + } - g_dbus_dict_append_entry(iter, "SyncFactor", DBUS_TYPE_BYTE, - &cfg->sync_factor); + if (qos->options) { + bt_shell_printf("Options %u\n", qos->options); + g_dbus_dict_append_entry(iter, "Options", DBUS_TYPE_BYTE, + &qos->options); + } - bt_shell_printf("Options %u\n", cfg->options); + if (qos->skip) { + bt_shell_printf("Skip %u\n", qos->skip); + g_dbus_dict_append_entry(iter, "Skip", DBUS_TYPE_UINT16, + &qos->skip); + } - g_dbus_dict_append_entry(iter, "Options", DBUS_TYPE_BYTE, - &cfg->options); + if (qos->sync_timeout) { + bt_shell_printf("SyncTimeout %u\n", qos->sync_timeout); + g_dbus_dict_append_entry(iter, "SyncTimeout", DBUS_TYPE_UINT16, + &qos->sync_timeout); + } - bt_shell_printf("Skip %u\n", cfg->skip); + if (qos->sync_cte_type) { + bt_shell_printf("SyncCteType %u\n", qos->sync_cte_type); + g_dbus_dict_append_entry(iter, "SyncCteType", DBUS_TYPE_BYTE, + &qos->sync_cte_type); + } - g_dbus_dict_append_entry(iter, "Skip", DBUS_TYPE_UINT16, - &cfg->skip); + if (qos->sync_cte_type) { + bt_shell_printf("MSE %u\n", qos->mse); + g_dbus_dict_append_entry(iter, "MSE", DBUS_TYPE_BYTE, + &qos->mse); + } - bt_shell_printf("SyncTimeout %u\n", cfg->sync_timeout); - - g_dbus_dict_append_entry(iter, "SyncTimeout", DBUS_TYPE_UINT16, - &cfg->sync_timeout); - - bt_shell_printf("SyncCteType %u\n", cfg->sync_cte_type); - - g_dbus_dict_append_entry(iter, "SyncType", DBUS_TYPE_BYTE, - &cfg->sync_cte_type); - - bt_shell_printf("MSE %u\n", cfg->mse); - - g_dbus_dict_append_entry(iter, "MSE", DBUS_TYPE_BYTE, - &cfg->mse); - - bt_shell_printf("Timeout %u\n", cfg->timeout); - - g_dbus_dict_append_entry(iter, "Timeout", DBUS_TYPE_UINT16, - &cfg->timeout); + if (qos->timeout) { + bt_shell_printf("Timeout %u\n", qos->timeout); + g_dbus_dict_append_entry(iter, "Timeout", DBUS_TYPE_UINT16, + &qos->timeout); + } if (cfg->ep->bcode->iov_len != 0) { const char *key = "BCode"; @@ -3673,17 +3665,6 @@ static void endpoint_set_config_bcast(struct endpoint_config *cfg) iov_append(&cfg->ep->bcode, bcast_code, sizeof(bcast_code)); - /* Add periodic advertisement parameters */ - cfg->sync_factor = BCAST_SYNC_FACTOR; - cfg->options = BCAST_OPTIONS; - cfg->skip = BCAST_SKIP; - cfg->sync_timeout = BCAST_SYNC_TIMEOUT; - cfg->sync_cte_type = BCAST_SYNC_CTE_TYPE; - - /* Add BIG create sync parameters */ - cfg->mse = BCAST_MSE; - cfg->timeout = BCAST_TIMEOUT; - if ((strcmp(cfg->ep->uuid, BAA_SERVICE_UUID) == 0)) { /* A broadcast sink endpoint config does not need * user input. -- 2.43.0