History log of /linux-master/include/sound/soc-topology.h
Revision Date Author Comments
# 31e92739 27-Jan-2023 Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>

ASoC: topology: Use unload() op directly

struct snd_soc_dobj only needs pointer to the unload function, instead
however, there is pointer to all topology operations. Change code to use
the function pointer instead of pointer to structure containing all
operations.

Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Link: https://lore.kernel.org/r/20230127231111.937721-12-amadeuszx.slawinski@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>


# 1198ff12 25-Oct-2021 Mark Brown <broonie@kernel.org>

ASoC: topology: Fix stub for snd_soc_tplg_component_remove()

When removing the index argument from snd_soc_topology_component_remove()
commit a5b8f71c5477f (ASoC: topology: Remove multistep topology loading)
forgot to update the stub for !SND_SOC_TOPOLOGY use, causing build failures
for anything that tries to make use of it.

Fixes: a5b8f71c5477f (ASoC: topology: Remove multistep topology loading)
Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20211025154844.2342120-1-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>


# 415717e1 27-Sep-2021 Ranjani Sridharan <ranjani.sridharan@linux.intel.com>

ASoC: topology: change the complete op in snd_soc_tplg_ops to return int

In the SOF driver, the operations performed in the complete callback
can fail and therefore topology loading should return an error in
such cases. So, change the signature of the complete op
in struct snd_soc_tplg_ops to return an int to return the error.

Also, amend the complete callback functions in the SOF driver and
the SKL driver to conform with the new signature.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://lore.kernel.org/r/20210927120517.20505-2-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>


# d29d41e2 07-May-2021 Jaska Uimonen <jaska.uimonen@linux.intel.com>

ASoC: topology: Add support for multiple kcontrol types to a widget

Current dapm widget has a single variable to describe its kcontrol's
type. As there can be many kcontrols in one widget it is inherently
presumed that the types are the same.

Lately there has been use cases where different types of kcontrols would
be needed for a single widget. Thus add pointer to dapm widget to hold
an array for different kcontrol types and modify the kcontrol creation
to operate in a loop based on individual kcontrol type.

Change control creation and deletion to use individual kcontrol types in
SOF driver. This is done in the same patch for not breaking bisect. SOF
driver is also currently the only one using the dapm widget
kcontrol_type.

Signed-off-by: Jaska Uimonen <jaska.uimonen@linux.intel.com>
Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/20210507070246.404446-1-jaska.uimonen@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>


# a5b8f71c 30-Oct-2020 Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>

ASoC: topology: Remove multistep topology loading

In theory topology can be loaded in multiple steps by providing index to
snd_soc_tplg_component_load, however, from usability point of view it
doesn't make sense, as can be seen from all current users loading
topology in one go. Remove the unnecessary parameter.

Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://lore.kernel.org/r/20201030145427.3497990-3-amadeuszx.slawinski@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>


# 841fb109 30-Oct-2020 Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>

ASoC: topology: Remove unused functions from topology API

Topology API exposes snd_soc_tplg_widget_remove and
snd_soc_tplg_widget_remove_all, but both are nowhere used. All current
users load and unload topology as a whole. As following commits
introduce resource managed memory, remove them to simplify code and
reduce maintenance burden.

Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://lore.kernel.org/r/20201030145427.3497990-2-amadeuszx.slawinski@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>


# adfebb51 01-Feb-2019 Bard liao <yung-chuan.liao@linux.intel.com>

ASoC: topology: unload physical dai link in remove

soc_tplg_link_config() will find the physical dai link and call
soc_tplg_dai_link_load() to load the BE dai link. Currently remove_link()
is only used to remove the FE dai link which is created by the topology.
The BE dai link cannot however be unloaded in snd_soc_tplg_component
_remove(), which is problematic if anything needs to be released or
reinitialized.

This patch aligns the definitions of dynamic types with the existing
UAPI and adds a new remove_backend_link() routine to unload the the BE
dai link when snd_soc_tplg_component_remove() is invoked.

Signed-off-by: Bard liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>


# 5c30f43f 25-Jan-2019 Ranjani Sridharan <ranjani.sridharan@linux.intel.com>

ASoC: topology: add SND_SOC_DOBJ_GRAPH type for dapm routes

Add a new dobj type SND_SOC_DOBJ_GRAPH for dapm routes
and add snd_soc_dobj member to struct snd_soc_dapm_route.
This enables device drivers to save driver specific
data pertaining to dapm routes and also be able
to clean up the data when the driver module is unloaded.

Also, reorder the snd_soc_dobj_type types to align with
matching topology header types.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>


# f2b6a1b2 02-Jul-2018 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

ASoC: soc-topology: convert to SPDX identifiers

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>


# 503e79b7 14-Jun-2018 Liam Girdwood <liam.r.girdwood@linux.intel.com>

ASoC: topology: Add callback for DAPM route load/unload

Add a callback fro clients for notification about DAPM route loading and
unloading.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>


# c60b613a 14-Jun-2018 Liam Girdwood <liam.r.girdwood@linux.intel.com>

ASoC: topology: Give more data to clients via callbacks

Give topology clients more access to the topology data by passing index,
pcm, link_config and dai_driver to clients. This allows clients to fully
instantiate and track topology objects.

The SOF driver is the first user of these new APIs and needs them to build
component topology driver and FW objects.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>


# 24ada035 18-Apr-2018 Mark Brown <broonie@kernel.org>

ASoC: topology: Fix build errors

The two commits:

81e9b0a07889 ASoC: topology: Give more data to clients via callbacks
28aa6f7779f7 ASoC: topology: Add callback for DAPM route load/unload

