Skip to content

Commit feffb24

Browse files
abonislawskifabiobaltieri
authored andcommitted
dma: hda: fix buffer address for hda link
This will set correct buf address for hda link in&out Signed-off-by: Adrian Bonislawski <[email protected]>
1 parent 7eeeff5 commit feffb24

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

drivers/dma/dma_intel_adsp_hda.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -117,11 +117,11 @@ int intel_adsp_hda_dma_link_in_config(const struct device *dev,
117117
"PERIPHERAL_TO_MEMORY");
118118

119119
blk_cfg = dma_cfg->head_block;
120-
buf = (uint8_t *)(uintptr_t)(blk_cfg->source_address);
120+
buf = (uint8_t *)(uintptr_t)(blk_cfg->dest_address);
121121
res = intel_adsp_hda_set_buffer(cfg->base, cfg->regblock_size, channel, buf,
122122
blk_cfg->block_size);
123123

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

150150
blk_cfg = dma_cfg->head_block;
151-
buf = (uint8_t *)(uintptr_t)(blk_cfg->dest_address);
151+
buf = (uint8_t *)(uintptr_t)(blk_cfg->source_address);
152152

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

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

0 commit comments

Comments
 (0)