[PATCH alsa-utils 1/2] aseqdump: Correct wrong channel number

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Correct the wrong value shown in MIDI2 default output (status instead
of channel).  Also adjust the printf formats to use %2d consistently
for the channel numbers.

Signed-off-by: Takashi Iwai <tiwai@xxxxxxx>
---
 seq/aseqdump/aseqdump.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/seq/aseqdump/aseqdump.c b/seq/aseqdump/aseqdump.c
index f3eebc73a9f4..a15e0752f0f1 100644
--- a/seq/aseqdump/aseqdump.c
+++ b/seq/aseqdump/aseqdump.c
@@ -368,29 +368,29 @@ static void dump_ump_midi2_event(const unsigned int *ump)
 	printf("Group %2d, ", group);
 	switch (status) {
 	case SND_UMP_MSG_PER_NOTE_RCC:
-		printf("Per-note RCC           %2u, note %u, index %u, value 0x%x",
+		printf("Per-note RCC           %2d, note %u, index %u, value 0x%x",
 		       channel, m->per_note_rcc.note,
 		       m->per_note_rcc.index, m->per_note_rcc.data);
 		break;
 	case SND_UMP_MSG_PER_NOTE_ACC:
-		printf("Per-note ACC           %2u, note %u, index %u, value 0x%x",
+		printf("Per-note ACC           %2d, note %u, index %u, value 0x%x",
 		       channel, m->per_note_acc.note,
 		       m->per_note_acc.index, m->per_note_acc.data);
 		break;
 	case SND_UMP_MSG_RPN:
-		printf("RPN                    %2u, bank %u:%u, value 0x%x",
+		printf("RPN                    %2d, bank %u:%u, value 0x%x",
 		       channel, m->rpn.bank, m->rpn.index, m->rpn.data);
 		break;
 	case SND_UMP_MSG_NRPN:
-		printf("NRPN                   %2u, bank %u:%u, value 0x%x",
+		printf("NRPN                   %2d, bank %u:%u, value 0x%x",
 		       channel, m->rpn.bank, m->rpn.index, m->rpn.data);
 		break;
 	case SND_UMP_MSG_RELATIVE_RPN:
-		printf("relative RPN           %2u, bank %u:%u, value 0x%x",
+		printf("relative RPN           %2d, bank %u:%u, value 0x%x",
 		       channel, m->rpn.bank, m->rpn.index, m->rpn.data);
 		break;
 	case SND_UMP_MSG_RELATIVE_NRPN:
-		printf("relative NRP           %2u, bank %u:%u, value 0x%x",
+		printf("relative NRP           %2d, bank %u:%u, value 0x%x",
 		       channel, m->rpn.bank, m->rpn.index, m->rpn.data);
 		break;
 	case SND_UMP_MSG_PER_NOTE_PITCHBEND:
@@ -437,8 +437,8 @@ static void dump_ump_midi2_event(const unsigned int *ump)
 		       channel, m->per_note_mgmt.flags);
 		break;
 	default:
-		printf("UMP MIDI2 event: status = %d, channel = %x, 0x%08x",
-		       status, status, *ump);
+		printf("UMP MIDI2 event: status = %d, channel = %d, 0x%08x",
+		       status, channel, *ump);
 		break;
 	}
 	printf("\n");
-- 
2.35.3




[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Pulse Audio]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux