summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/drivers/usb/acpi/chip.h3
-rw-r--r--src/drivers/usb/acpi/intel_bluetooth.c30
-rw-r--r--src/drivers/usb/acpi/usb_acpi.c2
3 files changed, 32 insertions, 3 deletions
diff --git a/src/drivers/usb/acpi/chip.h b/src/drivers/usb/acpi/chip.h
index 5e41d24f50..afd99715b9 100644
--- a/src/drivers/usb/acpi/chip.h
+++ b/src/drivers/usb/acpi/chip.h
@@ -49,6 +49,7 @@ struct drivers_usb_acpi_config {
/* Intel Bluetooth */
bool is_intel_bluetooth;
+ bool cnvi_bt_audio_offload;
/* GPIO used to take device out of reset or to put it into reset. */
struct acpi_gpio reset_gpio;
@@ -87,7 +88,7 @@ struct drivers_usb_acpi_config {
bool usb_acpi_get_pld(const struct device *usb_device, struct acpi_pld *pld);
/* Intel Bluetooth */
-void acpi_device_intel_bt(unsigned int reset_gpio);
+void acpi_device_intel_bt(unsigned int reset_gpio, bool audio_offload);
void acpi_device_intel_bt_common(void);
#endif /* __USB_ACPI_CHIP_H__ */
diff --git a/src/drivers/usb/acpi/intel_bluetooth.c b/src/drivers/usb/acpi/intel_bluetooth.c
index 773f1ad743..1775286be4 100644
--- a/src/drivers/usb/acpi/intel_bluetooth.c
+++ b/src/drivers/usb/acpi/intel_bluetooth.c
@@ -53,7 +53,7 @@ static void get_feature_flag(void *arg)
void (*uuid_callbacks1[])(void *) = { check_reset_delay, set_reset_delay };
void (*uuid_callbacks2[])(void *) = { get_feature_flag };
-void acpi_device_intel_bt(unsigned int reset_gpio)
+void acpi_device_intel_bt(unsigned int reset_gpio, bool audio_offload)
{
/*
* Name (RDLY, 0x69)
@@ -231,6 +231,34 @@ void acpi_device_intel_bt(unsigned int reset_gpio)
acpigen_emit_namestring("BTRT");
}
acpigen_pop_len();
+
+/*
+ * Method (AOLD, 0, Serialized)
+ * {
+ * Name (AODS, Package (0x03)
+ * {
+ * Zero,
+ * 0x12,
+ * Zero // Audio Offload - 0: Disabled
+ * 1: Enabled
+ * })
+ * Return (AODS)
+ * }
+ */
+ acpigen_write_method_serialized("AOLD", 0);
+ {
+ acpigen_write_name("AODS");
+ acpigen_write_package(3);
+ {
+ acpigen_write_integer(0);
+ acpigen_write_integer(0x12);
+ acpigen_write_integer(audio_offload);
+ }
+ acpigen_pop_len();
+
+ acpigen_write_return_namestr("AODS");
+ }
+ acpigen_pop_len();
}
void acpi_device_intel_bt_common(void)
diff --git a/src/drivers/usb/acpi/usb_acpi.c b/src/drivers/usb/acpi/usb_acpi.c
index f1622921c9..0087cbed54 100644
--- a/src/drivers/usb/acpi/usb_acpi.c
+++ b/src/drivers/usb/acpi/usb_acpi.c
@@ -108,7 +108,7 @@ static void usb_acpi_fill_ssdt_generator(const struct device *dev)
}
if (config->is_intel_bluetooth)
- acpi_device_intel_bt(config->reset_gpio.pins[0]);
+ acpi_device_intel_bt(config->reset_gpio.pins[0], config->cnvi_bt_audio_offload);
acpigen_pop_len();