From 470fdcb5f773ab45f715a665af6cb35a79ef38ce Mon Sep 17 00:00:00 2001 From: Mark Farrugia Date: Mon, 8 Oct 2018 11:42:14 +1100 Subject: Refactor to use new DINFO macros Signed-off-by: Mark Farrugia --- alsa-pcm.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'alsa-pcm.c') diff --git a/alsa-pcm.c b/alsa-pcm.c index 958ccbb..efa0a15 100644 --- a/alsa-pcm.c +++ b/alsa-pcm.c @@ -9,6 +9,12 @@ #include "core_internal.h" +#define D_LOGNAME "pcm" + +#define D_INFOK(fmt, args...) DINFO(D_LOGNAME, fmt, ##args) +#define D_PRINTK(fmt, args...) DDEBUG(D_LOGNAME, fmt, ##args) +#define D_ERRORK(fmt, args...) DERROR(D_LOGNAME, fmt, ##args) + #define DO_AUDIOPATH_CB(ap, callback, substream, ...) \ do { \ if ((ap)->pcm_ops->callback) { \ @@ -31,7 +37,6 @@ void avirt_pcm_period_elapsed(struct snd_pcm_substream *substream) } EXPORT_SYMBOL_GPL(avirt_pcm_period_elapsed); - /******************************************************************************* * ALSA PCM Callbacks ******************************************************************************/ @@ -90,7 +95,6 @@ static int pcm_open(struct snd_pcm_substream *substream) */ static int pcm_close(struct snd_pcm_substream *substream) { - DINFO(AP_LOGNAME, ""); // Do additional Audio Path 'close' callback DO_AUDIOPATH_CB(((struct avirt_audiopath *)substream->private_data), close, substream); @@ -199,7 +203,7 @@ static int pcm_trigger(struct snd_pcm_substream *substream, int cmd) case SNDRV_PCM_TRIGGER_SUSPEND: break; default: - pr_err("trigger must be START or STOP"); + D_ERRORK("Invalid trigger cmd: %d", cmd); return -EINVAL; } -- cgit 1.2.3-korg