Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5b43af6d authored by Subhransu S. Prusty's avatar Subhransu S. Prusty Committed by Mark Brown
Browse files

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: f6e6ab1d ("ASoC: Intel: Skylake: Fix dma buffer size calculation")
Signed-off-by: default avatarSubhransu S. Prusty <subhransu.s.prusty@intel.com>
Acked-By: default avatarVinod Koul <vinod.koul@intel.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent b821d298
Loading
Loading
Loading
Loading
+8 −0
Original line number Original line Diff line number Diff line
@@ -540,6 +540,14 @@ static void skl_setup_cpr_gateway_cfg(struct skl_sst *ctx,
	cpr_mconfig->gtw_cfg.dma_buffer_size =
	cpr_mconfig->gtw_cfg.dma_buffer_size =
				mconfig->dma_buffer_size * dma_io_buf;
				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->cpr_feature_mask = 0;
	cpr_mconfig->gtw_cfg.config_length  = 0;
	cpr_mconfig->gtw_cfg.config_length  = 0;