ASoC: SOF: Add support to parse pin binding array from topology

Add support for parsing sink/source pin binding array
per widget from topology. The pin binding arrays will
be used to determine the source and sink queue IDs during
widget binding for widget that requires special pin binding.

An example of widget that requires special pin binding is
the smart amplifier widget, its feedback sink pin has to be
connected to a capture DAI copier for codec feedback, while
the other sink pin has to be connected to a host DAI copier.
Pin ID is required during widget binding for correct route setup.

Conversely, the pin ID for 'generic' pins is not defined in the
topology and will be allocated by the kernel dynamically. When
only one pin is supported, the pin ID shall always be zero. When
more than one pin is supported, the pin ID is determined with the
ID allocation mechanism in the kernel.

Signed-off-by: Chao Song <chao.song@linux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Suggested-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Rander Wang <rander.wang@intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://lore.kernel.org/r/20221107085706.2550-3-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
Chao Song
2022-11-07 10:57:05 +02:00
committed by Mark Brown
parent 6327c7297f
commit 3b3acedbd0
3 changed files with 163 additions and 4 deletions

View File

@@ -90,6 +90,13 @@
#define SOF_TKN_COMP_NUM_AUDIO_FORMATS 410
#define SOF_TKN_COMP_NUM_SINK_PINS 411
#define SOF_TKN_COMP_NUM_SOURCE_PINS 412
/*
* The token for sink/source pin binding, it specifies the widget
* name that the sink/source pin is connected from/to.
*/
#define SOF_TKN_COMP_SINK_PIN_BINDING_WNAME 413
#define SOF_TKN_COMP_SRC_PIN_BINDING_WNAME 414
/* SSP */
#define SOF_TKN_INTEL_SSP_CLKS_CONTROL 500