diff options
author | Mark Brown <broonie@kernel.org> | 2021-10-07 22:24:58 +0100 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2021-10-07 22:24:58 +0100 |
commit | 99f11b6552fa36da107a6a92773a11109107b686 (patch) | |
tree | dd8317c083b0ee295be6ef241a19f9b262345bef /sound/soc/sof/ops.h | |
parent | 1cfd7c2ee9f37abc8e1a410a000efca819723077 (diff) | |
parent | 858f7a5c45cacbf9965c4735330ee34baa0728f4 (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/ops.h')
-rw-r--r-- | sound/soc/sof/ops.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/sound/soc/sof/ops.h b/sound/soc/sof/ops.h index 290e32a8a7d4..09bf38fdfb8a 100644 --- a/sound/soc/sof/ops.h +++ b/sound/soc/sof/ops.h @@ -312,6 +312,21 @@ static inline int snd_sof_dsp_block_write(struct snd_sof_dev *sdev, return sof_ops(sdev)->block_write(sdev, blk_type, offset, src, bytes); } +/* mailbox IO */ +static inline void snd_sof_dsp_mailbox_read(struct snd_sof_dev *sdev, + u32 offset, void *dest, size_t bytes) +{ + if (sof_ops(sdev)->mailbox_read) + sof_ops(sdev)->mailbox_read(sdev, offset, dest, bytes); +} + +static inline void snd_sof_dsp_mailbox_write(struct snd_sof_dev *sdev, + u32 offset, void *src, size_t bytes) +{ + if (sof_ops(sdev)->mailbox_write) + sof_ops(sdev)->mailbox_write(sdev, offset, src, bytes); +} + /* ipc */ static inline int snd_sof_dsp_send_msg(struct snd_sof_dev *sdev, struct snd_sof_ipc_msg *msg) |