[alsa-devel] [RFC 3/4] ASoC: sti: use bind_pcm_ctl

Arnaud Pouliquen arnaud.pouliquen at st.com
Tue Nov 8 09:11:14 CET 2016


Bind PCM control to PCM device created during DAI linking.

Change-Id: Idbc6cb8421fd3b8fd6e2fb93c84578410ea7b227
Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen at st.com>
---
 sound/soc/sti/sti_uniperif.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/sound/soc/sti/sti_uniperif.c b/sound/soc/sti/sti_uniperif.c
index 549fac3..a958144 100644
--- a/sound/soc/sti/sti_uniperif.c
+++ b/sound/soc/sti/sti_uniperif.c
@@ -245,8 +245,6 @@ static int sti_uniperiph_dai_create_ctrl(struct snd_soc_dai *dai)
 		 * Uniperipheral instance ID
 		 */
 		ctrl = &uni->snd_ctrls[i];
-		ctrl->index = uni->id;
-		ctrl->device = uni->id;
 	}
 
 	return snd_soc_add_dai_controls(dai, uni->snd_ctrls, uni->num_ctrls);
@@ -348,7 +346,8 @@ static int sti_uniperiph_dai_probe(struct snd_soc_dai *dai)
 static const struct snd_soc_dai_driver sti_uniperiph_dai_template = {
 	.probe = sti_uniperiph_dai_probe,
 	.suspend = sti_uniperiph_dai_suspend,
-	.resume = sti_uniperiph_dai_resume
+	.resume = sti_uniperiph_dai_resume,
+	.bind_pcm_ctl = true,
 };
 
 static const struct snd_soc_component_driver sti_uniperiph_dai_component = {
-- 
1.9.1



More information about the Alsa-devel mailing list