From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-by2nam03on0115.outbound.protection.outlook.com ([104.47.42.115]:29467 "EHLO NAM03-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754947AbeDIAXu (ORCPT ); Sun, 8 Apr 2018 20:23:50 -0400 From: Sasha Levin To: "stable@vger.kernel.org" , "linux-kernel@vger.kernel.org" CC: Jeffy Chen , Mark Brown , Sasha Levin Subject: [PATCH AUTOSEL for 4.14 071/161] ASoC: rockchip: Use dummy_dai for rt5514 dsp dailink Date: Mon, 9 Apr 2018 00:20:44 +0000 Message-ID: <20180409001936.162706-71-alexander.levin@microsoft.com> References: <20180409001936.162706-1-alexander.levin@microsoft.com> In-Reply-To: <20180409001936.162706-1-alexander.levin@microsoft.com> Content-Language: en-US Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org List-ID: From: Jeffy Chen [ Upstream commit fde7f9dbc71365230eeb8c8ea97ce9b552c8e5bd ] 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: Jimmy Cheng-Yi Chiang Fixes: (72cfb0f20c75 ASoC: rockchip: Use codec of_node and dai_name for rt5= 514 dsp) Signed-off-by: Jeffy Chen Tested-by: Brian Norris Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- sound/soc/rockchip/rk3399_gru_sound.c | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/sound/soc/rockchip/rk3399_gru_sound.c b/sound/soc/rockchip/rk3= 399_gru_sound.c index 0513fe480353..21ac8d6cce3a 100644 --- a/sound/soc/rockchip/rk3399_gru_sound.c +++ b/sound/soc/rockchip/rk3399_gru_sound.c @@ -387,7 +387,8 @@ static const struct snd_soc_dai_link rockchip_dais[] = =3D { [DAILINK_RT5514_DSP] =3D { .name =3D "RT5514 DSP", .stream_name =3D "Wake on Voice", - .codec_dai_name =3D "rt5514-dsp-cpu-dai", + .codec_name =3D "snd-soc-dummy", + .codec_dai_name =3D "snd-soc-dummy-dai", }, }; =20 @@ -432,7 +433,18 @@ static int rockchip_sound_of_parse_dais(struct device = *dev, if (index < 0) continue; =20 - np_cpu =3D (index =3D=3D DAILINK_CDNDP) ? np_cpu1 : np_cpu0; + switch (index) { + case DAILINK_CDNDP: + np_cpu =3D np_cpu1; + break; + case DAILINK_RT5514_DSP: + np_cpu =3D np_codec; + break; + default: + np_cpu =3D np_cpu0; + break; + } + if (!np_cpu) { dev_err(dev, "Missing 'rockchip,cpu' for %s\n", rockchip_dais[index].name); @@ -442,7 +454,8 @@ static int rockchip_sound_of_parse_dais(struct device *= dev, dai =3D &card->dai_link[card->num_links++]; *dai =3D rockchip_dais[index]; =20 - dai->codec_of_node =3D np_codec; + if (!dai->codec_name) + dai->codec_of_node =3D np_codec; dai->platform_of_node =3D np_cpu; dai->cpu_of_node =3D np_cpu; } --=20 2.15.1