From 901d3947b85900db3a7557404b456686778c52c5 Mon Sep 17 00:00:00 2001 From: Balakishorepati Date: Thu, 10 Mar 2022 22:23:08 +0530 Subject: [PATCH] Revert "drivers: amd: renoir: Fix 16K sample rate for dmic" This reverts commit 82886c6b41232025562ef3e268b5726cf9d2d503. Signed-off-by: Balakishorepati --- src/drivers/amd/renoir/acp_dmic_dai.c | 2 +- src/drivers/amd/renoir/acp_dmic_dma.c | 4 ++-- src/include/sof/drivers/acp_dai_dma.h | 2 -- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/drivers/amd/renoir/acp_dmic_dai.c b/src/drivers/amd/renoir/acp_dmic_dai.c index 5465f5d49..0a655d718 100644 --- a/src/drivers/amd/renoir/acp_dmic_dai.c +++ b/src/drivers/amd/renoir/acp_dmic_dai.c @@ -73,7 +73,7 @@ static int acp_dmic_dai_get_hw_params(struct dai *dai, int dir) { /* ACP only currently supports these parameters */ - params->rate = ACP_SAMPLE_RATE_16K;/* 16000 sample rate only for dmic */ + params->rate = ACP_DEFAULT_SAMPLE_RATE; params->channels = ACP_DEFAULT_NUM_CHANNELS; params->buffer_fmt = SOF_IPC_BUFFER_INTERLEAVED; params->frame_fmt = SOF_IPC_FRAME_S32_LE; diff --git a/src/drivers/amd/renoir/acp_dmic_dma.c b/src/drivers/amd/renoir/acp_dmic_dma.c index 71faeb360..0dfbefe03 100644 --- a/src/drivers/amd/renoir/acp_dmic_dma.c +++ b/src/drivers/amd/renoir/acp_dmic_dma.c @@ -96,8 +96,8 @@ static int acp_dmic_dma_start(struct dma_chan_data *channel) deci_fctr.u32all = 2; io_reg_write(PU_REGISTER_BASE + ACP_WOV_PDM_DECIMATION_FACTOR, deci_fctr.u32all); - /* DMIC Clock for 16K sample rate */ - clk_ctrl.bits.brm_clk_ctrl = 1; + /* DMIC Clock */ + clk_ctrl.bits.brm_clk_ctrl = 7; io_reg_write(PU_REGISTER_BASE + ACP_WOV_CLK_CTRL, clk_ctrl.u32all); /* PDM Control */ diff --git a/src/include/sof/drivers/acp_dai_dma.h b/src/include/sof/drivers/acp_dai_dma.h index 57519318d..e6a0468b7 100644 --- a/src/include/sof/drivers/acp_dai_dma.h +++ b/src/include/sof/drivers/acp_dai_dma.h @@ -27,8 +27,6 @@ int acp_dma_init(struct sof *sof); /* default sample rate */ #define ACP_DEFAULT_SAMPLE_RATE 48000 -#define ACP_SAMPLE_RATE_16K 16000 - #define ACP_DMA_BUFFER_ALIGN 64 #define ACP_DMA_TRANS_SIZE 64 #define ACP_DAI_DMA_BUFFER_PERIOD_COUNT 2