Received: by 2002:a05:7412:3784:b0:e2:908c:2ebd with SMTP id jk4csp2167800rdb; Tue, 3 Oct 2023 12:19:23 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGSuAVKSuJdY3SEGW/glP3pdSwyAQkePPjUDd8NZKXuWkaXv3QhKNlfyqCHlwEsLmcfwba8 X-Received: by 2002:a17:902:e551:b0:1c5:741d:f388 with SMTP id n17-20020a170902e55100b001c5741df388mr679773plf.9.1696360763457; Tue, 03 Oct 2023 12:19:23 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1696360763; cv=pass; d=google.com; s=arc-20160816; b=DCc+vaywOqd7GpY1fuwu6AVt9YOkNFAE1nkoK+7L9F5XI+Fth1AuwczVRXvAKPMuvJ 1Q2X4jky1NxDsWsqu4l8afmEu7iOoErvgucZnlL4f7Wd0ZVKjFdoeMcylz+jU2QCJzi2 DiwMAOXCR2r0RSE8BpapJCzbNiwKJKq0AU8ZFPTULQdNT8AUxsJMBifVwgcQvQucylap U07CDUXmG/0YRVP/DXz3NMlIGCHZ1ZkXxlCTUufyv9dITXVUcE70o4dAYoLBdSOkWUo/ fsGFCi30t1Gbv0tlktBm1FFsYQeABbXehMJlhXsRQ2AyAf2FUsiuM08rdpVGKZzh2+Ie M9rA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=1MEhbW0nWTmSakaI2804F0vVc0JXe0co/LMBZhrcWAY=; fh=ExGhjNQEFJgRqHmYATVc5UXZbS7abAmaHDitrfHKOuE=; b=YvEgv0YIXgnLEXPlqF4LrBD1SBzS1YsTmqwISpMr+WNt7LAjl4/a3zcf8u+TnQC7SV s0+aNe0+XmCnwhzeS9lE6fPjIqPhGMfvh4qxeJ8sXlI6k+xG1jr+i8laeu09BOcvuqqd +UdOFkr5V54osqMUzuj4wpGgQTLo5tIMR7T1o65ogesMWAB78o2Ke07EQ5uH/JcglEOY rRzV6TYAbOwrjwNnKJnrZ4b/VtL2h/B3XhNsnbcdde0tBNZ9ciVgMHUu/QCWb4Aj3TET a6VKzl0Q2BIf2OzKyHCpqOv594Mw88qOwVtdbVXc75zS3erydB7q9Ri45xcoxhjc71RI JhdQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@iki.fi header.s=lahtoruutu header.b="YToLu/nE"; arc=pass (i=1); spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org Return-Path: Received: from agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id jz16-20020a170903431000b001a6f0eab385si2051785plb.55.2023.10.03.12.19.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Oct 2023 12:19:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; dkim=pass header.i=@iki.fi header.s=lahtoruutu header.b="YToLu/nE"; arc=pass (i=1); spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 907B7818C7A5; Tue, 3 Oct 2023 12:19:13 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240906AbjJCTTM (ORCPT + 99 others); Tue, 3 Oct 2023 15:19:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33544 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240870AbjJCTTL (ORCPT ); Tue, 3 Oct 2023 15:19:11 -0400 Received: from lahtoruutu.iki.fi (lahtoruutu.iki.fi [185.185.170.37]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5FBD2AB for ; Tue, 3 Oct 2023 12:19:08 -0700 (PDT) Received: from monolith.lan (91-152-120-176.elisa-laajakaista.fi [91.152.120.176]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: pav) by lahtoruutu.iki.fi (Postfix) with ESMTPSA id 4S0SL12WcSz49Q1K; Tue, 3 Oct 2023 22:19:05 +0300 (EEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iki.fi; s=lahtoruutu; t=1696360745; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=1MEhbW0nWTmSakaI2804F0vVc0JXe0co/LMBZhrcWAY=; b=YToLu/nEWqY3uSN7g0NFzMuenyQ3fAwKzx/Ru14jrV8EyqGY/6EHPsTj7PsGAG4Zmxnq38 mm4hJdomDohrSmRITXGbakNpZ/ntu4yDxdkJgoBNiwKdjTKiRS0skBQxgU7qn0rDrzDzA5 7xPbkjCacI1OufhKlmtUjrPMiG3ZDqRPd7LFbIJpp5Xk7FRygAFkkpSCSheNVd6xVZefdv vJKGUrx0KcSE6sCF9lzdtIjjTDFfNWfnm4Ua3795PXzSSfSlr60kL4n7TLGNwfOKY2tCCU UxURwEhHK5hhU5uITMHjrXn+oQLJUYke1DFHn3hXWfoSosc+SEKChXLCXIycYw== ARC-Seal: i=1; s=lahtoruutu; d=iki.fi; t=1696360745; a=rsa-sha256; cv=none; b=pYJKgZW4uOOVmJa09mf8/7ZTn2U1CgESZrfVz83N/w9FdnUYMCVCl911rFfEJ6+PMeoI8X gr7Cba6kQCBwhtf6pqvYXzD2qNJWIkXEoi3OWgXB/cRZGbNiLI+Wc2+9fjIhAuV8MKH2nz VT3IABOFdlg5FzTUSmqZB26gQIh7YD8pAjDxGESa80IMNw78DrOdR/a43mTrfMFoG6mq6e /EoASeHitJXIkNqxlamQH2PWvrxtbOfpkFoQZif95pFru9OJ9AxM9oyKK0vAaf6rdajKmg 5EwOPDZ/ffxY/yEqZitNxPrTQkfsp2El7xlI5vFy1kzkBDppmDe36bVWDObvhQ== ARC-Authentication-Results: i=1; ORIGINATING; auth=pass smtp.auth=pav smtp.mailfrom=pav@iki.fi ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=iki.fi; s=lahtoruutu; t=1696360745; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=1MEhbW0nWTmSakaI2804F0vVc0JXe0co/LMBZhrcWAY=; b=JpgGVFf0rF6beEFTEeIcuwr7s+5kePhn7Rxbf/luzaEhCwW9Rrjh+dDWaMr2AxPEXt7cFZ HUFzAgd0BU1J8Wdqywk5fyuG4snoLiGGoiLdSVME29fH470toqeRh/YqxMwUHDyelsC080 ZRGAnHdtEVVvfwBIzVoffLsgrE0qAMrR+yNsZU7Ns1d/oEa88qlElJqIdaFwWcJBDlSZTe zmBnl5DSKTcoZ+tzZNcJL5+JbPWmyB1DPjba7C/9lBpVQCm7Wyhy9Mrg0ZKe5eAO3RNym4 5nGz3ZFBsy622ZjcZ+tyaB2018JYppN67K1CTBT2s/cWvWwuJICvMSx/DuL1Kg== From: Pauli Virtanen To: linux-bluetooth@vger.kernel.org Cc: Pauli Virtanen Subject: [PATCH BlueZ v3 1/2] bap: use MediaEndpoint related properties consistently Date: Tue, 3 Oct 2023 22:19:03 +0300 Message-ID: <530fedd2233740d401c67bc1470756c86cb578a2.1696360700.git.pav@iki.fi> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Tue, 03 Oct 2023 12:19:13 -0700 (PDT) Use the documented name "MaximumLatency" for the MediaEndpoint QoS Max_Transport_Latency field, in SelectProperties input parameters and expected client MediaEndpoint properties. Put QoS fields to a "QoS" dict in SelectProperties input. Fix typoed ppd_min -> ppd_max in SelectProperties input. Use the name "Locations" for SelectProperties supported locations input parameter, to match the MediaEndpoint property name which indicates the same thing. --- Notes: v3: remove spurious duplicated properties, fix duplicated ppd_min v2: put SelectProperties QoS things to "QoS" dict profiles/audio/media.c | 37 ++++++++++++++++++++++++++----------- 1 file changed, 26 insertions(+), 11 deletions(-) diff --git a/profiles/audio/media.c b/profiles/audio/media.c index 8345487d7..1d98ac5a1 100644 --- a/profiles/audio/media.c +++ b/profiles/audio/media.c @@ -965,7 +965,7 @@ static int pac_select(struct bt_bap_pac *lpac, struct bt_bap_pac *rpac, loc = bt_bap_pac_get_locations(rpac); if (loc) - g_dbus_dict_append_entry(&dict, "Location", DBUS_TYPE_UINT32, + g_dbus_dict_append_entry(&dict, "Locations", DBUS_TYPE_UINT32, &loc); if (metadata) { @@ -977,26 +977,41 @@ static int pac_select(struct bt_bap_pac *lpac, struct bt_bap_pac *rpac, } if (qos && qos->phy) { - g_dbus_dict_append_entry(&dict, "Framing", DBUS_TYPE_BYTE, + DBusMessageIter entry, variant, qos_dict; + + key = "QoS"; + dbus_message_iter_open_container(&dict, DBUS_TYPE_DICT_ENTRY, + NULL, &entry); + dbus_message_iter_append_basic(&entry, DBUS_TYPE_STRING, &key); + dbus_message_iter_open_container(&entry, DBUS_TYPE_VARIANT, + "a{sv}", &variant); + dbus_message_iter_open_container(&variant, DBUS_TYPE_ARRAY, + "{sv}", &qos_dict); + + g_dbus_dict_append_entry(&qos_dict, "Framing", DBUS_TYPE_BYTE, &qos->framing); - g_dbus_dict_append_entry(&dict, "PHY", DBUS_TYPE_BYTE, + g_dbus_dict_append_entry(&qos_dict, "PHY", DBUS_TYPE_BYTE, &qos->phy); - g_dbus_dict_append_entry(&dict, "Latency", DBUS_TYPE_UINT16, - &qos->latency); + g_dbus_dict_append_entry(&qos_dict, "MaximumLatency", + DBUS_TYPE_UINT16, &qos->latency); - g_dbus_dict_append_entry(&dict, "MinimumDelay", + g_dbus_dict_append_entry(&qos_dict, "MinimumDelay", DBUS_TYPE_UINT32, &qos->pd_min); - g_dbus_dict_append_entry(&dict, "MaximumDelay", + g_dbus_dict_append_entry(&qos_dict, "MaximumDelay", DBUS_TYPE_UINT32, &qos->pd_max); - g_dbus_dict_append_entry(&dict, "PreferredMinimumDelay", + g_dbus_dict_append_entry(&qos_dict, "PreferredMinimumDelay", DBUS_TYPE_UINT32, &qos->ppd_min); - g_dbus_dict_append_entry(&dict, "PreferredMaximumDelay", - DBUS_TYPE_UINT32, &qos->ppd_min); + g_dbus_dict_append_entry(&qos_dict, "PreferredMaximumDelay", + DBUS_TYPE_UINT32, &qos->ppd_max); + + dbus_message_iter_close_container(&variant, &qos_dict); + dbus_message_iter_close_container(&entry, &variant); + dbus_message_iter_close_container(&dict, &entry); } dbus_message_iter_close_container(&iter, &dict); @@ -2749,7 +2764,7 @@ static void app_register_endpoint(void *data, void *user_data) dbus_message_iter_get_basic(&iter, &qos.phy); } - if (g_dbus_proxy_get_property(proxy, "Latency", &iter)) { + if (g_dbus_proxy_get_property(proxy, "MaximumLatency", &iter)) { if (dbus_message_iter_get_arg_type(&iter) != DBUS_TYPE_UINT16) goto fail; -- 2.41.0