Skip to contentSkip to conversation

ASoC: dapm: add code to configure dai link parameters

PATCH Superseded Nikesh Oswal 2 participants 4 messages Oct 10, 2014 – Oct 29, 2014

Subsystems (2)

v6 of 9 Superseded Latest is v9 →

lore
Share & tools
lore
#0 lore raw

PATCH v6 1/1 ASoC: dapm: add code to configure dai link parameters

dai-link params for codec-codec links were fixed. The fixed link between codec and another chip which may be another codec, baseband, bluetooth codec etc may require run time configuaration changes. This change provides an optional alsa control to select one of the params from a list of params.

---
 include/sound/soc-dapm.h |    3 +
 include/sound/soc.h      |    1 +
 sound/soc/soc-core.c     |    6 +-
 sound/soc/soc-dapm.c     |  143 ++++++++++++++++++++++++++++++++++++++++++++--
 4 files changed, 146 insertions(+), 7 deletions(-)
include/sound/soc-dapm.h +3 -0
index aac04ff..20863f2 100644
@@ -378,6 +378,7 @@ int snd_soc_dapm_link_dai_widgets(struct snd_soc_card *card);
 void snd_soc_dapm_connect_dai_link_widgets(struct snd_soc_card *card);
 int snd_soc_dapm_new_pcm(struct snd_soc_card *card,
 			 const struct snd_soc_pcm_stream *params,
+			 unsigned int num_params,
 			 struct snd_soc_dapm_widget *source,
 			 struct snd_soc_dapm_widget *sink);
 
@@ -532,6 +533,8 @@ 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 */
 	int reg;				/* negative reg = no direct dapm */
include/sound/soc.h +1 -0
index c83a334..a97848f 100644
@@ -926,6 +926,7 @@ struct snd_soc_dai_link {
 	int be_id;	/* optional ID for machine driver BE identification */
 
 	const struct snd_soc_pcm_stream *params;
+	unsigned int num_params;
 
 	unsigned int dai_fmt;           /* format to set on init */
 
sound/soc/soc-core.c +4 -2
index d074aa9..93850be 100644
@@ -1436,7 +1436,8 @@ static int soc_link_dai_widgets(struct snd_soc_card *card,
 	capture_w = cpu_dai->capture_widget;
 	if (play_w && capture_w) {
 		ret = snd_soc_dapm_new_pcm(card, dai_link->params,
-					   capture_w, play_w);
+					   dai_link->num_params, capture_w,
+					   play_w);
 		if (ret != 0) {
 			dev_err(card->dev, "ASoC: Can't link %s to %s: %d\n",
 				play_w->name, capture_w->name, ret);
@@ -1448,7 +1449,8 @@ static int soc_link_dai_widgets(struct snd_soc_card *card,
 	capture_w = codec_dai->capture_widget;
 	if (play_w && capture_w) {
 		ret = snd_soc_dapm_new_pcm(card, dai_link->params,
-					   capture_w, play_w);
+					   dai_link->num_params, capture_w,
+					   play_w);
 		if (ret != 0) {
 			dev_err(card->dev, "ASoC: Can't link %s to %s: %d\n",
 				play_w->name, capture_w->name, ret);
sound/soc/soc-dapm.c +138 -5

199 lines not on this page · raw message

Signature · 1 line
1.7.9.5
maintainer
#1 lore raw
Quoted 5 lines · Nikesh Oswal

dai-link params for codec-codec links were fixed. The fixed link between codec and another chip which may be another codec, baseband, bluetooth codec etc may require run time configuaration changes. This change provides an optional alsa control to select one of the params from a list of params.

Has anything changed since the previous version? I've postponed reviewing that until after the merge window given the way you were ignoring feedback and the approach of the merge window, is this a new version or just a reposting.

#2 lore raw
Quoted 7 lines · Mark Brown
Quoted 5 lines · Nikesh Oswal

dai-link params for codec-codec links were fixed. The fixed link between codec and another chip which may be another codec, baseband, bluetooth codec etc may require run time configuaration changes. This change provides an optional alsa control to select one of the params from a list of params.

Quoted 6 lines

Has anything changed since the previous version? I've postponed reviewing that until after the merge window given the way you were ignoring feedback and the approach of the merge window, is this a new version or just a reposting.

Quoted 1 line
Quoted 1 line

Since it was not merged or reviewed since long, I just did a reposting

of previous version of the patch

maintainer
#3 lore raw
Quoted 9 lines · Nikesh Oswal
Quoted 6 lines · Mark Brown

Has anything changed since the previous version? I've postponed reviewing that until after the merge window given the way you were ignoring feedback and the approach of the merge window, is this a new version or just a reposting.

Quoted 1 line
Quoted 1 line

Since it was not merged or reviewed since long, I just did a reposting

of previous version of the patch

OK. *Please* try to configure your e-mail client so that it formats e-mails in a normal fashion for posting on the lists, I'm sure your colleagues can help you with that. The above looks like your reply is actually part of some quoted text rather than a reply.