drivers/soundwire/alc1320: use common struct to set soundwire ADDR_
Add common soundwire address struct for acpi table configuration
over overridetree.
refer to:
commit 2411942a05 ("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>
This commit is contained in:
parent
9e757b3396
commit
b6051e5648
2 changed files with 8 additions and 10 deletions
|
|
@ -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));
|
||||
|
||||
|
|
|
|||
|
|
@ -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__ */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue