All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ASoC: Intel: sof_sdw: tag SoundWire BEs as non-atomic
@ 2021-09-07 18:44 Pierre-Louis Bossart
  2021-09-09 15:38 ` Mark Brown
  0 siblings, 1 reply; 2+ messages in thread
From: Pierre-Louis Bossart @ 2021-09-07 18:44 UTC (permalink / raw)
  To: alsa-devel
  Cc: tiwai, Ranjani Sridharan, Pierre-Louis Bossart, vkoul, broonie,
	Rander Wang, Bard Liao

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>
---
 sound/soc/intel/boards/sof_sdw.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/sound/soc/intel/boards/sof_sdw.c b/sound/soc/intel/boards/sof_sdw.c
index 6602eda89e8e..6b06248a9327 100644
--- a/sound/soc/intel/boards/sof_sdw.c
+++ b/sound/soc/intel/boards/sof_sdw.c
@@ -929,6 +929,11 @@ static int create_sdw_dailink(struct snd_soc_card *card,
 			      cpus + *cpu_id, cpu_dai_num,
 			      codecs, codec_num,
 			      NULL, &sdw_ops);
+		/*
+		 * SoundWire DAILINKs use 'stream' functions and Bank Switch operations
+		 * based on wait_for_completion(), tag them as 'nonatomic'.
+		 */
+		dai_links[*be_index].nonatomic = true;
 
 		ret = set_codec_init_func(card, link, dai_links + (*be_index)++,
 					  playback, group_id);
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] ASoC: Intel: sof_sdw: tag SoundWire BEs as non-atomic
  2021-09-07 18:44 [PATCH] ASoC: Intel: sof_sdw: tag SoundWire BEs as non-atomic Pierre-Louis Bossart
@ 2021-09-09 15:38 ` Mark Brown
  0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2021-09-09 15:38 UTC (permalink / raw)
  To: Pierre-Louis Bossart, alsa-devel
  Cc: tiwai, Ranjani Sridharan, Rander Wang, vkoul, Mark Brown, Bard Liao

On Tue, 7 Sep 2021 13:44:36 -0500, Pierre-Louis Bossart wrote:
> 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.
> 
> [...]

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next

Thanks!

[1/1] ASoC: Intel: sof_sdw: tag SoundWire BEs as non-atomic
      commit: 58eafe1ff52ee1ce255759fc15729519af180cbb

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-09-09 15:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-07 18:44 [PATCH] ASoC: Intel: sof_sdw: tag SoundWire BEs as non-atomic Pierre-Louis Bossart
2021-09-09 15:38 ` Mark Brown

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.