Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Piotr Maziarz <piotrx.maziarz@linux.intel.com>
To: alsa-devel@alsa-project.org
Cc: cezary.rojewski@intel.com, amadeuszx.slawinski@intel.com
Subject: [PATCH alsa-lib 6/8] topology: decode: Print sig_bits field in PCM capabilities section
Date: Thu, 25 Jun 2020 13:03:44 +0200	[thread overview]
Message-ID: <1593083026-7501-6-git-send-email-piotrx.maziarz@linux.intel.com> (raw)
In-Reply-To: <1593083026-7501-1-git-send-email-piotrx.maziarz@linux.intel.com>

Not printing this field makes data loss while converting from binary
to UML.

Signed-off-by: Piotr Maziarz <piotrx.maziarz@linux.intel.com>
---
 src/topology/pcm.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/topology/pcm.c b/src/topology/pcm.c
index db40114..49c5eab 100644
--- a/src/topology/pcm.c
+++ b/src/topology/pcm.c
@@ -604,6 +604,9 @@ int tplg_save_stream_caps(snd_tplg_t *tplg ATTRIBUTE_UNUSED,
 	if (err >= 0 && sc->buffer_size_max)
 		err = tplg_save_printf(dst, pfx, "\tbuffer_size_max %u\n",
 				       sc->buffer_size_max);
+	if (err >= 0 && sc->sig_bits)
+		err = tplg_save_printf(dst, pfx, "\tsig_bits %u\n",
+				       sc->sig_bits);
 	if (err >= 0)
 		err = tplg_save_printf(dst, pfx, "}\n");
 	return err;
-- 
2.7.4


  parent reply	other threads:[~2020-06-25 12:09 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-25 11:03 [PATCH alsa-lib 1/8] topology: decode: fix channel map memory allocation Piotr Maziarz
2020-06-25 11:03 ` [PATCH alsa-lib 2/8] topology: decode: Fix adding texts field to enum control Piotr Maziarz
2020-06-25 14:24   ` Pierre-Louis Bossart
2020-06-25 11:03 ` [PATCH alsa-lib 3/8] topology: decode: Fix printing texts section Piotr Maziarz
2020-06-25 11:03 ` [PATCH alsa-lib 4/8] topology: decode: Change declaration of enum decoding function Piotr Maziarz
2020-06-25 11:03 ` [PATCH alsa-lib 5/8] topology: decode: Fix decoding PCM formats and rates Piotr Maziarz
2020-06-25 11:03 ` Piotr Maziarz [this message]
2020-06-25 11:03 ` [PATCH alsa-lib 7/8] topology: decode: Add DAI name printing Piotr Maziarz
2020-06-25 11:03 ` [PATCH alsa-lib 8/8] topology: Make buffer for saving dynamic size Piotr Maziarz
2020-06-25 14:31   ` Pierre-Louis Bossart
2020-07-02 15:04     ` Piotr Maziarz
2020-06-25 14:16 ` [PATCH alsa-lib 1/8] topology: decode: fix channel map memory allocation Pierre-Louis Bossart

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1593083026-7501-6-git-send-email-piotrx.maziarz@linux.intel.com \
    --to=piotrx.maziarz@linux.intel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=amadeuszx.slawinski@intel.com \
    --cc=cezary.rojewski@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox