summaryrefslogtreecommitdiff
path: root/include/sound
diff options
context:
space:
mode:
authorLiam Girdwood <liam.r.girdwood@linux.intel.com>2018-03-27 16:30:40 +0300
committerMark Brown <broonie@kernel.org>2018-04-17 20:07:20 +0300
commit45f8cb57da0d7a9ead4b39d7f5def333a5b0c08b (patch)
treedbccf8956339890ce71070e5799daceb1b29232e /include/sound
parent7b0037fa2d6048284e90de4131fc53c0ac1d4430 (diff)
downloadlinux-45f8cb57da0d7a9ead4b39d7f5def333a5b0c08b.tar.xz
ASoC: core: Allow topology to override machine driver FE DAI link config.
Machine drivers statically define a number of DAI links that currently cannot be changed or removed by topology. This means PCMs and platform components cannot be changed by topology at runtime AND machine drivers are tightly coupled to topology. This patch allows topology to override the machine driver DAI link config in order to reuse machine drivers with different topologies and platform components. The patch supports :- 1) create new FE PCMs with a topology defined PCM ID. 2) destroy existing static FE PCMs 3) change the platform component driver. 4) assign any new HW params fixups. The patch requires no changes to the machine drivers, but does add some platform component flags that the platform component driver can assign before loading topologies. Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'include/sound')
-rw-r--r--include/sound/soc.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/sound/soc.h b/include/sound/soc.h
index ad266d7e9553..fac4ff04fb7d 100644
--- a/include/sound/soc.h
+++ b/include/sound/soc.h
@@ -1012,6 +1012,13 @@ struct snd_soc_platform_driver {
/* platform stream compress ops */
const struct snd_compr_ops *compr_ops;
+
+ /* this platform uses topology and ignore machine driver FEs */
+ const char *ignore_machine;
+ int (*be_hw_params_fixup)(struct snd_soc_pcm_runtime *rtd,
+ struct snd_pcm_hw_params *params);
+ bool use_dai_pcm_id; /* use the DAI link PCM ID as PCM device number */
+ int be_pcm_base; /* base device ID for all BE PCMs */
};
struct snd_soc_dai_link_component {
@@ -1118,6 +1125,9 @@ struct snd_soc_dai_link {
/* pmdown_time is ignored at stop */
unsigned int ignore_pmdown_time:1;
+ /* Do not create a PCM for this DAI link (Backend link) */
+ unsigned int ignore:1;
+
struct list_head list; /* DAI link list of the soc card */
struct snd_soc_dobj dobj; /* For topology */
};