Commit a9737808 authored by Daniel Baluta's avatar Daniel Baluta Committed by Mark Brown

ASoC: SOF: compress: Set compress data offset

Because now snd_sof_set_stream_data_offset has compress
support we use it to set posn_offset for compress stream.
Reviewed-by: default avatarPaul Olaru <paul.olaru@nxp.com>
Reviewed-by: default avatarIuliana Prodan <iuliana.prodan@nxp.com>
Reviewed-by: default avatarRanjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: default avatarPeter Ujfalusi <peter.ujfalusi@linux.intel.com>
Signed-off-by: default avatarDaniel Baluta <daniel.baluta@nxp.com>
Link: https://lore.kernel.org/r/20230117122533.201708-5-daniel.baluta@oss.nxp.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent 090349a9
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
#include "sof-audio.h" #include "sof-audio.h"
#include "sof-priv.h" #include "sof-priv.h"
#include "sof-utils.h" #include "sof-utils.h"
#include "ops.h"
static void sof_set_transferred_bytes(struct sof_compr_stream *sstream, static void sof_set_transferred_bytes(struct sof_compr_stream *sstream,
u64 host_pos, u64 buffer_size) u64 host_pos, u64 buffer_size)
...@@ -237,6 +238,14 @@ static int sof_compr_set_params(struct snd_soc_component *component, ...@@ -237,6 +238,14 @@ static int sof_compr_set_params(struct snd_soc_component *component,
goto out; goto out;
} }
ret = snd_sof_set_stream_data_offset(sdev, &spcm->stream[cstream->direction],
ipc_params_reply.posn_offset);
if (ret < 0) {
dev_err(component->dev, "Invalid stream data offset for Compr %d\n",
spcm->pcm.pcm_id);
goto out;
}
sstream->sampling_rate = params->codec.sample_rate; sstream->sampling_rate = params->codec.sample_rate;
sstream->channels = params->codec.ch_out; sstream->channels = params->codec.ch_out;
sstream->sample_container_bytes = pcm->params.sample_container_bytes; sstream->sample_container_bytes = pcm->params.sample_container_bytes;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment