Skip to contentSkip to conversation

ASoC: dapm: Avoid creating kcontrol for params

PATCH In review [email protected] 2 participants 2 messages Aug 19, 2017 – Aug 21, 2017

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ASoC: dapm: Avoid creating kcontrol for params

From: anish kumar <[email protected]>

When num_params is defined as one in case of
codec to codec dai link, there is no point in
allocating memory for kcontrol.

---
 include/sound/soc-dapm.h |   1 -
 sound/soc/soc-dapm.c     | 147 ++++++++++++++++++++++++-----------------------
 2 files changed, 76 insertions(+), 72 deletions(-)
include/sound/soc-dapm.h +0 -1
index 344b96c..dc5c336 100644
@@ -582,7 +582,6 @@ struct snd_soc_dapm_widget {
 	void *priv;				/* widget specific data */
 	struct regulator *regulator;		/* attached regulator */
 	const struct snd_soc_pcm_stream *params; /* params for dai links */
-	unsigned int num_params; /* number of params for dai links */
 	unsigned int params_select; /* currently selected param for dai link */
 
 	/* dapm control */
sound/soc/soc-dapm.c +76 -71

216 lines not on this page · raw message

Signature · 1 line
2.5.4 (Apple Git-61)
maintainer
#1 lore raw
Quoted 10 lines · On Fri, Aug 18, 2017 at 11:39:04PM -0700, [email protected] wrote:

From: anish kumar <[email protected]>

When num_params is defined as one in case of
codec to codec dai link, there is no point in
allocating memory for kcontrol.

---
 include/sound/soc-dapm.h |   1 -
 sound/soc/soc-dapm.c     | 147 ++++++++++++++++++++++++-----------------------

This is a very big change and that commit log doesn't describe it in any detail or really motivate it. What exactly does this do and why?