1
0
Fork 0

amixer: fix unknown TVL sequence print

Closes: https://github.com/alsa-project/alsa-utils/issues/282
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This commit is contained in:
Jaroslav Kysela 2024-11-24 20:02:51 +01:00
parent 6f7ce73159
commit d45a2be9ea

View file

@ -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)