alsa/0024-topology-make-vebose-output-more-nice.patch
Takashi Iwai 1848bd6c60 Accepting request 758564 from home:tiwai:branches:multimedia:libs
- Upstream fixes, including the alsa-tools build breakage:
  0001-ucm-Use-strncmp-to-avoid-access-out-of-boundary.patch
  0002-ucm-return-always-at-least-NULL-if-no-list-is-availa.patch
  0003-ucm-add-_identifiers-list.patch
  0004-namehint-correct-the-args-check.patch
  0005-namehint-improve-the-previous-patch-check-the-return.patch
  0006-ucm-docs-allow-spaces-in-device-names-for-JackHWMute.patch
  0007-use-case-docs-add-PlaybackMixerCopy-and-CaptureMixer.patch
  0008-ucm-docs-add-JackCTL-rearrange-JackControl-and-JackD.patch
  0009-ucm-Do-not-fail-to-parse-configs-on-cards-with-an-em.patch
  0010-src-ucm-main.c-fix-build-without-mixer.patch
  0011-alsa.m4-another-try-to-fix-the-libatopology-detectio.patch
  0012-ucm-docs-add-Mic-DigitalMic-and-multiple-devices-com.patch
  0013-ucm-docs-remove-DigitalMic-it-does-not-have-sense.patch
  0014-ucm-docs-change-the-Mic-description-to-simple-Microp.patch
  0015-ucm-docs-add-note-about-the-sequences-and-device-spl.patch
  0016-ucm-docs-remove-MixerCopy-values-add-Priority-for-ve.patch
  0017-ucm-setup-conf_format-after-getting-ALSA_CONFIG_UCM_.patch
  0018-alsa-lib-fix-the-array-parser-unique-compound-keys.patch
  0019-topology-remove-vendor_fd-name-from-snd_tplg-structu.patch
  0020-topology-file-position-and-size-cleanups.patch
  0021-topology-use-an-array-describing-blocks-for-the-main.patch
  0022-topology-use-size_t-for-calc_block_size.patch
  0023-topology-merge-write_block-to-tplg_write_data.patch
  0024-topology-make-vebose-output-more-nice.patch
  0025-topology-use-list_insert-macro-in-tplg_elem_insert.patch
  0026-topology-dapm-coding-fixes.patch
  0027-topology-dapm-merge-identical-index-blocks-like-for-.patch
  0028-topology-more-coding-fixes.patch
  0029-Fix-alsa-sound-.h-for-external-programs.patch

OBS-URL: https://build.opensuse.org/request/show/758564
OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/alsa?expand=0&rev=263
2019-12-20 16:28:33 +00:00

82 lines
2.9 KiB
Diff

From c9e9ee3c40e9f50889f2bb4065c4556184998e8f Mon Sep 17 00:00:00 2001
From: Jaroslav Kysela <perex@perex.cz>
Date: Fri, 13 Dec 2019 18:53:41 +0100
Subject: [PATCH 24/30] topology: make vebose output more nice
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
---
src/topology/builder.c | 18 ++++++++++--------
1 file changed, 10 insertions(+), 8 deletions(-)
diff --git a/src/topology/builder.c b/src/topology/builder.c
index f530fcd853c4..1a22a453695a 100644
--- a/src/topology/builder.c
+++ b/src/topology/builder.c
@@ -29,7 +29,7 @@ static void verbose(snd_tplg_t *tplg, const char *fmt, ...)
return;
va_start(va, fmt);
- fprintf(stdout, "0x%6.6zx/%6.6zd -", tplg->out_pos, tplg->out_pos);
+ fprintf(stdout, "0x%6.6zx/%6.6zd - ", tplg->out_pos, tplg->out_pos);
vfprintf(stdout, fmt, va);
va_end(va);
}
@@ -80,7 +80,7 @@ static ssize_t write_block_header(snd_tplg_t *tplg, unsigned int type,
return -EINVAL;
}
- verbose(tplg, " header index %d type %d count %d size 0x%lx/%ld vendor %d "
+ verbose(tplg, "header index %d type %d count %d size 0x%lx/%ld vendor %d "
"version %d\n", index, type, count,
(long unsigned int)payload_size, (long int)payload_size,
vendor_type, version);
@@ -128,10 +128,10 @@ static int write_elem_block(snd_tplg_t *tplg,
continue;
if (elem->type != SND_TPLG_TYPE_DAPM_GRAPH)
- verbose(tplg, " %s '%s': write %d bytes\n",
+ verbose(tplg, "%s '%s': write %d bytes\n",
obj_name, elem->id, elem->size);
else
- verbose(tplg, " %s '%s -> %s -> %s': write %d bytes\n",
+ verbose(tplg, "%s '%s -> %s -> %s': write %d bytes\n",
obj_name, elem->route->source,
elem->route->control,
elem->route->sink, elem->size);
@@ -197,10 +197,10 @@ static ssize_t write_manifest_data(snd_tplg_t *tplg)
return ret;
}
- verbose(tplg, "manifest : write %d bytes\n", sizeof(tplg->manifest));
+ verbose(tplg, "manifest: write %d bytes\n", sizeof(tplg->manifest));
ret = twrite(tplg, &tplg->manifest, sizeof(tplg->manifest));
if (ret >= 0) {
- verbose(tplg, "manifest : write %d priv bytes\n", tplg->manifest.priv.size);
+ verbose(tplg, "manifest: write %d priv bytes\n", tplg->manifest.priv.size);
ret = twrite(tplg, tplg->manifest_pdata, tplg->manifest.priv.size);
}
return ret;
@@ -294,9 +294,9 @@ int tplg_write_data(snd_tplg_t *tplg)
size = calc_block_size(wptr->list);
if (size == 0)
continue;
- verbose(tplg, " block size for type %s (%d:%d) is %zd\n",
+ verbose(tplg, "block size for type %s (%d:%d) is 0x%zx/%zd\n",
wptr->name, wptr->type,
- wptr->tsoc, size);
+ wptr->tsoc, size, size);
ret = write_elem_block(tplg, wptr->list, size,
wptr->tsoc, wptr->name);
if (ret < 0) {
@@ -306,5 +306,7 @@ int tplg_write_data(snd_tplg_t *tplg)
}
}
+ verbose(tplg, "total size is 0x%zx/%zd\n", tplg->out_pos, tplg->out_pos);
+
return 0;
}
--
2.16.4