aboutsummaryrefslogtreecommitdiffstats
path: root/alsa-pcm.c
diff options
context:
space:
mode:
authorMark Farrugia <mark.farrugia@fiberdyne.com.au>2018-10-08 11:42:14 +1100
committerMark Farrugia <mark.farrugia@fiberdyne.com.au>2018-10-26 17:27:39 +1100
commit470fdcb5f773ab45f715a665af6cb35a79ef38ce (patch)
treeec86f3f7f11c71b30ad7828e2d769a3ae3504ca5 /alsa-pcm.c
parent931ac3b329c106c9058250b994e6a150c977b606 (diff)
Refactor to use new DINFO macros
Signed-off-by: Mark Farrugia <mark.farrugia@fiberdyne.com.au>
Diffstat (limited to 'alsa-pcm.c')
-rw-r--r--alsa-pcm.c10
1 files changed, 7 insertions, 3 deletions
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;
}