Ranjani Sridharan
31cd6e4693
ASoC: SOF: topology: Add ops for setting up and tearing down pipelines
...
Introduce two new ops, set_up_all_pipelines and tear_down_all_pipelines
in struct ipc_tplg_ops and define these for IPC3.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com >
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com >
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com >
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com >
Link: https://lore.kernel.org/r/20220317175044.1752400-19-ranjani.sridharan@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2022-03-18 16:04:52 +00:00
Yihao Han
b26f965f7c
ASoC: SOF: topology: Use kmemdup() to replace kzalloc + memcpy
...
fix memdup.cocci warning:
sound/soc/sof/topology.c:876:19-26: WARNING opportunity for kmemdup
Generated by: scripts/coccinelle/api/memdup.cocci
Signed-off-by: Yihao Han <hanyihao@vivo.com >
Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com >
Link: https://lore.kernel.org/r/20220317093841.3414-1-hanyihao@vivo.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2022-03-17 17:56:33 +00:00
Ranjani Sridharan
61ad28ff6c
ASoC: SOF: topology: remove snd_sof_complete_pipeline()
...
Add a new topology IPC op, pipeline_complete in struct ipc_tplg_ops
and set the op for IPC3. Replace the calls to
snd_sof_complete_pipeline() with the calls to the topology IPC
pipeline_complete op.
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 >
Link: https://lore.kernel.org/r/20220314200520.1233427-20-ranjani.sridharan@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2022-03-16 16:39:14 +00:00
Ranjani Sridharan
8ef1439c51
ASoC: SOF: topology: Make widget binding IPC agnostic
...
Make widget binding in the topology parser IPC agnostic by introducing a
new op, bind_event, in struct ipc_tplg_widget_ops. Also set the op
for all widget types in the IPC3 topology ops.
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 >
Link: https://lore.kernel.org/r/20220314200520.1233427-19-ranjani.sridharan@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2022-03-16 16:39:12 +00:00
Ranjani Sridharan
b5cee8feb1
ASoC: SOF: topology: Make control parsing IPC agnostic
...
Make the control parser in topology IPC agnostic by introducing 2 new
topology IPC ops, control_setup and control_free. These ops handle
setting up/freeing the control data in the IPC format based on the IPC
version.
Along with this, modify the struct snd_sof_control to remove the
IPC-specific field, control_data and replace it with the void pointer to
ipc_control_data. Also, add a few new fields to store all the
information parsed from topology.
Finally, define and set the control setup/free ops for IPC3.
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 >
Link: https://lore.kernel.org/r/20220314200520.1233427-18-ranjani.sridharan@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2022-03-16 16:39:11 +00:00
Ranjani Sridharan
909dadf21a
ASoC: SOF: topology: Make DAI widget parsing IPC agnostic
...
Define the list of tokens pertaining to the dai_in/out widgets, parse and
save them as part of the swidget tuples array. Once topology parsing is
complete, these tokens will be applied to create the IPC structure for the
DAI component based on the topology widget_setup op in ipc3_tplg_ops.
DAI link parsing is also made IPC agnostic by parsing the list of tokens
associated with all DAI types. The config will be applied to the
respective DAI widgets during topology complete.
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 >
Link: https://lore.kernel.org/r/20220314200520.1233427-17-ranjani.sridharan@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2022-03-16 16:39:10 +00:00
Ranjani Sridharan
f2cf24a1af
ASoC: SOF: topology: Make effect widget parsing IPC agnostic
...
Define the list of tokens pertaining to effect type widgets, parse and
save them as part of the swidget tuples array. Once topology parsing is
complete, these tokens will be applied to create the IPC structure for the
process component based on the topology widget_setup op in ipc3_tplg_ops.
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 >
Link: https://lore.kernel.org/r/20220314200520.1233427-15-ranjani.sridharan@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2022-03-16 16:39:08 +00:00
Ranjani Sridharan
111d66f62e
ASoC: SOF: topology: Make siggen widget parsing IPC agnostic
...
Define the list of tokens pertaining to the siggen widgets, parse and
save them as part of the swidget tuples array. Once topology parsing is
complete, these tokens will be applied to create the IPC structure for the
tone component based on the topology widget_setup op in ipc3_tplg_ops.
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 >
Link: https://lore.kernel.org/r/20220314200520.1233427-14-ranjani.sridharan@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2022-03-16 16:39:06 +00:00
Ranjani Sridharan
cb7ed49acf
ASoC: SOF: topology: Make asrc widget parsing IPC agnostic
...
Define the list of tokens pertaining to the asrc widgets, parse and
save them as part of the swidget tuples array. Once topology parsing is
complete, these tokens will be applied to create the IPC structure for the
asrc component based on the topology widget_setup op in ipc3_tplg_ops.
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 >
Link: https://lore.kernel.org/r/20220314200520.1233427-13-ranjani.sridharan@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2022-03-16 16:39:05 +00:00
Ranjani Sridharan
8d8b129347
ASoC: SOF: topology: Make src widget parsing IPC agnostic
...
Define the list of tokens pertaining to the src widgets, parse and
save them as part of the swidget tuples array. Once topology parsing is
complete, these tokens will be applied to create the IPC structure for the
src component based on the topology widget_setup op in ipc3_tplg_ops.
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 >
Link: https://lore.kernel.org/r/20220314200520.1233427-12-ranjani.sridharan@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2022-03-16 16:39:04 +00:00
Ranjani Sridharan
683b54ef60
ASoC: SOF: topology: Make mux/demux widget parsing IPC agnostic
...
Define the list of tokens pertaining to the mux/demux widgets, parse and
save them as part of the swidget tuples array. Once topology parsing is
complete, these tokens will be applied to create the IPC structure for the
mux/demux component based on the topology widget_setup op in ipc3_tplg_ops.
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 >
Link: https://lore.kernel.org/r/20220314200520.1233427-11-ranjani.sridharan@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2022-03-16 16:39:03 +00:00
Ranjani Sridharan
30f4168024
ASoC: SOF: topology: Make mixer widget parsing IPC agnostic
...
Define the list of tokens pertaining to the mixer widgets, parse and
save them as part of the swidget tuples array. Once topology parsing is
complete, these tokens will be applied to create the IPC structure for the
mixer component based on the topology widget_setup op in ipc3_tplg_ops.
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 >
Link: https://lore.kernel.org/r/20220314200520.1233427-10-ranjani.sridharan@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2022-03-16 16:39:02 +00:00
Ranjani Sridharan
8a2e4a734f
ASoC: SOF: topology: Make pga widget parsing IPC agnostic
...
Define the list of tokens pertaining to the pga type widgets, parse and
save them as part of the swidget tuples array. Once topology parsing is
complete, these tokens will be applied to create the IPC structure for the
pga component based on the topology widget_setup op in ipc3_tplg_ops.
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 >
Link: https://lore.kernel.org/r/20220314200520.1233427-9-ranjani.sridharan@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2022-03-16 16:39:01 +00:00
Ranjani Sridharan
6bd0be1c29
ASoC: SOF: topology: Make buffer widget parsing IPC agnostic
...
Define the list of tokens pertaining to the buffer widgets, parse and
save them as part of the swidget tuples array. Once topology parsing is
complete, these tokens will be applied to create the IPC structure for the
buffer component based on the topology widget_setup op in ipc3_tplg_ops.
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 >
Link: https://lore.kernel.org/r/20220314200520.1233427-8-ranjani.sridharan@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2022-03-16 16:39:00 +00:00
Ranjani Sridharan
2141b55d91
ASoC: SOF: topology: Make scheduler widget parsing IPC agnostic
...
Define the list of tokens pertaining to the scheduler widgets, parse and
save them as part of the swidget tuples array. Once topology parsing is
complete, these tokens will be applied to create the IPC structure for the
pipeline component based on the topology widget_setup op in ipc3_tplg_ops.
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 >
Link: https://lore.kernel.org/r/20220314200520.1233427-7-ranjani.sridharan@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2022-03-16 16:38:59 +00:00
Ranjani Sridharan
7006d20e5e
ASoC: SOF: Introduce IPC3 ops
...
Add the IPC ops including the topology-related IPC ops for the current
version (IPC3, named after the current SOF firmware ABI major version 3.0)
of IPC supported by the SOF firmware and set it as default. The topology
IPC ops and the widget ops within the topology IPC ops are both
mandatory.
With the introduction of IPC3 ops, we define the list of tokens pertaining
to the AIF_IN/AIF_OUT widgets. Then these tokens are parsed during
topology parsing and saved as part of the swidget tuples array. Once
topology parsing is complete, these tokens will be applied to create the
IPC structure for the host component based on the topology widget_setup
op in ipc3_tplg_ops.
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 >
Link: https://lore.kernel.org/r/20220314200520.1233427-6-ranjani.sridharan@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2022-03-16 16:38:58 +00:00
Ranjani Sridharan
d87524bf9a
ASoC: SOF: topology: Add helper function for processing tuple arrays
...
Add a helper function for processing tuple arrays and populating the
IPC structure objects based on the token ID passed.
Introduce a new enum representing token ID for the tokens
currently used in the topology parse and a new struct sof_token_info
to store the information about a token set. Finally, expose the struct
snd_sof_topology token as it will be used by IPC-specific code.
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 >
Link: https://lore.kernel.org/r/20220314200520.1233427-5-ranjani.sridharan@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2022-03-16 16:38:56 +00:00
Ranjani Sridharan
839e484f9e
ASoC: SOF: make struct snd_sof_dai IPC agnostic
...
Remove the comp_dai and dai_config members of struct snd_sof_dai and
replace it with a void *private field. Introduce a new struct
sof_dai_private_data that will contain the pointer to these two fields.
The topology parser will populate this structure and save it as part of
the "private" member in snd_sof_dai. Change all users of these fields to
use the private member instead.
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 >
Link: https://lore.kernel.org/r/20220308164344.577647-18-ranjani.sridharan@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2022-03-09 13:30:09 +00:00
Ranjani Sridharan
5f8333f62f
ASoC: SOF: topology: Rename arguments in sof_parse_tokens()
...
Rename the count and priv_size arguments in sof_parse_tokens() and add
comments to clarify the arguments.
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 >
Link: https://lore.kernel.org/r/20220308164344.577647-17-ranjani.sridharan@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2022-03-09 13:30:08 +00:00
Ranjani Sridharan
e0974a382e
ASoC: SOF: topology: Rename arguments in sof_parse_token_sets()
...
Rename the priv_size arg to array_size and clarify the arguments in the
comments.
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 >
Link: https://lore.kernel.org/r/20220308164344.577647-16-ranjani.sridharan@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2022-03-09 13:30:07 +00:00
Ranjani Sridharan
38a9a06794
ASoC: SOF: topology: Modify signature for token parsing functions
...
Modify the signature for sof_parse_uuid_tokens(),
sof_parse_word_tokens() and sof_parse_string_tokens() to reorder the
arguments to be more intuitive and rename the count arg to num_tokens.
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 >
Link: https://lore.kernel.org/r/20220308164344.577647-15-ranjani.sridharan@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2022-03-09 13:30:06 +00:00
Ranjani Sridharan
2b4b383f85
ASoC: SOF: topology: make sof_route_load() IPC agnostic
...
The IPC structure can be set up using the fields in struct snd_sof_route
when the pipeline connections are established.
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 >
Link: https://lore.kernel.org/r/20220308164344.577647-13-ranjani.sridharan@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2022-03-09 13:30:03 +00:00
Ranjani Sridharan
7a976552a4
ASoC: SOF: make struct snd_sof_widget IPC agnostic
...
Parse the UUID token and save it in the new uuid field in struct
snd_sof_widget. struct sof_ipc_comp_ext is no longer needed. So remove
it too.
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 >
Link: https://lore.kernel.org/r/20220308164344.577647-12-ranjani.sridharan@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2022-03-09 13:30:02 +00:00
Ranjani Sridharan
40bdb2fd6b
ASoC: SOF: change comp_dai to a pointer in struct snd_sof_dai
...
This will avoid having to add the extended data for DAI components during
sof_widget_setup() as an extra step.
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 >
Link: https://lore.kernel.org/r/20220307181111.49392-11-ranjani.sridharan@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2022-03-08 12:27:49 +00:00
Ranjani Sridharan
ea7e5ee67f
ASoC: SOF: topology: expose some get_token ops
...
These will be used later on by IPC-specific code.
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 >
Link: https://lore.kernel.org/r/20220307181111.49392-10-ranjani.sridharan@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2022-03-08 12:27:48 +00:00
Ranjani Sridharan
5ef969e2f8
ASoC: SOF: topology: Modify the get_token op for string tokens
...
Modify the get_token op for string type tokens to pass the string as the
argument instead of a pointer to struct snd_soc_tplg_vendor_string_elem.
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 >
Link: https://lore.kernel.org/r/20220307181111.49392-9-ranjani.sridharan@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2022-03-08 12:27:46 +00:00
Ranjani Sridharan
6a6b5727f8
ASoC: SOF: topology: Drop the size parameter from struct sof_topology_token
...
It is always 0 and never used while 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 >
Link: https://lore.kernel.org/r/20220307181111.49392-8-ranjani.sridharan@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2022-03-08 12:27:45 +00:00
Ranjani Sridharan
9911ce06db
ASoC: SOF: topology: remove redundant code in sof_link_afe_load()
...
Looks like a copy-paste error. The CPU DAI is never used.
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 >
Link: https://lore.kernel.org/r/20220307181111.49392-7-ranjani.sridharan@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2022-03-08 12:27:44 +00:00
Ranjani Sridharan
fb763299bd
ASoC: SOF: topology: remove redundant code
...
With the change in the commit:
"ASoC: SOF: Intel: hda: assign link DMA channel at run-time",
there is no need to find the CPU DAI in sof_link_hda_load().
Fixes: bdf4ad3fd0 ('ASoC: SOF: Intel: hda: assign link DMA channel at
run-time')
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 >
Link: https://lore.kernel.org/r/20220307181111.49392-6-ranjani.sridharan@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2022-03-08 12:27:43 +00:00
Ranjani Sridharan
3a790f3a7c
ASoC: SOF: set swidget's core for scheduler widget
...
Set the swidget's core for scheduler type widgets to match that of the
pipeline core. This simplifies the flow for core get/put during widget
setup/free.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com >
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com >
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com >
Link: https://lore.kernel.org/r/20220307181111.49392-4-ranjani.sridharan@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2022-03-08 12:27:41 +00:00
Stephen Kitt
4fe6a63077
ASoC: SOF: Replace zero-length array with flexible-array member
...
There is a regular need in the kernel to provide a way to declare having
a dynamically sized set of trailing elements in a structure. Kernel code
should always use "flexible array members"[1] for these cases. The older
style of one-element or zero-length arrays should no longer be used[2].
This helps with the ongoing efforts to globally enable -Warray-bounds
and get us closer to being able to tighten the FORTIFY_SOURCE routines
on memcpy().
[1] https://en.wikipedia.org/wiki/Flexible_array_member
[2] https://www.kernel.org/doc/html/latest/process/deprecated.html#zero-length-and-one-element-arrays
Link: https://github.com/KSPP/linux/issues/78
Link: https://github.com/KSPP/linux/issues/180
Suggested-by: Gustavo A. R. Silva <gustavoars@kernel.org >
Signed-off-by: Stephen Kitt <steve@sk2.org >
Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com >
Reviewed-by: Gustavo A. R. Silva <gustavoars@kernel.org >
Link: https://lore.kernel.org/r/20220217132755.1786130-1-steve@sk2.org
Signed-off-by: Mark Brown <broonie@kernel.org >
2022-02-17 17:13:36 +00:00
Peter Ujfalusi
12b401f4de
ASoC: SOF: Use sof_debug_check_flag() instead of sof_core_debug directly
...
The sof_debug_check_flag() is available for checking flags set in
sof_core_debug.
sof_core_debug can be marked static in core.c
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com >
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com >
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com >
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com >
Link: https://lore.kernel.org/r/20211223113628.18582-5-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2021-12-23 13:38:12 +00:00
Peter Ujfalusi
dd2fef982f
ASoC: SOF: sof-audio: Drop the cmd member from struct snd_sof_control
...
There is no need to use two variables to store and check the same
information, the scontrol->cmd is the same as scontrol->control_data->cmd.
Drop the former one and when it is needed, access the cmd from the
control_data.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com >
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com >
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com >
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com >
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com >
Link: https://lore.kernel.org/r/20211215180404.53254-6-ranjani.sridharan@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2021-12-15 22:16:44 +00:00
Peter Ujfalusi
8af783723f
ASoC: SOF: topology: Set control_data->cmd alongside scontrol->cmd
...
Set the scontrol->control_data->cmd early to the same as scontrol->cmd.
This is a preparatory patch to remove the ctrl_cmd parameter for the
snd_sof_ipc_set_get_comp_data() function.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com >
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com >
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com >
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com >
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com >
Link: https://lore.kernel.org/r/20211215180404.53254-4-ranjani.sridharan@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2021-12-15 22:16:42 +00:00
Pierre-Louis Bossart
fb71d03b29
ASoC: SOF: topology: don't use list_for_each_entry_reverse()
...
It's not clear why we would walk the list backwards. That makes no
difference.
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com >
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com >
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com >
Link: https://lore.kernel.org/r/20211123171606.129350-2-kai.vehmanen@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2021-11-24 12:57:24 +00:00
Ranjani Sridharan
9ea807488c
ASoC: SOF: add support for dynamic pipelines with multi-core
...
This patch adds support for dynamic pipelines with multi-core
by using the platform-specific core_get/put() ops to
power up/down a core when a widget is set up/freed.
Along with this, a few redundant functions are removed:
1. sof_pipeline_core_enable() is no longer needed as the
pipeline core will be set up when the pipeline widget
is set up
2. sof_core_enable() is replaced with snd_sof_core_get()
4. core_power_up/down() DSP ops are deprecated and replaced with
core get/put ops.
5. Core power down in sof_widget_unload() during topology
removal is also removed as it is not really needed. For dynamic
pipelines, the cores will be powered off when they are not used.
For static pipelines, the cores will be powered off in the device
remove callback.
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 >
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com >
Link: https://lore.kernel.org/r/20211119192621.4096077-10-kai.vehmanen@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2021-11-22 15:40:23 +00:00
Ranjani Sridharan
7cc7b9ba21
ASoC: SOF: topology: remove sof_load_pipeline_ipc()
...
Remove the function sof_load_pipeline_ipc() and directly
send the IPC instead. The pipeline core is already enabled
with the call to sof_pipeline_core_enable() in sof_widget_setup().
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 >
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com >
Link: https://lore.kernel.org/r/20211119192621.4096077-7-kai.vehmanen@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2021-11-22 15:40:20 +00:00
YC Hung
b72bfcffcf
ASoC: SOF: topology: Add support for Mediatek AFE DAI
...
Add new sof dai and config to pass topology file configuration
to SOF firmware running on Mediatek platform DSP core.
Add mediatek audio front end(AFE) to the list of supported sof_dais
Signed-off-by: YC Hung <yc.hung@mediatek.com >
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com >
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com >
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com >
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com >
Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com >
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com >
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com >
Link: https://lore.kernel.org/r/20211118100749.54628-4-daniel.baluta@oss.nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2021-11-18 13:57:37 +00:00
Ajit Kumar Pandey
efb931cdc4
ASoC: SOF: topology: Add support for AMD ACP DAIs
...
Add new sof dais and config to pass topology file configuration
to SOF firmware running on ACP's DSP core. ACP firmware support
I2S_BT, I2S_SP and DMIC controller hence add three new dais to
the list of supported sof_dais
Signed-off-by: Ajit Kumar Pandey <AjitKumar.Pandey@amd.com >
Reviewed-by: Bard Liao <bard.liao@intel.com >
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com >
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com >
Link: https://lore.kernel.org/r/20211117093734.17407-12-daniel.baluta@oss.nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2021-11-17 17:35:54 +00:00
Mark Brown
99f11b6552
Merge series "Introduce new SOF helpers" from Daniel Baluta <daniel.baluta@oss.nxp.com>
...
Daniel Baluta <daniel.baluta@nxp.com >:
From: Daniel Baluta <daniel.baluta@nxp.com >
This patchseries adds new helpers in order to reduce code duplication
and prepare for compress audio support with SOF.
Bud Liviu-Alexandru (1):
ASoC: SOF: Make Intel IPC stream ops generic
Daniel Baluta (3):
ASoC: SOF: Introduce snd_sof_mailbox_read / snd_sof_mailbox_write
callbacks
ASoC: SOF: imx: Use newly introduced generic IPC stream ops
ASoC: SOF: Introduce fragment elapsed notification API
sound/soc/sof/Kconfig | 4 ++
sound/soc/sof/Makefile | 3 +-
sound/soc/sof/compress.c | 51 +++++++++++++++++++
sound/soc/sof/imx/Kconfig | 2 +
sound/soc/sof/imx/imx8.c | 39 +++++++-------
sound/soc/sof/imx/imx8m.c | 26 ++++------
sound/soc/sof/intel/Makefile | 3 --
sound/soc/sof/intel/apl.c | 4 ++
sound/soc/sof/intel/bdw.c | 12 +++--
sound/soc/sof/intel/byt.c | 24 ++++++---
sound/soc/sof/intel/cnl.c | 4 ++
sound/soc/sof/intel/icl.c | 4 ++
sound/soc/sof/intel/pci-tng.c | 12 +++--
sound/soc/sof/intel/tgl.c | 4 ++
sound/soc/sof/ipc.c | 6 ++-
sound/soc/sof/ops.h | 15 ++++++
sound/soc/sof/pcm.c | 7 ++-
sound/soc/sof/sof-audio.h | 11 +++-
sound/soc/sof/sof-priv.h | 28 ++++++----
.../sof/{intel/intel-ipc.c => stream-ipc.c} | 50 +++++++++---------
sound/soc/sof/topology.c | 6 ++-
21 files changed, 218 insertions(+), 97 deletions(-)
create mode 100644 sound/soc/sof/compress.c
rename sound/soc/sof/{intel/intel-ipc.c => stream-ipc.c} (58%)
--
2.27.0
2021-10-07 22:24:58 +01:00
Mark Brown
1cfd7c2ee9
Merge series "ASoC: SOF: Improvements for debugging" from Peter Ujfalusi <peter.ujfalusi@linux.intel.com>:
...
Hi,
The aim of this series is to clean up, make it easier to interpret and less
'chatty' prints aimed for debugging errors.
For example currently the DSP/IPC dump is printed every time we have an IPC
timeout and it is posible to lost the first and more indicative dump to find the
rootcause.
Regards,
Peter
---
Peter Ujfalusi (18):
ASoC: SOF: debug: Swap the dsp_dump and ipc_dump sequence for
fw_exception
ASoC: SOF: ipc and dsp dump: Add markers for better visibility
ASoC: SOF: Print the dbg_dump and ipc_dump once to reduce kernel log
noise
ASoC: SOF: loader: Print the DSP dump if boot fails
ASoC: SOF: intel: atom: No need to do a DSP dump in atom_run()
ASoC: SOF: debug/ops: Move the IPC and DSP dump functions out from the
header
ASoC: SOF: debug: Add SOF_DBG_DUMP_OPTIONAL flag for DSP dumping
ASoC: SOF: intel: hda-loader: Use snd_sof_dsp_dbg_dump() for DSP dump
ASoC: SOF: Drop SOF_DBG_DUMP_FORCE_ERR_LEVEL and sof_dev_dbg_or_err
ASoC: SOF: debug: Print out the fw_state along with the DSP dump
ASoC: SOF: ipc: Re-enable dumps after successful IPC tx
ASoC: SOF: ops: Force DSP panic dumps to be printed
ASoC: SOF: Introduce macro to set the firmware state
ASoC: SOF: intel: hda: Drop 'error' prefix from error dump functions
ASoC: SOF: core: Clean up snd_sof_get_status() prints
ASoC: SOF: loader: Drop SOF_DBG_DUMP_REGS flag when firmware start
fails
ASoC: SOF: Intel: hda-loader: Drop SOF_DBG_DUMP_REGS flag from
dbg_dump calls
ASoC: SOF: Intel: hda: Dump registers and stack when SOF_DBG_DUMP_REGS
is set
Pierre-Louis Bossart (1):
ASoC: SOF: core: debug: force all processing on primary core
sound/soc/sof/core.c | 24 ++++++-------
sound/soc/sof/debug.c | 61 ++++++++++++++++++++++++++++++--
sound/soc/sof/intel/atom.c | 5 +--
sound/soc/sof/intel/hda-loader.c | 11 +++---
sound/soc/sof/intel/hda.c | 16 +++------
sound/soc/sof/ipc.c | 10 ++++--
sound/soc/sof/loader.c | 11 ++++--
sound/soc/sof/ops.c | 3 ++
sound/soc/sof/ops.h | 12 +------
sound/soc/sof/pm.c | 6 ++--
sound/soc/sof/sof-priv.h | 31 ++++++++++------
sound/soc/sof/topology.c | 6 ++++
12 files changed, 131 insertions(+), 65 deletions(-)
--
2.33.0
2021-10-07 22:24:56 +01:00
Daniel Baluta
858f7a5c45
ASoC: SOF: Introduce fragment elapsed notification API
...
This patch prepares the introduction of the compress API with SOF.
After each fragment is accepted by the DSP we need to inform
the userspace applications that they can send the next fragment.
This is done via snd_compr_fragment_elapsed.
Similar with the PCM case, in order to avoid sending an IPC before
the previous IPC is handled we need to schedule a delayed work to
call snd_compr_fragment_elapsed().
See snd_sof_pcm_period_elapsed.
To sum up this patch offers the following API to SOF code:
* snd_sof_compr_init_elapsed_work
* snd_sof_compr_fragment_elapsed
Note that implementation for compressed function is in a new file
selected via CONFIG_SND_SOC_SOF_COMPRESS invisible config option.
This option is automatically selected for platforms that support
the compress interface. For now only i.MX8 platforms support this.
For symmetry we introduce snd_sof_pcm_init_elapsed_work to setup
the work struct for PCM case.
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com >
Signed-off-by: Bud Liviu-Alexandru <budliviu@gmail.com >
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com >
Reviewed-by: Paul Olaru <paul.olaru@oss.nxp.com >
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com >
Link: https://lore.kernel.org/r/20211004152147.1268978-5-daniel.baluta@oss.nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2021-10-07 16:57:57 +01:00
Peter Ujfalusi
d8a15e5fca
ASoC: SOF: pipelines: Harmonize all functions to use struct snd_sof_dev
...
First thing the pipelines function which have "struct device *dev" as
parameter do is:
struct snd_sof_dev *sdev = dev_get_drvdata(dev);
and in all cases the passed dev is actually coming from sdev->dev.
Skip this steps and pass directly the sdev to all pipelines related
functions as few of them already does this.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com >
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com >
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com >
Link: https://lore.kernel.org/r/20211006111651.10027-1-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2021-10-07 15:45:45 +01:00
Ranjani Sridharan
ec626334ea
ASoC: SOF: topology: do not power down primary core during topology removal
...
When removing the topology components, do not power down
the primary core. Doing so will result in an IPC timeout
when the SOF PCI device runtime suspends.
Fixes: 0dcdf84289 ("ASoC: SOF: add a "core" parameter to widget loading functions")
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@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: Peter Ujfalusi <peter.ujfalusi@linux.intel.com >
Link: https://lore.kernel.org/r/20211006104041.27183-1-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2021-10-07 15:45:44 +01:00
Pierre-Louis Bossart
1539c8c5fc
ASoC: SOF: core: debug: force all processing on primary core
...
The topology file currently provides information on which
pipeline/processing is to be scheduled on which DSP core.
To help diagnose potential issues, this patch provides an override of
the 'core' tokens to use the primary core (typically core0). Of course
this may result in a Core0 activity that exceeds hardware
capabilities, so this should only be used when the total processing
fits on DSP - possibly using firmware mockup processing and stubs.
No new dmesg log was added to avoid adding noise during topology
parsing, but the existing logs will show the primary core being used.
This is strictly for validation/debug, products should NEVER use this
override, the topology is assumed to be the description of the
firmware graph.
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com >
Reviewed-by: Bard Liao <bard.liao@intel.com >
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com >
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com >
Link: https://lore.kernel.org/r/20211006110645.26679-2-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2021-10-07 15:45:21 +01:00
Ranjani Sridharan
4a23076987
ASoC: SOF: topology: return error if sof_connect_dai_widget() fails
...
Return the error if sof_connect_dai_widget() fails to
abort topology loading and prevent card registration.
Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com >
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com >
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com >
Link: https://lore.kernel.org/r/20211004212729.199550-4-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2021-10-05 13:09:56 +01:00
Pierre-Louis Bossart
ea6bfbbe3e
ASoC: SOF: topology: allow for dynamic pipelines override for debug
...
For debug and community support, it's useful to expose a kernel
parameter to prevent the use of dynamic pipelines exposed in a
topology file, or conversely to force an existing topology to use
dynamic pipelines.
Add an override bit and an enable bit which is valid only when the
override is set.
For products, the intent is that the topology file defines the
behavior, these two bits are only intended for diagnosis and
performance checks.
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com >
Reviewed-by: Bard Liao <bard.liao@intel.com >
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com >
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com >
Link: https://lore.kernel.org/r/20211004212729.199550-3-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2021-10-05 13:09:55 +01:00
Pierre-Louis Bossart
cf9f3fffae
ASoC: SOF: topology: show clks_control value in dynamic debug
...
We log most of the SSP configurations except the clks_control. This
will be used to enable bclk/mclk early start so it's useful to show
the information to the user.
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com >
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com >
Reviewed-by: Bard Liao <bard.liao@intel.com >
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com >
Link: https://lore.kernel.org/r/20211004212729.199550-2-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2021-10-05 13:09:54 +01:00
Ranjani Sridharan
c0e7969cf9
ASoC: SOF: topology: Add kernel parameter for topology verification
...
Add a kernel debug flag to enable a one-shot topology
verification for all pipelines including the dynamic
ones. If the debug flag is set, all the topology
component loading will be verified during the complete
callback.
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-13-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2021-10-01 20:48:31 +01:00
Ranjani Sridharan
0acb48dd31
ASoC: SOF: Intel: hda: make sure DAI widget is set up before IPC
...
With the implementation of the dynamic pipeline feature, widgets
will only be setup when a PCM is opened during the
hw_params ioctl. The BE hw_params callback is responsible for
sending the DAI_CONFIG for the DAI widgets in the DSP.
With dynamic pipelines, the DAI widgets will need to set up
first before sending the DAI_CONFIG IPC in the BE hw_params.
Update the BE hw_params/hw_free callbacks for all ALH, HDA and SSP
DAIs to set up/free the DAI widget before/after DAI_CONFIG IPC.
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-11-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2021-10-01 20:48:29 +01:00