diff --git a/src/drivers/soundwire/alc1320/alc1320.c b/src/drivers/soundwire/alc1320/alc1320.c index 1362675f54..10c58e1ecb 100644 --- a/src/drivers/soundwire/alc1320/alc1320.c +++ b/src/drivers/soundwire/alc1320/alc1320.c @@ -10,13 +10,6 @@ #include "chip.h" -static struct soundwire_address alc1320_address = { - .version = SOUNDWIRE_VERSION_1_2, - .manufacturer_id = MIPI_MFG_ID_REALTEK, - .part_id = MIPI_DEV_ID_REALTEK_ALC1320, - .class = MIPI_CLASS_NONE -}; - static struct soundwire_slave alc1320_slave = { .wake_up_unavailable = false, .test_mode_supported = false, @@ -106,10 +99,11 @@ static void soundwire_alc1320_fill_ssdt(const struct device *dev) acpigen_write_device(acpi_device_name(dev)); /* Set codec address IDs. */ - alc1320_address.link_id = dev->path.generic.id; - alc1320_address.unique_id = dev->path.generic.subid; + config->alc1320_address.link_id = dev->path.generic.id; + config->alc1320_address.unique_id = dev->path.generic.subid; + config->alc1320_address.manufacturer_id = MIPI_MFG_ID_REALTEK; - acpigen_write_ADR_soundwire_device(&alc1320_address); + acpigen_write_ADR_soundwire_device(&config->alc1320_address); acpigen_write_name_string("_DDN", config->desc ? : dev->chip_ops->name); acpigen_write_STA(acpi_device_status(dev)); diff --git a/src/drivers/soundwire/alc1320/chip.h b/src/drivers/soundwire/alc1320/chip.h index 028c200219..4278aef0ba 100644 --- a/src/drivers/soundwire/alc1320/chip.h +++ b/src/drivers/soundwire/alc1320/chip.h @@ -3,9 +3,13 @@ #ifndef __DRIVERS_SOUNDWIRE_ALC1320_CHIP_H__ #define __DRIVERS_SOUNDWIRE_ALC1320_CHIP_H__ +#include +#include + struct drivers_soundwire_alc1320_config { const char *name; const char *desc; + struct soundwire_address alc1320_address; }; #endif /* __DRIVERS_SOUNDWIRE_ALC1320_CHIP_H__ */