alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] [RFC]ASoC: dapm: enable kcontrols for siggen and effect type widgets
@ 2018-05-24 18:37 Ranjani Sridharan
  0 siblings, 0 replies; only message in thread
From: Ranjani Sridharan @ 2018-05-24 18:37 UTC (permalink / raw)
  To: alsa-devel; +Cc: liam.r.girdwood, broonie, pierre-louis.bossart

This patch proposes to enable kcontrols for siggen and effect type
dapm widgets. This will allow triggering the tone generating siggen
component and also modifying the run-time attributes such as frequency,
amplitude etc. Effect type widgets such as the equalizer could
potentially need kcontrols to pass algorithm data from the userspace.

This patch also renames the function dapm_new_pga() to
dapm_new_kcontrol() so that it does not allude that it applies only
to pga widgets.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
---
 sound/soc/soc-dapm.c | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c
index 0c0cb7713eb4..4577880f69cc 100644
--- a/sound/soc/soc-dapm.c
+++ b/sound/soc/soc-dapm.c
@@ -852,6 +852,8 @@ static int dapm_create_or_share_kcontrol(struct snd_soc_dapm_widget *w,
 			kcname_in_long_name = true;
 		} else {
 			switch (w->id) {
+			case snd_soc_dapm_siggen:
+			case snd_soc_dapm_effect:
 			case snd_soc_dapm_switch:
 			case snd_soc_dapm_mixer:
 			case snd_soc_dapm_pga:
@@ -1010,8 +1012,8 @@ static int dapm_new_mux(struct snd_soc_dapm_widget *w)
 	return 0;
 }
 
-/* create new dapm volume control */
-static int dapm_new_pga(struct snd_soc_dapm_widget *w)
+/* create new dapm kcontrol */
+static int dapm_new_kcontrol(struct snd_soc_dapm_widget *w)
 {
 	int i, ret;
 
@@ -3046,9 +3048,11 @@ int snd_soc_dapm_new_widgets(struct snd_soc_card *card)
 		case snd_soc_dapm_demux:
 			dapm_new_mux(w);
 			break;
+		case snd_soc_dapm_siggen:
+		case snd_soc_dapm_effect:
 		case snd_soc_dapm_pga:
 		case snd_soc_dapm_out_drv:
-			dapm_new_pga(w);
+			dapm_new_kcontrol(w);
 			break;
 		case snd_soc_dapm_dai_link:
 			dapm_new_dai_link(w);
-- 
2.17.0

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2018-05-24 18:37 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-05-24 18:37 [PATCH] [RFC]ASoC: dapm: enable kcontrols for siggen and effect type widgets Ranjani Sridharan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).