mirror of
https://github.com/alsa-project/alsa-utils
synced 2024-11-09 17:25:42 +01:00
amixer: fix indentation when printing container TLV contents
decode_tlv() adds indentation in the beginning, with the expectation that the TLV will be printed on the line afterwards in a switch-case. However, in the case of a container TLV the switch-case simply adds another level of indentation and calls decode_tlv() for the inner TLVs. This causes the first inner TLV to be printed with too much indentation and double '|'. Fix that by printing "container" and a newline for container TLVs, so that the result is as follows: : values=0,0,0,0,0,0,0,0 | container | chmap-variable=FL,FR | chmap-variable=FL,FR,LFE | chmap-variable=FL,FR,FC Signed-off-by: Anssi Hannula <anssi.hannula@iki.fi> Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
parent
180283e230
commit
f1e991e813
1 changed files with 1 additions and 0 deletions
|
@ -460,6 +460,7 @@ static void decode_tlv(unsigned int spaces, unsigned int *tlv, unsigned int tlv_
|
|||
}
|
||||
switch (type) {
|
||||
case SND_CTL_TLVT_CONTAINER:
|
||||
printf("container\n");
|
||||
size += sizeof(unsigned int) -1;
|
||||
size /= sizeof(unsigned int);
|
||||
while (idx < size) {
|
||||
|
|
Loading…
Reference in a new issue