diff options
author | Peter Ujfalusi <peter.ujfalusi@linux.intel.com> | 2021-09-01 12:52:54 +0300 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2021-09-20 13:30:17 +0100 |
commit | a739fdc26211952edb34bf1ac9ed7afe220a5d54 (patch) | |
tree | b7cc26409e9f38e4c89e8905cf643d91906b2143 /include/sound | |
parent | 2266721938b9d12ebf4f2cd96b88912ffa4f5e91 (diff) |
ASoC: soc-component: Convert the mark_module to void*
The mark_module of the snd_soc_component is strict snd_pcm_substream type
which prevents it to be used by compressed streams.
Change the type to void* along with the snd_soc_component_module_get()
and snd_soc_component_module_put() to allow the same mark to be used by
compressed when it's module_get_upon_open is set to 1.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://lore.kernel.org/r/20210901095255.3617-2-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'include/sound')
-rw-r--r-- | include/sound/soc-component.h | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/include/sound/soc-component.h b/include/sound/soc-component.h index 8c4d6830597f..a393ac397eca 100644 --- a/include/sound/soc-component.h +++ b/include/sound/soc-component.h @@ -220,7 +220,7 @@ struct snd_soc_component { int (*init)(struct snd_soc_component *component); /* function mark */ - struct snd_pcm_substream *mark_module; + void *mark_module; struct snd_pcm_substream *mark_open; struct snd_pcm_substream *mark_hw_params; struct snd_pcm_substream *mark_trigger; @@ -391,15 +391,13 @@ void snd_soc_component_exit_regmap(struct snd_soc_component *component); #define snd_soc_component_module_get_when_open(component, substream) \ snd_soc_component_module_get(component, substream, 1) int snd_soc_component_module_get(struct snd_soc_component *component, - struct snd_pcm_substream *substream, - int upon_open); + void *mark, int upon_open); #define snd_soc_component_module_put_when_remove(component) \ snd_soc_component_module_put(component, NULL, 0, 0) #define snd_soc_component_module_put_when_close(component, substream, rollback) \ snd_soc_component_module_put(component, substream, 1, rollback) void snd_soc_component_module_put(struct snd_soc_component *component, - struct snd_pcm_substream *substream, - int upon_open, int rollback); + void *mark, int upon_open, int rollback); static inline void snd_soc_component_set_drvdata(struct snd_soc_component *c, void *data) |