alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] ASoC: amd: fix kernel warning
@ 2020-05-19 14:34 Vijendar Mukunda
  2020-05-19 14:34 ` [PATCH 2/3] ASoC: amd: refactoring dai_hw_params() callback Vijendar Mukunda
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Vijendar Mukunda @ 2020-05-19 14:34 UTC (permalink / raw)
  To: alsa-devel, broonie, tiwai
  Cc: Alexander.Deucher, kbuild test robot, Vijendar Mukunda

Removed unused variable from code to fix the kernel warning.

Reported-by: kbuild test robot <lkp@intel.com>
Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
---
 sound/soc/amd/renoir/acp3x-pdm-dma.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/sound/soc/amd/renoir/acp3x-pdm-dma.c b/sound/soc/amd/renoir/acp3x-pdm-dma.c
index 942010021319..b33c7aec7481 100644
--- a/sound/soc/amd/renoir/acp3x-pdm-dma.c
+++ b/sound/soc/amd/renoir/acp3x-pdm-dma.c
@@ -150,12 +150,11 @@ static int start_pdm_dma(void __iomem *acp_base)
 
 static int stop_pdm_dma(void __iomem *acp_base)
 {
-	u32 pdm_enable, pdm_dma_enable, pdm_fifo_flush;
+	u32 pdm_enable, pdm_dma_enable;
 	int timeout;
 
 	pdm_enable = 0x00;
 	pdm_dma_enable  = 0x00;
-	pdm_fifo_flush = 0x00;
 
 	pdm_enable = rn_readl(acp_base + ACP_WOV_PDM_ENABLE);
 	pdm_dma_enable = rn_readl(acp_base + ACP_WOV_PDM_DMA_ENABLE);
-- 
2.26.2


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

* [PATCH 2/3] ASoC: amd: refactoring dai_hw_params() callback
  2020-05-19 14:34 [PATCH 1/3] ASoC: amd: fix kernel warning Vijendar Mukunda
@ 2020-05-19 14:34 ` Vijendar Mukunda
  2020-05-19 14:34 ` [PATCH 3/3] ASoC: amd: return error when acp de-init fails Vijendar Mukunda
  2020-05-19 18:50 ` [PATCH 1/3] ASoC: amd: fix kernel warning Mark Brown
  2 siblings, 0 replies; 4+ messages in thread
From: Vijendar Mukunda @ 2020-05-19 14:34 UTC (permalink / raw)
  To: alsa-devel, broonie, tiwai; +Cc: Alexander.Deucher, Vijendar Mukunda

Removed api config_pdm_stream_params().
Modified switch case for channel check.
Default case should return -EINVAL.

Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
---
 sound/soc/amd/renoir/acp3x-pdm-dma.c | 15 +++++----------
 1 file changed, 5 insertions(+), 10 deletions(-)

diff --git a/sound/soc/amd/renoir/acp3x-pdm-dma.c b/sound/soc/amd/renoir/acp3x-pdm-dma.c
index b33c7aec7481..623dfd3ea705 100644
--- a/sound/soc/amd/renoir/acp3x-pdm-dma.c
+++ b/sound/soc/amd/renoir/acp3x-pdm-dma.c
@@ -72,14 +72,6 @@ static void init_pdm_ring_buffer(u32 physical_addr,
 	rn_writel(0x01, acp_base + ACPAXI2AXI_ATU_CTRL);
 }
 
