ASoC: fsl: eukrea-tlv320: use modern dai_link style
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Thu, 6 Jun 2019 04:15:54 +0000 (13:15 +0900)
committerMark Brown <broonie@kernel.org>
Thu, 6 Jun 2019 20:43:04 +0000 (21:43 +0100)
ASoC is now supporting modern style dai_link
(= snd_soc_dai_link_component) for CPU/Codec/Platform.
This patch switches to use it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/fsl/eukrea-tlv320.c

index d648268cb454c3ffff3851574b12114286503d56..6f3b768489f6f1e00fe6bc8d9e01a1c0f0eaadba 100644 (file)
@@ -61,13 +61,18 @@ static const struct snd_soc_ops eukrea_tlv320_snd_ops = {
        .hw_params      = eukrea_tlv320_hw_params,
 };
 
+SND_SOC_DAILINK_DEFS(hifi,
+       DAILINK_COMP_ARRAY(COMP_EMPTY()),
+       DAILINK_COMP_ARRAY(COMP_CODEC(NULL, "tlv320aic23-hifi")),
+       DAILINK_COMP_ARRAY(COMP_EMPTY()));
+
 static struct snd_soc_dai_link eukrea_tlv320_dai = {
        .name           = "tlv320aic23",
        .stream_name    = "TLV320AIC23",
-       .codec_dai_name = "tlv320aic23-hifi",
        .dai_fmt        = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF |
                          SND_SOC_DAIFMT_CBM_CFM,
        .ops            = &eukrea_tlv320_snd_ops,
+       SND_SOC_DAILINK_REG(hifi),
 };
 
 static struct snd_soc_card eukrea_tlv320 = {
@@ -104,7 +109,7 @@ static int eukrea_tlv320_probe(struct platform_device *pdev)
 
                codec_np = of_parse_phandle(ssi_np, "codec-handle", 0);
                if (codec_np)
-                       eukrea_tlv320_dai.codec_of_node = codec_np;
+                       eukrea_tlv320_dai.codecs->of_node = codec_np;
                else
                        dev_err(&pdev->dev, "codec-handle node missing or invalid.\n");
 
@@ -128,12 +133,12 @@ static int eukrea_tlv320_probe(struct platform_device *pdev)
                int_port--;
                ext_port--;
 
-               eukrea_tlv320_dai.cpu_of_node = ssi_np;
-               eukrea_tlv320_dai.platform_of_node = ssi_np;
+               eukrea_tlv320_dai.cpus->of_node = ssi_np;
+               eukrea_tlv320_dai.platforms->of_node = ssi_np;
        } else {
-               eukrea_tlv320_dai.cpu_dai_name = "imx-ssi.0";
-               eukrea_tlv320_dai.platform_name = "imx-ssi.0";
-               eukrea_tlv320_dai.codec_name = "tlv320aic23-codec.0-001a";
+               eukrea_tlv320_dai.cpus->dai_name = "imx-ssi.0";
+               eukrea_tlv320_dai.platforms->name = "imx-ssi.0";
+               eukrea_tlv320_dai.codecs->name = "tlv320aic23-codec.0-001a";
                eukrea_tlv320.name = "cpuimx-audio";
        }