OSDN Git Service

ASoC: SOF: Intel: Refactor code for HDA stream creation
authorChao Song <chao.song@linux.intel.com>
Mon, 14 Aug 2023 23:15:19 +0000 (18:15 -0500)
committerMark Brown <broonie@kernel.org>
Tue, 15 Aug 2023 12:54:56 +0000 (13:54 +0100)
commita942409c97ce12c2a4811b538568b1342d91e56c
treec754ff48a9f9986849a91d811bca4b91ec622392
parentc5556d8651b4c58e0d9894be5a0188c9c90ce899
ASoC: SOF: Intel: Refactor code for HDA stream creation

Existing HDA stream creation is split into two
for loops for capture and playback, but most of
the code in the two for loops are duplicated.

This patch refactors HDA stream creation with a
single for loop, thus remove code duplication.

No functional change in this patch.

Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Rander Wang <rander.wang@intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Chao Song <chao.song@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20230814231519.79051-1-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/sof/intel/hda-stream.c