Skip to content

ASoC: Intel: avs: PCM code cleanup

Cezary Rojewski alsa-devel linux-sound 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest8 patches 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/8ASoC: pcm: Reverse iterate DAIs when shutting them downinclude/sound/soc.h sound/soc/soc-pcm.c+5 -10 replies
2/8ASoC: Intel: avs: Relocate HDA BE DAI specific operationssound/soc/intel/avs/pcm.c+26 -290 replies
3/8ASoC: Intel: avs: Remove redundancy around DAI shutdownsound/soc/intel/avs/pcm.c+19 -250 replies
4/8ASoC: Intel: avs: Store pointer to adev in DAI dma_datasound/soc/intel/avs/pcm.c+8 -90 replies
5/8ASoC: Intel: avs: Remove redundancy around DAI startupsound/soc/intel/avs/pcm.c+5 -170 replies
6/8ASoC: Intel: avs: Remove redundancy around DAI preparesound/soc/intel/avs/pcm.c+4 -100 replies
7/8ASoC: Intel: avs: Store pointer to link_stream in dma_datasound/soc/intel/avs/pcm.c+19 -210 replies
8/8ASoC: Intel: avs: Clean up hw constraints initializationsound/soc/intel/avs/pcm.c+44 -400 replies

Reviews trailers per patch

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

Read the v1 thread

Cover letter [PATCH 0/8] ASoC: Intel: avs: PCM code cleanup

A set of changes that aims to improve readability of cohesiveness of the pcm code for the avs-driver.

Start off with a change that synchronizes DAI open/close - DAIs are started up in ascending order yet their shutdown does not follow the scheme - it is done in the ascending order too, rather than desceding one. This patch is a dependency for the next one in line.

To align the HDAudio DAI startup/shutdown with the non-HDAudio equivalents, relocate the code from component to DAI. The reason above is a dependency stems from codec driver requirements - HDAudio code found in sound/pci/hda/ expects substream->runtime->private_data to point to a valid stream (HOST) pointer.

With the hard part done, the follow up changes update the existing code to reduce it is complexity - removal of duplicates, renaming of ambiguous functions and adding new fields to DAI-data object so that the number of local variables and casts is reduced.

Cezary Rojewski (8):
ASoC: pcm: Reverse iterate DAIs when shutting them down
ASoC: Intel: avs: Relocate HDA BE DAI specific operations
ASoC: Intel: avs: Remove redundancy around DAI shutdown
ASoC: Intel: avs: Store pointer to adev in DAI dma_data
ASoC: Intel: avs: Remove redundancy around DAI startup
ASoC: Intel: avs: Remove redundancy around DAI prepare
ASoC: Intel: avs: Store pointer to link_stream in dma_data
ASoC: Intel: avs: Clean up hw constraints initialization

 include/sound/soc.h       |   4 +
 sound/soc/intel/avs/pcm.c | 250 +++++++++++++++++---------------------
 sound/soc/soc-pcm.c       |   2 +-
 3 files changed, 117 insertions(+), 139 deletions(-)
Signature · 1 line
2.25.1