summaryrefslogtreecommitdiff
path: root/sound/soc/sof/ipc4-topology.h
diff options
context:
space:
mode:
authorBard Liao <yung-chuan.liao@linux.intel.com>2022-06-14 12:26:30 +0300
committerMark Brown <broonie@kernel.org>2022-06-14 13:33:49 +0300
commita150345aa758492e05d2934f318ce7c2566b1cfe (patch)
tree50356d3889a929354eed4906310a701165621372 /sound/soc/sof/ipc4-topology.h
parent30ac49841386f933339817771ec315a34a4c0edd (diff)
downloadlinux-a150345aa758492e05d2934f318ce7c2566b1cfe.tar.xz
ASoC: SOF: ipc4-topology: add SoundWire/ALH aggregation support
Some SoundWire hardware topologies rely on different amplifiers or capture devices connected on different links. These devices need to be 'aggregated', remain synchronized and be handled as a single logical device. In the IPC3 solution, the aggregation for amplifiers was handled by a firmware 'demux' component. In the IPC4 solution, the demux component is not needed, the gateway component can handle multiple ALH/DMA transfers at the same time. This change makes the topology slightly more complicated in that only one ALH DAI will be connected in the topology with the gateway. The other DAIs that are part of the 'aggregated' dailink are not shown in the DAPM graph as connected to the gateway, but they will however be activated thanks to a feature in soc-dapm.c where events are forwarded to all DAIs in the dailink (see soc_dapm_stream_event). The topology also sets the same stream name for all widgets, dais and dailinks, so a search for the stream name helps identify cases where SoundWire/ALH aggregation is needed. Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Link: https://lore.kernel.org/r/20220614092630.20144-1-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/sof/ipc4-topology.h')
-rw-r--r--sound/soc/sof/ipc4-topology.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/sound/soc/sof/ipc4-topology.h b/sound/soc/sof/ipc4-topology.h
index 1a9c0627bae9..3bc2fe38c733 100644
--- a/sound/soc/sof/ipc4-topology.h
+++ b/sound/soc/sof/ipc4-topology.h
@@ -42,6 +42,17 @@
#define ALH_MAX_NUMBER_OF_GTW 16
+/*
+ * The base of multi-gateways. Multi-gateways addressing starts from
+ * ALH_MULTI_GTW_BASE and there are ALH_MULTI_GTW_COUNT multi-sources
+ * and ALH_MULTI_GTW_COUNT multi-sinks available.
+ * Addressing is continuous from ALH_MULTI_GTW_BASE to
+ * ALH_MULTI_GTW_BASE + ALH_MULTI_GTW_COUNT - 1.
+ */
+#define ALH_MULTI_GTW_BASE 0x50
+/* A magic number from FW */
+#define ALH_MULTI_GTW_COUNT 8
+
/**
* struct sof_ipc4_pipeline - pipeline config data
* @priority: Priority of this pipeline