-static void config_pdm_stream_params(unsigned int ch_mask,
-				     void __iomem *acp_base)
-{
-	rn_writel(ch_mask, acp_base + ACP_WOV_PDM_NO_OF_CHANNELS);
-	rn_writel(PDM_DECIMATION_FACTOR, acp_base +
-		  ACP_WOV_PDM_DECIMATION_FACTOR);
-}
-
 static void enable_pdm_clock(void __iomem *acp_base)
 {
 	u32 pdm_clk_enable, pdm_ctrl;
@@ -332,11 +324,14 @@ static int acp_pdm_dai_hw_params(struct snd_pcm_substream *substream,
 	rtd = substream->runtime->private_data;
 	switch (params_channels(params)) {
 	case TWO_CH:
-	default:
 		ch_mask = 0x00;
 		break;
+	default:
+		return -EINVAL;
 	}
-	config_pdm_stream_params(ch_mask, rtd->acp_base);
+	rn_writel(ch_mask, rtd->acp_base + ACP_WOV_PDM_NO_OF_CHANNELS);
+	rn_writel(PDM_DECIMATION_FACTOR, rtd->acp_base +
+		  ACP_WOV_PDM_DECIMATION_FACTOR);
 	return 0;
 }
 
-- 
2.26.2


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

* [PATCH 3/3] ASoC: amd: return error when acp de-init fails
  2020-05-19 14:34 [PATCH 1/3] ASoC: amd: fix kernel warning Vijendar Mukunda
  2020-05-19 14:34 ` [PATCH 2/3] ASoC: amd: refactoring dai_hw_params() callback Vijendar Mukunda
@ 2020-05-19 14:34 ` Vijendar Mukunda
  2020-05-19 18:50 ` [PATCH 1/3] ASoC: amd: fix kernel warning Mark Brown
  2 siblings, 0 replies; 4+ messages in thread
From: Vijendar Mukunda @ 2020-05-19 14:34 UTC (permalink / raw)
  To: alsa-devel, broonie, tiwai; +Cc: Alexander.Deucher, Vijendar Mukunda

Return error when acp de-init fails during suspend.

Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
---
 sound/soc/amd/renoir/rn-pci-acp3x.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/amd/renoir/rn-pci-acp3x.c b/sound/soc/amd/renoir/rn-pci-acp3x.c
index 502c3f794ba0..859ed67b93cf 100644
--- a/sound/soc/amd/renoir/rn-pci-acp3x.c
+++ b/sound/soc/amd/renoir/rn-pci-acp3x.c
@@ -277,7 +277,7 @@ static int snd_rn_acp_suspend(struct device *dev)
 	else
 		dev_dbg(dev, "ACP de-initialized\n");
 
-	return 0;
+	return ret;
 }
 
 static int snd_rn_acp_resume(struct device *dev)
-- 
2.26.2


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

* Re: [PATCH 1/3] ASoC: amd: fix kernel warning
  2020-05-19 14:34 [PATCH 1/3] ASoC: amd: fix kernel warning Vijendar Mukunda
  2020-05-19 14:34 ` [PATCH 2/3] ASoC: amd: refactoring dai_hw_params() callback Vijendar Mukunda
  2020-05-19 14:34 ` [PATCH 3/3] ASoC: amd: return error when acp de-init fails Vijendar Mukunda
@ 2020-05-19 18:50 ` Mark Brown
  2 siblings, 0 replies; 4+ messages in thread
From: Mark Brown @ 2020-05-19 18:50 UTC (permalink / raw)
  To: Vijendar Mukunda, alsa-devel, tiwai; +Cc: Alexander.Deucher, kbuild test robot

On Tue, 19 May 2020 22:34:20 +0800, Vijendar Mukunda wrote:
> Removed unused variable from code to fix the kernel warning.

Applied to

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

Thanks!

[1/3] ASoC: amd: fix kernel warning
      commit: fdae433e5129c4ca87716de08fdcc0034d5aabc8
[2/3] ASoC: amd: refactoring dai_hw_params() callback
      commit: 19cc20bd644f7baf279671c0647ef79c36f259a3
[3/3] ASoC: amd: return error when acp de-init fails
      commit: ce5955866d971864a6cd8d012411ec96b048a696

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

end of thread, other threads:[~2020-05-19 18:51 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-19 14:34 [PATCH 1/3] ASoC: amd: fix kernel warning Vijendar Mukunda
2020-05-19 14:34 ` [PATCH 2/3] ASoC: amd: refactoring dai_hw_params() callback Vijendar Mukunda
2020-05-19 14:34 ` [PATCH 3/3] ASoC: amd: return error when acp de-init fails Vijendar Mukunda
2020-05-19 18:50 ` [PATCH 1/3] ASoC: amd: fix kernel warning 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).