linux-stable/sound/soc/qcom/qdsp6
Stephan Gerhold 6fd8d2d275
ASoC: qcom: qdsp6: Move frontend AIFs to q6asm-dai
At the moment it is necessary to set up the DAPM routes between
front-end AIF<->DAI explicitly in the device tree, e.g. using

	audio-routing =
		"MM_DL1", "MultiMedia1 Playback",
		"MM_DL3", "MultiMedia3 Playback",
		"MM_DL4", "MultiMedia4 Playback",
		"MultiMedia2 Capture", "MM_UL2";

This is prone to mistakes and (sadly) there is no clear error if one
of these routes is missing. :(

Actually, this should not be necessary because the ASoC core normally
automatically links AIF<->DAI within snd_soc_dapm_link_dai_widgets().
This is done using the "stname" parameter of SND_SOC_DAPM_AIF_IN/OUT.

For SND_SOC_DAPM_AIF_IN("MM_DL1", "MultiMedia1 Playback", 0, 0, 0, 0),
it should create the route from above: MM_DL1 <-> MultiMedia1 Playback.

This does not work at the moment because the AIF widget (MM_DL1)
and the DAI widget (MultiMedia1 Playback) belong to different
DAPM contexts (q6routing / q6asm-dai).

Fix this by declaring the AIF widgets in the same driver as the DAIs
(q6asm-dai). Now the routes above are created automatically
and no longer need to be specified in the device tree.

This is also more consistent with the back-end AIFs which are already
declared in q6afe-dais instead of q6routing. q6routing should only link
the components together using mixers.

Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Fixes: 2a9e92d371 ("ASoC: qdsp6: q6asm: Add q6asm dai driver")
Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
Link: https://lore.kernel.org/r/20201211203255.148246-1-stephan@gerhold.net
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-01-13 11:36:14 +00:00
..
Makefile ASoC: q6afe-clocks: add q6afe clock controller 2020-09-17 16:13:13 +01:00
q6adm.c ASoC: qcom: qdsp6: make use of devm_of_platform_populate 2020-10-27 14:13:34 +00:00
q6adm.h ASoC: qdsp6: q6adm: Add q6adm driver 2018-05-21 16:40:24 +01:00
q6afe-clocks.c Merge remote-tracking branch 'asoc/for-5.11' into asoc-next 2020-12-11 17:48:04 +00:00
q6afe-dai.c ASoC: qdsp6: add ifdef CONFIG_OF around of_device_id 2020-09-25 18:36:58 +01:00
q6afe.c ASoC: qcom: qdsp6: make use of devm_of_platform_populate 2020-10-27 14:13:34 +00:00
q6afe.h ASoC: q6dsp: q6afe: add codec lpass clocks 2020-09-10 13:29:28 +01:00
q6asm-dai.c ASoC: qcom: qdsp6: Move frontend AIFs to q6asm-dai 2021-01-13 11:36:14 +00:00
q6asm.c ASoC: qcom: qdsp6: make use of devm_of_platform_populate 2020-10-27 14:13:34 +00:00
q6asm.h ASoC: q6asm-dai: add gapless support 2020-08-17 18:29:38 +01:00
q6core.c ASoC: qdsp6: add ifdef CONFIG_OF around of_device_id 2020-09-25 18:36:58 +01:00
q6core.h
q6dsp-common.c
q6dsp-common.h
q6dsp-errno.h
q6routing.c ASoC: qcom: qdsp6: Move frontend AIFs to q6asm-dai 2021-01-13 11:36:14 +00:00
q6routing.h ASoC: qdsp6: q6routing: Add q6routing driver 2018-05-21 16:41:48 +01:00