Skip to content

RFC ASoC: Option to reorder widget power sequence

Peter Ujfalusi alsa-devel 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 RFC Latest3 patches 3 repliesIn review
  2. v1 RFC2 patches 9 repliesSuperseded

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3ASoC: core: DAPM widget flag for reversed power up sequenceinclude/sound/soc-dapm.h sound/soc/soc-dapm.c+16 -20 replies
2/3ASoC: core: Helper function to request reversed widget power upinclude/sound/soc-dapm.h sound/soc/soc-dapm.c+39 -00 replies
3/3ASoC: tlv320dac33: Reverse the power up sequence for bypass switchessound/soc/codecs/tlv320dac33.c+4 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [RFC v2 0/3] ASoC: Option to reorder widget power sequence

Hello,

Chasnges sicne v1:
- Flag moved to per widget
- Flag name changed to: route_change_before_powerup
- Comments from Mark has been addressed in the soc-dapm.c file
- New helper function to set the reorder power up sequence.
- tlv320dac33 to be the first codec to use the reversed power up order

Note: power down sequence remains the same for the reordered widgets as well.

Intro from the v1:

Quite some time ago I have faced similar issue with the sequence of the DAPM register writes [1]
For that issue, I used a workaround within the twl4030 codec driver. Now I have again issue with the register write sequence.

The dac33 codec emmits a pop noise, when user enable the analog bypass path. The route cause in this codec are the DAPM update power and register write sequence:
1. User enable the bypass
2. DAPM power up sequence takes place
2.1 codec DAPM widgets got powered on, codec is enabled
2.2 External speaker enabled
3. The bit enabling the bypass got changed.

Step 3 cause a pop, which propagate to the speaker, since it is already enabled.

The first patch implements a new flag for the core to reorder the sequence to:
1. User enable the bypass
2. The bit enabling the bypass got changed.
3. DAPM power up sequence takes place
3.1 codec DAPM widgets got powered on, codec is enabled
3.2 External speaker enabled

The default sequence is kept, codec driver must ask to have the reordered sequence to avoid any side effect on other codecs.

[1]: http://mailman.alsa-project.org/pipermail/alsa-devel/2010-August/030024.html

Peter

---
Peter Ujfalusi (3):
ASoC: core: DAPM widget flag for reversed power up sequence
ASoC: core: Helper function to request reversed widget power up
ASoC: tlv320dac33: Reverse the power up sequence for bypass switches

 include/sound/soc-dapm.h       |    3 ++
 sound/soc/codecs/tlv320dac33.c |    4 +++
 sound/soc/soc-dapm.c           |   54 ++++++++++++++++++++++++++++++++++++++-
 3 files changed, 59 insertions(+), 2 deletions(-)
Signature · 1 line
1.7.3.2