Files
alsa-utils/0006-amixer-fix-indentation-when-printing-container-TLV-c.patch
Takashi Iwai f84c139643 Accepting request 208681 from home:tiwai:branches:multimedia:libs
- Backport upstream fixes: a few fixes for chmap support, alsaconf
  updates, a new monitor command for alsactl, etc:
  0006-amixer-fix-indentation-when-printing-container-TLV-c.patch
  0007-alsaloop-pcmjob.c-use-portable-way-to-initialize-rec.patch
  0008-speaker-test-Fix-chmapped-channel-selection-without-.patch
  0009-speaker-test-Always-show-chmap-channel-names-if-avai.patch
  0010-speaker-test-Show-out-of-chmap-channels-as-Unknown.patch
  0011-alsaconf-support-newer-m-i-t-and-kmod.patch
  0012-alsaconf-update-gentoo-to-use-modprobe.d-method-as-e.patch
  0013-configure-detect-udevdir-via-pkg-config-fallback-to-.patch
  0014-alsactl-Add-monitor-command.patch
  0015-alsactl-Fix-REMOVE-event-handling-in-monitor-command.patch
  0016-alsactl-monitor-all-cards-as-default.patch

OBS-URL: https://build.opensuse.org/request/show/208681
OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/alsa-utils?expand=0&rev=94
2013-11-27 13:18:04 +00:00

43 lines
1.4 KiB
Diff

From f1e991e81350e9388ab6cf04a64ac4b4389a588c Mon Sep 17 00:00:00 2001
From: Anssi Hannula <anssi.hannula@iki.fi>
Date: Tue, 1 Oct 2013 23:46:53 +0300
Subject: [PATCH] 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 | 1 +
1 file changed, 1 insertion(+)
diff --git a/amixer/amixer.c b/amixer/amixer.c
index b83b0c356474..cf82892bfa2f 100644
--- a/amixer/amixer.c
+++ b/amixer/amixer.c
@@ -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) {
--
1.8.4.3