mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-04-30 22:50:54 -04:00
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.
This commit is contained in:
@@ -1235,6 +1235,10 @@ struct snd_soc_pcm_runtime {
|
||||
((i) < (rtd)->dai_link->num_cpus + (rtd)->dai_link->num_codecs) && \
|
||||
((dai) = (rtd)->dais[i]); \
|
||||
(i)++)
|
||||
#define for_each_rtd_dais_reverse(rtd, i, dai) \
|
||||
for ((i) = (rtd)->dai_link->num_cpus + (rtd)->dai_link->num_codecs - 1; \
|
||||
(i) >= 0 && ((dai) = (rtd)->dais[i]); \
|
||||
(i)--)
|
||||
#define for_each_rtd_ch_maps(rtd, i, ch_maps) for_each_link_ch_maps(rtd->dai_link, i, ch_maps)
|
||||
|
||||
void snd_soc_close_delayed_work(struct snd_soc_pcm_runtime *rtd);
|
||||
|
||||
Reference in New Issue
Block a user