Skip to content

Commit

Permalink
amixer: fix unknown TVL sequence print
Browse files Browse the repository at this point in the history
Closes: #282
Signed-off-by: Jaroslav Kysela <[email protected]>
  • Loading branch information
perexg committed Nov 24, 2024
1 parent 6f7ce73 commit d45a2be
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion amixer/amixer.c
Original file line number Diff line number Diff line change
Expand Up @@ -587,10 +587,17 @@ static void decode_tlv(unsigned int spaces, unsigned int *tlv, unsigned int tlv_
#endif
default:
printf("unk-%u-", type);
while (size > 0) {
while (size > sizeof(unsigned int)) {
printf("0x%08x,", tlv[idx++]);
size -= sizeof(unsigned int);
}
if (size > 0) {
unsigned char *b = (void *)&tlv[idx];
while (size > 0) {
printf("E-0x%02x,", *b++);
size--;
}
}
break;
}
if (lf)
Expand Down

0 comments on commit d45a2be

Please sign in to comment.