aboutsummaryrefslogtreecommitdiff
path: root/include/sound
diff options
context:
space:
mode:
authorPeter Ujfalusi2021-09-01 12:52:55 +0300
committerMark Brown2021-09-20 13:30:18 +0100
commitcd46f3824480740879d2c15d65c6e6b038f96021 (patch)
tree71ffe74fd1d72ebb6ddce68483f42bea335e46e2 /include/sound
parenta739fdc26211952edb34bf1ac9ed7afe220a5d54 (diff)
ASoC: compress/component: Use module_get_when_open/put_when_close for cstream
Currently the try_module_get() and module_put() is not possible for compressed streams if the module_get_upon_open is set to 1 which means that\ the components are not protected in a same way as components when normal audio is used. SOF is setting module_get_upon_open to 1 for component drivers which works correctly for audio stream but when compressed stream is used then the module is not protected. Convert the compress open and free operation to mimic the steps of it's pcm counterpart to fix this issue. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Link: https://lore.kernel.org/r/20210901095255.3617-3-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.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/include/sound/soc-component.h b/include/sound/soc-component.h
index a393ac397eca..e09a2d108e8c 100644
--- a/include/sound/soc-component.h
+++ b/include/sound/soc-component.h
@@ -453,8 +453,10 @@ int snd_soc_component_of_xlate_dai_id(struct snd_soc_component *component,
int snd_soc_component_of_xlate_dai_name(struct snd_soc_component *component,
const struct of_phandle_args *args,
const char **dai_name);
-int snd_soc_component_compr_open(struct snd_compr_stream *cstream);
-void snd_soc_component_compr_free(struct snd_compr_stream *cstream,
+int snd_soc_component_compr_open(struct snd_soc_component *component,
+ struct snd_compr_stream *cstream);
+void snd_soc_component_compr_free(struct snd_soc_component *component,
+ struct snd_compr_stream *cstream,
int rollback);
int snd_soc_component_compr_trigger(struct snd_compr_stream *cstream, int cmd);
int snd_soc_component_compr_set_params(struct snd_compr_stream *cstream,