ALSA: trace: use snd_pcm_direction_name()
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Tue, 30 Jul 2024 02:05:12 +0000 (02:05 +0000)
committerTakashi Iwai <tiwai@suse.de>
Thu, 1 Aug 2024 10:50:03 +0000 (12:50 +0200)
We already have snd_pcm_direction_name(). Let's use it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/87sevrk52f.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
include/trace/events/asoc.h

index 202fc3680c36610825c2e87d1e1b111db39dc062..6696dbcc2b96dd97852223227ded51f16bc177e7 100644 (file)
@@ -8,6 +8,7 @@
 #include <linux/ktime.h>
 #include <linux/tracepoint.h>
 #include <sound/jack.h>
+#include <sound/pcm.h>
 
 #define DAPM_DIRECT "(direct)"
 #define DAPM_ARROW(dir) (((dir) == SND_SOC_DAPM_DIR_OUT) ? "->" : "<-")
@@ -212,7 +213,7 @@ TRACE_EVENT(snd_soc_dapm_connected,
        ),
 
        TP_printk("%s: found %d paths",
-               __entry->stream ? "capture" : "playback", __entry->paths)
+                 snd_pcm_direction_name(__entry->stream), __entry->paths)
 );
 
 TRACE_EVENT(snd_soc_jack_irq,