diff --git a/lib/compilation-prepare.sh b/lib/compilation-prepare.sh index 2d693fbe9..ffd6a7f23 100644 --- a/lib/compilation-prepare.sh +++ b/lib/compilation-prepare.sh @@ -583,6 +583,17 @@ compilation_prepare() fi + # Bluetooth support for Realtek 8822CS (hci_ver 0x8) chipsets + + if linux-version compare "${version}" ge 5.11; then + + display_alert "Adding" "Bluetooth support for Realtek 8822CS (hci_ver 0x8) chipsets" "info" + + process_patch_file "${SRC}/patch/misc/bluetooth-rtl8822cs-hci_ver-0x8.patch" "applying" + + fi + + # Wireless drivers for Realtek 8723DS chipsets if linux-version compare "${version}" ge 5.0 && [ "$EXTRAWIFI" == yes ]; then diff --git a/patch/misc/bluetooth-rtl8822cs-hci_ver-0x8.patch b/patch/misc/bluetooth-rtl8822cs-hci_ver-0x8.patch new file mode 100644 index 000000000..f37ddbb43 --- /dev/null +++ b/patch/misc/bluetooth-rtl8822cs-hci_ver-0x8.patch @@ -0,0 +1,31 @@ +From 727591f7c8180364ad3fad9b52d12688c7c629e3 Mon Sep 17 00:00:00 2001 +From: chbgdn +Date: Fri, 15 Oct 2021 23:08:52 +0300 +Subject: [PATCH] Bluetooth: btrtl: Add support for RTL8822C (hci ver 0008) + +Signed-off-by: chbgdn +--- + drivers/bluetooth/btrtl.c | 7 +++++++ + 1 file changed, 7 insertions(+) + +diff --git a/drivers/bluetooth/btrtl.c b/drivers/bluetooth/btrtl.c +index 1f8afa0244d8..60c4a9976d5a 100644 +--- a/drivers/bluetooth/btrtl.c ++++ b/drivers/bluetooth/btrtl.c +@@ -152,6 +152,13 @@ static const struct id_table ic_id_table[] = { + .fw_name = "rtl_bt/rtl8822cs_fw.bin", + .cfg_name = "rtl_bt/rtl8822cs_config" }, + ++ /* 8822C with UART interface */ ++ { IC_INFO(RTL_ROM_LMP_8822B, 0xc, 0x8, HCI_UART), ++ .config_needed = true, ++ .has_rom_version = true, ++ .fw_name = "rtl_bt/rtl8822cs_fw.bin", ++ .cfg_name = "rtl_bt/rtl8822cs_config" }, ++ + /* 8822C with USB interface */ + { IC_INFO(RTL_ROM_LMP_8822B, 0xc, 0xa, HCI_USB), + .config_needed = false, +-- +2.33.0 +