Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Unverified Commit fde7f9db authored by Jeffy Chen's avatar Jeffy Chen Committed by Mark Brown
Browse files

ASoC: rockchip: Use dummy_dai for rt5514 dsp dailink



The rt5514 dsp captures pcm data through spi directly, so we should not
use rockchip-i2s as it's cpu dai like other codecs.

Use dummy_dai for rt5514 dsp dailink to make voice wakeup work again.

Reported-by: default avatarJimmy Cheng-Yi Chiang <cychiang@google.com>
Fixes: (72cfb0f2 ASoC: rockchip: Use codec of_node and dai_name for rt5514 dsp)
Signed-off-by: default avatarJeffy Chen <jeffy.chen@rock-chips.com>
Tested-by: default avatarBrian Norris <briannorris@chromium.org>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent db51707b
Loading
Loading
Loading
Loading
+16 −3
Original line number Diff line number Diff line
@@ -367,7 +367,8 @@ static const struct snd_soc_dai_link rockchip_dais[] = {
	[DAILINK_RT5514_DSP] = {
		.name = "RT5514 DSP",
		.stream_name = "Wake on Voice",
		.codec_dai_name = "rt5514-dsp-cpu-dai",
		.codec_name = "snd-soc-dummy",
		.codec_dai_name = "snd-soc-dummy-dai",
	},
};

@@ -528,7 +529,18 @@ static int rockchip_sound_of_parse_dais(struct device *dev,
		if (index < 0)
			continue;

		np_cpu = (index == DAILINK_CDNDP) ? np_cpu1 : np_cpu0;
		switch (index) {
		case DAILINK_CDNDP:
			np_cpu = np_cpu1;
			break;
		case DAILINK_RT5514_DSP:
			np_cpu = np_codec;
			break;
		default:
			np_cpu = np_cpu0;
			break;
		}

		if (!np_cpu) {
			dev_err(dev, "Missing 'rockchip,cpu' for %s\n",
				rockchip_dais[index].name);
@@ -538,6 +550,7 @@ static int rockchip_sound_of_parse_dais(struct device *dev,
		dai = &card->dai_link[card->num_links++];
		*dai = rockchip_dais[index];

		if (!dai->codec_name)
			dai->codec_of_node = np_codec;
		dai->platform_of_node = np_cpu;
		dai->cpu_of_node = np_cpu;