ASoC: amd: acp: Initialize list to store acp_stream during pcm_open
authorAjit Kumar Pandey <AjitKumar.Pandey@amd.com>
Wed, 10 Aug 2022 13:29:12 +0000 (18:59 +0530)
committerMark Brown <broonie@kernel.org>
Mon, 15 Aug 2022 00:19:41 +0000 (01:19 +0100)
commit7929985cfe36c336e3d0753e9f23ac4c7758ea7e
tree148a1ed8388cce92efe085229cccedbcca01e853
parent4d39265b930fb42eb396c3153a3f4afdee9f5c17
ASoC: amd: acp: Initialize list to store acp_stream during pcm_open

We are currently allocating acp_stream during pcm_open and saving
it in static array corresponds to array index calculated based on
cpu dai->driver id. This approach will fail if we have single dai
linked to multiple pcm device as we will have same dai->driver id
or array index for multiple pcm open. Initialize new linked list
stream_list to store opened pcm stream info dynamically.

Signed-off-by: Ajit Kumar Pandey <AjitKumar.Pandey@amd.com>
Signed-off-by: Venkata Prasad Potturu <venkataprasad.potturu@amd.com>
Reviewed-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://lore.kernel.org/r/20220810132913.1181247-2-venkataprasad.potturu@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/amd/acp/acp-platform.c
sound/soc/amd/acp/amd.h