Skip to content

copier: store gateway config in copier_data#8558

Closed
plbossart wants to merge 1 commit intothesofproject:mainfrom
plbossart:fix/lnl-issue-8275
Closed

copier: store gateway config in copier_data#8558
plbossart wants to merge 1 commit intothesofproject:mainfrom
plbossart:fix/lnl-issue-8275

Conversation

@plbossart
Copy link
Member

Calculate actual size of copier module gateway config. Copy and store it in copier_data. It needs to be available even after copier is created e.g. during SET_PIPELINE_STATE IPC when dai_config_dma_channel() is called second time and DMA config is used to assign dma_channel_id value.

Calculate actual size of copier module gateway config. Copy
and store it in copier_data. It needs to be available even
after copier is created e.g. during SET_PIPELINE_STATE IPC
when dai_config_dma_channel() is called second time and
DMA config is used to assign dma_channel_id value.

Signed-off-by: Ievgen Ganakov <ievgen.ganakov@intel.com>
@plbossart
Copy link
Member Author

cherry pick of commit 415aab5 in PR #8361

@fredoh9
Copy link
Contributor

fredoh9 commented Nov 30, 2023

I tested multiple times in LNLM_SDW_AIOC but still seeing FW reported error: 7 - Unsupported operation requested
Doesn't seem to improve any thing.

@RanderWang
Copy link
Collaborator

@plbossart please check 4cc9d54. At first we save the gateway config, but it was deleted

+       /*
+        * Don't copy the config_data[] variable size array, we don't need to
+        * store it, it's only used during IPC processing, besides we haven't
+        * allocated space for it, so don't "fix" this!
+        */

if (copier->gtw_cfg.config_length) {
gtw_cfg_size = copier->gtw_cfg.config_length << 2;
gtw_cfg = rzalloc(SOF_MEM_ZONE_RUNTIME, 0, SOF_MEM_CAPS_RAM,
gtw_cfg_size);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please use rmalloc() - you overwrite it completely 5 lines later

}

ret = memcpy_s(gtw_cfg, gtw_cfg_size, &copier->gtw_cfg.config_data,
gtw_cfg_size);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why we can't directly copy data into cd->gtw_cfg with:

ret = memcpy_s(&cd->gtw_cfg, gtw_cfg_size, &copier->gtw_cfg.config_data,
gtw_cfg_size);

@iganakov
Copy link
Contributor

iganakov commented Dec 5, 2023

@plbossart @fredoh9 Let me submit a proper fix for DMIC and SSP, we've already tested it internally. SNDW needs additional changes related to blob format which is now different for Linux and Windows

@plbossart plbossart closed this Dec 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants