Re: 答复: RTL8822BE Bluetooth device

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Aug 22, 2017 at 10:21 PM, 陆朱伟 <alex_lu@xxxxxxxxxxxxxx> wrote:
> Hi Alex Deucher,
> The rtl8821a_config.bin is not necessary.
> It is used for some special settings, such as bdaddr, sco over pcm/hci, etc.

Thanks for clarifying.  How about the attached patch to make it clear
which config firmwares are optional?


Alex

>
> Thanks,
> BRs,
> Alex Lu.
>
> -----邮件原件-----
> 发件人: Alex Deucher [mailto:alexdeucher@xxxxxxxxx]
> 发送时间: 2017年8月23日 10:09
> 收件人: linux-bluetooth@xxxxxxxxxxxxxxx; 陆朱伟; Larry.Finger@xxxxxxxxxxxx
> 主题: RTL8822BE Bluetooth device
>
> I have this device, but the driver requires a firmware file
> (rtl8821a_config.bin) which does not seem to exist.  Looking at the code[1], there appear to be several firmware config files for variants of this device:
> + switch (lmp_subver) {
> + case RTL_ROM_LMP_8723B:
> + cfg_name = "rtl_bt/rtl8723b_config.bin"; break; case
> + RTL_ROM_LMP_8821A:
> + cfg_name = "rtl_bt/rtl8821a_config.bin"; break; case
> + RTL_ROM_LMP_8761A:
> + cfg_name = "rtl_bt/rtl8761a_config.bin"; break; case
> + RTL_ROM_LMP_8822B:
> + cfg_name = "rtl_bt/rtl8822b_config.bin"; break;
> However, the only file that seem to actually exist is rtl8822b_config.bin.  Does anyone know where to get the others?
>
> Thanks,
>
> Alex
>
> [1] https://patchwork.kernel.org/patch/9323749/
>
> ------Please consider the environment before printing this e-mail.
From b277ddea83e4da99949fa40aee587ccdba807e43 Mon Sep 17 00:00:00 2001
From: Alex Deucher <alexdeucher@xxxxxxxxx>
Date: Tue, 22 Aug 2017 22:45:48 -0400
Subject: [PATCH] btrtl: Make it clear what config firmware is optional

Some of the bt config firmwares are optional.  They are
only used for special settings.  Make it clear if the
firmware is optional or not during loading.

Signed-off-by: Alex Deucher <alexdeucher@xxxxxxxxx>
---
 drivers/bluetooth/btrtl.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/drivers/bluetooth/btrtl.c b/drivers/bluetooth/btrtl.c
index 8279094..ec9a0d1 100644
--- a/drivers/bluetooth/btrtl.c
+++ b/drivers/bluetooth/btrtl.c
@@ -268,12 +268,14 @@ static int rtl_download_firmware(struct hci_dev *hdev,
 	return ret;
 }
 
-static int rtl_load_config(struct hci_dev *hdev, const char *name, u8 **buff)
+static int rtl_load_config(struct hci_dev *hdev, const char *name, u8 **buff,
+			   bool config_needed)
 {
 	const struct firmware *fw;
 	int ret;
 
-	BT_INFO("%s: rtl: loading %s", hdev->name, name);
+	BT_INFO("%s: rtl: loading %s config %s", hdev->name,
+		config_needed ? "required" : "optional", name);
 	ret = request_firmware(&fw, name, &hdev->dev);
 	if (ret < 0)
 		return ret;
@@ -351,7 +353,7 @@ static int btrtl_setup_rtl8723b(struct hci_dev *hdev, u16 lmp_subver,
 	}
 
 	if (cfg_name) {
-		cfg_sz = rtl_load_config(hdev, cfg_name, &cfg_buff);
+		cfg_sz = rtl_load_config(hdev, cfg_name, &cfg_buff, config_needed);
 		if (cfg_sz < 0) {
 			cfg_sz = 0;
 			if (config_needed)
-- 
2.5.5


[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux