From: Hoegeun Kwon Date: Tue, 20 Jun 2023 10:10:44 +0000 (+0900) Subject: ASoC: SOC: Fix fmt with dai naming X-Git-Tag: accepted/tizen/unified/riscv/20230725.071352~21 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8d43ac92128b9f8b30ffbe8c6988fa46913acad4;p=platform%2Fkernel%2Flinux-starfive.git ASoC: SOC: Fix fmt with dai naming Kernel v6.y does not support the legacy_dai_naming format, so there is a problem that i2s does not work due to dai_name. Fix that issue. Change-Id: I9aae5c683b4b5d803c12959ca2994e8cc3e6c577 Signed-off-by: Hoegeun Kwon --- diff --git a/sound/soc/starfive/starfive_i2s.c b/sound/soc/starfive/starfive_i2s.c index 8a1ccfe0e8cf..e1f236a78d22 100644 --- a/sound/soc/starfive/starfive_i2s.c +++ b/sound/soc/starfive/starfive_i2s.c @@ -391,21 +391,21 @@ static int dw_i2s_set_fmt(struct snd_soc_dai *cpu_dai, unsigned int fmt) struct dw_i2s_dev *dev = snd_soc_dai_get_drvdata(cpu_dai); int ret = 0; - switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) { - case SND_SOC_DAIFMT_CBM_CFM: + switch (fmt & SND_SOC_DAIFMT_CLOCK_PROVIDER_MASK) { + case SND_SOC_DAIFMT_BC_FC: if (dev->capability & DW_I2S_SLAVE) ret = 0; else ret = -EINVAL; break; - case SND_SOC_DAIFMT_CBS_CFS: + case SND_SOC_DAIFMT_BP_FP: if (dev->capability & DW_I2S_MASTER) ret = 0; else ret = -EINVAL; break; - case SND_SOC_DAIFMT_CBM_CFS: - case SND_SOC_DAIFMT_CBS_CFM: + case SND_SOC_DAIFMT_BC_FP: + case SND_SOC_DAIFMT_BP_FC: ret = -EINVAL; break; default: @@ -413,6 +413,7 @@ static int dw_i2s_set_fmt(struct snd_soc_dai *cpu_dai, unsigned int fmt) ret = -EINVAL; break; } + return ret; } diff --git a/sound/soc/starfive/starfive_pwmdac_transmitter.c b/sound/soc/starfive/starfive_pwmdac_transmitter.c index c580800dd597..74373dd90088 100755 --- a/sound/soc/starfive/starfive_pwmdac_transmitter.c +++ b/sound/soc/starfive/starfive_pwmdac_transmitter.c @@ -52,7 +52,6 @@ static struct snd_soc_component_driver soc_codec_pwmdac_dit = { .idle_bias_on = 1, .use_pmdown_time = 1, .endianness = 1, - .legacy_dai_naming = 1, }; static struct snd_soc_dai_driver dit_stub_dai = {