Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp6856018rwd; Mon, 19 Jun 2023 13:38:54 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4iYO6zYxLv0uH976whqPutxgLcBdyHgFkvNmIZS0ovZpvitKIdl2v7CM/FVNonWqBn+K5O X-Received: by 2002:a17:90b:a0d:b0:25b:de8c:6be8 with SMTP id gg13-20020a17090b0a0d00b0025bde8c6be8mr8183744pjb.13.1687207134112; Mon, 19 Jun 2023 13:38:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687207134; cv=none; d=google.com; s=arc-20160816; b=UMpSO5JrMQWtHh/f3fpF2EBA+PFqCoSgj1D49r97Ha0UiNT8G+D4G7rFU7/1A+vDZR Mme247q1rvu1Jo9ljVLnXBDpZHv9li0sw0riwiEIKihqirmNF3Gt4/5LuveKZ7l/txf1 BFFSHYUS/yR9PykfXv36RQqNUzVkyek+jnwmq53g/uTEVDwo9Ft97Ge4VMobLksR0yws J4Ua61R8UZ1pFagOBWA5ujmnR3A4mo4uKgacBDl7zVLd5ucdblrgXeWyeOcGnLzQ8Dfy ol54iQej9tW20u/bsy1JhP+fEBIKdKyiSs9sJpQl45uD65dRWMNjkCVSd81Dw04ckSxs 5k7g== ARC-Message-Signature: i=1; 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:to:from:dkim-signature; bh=cCaOjV86XmCjdxytEUdOthY/SkfDAI0pXNp0TJWsFZ0=; b=oUX0Ez6/jrSzVg/utXgb+OCk86WrIpxSRchrdZdFkKT84I7ZE30pqlBQ3U2OCOvc9d zYeAdVgFUpj17L9R9sWJQJLlSKxcXvTkvtfmZDJMf+BW3FU+NCQpxE1Z0RfanSqvNWh5 dxL5Z4W4VqBbY+D9rjKzhroTVdgbTARZUNNh4fzwL+4vDaz8uvILx+OGQhnbz9+M0Tt2 cWdU3stGBe6i3noVCNrJ/c7CH0/W8b/lU3axBBnbVq5YGW6VTN4ZKlcBisRomi9Caq/s reDqxPA15noCac+MLXrSalT/Av7dPL6mp8TAIhVEnsXloUww+diyf9rak7bgczaObqsz jicg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=DGGoL5mH; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c19-20020a17090abf1300b0025c0a65a763si407123pjs.121.2023.06.19.13.38.30; Mon, 19 Jun 2023 13:38:54 -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=@gmail.com header.s=20221208 header.b=DGGoL5mH; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229853AbjFSUah (ORCPT + 99 others); Mon, 19 Jun 2023 16:30:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36932 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229839AbjFSUag (ORCPT ); Mon, 19 Jun 2023 16:30:36 -0400 Received: from mail-pg1-x529.google.com (mail-pg1-x529.google.com [IPv6:2607:f8b0:4864:20::529]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CA089D2 for ; Mon, 19 Jun 2023 13:30:35 -0700 (PDT) Received: by mail-pg1-x529.google.com with SMTP id 41be03b00d2f7-543d32eed7cso1544649a12.2 for ; Mon, 19 Jun 2023 13:30:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1687206634; x=1689798634; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:from:to:cc:subject:date:message-id:reply-to; bh=cCaOjV86XmCjdxytEUdOthY/SkfDAI0pXNp0TJWsFZ0=; b=DGGoL5mHOpRmiDJ8jdtqtFalK1x7xRgjNS0/0nH95QB/qzGzwUHqn0QyuRkxCEQ3ft UmqxVY0Hr641d3ATXVwpexPMxxfcaG6XHxibV1x54MCoMTG2BpG4xDF0W5NzgPyMtmlK COrAgjq3/wFE38gPO7IW/feSm9ketZhAXAlTxM9jrGy08/VREYxl/2bzHCL7Z4x44mTR iCd5/GkeWBAm8FbEEZnrkSe95Mv2gbO64RgEI+uappJjQP7mFKJKK79NPkAFRtv/GeaW /Dbb8xNupEr7ZTWAG4SfuLPsZG6IBLutTEZjr99i4EQotoaIfIPpHgCZmCOB+HBvXrYY ppLg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687206634; x=1689798634; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=cCaOjV86XmCjdxytEUdOthY/SkfDAI0pXNp0TJWsFZ0=; b=KEit0AyZkd6MVLpgi6oPFZdTsKfuiTJuckr3lyzIulrR+cWexNnflX87EToyhNKe1C RBwG5iyOedQpFHodnOC0tXReoj7bIVXkH0MKsyuevzmZK/L4VPpQ5SMIzR7NDp5ySDob fnvDatdwk3aDem4uSviriVp0M34yFZc8bxQQGzStxi7LhKwJIRdWlg007KSIG1mOWscH KxWZZOa+RoBGwZOgOwFwvlznOsXZ3zRgE/yT5eyRvWxPzym/CR9gTokoTvhwwHMVo2Nt AJUb+o3EOxXaIEYcGROAN7X+shNGxgwhMpgrTzsQfHFJTIW2jB+d6ynLugvDw/w7+KDS lMcA== X-Gm-Message-State: AC+VfDzWcGSGHDKc0Aby4qdkCK+Nqr/GtV0XB4noFsBSx6fwSxmBMPRW wqN9ImMYRo9lGSEJNYAIJkHbP/YhQu1UsQ== X-Received: by 2002:a17:902:d4c4:b0:1b5:532e:33a9 with SMTP id o4-20020a170902d4c400b001b5532e33a9mr6496457plg.12.1687206634305; Mon, 19 Jun 2023 13:30:34 -0700 (PDT) Received: from lvondent-mobl3.. (c-71-59-129-171.hsd1.or.comcast.net. [71.59.129.171]) by smtp.gmail.com with ESMTPSA id ju18-20020a170903429200b001b045c9ababsm202714plb.264.2023.06.19.13.30.32 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Jun 2023 13:30:33 -0700 (PDT) From: Luiz Augusto von Dentz To: linux-bluetooth@vger.kernel.org Subject: [PATCH BlueZ 1/5] shared/bap: Add unespecified bit in audio context to PAC records Date: Mon, 19 Jun 2023 13:30:28 -0700 Message-Id: <20230619203032.6812-1-luiz.dentz@gmail.com> X-Mailer: git-send-email 2.40.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 From: Luiz Augusto von Dentz This makes sure unespecified bit is properly marked in both audio contexts since that required by many platforms in order to work properly and while doing that add proper defines to the defaults values used in PACS. --- src/shared/bap.c | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/src/shared/bap.c b/src/shared/bap.c index 4b31536ee..270f0fd64 100644 --- a/src/shared/bap.c +++ b/src/shared/bap.c @@ -47,6 +47,14 @@ #define BAP_PROCESS_TIMEOUT 10 +#define PACS_SRC_LOCATION 0x00000001 +#define PACS_SNK_LOCATION 0x00000003 + +#define PACS_SRC_CTXT 0x000f +#define PACS_SUPPORTED_SRC_CTXT PACS_SRC_CTXT +#define PACS_SNK_CTXT 0x0fff +#define PACS_SUPPORTED_SNK_CTXT PACS_SNK_CTXT + struct bt_bap_pac_changed { unsigned int id; bt_bap_pac_func_t added; @@ -467,12 +475,12 @@ static struct bt_pacs *pacs_new(struct gatt_db *db) pacs = new0(struct bt_pacs, 1); /* Set default values */ - pacs->sink_loc_value = 0x00000003; - pacs->source_loc_value = 0x00000001; - pacs->sink_context_value = 0x0fff; - pacs->source_context_value = 0x000e; - pacs->supported_sink_context_value = 0x0fff; - pacs->supported_source_context_value = 0x000e; + pacs->sink_loc_value = PACS_SNK_LOCATION; + pacs->source_loc_value = PACS_SRC_LOCATION; + pacs->sink_context_value = PACS_SNK_CTXT; + pacs->source_context_value = PACS_SRC_CTXT; + pacs->supported_sink_context_value = PACS_SUPPORTED_SNK_CTXT; + pacs->supported_source_context_value = PACS_SUPPORTED_SRC_CTXT; /* Populate DB with PACS attributes */ bt_uuid16_create(&uuid, PACS_UUID); -- 2.40.1