Skip to content

Commit d45a2be

Browse files
committed
amixer: fix unknown TVL sequence print
Closes: #282 Signed-off-by: Jaroslav Kysela <[email protected]>
1 parent 6f7ce73 commit d45a2be

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

amixer/amixer.c

+8-1
Original file line numberDiff line numberDiff line change
@@ -587,10 +587,17 @@ static void decode_tlv(unsigned int spaces, unsigned int *tlv, unsigned int tlv_
587587
#endif
588588
default:
589589
printf("unk-%u-", type);
590-
while (size > 0) {
590+
while (size > sizeof(unsigned int)) {
591591
printf("0x%08x,", tlv[idx++]);
592592
size -= sizeof(unsigned int);
593593
}
594+
if (size > 0) {
595+
unsigned char *b = (void *)&tlv[idx];
596+
while (size > 0) {
597+
printf("E-0x%02x,", *b++);
598+
size--;
599+
}
600+
}
594601
break;
595602
}
596603
if (lf)

0 commit comments

Comments
 (0)