Skip to contentSkip to conversation

ASoC: byt-rt5640: Fix snd_soc_dapm_ignore_suspend() calls

PATCH Applied Lars-Peter Clausen 3 participants 4 messages Jan 1, 2015 – Jan 5, 2015

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

PATCH 1/2 ASoC: byt-rt5640: Fix snd_soc_dapm_ignore_suspend() calls

To work properly snd_soc_dapm_ignore_suspend() needs to be called on endpoint widgets. In this case those are the board level Speaker and Headphone widgets and not the CODEC output widgets that are connected to them.

---
 sound/soc/intel/byt-rt5640.c | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)
sound/soc/intel/byt-rt5640.c +2 -7
index 0cba783..a51856e 100644
@@ -171,13 +171,8 @@ static int byt_rt5640_init(struct snd_soc_pcm_runtime *runtime)
 			return ret;
 	}
 
-	snd_soc_dapm_ignore_suspend(dapm, "HPOL");
-	snd_soc_dapm_ignore_suspend(dapm, "HPOR");
-
-	snd_soc_dapm_ignore_suspend(dapm, "SPOLP");
-	snd_soc_dapm_ignore_suspend(dapm, "SPOLN");
-	snd_soc_dapm_ignore_suspend(dapm, "SPORP");
-	snd_soc_dapm_ignore_suspend(dapm, "SPORN");
+	snd_soc_dapm_ignore_suspend(&card->dapm, "Headphone");
+	snd_soc_dapm_ignore_suspend(&card->dapm, "Speaker");
 
 	return ret;
 }
Signature · 1 line
1.8.0
#1 lore raw

PATCH 2/2 ASoC: byt-rt5640: Register microphone routes with the card DAPM context

Board level DAPM elements should be registered with the card's DAPM context rather than the CODEC's DAPM context.

---
 sound/soc/intel/byt-rt5640.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
sound/soc/intel/byt-rt5640.c +1 -2
index a51856e..354eaad 100644
@@ -132,7 +132,6 @@ static int byt_rt5640_init(struct snd_soc_pcm_runtime *runtime)
 {
 	int ret;
 	struct snd_soc_codec *codec = runtime->codec;
-	struct snd_soc_dapm_context *dapm = &codec->dapm;
 	struct snd_soc_card *card = runtime->card;
 	const struct snd_soc_dapm_route *custom_map;
 	int num_routes;
@@ -161,7 +160,7 @@ static int byt_rt5640_init(struct snd_soc_pcm_runtime *runtime)
 		num_routes = ARRAY_SIZE(byt_rt5640_intmic_dmic1_map);
 	}
 
-	ret = snd_soc_dapm_add_routes(dapm, custom_map, num_routes);
+	ret = snd_soc_dapm_add_routes(&card->dapm, custom_map, num_routes);
 	if (ret)
 		return ret;
 
Signature · 1 line
1.8.0
Acked-by on v1 1/2
#2 lore raw
In reply to Lars-Peter Clausen
Quoted 9 lines · Lars-Peter Clausen

To work properly snd_soc_dapm_ignore_suspend() needs to be called on endpoint widgets. In this case those are the board level Speaker and Headphone widgets and not the CODEC output widgets that are connected to them.

---
  sound/soc/intel/byt-rt5640.c | 9 ++-------
  1 file changed, 2 insertions(+), 7 deletions(-)

To both:

maintainer Applied
#3 lore raw
In reply to Lars-Peter Clausen
Quoted 4 lines · Lars-Peter Clausen

To work properly snd_soc_dapm_ignore_suspend() needs to be called on endpoint widgets. In this case those are the board level Speaker and Headphone widgets and not the CODEC output widgets that are connected to them.

Applied both, thanks.