]> git.alsa-project.org Git - alsa-utils.git/commit
amixer: fix indentation when printing container TLV contents
authorAnssi Hannula <anssi.hannula@iki.fi>
Tue, 1 Oct 2013 20:46:53 +0000 (23:46 +0300)
committerTakashi Iwai <tiwai@suse.de>
Wed, 2 Oct 2013 15:36:02 +0000 (17:36 +0200)
commitf1e991e81350e9388ab6cf04a64ac4b4389a588c
tree629f5af9fd04649b92516500a062d66c89cbac0f
parent180283e2307b07bbd3958d24382aab8271dd4c1d
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>
amixer/amixer.c