drivers/usb/acpi: Add AOLD Method for Intel Bluetooth
Add AOLD Method, which returns an integer based on whether Audio Offload is enabled. Leave the existing control of Audio Offload in `soc/soc_chip.h`. Add `cnvi_bt_audio_offload` in the USB ACPI `chip.h` to control the aforementioned return value. The value in `soc/soc_chip.h` and `chip.h` should match. Change-Id: Idb804fb1cf0edef4a98479a6261ca68255dbf075 Signed-off-by: Sean Rhodes <sean@starlabs.systems> Reviewed-on: https://review.coreboot.org/c/coreboot/+/84134 Reviewed-by: Nicholas Sudsgaard <devel+coreboot@nsudsgaard.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
parent
bede28b17d
commit
229d8fa286
3 changed files with 32 additions and 3 deletions
|
|
@ -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__ */
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue