Mark Brown 5a119551b6
ASoC: SoundWire codecs: improve pm_runtime handling
Merge series from Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>:

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.
2023-08-07 19:51:32 +01:00
..
2021-04-20 17:25:51 +01:00
2023-05-25 10:54:21 +01:00
2023-05-25 10:54:21 +01:00
2023-01-31 12:10:50 +00:00
2023-07-23 23:33:05 +01:00
2021-03-31 18:00:38 +01:00
2023-07-30 23:38:02 +01:00
2023-01-31 11:04:55 +00:00
2022-06-06 12:33:10 +01:00
2023-07-30 23:38:02 +01:00
2022-10-13 13:01:32 +01:00
2023-06-16 14:55:20 +01:00
2021-12-06 10:04:05 +01:00
2022-07-08 11:52:42 +01:00
2021-12-06 10:04:05 +01:00
2022-08-15 01:20:01 +01:00
2020-10-02 21:05:29 +01:00
2023-07-30 23:38:02 +01:00