Skip to content

Commit 8ea4ee1

Browse files
Jianhui Wangrkhuangtao
authored andcommitted
ASoC: rockchip: cdndp: use spdif for dp output
Change-Id: I23b3e58ad361ad026e836dc19e1f727c350046f1 Signed-off-by: Jianhui Wang <[email protected]>
1 parent b104ddf commit 8ea4ee1

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

sound/soc/rockchip/rockchip_cdndp.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ static int rockchip_sound_cdndp_hw_params(struct snd_pcm_substream *substream,
2929
{
3030
struct snd_soc_pcm_runtime *rtd = substream->private_data;
3131
struct snd_soc_dai *cpu_dai = rtd->cpu_dai;
32-
struct snd_soc_dai *codec_dai = rtd->codec_dai;
3332
int mclk, ret;
3433

3534
/* 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,
6160

6261
ret = snd_soc_dai_set_sysclk(cpu_dai, 0, mclk,
6362
SND_SOC_CLOCK_OUT);
64-
if (ret < 0) {
65-
dev_err(codec_dai->dev, "Can't set cpu clock out %d\n", ret);
63+
if (ret && ret != -ENOTSUPP) {
64+
dev_err(cpu_dai->dev, "Can't set cpu clock %d\n", ret);
6665
return ret;
6766
}
6867

@@ -95,7 +94,7 @@ static struct snd_soc_ops rockchip_sound_cdndp_ops = {
9594
static struct snd_soc_dai_link cdndp_dailink = {
9695
.name = "DP",
9796
.stream_name = "DP PCM",
98-
.codec_dai_name = "i2s-hifi",
97+
.codec_dai_name = "spdif-hifi",
9998
.init = rockchip_sound_cdndp_init,
10099
.ops = &rockchip_sound_cdndp_ops,
101100
.dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF |

0 commit comments

Comments
 (0)