ALSA: pcm: use friendly name for id of PCM substream in trace print
authorTakashi Sakamoto <o-takashi@sakamocchi.jp>
Fri, 9 Jun 2017 12:46:50 +0000 (21:46 +0900)
committerTakashi Iwai <tiwai@suse.de>
Fri, 9 Jun 2017 14:27:23 +0000 (16:27 +0200)
Use the same print format of snd_pcm_debug_name() for userspace tracing
program.

Suggested-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/core/pcm_param_trace.h

index 872922326b3810bf7769b1c9c55c475100cd5670..86c8d658a25c05e669374482c0c1ece237b9d14a 100644 (file)
@@ -49,11 +49,11 @@ TRACE_EVENT(hw_mask_param,
                memcpy(__entry->prev_bits, prev->bits, sizeof(__u32) * 8);
                memcpy(__entry->curr_bits, curr->bits, sizeof(__u32) * 8);
        ),
-       TP_printk("%d,%d,%d,%d %03d/%03d %s %08x%08x%08x%08x %08x%08x%08x%08x",
+       TP_printk("pcmC%dD%d%s:%d %03d/%03d %s %08x%08x%08x%08x %08x%08x%08x%08x",
                  __entry->card,
                  __entry->device,
+                 __entry->direction ? "c" : "p",
                  __entry->subdevice,
-                 __entry->direction,
                  __entry->index,
                  __entry->total,
                  __print_symbolic(__entry->type, hw_param_labels),
@@ -109,11 +109,11 @@ TRACE_EVENT(hw_interval_param,
                __entry->curr_integer = curr->integer;
                __entry->curr_empty = curr->empty;
        ),
-       TP_printk("%d,%d,%d,%d %03d/%03d %s %d %d %s%u %u%s %d %d %s%u %u%s",
+       TP_printk("pcmC%dD%d%s:%d %03d/%03d %s %d %d %s%u %u%s %d %d %s%u %u%s",
                  __entry->card,
                  __entry->device,
+                 __entry->direction ? "c" : "p",
                  __entry->subdevice,
-                 __entry->direction,
                  __entry->index,
                  __entry->total,
                  __print_symbolic(__entry->type, hw_param_labels),