From f45aa72cd6a71515494a70448d48608c2d25960e Mon Sep 17 00:00:00 2001 From: Jaroslav Kysela Date: Wed, 10 Feb 2010 11:52:53 +0100 Subject: [PATCH] amixer: add support for TLV dB minmax types Signed-off-by: Jaroslav Kysela --- amixer/amixer.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/amixer/amixer.c b/amixer/amixer.c index 7b55035..c9ea572 100644 --- a/amixer/amixer.c +++ b/amixer/amixer.c @@ -533,6 +533,26 @@ static void decode_tlv(unsigned int spaces, unsigned int *tlv, unsigned int tlv_ idx += 6 * sizeof(unsigned int); } 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 default: printf("unk-%i-", type);