summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnssi Hannula <anssi.hannula@iki.fi>2013-09-30 23:46:50 +0300
committerTakashi Iwai <tiwai@suse.de>2013-10-01 12:23:45 +0200
commit180283e2307b07bbd3958d24382aab8271dd4c1d (patch)
tree0d4ccc9cf72f017873f2c9f3ca744effaef2217b
parent87bcda4b8a12d0fabab0bf4b0c1197089d2f9c4c (diff)
downloadalsa-utils-180283e2307b07bbd3958d24382aab8271dd4c1d.tar.gz
amixer: actually print all TLVs in a container TLV
Due to a wrong indexing of tlv[] decode_tlv() always skips to the end of the container TLV since the used tlv[1] contains the container TLV size instead of the intended element size. This causes, for example, only the first HDMI channel map TLV to be shown. Fix the indexing to actually use the element size. Signed-off-by: Anssi Hannula <anssi.hannula@iki.fi> Signed-off-by: Takashi Iwai <tiwai@suse.de>
-rw-r--r--amixer/amixer.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/amixer/amixer.c b/amixer/amixer.c
index 7727943..b83b0c3 100644
--- a/amixer/amixer.c
+++ b/amixer/amixer.c
@@ -468,7 +468,7 @@ static void decode_tlv(unsigned int spaces, unsigned int *tlv, unsigned int tlv_
return;
}
decode_tlv(spaces + 2, tlv + idx, tlv[idx+1] + 8);
- idx += 2 + (tlv[1] + sizeof(unsigned int) - 1) / sizeof(unsigned int);
+ idx += 2 + (tlv[idx+1] + sizeof(unsigned int) - 1) / sizeof(unsigned int);
}
break;
case SND_CTL_TLVT_DB_SCALE: