Skip to content

Commit 7fd5fd6

Browse files
wjablon1lgirdwood
authored andcommitted
zephyr: fix gtw config size on D3 resume
Convert length of DAI gtw cfg from words to bytes before passing it to dai_set_config() during D3 resume. The same conversion is already performed during the initial configuration. Signed-off-by: Wojciech Jablonski <wojciech.jablonski@intel.com>
1 parent 678de87 commit 7fd5fd6

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

zephyr/lib/cpu.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ static void resume_dais(void)
105105
struct processing_module *mod;
106106
struct copier_data *cd;
107107
struct dai_data *dd;
108+
size_t gtw_cfg_size;
108109

109110
#if CONFIG_INTEL_ADSP_MIC_PRIVACY
110111
/* Re-initialize mic privacy manager first to ensure proper state before DAI resume */
@@ -119,12 +120,13 @@ static void resume_dais(void)
119120
mod = comp_mod(icd->cd);
120121
cd = module_get_private_data(mod);
121122
dd = cd->dd[0];
123+
/* gtw_cfg.config_length is in words */
124+
gtw_cfg_size = cd->config.gtw_cfg.config_length << 2;
122125
if (dai_probe(dd->dai->dev) < 0) {
123126
tr_err(&zephyr_tr, "DAI resume failed on probe, type %d index %d",
124127
dd->dai->type, dd->dai->index);
125-
} else if (dai_set_config(dd->dai, &dd->ipc_config,
126-
cd->config.gtw_cfg.config_data,
127-
cd->config.gtw_cfg.config_length) < 0) {
128+
} else if (dai_set_config(dd->dai, &dd->ipc_config, cd->config.gtw_cfg.config_data,
129+
gtw_cfg_size) < 0) {
128130
tr_err(&zephyr_tr, "DAI resume failed on config, type %d index %d",
129131
dd->dai->type, dd->dai->index);
130132
}

0 commit comments

Comments
 (0)