ASoC: SOC: Fix fmt with dai naming
authorHoegeun Kwon <hoegeun.kwon@samsung.com>
Tue, 20 Jun 2023 10:10:44 +0000 (19:10 +0900)
committerJaehoon Chung <jh80.chung@samsung.com>
Mon, 24 Jul 2023 23:25:18 +0000 (08:25 +0900)
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 <hoegeun.kwon@samsung.com>
sound/soc/starfive/starfive_i2s.c
sound/soc/starfive/starfive_pwmdac_transmitter.c

index 8a1ccfe..e1f236a 100644 (file)
@@ -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;
 }
 
index c580800..74373dd 100755 (executable)
@@ -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 = {