Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp2398222pxb; Fri, 8 Oct 2021 07:04:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwiD4Pg47EjqHoesFj3gR11w5k8DWcwm3hCYHTAnJxKeLdFndVFnqgoh0iq+Qqcp7lEWWek X-Received: by 2002:a50:d8c7:: with SMTP id y7mr15147598edj.133.1633701870638; Fri, 08 Oct 2021 07:04:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633701870; cv=none; d=google.com; s=arc-20160816; b=FpunJURxK+M4w4erEXwHwgGjGgiMWldN2jIG6ZWrHbORd6xVdDb0zy9WpIpuY1+Man hCNeU9JncGWIlv1nm9SzTkJqPftd7G+d+GuLbN/wDrYrVwkjl2qjSMInoJqL7kMrbm6C GC0iGP/C7w2xJNVig6MiLcohfJZYdNNRlKosegWV/5iHQMSA309XdkdakOWPKSI0X7ql qRmrMIPobk49jKdYbIiLiiwn1O+7ppmVCc1Cw91mG33g8t62oLAtydpcmmMfTGrehz5L EKSsKUScJ/dhQE61wTIWiPwNSz0lbh2o04MxxYvOpxz4Ck7qm8uskM7aqyb15yqq/IAq 7loQ== 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=fNJUGn1P+e2gf90IwbQJZnoIdHQXX9CEOJMwY/7QSeo=; b=j7on46ARVtmtHTMlKq7iM17SimYQd9Ykjde5GU27stCpvpSe5/8o3FvXB2ttviGIGp Xq6hsWiYstkkvSQ7Rfe/EIu/dA38K7WjMeFoIYL1Hqr9D252x5oyiWSxcGx6ywvMM882 KNiFmMsxbsQsrB7GK3PxOO4CS58pqQz2yB8CsfPZqEx+uBu0GUzo8u1nSxvSt2qvAIHL AhB/UcO9m27zPs1Cqi4nTuftQyyK5jJhbCkcJzMmzRTNxRD7KsJdCu0A5k5Y7B3nVBEX SRsbvhOriedAFxTzpX//+oryQK0LJQFv9ObKDHu9RYp3ztnGEklq4WpLsW1ax7j5PfEk usEQ== 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 y10si3310290ejm.92.2021.10.08.07.04.05; Fri, 08 Oct 2021 07:04:30 -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 S230347AbhJHOE7 (ORCPT + 99 others); Fri, 8 Oct 2021 10:04:59 -0400 Received: from mga17.intel.com ([192.55.52.151]:29654 "EHLO mga17.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230376AbhJHOE7 (ORCPT ); Fri, 8 Oct 2021 10:04:59 -0400 X-IronPort-AV: E=McAfee;i="6200,9189,10130"; a="207321183" X-IronPort-AV: E=Sophos;i="5.85,357,1624345200"; d="scan'208";a="207321183" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Oct 2021 07:03:03 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.85,357,1624345200"; d="scan'208";a="715521107" Received: from intel-lenovo-legion-y540-15irh-pg0.iind.intel.com ([10.224.186.95]) by fmsmga005.fm.intel.com with ESMTP; 08 Oct 2021 07:03:01 -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 v2 7/7] Bluetooth: Read Output codec capabilities Date: Fri, 8 Oct 2021 19:37:59 +0530 Message-Id: <20211008140759.15493-7-kiran.k@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20211008140759.15493-1-kiran.k@intel.com> References: <20211008140759.15493-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. Signed-off-by: Kiran K --- 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