diff options
author | Mark Brown <broonie@kernel.org> | 2023-06-13 17:39:51 +0100 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2023-06-13 17:39:51 +0100 |
commit | a11e6515b019da62266b731ff20bc6863f00df4d (patch) | |
tree | 05851998528aa12971842da8073b27678005db52 /include/sound | |
parent | e8181a895b05b264883288c4043ff83f893b56b0 (diff) | |
parent | 099770e2dae04579670947aaf8b5c70ef6a4cb6a (diff) |
ASoC: add new trigger ordering method
Merge series from Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>:
This patch-set adds new "trigger" starting/stopping method.
Diffstat (limited to 'include/sound')
-rw-r--r-- | include/sound/soc-component.h | 11 | ||||
-rw-r--r-- | include/sound/soc.h | 23 |
2 files changed, 26 insertions, 8 deletions
diff --git a/include/sound/soc-component.h b/include/sound/soc-component.h index 0b47603c9db2..87f248a06271 100644 --- a/include/sound/soc-component.h +++ b/include/sound/soc-component.h @@ -159,6 +159,15 @@ struct snd_soc_component_driver { int remove_order; /* + * soc_pcm_trigger() start/stop sequence. + * see also + * snd_soc_dai_link + * soc_pcm_trigger() + */ + enum snd_soc_trigger_order trigger_start; + enum snd_soc_trigger_order trigger_stop; + + /* * signal if the module handling the component should not be removed * if a pcm is open. Setting this would prevent the module * refcount being incremented in probe() but allow it be incremented @@ -190,8 +199,6 @@ struct snd_soc_component_driver { bool use_dai_pcm_id; /* use DAI link PCM ID as PCM device number */ int be_pcm_base; /* base device ID for all BE PCMs */ - unsigned int start_dma_last; - #ifdef CONFIG_DEBUG_FS const char *debugfs_prefix; #endif diff --git a/include/sound/soc.h b/include/sound/soc.h index 1e48a1135844..a7ae8b26737e 100644 --- a/include/sound/soc.h +++ b/include/sound/soc.h @@ -607,6 +607,14 @@ int snd_soc_get_strobe(struct snd_kcontrol *kcontrol, int snd_soc_put_strobe(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol); +enum snd_soc_trigger_order { + /* start stop */ + SND_SOC_TRIGGER_ORDER_DEFAULT = 0, /* Link->Component->DAI DAI->Component->Link */ + SND_SOC_TRIGGER_ORDER_LDC, /* Link->DAI->Component Component->DAI->Link */ + + SND_SOC_TRIGGER_ORDER_MAX, +}; + /* SoC PCM stream information */ struct snd_soc_pcm_stream { const char *stream_name; @@ -713,6 +721,15 @@ struct snd_soc_dai_link { const struct snd_soc_ops *ops; const struct snd_soc_compr_ops *compr_ops; + /* + * soc_pcm_trigger() start/stop sequence. + * see also + * snd_soc_component_driver + * soc_pcm_trigger() + */ + enum snd_soc_trigger_order trigger_start; + enum snd_soc_trigger_order trigger_stop; + /* Mark this pcm with non atomic ops */ unsigned int nonatomic:1; @@ -751,12 +768,6 @@ struct snd_soc_dai_link { /* Do not create a PCM for this DAI link (Backend link) */ unsigned int ignore:1; - /* This flag will reorder stop sequence. By enabling this flag - * DMA controller stop sequence will be invoked first followed by - * CPU DAI driver stop sequence - */ - unsigned int stop_dma_first:1; - #ifdef CONFIG_SND_SOC_TOPOLOGY struct snd_soc_dobj dobj; /* For topology */ #endif |