summaryrefslogtreecommitdiff
path: root/sound/soc/sof/amd/acp-pcm.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc/sof/amd/acp-pcm.c')
-rw-r--r--sound/soc/sof/amd/acp-pcm.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/sound/soc/sof/amd/acp-pcm.c b/sound/soc/sof/amd/acp-pcm.c
index 5b23830cb1f3..0ba8ae46bd76 100644
--- a/sound/soc/sof/amd/acp-pcm.c
+++ b/sound/soc/sof/amd/acp-pcm.c
@@ -17,15 +17,17 @@
#include "acp-dsp-offset.h"
int acp_pcm_hw_params(struct snd_sof_dev *sdev, struct snd_pcm_substream *substream,
- struct snd_pcm_hw_params *params, struct sof_ipc_stream_params *ipc_params)
+ struct snd_pcm_hw_params *params,
+ struct snd_sof_platform_stream_params *platform_params)
{
- struct acp_dsp_stream *stream = substream->runtime->private_data;
+ struct snd_pcm_runtime *runtime = substream->runtime;
+ struct acp_dsp_stream *stream = runtime->private_data;
unsigned int buf_offset, index;
u32 size;
int ret;
- size = ipc_params->buffer.size;
- stream->num_pages = ipc_params->buffer.pages;
+ size = runtime->dma_bytes;
+ stream->num_pages = PFN_UP(runtime->dma_bytes);
stream->dmab = substream->runtime->dma_buffer_p;
ret = acp_dsp_stream_config(sdev, stream);
@@ -34,8 +36,9 @@ int acp_pcm_hw_params(struct snd_sof_dev *sdev, struct snd_pcm_substream *substr
return ret;
}
- ipc_params->buffer.phy_addr = stream->reg_offset;
- ipc_params->stream_tag = stream->stream_tag;
+ platform_params->use_phy_address = true;
+ platform_params->phy_addr = stream->reg_offset;
+ platform_params->stream_tag = stream->stream_tag;
/* write buffer size of stream in scratch memory */