Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp2390440pxb; Fri, 8 Oct 2021 06:55:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwJ/4ARD0iKBt/eB4umomU9Q6rZhFze7MawNHKfzMonVgQ8VQF+GHeUtZlLY/tVCUK0CZWU X-Received: by 2002:a17:90b:1a86:: with SMTP id ng6mr11934915pjb.120.1633701314129; Fri, 08 Oct 2021 06:55:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633701314; cv=none; d=google.com; s=arc-20160816; b=qXTJY8tneCL3K9J5woQY+79/zgZotI2JQlQrkMMaEZgrPATA6r22zZdPmNZiOwp0Qh dThm3kWdjUEdaBRMS21dUb5dvvplqKbRKe5gDF0WU79CXLpYE65YBAv+jcp8VTz57lC2 zbI9+EZYKwXqUr8j6Rgk/pWYeeYblZkjkeS2VmywsAThpJb9of4wpB/0Qk7N6vEtK/Oe KeeToC/XeGZTEUmf5h32uyajWsnbuj2JMHxkWzU9Stt9tpnncAgLrwlmBQOXyf4jqRSV XOM1UzJsSGro7ljotSne9oyUVfxWEqK+Ivcd6NusNG8jnkMf8wMhKkBctl//mtm1+Ias yirA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from; bh=vyIujlOkxmE/HFem8bfTW9x4sYKnCl2nWd9ZA1+wjmw=; b=HUumJTLEFWU6p1GnS9ebKsHj4Di/35eyXkie8+/URR8aUcNfgqMhr0RF89rSCZXJ/W P4W3VIDMt1GHh+XPYREgqS1nXfA+49ULJEQxDo81QUArrnIfKd2R9Dl+plsAiXBhQTOY YZdlgTpqwCfMD0KFLwVKBUlZKTsogNTIPohlrKw+zGtdhyNmslLeJvyRdY9GOJDaqf9I D2plB4fmOqMuTufQIMMhae9ixj0rWOT29GNNa8FQ1drJuaZDLqUoUAMkPSBUxyCtUSBN 1Kz29s8HIaKYjeD1keDviQdKeM5Zr+lZWvvFLx+bYjf6RuWSl7/9/dzNbA5rAaHLZL0z jTWg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a7si39659851pfv.198.2021.10.08.06.54.35; Fri, 08 Oct 2021 06:55:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236071AbhJHNzd (ORCPT + 99 others); Fri, 8 Oct 2021 09:55:33 -0400 Received: from mga18.intel.com ([134.134.136.126]:60434 "EHLO mga18.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239126AbhJHNzb (ORCPT ); Fri, 8 Oct 2021 09:55:31 -0400 X-IronPort-AV: E=McAfee;i="6200,9189,10130"; a="213457783" X-IronPort-AV: E=Sophos;i="5.85,357,1624345200"; d="scan'208";a="213457783" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Oct 2021 06:53:35 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.85,357,1624345200"; d="scan'208";a="624745019" Received: from intel-lenovo-legion-y540-15irh-pg0.iind.intel.com ([10.224.186.95]) by fmsmga001.fm.intel.com with ESMTP; 08 Oct 2021 06:53:33 -0700 From: Kiran K To: linux-bluetooth@vger.kernel.org Cc: ravishankar.srivatsa@intel.com, chethan.tumkur.narayan@intel.com, luiz.von.dentz@intel.com, Kiran K Subject: [PATCH v1 7/7] Bluetooth: Read Output codec capabilities Date: Fri, 8 Oct 2021 19:28:53 +0530 Message-Id: <20211008135853.8604-7-kiran.k@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20211008135853.8604-1-kiran.k@intel.com> References: <20211008135853.8604-1-kiran.k@intel.com> Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org When reading codec capabilities, read output (controller to host) capabilities also along with input (host to controller) capabilities. Change-Id: I68c9aaca0fb0f57be3cceb33251b39acfae58aaa --- net/bluetooth/hci_codec.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/net/bluetooth/hci_codec.c b/net/bluetooth/hci_codec.c index 6d4e5353f05c..c6bd934dcf36 100644 --- a/net/bluetooth/hci_codec.c +++ b/net/bluetooth/hci_codec.c @@ -159,6 +159,9 @@ void hci_read_supported_codecs(struct hci_dev *hdev) caps.id = std_codecs->codec[i]; caps.direction = 0x00; hci_read_codec_capabilities(hdev, LOCAL_CODEC_ACL_MASK, &caps); + + caps.direction = 0x01; + hci_read_codec_capabilities(hdev, LOCAL_CODEC_ACL_MASK, &caps); } skb_pull(skb, flex_array_size(std_codecs, codec, std_codecs->num) @@ -179,6 +182,9 @@ void hci_read_supported_codecs(struct hci_dev *hdev) caps.vid = vnd_codecs->codec[i].vid; caps.direction = 0x00; hci_read_codec_capabilities(hdev, LOCAL_CODEC_ACL_MASK, &caps); + + caps.direction = 0x01; + hci_read_codec_capabilities(hdev, LOCAL_CODEC_ACL_MASK, &caps); } error: @@ -224,6 +230,10 @@ void hci_read_supported_codecs_v2(struct hci_dev *hdev) for (i = 0; i < std_codecs->num; i++) { caps.id = std_codecs->codec[i].id; + caps.direction = 0x00; + hci_read_codec_capabilities(hdev, std_codecs->codec[i].transport, + &caps); + caps.direction = 0x01; hci_read_codec_capabilities(hdev, std_codecs->codec[i].transport, &caps); } @@ -243,6 +253,10 @@ void hci_read_supported_codecs_v2(struct hci_dev *hdev) caps.id = 0xFF; caps.cid = vnd_codecs->codec[i].cid; caps.vid = vnd_codecs->codec[i].vid; + caps.direction = 0x00; + hci_read_codec_capabilities(hdev, vnd_codecs->codec[i].transport, + &caps); + caps.direction = 0x01; hci_read_codec_capabilities(hdev, vnd_codecs->codec[i].transport, &caps); } -- 2.17.1