summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sound/soc/sof/sof-priv.h3
-rw-r--r--sound/soc/sof/stream-ipc.c15
2 files changed, 14 insertions, 4 deletions
diff --git a/sound/soc/sof/sof-priv.h b/sound/soc/sof/sof-priv.h
index 4b235ce74dfe..e6fd3910634f 100644
--- a/sound/soc/sof/sof-priv.h
+++ b/sound/soc/sof/sof-priv.h
@@ -638,6 +638,9 @@ int sof_ipc_msg_data(struct snd_sof_dev *sdev,
int sof_ipc_pcm_params(struct snd_sof_dev *sdev,
struct snd_pcm_substream *substream,
const struct sof_ipc_pcm_params_reply *reply);
+int sof_set_stream_data_offset(struct snd_sof_dev *sdev,
+ struct snd_pcm_substream *substream,
+ size_t posn_offset);
int sof_stream_pcm_open(struct snd_sof_dev *sdev,
struct snd_pcm_substream *substream);
diff --git a/sound/soc/sof/stream-ipc.c b/sound/soc/sof/stream-ipc.c
index 15a55851faeb..b7b96b9f5279 100644
--- a/sound/soc/sof/stream-ipc.c
+++ b/sound/soc/sof/stream-ipc.c
@@ -45,12 +45,11 @@ int sof_ipc_msg_data(struct snd_sof_dev *sdev,
}
EXPORT_SYMBOL(sof_ipc_msg_data);
-int sof_ipc_pcm_params(struct snd_sof_dev *sdev,
- struct snd_pcm_substream *substream,
- const struct sof_ipc_pcm_params_reply *reply)
+int sof_set_stream_data_offset(struct snd_sof_dev *sdev,
+ struct snd_pcm_substream *substream,
+ size_t posn_offset)
{
struct sof_stream *stream = substream->runtime->private_data;
- size_t posn_offset = reply->posn_offset;
/* check if offset is overflow or it is not aligned */
if (posn_offset > sdev->stream_box.size ||
@@ -64,6 +63,14 @@ int sof_ipc_pcm_params(struct snd_sof_dev *sdev,
return 0;
}
+EXPORT_SYMBOL(sof_set_stream_data_offset);
+
+int sof_ipc_pcm_params(struct snd_sof_dev *sdev,
+ struct snd_pcm_substream *substream,
+ const struct sof_ipc_pcm_params_reply *reply)
+{
+ return sof_set_stream_data_offset(sdev, substream, reply->posn_offset);
+}
EXPORT_SYMBOL(sof_ipc_pcm_params);
int sof_stream_pcm_open(struct snd_sof_dev *sdev,