Received: by 2002:a89:413:0:b0:1fd:dba5:e537 with SMTP id m19csp1373382lqs; Sat, 15 Jun 2024 06:14:16 -0700 (PDT) X-Forwarded-Encrypted: i=4; AJvYcCXFDPUGThMYezVV7wueP0jP4XyfD+hZJ6yJlVNImApkWoac08jqJP/Qwb8Lu/zEd7SnJY0jj+gBToFcqZce0+PFyIpbybsqENO1PzRBdQ== X-Google-Smtp-Source: AGHT+IFZU6y4rW/v/d5EWR3QTOr2hmpKUDpX0QEC4MyfovWi2aYomxUcFmWRq74WyzTMpvnv57Bz X-Received: by 2002:a17:906:a20a:b0:a6f:27e2:812c with SMTP id a640c23a62f3a-a6f60d20ec2mr331749566b.22.1718457256725; Sat, 15 Jun 2024 06:14:16 -0700 (PDT) ARC-Seal: i=3; a=rsa-sha256; t=1718457256; cv=pass; d=google.com; s=arc-20160816; b=lj8v4l/Y6k6/yMYnylFZwuJubNpwiQwlnVQQNDWLeVqpj4YZrkXxLCX3eo4QSmsC+t oyvL0j+51clEB0sH62+tieHrsMn9RiJJ26DFQEi17An5ZpSKzer7fHJl7y7MV/oD6Q1z iJwGVXNthc8e0I+WRo6wzE6ab7MC8GjPJPDYt+iV41rV1KsPk/2INucEULO0xnivJFJV lBQDY77but5mrfI9znXBFWOPnq7vNrd/fMZTS4UcLkOUClJet6aQ45TcFQLzpzZNm/K1 /e3JpGl4sFoCkQrvBmMoMTCsGR8uI6uXVwzmBbZFgP2QZu33nu53g00nomY2zWuywPMF eYCQ== ARC-Message-Signature: i=3; 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:message-id:date:subject:cc:to :from:dkim-signature; bh=CNCi1bDEIrmnmmERkcYkWdYIvA9CKagD4g24QyTeIX4=; fh=ExGhjNQEFJgRqHmYATVc5UXZbS7abAmaHDitrfHKOuE=; b=a5IKvQ+RNxZFX+5oW06gMfs8tHGCmZAliLrQE0EuNO6QS4lU/pIIY4hB7f3LYPAyxB Yt+vvFIrzDKB7k54CsEhyBxND1b8g9p+QrHdzYkAL/FqtzX6HSXLfkiHndc/xH0aEPUG VtROOc5D68e9yDSrU+DOcNaBQIhe8db4S/JOId1AFTyAK0IoHvptzBcPEIbO9Q4gZZAX zpnEyWSLHIvz220Wbp5OLvMvkb37gUesA3f0tkaVzLP3R9lWkGrU8YSWsTEj7xFMnspF EE5U6EIT4vZuvUHebYOcigbVsak2ji5/knmD6dGsf9vKajw2oTYbR6N+PrHTdQdMlk+Z Xoxg==; dara=google.com ARC-Authentication-Results: i=3; mx.google.com; dkim=pass header.i=@iki.fi header.s=lahtoruutu header.b=l5ruHWtY; arc=pass (i=2 spf=pass spfdomain=iki.fi dkim=pass dkdomain=iki.fi); spf=pass (google.com: domain of linux-bluetooth+bounces-5329-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-bluetooth+bounces-5329-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id a640c23a62f3a-a6f56d21128si262726366b.103.2024.06.15.06.14.16 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 15 Jun 2024 06:14:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-bluetooth+bounces-5329-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@iki.fi header.s=lahtoruutu header.b=l5ruHWtY; arc=pass (i=2 spf=pass spfdomain=iki.fi dkim=pass dkdomain=iki.fi); spf=pass (google.com: domain of linux-bluetooth+bounces-5329-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-bluetooth+bounces-5329-linux.lists.archive=gmail.com@vger.kernel.org" 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 am.mirrors.kernel.org (Postfix) with ESMTPS id 660181F21E37 for ; Sat, 15 Jun 2024 13:14:16 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 91802482DD; Sat, 15 Jun 2024 13:14:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=iki.fi header.i=@iki.fi header.b="l5ruHWtY" X-Original-To: linux-bluetooth@vger.kernel.org Received: from lahtoruutu.iki.fi (lahtoruutu.iki.fi [185.185.170.37]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4F5DBD53B for ; Sat, 15 Jun 2024 13:14:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=pass smtp.client-ip=185.185.170.37 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718457248; cv=pass; b=FPo1DDJyp0gujcSQivXwAvC1LM9ochar6cElb6jfN7BvP1Qz4yvcm5fpoiHWn9fm9HiMkOWBFa/hJVfKFqQKtCVL2QJI5Z19s31XdDBDn3CqdQ638P/PmfDHNEfWaLmbxBiMQbEnW0InLUyK2hXYJSQbh9wjRIUm7MHK4Ddndp0= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718457248; c=relaxed/simple; bh=l6w2Pw/ju+7r8kEw24JIM7gdlzS9ATuAOPRZxwvRYqM=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=EvoObZDaO2SEs+Db3swsQLLAY8sS68iv9rpHyc+M69aFUMjcHam+t/b3lI6EwhLVUL4W20/TkW82bl9uh43jDNLTDSJvj7sdzhZDTgt29AUMgllIt6Fd1SUiY4hsQ7ex+lVGgS8cIj4reJLlSw0+zY/7CD+lEidZkSyoNIN2dRA= ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=iki.fi; spf=pass smtp.mailfrom=iki.fi; dkim=pass (2048-bit key) header.d=iki.fi header.i=@iki.fi header.b=l5ruHWtY; arc=pass smtp.client-ip=185.185.170.37 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=iki.fi Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=iki.fi Received: from monolith.lan (unknown [193.138.7.198]) (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 4W1c6d0PGRz49Pxk; Sat, 15 Jun 2024 16:14:00 +0300 (EEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iki.fi; s=lahtoruutu; t=1718457241; 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=CNCi1bDEIrmnmmERkcYkWdYIvA9CKagD4g24QyTeIX4=; b=l5ruHWtYGCWp1kFl1oz6tgGaJ4/v78PP14qITTgROY0Wiltl0RbUnCMGDU3dJ2JP3gNd3l Sv69T26TFDy9pKhYwZ2XGSdyHGji0E1mZyB8BewbvxbA4BCLWXMI3WBSUVBp1DhdnlyC8m ByvHSUbm0XZOdOW6R2nrUvWZs8OlLCnCD3OP0a4PdFBoM7OEDL8nENKLVvwSinNN9yKQjG Br+qqX/U2Cpp1xxPL5t9h8OZBAVOmNNmPKQBumaTah/jyUXJe/uQSDYYgtF5Uya+2QzwTG b3YPIOWzgqgSHNoHnIt1kZwIm49HAUdZtLRYKBlhR1+9yWWjPY7/4SGrXpdywQ== ARC-Seal: i=1; s=lahtoruutu; d=iki.fi; t=1718457241; a=rsa-sha256; cv=none; b=gKzHm6PnuJcoshR4Ek3DciGQFS0cSr/JhtLYkp3YkM0vq2lg2FHmkalxMKPXiUD5u6xJV/ DBdM1Om1DjWU3JrPH4OwbYmA4+vM3rtBv0ewsNcQ9U84Lw/2oWNzu052yroVDPUtx883oD IH3/Xqs+xAZ/DmMCoB8jFSgZKQaBN4TKrJw2jHfaavUZFlRW9oqNNtjZprTDe0jvO+HqOS 0QFKvPfxT+bB9WyM+UucI6nfbPlYGyRh41A1oIbWzjdETFfT+IJS/fi3fojNOK8NAC6EUD cdZ04lxEZyI0eARpOAv1cGE1jVyQOiaZq8AQunwmI0sEPKKvq03s6IjcYKzvFw== 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=1718457241; 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=CNCi1bDEIrmnmmERkcYkWdYIvA9CKagD4g24QyTeIX4=; b=I/dPmBAJztp0D6uTGM75QccobVvvoGjBcy2h9zJZ87Fr5doGo8KM/qM24eoYuxs5TkAGud nnSiD1ew1e1Kp4r0a1LPof7KhWj+7lcWJ1wCL4NbfTw2c93sluFpVNdmiUDpAOEisT8HBl HJNs59AIt4G+N0IN6uTGAY95H91y4qwHjz9fWIJGKACFyOHq5nkQuYWBthsRLCVnZ+dHpe kYd8TCTTKO404WMYT/QVBvR9TXtvXir14b6kn4qheel3cLY9m6rYDZYjgTNU6+jxsUr70K KdhJG8UEYqJADO+H7tE+5TSoCAlQI6arwbVrNNOjSMJH2wuTBIdgFoSISHxbhg== From: Pauli Virtanen To: linux-bluetooth@vger.kernel.org Cc: Pauli Virtanen Subject: [PATCH BlueZ] shared/bap: make BT_BAP_* direction defines valid bitmasks Date: Sat, 15 Jun 2024 16:13:56 +0300 Message-ID: <70a822d15a7e82ec6dc83c4b42e54799c3e45e05.1718457098.git.pav@iki.fi> X-Mailer: git-send-email 2.45.2 Precedence: bulk X-Mailing-List: linux-bluetooth@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit The directions appear to be intended as bitmasks, as bt_bap_stream_io_dir() will bitwise or linked stream directions. Fix the defines to be separate bits. Fixes confusion due to BT_BAP_BCAST_SOURCE == BT_BAP_SINK|BT_BAP_SOURCE, which causes e.g. unicast transports to be in PENDING state after QoS although this does not make sense for BAP unicast Client. --- src/shared/bap-defs.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/shared/bap-defs.h b/src/shared/bap-defs.h index 2467e816f..75e6950ea 100644 --- a/src/shared/bap-defs.h +++ b/src/shared/bap-defs.h @@ -17,8 +17,8 @@ #define BT_BAP_SINK 0x01 #define BT_BAP_SOURCE 0x02 -#define BT_BAP_BCAST_SOURCE 0x03 -#define BT_BAP_BCAST_SINK 0x04 +#define BT_BAP_BCAST_SOURCE 0x04 +#define BT_BAP_BCAST_SINK 0x08 #define BT_BAP_STREAM_TYPE_UCAST 0x01 #define BT_BAP_STREAM_TYPE_BCAST 0x02 -- 2.45.2