diff options
author | Mark Brown <broonie@kernel.org> | 2021-10-08 00:24:58 +0300 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2021-10-08 00:24:58 +0300 |
commit | 99f11b6552fa36da107a6a92773a11109107b686 (patch) | |
tree | dd8317c083b0ee295be6ef241a19f9b262345bef /sound/soc/sof/sof-audio.h | |
parent | 1cfd7c2ee9f37abc8e1a410a000efca819723077 (diff) | |
parent | 858f7a5c45cacbf9965c4735330ee34baa0728f4 (diff) | |
download | linux-99f11b6552fa36da107a6a92773a11109107b686.tar.xz |
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/sof-audio.h')
-rw-r--r-- | sound/soc/sof/sof-audio.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/sound/soc/sof/sof-audio.h b/sound/soc/sof/sof-audio.h index fe2ffe02fdfb..05e98e231b85 100644 --- a/sound/soc/sof/sof-audio.h +++ b/sound/soc/sof/sof-audio.h @@ -36,6 +36,7 @@ struct snd_sof_pcm_stream { struct snd_dma_buffer page_table; struct sof_ipc_stream_posn posn; struct snd_pcm_substream *substream; + struct snd_compr_stream *cstream; struct work_struct period_elapsed_work; struct snd_soc_dapm_widget_list *list; /* list of connected DAPM widgets */ bool d0i3_compatible; /* DSP can be in D0I3 when this pcm is opened */ @@ -231,7 +232,15 @@ struct snd_sof_pcm *snd_sof_find_spcm_pcm_id(struct snd_soc_component *scomp, const struct sof_ipc_pipe_new *snd_sof_pipeline_find(struct snd_sof_dev *sdev, int pipeline_id); void snd_sof_pcm_period_elapsed(struct snd_pcm_substream *substream); -void snd_sof_pcm_period_elapsed_work(struct work_struct *work); +void snd_sof_pcm_init_elapsed_work(struct work_struct *work); + +#if IS_ENABLED(CONFIG_SND_SOC_SOF_COMPRESS) +void snd_sof_compr_fragment_elapsed(struct snd_compr_stream *cstream); +void snd_sof_compr_init_elapsed_work(struct work_struct *work); +#else +static inline void snd_sof_compr_fragment_elapsed(struct snd_compr_stream *cstream) { } +static inline void snd_sof_compr_init_elapsed_work(struct work_struct *work) { } +#endif /* * Mixer IPC |