Skip to content

ALSA/ASoC: Intel: avs: HDAudio bus and general fixes

Cezary Rojewski linux-sound 4 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest10 patches 3 repliesIn review
  2. v310 patches 7 repliesSuperseded
  3. v211 patches 2 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v110 patches4 repliesSuperseded

Changes in v3 from the cover letter

- dropped the patch introduced in v2 as an equivalent change has just been merged [1]

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/10ALSA: hda: ext: Clean up links if their initialization failssound/hda/core/ext/controller.c+3 -11 reply
2/10ALSA: hda: ext: Clean up streams if their initialization failssound/hda/core/ext/stream.c+3 -21 reply
3/10ASoC: Intel: avs: Clean up the bus when its initialization failssound/soc/intel/avs/core.c+17 -130 replies
4/10ASoC: Intel: avs: Clean up the bus when fetching ML caps failssound/soc/intel/avs/core.c+9 -20 replies
5/10ASoC: Intel: avs: Clean up streams if their initialization failssound/soc/intel/avs/core.c+15 -30 replies
6/10ASoC: Intel: avs: Do not ignore -ENOENT when loading a topologysound/soc/intel/avs/pcm.c sound/soc/intel/avs/topology.c sound/soc/intel/avs/topology.h+22 -150 replies
7/10ASoC: Intel: avs: Cancel d0ix_work asynchrounously during recoverysound/soc/intel/avs/ipc.c+3 -30 replies
8/10ASoC: Intel: avs: Fix unbalanced module reference countsound/soc/intel/avs/debugfs.c+9 -30 replies
9/10ASoC: Intel: avs: Refactor and fix init_config accesssound/soc/intel/avs/path.c sound/soc/intel/avs/topology.c sound/soc/intel/avs/topology.h+32 -300 replies
10/10ASoC: Intel: avs: hda: Constrain MSBs on startupsound/soc/intel/avs/boards/hdaudio.c+17 -00 replies

Reviews trailers per patch

2 of 10 patches have a Reviewed-by or Acked-by.

PatchTakashi Iwai
1/10A-b
2/10A-b
3/10
4/10
5/10
6/10
7/10
8/10
9/10
10/10

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v4 thread

Cover letter [PATCH v4 00/10] ALSA/ASoC: Intel: avs: HDAudio bus and general fixes

The first half of the patchset concentrates on the driver initialization procedure - a number of steps do not clean up after themselves when they fail. This is for both, HDAudio bus (ext) and the DSP part (avs) and targets following procedures:

- stream initialization
- link initialization
- bus initialization

The next five are loosely related fixes. First, split topology-loading error handling from request-firmware one. Currently -ENOENT coming from topology-loading, which is a real error, is ignored.

Second, with deeper test coverage around corrupted firmware/DSP exception handling, new issues are unearthed. Switch to async d0ix_work cancellation to avoid deadlock when D0IX has been scheduled just before the recovery work.

The 09/10 patch, init_config change fixes possible out-of-bounds bug. The fix is larger than what one could expect as instead of patching with if-statements I've decided to refactor the parsing of init_configs. The scenario that causes the problem no longer exists.
Note: the solution does not impose any changes on the existing topology files (userspace).

The remaining two, IMHO are self-explanatory.

Chamges in v4:
- replaced error paths for patches 1/10 and 2/10 with snd_hdac_ext_link_free_all() and snd_hdac_ext_stream_free_all() respectively, as suggested by Takashi

Changes in v3:
- dropped the patch introduced in v2 as an equivalent change has just been merged [1]

Changes in v2:
- added patch "ALSA: hda: Clean up pages when stream buffers allocation fails" to address Mark's review for "ASoC: Intel: avs: Clean up the bus when its initialization fails" and clean up pages before collapsing the bus initialization
- removed unused 'acomp' variable as pointed out by Mark

[1]: https://lore.kernel.org/all/[email protected]/

Cezary Rojewski (10):
ALSA: hda: ext: Clean up links if their initialization fails
ALSA: hda: ext: Clean up streams if their initialization fails
ASoC: Intel: avs: Clean up the bus when its initialization fails
ASoC: Intel: avs: Clean up the bus when fetching ML caps fails
ASoC: Intel: avs: Clean up streams if their initialization fails
ASoC: Intel: avs: Do not ignore -ENOENT when loading a topology
ASoC: Intel: avs: Cancel d0ix_work asynchrounously during recovery
ASoC: Intel: avs: Fix unbalanced module reference count
ASoC: Intel: avs: Refactor and fix init_config access
ASoC: Intel: avs: hda: Constrain MSBs on startup

 sound/hda/core/ext/controller.c      |  4 +-
 sound/hda/core/ext/stream.c          |  5 ++-
 sound/soc/intel/avs/boards/hdaudio.c | 17 ++++++++
 sound/soc/intel/avs/core.c           | 59 +++++++++++++++++++---------
 sound/soc/intel/avs/debugfs.c        | 12 ++++--
 sound/soc/intel/avs/ipc.c            |  6 +--
 sound/soc/intel/avs/path.c           | 11 ++----
 sound/soc/intel/avs/pcm.c            | 34 +++++++++-------
 sound/soc/intel/avs/topology.c       | 49 +++++++++++++----------
 sound/soc/intel/avs/topology.h       |  5 ++-
 10 files changed, 130 insertions(+), 72 deletions(-)
Signature · 1 line
2.34.1