Skip to contentSkip to conversation

ASoC: Add weak routes for sidetone style paths

PATCH In review Mark Brown 2 participants 2 messages Jun 13, 2011

Subsystems (2)
lore
Share & tools
lore

Mark Brown

author
#0 lore raw

PATCH 1/1 ASoC: Add weak routes for sidetone style paths

Normally DAPM will power up any connected audio path. This is not ideal for sidetone paths as with sidetone paths the audio path is not wanted in itself, it is only desired if the two paths it provides a sidetone between are both active. If the sidetone path causes a power up then it can be hard to minimise pops as we first power up either the sidetone or the main output path and then power the other, with the second power up potentially introducing a DC offset.

Address this by introducing the concept of a weak path. If a path is marked as weak then DAPM will ignore that path when walking the graph, though all the relevant controls are still available to the application layer to allow these paths to be configured.

---
 include/sound/soc-dapm.h |    2 +
 sound/soc/soc-dapm.c     |   87 ++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 89 insertions(+), 0 deletions(-)
include/sound/soc-dapm.h +2 -0
index 7415878..7c5465b 100644
@@ -348,6 +348,8 @@ int snd_soc_dapm_new_widgets(struct snd_soc_dapm_context *dapm);
 void snd_soc_dapm_free(struct snd_soc_dapm_context *dapm);
 int snd_soc_dapm_add_routes(struct snd_soc_dapm_context *dapm,
 			    const struct snd_soc_dapm_route *route, int num);
+int snd_soc_dapm_weak_routes(struct snd_soc_dapm_context *dapm,
+			     const struct snd_soc_dapm_route *route, int num);
 
 /* dapm events */
 int snd_soc_dapm_stream_event(struct snd_soc_pcm_runtime *rtd,
sound/soc/soc-dapm.c +87 -0

111 lines not on this page · raw message

Signature · 1 line
1.7.5.4
Acked-by on v1 1/1
#1 lore raw
Quoted 13 lines · Mark Brown

Normally DAPM will power up any connected audio path. This is not ideal for sidetone paths as with sidetone paths the audio path is not wanted in itself, it is only desired if the two paths it provides a sidetone between are both active. If the sidetone path causes a power up then it can be hard to minimise pops as we first power up either the sidetone or the main output path and then power the other, with the second power up potentially introducing a DC offset.

Address this by introducing the concept of a weak path. If a path is marked as weak then DAPM will ignore that path when walking the graph, though all the relevant controls are still available to the application layer to allow these paths to be configured.

Quoted 5 lines
---
 include/sound/soc-dapm.h |    2 +
 sound/soc/soc-dapm.c     |   87 ++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 89 insertions(+), 0 deletions(-)