summaryrefslogtreecommitdiffstats
path: root/drivers/staging/greybus/audio_helper.h
diff options
context:
space:
mode:
authorVaibhav Agarwal <vaibhav.sr@gmail.com>2020-07-09 15:57:21 +0530
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-07-29 16:40:09 +0200
commit510e340efe0cbd379cf1ff3490d088c3299749b1 (patch)
treeadd6b0638605e524ea519f49a61ba5b4bc5d8e8f /drivers/staging/greybus/audio_helper.h
parentc4bb7dcf143f89c024ad439871f75d4a9f72cbc1 (diff)
downloadlinux-510e340efe0cbd379cf1ff3490d088c3299749b1.tar.bz2
staging: greybus: audio: Add helper APIs for dynamic audio modules
Greybus Codec driver allows modules to be dynamically added and removed, which further requires updating the DAPM configurations as well. With current snd_soc architecture, dynamic audio modules is not yet supported. This patch provides helper APIs to update DAPM configurations in response to modules which are dynamically added or removed. The source is primarily based on snd_dapm.c Signed-off-by: Vaibhav Agarwal <vaibhav.sr@gmail.com> Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Link: https://lore.kernel.org/r/35e1baaae10a3f2162e71be4c2f75a701584f0e6.1594290158.git.vaibhav.sr@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/greybus/audio_helper.h')
-rw-r--r--drivers/staging/greybus/audio_helper.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/drivers/staging/greybus/audio_helper.h b/drivers/staging/greybus/audio_helper.h
new file mode 100644
index 000000000000..5cf1c6d7d3ea
--- /dev/null
+++ b/drivers/staging/greybus/audio_helper.h
@@ -0,0 +1,17 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
+ * Greybus Audio Sound SoC helper APIs
+ */
+
+#ifndef __LINUX_GBAUDIO_HELPER_H
+#define __LINUX_GBAUDIO_HELPER_H
+
+int gbaudio_dapm_link_component_dai_widgets(struct snd_soc_card *card,
+ struct snd_soc_dapm_context *dapm);
+int gbaudio_dapm_free_controls(struct snd_soc_dapm_context *dapm,
+ const struct snd_soc_dapm_widget *widget,
+ int num);
+int gbaudio_remove_component_controls(struct snd_soc_component *component,
+ const struct snd_kcontrol_new *controls,
+ unsigned int num_controls);
+#endif