Skip to content

Commit 757f2c9

Browse files
kakuleszaslawblauciak
authored andcommitted
hda-dma fix: align DGMBS value to 32 bits
If DSP Gateway Minimum Buffer Size (DGMBS) is not aligned to 32 bits they occur glitches in output signal (the buffer will be overwritten during work). It can be observed during playback in following configuration: - 8Khz 16bits 1 channel (16bits periods value) - 24kHz 16bits 1 channel (48bits periods value) Signed-off-by: Kamil Kulesza <kamil.kulesza@linux.intel.com>
1 parent c39093d commit 757f2c9

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/drivers/hda-dma.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@
4444
#include <sof/ipc.h>
4545
#include <sof/pm_runtime.h>
4646
#include <sof/wait.h>
47+
#include <sof/audio/format.h>
4748
#include <platform/dma.h>
4849
#include <arch/cache.h>
4950
#include <uapi/ipc.h>
@@ -367,7 +368,7 @@ static int hda_dma_set_config(struct dma *dma, int channel,
367368
host_dma_reg_write(dma, channel, DGBS, buffer_bytes);
368369
host_dma_reg_write(dma, channel, DGBFPI, 0);
369370
host_dma_reg_write(dma, channel, DGBSP, period_bytes);
370-
host_dma_reg_write(dma, channel, DGMBS, period_bytes);
371+
host_dma_reg_write(dma, channel, DGMBS, ALIGN_UP(period_bytes, 32));
371372
host_dma_reg_write(dma, channel, DGLLPI, 0);
372373
host_dma_reg_write(dma, channel, DGLPIBI, 0);
373374

0 commit comments

Comments
 (0)