mbox series

[0/7] ASoC: harden SoundWire codec/machine drivers used on Intel platforms

Message ID 20220606203752.144159-1-pierre-louis.bossart@linux.intel.com
Headers show
Series ASoC: harden SoundWire codec/machine drivers used on Intel platforms | expand

Message

Pierre-Louis Bossart June 6, 2022, 8:37 p.m. UTC
While testing fixes for SoundWire race conditions initially reported
in [1], I found additional issues in codec drivers. When the order in
which drivers are probed is changed, multiple errors are reported,
from unbalanced pm_runtime_enable() calls to invalid mutex lock magic
numbers, workqueues not initialized and missing resume sequences.

In 'nominal' usages, there is no change of functionality, this is just
a first step to test random device/driver bind/unbind sequences.

Important note: these changes only touch Intel-based platforms, I
don't have any background and ability to test on Qualcomm-based
devices.

[1] https://lore.kernel.org/alsa-devel/d0559e97-c4a0-b817-428c-d3e305390270@linux.intel.com/

Pierre-Louis Bossart (7):
  ASoC: Realtek/Maxim SoundWire codecs: disable pm_runtime on remove
  ASoC: rt711-sdca-sdw: fix calibrate mutex initialization
  ASoC: Intel: sof_sdw: handle errors on card registration
  ASoC: rt711: fix calibrate mutex initialization
  ASoC: rt7*-sdw: harden jack_detect_handler
  ASoC: codecs: rt700/rt711/rt711-sdca: initialize workqueues in probe
  ASoC: codecs: rt700/rt711/rt711-sdca: resume bus/codec in
    .set_jack_detect

 sound/soc/codecs/max98373-sdw.c   | 12 +++++++-
 sound/soc/codecs/rt1308-sdw.c     | 11 +++++++
 sound/soc/codecs/rt1316-sdw.c     | 11 +++++++
 sound/soc/codecs/rt5682-sdw.c     |  5 ++-
 sound/soc/codecs/rt700-sdw.c      |  6 +++-
 sound/soc/codecs/rt700.c          | 30 +++++++++++-------
 sound/soc/codecs/rt711-sdca-sdw.c |  9 +++++-
 sound/soc/codecs/rt711-sdca.c     | 40 ++++++++++++------------
 sound/soc/codecs/rt711-sdw.c      |  9 +++++-
 sound/soc/codecs/rt711.c          | 40 ++++++++++++------------
 sound/soc/codecs/rt715-sdca-sdw.c | 12 ++++++++
 sound/soc/codecs/rt715-sdw.c      | 12 ++++++++
 sound/soc/intel/boards/sof_sdw.c  | 51 ++++++++++++++++++-------------
 13 files changed, 169 insertions(+), 79 deletions(-)

Comments

Mark Brown June 8, 2022, 1:35 p.m. UTC | #1
On Mon, 6 Jun 2022 15:37:45 -0500, Pierre-Louis Bossart wrote:
> While testing fixes for SoundWire race conditions initially reported
> in [1], I found additional issues in codec drivers. When the order in
> which drivers are probed is changed, multiple errors are reported,
> from unbalanced pm_runtime_enable() calls to invalid mutex lock magic
> numbers, workqueues not initialized and missing resume sequences.
> 
> In 'nominal' usages, there is no change of functionality, this is just
> a first step to test random device/driver bind/unbind sequences.
> 
> [...]

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next

Thanks!

[1/7] ASoC: Realtek/Maxim SoundWire codecs: disable pm_runtime on remove
      commit: f9e9bdd5bb180325256e3bdfeb9c4c6526133478
[2/7] ASoC: rt711-sdca-sdw: fix calibrate mutex initialization
      commit: 716c2e7e1608a89423ec84398b99ff2fa855d161
[3/7] ASoC: Intel: sof_sdw: handle errors on card registration
      commit: 768ad6d80db2dbbb1bfbb5e616d701a0b560f12a
[4/7] ASoC: rt711: fix calibrate mutex initialization
      commit: 74d40901ebad7c466a95b1ae3c6891f1ba09786f
[5/7] ASoC: rt7*-sdw: harden jack_detect_handler
      commit: 05ba4c00fa9cb077a0dd91f5e6056951a787f63c
[6/7] ASoC: codecs: rt700/rt711/rt711-sdca: initialize workqueues in probe
      commit: a49267a3bd102e3991514e884aac89cc0d0b5f35
[7/7] ASoC: codecs: rt700/rt711/rt711-sdca: resume bus/codec in .set_jack_detect
      commit: e02b99e9b79ff272e8c299a3ee53bdb194ca885e

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark