alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
* [RESEND PATCH] ASoC: soc-compress: Inherit atomicity from DAI link for Compress FE
@ 2023-03-24 12:40 Daniel Baluta
  2023-03-24 12:56 ` Pierre-Louis Bossart
  2023-03-24 16:37 ` Mark Brown
  0 siblings, 2 replies; 3+ messages in thread
From: Daniel Baluta @ 2023-03-24 12:40 UTC (permalink / raw)
  To: broonie, pierre-louis.bossart, alsa-devel
  Cc: linux-kernel, ranjani.sridharan, kai.vehmanen, lgirdwood, vkoul,
	daniel.baluta

From: Daniel Baluta <daniel.baluta@nxp.com>

After commit bbf7d3b1c4f40 ("ASoC: soc-pcm: align BE 'atomicity' with
that of the FE") BE and FE atomicity must match.

In the case of Compress PCM there is a mismatch in atomicity between FE
and BE and we get errors like this:

[   36.434566]  sai1-wm8960-hifi: dpcm_be_connect: FE is atomic but BE
is nonatomic, invalid configuration
[   36.444278]  PCM Deep Buffer: ASoC: can't connect SAI1.OUT

In order to fix this we must inherit the atomicity from DAI link
associated with current PCM Compress FE.

Fixes: bbf7d3b1c4f4 ("ASoC: soc-pcm: align BE 'atomicity' with that of the FE")
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
---
 sound/soc/soc-compress.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/sound/soc/soc-compress.c b/sound/soc/soc-compress.c
index e7aa6f360cab..d649b0cf4744 100644
--- a/sound/soc/soc-compress.c
+++ b/sound/soc/soc-compress.c
@@ -622,6 +622,9 @@ int snd_soc_new_compress(struct snd_soc_pcm_runtime *rtd, int num)
 			return ret;
 		}
 
+		/* inherit atomicity from DAI link */
+		be_pcm->nonatomic = rtd->dai_link->nonatomic;
+
 		rtd->pcm = be_pcm;
 		rtd->fe_compr = 1;
 		if (rtd->dai_link->dpcm_playback)
-- 
2.25.1


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

* Re: [RESEND PATCH] ASoC: soc-compress: Inherit atomicity from DAI link for Compress FE
  2023-03-24 12:40 [RESEND PATCH] ASoC: soc-compress: Inherit atomicity from DAI link for Compress FE Daniel Baluta
@ 2023-03-24 12:56 ` Pierre-Louis Bossart
  2023-03-24 16:37 ` Mark Brown
  1 sibling, 0 replies; 3+ messages in thread
From: Pierre-Louis Bossart @ 2023-03-24 12:56 UTC (permalink / raw)
  To: Daniel Baluta, broonie, alsa-devel
  Cc: linux-kernel, ranjani.sridharan, kai.vehmanen, lgirdwood, vkoul,
	daniel.baluta



On 3/24/23 07:40, Daniel Baluta wrote:
> From: Daniel Baluta <daniel.baluta@nxp.com>
> 
> After commit bbf7d3b1c4f40 ("ASoC: soc-pcm: align BE 'atomicity' with
> that of the FE") BE and FE atomicity must match.
> 
> In the case of Compress PCM there is a mismatch in atomicity between FE
> and BE and we get errors like this:
> 
> [   36.434566]  sai1-wm8960-hifi: dpcm_be_connect: FE is atomic but BE
> is nonatomic, invalid configuration
> [   36.444278]  PCM Deep Buffer: ASoC: can't connect SAI1.OUT
> 
> In order to fix this we must inherit the atomicity from DAI link
> associated with current PCM Compress FE.
> 
> Fixes: bbf7d3b1c4f4 ("ASoC: soc-pcm: align BE 'atomicity' with that of the FE")
> Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>

Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>

> ---
>  sound/soc/soc-compress.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/sound/soc/soc-compress.c b/sound/soc/soc-compress.c
> index e7aa6f360cab..d649b0cf4744 100644
> --- a/sound/soc/soc-compress.c
> +++ b/sound/soc/soc-compress.c
> @@ -622,6 +622,9 @@ int snd_soc_new_compress(struct snd_soc_pcm_runtime *rtd, int num)
>  			return ret;
>  		}
>  
> +		/* inherit atomicity from DAI link */
> +		be_pcm->nonatomic = rtd->dai_link->nonatomic;
> +
>  		rtd->pcm = be_pcm;
>  		rtd->fe_compr = 1;
>  		if (rtd->dai_link->dpcm_playback)

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

* Re: [RESEND PATCH] ASoC: soc-compress: Inherit atomicity from DAI link for Compress FE
  2023-03-24 12:40 [RESEND PATCH] ASoC: soc-compress: Inherit atomicity from DAI link for Compress FE Daniel Baluta
  2023-03-24 12:56 ` Pierre-Louis Bossart
@ 2023-03-24 16:37 ` Mark Brown
  1 sibling, 0 replies; 3+ messages in thread
From: Mark Brown @ 2023-03-24 16:37 UTC (permalink / raw)
  To: pierre-louis.bossart, alsa-devel, Daniel Baluta
  Cc: linux-kernel, ranjani.sridharan, kai.vehmanen, lgirdwood, vkoul,
	daniel.baluta

On Fri, 24 Mar 2023 14:40:19 +0200, Daniel Baluta wrote:
> After commit bbf7d3b1c4f40 ("ASoC: soc-pcm: align BE 'atomicity' with
> that of the FE") BE and FE atomicity must match.
> 
> In the case of Compress PCM there is a mismatch in atomicity between FE
> and BE and we get errors like this:
> 
> [   36.434566]  sai1-wm8960-hifi: dpcm_be_connect: FE is atomic but BE
> is nonatomic, invalid configuration
> [   36.444278]  PCM Deep Buffer: ASoC: can't connect SAI1.OUT
> 
> [...]

Applied to

   broonie/sound.git for-next

Thanks!

[1/1] ASoC: soc-compress: Inherit atomicity from DAI link for Compress FE
      commit: 37b58becc1cee4d591024f2056d7ffa99c6089e0

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] 3+ messages in thread

end of thread, other threads:[~2023-03-24 16:39 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-24 12:40 [RESEND PATCH] ASoC: soc-compress: Inherit atomicity from DAI link for Compress FE Daniel Baluta
2023-03-24 12:56 ` Pierre-Louis Bossart
2023-03-24 16:37 ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).