Skip to content
Snippets Groups Projects
Unverified Commit add23327 authored by Kuninori Morimoto's avatar Kuninori Morimoto Committed by Mark Brown
Browse files

ASoC: simple-card-utils: care simple_util_dai for dummy DAI


Simple Card Utils has simple_util_dai which is paired to snd_soc_dai,
and assmus that CPU/Codec DAI and its paired simple_util_dai are same
order for CPU/Codec

	simple_util_dai[0] <--> snd_soc_dai[0]
	simple_util_dai[1] <--> snd_soc_dai[1]
	...

So, it is using same index in for_each loop.

(X) gets simple_util_dai
(Y) gets snd_soc_dai

(Y)	for_each_rtd_cpu_dais(.., i, ..) {
(X)(A)		udai = simple_props_to_dai_cpu(.., i);
	}

(X)	for_each_prop_dai_cpu(.., i, ...) {
(Y)		dai = snd_soc_rtd_to_cpu(.., i);
		...
	}

But current Simple Card Utils didn't have simple_util_dai for
dummy DAI. So above (A) will get NULL pointer in such case.
This patch cares simple_util_dai for dummy DAI.

Signed-off-by: default avatarKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/87msi5maz3.wl-kuninori.morimoto.gx@renesas.com


Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent c853e963
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment