[PATCH 00/16] ASoC: SoundWire codecs: improve pm_runtime handling

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This patchset improves the pm_runtime behavior in rare corner cases
identified by the Intel CI in the last 6 months.

a) in stress-tests, it's not uncommon to see the following type of
warnings when the codec reports as ATTACHED

    "rt711 sdw:0:025d:0711:00: runtime PM trying to activate child device
    sdw:0:025d:0711:00 but parent (sdw-master-0) is not active"

This warning was not correlated with any functional issue, but it
exposed a design issue on when to enable pm_runtime. The recommended
practice in the pm_runtime documentation is to keep the devices in
'suspended' mode and mark them as 'active' when they are really
functional.

b) enabling pm_runtime when the codec reports as ATTACHED also creates
a problematic case when the ASoC pm_runtime_get_sync() will silently
fail due to the -EACCESS error handling. This can happen when playback
starts before the codec is enumerated.

This patchset modifies the initial stages so that codecs are
pm_runtime enabled in the .probe() callback, but become pm_runtime
'active' only when they report present. This is better aligned with
the design of the pm_runtime helpers and improved CI results
significantly.

This patchset modifies all existing SoundWire codecs (except Qualcomm
ones), but the pattern of changes is exactly the same in all patches.

Pierre-Louis Bossart (16):
  ASoC: SoundWire codecs: return error status in probe
  ASoC: SoundWire codecs: make regmap cache-only in probe
  ASoC: rt5682-sdw: make regmap cache-only in probe
  ASoC: rt711: enable pm_runtime in probe, keep status as 'suspended'
  ASoC: rt711-sdca: enable pm_runtime in probe, keep status as
    'suspended'
  ASoC: rt700: enable pm_runtime in probe, keep status as 'suspended'
  ASoC: rt1712-sdca: enable pm_runtime in probe, keep status as
    'suspended'
  ASoC: rt712-sdca-dmic: enable pm_runtime in probe, keep status as
    'suspended'
  ASoC: rt715: enable pm_runtime in probe, keep status as 'suspended'
  ASoC: rt715-sdca: enable pm_runtime in probe, keep status as
    'suspended'
  ASoC: rt1308-sdw: enable pm_runtime in probe, keep status as
    'suspended'
  ASoC: rt1316-sdw: enable pm_runtime in probe, keep status as
    'suspended'
  ASoC: rt1318-sdw: enable pm_runtime in probe, keep status as
    'suspended'
  ASoC: rt5682-sdw: enable pm_runtime in probe, keep status as
    'suspended'
  ASoC: max98363: enable pm_runtime in probe, keep status as 'suspended'
  ASoC: max98373-sdw: enable pm_runtime in probe, keep status as
    'suspended'

 sound/soc/codecs/max98363.c        | 41 +++++++++++++---------
 sound/soc/codecs/max98373-sdw.c    | 47 ++++++++++++++-----------
 sound/soc/codecs/rt1308-sdw.c      | 54 +++++++++++++++-------------
 sound/soc/codecs/rt1316-sdw.c      | 44 ++++++++++++++---------
 sound/soc/codecs/rt1318-sdw.c      | 43 ++++++++++++++---------
 sound/soc/codecs/rt5682-sdw.c      | 56 ++++++++++++++++++------------
 sound/soc/codecs/rt5682.c          |  3 ++
 sound/soc/codecs/rt700-sdw.c       |  7 ++--
 sound/soc/codecs/rt700.c           | 46 +++++++++++++++---------
 sound/soc/codecs/rt711-sdca-sdw.c  |  3 +-
 sound/soc/codecs/rt711-sdca.c      | 48 +++++++++++++++++--------
 sound/soc/codecs/rt711-sdw.c       |  7 ++--
 sound/soc/codecs/rt711.c           | 47 ++++++++++++++++---------
 sound/soc/codecs/rt712-sdca-dmic.c | 47 +++++++++++++++----------
 sound/soc/codecs/rt712-sdca-sdw.c  |  3 +-
 sound/soc/codecs/rt712-sdca.c      | 45 ++++++++++++++++--------
 sound/soc/codecs/rt715-sdca-sdw.c  |  5 +--
 sound/soc/codecs/rt715-sdca.c      | 41 ++++++++++++++++------
 sound/soc/codecs/rt715-sdw.c       |  9 ++---
 sound/soc/codecs/rt715.c           | 41 +++++++++++++++-------
 20 files changed, 392 insertions(+), 245 deletions(-)

-- 
2.39.2




[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Pulse Audio]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux