summaryrefslogtreecommitdiff
path: root/sound/soc/sof/amd
diff options
context:
space:
mode:
authorPeter Ujfalusi <peter.ujfalusi@linux.intel.com>2022-03-10 07:27:12 +0300
committerMark Brown <broonie@kernel.org>2022-03-11 16:41:01 +0300
commit31f60a0c943d6a7e84b06686b1ed86ddadf484fa (patch)
tree025aba74c848fb54223cbbe07a6c93790d267047 /sound/soc/sof/amd
parentd7bc6ddef016d851cb0ff97ae16ac98d5f3c85ee (diff)
downloadlinux-31f60a0c943d6a7e84b06686b1ed86ddadf484fa.tar.xz
ASoC: SOF: Make pcm_hw_params snd_sof_dsp_ops callback IPC neutral
Do not send IPC structure directly via pcm_hw_params to make it IPC agnostic. A new struct is created to retrieve the needed platform parameters and if there is a need it can be extended with new options. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Rander Wang <rander.wang@intel.com> Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com> Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Link: https://lore.kernel.org/r/20220310042720.976809-3-ranjani.sridharan@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/sof/amd')
-rw-r--r--sound/soc/sof/amd/acp-pcm.c8
-rw-r--r--sound/soc/sof/amd/acp.h3
2 files changed, 7 insertions, 4 deletions
diff --git a/sound/soc/sof/amd/acp-pcm.c b/sound/soc/sof/amd/acp-pcm.c
index b49cc55980ae..0ba8ae46bd76 100644
--- a/sound/soc/sof/amd/acp-pcm.c
+++ b/sound/soc/sof/amd/acp-pcm.c
@@ -17,7 +17,8 @@
#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 snd_pcm_runtime *runtime = substream->runtime;
struct acp_dsp_stream *stream = runtime->private_data;
@@ -35,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 */
diff --git a/sound/soc/sof/amd/acp.h b/sound/soc/sof/amd/acp.h
index f550a5010a91..35e46fe6676a 100644
--- a/sound/soc/sof/amd/acp.h
+++ b/sound/soc/sof/amd/acp.h
@@ -201,7 +201,8 @@ int acp_dsp_stream_put(struct snd_sof_dev *sdev, struct acp_dsp_stream *acp_stre
int acp_pcm_open(struct snd_sof_dev *sdev, struct snd_pcm_substream *substream);
int acp_pcm_close(struct snd_sof_dev *sdev, struct snd_pcm_substream *substream);
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);
extern const struct snd_sof_dsp_ops sof_renoir_ops;