break the build so revert them.

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Mark Brown <broonie@kernel.org>


# 28aa6f77 27-Mar-2018 Liam Girdwood <liam.r.girdwood@linux.intel.com>

ASoC: topology: Add callback for DAPM route load/unload

Add a callback fro clients for notification about DAPM route loading and
unloading.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>


# 81e9b0a0 27-Mar-2018 Liam Girdwood <liam.r.girdwood@linux.intel.com>

ASoC: topology: Give more data to clients via callbacks

Give topology clients more access to the topology data by passing index,
pcm, link_config and dai_driver to clients. This allows clients to fully
instantiate and track topology objects.

The SOF driver is the first user of these new APIs and needs them to build
component topology driver and FW objects.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>


# ebd259d3 09-Jun-2017 Liam Girdwood <liam.r.girdwood@linux.intel.com>

ASoC: topology: Allow bespoke configuration post widget creation

Current topology only allows for widget configuration before the widget
is registered. This patch also allows further configuration and usage
after registration is complete.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>


# 294de6e3 06-Jun-2017 Liam Girdwood <liam.r.girdwood@linux.intel.com>

ASoC: topology: Fix potential build issues with undeclared structs

We should be declaring snd_kcontrol_new and soc_dai_link as both are
used within this header so need to be declared.

[Reworded commit message to indicate this wasn't an immediate build
failure -- broonie]

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>


# eea3dd4f 25-Nov-2016 Mengdong Lin <mengdong.lin@linux.intel.com>

ASoC: topology: Only free TLV for volume mixers of a widget

This patch will check the type of embedded controls for a widget, and
only free the TLV of volume mixers. Bytes controls don't have TLV.

Just free the private value which is used as struct soc_mixer_control
for volume mixers or soc_bytes_ext for bytes controls. No need to cast
to these types before freeing it.

Signed-off-by: Mengdong Lin <mengdong.lin@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>


# acfc7d46 15-Jan-2016 Mengdong Lin <mengdong.lin@linux.intel.com>

ASoC: topology: Add FE DAI links dynamically

Topology will also create FE DAI links dynamically from the PCM
objects. These links will be removed when the component is removed
and its topology info is unloaded.

The component driver can implement link_load/unload ops for extra
intialization (e.g. error check) and destruction.

Signed-off-by: Mengdong Lin <mengdong.lin@linux.intel.com>
Acked-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>


# 64527e8a 15-Jan-2016 Mengdong Lin <mengdong.lin@linux.intel.com>

ASoC: topology: Add FE DAIs dynamically

Topology will create FE DAIs dynamically from the PCM objects,
and register them to the component.

A PCM topoplogy object describes a FE DAI and DAI link. Later
patch will add FE DAI links as well.

Change tplg load ops for DAI:
- Only process a DAI.
- Pass the DAI driver pointer to the component driver for
extra initialization.

Signed-off-by: Mengdong Lin <mengdong.lin@linux.intel.com>
Acked-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>


# a1e5e7e9 09-Nov-2015 Mythri P K <mythri.p.k@intel.com>

ASoC: core: Pass kcontrol to bytes tlv callbacks

Add kcontrol to the tlv callbacks in soc_bytes_ext, as it is
needed for referencing the corresponding control in the driver
code

Also fix the only upstream user in topology core

Signed-off-by: Mythri P K <mythri.p.k@intel.com>
Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>


# 1a3232d2 18-Aug-2015 Mengdong Lin <mengdong.lin@intel.com>

ASoC: topology: Add support for TLV bytes controls

Allow vendor drivers to define bespoke bytes ext handlers and IDs for
TLV bytes controls. And the topology core will bind these handlers by
matching IDs defined by the vendor driver and user space topology
data file.

And TLV callback binding is moved to soc_tplg_kcontrol_bind_io(). This
function process all handler binding now.

Signed-off-by: Mengdong Lin <mengdong.lin@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>


# 88a17d8f 18-Aug-2015 Mengdong Lin <mengdong.lin@intel.com>

ASoC: topology: Bind vendor specific kcontrol handlers before standard ones

Vendor specific handlers should override standard handlers. So we can
handle things in the order from specific to generic.

Signed-off-by: Mengdong Lin <mengdong.lin@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>


# 78b50f39 15-Aug-2015 Mark Brown <broonie@kernel.org>

ASoC: topology: Add Kconfig option for topology

Allow the topology code to be compiled out so that users who don't need
topology don't need to havve the code compiled in, saving them some
memory.

Some more configuration could be added to remove some of the hooks into
the core data structures but that is probably best done with some
refactoring to use functions to do the updates of the data structures
rather than ifdefing in the code as we'd need to do at the minute.

Suggested-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@kernel.org>


# 8a978234 29-May-2015 Liam Girdwood <liam.r.girdwood@linux.intel.com>

ASoC: topology: Add topology core

The topology core parses the FW topology file for known block types and
instanciates any common ALSA/ASoC objects that it discovers. The core
also passes any block that is does not understand to client component
drivers for enumeration.

The core exports some APIs to client drivers in order to load and unload
firmware topology data as use case require.

Currently the core deals with the following object types :-

o kcontrols. This includes TLV, enumerated and bytes controls.
o DAPM widgets. All types with any associated kcontrol.
o DAPM graph.
o FE PCM. FE PCM capabilities and configuration can be defined.
o BE DAI Link. BE DAI link capabilities and configuration can be defined.
o Codec <-> codec style links capabilities and configuration.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>