Unverified Commit 8fc26226 authored by Mark Brown's avatar Mark Brown
Browse files

Make the SOF pcm_hw_params DSP op IPC agnostic

Merge series from Ranjani Sridharan <ranjani.sridharan@linux.intel.com>:

In preparation for supporting the newly introduced IPC version in the SOF
firmware, this patchset adds the changes required to make the
pcm_hw_params DSP op IPC agnostic.
parents c0fc71e2 00f19253
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -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 */

+2 −1
Original line number Diff line number Diff line
@@ -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;

+1 −2
Original line number Diff line number Diff line
@@ -361,8 +361,7 @@ int snd_sof_device_probe(struct device *dev, struct snd_sof_pdata *plat_data)
	if (!sof_ops(sdev) || !sof_ops(sdev)->probe || !sof_ops(sdev)->run ||
	    !sof_ops(sdev)->block_read || !sof_ops(sdev)->block_write ||
	    !sof_ops(sdev)->send_msg || !sof_ops(sdev)->load_firmware ||
	    !sof_ops(sdev)->ipc_msg_data || !sof_ops(sdev)->ipc_pcm_params ||
	    !sof_ops(sdev)->fw_ready) {
	    !sof_ops(sdev)->ipc_msg_data || !sof_ops(sdev)->fw_ready) {
		dev_err(dev, "error: missing mandatory ops\n");
		return -EINVAL;
	}
+2 −2
Original line number Diff line number Diff line
@@ -509,7 +509,7 @@ static const struct snd_sof_dsp_ops sof_imx8_ops = {
	.get_window_offset	= imx8_get_window_offset,

	.ipc_msg_data	= sof_ipc_msg_data,
	.ipc_pcm_params	= sof_ipc_pcm_params,
	.set_stream_data_offset = sof_set_stream_data_offset,

	/* module loading */
	.load_module	= snd_sof_parse_module_memcpy,
@@ -572,7 +572,7 @@ static const struct snd_sof_dsp_ops sof_imx8x_ops = {
	.get_window_offset	= imx8_get_window_offset,

	.ipc_msg_data	= sof_ipc_msg_data,
	.ipc_pcm_params	= sof_ipc_pcm_params,
	.set_stream_data_offset = sof_set_stream_data_offset,

	/* module loading */
	.load_module	= snd_sof_parse_module_memcpy,
+1 −1
Original line number Diff line number Diff line
@@ -435,7 +435,7 @@ static const struct snd_sof_dsp_ops sof_imx8m_ops = {
	.get_window_offset	= imx8m_get_window_offset,

	.ipc_msg_data	= sof_ipc_msg_data,
	.ipc_pcm_params	= sof_ipc_pcm_params,
	.set_stream_data_offset = sof_set_stream_data_offset,

	/* module loading */
	.load_module	= snd_sof_parse_module_memcpy,
Loading