Skip to content

Commit

Permalink
dma: hda: fix buffer address for hda link
Browse files Browse the repository at this point in the history
This will set correct buf address for hda link in&out

Signed-off-by: Adrian Bonislawski <adrian.bonislawski@intel.com>
  • Loading branch information
abonislawski authored and fabiobaltieri committed Sep 30, 2022
1 parent 7eeeff5 commit feffb24
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions drivers/dma/dma_intel_adsp_hda.c
Original file line number Diff line number Diff line change
Expand Up @@ -117,11 +117,11 @@ int intel_adsp_hda_dma_link_in_config(const struct device *dev,
"PERIPHERAL_TO_MEMORY");

blk_cfg = dma_cfg->head_block;
buf = (uint8_t *)(uintptr_t)(blk_cfg->source_address);
buf = (uint8_t *)(uintptr_t)(blk_cfg->dest_address);
res = intel_adsp_hda_set_buffer(cfg->base, cfg->regblock_size, channel, buf,
blk_cfg->block_size);

if (res == 0 && dma_cfg->source_data_size <= 3) {
if (res == 0 && dma_cfg->dest_data_size <= 3) {
/* set the sample container set bit to 16bits */
*DGCS(cfg->base, cfg->regblock_size, channel) |= DGCS_SCS;
}
Expand All @@ -148,12 +148,12 @@ int intel_adsp_hda_dma_link_out_config(const struct device *dev,
"MEMORY_TO_PERIPHERAL");

blk_cfg = dma_cfg->head_block;
buf = (uint8_t *)(uintptr_t)(blk_cfg->dest_address);
buf = (uint8_t *)(uintptr_t)(blk_cfg->source_address);

res = intel_adsp_hda_set_buffer(cfg->base, cfg->regblock_size, channel, buf,
blk_cfg->block_size);

if (res == 0 && dma_cfg->dest_data_size <= 3) {
if (res == 0 && dma_cfg->source_data_size <= 3) {
/* set the sample container set bit to 16bits */
*DGCS(cfg->base, cfg->regblock_size, channel) |= DGCS_SCS;
}
Expand Down

0 comments on commit feffb24

Please sign in to comment.