Skip to content

Commit 18dbff4

Browse files
ujfalusibroonie
authored andcommitted
ASoC: SOF: sof-audio: add dev_dbg_ratelimited wrapper
Add dev_dbg_ratelimited() wrapper for snd_sof_pcm specific debug prints that needs rate limited. Signed-off-by: Peter Ujfalusi <[email protected]> Reviewed-by: Kai Vehmanen <[email protected]> Reviewed-by: Bard Liao <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent aefada9 commit 18dbff4

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

sound/soc/sof/sof-audio.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -629,6 +629,11 @@ void snd_sof_pcm_init_elapsed_work(struct work_struct *work);
629629
(__spcm)->pcm.pcm_id, (__spcm)->pcm.pcm_name, __dir, \
630630
##__VA_ARGS__)
631631

632+
#define spcm_dbg_ratelimited(__spcm, __dir, __fmt, ...) \
633+
dev_dbg_ratelimited((__spcm)->scomp->dev, "pcm%u (%s), dir %d: " __fmt, \
634+
(__spcm)->pcm.pcm_id, (__spcm)->pcm.pcm_name, __dir, \
635+
##__VA_ARGS__)
636+
632637
#define spcm_err(__spcm, __dir, __fmt, ...) \
633638
dev_err((__spcm)->scomp->dev, "%s: pcm%u (%s), dir %d: " __fmt, \
634639
__func__, (__spcm)->pcm.pcm_id, (__spcm)->pcm.pcm_name, __dir, \

0 commit comments

Comments
 (0)