[PATCH] ASoC: qcom: lpass-platform: Update warning print to control excess logging

Srinivasa Rao Mandadapu quic_srivasam at quicinc.com
Fri Feb 25 13:42:23 CET 2022


Update dev_warn to dev_warn_ratelimit to control excess xrun logging
in lpass platform driver.

Signed-off-by: Srinivasa Rao Mandadapu <quic_srivasam at quicinc.com>
Co-developed-by: Venkata Prasad Potturu <quic_potturu at quicinc.com>
Signed-off-by: Venkata Prasad Potturu <quic_potturu at quicinc.com>
---
 sound/soc/qcom/lpass-platform.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/sound/soc/qcom/lpass-platform.c b/sound/soc/qcom/lpass-platform.c
index b3af971..1ce0878 100644
--- a/sound/soc/qcom/lpass-platform.c
+++ b/sound/soc/qcom/lpass-platform.c
@@ -986,7 +986,8 @@ static irqreturn_t lpass_dma_interrupt_handler(
 				"error writing to irqclear reg: %d\n", rv);
 			return IRQ_NONE;
 		}
-		dev_warn(soc_runtime->dev, "xrun warning\n");
+		dev_warn_ratelimited(soc_runtime->dev, "xrun warning\n");
+
 		snd_pcm_stop_xrun(substream);
 		ret = IRQ_HANDLED;
 	}
-- 
2.7.4



More information about the Alsa-devel mailing list