aboutsummaryrefslogtreecommitdiff
path: root/sound/soc/sof/ipc.c
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2021-10-07 22:24:58 +0100
committerMark Brown <broonie@kernel.org>2021-10-07 22:24:58 +0100
commit99f11b6552fa36da107a6a92773a11109107b686 (patch)
treedd8317c083b0ee295be6ef241a19f9b262345bef /sound/soc/sof/ipc.c
parent1cfd7c2ee9f37abc8e1a410a000efca819723077 (diff)
parent858f7a5c45cacbf9965c4735330ee34baa0728f4 (diff)
Merge series "Introduce new SOF helpers" from Daniel Baluta <daniel.baluta@oss.nxp.com>
Daniel Baluta <daniel.baluta@nxp.com>: From: Daniel Baluta <daniel.baluta@nxp.com> This patchseries adds new helpers in order to reduce code duplication and prepare for compress audio support with SOF. Bud Liviu-Alexandru (1): ASoC: SOF: Make Intel IPC stream ops generic Daniel Baluta (3): ASoC: SOF: Introduce snd_sof_mailbox_read / snd_sof_mailbox_write callbacks ASoC: SOF: imx: Use newly introduced generic IPC stream ops ASoC: SOF: Introduce fragment elapsed notification API sound/soc/sof/Kconfig | 4 ++ sound/soc/sof/Makefile | 3 +- sound/soc/sof/compress.c | 51 +++++++++++++++++++ sound/soc/sof/imx/Kconfig | 2 + sound/soc/sof/imx/imx8.c | 39 +++++++------- sound/soc/sof/imx/imx8m.c | 26 ++++------ sound/soc/sof/intel/Makefile | 3 -- sound/soc/sof/intel/apl.c | 4 ++ sound/soc/sof/intel/bdw.c | 12 +++-- sound/soc/sof/intel/byt.c | 24 ++++++--- sound/soc/sof/intel/cnl.c | 4 ++ sound/soc/sof/intel/icl.c | 4 ++ sound/soc/sof/intel/pci-tng.c | 12 +++-- sound/soc/sof/intel/tgl.c | 4 ++ sound/soc/sof/ipc.c | 6 ++- sound/soc/sof/ops.h | 15 ++++++ sound/soc/sof/pcm.c | 7 ++- sound/soc/sof/sof-audio.h | 11 +++- sound/soc/sof/sof-priv.h | 28 ++++++---- .../sof/{intel/intel-ipc.c => stream-ipc.c} | 50 +++++++++--------- sound/soc/sof/topology.c | 6 ++- 21 files changed, 218 insertions(+), 97 deletions(-) create mode 100644 sound/soc/sof/compress.c rename sound/soc/sof/{intel/intel-ipc.c => stream-ipc.c} (58%) -- 2.27.0
Diffstat (limited to 'sound/soc/sof/ipc.c')
-rw-r--r--sound/soc/sof/ipc.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sound/soc/sof/ipc.c b/sound/soc/sof/ipc.c
index 5a308c62f7ca..b2e556b64994 100644
--- a/sound/soc/sof/ipc.c
+++ b/sound/soc/sof/ipc.c
@@ -545,8 +545,10 @@ static void ipc_period_elapsed(struct snd_sof_dev *sdev, u32 msg_id)
memcpy(&stream->posn, &posn, sizeof(posn));
- /* only inform ALSA for period_wakeup mode */
- if (!stream->substream->runtime->no_period_wakeup)
+ if (spcm->pcm.compress)
+ snd_sof_compr_fragment_elapsed(stream->cstream);
+ else if (!stream->substream->runtime->no_period_wakeup)
+ /* only inform ALSA for period_wakeup mode */
snd_sof_pcm_period_elapsed(stream->substream);
}