[PATCH alsa-lib 7/8] topology: decode: Add DAI name printing
Piotr Maziarz
piotrx.maziarz at linux.intel.com
Thu Jun 25 13:03:45 CEST 2020
DAI name is a part of topology binary. Not printing makes data loss while
converting from binary to UML.
Signed-off-by: Piotr Maziarz <piotrx.maziarz at linux.intel.com>
---
src/topology/pcm.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/topology/pcm.c b/src/topology/pcm.c
index 49c5eab..5a54e15 100644
--- a/src/topology/pcm.c
+++ b/src/topology/pcm.c
@@ -781,7 +781,9 @@ int tplg_save_fe_dai(snd_tplg_t *tplg ATTRIBUTE_UNUSED,
struct snd_soc_tplg_pcm *pcm = elem->pcm;
int err = 0;
- if (pcm->dai_id > 0)
+ if (strlen(pcm->dai_name))
+ err = tplg_save_printf(dst, pfx, "dai.'%s'.id %u\n", pcm->dai_name, pcm->dai_id);
+ else if (pcm->dai_id > 0)
err = tplg_save_printf(dst, pfx, "dai.0.id %u\n", pcm->dai_id);
return err;
}
--
2.7.4
More information about the Alsa-devel
mailing list