From: Tedd Ho-Jeong An <hj.tedd.an@gmail.com>
To: linux-bluetooth@vger.kernel.org
Cc: Tedd Ho-Jeong An <tedd.an@intel.com>
Subject: [PATCH RFC] Bluetooth: btintel: Fix WBS setting for Intel legacy ROM products
Date: Tue, 18 Jan 2022 20:51:19 -0800 [thread overview]
Message-ID: <20220119045119.132191-1-hj.tedd.an@gmail.com> (raw)
From: Tedd Ho-Jeong An <tedd.an@intel.com>
Intel Legacy ROM Products don't support WBS except the SdP(8087:0aa7).
But StP2(8087:0a2a) and SdP have the same version information, and
btintel cannot distinguish between StP2 and SdP for WBS support.
This patch sets the WBS support flag for SdP based on USB idProduct and
uses it in btintel to configure the WBS.
This flag is only applicable for Legacy ROM products.
Fixes: 3df4dfbec0f29 ("Bluetooth: btintel: Move hci quirks to setup routine")
Signed-off-by: Tedd Ho-Jeong An <tedd.an@intel.com>
---
drivers/bluetooth/btintel.c | 10 +++++++---
drivers/bluetooth/btintel.h | 1 +
drivers/bluetooth/btusb.c | 12 ++++++++++++
3 files changed, 20 insertions(+), 3 deletions(-)
diff --git a/drivers/bluetooth/btintel.c b/drivers/bluetooth/btintel.c
index 1a4f8b227eac..6730c9b2ae33 100644
--- a/drivers/bluetooth/btintel.c
+++ b/drivers/bluetooth/btintel.c
@@ -2428,10 +2428,14 @@ static int btintel_setup_combined(struct hci_dev *hdev)
/* Apply the device specific HCI quirks
*
- * WBS for SdP - SdP and Stp have a same hw_varaint but
- * different fw_variant
+ * WBS for SdP - The version information is the same for
+ * both StP2 and SdP, so it cannot be used to
+ * distinguish between StP2 and SdP. Instead, it uses
+ * the flag set by the transport driver(btusb) for
+ * the Legacy ROM SKU and sets the quirk for WBS.
*/
- if (ver.hw_variant == 0x08 && ver.fw_variant == 0x22)
+ if (btintel_test_flag(hdev,
+ INTEL_ROM_LEGACY_WBS_SUPPORTED))
set_bit(HCI_QUIRK_WIDEBAND_SPEECH_SUPPORTED,
&hdev->quirks);
diff --git a/drivers/bluetooth/btintel.h b/drivers/bluetooth/btintel.h
index c9b24e9299e2..efdb3d738abf 100644
--- a/drivers/bluetooth/btintel.h
+++ b/drivers/bluetooth/btintel.h
@@ -152,6 +152,7 @@ enum {
INTEL_BROKEN_INITIAL_NCMD,
INTEL_BROKEN_SHUTDOWN_LED,
INTEL_ROM_LEGACY,
+ INTEL_ROM_LEGACY_WBS_SUPPORTED,
__INTEL_NUM_FLAGS,
};
diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c
index c30d131da784..286e2fa1ef44 100644
--- a/drivers/bluetooth/btusb.c
+++ b/drivers/bluetooth/btusb.c
@@ -3742,6 +3742,18 @@ static int btusb_probe(struct usb_interface *intf,
if (id->driver_info & BTUSB_INTEL_BROKEN_SHUTDOWN_LED)
btintel_set_flag(hdev, INTEL_BROKEN_SHUTDOWN_LED);
+
+ /* Intel's Legacy ROM products don't support WBS except
+ * the SdP(8087:0aa7). But the StP2(8087:0a2a) and SdP have the
+ * same version information, and btintel can't distinguish
+ * between StP2 and SdP for the WBS support.
+ * It sets the flag here based on the USB PID to enable the WBS
+ * support for legacy ROM products.
+ * Note that this flag is only applicable to legacy ROM
+ * products.
+ */
+ if (id->idProduct == 0x0aa7)
+ btintel_set_flag(hdev, INTEL_ROM_LEGACY_WBS_SUPPORTED);
}
if (id->driver_info & BTUSB_MARVELL)
--
2.25.1
next reply other threads:[~2022-01-19 4:51 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-19 4:51 Tedd Ho-Jeong An [this message]
2022-01-19 17:03 ` [PATCH RFC] Bluetooth: btintel: Fix WBS setting for Intel legacy ROM products Marcel Holtmann
2022-01-20 7:37 ` An, Tedd
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220119045119.132191-1-hj.tedd.an@gmail.com \
--to=hj.tedd.an@gmail.com \
--cc=linux-bluetooth@vger.kernel.org \
--cc=tedd.an@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox