Skip to content

Commit 8d110a6

Browse files
committed
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 <peter.ujfalusi@linux.intel.com>
1 parent 4ded0e1 commit 8d110a6

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
@@ -639,6 +639,11 @@ void snd_sof_pcm_init_elapsed_work(struct work_struct *work);
639639
(__spcm)->pcm.pcm_id, (__spcm)->pcm.pcm_name, __dir, \
640640
##__VA_ARGS__)
641641

642+
#define spcm_dbg_ratelimited(__spcm, __dir, __fmt, ...) \
643+
dev_dbg_ratelimited((__spcm)->scomp->dev, "pcm%u (%s), dir %d: " __fmt, \
644+
(__spcm)->pcm.pcm_id, (__spcm)->pcm.pcm_name, __dir, \
645+
##__VA_ARGS__)
646+
642647
#define spcm_err(__spcm, __dir, __fmt, ...) \
643648
dev_err((__spcm)->scomp->dev, "%s: pcm%u (%s), dir %d: " __fmt, \
644649
__func__, (__spcm)->pcm.pcm_id, (__spcm)->pcm.pcm_name, __dir, \

0 commit comments

Comments
 (0)