alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ASoC: Intel: Skylake: Fix default dma_buffer_size
@ 2017-06-30 13:08 Subhransu S. Prusty
  2017-07-03 11:10 ` Vinod Koul
  2017-07-10 18:41 ` Applied "ASoC: Intel: Skylake: Fix default dma_buffer_size" to the asoc tree Mark Brown
  0 siblings, 2 replies; 3+ messages in thread
From: Subhransu S. Prusty @ 2017-06-30 13:08 UTC (permalink / raw)
  To: alsa-devel; +Cc: tiwai, patches.audio, broonie, Subhransu S. Prusty, lgirdwood

If the dma_buffer_size is not defined in topology, fix it to 2ms default
value to make backward compatible.

Fixes: f6e6ab1d16ec ("ASoC: Intel: Skylake: Fix dma buffer size calculation")
Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
---
 sound/soc/intel/skylake/skl-messages.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/sound/soc/intel/skylake/skl-messages.c b/sound/soc/intel/skylake/skl-messages.c
index eca85827dbd2..fb2f1f603f3c 100644
--- a/sound/soc/intel/skylake/skl-messages.c
+++ b/sound/soc/intel/skylake/skl-messages.c
@@ -540,6 +540,14 @@ static void skl_setup_cpr_gateway_cfg(struct skl_sst *ctx,
 	cpr_mconfig->gtw_cfg.dma_buffer_size =
 				mconfig->dma_buffer_size * dma_io_buf;
 
+	/* fallback to 2ms default value */
+	if (!cpr_mconfig->gtw_cfg.dma_buffer_size) {
+		if (mconfig->hw_conn_type == SKL_CONN_SOURCE)
+			cpr_mconfig->gtw_cfg.dma_buffer_size = 2 * mconfig->obs;
+		else
+			cpr_mconfig->gtw_cfg.dma_buffer_size = 2 * mconfig->ibs;
+	}
+
 	cpr_mconfig->cpr_feature_mask = 0;
 	cpr_mconfig->gtw_cfg.config_length  = 0;
 
-- 
1.9.1

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

* Re: [PATCH] ASoC: Intel: Skylake: Fix default dma_buffer_size
  2017-06-30 13:08 [PATCH] ASoC: Intel: Skylake: Fix default dma_buffer_size Subhransu S. Prusty
@ 2017-07-03 11:10 ` Vinod Koul
  2017-07-10 18:41 ` Applied "ASoC: Intel: Skylake: Fix default dma_buffer_size" to the asoc tree Mark Brown
  1 sibling, 0 replies; 3+ messages in thread
From: Vinod Koul @ 2017-07-03 11:10 UTC (permalink / raw)
  To: Subhransu S. Prusty; +Cc: tiwai, patches.audio, alsa-devel, broonie, lgirdwood

On Fri, Jun 30, 2017 at 06:38:44PM +0530, Subhransu S. Prusty wrote:
> If the dma_buffer_size is not defined in topology, fix it to 2ms default
> value to make backward compatible.

Acked-By: Vinod Koul <vinod.koul@intel.com>

-- 
~Vinod

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

* Applied "ASoC: Intel: Skylake: Fix default dma_buffer_size" to the asoc tree
  2017-06-30 13:08 [PATCH] ASoC: Intel: Skylake: Fix default dma_buffer_size Subhransu S. Prusty
  2017-07-03 11:10 ` Vinod Koul
@ 2017-07-10 18:41 ` Mark Brown
  1 sibling, 0 replies; 3+ messages in thread
From: Mark Brown @ 2017-07-10 18:41 UTC (permalink / raw)
  Cc: alsa-devel, tiwai, lgirdwood, patches.audio, broonie,
	Subhransu S. Prusty

The patch

   ASoC: Intel: Skylake: Fix default dma_buffer_size

has been applied to the asoc tree at

   git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git 

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

>From 5b43af6d25461d7de293e0704d3b4631dda9b1e8 Mon Sep 17 00:00:00 2001
From: "Subhransu S. Prusty" <subhransu.s.prusty@intel.com>
Date: Fri, 30 Jun 2017 18:38:44 +0530
Subject: [PATCH] ASoC: Intel: Skylake: Fix default dma_buffer_size

If the dma_buffer_size is not defined in topology, fix it to 2ms default
value to make backward compatible.

Fixes: f6e6ab1d16ec ("ASoC: Intel: Skylake: Fix dma buffer size calculation")
Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
Acked-By: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 sound/soc/intel/skylake/skl-messages.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/sound/soc/intel/skylake/skl-messages.c b/sound/soc/intel/skylake/skl-messages.c
index eca85827dbd2..fb2f1f603f3c 100644
--- a/sound/soc/intel/skylake/skl-messages.c
+++ b/sound/soc/intel/skylake/skl-messages.c
@@ -540,6 +540,14 @@ static void skl_setup_cpr_gateway_cfg(struct skl_sst *ctx,
 	cpr_mconfig->gtw_cfg.dma_buffer_size =
 				mconfig->dma_buffer_size * dma_io_buf;
 
+	/* fallback to 2ms default value */
+	if (!cpr_mconfig->gtw_cfg.dma_buffer_size) {
+		if (mconfig->hw_conn_type == SKL_CONN_SOURCE)
+			cpr_mconfig->gtw_cfg.dma_buffer_size = 2 * mconfig->obs;
+		else
+			cpr_mconfig->gtw_cfg.dma_buffer_size = 2 * mconfig->ibs;
+	}
+
 	cpr_mconfig->cpr_feature_mask = 0;
 	cpr_mconfig->gtw_cfg.config_length  = 0;
 
-- 
2.13.2

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

end of thread, other threads:[~2017-07-10 18:42 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-06-30 13:08 [PATCH] ASoC: Intel: Skylake: Fix default dma_buffer_size Subhransu S. Prusty
2017-07-03 11:10 ` Vinod Koul
2017-07-10 18:41 ` Applied "ASoC: Intel: Skylake: Fix default dma_buffer_size" to the asoc tree 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).