From 8ea4ee1c3e33cb36808c41af5867b8d8ec69d330 Mon Sep 17 00:00:00 2001 From: Jianhui Wang Date: Thu, 24 Jan 2019 16:10:52 +0800 Subject: [PATCH] ASoC: rockchip: cdndp: use spdif for dp output Change-Id: I23b3e58ad361ad026e836dc19e1f727c350046f1 Signed-off-by: Jianhui Wang --- sound/soc/rockchip/rockchip_cdndp.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/sound/soc/rockchip/rockchip_cdndp.c b/sound/soc/rockchip/rockchip_cdndp.c index 099ac0654e8c..aafeab5b41c7 100644 --- a/sound/soc/rockchip/rockchip_cdndp.c +++ b/sound/soc/rockchip/rockchip_cdndp.c @@ -29,7 +29,6 @@ static int rockchip_sound_cdndp_hw_params(struct snd_pcm_substream *substream, { struct snd_soc_pcm_runtime *rtd = substream->private_data; struct snd_soc_dai *cpu_dai = rtd->cpu_dai; - struct snd_soc_dai *codec_dai = rtd->codec_dai; int mclk, ret; /* in bypass mode, the mclk has to be one of the frequencies below */ @@ -61,8 +60,8 @@ static int rockchip_sound_cdndp_hw_params(struct snd_pcm_substream *substream, ret = snd_soc_dai_set_sysclk(cpu_dai, 0, mclk, SND_SOC_CLOCK_OUT); - if (ret < 0) { - dev_err(codec_dai->dev, "Can't set cpu clock out %d\n", ret); + if (ret && ret != -ENOTSUPP) { + dev_err(cpu_dai->dev, "Can't set cpu clock %d\n", ret); return ret; } @@ -95,7 +94,7 @@ static struct snd_soc_ops rockchip_sound_cdndp_ops = { static struct snd_soc_dai_link cdndp_dailink = { .name = "DP", .stream_name = "DP PCM", - .codec_dai_name = "i2s-hifi", + .codec_dai_name = "spdif-hifi", .init = rockchip_sound_cdndp_init, .ops = &rockchip_sound_cdndp_ops, .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF |