amixer: add support for TLV dB minmax types

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This commit is contained in:
Jaroslav Kysela 2010-02-10 11:52:53 +01:00
parent cdc496addb
commit f45aa72cd6

View file

@ -533,6 +533,26 @@ static void decode_tlv(unsigned int spaces, unsigned int *tlv, unsigned int tlv_
idx += 6 * sizeof(unsigned int); idx += 6 * sizeof(unsigned int);
} }
break; break;
#endif
#ifdef SND_CTL_TLVT_DB_MINMAX
case SND_CTL_TLVT_DB_MINMAX:
case SND_CTL_TLVT_DB_MINMAX_MUTE:
if (type == SND_CTL_TLVT_DB_MINMAX_MUTE)
printf("dBminmaxmute-");
else
printf("dBminmax-");
if (size != 2 * sizeof(unsigned int)) {
while (size > 0) {
printf("0x%08x,", tlv[idx++]);
size -= sizeof(unsigned int);
}
} else {
printf("min=");
print_dB(tlv[2]);
printf(",max=");
print_dB(tlv[3]);
}
break;
#endif #endif
default: default:
printf("unk-%i-", type); printf("unk-%i-", type);