public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH v2] ASoC: soc-pcm: Optimize hw_params() BE DAI call
@ 2025-04-08  8:30 Sheetal .
  2025-04-08  9:04 ` Sheetal .
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Sheetal . @ 2025-04-08  8:30 UTC (permalink / raw)
  To: broonie, lgirdwood, perex, tiwai, linux-sound
  Cc: linux-tegra, linux-kernel, jonathanh, thierry.reding, mkumard,
	spujar, Sheetal

From: Sheetal <sheetal@nvidia.com>

The hw_params() function for BE DAI was being called multiple times due
to an unnecessary SND_SOC_DPCM_STATE_HW_PARAMS state check.

Remove the redundant state check to ensure hw_params() is called only once
per BE DAI configuration.

Signed-off-by: Sheetal <sheetal@nvidia.com>
---
Changes in v2:
- Update commit message as its not a fix.
- Marked as RFC patch as it requires feedback from other users
  perspective as well.
- The patch is being sent separately as other patch is not RFC.

 sound/soc/soc-pcm.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/sound/soc/soc-pcm.c b/sound/soc/soc-pcm.c
index d7f6d3a6d312..c73be27c4ecb 100644
--- a/sound/soc/soc-pcm.c
+++ b/sound/soc/soc-pcm.c
@@ -2123,7 +2123,6 @@ int dpcm_be_dai_hw_params(struct snd_soc_pcm_runtime *fe, int stream)
 			continue;
 
 		if ((be->dpcm[stream].state != SND_SOC_DPCM_STATE_OPEN) &&
-		    (be->dpcm[stream].state != SND_SOC_DPCM_STATE_HW_PARAMS) &&
 		    (be->dpcm[stream].state != SND_SOC_DPCM_STATE_HW_FREE))
 			continue;
 
-- 
2.17.1


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

end of thread, other threads:[~2025-05-26 16:18 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-08  8:30 [RFC PATCH v2] ASoC: soc-pcm: Optimize hw_params() BE DAI call Sheetal .
2025-04-08  9:04 ` Sheetal .
2025-05-12 12:01 ` Sameer Pujar
2025-05-13  6:15   ` Péter Ujfalusi
2025-05-21  5:25     ` Sheetal .
2025-05-21  8:17       ` Péter Ujfalusi
2025-05-21 11:33         ` Sheetal .
2025-05-13 11:10 ` Péter Ujfalusi
2025-05-23  9:55   ` Pierre-Louis Bossart
2025-05-23 11:01     ` Sheetal .
2025-05-26 16:18       ` Pierre-Louis Bossart

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox