未验证 提交 29e3aa0b 编写于 作者: P Peter Ujfalusi 提交者: Mark Brown

ASoC: SOF: Intel: hda-ipc: Add hda_set_stream_data_offset()

Add implementation for the generic set_stream_data_offset() callback to be
used by HDA platforms.

Convert the hda_ipc_pcm_params() to a wrapper for the new function.
Signed-off-by: NPeter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: NPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: NRander Wang <rander.wang@intel.com>
Reviewed-by: NDaniel Baluta <daniel.baluta@nxp.com>
Signed-off-by: NRanjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/20220310042720.976809-8-ranjani.sridharan@linux.intel.comSigned-off-by: NMark Brown <broonie@kernel.org>
上级 9a0a809a
......@@ -267,14 +267,12 @@ int hda_ipc_msg_data(struct snd_sof_dev *sdev,
return 0;
}
int hda_ipc_pcm_params(struct snd_sof_dev *sdev,
struct snd_pcm_substream *substream,
const struct sof_ipc_pcm_params_reply *reply)
int hda_set_stream_data_offset(struct snd_sof_dev *sdev,
struct snd_pcm_substream *substream,
size_t posn_offset)
{
struct hdac_stream *hstream = substream->runtime->private_data;
struct sof_intel_hda_stream *hda_stream;
/* validate offset */
size_t posn_offset = reply->posn_offset;
hda_stream = container_of(hstream, struct sof_intel_hda_stream,
hext_stream.hstream);
......@@ -291,3 +289,10 @@ int hda_ipc_pcm_params(struct snd_sof_dev *sdev,
return 0;
}
int hda_ipc_pcm_params(struct snd_sof_dev *sdev,
struct snd_pcm_substream *substream,
const struct sof_ipc_pcm_params_reply *reply)
{
return hda_set_stream_data_offset(sdev, substream, reply->posn_offset);
}
......@@ -569,6 +569,9 @@ int hda_ipc_msg_data(struct snd_sof_dev *sdev,
int hda_ipc_pcm_params(struct snd_sof_dev *sdev,
struct snd_pcm_substream *substream,
const struct sof_ipc_pcm_params_reply *reply);
int hda_set_stream_data_offset(struct snd_sof_dev *sdev,
struct snd_pcm_substream *substream,
size_t posn_offset);
/*
* DSP IPC Operations.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册