All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
To: alsa-devel@alsa-project.org
Cc: =tiwai@suse.com,
	"Péter Ujfalusi" <peter.ujfalusi@linux.intel.com>,
	"Pierre-Louis Bossart" <pierre-louis.bossart@linux.intel.com>,
	"Ranjani Sridharan" <ranjani.sridharan@linux.intel.com>,
	broonie@kernel.org, "Bard Liao" <yung-chuan.liao@linux.intel.com>
Subject: [PATCH 01/18] ASoC: SOF: Introduce struct snd_sof_dai_link
Date: Mon, 14 Mar 2022 13:05:02 -0700	[thread overview]
Message-ID: <20220314200520.1233427-2-ranjani.sridharan@linux.intel.com> (raw)
In-Reply-To: <20220314200520.1233427-1-ranjani.sridharan@linux.intel.com>

Introduce a new struct for DAI links to save the DAI link information
parsed from topology. Also add a list of dai_links to struct snd_sof_dev
that will be populated during topology parsing.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
---
 sound/soc/sof/core.c      |  1 +
 sound/soc/sof/sof-audio.h | 21 ++++++++++++++++++++-
 sound/soc/sof/sof-priv.h  |  1 +
 3 files changed, 22 insertions(+), 1 deletion(-)

diff --git a/sound/soc/sof/core.c b/sound/soc/sof/core.c
index 9217644e2eab..e91631618bff 100644
--- a/sound/soc/sof/core.c
+++ b/sound/soc/sof/core.c
@@ -370,6 +370,7 @@ int snd_sof_device_probe(struct device *dev, struct snd_sof_pdata *plat_data)
 	INIT_LIST_HEAD(&sdev->kcontrol_list);
 	INIT_LIST_HEAD(&sdev->widget_list);
 	INIT_LIST_HEAD(&sdev->dai_list);
+	INIT_LIST_HEAD(&sdev->dai_link_list);
 	INIT_LIST_HEAD(&sdev->route_list);
 	INIT_LIST_HEAD(&sdev->ipc_client_list);
 	INIT_LIST_HEAD(&sdev->ipc_rx_handler_list);
diff --git a/sound/soc/sof/sof-audio.h b/sound/soc/sof/sof-audio.h
index 450ee9977c55..548d443e83b0 100644
--- a/sound/soc/sof/sof-audio.h
+++ b/sound/soc/sof/sof-audio.h
@@ -96,7 +96,26 @@ struct snd_sof_control {
 	bool comp_data_dirty;
 };
 
-struct snd_sof_widget;
+/** struct snd_sof_dai_link - DAI link info
+ * @tuples: array of parsed tuples
+ * @num_tuples: number of tuples in the tuples array
+ * @link: Pointer to snd_soc_dai_link
+ * @hw_configs: Pointer to hw configs in topology
+ * @num_hw_configs: Number of hw configs in topology
+ * @default_hw_cfg_id: Default hw config ID
+ * @type: DAI type
+ * @list: item in snd_sof_dev dai_link list
+ */
+struct snd_sof_dai_link {
+	struct snd_sof_tuple *tuples;
+	int num_tuples;
+	struct snd_soc_dai_link *link;
+	struct snd_soc_tplg_hw_config *hw_configs;
+	int num_hw_configs;
+	int default_hw_cfg_id;
+	int type;
+	struct list_head list;
+};
 
 /* ASoC SOF DAPM widget */
 struct snd_sof_widget {
diff --git a/sound/soc/sof/sof-priv.h b/sound/soc/sof/sof-priv.h
index ef5a2adae5c7..28d3f1ac8be8 100644
--- a/sound/soc/sof/sof-priv.h
+++ b/sound/soc/sof/sof-priv.h
@@ -441,6 +441,7 @@ struct snd_sof_dev {
 	struct list_head kcontrol_list;
 	struct list_head widget_list;
 	struct list_head dai_list;
+	struct list_head dai_link_list;
 	struct list_head route_list;
 	struct snd_soc_component *component;
 	u32 enabled_cores_mask; /* keep track of enabled cores */
-- 
2.25.1


  reply	other threads:[~2022-03-14 20:07 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-14 20:05 [PATCH 00/18] Introduce IPC abstraction for SOF topology parsing Ranjani Sridharan
2022-03-14 20:05 ` Ranjani Sridharan [this message]
2022-03-14 20:05 ` [PATCH] ASoC: SOF: IPC4-tooplogy: Add ccore tokens Ranjani Sridharan
2022-03-14 20:07   ` Ranjani Sridharan
2022-03-14 20:05 ` [PATCH 02/18] ASoC: SOF: IPC: Introduce IPC ops Ranjani Sridharan
2022-03-14 20:05 ` [PATCH 03/18] ASoC: SOF: topology: Add helper function for processing tuple arrays Ranjani Sridharan
2022-03-14 20:05 ` [PATCH 04/18] ASoC: SOF: Introduce IPC3 ops Ranjani Sridharan
2022-03-14 20:05 ` [PATCH 05/18] ASoC: SOF: topology: Make scheduler widget parsing IPC agnostic Ranjani Sridharan
2022-03-14 20:05 ` [PATCH 06/18] ASoC: SOF: topology: Make buffer " Ranjani Sridharan
2022-03-14 20:05 ` [PATCH 07/18] ASoC: SOF: topology: Make pga " Ranjani Sridharan
2022-03-14 20:05 ` [PATCH 08/18] ASoC: SOF: topology: Make mixer " Ranjani Sridharan
2022-03-14 20:05 ` [PATCH 09/18] ASoC: SOF: topology: Make mux/demux " Ranjani Sridharan
2022-03-14 20:05 ` [PATCH 10/18] ASoC: SOF: topology: Make src " Ranjani Sridharan
2022-03-14 20:05 ` [PATCH 11/18] ASoC: SOF: topology: Make asrc " Ranjani Sridharan
2022-03-14 20:05 ` [PATCH 12/18] ASoC: SOF: topology: Make siggen " Ranjani Sridharan
2022-03-14 20:05 ` [PATCH 13/18] ASoC: SOF: topology: Make effect " Ranjani Sridharan
2022-03-14 20:05 ` [PATCH 14/18] ASoC: SOF: topology: Make route setup " Ranjani Sridharan
2022-03-14 20:05 ` [PATCH 15/18] ASoC: SOF: topology: Make DAI widget parsing " Ranjani Sridharan
2022-03-14 20:05 ` [PATCH 16/18] ASoC: SOF: topology: Make control " Ranjani Sridharan
2022-03-14 20:05 ` [PATCH 17/18] ASoC: SOF: topology: Make widget binding " Ranjani Sridharan
2022-03-14 20:05 ` [PATCH 18/18] ASoC: SOF: topology: remove snd_sof_complete_pipeline() Ranjani Sridharan
2022-03-16 20:36 ` [PATCH 00/18] Introduce IPC abstraction for SOF topology parsing Mark Brown

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=20220314200520.1233427-2-ranjani.sridharan@linux.intel.com \
    --to=ranjani.sridharan@linux.intel.com \
    --cc==tiwai@suse.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=peter.ujfalusi@linux.intel.com \
    --cc=pierre-louis.bossart@linux.intel.com \
    --cc=yung-chuan.liao@linux.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.