Skip to content
Unverified Commit f8ba62ac authored by Pierre-Louis Bossart's avatar Pierre-Louis Bossart Committed by Mark Brown
Browse files

ASoC: SOF: Intel: hda-dai-ops: only allocate/release streams for first CPU DAI



When we have multiple CPU DAIs in a dailink, typically for SoundWire
aggregated solutions with amplifiers on multiple links, we only want
to allocate one HDaudio stream_tag. The simplest solution is to
allocate the hext_stream/stream_tag for the DAI with index 0 in the
dailink, and reuse the same stream for all other CPU DAIs.

This assumption relies on serialization of DAIs by the ASoC core,
where all CPU DAIs are handled in a loop.

The stream release follows the same idea of releasing the tag for the
first DAI only. Ideally we would want the loop to be handled in
reverse-order to summetry, but there is no risk of reusing a
stream_tag which is no longer valid.

Signed-off-by: default avatarPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: default avatarBard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: default avatarRander Wang <rander.wang@intel.com>
Link: https://lore.kernel.org/r/20230807210959.506849-13-pierre-louis.bossart@linux.intel.com


Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent b6c508b4
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment