Dolan Liu has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/85469?usp=email )
Change subject: driver/sndw/alc1320: add ALC1320 support ......................................................................
driver/sndw/alc1320: add ALC1320 support
Test only
add ALC1320 support
Change-Id: I78bf449a9023d9574c07a4f4cbdcefc378499bc4 --- M src/drivers/soundwire/alc1308/Kconfig M src/drivers/soundwire/alc1308/alc1308.c M src/drivers/soundwire/alc711/alc711.c 3 files changed, 59 insertions(+), 4 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/69/85469/1
diff --git a/src/drivers/soundwire/alc1308/Kconfig b/src/drivers/soundwire/alc1308/Kconfig index edefe94..14c1a0b 100644 --- a/src/drivers/soundwire/alc1308/Kconfig +++ b/src/drivers/soundwire/alc1308/Kconfig @@ -2,3 +2,8 @@
config DRIVERS_SOUNDWIRE_ALC1308 bool + +config DRIVERS_SOUNDWIRE_ALC1320 + bool + help + SoundWire driver for Realtek ALC722 device diff --git a/src/drivers/soundwire/alc1308/alc1308.c b/src/drivers/soundwire/alc1308/alc1308.c index fc7b2af..c4e2992 100644 --- a/src/drivers/soundwire/alc1308/alc1308.c +++ b/src/drivers/soundwire/alc1308/alc1308.c @@ -31,6 +31,21 @@ .sink_port_list = SOUNDWIRE_PORT(1) };
+static struct soundwire_slave alc1320_slave = { + .wake_up_unavailable = false, + .test_mode_supported = true, + .clock_stop_mode1_supported = true, + .simplified_clockstopprepare_sm_supported = true, + .clockstopprepare_hard_reset_behavior = false, + .highPHY_capable = false, + .paging_supported = true, + .bank_delay_supported = false, + .port15_read_behavior = true, + .source_port_list = SOUNDWIRE_PORT(2) | SOUNDWIRE_PORT(4) | + SOUNDWIRE_PORT(6) | SOUNDWIRE_PORT(8) | SOUNDWIRE_PORT(10), + .sink_port_list = SOUNDWIRE_PORT(1) | SOUNDWIRE_PORT(5), +}; + static struct soundwire_audio_mode alc1308_audio_mode = { /* Bus frequency must be 1/2/4/8 divider of supported input frequencies. */ .bus_frequency_configs_count = 12, @@ -70,9 +85,43 @@ .port_audio_mode_list = { 0 } };
+static struct soundwire_dpn alc1320_dp1 = { + .port_wordlength_configs_count = 3, + .port_wordlength_configs = { 16, 20, 24 }, + .data_port_type = FULL_DATA_PORT, + .max_grouping_supported = BLOCK_GROUP_COUNT_1, + .simplified_channelprepare_sm = true, + .imp_def_dpn_interrupts_supported = 0, + .min_channel_number = 1, + .max_channel_number = 2, + .modes_supported = 0xf, + .max_async_buffer = 0x08, + .port_audio_mode_count = 2, + .port_audio_mode_list = { 0, 1 } +}; + static const struct soundwire_codec alc1308_codec = { +#if CONFIG(DRIVERS_SOUNDWIRE_ALC1320) + .slave = &alc1320_slave, + .dpn = { + { + /* Data Input for Speaker Path */ + .port = 1, + .sink = &alc1320_dp1 + }, + { + /* Data out for I.V sensing */ + .port = 1, + .source = &alc1320_dp1 + }, + { + /* Data out for I.V sensing */ + .port = 5, + .source = &alc1320_dp1 + } + } +#else .slave = &alc1308_slave, - .audio_mode = { &alc1308_audio_mode }, .dpn = { { /* Data Input for Speaker Path */ @@ -90,7 +139,8 @@ .source = &alc1308_dp1 } } - +#endif + .audio_mode = { &alc1308_audio_mode } };
static void soundwire_alc1308_fill_ssdt(const struct device *dev) diff --git a/src/drivers/soundwire/alc711/alc711.c b/src/drivers/soundwire/alc711/alc711.c index 68c0474..6c20cdf 100644 --- a/src/drivers/soundwire/alc711/alc711.c +++ b/src/drivers/soundwire/alc711/alc711.c @@ -183,9 +183,9 @@ } } #endif - .audio_mode = { &alc711_audio_mode }, if (config->multilane) - .multilane = multilane; + .multilane = multilane, + .audio_mode = { &alc711_audio_mode } };
static void soundwire_alc711_fill_ssdt(const struct device *dev)