ASoC: Intel: avs: PCM code cleanup
authorMark Brown <broonie@kernel.org>
Tue, 30 Apr 2024 14:35:00 +0000 (23:35 +0900)
committerMark Brown <broonie@kernel.org>
Tue, 30 Apr 2024 14:35:00 +0000 (23:35 +0900)
commita226d08a362f3ebc09b0fa3105282984155eeab4
tree596b4494e49ffbcc587c371a9ac1008e577a7489
parent228132b4d848cf4318f7df8b9c0ad39e22ca6039
parente85e75b67993c1fb0c80306783c31266261170d4
ASoC: Intel: avs: PCM code cleanup

Merge series from Cezary Rojewski <cezary.rojewski@intel.com>:

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.