Skip to content

Commit 0bcfa99

Browse files
plbossartgregkh
authored andcommitted
ASoC: Intel: sof_sdw: tag SoundWire BEs as non-atomic
[ Upstream commit 58eafe1 ] The SoundWire BEs make use of 'stream' functions for .prepare and .trigger. These functions will in turn force a Bank Switch, which implies a wait operation. Mark SoundWire BEs as nonatomic for consistency, but keep all other types of BEs as is. The initialization of .nonatomic is done outside of the create_sdw_dailink helper to avoid adding more parameters to deal with a single exception to the rule that BEs are atomic. Suggested-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Rander Wang <rander.wang@intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Bard Liao <bard.liao@intel.com> Link: https://lore.kernel.org/r/20210907184436.33152-1-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 14cbfee commit 0bcfa99

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

sound/soc/intel/boards/sof_sdw.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -847,6 +847,11 @@ static int create_sdw_dailink(struct device *dev, int *be_index,
847847
cpus + *cpu_id, cpu_dai_num,
848848
codecs, codec_num,
849849
NULL, &sdw_ops);
850+
/*
851+
* SoundWire DAILINKs use 'stream' functions and Bank Switch operations
852+
* based on wait_for_completion(), tag them as 'nonatomic'.
853+
*/
854+
dai_links[*be_index].nonatomic = true;
850855

851856
ret = set_codec_init_func(link, dai_links + (*be_index)++,
852857
playback, group_id);

0 commit comments

Comments
 (0)