Subrata Banik has submitted this change. ( https://review.coreboot.org/c/coreboot/+/86939?usp=email )
(
6 is the latest approved patch-set. No files were changed between the latest approved patch-set and the submitted one. )Change subject: drivers/soundwire/alc1320: use common struct to set soundwire ADDR_ ......................................................................
drivers/soundwire/alc1320: use common struct to set soundwire ADDR_
Add common soundwire address struct for acpi table configuration over overridetree.
refer to: commit 2411942a0518 ("drivers/soundwire/alc711: Add common Kconfig for ALC7xx soundwire codecs")
BUG=b:378629979 TEST=emerge-fatcat coreboot check the ssdt dump PCI0.HDAS.SNDW has address: 0x000331025D132001
Change-Id: I2d3531eef6adf21a28a26dcc3ac1bb7830877905 Signed-off-by: Mac Chiang mac.chiang@intel.com Reviewed-on: https://review.coreboot.org/c/coreboot/+/86939 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Weimin Wu wuweimin@huaqin.corp-partner.google.com Reviewed-by: Pranava Y N pranavayn@google.com Reviewed-by: Subrata Banik subratabanik@google.com --- M src/drivers/soundwire/alc1320/alc1320.c M src/drivers/soundwire/alc1320/chip.h 2 files changed, 8 insertions(+), 10 deletions(-)
Approvals: Weimin Wu: Looks good to me, but someone else must approve Subrata Banik: Looks good to me, approved build bot (Jenkins): Verified Pranava Y N: Looks good to me, approved
diff --git a/src/drivers/soundwire/alc1320/alc1320.c b/src/drivers/soundwire/alc1320/alc1320.c index 1362675..10c58e1 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 @@ 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 028c200..4278aef 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 <device/soundwire.h> +#include <mipi/ids.h> + struct drivers_soundwire_alc1320_config { const char *name; const char *desc; + struct soundwire_address alc1320_address; };
#endif /* __DRIVERS_SOUNDWIRE_ALC1320_CHIP_H__ */