alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] topology: add support to parse private data for pcm
@ 2019-08-01  9:15 Keyon Jie
  2019-08-06 10:51 ` Takashi Iwai
  0 siblings, 1 reply; 2+ messages in thread
From: Keyon Jie @ 2019-08-01  9:15 UTC (permalink / raw)
  To: alsa-devel; +Cc: Keyon Jie, lgirdwood

We have private data section in struct snd_soc_tplg_pcm, but alsatplg
doesn't support handling it yet, here add handling in tplg_parse_pcm()
to enable it.

Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
---
 src/topology/data.c | 3 +++
 src/topology/pcm.c  | 8 ++++++++
 2 files changed, 11 insertions(+)

diff --git a/src/topology/data.c b/src/topology/data.c
index b3f4421f..729ce1f4 100644
--- a/src/topology/data.c
+++ b/src/topology/data.c
@@ -53,6 +53,9 @@ struct snd_soc_tplg_private *get_priv_data(struct tplg_elem *elem)
 	case SND_TPLG_TYPE_BE:
 		priv = &elem->link->priv;
 		break;
+	case SND_TPLG_TYPE_PCM:
+		priv = &elem->pcm->priv;
+		break;
 	default:
 		SNDERR("error: '%s': no support for private data for type %d\n",
 			elem->id, elem->type);
diff --git a/src/topology/pcm.c b/src/topology/pcm.c
index 5f586dc1..c533ee68 100644
--- a/src/topology/pcm.c
+++ b/src/topology/pcm.c
@@ -732,6 +732,14 @@ int tplg_parse_pcm(snd_tplg_t *tplg,
 				return err;
 			continue;
 		}
+
+		/* private data */
+		if (strcmp(id, "data") == 0) {
+			err = tplg_parse_data_refs(n, elem);
+			if (err < 0)
+				return err;
+			continue;
+		}
 	}
 
 	return 0;
-- 
2.20.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] topology: add support to parse private data for pcm
  2019-08-01  9:15 [PATCH] topology: add support to parse private data for pcm Keyon Jie
@ 2019-08-06 10:51 ` Takashi Iwai
  0 siblings, 0 replies; 2+ messages in thread
From: Takashi Iwai @ 2019-08-06 10:51 UTC (permalink / raw)
  To: Keyon Jie; +Cc: alsa-devel, lgirdwood

On Thu, 01 Aug 2019 11:15:06 +0200,
Keyon Jie wrote:
> 
> We have private data section in struct snd_soc_tplg_pcm, but alsatplg
> doesn't support handling it yet, here add handling in tplg_parse_pcm()
> to enable it.
> 
> Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>

Applied, thanks.


Takashi

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-08-06 10:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-08-01  9:15 [PATCH] topology: add support to parse private data for pcm Keyon Jie
2019-08-06 10:51 ` Takashi Iwai

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).